From 73a3cc21d0e7ceec1275078db125f57ce97725fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 30 Jan 2020 03:16:48 +0100 Subject: [PATCH] feat: dprint formatter (#3820) * rewrite fmt_test in Rust, remove tools/fmt_test.py * remove //std/prettier --- .eslintignore | 1 - Cargo.lock | 599 + cli/Cargo.toml | 2 + cli/flags.rs | 360 +- cli/fmt.rs | 162 + cli/lib.rs | 8 +- cli/tests/badly_formatted.js | 4 +- cli/tests/integration_tests.rs | 40 +- std/README.md | 1 - std/manual.md | 10 +- std/prettier/README.md | 48 - std/prettier/ignore.ts | 15 - std/prettier/ignore_test.ts | 81 - std/prettier/main.ts | 616 - std/prettier/main_test.ts | 551 - std/prettier/prettier.ts | 19 - std/prettier/testdata/0.ts | 1 - std/prettier/testdata/1.js | 1 - std/prettier/testdata/2.ts | 0 std/prettier/testdata/3.jsx | 2 - std/prettier/testdata/4.tsx | 3 - std/prettier/testdata/5.ts | 1 - std/prettier/testdata/bar/0.ts | 1 - std/prettier/testdata/bar/1.js | 1 - .../testdata/config_file_js/.prettierrc.js | 5 - .../config_file_json/.prettierrc.json | 4 - .../config_file_toml/.prettierrc.toml | 2 - .../testdata/config_file_ts/.prettierrc.ts | 5 - .../config_file_yaml/.prettierrc.yaml | 2 - .../testdata/config_file_yml/.prettierrc.yml | 2 - std/prettier/testdata/echox.ts | 8 - std/prettier/testdata/foo/0.ts | 1 - std/prettier/testdata/foo/1.js | 1 - std/prettier/testdata/formatted.ts | 1 - .../testdata/ignore_file/.prettierignore | 3 - std/prettier/testdata/ignore_file/0.js | 1 - std/prettier/testdata/ignore_file/0.ts | 1 - std/prettier/testdata/ignore_file/1.js | 1 - std/prettier/testdata/ignore_file/1.ts | 1 - std/prettier/testdata/ignore_file/README.md | 5 - .../ignore_file/typescript.prettierignore | 3 - std/prettier/testdata/opts/0.ts | 6 - std/prettier/testdata/opts/1.ts | 1 - std/prettier/testdata/opts/2.ts | 1 - std/prettier/testdata/opts/3.md | 1 - std/prettier/util.ts | 10 - std/prettier/vendor/index.d.ts | 507 - std/prettier/vendor/parser_babylon.d.ts | 4 - std/prettier/vendor/parser_babylon.js | 11 - std/prettier/vendor/parser_markdown.d.ts | 4 - std/prettier/vendor/parser_markdown.js | 142 - std/prettier/vendor/parser_typescript.d.ts | 4 - std/prettier/vendor/parser_typescript.js | 24 - std/prettier/vendor/standalone.d.ts | 30 - std/prettier/vendor/standalone.js | 31835 ---------------- tools/benchmark.py | 4 - tools/fmt_test.py | 43 - tools/lint.py | 4 +- 58 files changed, 868 insertions(+), 34336 deletions(-) create mode 100644 cli/fmt.rs delete mode 100644 std/prettier/README.md delete mode 100644 std/prettier/ignore.ts delete mode 100644 std/prettier/ignore_test.ts delete mode 100755 std/prettier/main.ts delete mode 100644 std/prettier/main_test.ts delete mode 100644 std/prettier/prettier.ts delete mode 100644 std/prettier/testdata/0.ts delete mode 100644 std/prettier/testdata/1.js delete mode 100644 std/prettier/testdata/2.ts delete mode 100644 std/prettier/testdata/3.jsx delete mode 100644 std/prettier/testdata/4.tsx delete mode 100644 std/prettier/testdata/5.ts delete mode 100644 std/prettier/testdata/bar/0.ts delete mode 100644 std/prettier/testdata/bar/1.js delete mode 100644 std/prettier/testdata/config_file_js/.prettierrc.js delete mode 100644 std/prettier/testdata/config_file_json/.prettierrc.json delete mode 100644 std/prettier/testdata/config_file_toml/.prettierrc.toml delete mode 100644 std/prettier/testdata/config_file_ts/.prettierrc.ts delete mode 100644 std/prettier/testdata/config_file_yaml/.prettierrc.yaml delete mode 100644 std/prettier/testdata/config_file_yml/.prettierrc.yml delete mode 100644 std/prettier/testdata/echox.ts delete mode 100644 std/prettier/testdata/foo/0.ts delete mode 100644 std/prettier/testdata/foo/1.js delete mode 100644 std/prettier/testdata/formatted.ts delete mode 100644 std/prettier/testdata/ignore_file/.prettierignore delete mode 100644 std/prettier/testdata/ignore_file/0.js delete mode 100644 std/prettier/testdata/ignore_file/0.ts delete mode 100644 std/prettier/testdata/ignore_file/1.js delete mode 100644 std/prettier/testdata/ignore_file/1.ts delete mode 100644 std/prettier/testdata/ignore_file/README.md delete mode 100644 std/prettier/testdata/ignore_file/typescript.prettierignore delete mode 100644 std/prettier/testdata/opts/0.ts delete mode 100644 std/prettier/testdata/opts/1.ts delete mode 100644 std/prettier/testdata/opts/2.ts delete mode 100644 std/prettier/testdata/opts/3.md delete mode 100644 std/prettier/util.ts delete mode 100644 std/prettier/vendor/index.d.ts delete mode 100644 std/prettier/vendor/parser_babylon.d.ts delete mode 100644 std/prettier/vendor/parser_babylon.js delete mode 100644 std/prettier/vendor/parser_markdown.d.ts delete mode 100644 std/prettier/vendor/parser_markdown.js delete mode 100644 std/prettier/vendor/parser_typescript.d.ts delete mode 100644 std/prettier/vendor/parser_typescript.js delete mode 100644 std/prettier/vendor/standalone.d.ts delete mode 100644 std/prettier/vendor/standalone.js delete mode 100755 tools/fmt_test.py diff --git a/.eslintignore b/.eslintignore index ac9d2b1105..5e27955d79 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,5 @@ cli/compilers/wasm_wrap.js cli/tests/error_syntax.js std/deno.d.ts -std/prettier/vendor std/**/testdata/ std/**/node_modules/ diff --git a/Cargo.lock b/Cargo.lock index e41fca3ffd..07b5934060 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,6 +5,14 @@ name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ahash" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "aho-corasick" version = "0.7.6" @@ -41,6 +49,19 @@ name = "arrayvec" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "ast_node" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_macros_common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "async-compression" version = "0.2.0" @@ -63,6 +84,11 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "autocfg" version = "1.0.0" @@ -181,6 +207,15 @@ name = "cfg-if" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "chashmap" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "clap" version = "2.33.0" @@ -203,6 +238,24 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "const-random" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "const-random-macro" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -247,6 +300,38 @@ dependencies = [ "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "darling" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "darling_macro 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "darling_core" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "darling_macro" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "deno" version = "0.31.0" @@ -262,8 +347,10 @@ dependencies = [ "deno_typescript 0.31.0", "dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "dlopen 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "dprint-plugin-typescript 0.3.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "fwdansi 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -364,11 +451,33 @@ name = "downcast-rs" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "dprint-core" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "dprint-plugin-typescript" +version = "0.3.0-alpha.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dprint-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_common 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_ecma_ast 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_ecma_parser 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "dtoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "either" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "encoding_rs" version = "0.8.22" @@ -377,6 +486,17 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "enum_kind" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_macros_common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" version = "0.1.6" @@ -413,6 +533,17 @@ name = "fnv" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "from_variant" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_macros_common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -541,6 +672,11 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "h2" version = "0.2.1" @@ -559,6 +695,15 @@ dependencies = [ "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hashbrown" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "heck" version = "0.3.1" @@ -646,6 +791,11 @@ dependencies = [ "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "idna" version = "0.2.0" @@ -704,6 +854,15 @@ name = "libc" version = "0.2.66" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lock_api" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "log" version = "0.4.8" @@ -717,6 +876,11 @@ name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "memchr" version = "2.3.0" @@ -813,6 +977,11 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "nix" version = "0.14.1" @@ -834,6 +1003,34 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-integer" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num_cpus" version = "1.12.0" @@ -857,11 +1054,85 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "owning_ref" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "owning_ref" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "phf_generator" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_shared" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "siphasher 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pin-project" version = "0.4.6" @@ -890,11 +1161,26 @@ name = "pin-utils" version = "0.1.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pmutil" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ppv-lite86" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "proc-macro-hack" version = "0.5.11" @@ -954,6 +1240,24 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" version = "0.7.3" @@ -964,6 +1268,16 @@ dependencies = [ "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -996,6 +1310,14 @@ dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_hc" version = "0.2.0" @@ -1004,6 +1326,24 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand_os" version = "0.1.3" @@ -1017,6 +1357,31 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rdrand" version = "0.4.0" @@ -1130,6 +1495,14 @@ name = "rustc-demangle" version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustls" version = "0.16.0" @@ -1196,6 +1569,16 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "sct" version = "0.6.0" @@ -1224,6 +1607,19 @@ dependencies = [ "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.104" @@ -1273,11 +1669,24 @@ dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "siphasher" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "smallvec" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "smallvec" version = "1.1.0" @@ -1313,11 +1722,142 @@ name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "string_cache" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "string_cache_codegen" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "string_enum" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_macros_common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "strsim" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "swc_atoms" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "string_cache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache_codegen 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "swc_common" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ast_node 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "chashmap 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "from_variant 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "string_cache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "swc_ecma_ast" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "enum_kind 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "string_enum 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_atoms 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_common 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "swc_ecma_parser" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "enum_kind 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_atoms 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_common 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_ecma_ast 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_ecma_parser_macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "swc_ecma_parser_macros" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "swc_macros_common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "swc_macros_common" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "syn" version = "0.15.44" @@ -1782,14 +2322,17 @@ dependencies = [ [metadata] "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +"checksum ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum anyhow 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" "checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +"checksum ast_node 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d96b5937e2a8b8dd9eac561c192f7fef2ab0cbc06c445e67b9e637ab158c52b" "checksum async-compression 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2c5c52622726d68ec35fec88edfb4ccb862d4f3b3bfa4af2f45142e69ef9b220" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b4b1549d804b6c73f4817df2ba073709e96e426f12987127c48e6745568c350b" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" @@ -1807,25 +2350,36 @@ dependencies = [ "checksum cargo_gn 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba7d7f7b201dfcbc314b14f2176c92f8ba521dab538b40e426ffed25ed7cd80" "checksum cc 1.0.50 (registry+https://github.com/rust-lang/crates.io-index)" = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +"checksum chashmap 2.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff41a3c2c1e39921b9003de14bf0439c7b63a9039637c291e1a64925d8ddfa45" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum const-random 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" +"checksum const-random-macro 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" "checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" "checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" +"checksum darling 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +"checksum darling_core 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +"checksum darling_macro 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" "checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" "checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" "checksum dlopen 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937" "checksum dlopen_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581" "checksum downcast-rs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" +"checksum dprint-core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5415007772b0b0b447be0f0e748d0c1e55b4eb038ab5a606d12ba9feac7caa30" +"checksum dprint-plugin-typescript 0.3.0-alpha.1 (registry+https://github.com/rust-lang/crates.io-index)" = "98421a795f88b5b6da8d3e64fd66aeb34d636a7a2dc33e3e603f228ccd9679af" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" +"checksum enum_kind 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e57153e35187d51f08471d5840459ff29093473e7bedd004a1414985aab92f3" "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum from_variant 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "039885ad6579a86b94ad8df696cce8c530da496bf7b07b12fec8d6c4cd654bb9" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" @@ -1841,7 +2395,9 @@ dependencies = [ "checksum futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d66274fb76985d3c62c886d1da7ac4c0903a8c9f754e8fe0f35a6a6cc39e76" "checksum fwdansi 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08c1f5787fe85505d1f7777268db5103d80a7a374d2316a7ce262e57baf8f208" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +"checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" +"checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" "checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" @@ -1849,6 +2405,7 @@ dependencies = [ "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum hyper 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8bf49cfb32edee45d890537d9057d1b02ed55f53b7b6a30bae83a38c9231749e" "checksum hyper-rustls 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89109920197f2c90d75e82addbb96bf424570790d310cc2b18f0b33f4a9cc43" +"checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum indexmap 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b54058f0a6ff80b6803da8faf8997cde53872b38f4023728f6830b06cd3c0dc" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" @@ -1857,8 +2414,10 @@ dependencies = [ "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" "checksum memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" @@ -1869,17 +2428,31 @@ dependencies = [ "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" "checksum nix 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce" "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +"checksum num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +"checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum os_pipe 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "db4d06355a7090ce852965b2d08e11426c315438462638c6d721448d0b47aa22" +"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "149d8f5b97f3c1133e3cfcd8886449959e856b557ff281e292b733d7c69e005e" +"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa" +"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum phf_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +"checksum phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" "checksum pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "94b90146c7216e4cb534069fb91366de4ea0ea353105ee45ed297e2d1619e469" "checksum pin-project-internal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "44ca92f893f0656d3cba8158dd0f2b99b94de256a4a54e870bd6922fcc6c8355" "checksum pin-project-lite 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e8822eb8bb72452f038ebf6048efa02c3fe22bf83f76519c9583e47fc194a422" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" +"checksum pmutil 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3894e5d549cccbe44afecf72922f277f603cd4bb0219c8342631ef18fffbe004" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" +"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" "checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" @@ -1887,13 +2460,21 @@ dependencies = [ "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d" @@ -1904,27 +2485,45 @@ dependencies = [ "checksum ring 0.16.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6747f8da1f2b1fabbee1aaa4eb8a11abf9adef0bf58a41cee45db5d59cecdfac" "checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum rustls 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b25a18b1bf7387f0145e7f8324e700805aade3842dd3db2e74e4cdeb4677c09e" "checksum rustls-native-certs 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51ffebdbb48c14f84eba0b715197d673aff1dd22cc1007ca647e28483bbcc307" "checksum rusty_v8 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8ed9530934df58a5be648916e142858b473558a0df6356b59e083c1c3c2f7d32" "checksum rustyline 5.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a23cb19702a8d6afb6edb3c842386e680d4883760e0df74e6848e23c2a87a635" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" +"checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" "checksum security-framework 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8ef2429d7cefe5fd28bd1d2ed41c944547d4ff84776f5935b456da44593a16df" "checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" "checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" "checksum serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)" = "48c575e0cc52bdd09b47f330f646cf59afc586e9c4e3ccd6fc1f625b8ea1dad7" "checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +"checksum siphasher 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "83da420ee8d1a89e640d0948c646c1c088758d3a3c538f943bfa97bdac17929d" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" "checksum smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44e59e0c9fa00817912ae6e4e6e3c4fe04455e75699d06eedc7d85917ed8e8f4" "checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" "checksum source-map-mappings 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "89babfa6891f638e3e30c5dd248368937015b627a9704aaa8c9d3b9177bf8bfa" "checksum sourcefile 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum string_cache 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2940c75beb4e3bf3a494cef919a747a2cb81e52571e212bfbd185074add7208a" +"checksum string_cache_codegen 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f24c8e5e19d22a726626f1a5e16fe15b132dcf21d10177fa5a45ce7962996b97" +"checksum string_enum 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94fdb6536756cfd35ee18b9a9972ab2a699d405cc57e0ad0532022960f30d581" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +"checksum swc_atoms 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "46682d5a27e12d8b86168ea2fcb3aae2e0625f24bf109dee4bca24b2b51e03ce" +"checksum swc_common 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a743da2fa9a585671f985d532ee6c839e7dc69c8abe00740cf39b4156f3514f3" +"checksum swc_ecma_ast 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ae2303811d9d34475654698a0d569860ca6995f00f7329cff5e79492dbb6c" +"checksum swc_ecma_parser 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4ae57aeb4894875ae7b0aaba4d07d688eec24829cd3e8ff5feaf1d0b815f6fab" +"checksum swc_ecma_parser_macros 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b3ae6f346378d597ff91095bb1b926e3e1f3504babd30968b939c96d2529b2a" +"checksum swc_macros_common 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1638e13581d32a5ef0ea74fadb9d2325b30f3fdb17ac8d38cb6da5f83f1b92b" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4ff033220a41d1a57d8125eab57bf5263783dfdcc18688b1dacc6ce9651ef8" "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index f37825371c..a643e51ba1 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -35,7 +35,9 @@ brotli2 = "0.3.2" clap = "2.33.0" dirs = "2.0.2" dlopen = "0.1.8" +dprint-plugin-typescript = "0.3.0-alpha.1" futures = { version = "0.3.1", features = [ "compat", "io-compat" ] } +glob = "0.3.0" http = "0.2.0" indexmap = "1.3.0" lazy_static = "1.4.0" diff --git a/cli/flags.rs b/cli/flags.rs index 10709b7804..eaf9b7fc5f 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -28,8 +28,6 @@ macro_rules! std_url { }; } -/// Used for `deno fmt ...` subcommand -const PRETTIER_URL: &str = std_url!("prettier/main.ts"); /// Used for `deno install...` subcommand const INSTALLER_URL: &str = std_url!("installer/mod.ts"); /// Used for `deno test...` subcommand @@ -41,6 +39,10 @@ pub enum DenoSubcommand { Completions, Eval, Fetch, + Format { + check: bool, + files: Option>, + }, Help, Info, Install, @@ -230,60 +232,19 @@ fn types_parse(flags: &mut DenoFlags, _matches: &clap::ArgMatches) { } fn fmt_parse(flags: &mut DenoFlags, matches: &clap::ArgMatches) { - flags.subcommand = DenoSubcommand::Run; - flags.allow_read = true; - flags.allow_write = true; - flags.argv.push(PRETTIER_URL.to_string()); - - let files: Vec = matches - .values_of("files") - .unwrap() - .map(String::from) - .collect(); - flags.argv.extend(files); - - if !matches.is_present("stdout") { - // `deno fmt` writes to the files by default - flags.argv.push("--write".to_string()); - } - - let prettier_flags = [ - ["0", "check"], - ["1", "prettierrc"], - ["1", "ignore-path"], - ["1", "print-width"], - ["1", "tab-width"], - ["0", "use-tabs"], - ["0", "no-semi"], - ["0", "single-quote"], - ["1", "quote-props"], - ["0", "jsx-single-quote"], - ["0", "jsx-bracket-same-line"], - ["0", "trailing-comma"], - ["0", "no-bracket-spacing"], - ["1", "arrow-parens"], - ["1", "prose-wrap"], - ["1", "end-of-line"], - ]; - - for opt in &prettier_flags { - let t = opt[0]; - let keyword = opt[1]; - - if matches.is_present(&keyword) { - if t == "0" { - flags.argv.push(format!("--{}", keyword)); - } else { - if keyword == "prettierrc" { - flags.argv.push("--config".to_string()); - } else { - flags.argv.push(format!("--{}", keyword)); - } - flags - .argv - .push(matches.value_of(keyword).unwrap().to_string()); - } + let maybe_files = match matches.values_of("files") { + Some(f) => { + let files: Vec = f.map(String::from).collect(); + Some(files) } + None => None, + }; + + let check = matches.is_present("check"); + + flags.subcommand = DenoSubcommand::Format { + check, + files: maybe_files, } } @@ -556,155 +517,28 @@ The declaration file could be saved and used for typing information.", fn fmt_subcommand<'a, 'b>() -> App<'a, 'b> { SubCommand::with_name("fmt") - .about("Format files") - .long_about( -"Auto-format JavaScript/TypeScript source code using Prettier + .about("Format files") + .long_about( + "Auto-format JavaScript/TypeScript source code -Automatically downloads Prettier dependencies on first run. + deno fmt - deno fmt myfile1.ts myfile2.ts", - ) - .arg( - Arg::with_name("check") - .long("check") - .help("Check if the source files are formatted.") - .takes_value(false), - ) - .arg( - Arg::with_name("prettierrc") - .long("prettierrc") - .value_name("auto|disable|FILE") - .help("Specify the configuration file of the prettier. - auto: Auto detect prettier configuration file in current working dir. - disable: Disable load configuration file. - FILE: Load specified prettier configuration file. support .json/.toml/.js/.ts file - ") - .takes_value(true) - .require_equals(true) - .default_value("auto") - ) - .arg( - Arg::with_name("ignore-path") - .long("ignore-path") - .value_name("auto|disable|FILE") - .help("Path to a file containing patterns that describe files to ignore. - auto: Auto detect .pretierignore file in current working dir. - disable: Disable load .prettierignore file. - FILE: Load specified prettier ignore file. - ") - .takes_value(true) - .require_equals(true) - .default_value("auto") - ) - .arg( - Arg::with_name("stdout") - .long("stdout") - .help("Output formated code to stdout") - .takes_value(false), - ) - .arg( - Arg::with_name("print-width") - .long("print-width") - .value_name("int") - .help("Specify the line length that the printer will wrap on.") - .takes_value(true) - .require_equals(true) - ) - .arg( - Arg::with_name("tab-width") - .long("tab-width") - .value_name("int") - .help("Specify the number of spaces per indentation-level.") - .takes_value(true) - .require_equals(true) - ) - .arg( - Arg::with_name("use-tabs") - .long("use-tabs") - .help("Indent lines with tabs instead of spaces.") - .takes_value(false) - ) - .arg( - Arg::with_name("no-semi") - .long("no-semi") - .help("Print semicolons at the ends of statements.") - .takes_value(false) - ) - .arg( - Arg::with_name("single-quote") - .long("single-quote") - .help("Use single quotes instead of double quotes.") - .takes_value(false) - ) - .arg( - Arg::with_name("quote-props") - .long("quote-props") - .value_name("as-needed|consistent|preserve") - .help("Change when properties in objects are quoted.") - .takes_value(true) - .possible_values(&["as-needed", "consistent", "preserve"]) - .require_equals(true) - ) - .arg( - Arg::with_name("jsx-single-quote") - .long("jsx-single-quote") - .help("Use single quotes instead of double quotes in JSX.") - .takes_value(false) - ) - .arg( - Arg::with_name("jsx-bracket-same-line") - .long("jsx-bracket-same-line") - .help( - "Put the > of a multi-line JSX element at the end of the last line -instead of being alone on the next line (does not apply to self closing elements)." - ) - .takes_value(false) - ) - .arg( - Arg::with_name("trailing-comma") - .long("trailing-comma") - .help("Print trailing commas wherever possible when multi-line.") - .takes_value(false) - ) - .arg( - Arg::with_name("no-bracket-spacing") - .long("no-bracket-spacing") - .help("Print spaces between brackets in object literals.") - .takes_value(false) - ) - .arg( - Arg::with_name("arrow-parens") - .long("arrow-parens") - .value_name("avoid|always") - .help("Include parentheses around a sole arrow function parameter.") - .takes_value(true) - .possible_values(&["avoid", "always"]) - .require_equals(true) - ) - .arg( - Arg::with_name("prose-wrap") - .long("prose-wrap") - .value_name("always|never|preserve") - .help("How to wrap prose.") - .takes_value(true) - .possible_values(&["always", "never", "preserve"]) - .require_equals(true) - ) - .arg( - Arg::with_name("end-of-line") - .long("end-of-line") - .value_name("auto|lf|crlf|cr") - .help("Which end of line characters to apply.") - .takes_value(true) - .possible_values(&["auto", "lf", "crlf", "cr"]) - .require_equals(true) - ) - .arg( - Arg::with_name("files") - .takes_value(true) - .multiple(true) - .required(true), - ) + deno fmt myfile1.ts myfile2.ts + + deno fmt --check", + ) + .arg( + Arg::with_name("check") + .long("check") + .help("Check if the source files are formatted.") + .takes_value(false), + ) + .arg( + Arg::with_name("files") + .takes_value(true) + .multiple(true) + .required(false), + ) } fn repl_subcommand<'a, 'b>() -> App<'a, 'b> { @@ -1439,20 +1273,24 @@ mod tests { assert_eq!( r.unwrap(), DenoFlags { - subcommand: DenoSubcommand::Run, - allow_write: true, - allow_read: true, - argv: svec![ - "deno", - PRETTIER_URL, - "script_1.ts", - "script_2.ts", - "--write", - "--config", - "auto", - "--ignore-path", - "auto" - ], + subcommand: DenoSubcommand::Format { + check: false, + files: Some(svec!["script_1.ts", "script_2.ts"]) + }, + argv: svec!["deno"], + ..DenoFlags::default() + } + ); + + let r = flags_from_vec_safe(svec!["deno", "fmt", "--check"]); + assert_eq!( + r.unwrap(), + DenoFlags { + subcommand: DenoSubcommand::Format { + check: true, + files: None + }, + argv: svec!["deno"], ..DenoFlags::default() } ); @@ -1667,36 +1505,6 @@ mod tests { ); } - #[test] - fn fmt_stdout() { - let r = flags_from_vec_safe(svec![ - "deno", - "fmt", - "--stdout", - "script_1.ts", - "script_2.ts" - ]); - assert_eq!( - r.unwrap(), - DenoFlags { - subcommand: DenoSubcommand::Run, - argv: svec![ - "deno", - PRETTIER_URL, - "script_1.ts", - "script_2.ts", - "--config", - "auto", - "--ignore-path", - "auto" - ], - allow_write: true, - allow_read: true, - ..DenoFlags::default() - } - ); - } - #[test] fn default_to_run() { let r = flags_from_vec_safe(svec!["deno", "script.ts"]); @@ -2125,66 +1933,6 @@ mod tests { ); } - #[test] - fn fmt_args() { - let r = flags_from_vec_safe(svec![ - "deno", - "fmt", - "--check", - "--prettierrc=auto", - "--print-width=100", - "--tab-width=4", - "--use-tabs", - "--no-semi", - "--single-quote", - "--arrow-parens=always", - "--prose-wrap=preserve", - "--end-of-line=crlf", - "--quote-props=preserve", - "--jsx-single-quote", - "--jsx-bracket-same-line", - "--ignore-path=.prettier-ignore", - "script.ts" - ]); - assert_eq!( - r.unwrap(), - DenoFlags { - subcommand: DenoSubcommand::Run, - argv: svec![ - "deno", - PRETTIER_URL, - "script.ts", - "--write", - "--check", - "--config", - "auto", - "--ignore-path", - ".prettier-ignore", - "--print-width", - "100", - "--tab-width", - "4", - "--use-tabs", - "--no-semi", - "--single-quote", - "--quote-props", - "preserve", - "--jsx-single-quote", - "--jsx-bracket-same-line", - "--arrow-parens", - "always", - "--prose-wrap", - "preserve", - "--end-of-line", - "crlf" - ], - allow_write: true, - allow_read: true, - ..DenoFlags::default() - } - ); - } - #[test] fn test_with_exclude() { let r = flags_from_vec_safe(svec![ diff --git a/cli/fmt.rs b/cli/fmt.rs new file mode 100644 index 0000000000..986be9fe1c --- /dev/null +++ b/cli/fmt.rs @@ -0,0 +1,162 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + +//! This module provides file formating utilities using +//! [`dprint`](https://github.com/dsherret/dprint). +//! +//! At the moment it is only consumed using CLI but in +//! the future it can be easily extended to provide +//! the same functions as ops available in JS runtime. + +use dprint_plugin_typescript::format_text; +use dprint_plugin_typescript::Configuration; +use dprint_plugin_typescript::ConfigurationBuilder; +use glob; +use regex::Regex; +use std::fs; +use std::path::Path; +use std::path::PathBuf; +use std::time::Instant; + +lazy_static! { + static ref TYPESCRIPT_LIB: Regex = Regex::new(".d.ts$").unwrap(); + static ref TYPESCRIPT: Regex = Regex::new(".tsx?$").unwrap(); + static ref JAVASCRIPT: Regex = Regex::new(".jsx?$").unwrap(); +} + +fn is_supported(path: &Path) -> bool { + let path_str = path.to_string_lossy(); + !TYPESCRIPT_LIB.is_match(&path_str) + && (TYPESCRIPT.is_match(&path_str) || JAVASCRIPT.is_match(&path_str)) +} + +fn get_config() -> Configuration { + ConfigurationBuilder::new() + .line_width(80) + .indent_width(2) + .build() +} + +fn get_supported_files(paths: Vec) -> Vec { + let mut files_to_check = vec![]; + + for path in paths { + if is_supported(&path) { + files_to_check.push(path.to_owned()); + } + } + + files_to_check +} + +fn check_source_files(config: Configuration, paths: Vec) { + let start = Instant::now(); + let mut not_formatted_files = vec![]; + + for file_path in paths { + let file_path_str = file_path.to_string_lossy(); + let file_contents = fs::read_to_string(&file_path).unwrap(); + match format_text(&file_path_str, &file_contents, &config) { + Ok(None) => { + // nothing to format, pass + } + Ok(Some(formatted_text)) => { + if formatted_text != file_contents { + println!("Not formatted {}", file_path_str); + not_formatted_files.push(file_path); + } + } + Err(e) => { + eprintln!("Error checking: {}", &file_path_str); + eprintln!(" {}", e); + } + } + } + + let duration = Instant::now() - start; + + if !not_formatted_files.is_empty() { + let f = if not_formatted_files.len() == 1 { + "file" + } else { + "files" + }; + + eprintln!( + "Found {} not formatted {} in {:?}", + not_formatted_files.len(), + f, + duration + ); + std::process::exit(1); + } +} + +fn format_source_files(config: Configuration, paths: Vec) { + let start = Instant::now(); + let mut not_formatted_files = vec![]; + + for file_path in paths { + let file_path_str = file_path.to_string_lossy(); + let file_contents = fs::read_to_string(&file_path).unwrap(); + match format_text(&file_path_str, &file_contents, &config) { + Ok(None) => { + // nothing to format, pass + } + Ok(Some(formatted_text)) => { + if formatted_text != file_contents { + println!("Formatting {}", file_path_str); + fs::write(&file_path, formatted_text).unwrap(); + not_formatted_files.push(file_path); + } + } + Err(e) => { + eprintln!("Error formatting: {}", &file_path_str); + eprintln!(" {}", e); + } + } + } + + let duration = Instant::now() - start; + let f = if not_formatted_files.len() == 1 { + "file" + } else { + "files" + }; + eprintln!( + "Formatted {} {} in {:?}", + not_formatted_files.len(), + f, + duration + ); +} + +fn get_matching_files(glob_paths: Vec) -> Vec { + let mut target_files = Vec::with_capacity(128); + + for path in glob_paths { + let files = glob::glob(&path) + .expect("Failed to execute glob.") + .filter_map(Result::ok); + target_files.extend(files); + } + + target_files +} + +/// Format JavaScript/TypeScript files. +/// +/// First argument supports globs, and if it is `None` +/// then the current directory is recursively walked. +pub fn format_files(maybe_files: Option>, check: bool) { + // TODO: improve glob to look for tsx?/jsx? files only + let glob_paths = maybe_files.unwrap_or_else(|| vec!["**/*".to_string()]); + let matching_files = get_matching_files(glob_paths); + let matching_files = get_supported_files(matching_files); + let config = get_config(); + + if check { + check_source_files(config, matching_files); + } else { + format_source_files(config, matching_files); + } +} diff --git a/cli/lib.rs b/cli/lib.rs index 56705289f2..fe20cd1351 100644 --- a/cli/lib.rs +++ b/cli/lib.rs @@ -28,6 +28,7 @@ pub mod diagnostics; mod disk_cache; mod file_fetcher; pub mod flags; +mod fmt; pub mod fmt_errors; mod fs; mod global_state; @@ -422,6 +423,10 @@ fn run_script(flags: DenoFlags) { } } +fn format_command(files: Option>, check: bool) { + fmt::format_files(files, check); +} + pub fn main() { #[cfg(windows)] ansi_term::enable_ansi_support().ok(); // For Windows 10 @@ -442,11 +447,12 @@ pub fn main() { }; log::set_max_level(log_level.to_level_filter()); - match flags.subcommand { + match flags.clone().subcommand { DenoSubcommand::Bundle => bundle_command(flags), DenoSubcommand::Completions => {} DenoSubcommand::Eval => eval_command(flags), DenoSubcommand::Fetch => fetch_command(flags), + DenoSubcommand::Format { check, files } => format_command(files, check), DenoSubcommand::Info => info_command(flags), DenoSubcommand::Repl => run_repl(flags), DenoSubcommand::Run => run_script(flags), diff --git a/cli/tests/badly_formatted.js b/cli/tests/badly_formatted.js index 17e3e6be0d..b646a95a35 100644 --- a/cli/tests/badly_formatted.js +++ b/cli/tests/badly_formatted.js @@ -1,4 +1,4 @@ -console.log( - "Hello World" +console.log("Hello World" + ) diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 7f318119ad..501ff17136 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -29,12 +29,44 @@ fn fetch_test() { drop(g); } -// TODO(#2933): Rewrite this test in rust. #[test] fn fmt_test() { - let g = util::http_server(); - util::run_python_script("tools/fmt_test.py"); - drop(g); + use tempfile::TempDir; + + let t = TempDir::new().expect("tempdir fail"); + let fixed = util::root_path().join("cli/tests/badly_formatted_fixed.js"); + let badly_formatted_original = + util::root_path().join("cli/tests/badly_formatted.js"); + let badly_formatted = t.path().join("badly_formatted.js"); + let badly_formatted_str = badly_formatted.to_str().unwrap(); + std::fs::copy(&badly_formatted_original, &badly_formatted) + .expect("Failed to copy file"); + + let status = util::deno_cmd() + .current_dir(util::root_path()) + .arg("fmt") + .arg("--check") + .arg(badly_formatted_str) + .spawn() + .expect("Failed to spawn script") + .wait() + .expect("Failed to wait for child process"); + + assert_eq!(Some(1), status.code()); + + let status = util::deno_cmd() + .current_dir(util::root_path()) + .arg("fmt") + .arg(badly_formatted_str) + .spawn() + .expect("Failed to spawn script") + .wait() + .expect("Failed to wait for child process"); + + assert_eq!(Some(0), status.code()); + let expected = std::fs::read_to_string(fixed).unwrap(); + let actual = std::fs::read_to_string(badly_formatted).unwrap(); + assert_eq!(expected, actual); } #[test] diff --git a/std/README.md b/std/README.md index ee9c408df5..2940c934c0 100644 --- a/std/README.md +++ b/std/README.md @@ -29,7 +29,6 @@ Here are the dedicated documentations of modules: - [http](http/README.md) - [log](log/README.md) - [media_types](media_types/README.md) -- [prettier](prettier/README.md) - [strings](strings/README.md) - [testing](testing/README.md) - [uuid](uuid/README.md) diff --git a/std/manual.md b/std/manual.md index f29256bd96..c3117bd9d3 100644 --- a/std/manual.md +++ b/std/manual.md @@ -847,7 +847,7 @@ $ echo 'export PATH="$HOME/.deno/bin:$PATH"' >> ~/.bashrc Installation directory can be changed using `-d/--dir` flag: ```shell -$ deno install --dir /usr/local/bin prettier https://deno.land/std/prettier/main.ts --allow-write --allow-read +$ deno install --dir /usr/local/bin file_server https://deno.land/std/http/file_server.ts --allow-net --allow-read ``` When installing a script you can specify permissions that will be used to run @@ -857,13 +857,11 @@ additional CLI flags you want to pass to the script. Example: ```shell -$ deno install format_check https://deno.land/std/prettier/main.ts --allow-write --allow-read --check --print-width 88 --tab-width 2 +$ deno install file_server https://deno.land/std/http/file_server.ts --allow-net --allow-read 8080 ``` -Above command creates an executable called `format_check` that runs `prettier` -with write and read permissions. When you run `format_check` deno will run -prettier in `check` mode and configured to use `88` column width with `2` column -tabs. +Above command creates an executable called `file_server` that runs with write +and read permissions and binds to port 8080. It is a good practice to use `import.meta.main` idiom for an entry point for executable file. See diff --git a/std/prettier/README.md b/std/prettier/README.md deleted file mode 100644 index 6485d2da21..0000000000 --- a/std/prettier/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# prettier - -Prettier APIs and tools for deno - -## Use as a CLI - -To formats the source files, run: - -```bash -deno --allow-read --allow-write https://deno.land/std/prettier/main.ts -``` - -You can format only specific files by passing the arguments. - -```bash -deno --allow-read --allow-write https://deno.land/std/prettier/main.ts path/to/script.ts -``` - -You can format files on specific directory by passing the directory's path. - -```bash -deno --allow-read --allow-write https://deno.land/std/prettier/main.ts path/to/script.ts -``` - -You can format the input plain text stream. default parse it as typescript code. - -```bash -cat path/to/script.ts | deno https://deno.land/std/prettier/main.ts -cat path/to/script.js | deno https://deno.land/std/prettier/main.ts --stdin-parser=babel -cat path/to/config.json | deno https://deno.land/std/prettier/main.ts --stdin-parser=json -cat path/to/README.md | deno https://deno.land/std/prettier/main.ts --stdin-parser=markdown -``` - -## Use API - -You can use APIs of prettier as the following: - -```ts -import { - prettier, - prettierPlugins -} from "https://deno.land/std/prettier/prettier.ts"; - -prettier.format("const x = 1", { - parser: "babel", - plugins: prettierPlugins -}); // => "const x = 1;" -``` diff --git a/std/prettier/ignore.ts b/std/prettier/ignore.ts deleted file mode 100644 index 08a8239842..0000000000 --- a/std/prettier/ignore.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. - -/** - * Parse the contents of the ignore file and return patterns. - * It can parse files like .gitignore/.npmignore/.prettierignore - * @param ignoreString - * @returns patterns - */ -export function parse(ignoreString: string): Set { - const partterns = ignoreString - .split(/\r?\n/) - .filter(line => line.trim() !== "" && line.charAt(0) !== "#"); - - return new Set(partterns); -} diff --git a/std/prettier/ignore_test.ts b/std/prettier/ignore_test.ts deleted file mode 100644 index 019cddc0e4..0000000000 --- a/std/prettier/ignore_test.ts +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { test, runIfMain } from "../testing/mod.ts"; -import { assertEquals } from "../testing/asserts.ts"; -import { parse } from "./ignore.ts"; - -const testCases = [ - { - input: `# this is a comment -node_modules -`, - output: new Set(["node_modules"]) - }, - { - input: ` # invalid comment -`, - output: new Set([" # invalid comment"]) - }, - { - input: ` -node_modules -package.json -`, - output: new Set(["node_modules", "package.json"]) - }, - { - input: ` - node_modules - package.json -`, - output: new Set([" node_modules", " package.json"]) - }, - { - input: `*.orig -*.pyc -*.swp - -/.idea/ -/.vscode/ -gclient_config.py_entries -/gh-pages/ -/target/ - -# Files that help ensure VSCode can work but we don't want checked into the -# repo -/node_modules -/tsconfig.json - -# We use something stronger than lockfiles, we have all NPM modules stored in a -# git. We do not download from NPM during build. -# https://github.com/denoland/deno_third_party -yarn.lock -# yarn creates this in error. -tools/node_modules/ - `, - output: new Set([ - "*.orig", - "*.pyc", - "*.swp", - "/.idea/", - "/.vscode/", - "gclient_config.py_entries", - "/gh-pages/", - "/target/", - "/node_modules", - "/tsconfig.json", - "yarn.lock", - "tools/node_modules/" - ]) - } -]; - -test({ - name: "[encoding.ignore] basic", - fn(): void { - for (const { input, output } of testCases) { - assertEquals(parse(input), output); - } - } -}); - -runIfMain(import.meta); diff --git a/std/prettier/main.ts b/std/prettier/main.ts deleted file mode 100755 index a61faa975c..0000000000 --- a/std/prettier/main.ts +++ /dev/null @@ -1,616 +0,0 @@ -#!/usr/bin/env -S deno --allow-run --allow-write -/** - * Copyright © James Long and contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -// This script formats the given source files. If the files are omitted, it -// formats the all files in the repository. -import { parse } from "../flags/mod.ts"; -import * as path from "../path/mod.ts"; -import * as toml from "../encoding/toml.ts"; -import * as yaml from "../encoding/yaml.ts"; -import * as ignore from "./ignore.ts"; -import { ExpandGlobOptions, WalkInfo, expandGlob } from "../fs/mod.ts"; -import { prettier, prettierPlugins } from "./prettier.ts"; -const { args, cwd, exit, readAll, readFile, stdin, stdout, writeFile } = Deno; - -const HELP_MESSAGE = ` -Formats the given files. If no arg is passed, then formats the all files. - -Usage: deno prettier/main.ts [options] [files...] - -Options: - -H, --help Show this help message and exit. - --check Check if the source files are formatted. - --write Whether to write to the file, otherwise - it will output to stdout, Defaults to - false. - --ignore Ignore the given path(s). - --ignore-path Path to a file containing patterns that - describe files to ignore. Optional - value: auto/disable/filepath. Defaults - to null. - --stdin Specifies to read the code from stdin. - If run the command in a pipe, you do not - need to specify this flag. - Defaults to false. - --stdin-parser - If set --stdin flag, then need specify a - parser for stdin. available parser: - typescript/babel/markdown/json. Defaults - to typescript. - --config Specify the configuration file of the - prettier. - Optional value: auto/disable/filepath. - Defaults to null. - -JS/TS Styling Options: - --print-width The line length where Prettier will try - wrap. Defaults to 80. - --tab-width Number of spaces per indentation level. - Defaults to 2. - --use-tabs Indent with tabs instead of spaces. - Defaults to false. - --no-semi Do not print semicolons, except at the - beginning of lines which may need them. - --single-quote Use single quotes instead of double - quotes. Defaults to false. - --quote-props - Change when properties in objects are - quoted. Defaults to as-needed. - --jsx-single-quote Use single quotes instead of double - quotes in JSX. - --jsx-bracket-same-line Put the > of a multi-line JSX element at - the end of the last line instead of - being alone on the next line (does not - apply to self closing elements). - --trailing-comma Print trailing commas wherever possible - when multi-line. Defaults to none. - --no-bracket-spacing Do not print spaces between brackets. - --arrow-parens Include parentheses around a sole arrow - function parameter. Defaults to avoid. - --end-of-line Which end of line characters to apply. - Defaults to auto. - -Markdown Styling Options: - --prose-wrap How to wrap prose. Defaults to preserve. - -Example: - deno run prettier/main.ts --write script1.ts script2.js - Formats the files - - deno run prettier/main.ts --check script1.ts script2.js - Checks if the files are formatted - - deno run prettier/main.ts --write - Formats the all files in the repository - - deno run prettier/main.ts script1.ts - Print the formatted code to stdout - - cat script1.ts | deno run prettier/main.ts - Read the typescript code from stdin and - output formatted code to stdout. - - cat config.json | deno run prettier/main.ts --stdin-parser=json - Read the JSON string from stdin and - output formatted code to stdout. -`; - -// Available parsers -type ParserLabel = "typescript" | "babel" | "markdown" | "json"; - -interface PrettierBuildInOptions { - printWidth: number; - tabWidth: number; - useTabs: boolean; - semi: boolean; - singleQuote: boolean; - quoteProps: string; - jsxSingleQuote: boolean; - jsxBracketSameLine: boolean; - trailingComma: string; - bracketSpacing: boolean; - arrowParens: string; - proseWrap: string; - endOfLine: string; -} - -interface PrettierOptions extends PrettierBuildInOptions { - write: boolean; -} - -const encoder = new TextEncoder(); -const decoder = new TextDecoder(); - -async function readFileIfExists(filename: string): Promise { - let data; - try { - data = await readFile(filename); - } catch (e) { - // The file is deleted. Returns null. - return null; - } - - return decoder.decode(data); -} - -/** - * Checks if the file has been formatted with prettier. - */ -async function checkFile( - filename: string, - parser: ParserLabel, - prettierOpts: PrettierOptions -): Promise { - const text = await readFileIfExists(filename); - - if (!text) { - // The file is empty. Skip. - return true; - } - - const formatted = prettier.check(text, { - ...prettierOpts, - parser, - plugins: prettierPlugins - }); - - if (!formatted) { - // TODO: print some diff info here to show why this failed - console.error(`${filename} ... Not formatted`); - } - - return formatted; -} - -/** - * Formats the given file. - */ -async function formatFile( - filename: string, - parser: ParserLabel, - prettierOpts: PrettierOptions -): Promise { - const text = await readFileIfExists(filename); - - if (!text) { - // The file is deleted. Skip. - return; - } - - const formatted: string = prettier.format(text, { - ...prettierOpts, - parser, - plugins: prettierPlugins - }); - - const fileUnit8 = encoder.encode(formatted); - if (prettierOpts.write) { - if (text !== formatted) { - console.log(`Formatting ${filename}`); - await writeFile(filename, fileUnit8); - } - } else { - await stdout.write(fileUnit8); - } -} - -/** - * Selects the right prettier parser for the given path. - */ -function selectParser(path: string): ParserLabel | null { - if (/\.tsx?$/.test(path)) { - return "typescript"; - } else if (/\.jsx?$/.test(path)) { - return "babel"; - } else if (/\.json$/.test(path)) { - return "json"; - } else if (/\.md$/.test(path)) { - return "markdown"; - } - - return null; -} - -/** - * Checks if the files of the given paths have been formatted with prettier. - * If paths are empty, then checks all the files. - */ -async function checkSourceFiles( - files: AsyncIterableIterator, - prettierOpts: PrettierOptions -): Promise { - const checks: Array> = []; - - for await (const { filename } of files) { - const parser = selectParser(filename); - if (parser) { - checks.push(checkFile(filename, parser, prettierOpts)); - } - } - - const results = await Promise.all(checks); - - if (results.every((result): boolean => result)) { - console.log("Every file is formatted"); - exit(0); - } else { - console.log("Some files are not formatted"); - exit(1); - } -} - -/** - * Formats the files of the given paths with prettier. - * If paths are empty, then formats all the files. - */ -async function formatSourceFiles( - files: AsyncIterableIterator, - prettierOpts: PrettierOptions -): Promise { - const formats: Array> = []; - - for await (const { filename } of files) { - const parser = selectParser(filename); - if (parser) { - if (prettierOpts.write) { - formats.push(formatFile(filename, parser, prettierOpts)); - } else { - await formatFile(filename, parser, prettierOpts); - } - } - } - - if (prettierOpts.write) { - await Promise.all(formats); - } - exit(0); -} - -/** - * Format source code - */ -function format( - text: string, - parser: ParserLabel, - prettierOpts: PrettierOptions -): string { - const formatted: string = prettier.format(text, { - ...prettierOpts, - parser: parser, - plugins: prettierPlugins - }); - - return formatted; -} - -/** - * Format code from stdin and output to stdout - */ -async function formatFromStdin( - parser: ParserLabel, - prettierOpts: PrettierOptions -): Promise { - const byte = await readAll(stdin); - const formattedCode = format( - new TextDecoder().decode(byte), - parser, - prettierOpts - ); - await stdout.write(new TextEncoder().encode(formattedCode)); -} - -/** - * Get the files to format. - * @param include The glob patterns to select the files. - * eg `"cmd/*.ts"` to select all the typescript files in cmd - * directory. - * eg `"cmd/run.ts"` to select `cmd/run.ts` file as only. - * @param exclude The glob patterns to ignore files. - * eg `"*_test.ts"` to ignore all the test file. - * @param root The directory from which to apply default globs. - * @returns returns an async iterable object - */ -async function* getTargetFiles( - include: string[], - exclude: string[], - root: string = cwd() -): AsyncIterableIterator { - const expandGlobOpts: ExpandGlobOptions = { - root, - exclude, - includeDirs: true, - extended: true, - globstar: true - }; - - async function* expandDirectory(d: string): AsyncIterableIterator { - for await (const walkInfo of expandGlob("**/*", { - ...expandGlobOpts, - root: d, - includeDirs: false - })) { - yield walkInfo; - } - } - - for (const globString of include) { - for await (const walkInfo of expandGlob(globString, expandGlobOpts)) { - if (walkInfo.info.isDirectory()) { - yield* expandDirectory(walkInfo.filename); - } else { - yield walkInfo; - } - } - } -} - -/** - * auto detect prettier configuration file and return config if file exist. - */ -async function autoResolveConfig(): Promise { - const configFileNamesMap = { - ".prettierrc.json": 1, - ".prettierrc.yaml": 1, - ".prettierrc.yml": 1, - ".prettierrc.js": 1, - ".prettierrc.ts": 1, - "prettier.config.js": 1, - "prettier.config.ts": 1, - ".prettierrc.toml": 1 - }; - - const files = await Deno.readDir("."); - - for (const f of files) { - if (f.isFile() && configFileNamesMap[f.name]) { - const c = await resolveConfig(f.name); - if (c) { - return c; - } - } - } - - return; -} - -/** - * parse prettier configuration file. - * @param filepath the configuration file path. - * support extension name with .json/.toml/.js - */ -async function resolveConfig( - filepath: string -): Promise { - let config: PrettierBuildInOptions = undefined; - - function generateError(msg: string): Error { - return new Error(`Invalid prettier configuration file: ${msg}.`); - } - - const raw = new TextDecoder().decode(await Deno.readFile(filepath)); - - switch (path.extname(filepath)) { - case ".json": - try { - config = JSON.parse(raw) as PrettierBuildInOptions; - } catch (err) { - throw generateError(err.message); - } - break; - case ".yml": - case ".yaml": - try { - config = yaml.parse(raw) as PrettierBuildInOptions; - } catch (err) { - throw generateError(err.message); - } - break; - case ".toml": - try { - config = toml.parse(raw) as PrettierBuildInOptions; - } catch (err) { - throw generateError(err.message); - } - break; - case ".js": - case ".ts": - const absPath = path.isAbsolute(filepath) - ? filepath - : path.join(cwd(), filepath); - - try { - const output = await import( - // TODO: Remove platform condition - // after https://github.com/denoland/deno/issues/3355 fixed - Deno.build.os === "win" ? "file://" + absPath : absPath - ); - - if (output && output.default) { - config = output.default as PrettierBuildInOptions; - } else { - throw new Error( - "Prettier of JS version should have default exports." - ); - } - } catch (err) { - throw generateError(err.message); - } - - break; - default: - break; - } - - return config; -} - -/** - * auto detect .prettierignore and return pattern if file exist. - */ -async function autoResolveIgnoreFile(): Promise> { - const files = await Deno.readDir("."); - - for (const f of files) { - if (f.isFile() && f.name === ".prettierignore") { - return await resolveIgnoreFile(f.name); - } - } - - return new Set([]); -} - -/** - * parse prettier ignore file. - * @param filepath the ignore file path. - */ -async function resolveIgnoreFile(filepath: string): Promise> { - const raw = new TextDecoder().decode(await Deno.readFile(filepath)); - return ignore.parse(raw); -} - -async function main(opts): Promise { - const { help, check, _: args } = opts; - - let prettierOpts: PrettierOptions = { - printWidth: Number(opts["print-width"]), - tabWidth: Number(opts["tab-width"]), - useTabs: Boolean(opts["use-tabs"]), - semi: Boolean(opts["semi"]), - singleQuote: Boolean(opts["single-quote"]), - quoteProps: opts["quote-props"], - jsxSingleQuote: Boolean(opts["jsx-single-quote"]), - jsxBracketSameLine: Boolean(opts["jsx-bracket-same-line "]), - trailingComma: opts["trailing-comma"], - bracketSpacing: Boolean(opts["bracket-spacing"]), - arrowParens: opts["arrow-parens"], - proseWrap: opts["prose-wrap"], - endOfLine: opts["end-of-line"], - write: opts["write"] - }; - - if (help) { - console.log(HELP_MESSAGE); - exit(0); - } - - const configFilepath = opts["config"]; - - if (configFilepath && configFilepath !== "disable") { - const config = - configFilepath === "auto" - ? await autoResolveConfig() - : await resolveConfig(configFilepath); - - if (config) { - prettierOpts = { ...prettierOpts, ...config }; - } - } - - let ignore = opts.ignore as string[]; - - if (!Array.isArray(ignore)) { - ignore = [ignore]; - } - - const ignoreFilepath = opts["ignore-path"]; - - if (ignoreFilepath && ignoreFilepath !== "disable") { - const ignorePatterns = - ignoreFilepath === "auto" - ? await autoResolveIgnoreFile() - : await resolveIgnoreFile(ignoreFilepath); - - ignore = ignore.concat(Array.from(ignorePatterns)); - } - - const files = getTargetFiles(args.length ? args : ["."], ignore); - - const tty = Deno.isTTY(); - - const shouldReadFromStdin = - (!tty.stdin && (tty.stdout || tty.stderr)) || !!opts["stdin"]; - - try { - if (shouldReadFromStdin) { - await formatFromStdin(opts["stdin-parser"], prettierOpts); - } else if (check) { - await checkSourceFiles(files, prettierOpts); - } else { - await formatSourceFiles(files, prettierOpts); - } - } catch (e) { - console.error(e); - exit(1); - } -} - -main( - parse(args, { - string: [ - "ignore", - "ignore-path", - "printWidth", - "tab-width", - "trailing-comma", - "arrow-parens", - "prose-wrap", - "end-of-line", - "stdin-parser", - "quote-props" - ], - boolean: [ - "check", - "help", - "semi", - "use-tabs", - "single-quote", - "bracket-spacing", - "write", - "stdin", - "jsx-single-quote", - "jsx-bracket-same-line" - ], - default: { - ignore: [], - "print-width": "80", - "tab-width": "2", - "use-tabs": false, - semi: true, - "single-quote": false, - "trailing-comma": "none", - "bracket-spacing": true, - "arrow-parens": "avoid", - "prose-wrap": "preserve", - "end-of-line": "auto", - write: false, - stdin: false, - "stdin-parser": "typescript", - "quote-props": "as-needed", - "jsx-single-quote": false, - "jsx-bracket-same-line": false - }, - alias: { - H: "help" - } - }) -); diff --git a/std/prettier/main_test.ts b/std/prettier/main_test.ts deleted file mode 100644 index 5e9c0ad57e..0000000000 --- a/std/prettier/main_test.ts +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { assertEquals } from "../testing/asserts.ts"; -import { test, runIfMain } from "../testing/mod.ts"; -import { copy, emptyDir } from "../fs/mod.ts"; -import { EOL, join } from "../path/mod.ts"; -import { xrun } from "./util.ts"; -const { readAll, execPath } = Deno; - -const decoder = new TextDecoder(); - -async function run( - args: string[] -): Promise<{ stdout: string; code: number | undefined }> { - const p = xrun({ args, stdout: "piped" }); - - const stdout = decoder.decode(await readAll(p.stdout!)); - const { code } = await p.status(); - - return { stdout, code }; -} - -const cmd = [ - execPath(), - "run", - "--allow-run", - "--allow-write", - "--allow-read", - "./prettier/main.ts" -]; - -const testdata = join("prettier", "testdata"); - -function normalizeOutput(output: string): string { - return output - .replace(/\r/g, "") - .replace(/\\/g, "/") - .trim() - .split("\n") - .sort() - .join("\n"); -} - -function normalizeSourceCode(source: string): string { - return source.replace(/\r/g, ""); -} - -test(async function testPrettierCheckAndFormatFiles(): Promise { - const tempDir = await Deno.makeTempDir(); - await copy(testdata, tempDir, { overwrite: true }); - - const files = [ - join(tempDir, "0.ts"), - join(tempDir, "1.js"), - join(tempDir, "2.ts"), - join(tempDir, "3.jsx"), - join(tempDir, "4.tsx") - ]; - - let p = await run([...cmd, "--check", ...files]); - assertEquals(p.code, 1); - assertEquals(normalizeOutput(p.stdout), "Some files are not formatted"); - - p = await run([...cmd, "--write", ...files]); - assertEquals(p.code, 0); - assertEquals( - normalizeOutput(p.stdout), - normalizeOutput(`Formatting ${tempDir}/0.ts -Formatting ${tempDir}/1.js -Formatting ${tempDir}/3.jsx -Formatting ${tempDir}/4.tsx -`) - ); - - p = await run([...cmd, "--check", ...files]); - assertEquals(p.code, 0); - assertEquals(normalizeOutput(p.stdout), "Every file is formatted"); - - emptyDir(tempDir); -}); - -test(async function testPrettierCheckAndFormatDirs(): Promise { - const tempDir = await Deno.makeTempDir(); - await copy(testdata, tempDir, { overwrite: true }); - - const dirs = [join(tempDir, "foo"), join(tempDir, "bar")]; - - let p = await run([...cmd, "--check", ...dirs]); - assertEquals(p.code, 1); - assertEquals(normalizeOutput(p.stdout), "Some files are not formatted"); - - p = await run([...cmd, "--write", ...dirs]); - assertEquals(p.code, 0); - assertEquals( - normalizeOutput(p.stdout), - normalizeOutput(`Formatting ${tempDir}/bar/0.ts -Formatting ${tempDir}/bar/1.js -Formatting ${tempDir}/foo/0.ts -Formatting ${tempDir}/foo/1.js`) - ); - - p = await run([...cmd, "--check", ...dirs]); - assertEquals(p.code, 0); - assertEquals(normalizeOutput(p.stdout), "Every file is formatted"); - - emptyDir(tempDir); -}); - -test(async function testPrettierOptions(): Promise { - const tempDir = await Deno.makeTempDir(); - await copy(testdata, tempDir, { overwrite: true }); - - const file0 = join(tempDir, "opts", "0.ts"); - const file1 = join(tempDir, "opts", "1.ts"); - const file2 = join(tempDir, "opts", "2.ts"); - const file3 = join(tempDir, "opts", "3.md"); - - const getSourceCode = async (f: string): Promise => - decoder.decode(await Deno.readFile(f)); - - await run([...cmd, "--no-semi", "--write", file0]); - assertEquals( - normalizeSourceCode(await getSourceCode(file0)), - `console.log(0) -console.log([function foo() {}, function baz() {}, a => {}]) -` - ); - - await run([ - ...cmd, - "--print-width", - "30", - "--tab-width", - "4", - "--write", - file0 - ]); - assertEquals( - normalizeSourceCode(await getSourceCode(file0)), - `console.log(0); -console.log([ - function foo() {}, - function baz() {}, - a => {} -]); -` - ); - - await run([...cmd, "--print-width", "30", "--use-tabs", "--write", file0]); - assertEquals( - normalizeSourceCode(await getSourceCode(file0)), - `console.log(0); -console.log([ - function foo() {}, - function baz() {}, - a => {} -]); -` - ); - - await run([...cmd, "--single-quote", "--write", file1]); - assertEquals( - normalizeSourceCode(await getSourceCode(file1)), - `console.log('1'); -` - ); - - await run([ - ...cmd, - "--print-width", - "30", - "--trailing-comma", - "all", - "--write", - file0 - ]); - assertEquals( - normalizeSourceCode(await getSourceCode(file0)), - `console.log(0); -console.log([ - function foo() {}, - function baz() {}, - a => {}, -]); -` - ); - - await run([...cmd, "--no-bracket-spacing", "--write", file2]); - assertEquals( - normalizeSourceCode(await getSourceCode(file2)), - `console.log({a: 1}); -` - ); - - await run([...cmd, "--arrow-parens", "always", "--write", file0]); - assertEquals( - normalizeSourceCode(await getSourceCode(file0)), - `console.log(0); -console.log([function foo() {}, function baz() {}, (a) => {}]); -` - ); - - await run([...cmd, "--prose-wrap", "always", "--write", file3]); - assertEquals( - normalizeSourceCode(await getSourceCode(file3)), - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, " + - "sed do eiusmod tempor" + - "\nincididunt ut labore et dolore magna aliqua.\n" - ); - - await run([...cmd, "--end-of-line", "crlf", "--write", file2]); - assertEquals(await getSourceCode(file2), "console.log({ a: 1 });\r\n"); - - emptyDir(tempDir); -}); - -test(async function testPrettierPrintToStdout(): Promise { - const tempDir = await Deno.makeTempDir(); - await copy(testdata, tempDir, { overwrite: true }); - - const file0 = join(tempDir, "0.ts"); - const file1 = join(tempDir, "formatted.ts"); - - const getSourceCode = async (f: string): Promise => - decoder.decode(await Deno.readFile(f)); - - const { stdout } = await run([...cmd, file0]); - // The source file will not change without `--write` flags. - assertEquals( - await getSourceCode(file0), - `console.log (0) -` - ); - // The output should be formatted code. - assertEquals( - stdout, - `console.log(0); -` - ); - - const { stdout: formattedCode } = await run([...cmd, file1]); - // The source file will not change without `--write` flags. - assertEquals( - await getSourceCode(file1), - `console.log(0); -` - ); - // The output will be formatted code even it is the same as the source file's - // content. - assertEquals( - formattedCode, - `console.log(0); -` - ); - - emptyDir(tempDir); -}); - -// TODO(bartlomieju): reenable after landing rusty_v8 branch -// crashing on Windows -/* -test(async function testPrettierReadFromStdin(): Promise { - interface TestCase { - stdin: string; - stdout: string; - stderr: string; - code: number; - success: boolean; - parser?: string; - } - - async function readFromStdinAssertion( - stdin: string, - expectedStdout: string, - expectedStderr: string, - expectedCode: number, - expectedSuccess: boolean, - parser?: string - ): Promise { - const inputCode = stdin; - const p1 = Deno.run({ - args: [execPath(), "./prettier/testdata/echox.ts", `${inputCode}`], - stdout: "piped" - }); - - const p2 = Deno.run({ - args: [ - execPath(), - "run", - "./prettier/main.ts", - "--stdin", - ...(parser ? ["--stdin-parser", parser] : []) - ], - stdin: "piped", - stdout: "piped", - stderr: "piped" - }); - - const n = await Deno.copy(p2.stdin!, p1.stdout!); - assertEquals(n, new TextEncoder().encode(stdin).length); - - const status1 = await p1.status(); - assertEquals(status1.code, 0); - assertEquals(status1.success, true); - p2.stdin!.close(); - const status2 = await p2.status(); - assertEquals(status2.code, expectedCode); - assertEquals(status2.success, expectedSuccess); - const decoder = new TextDecoder("utf-8"); - assertEquals( - decoder.decode(await Deno.readAll(p2.stdout!)), - expectedStdout - ); - assertEquals( - decoder.decode(await Deno.readAll(p2.stderr!)).split(EOL)[0], - expectedStderr - ); - p2.close(); - p1.close(); - } - - const testCases: TestCase[] = [ - { - stdin: `console.log("abc" )`, - stdout: `console.log("abc");\n`, - stderr: ``, - code: 0, - success: true - }, - { - stdin: `console.log("abc" )`, - stdout: `console.log("abc");\n`, - stderr: ``, - code: 0, - success: true, - parser: "babel" - }, - { - stdin: `{\"a\":\"b\"}`, - stdout: `{ "a": "b" }\n`, - stderr: ``, - code: 0, - success: true, - parser: "json" - }, - { - stdin: `## test`, - stdout: `## test\n`, - stderr: ``, - code: 0, - success: true, - parser: "markdown" - }, - { - stdin: `invalid typescript code##!!@@`, - stdout: ``, - stderr: `SyntaxError: ';' expected. (1:9)`, - code: 1, - success: false - }, - { - stdin: `console.log("foo");`, - stdout: ``, - stderr: - 'Error: Couldn\'t resolve parser "invalid_parser". ' + - "Parsers must be explicitly added to the standalone bundle.", - code: 1, - success: false, - parser: "invalid_parser" - } - ]; - - for (const t of testCases) { - await readFromStdinAssertion( - t.stdin, - t.stdout, - t.stderr, - t.code, - t.success, - t.parser - ); - } -}); -*/ - -test(async function testPrettierWithAutoConfig(): Promise { - const configs = [ - "config_file_json", - "config_file_toml", - "config_file_js", - "config_file_ts", - "config_file_yaml", - "config_file_yml" - ]; - - for (const configName of configs) { - const cwd = join(testdata, configName); - const prettierFile = join(Deno.cwd(), "prettier", "main.ts"); - const { stdout, stderr } = Deno.run({ - args: [ - execPath(), - "run", - "--allow-read", - "--allow-env", - prettierFile, - "../5.ts", - "--config", - "auto" - ], - stdout: "piped", - stderr: "piped", - cwd - }); - - const output = decoder.decode(await Deno.readAll(stdout)); - const errMsg = decoder.decode(await Deno.readAll(stderr)); - - assertEquals( - errMsg - .split(EOL) - .filter((line: string) => line.indexOf("Compile") !== 0) - .join(EOL), - "" - ); - - assertEquals(output, `console.log('0');\n`); - } -}); - -test(async function testPrettierWithSpecifiedConfig(): Promise { - interface Config { - dir: string; - name: string; - } - const configs: Config[] = [ - { - dir: "config_file_json", - name: ".prettierrc.json" - }, - { - dir: "config_file_toml", - name: ".prettierrc.toml" - }, - { - dir: "config_file_js", - name: ".prettierrc.js" - }, - { - dir: "config_file_ts", - name: ".prettierrc.ts" - }, - { - dir: "config_file_yaml", - name: ".prettierrc.yaml" - }, - { - dir: "config_file_yml", - name: ".prettierrc.yml" - } - ]; - - for (const config of configs) { - const cwd = join(testdata, config.dir); - const prettierFile = join(Deno.cwd(), "prettier", "main.ts"); - const { stdout, stderr } = Deno.run({ - args: [ - execPath(), - "run", - "--allow-read", - "--allow-env", - prettierFile, - "../5.ts", - "--config", - config.name - ], - stdout: "piped", - stderr: "piped", - cwd - }); - - const output = decoder.decode(await Deno.readAll(stdout)); - const errMsg = decoder.decode(await Deno.readAll(stderr)); - - assertEquals( - errMsg - .split(EOL) - .filter((line: string) => line.indexOf("Compile") !== 0) - .join(EOL), - "" - ); - - assertEquals(output, `console.log('0');\n`); - } -}); - -test(async function testPrettierWithAutoIgnore(): Promise { - // only format typescript file - const cwd = join(testdata, "ignore_file"); - const prettierFile = join(Deno.cwd(), "prettier", "main.ts"); - const { stdout, stderr } = Deno.run({ - args: [ - execPath(), - "run", - "--allow-read", - "--allow-env", - prettierFile, - "**/*", - "--ignore-path", - "auto" - ], - stdout: "piped", - stderr: "piped", - cwd - }); - - assertEquals(decoder.decode(await Deno.readAll(stderr)), ""); - - assertEquals( - decoder.decode(await Deno.readAll(stdout)), - `console.log("typescript");\nconsole.log("typescript1");\n` - ); -}); - -test(async function testPrettierWithSpecifiedIgnore(): Promise { - // only format javascript file - const cwd = join(testdata, "ignore_file"); - const prettierFile = join(Deno.cwd(), "prettier", "main.ts"); - const { stdout, stderr } = Deno.run({ - args: [ - execPath(), - "run", - "--allow-read", - "--allow-env", - prettierFile, - "**/*", - "--ignore-path", - "typescript.prettierignore" - ], - stdout: "piped", - stderr: "piped", - cwd - }); - - assertEquals(decoder.decode(await Deno.readAll(stderr)), ""); - - assertEquals( - decoder.decode(await Deno.readAll(stdout)), - `console.log("javascript");\nconsole.log("javascript1");\n` - ); -}); - -runIfMain(import.meta); diff --git a/std/prettier/prettier.ts b/std/prettier/prettier.ts deleted file mode 100644 index cce3744416..0000000000 --- a/std/prettier/prettier.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -/** - * Types are given here because parser files are big - * and it's much faster to give TS compiler just type declarations. - */ -// @deno-types="./vendor/standalone.d.ts" -import "./vendor/standalone.js"; -// @deno-types="./vendor/parser_typescript.d.ts" -import "./vendor/parser_typescript.js"; -// @deno-types="./vendor/parser_babylon.d.ts" -import "./vendor/parser_babylon.js"; -// @deno-types="./vendor/parser_markdown.d.ts" -import "./vendor/parser_markdown.js"; - -// TODO: provide decent type declarions for these -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const { prettier, prettierPlugins } = window as any; - -export { prettier, prettierPlugins }; diff --git a/std/prettier/testdata/0.ts b/std/prettier/testdata/0.ts deleted file mode 100644 index c594829fca..0000000000 --- a/std/prettier/testdata/0.ts +++ /dev/null @@ -1 +0,0 @@ -console.log (0) diff --git a/std/prettier/testdata/1.js b/std/prettier/testdata/1.js deleted file mode 100644 index 11a9aa6fe9..0000000000 --- a/std/prettier/testdata/1.js +++ /dev/null @@ -1 +0,0 @@ -console.log (1) diff --git a/std/prettier/testdata/2.ts b/std/prettier/testdata/2.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/std/prettier/testdata/3.jsx b/std/prettier/testdata/3.jsx deleted file mode 100644 index d58db9e7bf..0000000000 --- a/std/prettier/testdata/3.jsx +++ /dev/null @@ -1,2 +0,0 @@ -
-
diff --git a/std/prettier/testdata/4.tsx b/std/prettier/testdata/4.tsx deleted file mode 100644 index 88d34f7faa..0000000000 --- a/std/prettier/testdata/4.tsx +++ /dev/null @@ -1,3 +0,0 @@ -
-
- diff --git a/std/prettier/testdata/5.ts b/std/prettier/testdata/5.ts deleted file mode 100644 index f1b5b9cf1d..0000000000 --- a/std/prettier/testdata/5.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("0" ) diff --git a/std/prettier/testdata/bar/0.ts b/std/prettier/testdata/bar/0.ts deleted file mode 100644 index c594829fca..0000000000 --- a/std/prettier/testdata/bar/0.ts +++ /dev/null @@ -1 +0,0 @@ -console.log (0) diff --git a/std/prettier/testdata/bar/1.js b/std/prettier/testdata/bar/1.js deleted file mode 100644 index 11a9aa6fe9..0000000000 --- a/std/prettier/testdata/bar/1.js +++ /dev/null @@ -1 +0,0 @@ -console.log (1) diff --git a/std/prettier/testdata/config_file_js/.prettierrc.js b/std/prettier/testdata/config_file_js/.prettierrc.js deleted file mode 100644 index ba52f4d095..0000000000 --- a/std/prettier/testdata/config_file_js/.prettierrc.js +++ /dev/null @@ -1,5 +0,0 @@ -// prettier.config.js or .prettierrc.js -export default { - singleQuote: true, - trailingComma: "all" -}; diff --git a/std/prettier/testdata/config_file_json/.prettierrc.json b/std/prettier/testdata/config_file_json/.prettierrc.json deleted file mode 100644 index a20502b7f0..0000000000 --- a/std/prettier/testdata/config_file_json/.prettierrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all" -} diff --git a/std/prettier/testdata/config_file_toml/.prettierrc.toml b/std/prettier/testdata/config_file_toml/.prettierrc.toml deleted file mode 100644 index e5aa41d6eb..0000000000 --- a/std/prettier/testdata/config_file_toml/.prettierrc.toml +++ /dev/null @@ -1,2 +0,0 @@ -singleQuote = true -trailingComma= "all" diff --git a/std/prettier/testdata/config_file_ts/.prettierrc.ts b/std/prettier/testdata/config_file_ts/.prettierrc.ts deleted file mode 100644 index ba52f4d095..0000000000 --- a/std/prettier/testdata/config_file_ts/.prettierrc.ts +++ /dev/null @@ -1,5 +0,0 @@ -// prettier.config.js or .prettierrc.js -export default { - singleQuote: true, - trailingComma: "all" -}; diff --git a/std/prettier/testdata/config_file_yaml/.prettierrc.yaml b/std/prettier/testdata/config_file_yaml/.prettierrc.yaml deleted file mode 100644 index 76e9f31049..0000000000 --- a/std/prettier/testdata/config_file_yaml/.prettierrc.yaml +++ /dev/null @@ -1,2 +0,0 @@ -singleQuote: true -trailingComma: "all" diff --git a/std/prettier/testdata/config_file_yml/.prettierrc.yml b/std/prettier/testdata/config_file_yml/.prettierrc.yml deleted file mode 100644 index 76e9f31049..0000000000 --- a/std/prettier/testdata/config_file_yml/.prettierrc.yml +++ /dev/null @@ -1,2 +0,0 @@ -singleQuote: true -trailingComma: "all" diff --git a/std/prettier/testdata/echox.ts b/std/prettier/testdata/echox.ts deleted file mode 100644 index 5f8306b376..0000000000 --- a/std/prettier/testdata/echox.ts +++ /dev/null @@ -1,8 +0,0 @@ -async function echox(args: string[]) { - for (const arg of args) { - await Deno.stdout.write(new TextEncoder().encode(arg)); - } - Deno.exit(0); -} - -echox(Deno.args); diff --git a/std/prettier/testdata/foo/0.ts b/std/prettier/testdata/foo/0.ts deleted file mode 100644 index c594829fca..0000000000 --- a/std/prettier/testdata/foo/0.ts +++ /dev/null @@ -1 +0,0 @@ -console.log (0) diff --git a/std/prettier/testdata/foo/1.js b/std/prettier/testdata/foo/1.js deleted file mode 100644 index 11a9aa6fe9..0000000000 --- a/std/prettier/testdata/foo/1.js +++ /dev/null @@ -1 +0,0 @@ -console.log (1) diff --git a/std/prettier/testdata/formatted.ts b/std/prettier/testdata/formatted.ts deleted file mode 100644 index b7a3fa02f9..0000000000 --- a/std/prettier/testdata/formatted.ts +++ /dev/null @@ -1 +0,0 @@ -console.log(0); diff --git a/std/prettier/testdata/ignore_file/.prettierignore b/std/prettier/testdata/ignore_file/.prettierignore deleted file mode 100644 index 717509839d..0000000000 --- a/std/prettier/testdata/ignore_file/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -# ignore javascript/markdown file -*.js -*.md diff --git a/std/prettier/testdata/ignore_file/0.js b/std/prettier/testdata/ignore_file/0.js deleted file mode 100644 index 74c2894098..0000000000 --- a/std/prettier/testdata/ignore_file/0.js +++ /dev/null @@ -1 +0,0 @@ -console.log("javascript" ) diff --git a/std/prettier/testdata/ignore_file/0.ts b/std/prettier/testdata/ignore_file/0.ts deleted file mode 100644 index e21cddf3d3..0000000000 --- a/std/prettier/testdata/ignore_file/0.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("typescript" ) diff --git a/std/prettier/testdata/ignore_file/1.js b/std/prettier/testdata/ignore_file/1.js deleted file mode 100644 index 5bdbd94d91..0000000000 --- a/std/prettier/testdata/ignore_file/1.js +++ /dev/null @@ -1 +0,0 @@ -console.log("javascript1" ) diff --git a/std/prettier/testdata/ignore_file/1.ts b/std/prettier/testdata/ignore_file/1.ts deleted file mode 100644 index 21b56c25c9..0000000000 --- a/std/prettier/testdata/ignore_file/1.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("typescript1" ) diff --git a/std/prettier/testdata/ignore_file/README.md b/std/prettier/testdata/ignore_file/README.md deleted file mode 100644 index 0b7d72a6f6..0000000000 --- a/std/prettier/testdata/ignore_file/README.md +++ /dev/null @@ -1,5 +0,0 @@ -test format - -```javascript -console.log('') -``` \ No newline at end of file diff --git a/std/prettier/testdata/ignore_file/typescript.prettierignore b/std/prettier/testdata/ignore_file/typescript.prettierignore deleted file mode 100644 index 212f62eef3..0000000000 --- a/std/prettier/testdata/ignore_file/typescript.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -# ignore typescript/markdown file -*.ts -*.md diff --git a/std/prettier/testdata/opts/0.ts b/std/prettier/testdata/opts/0.ts deleted file mode 100644 index 400e7ee56e..0000000000 --- a/std/prettier/testdata/opts/0.ts +++ /dev/null @@ -1,6 +0,0 @@ -console.log(0); -console.log([ - function foo() {}, - function baz() {}, - a => {} -]); diff --git a/std/prettier/testdata/opts/1.ts b/std/prettier/testdata/opts/1.ts deleted file mode 100644 index c23a66c28e..0000000000 --- a/std/prettier/testdata/opts/1.ts +++ /dev/null @@ -1 +0,0 @@ -console.log ("1") diff --git a/std/prettier/testdata/opts/2.ts b/std/prettier/testdata/opts/2.ts deleted file mode 100644 index 2cfe9aece4..0000000000 --- a/std/prettier/testdata/opts/2.ts +++ /dev/null @@ -1 +0,0 @@ -console.log({a:1}) diff --git a/std/prettier/testdata/opts/3.md b/std/prettier/testdata/opts/3.md deleted file mode 100644 index 85e73d4b03..0000000000 --- a/std/prettier/testdata/opts/3.md +++ /dev/null @@ -1 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. diff --git a/std/prettier/util.ts b/std/prettier/util.ts deleted file mode 100644 index 0d3b01252e..0000000000 --- a/std/prettier/util.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -const { build, run } = Deno; - -// Runs a command in cross-platform way -export function xrun(opts: Deno.RunOptions): Deno.Process { - return run({ - ...opts, - args: build.os === "win" ? ["cmd.exe", "/c", ...opts.args] : opts.args - }); -} diff --git a/std/prettier/vendor/index.d.ts b/std/prettier/vendor/index.d.ts deleted file mode 100644 index 606c87a984..0000000000 --- a/std/prettier/vendor/index.d.ts +++ /dev/null @@ -1,507 +0,0 @@ -// Type definitions for prettier 1.18 -// Project: https://github.com/prettier/prettier, https://prettier.io -// Definitions by: Ika , -// Ifiok Jr. , -// Florian Keller , -// Sosuke Suzuki -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 - -export type AST = any; -export type Doc = doc.builders.Doc; - -// https://github.com/prettier/prettier/blob/master/src/common/fast-path.js -export interface FastPath { - stack: any[]; - getName(): null | PropertyKey; - getValue(): T; - getNode(count?: number): null | T; - getParentNode(count?: number): null | T; - call(callback: (path: this) => U, ...names: PropertyKey[]): U; - each(callback: (path: this) => void, ...names: PropertyKey[]): void; - map(callback: (path: this, index: number) => U, ...names: PropertyKey[]): U[]; -} - -export type BuiltInParser = (text: string, options?: any) => AST; -export type BuiltInParserName = - | 'babylon' // deprecated - | 'babel' - | 'babel-flow' - | 'flow' - | 'typescript' - | 'postcss' // deprecated - | 'css' - | 'less' - | 'scss' - | 'json' - | 'json5' - | 'json-stringify' - | 'graphql' - | 'markdown' - | 'vue' - | 'html' - | 'angular' - | 'mdx' - | 'yaml' - | 'lwc'; - -export type CustomParser = (text: string, parsers: Record, options: Options) => AST; - -export interface Options extends Partial {} -export interface RequiredOptions extends doc.printer.Options { - /** - * Print semicolons at the ends of statements. - */ - semi: boolean; - /** - * Use single quotes instead of double quotes. - */ - singleQuote: boolean; - /** - * Use single quotes in JSX. - */ - jsxSingleQuote: boolean; - /** - * Print trailing commas wherever possible. - */ - trailingComma: 'none' | 'es5' | 'all'; - /** - * Print spaces between brackets in object literals. - */ - bracketSpacing: boolean; - /** - * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line. - */ - jsxBracketSameLine: boolean; - /** - * Format only a segment of a file. - */ - rangeStart: number; - /** - * Format only a segment of a file. - */ - rangeEnd: number; - /** - * Specify which parser to use. - */ - parser: BuiltInParserName | CustomParser; - /** - * Specify the input filepath. This will be used to do parser inference. - */ - filepath: string; - /** - * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. - * This is very useful when gradually transitioning large, unformatted codebases to prettier. - */ - requirePragma: boolean; - /** - * Prettier can insert a special @format marker at the top of files specifying that - * the file has been formatted with prettier. This works well when used in tandem with - * the --require-pragma option. If there is already a docblock at the top of - * the file then this option will add a newline to it with the @format marker. - */ - insertPragma: boolean; - /** - * By default, Prettier will wrap markdown text as-is since some services use a linebreak-sensitive renderer. - * In some cases you may want to rely on editor/viewer soft wrapping instead, so this option allows you to opt out. - */ - proseWrap: - | boolean // deprecated - | 'always' - | 'never' - | 'preserve'; - /** - * Include parentheses around a sole arrow function parameter. - */ - arrowParens: 'avoid' | 'always'; - /** - * The plugin API is in a beta state. - */ - plugins: Array; - /** - * How to handle whitespaces in HTML. - */ - htmlWhitespaceSensitivity: 'css' | 'strict' | 'ignore'; - /** - * Which end of line characters to apply. - */ - endOfLine: 'auto' | 'lf' | 'crlf' | 'cr'; - /** - * Change when properties in objects are quoted. - */ - quoteProps: 'as-needed' | 'consistent' | 'preserve'; -} - -export interface ParserOptions extends RequiredOptions { - locStart: (node: any) => number; - locEnd: (node: any) => number; - originalText: string; -} - -export interface Plugin { - languages?: SupportLanguage[]; - parsers?: { [parserName: string]: Parser }; - printers?: { [astFormat: string]: Printer }; - options?: SupportOption[]; - defaultOptions?: Partial; -} - -export interface Parser { - parse: (text: string, parsers: { [parserName: string]: Parser }, options: ParserOptions) => AST; - astFormat: string; - hasPragma?: (text: string) => boolean; - locStart: (node: any) => number; - locEnd: (node: any) => number; - preprocess?: (text: string, options: ParserOptions) => string; -} - -export interface Printer { - print( - path: FastPath, - options: ParserOptions, - print: (path: FastPath) => Doc, - ): Doc; - embed?: ( - path: FastPath, - print: (path: FastPath) => Doc, - textToDoc: (text: string, options: Options) => Doc, - options: ParserOptions, - ) => Doc | null; - insertPragma?: (text: string) => string; - /** - * @returns `null` if you want to remove this node - * @returns `void` if you want to use modified newNode - * @returns anything if you want to replace the node with it - */ - massageAstNode?: (node: any, newNode: any, parent: any) => any; - hasPrettierIgnore?: (path: FastPath) => boolean; - canAttachComment?: (node: any) => boolean; - willPrintOwnComments?: (path: FastPath) => boolean; - printComments?: (path: FastPath, print: (path: FastPath) => Doc, options: ParserOptions, needsSemi: boolean) => Doc; - handleComments?: { - ownLine?: (commentNode: any, text: string, options: ParserOptions, ast: any, isLastComment: boolean) => boolean; - endOfLine?: (commentNode: any, text: string, options: ParserOptions, ast: any, isLastComment: boolean) => boolean; - remaining?: (commentNode: any, text: string, options: ParserOptions, ast: any, isLastComment: boolean) => boolean; - }; -} - -export interface CursorOptions extends Options { - /** - * Specify where the cursor is. - */ - cursorOffset: number; - rangeStart?: never; - rangeEnd?: never; -} - -export interface CursorResult { - formatted: string; - cursorOffset: number; -} - -/** - * `format` is used to format text using Prettier. [Options](https://github.com/prettier/prettier#options) may be provided to override the defaults. - */ -export function format(source: string, options?: Options): string; - -/** - * `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`. - * This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. - */ -export function check(source: string, options?: Options): boolean; - -/** - * `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code. - * This is useful for editor integrations, to prevent the cursor from moving when code is formatted. - * - * The `cursorOffset` option should be provided, to specify where the cursor is. This option cannot be used with `rangeStart` and `rangeEnd`. - */ -export function formatWithCursor(source: string, options: CursorOptions): CursorResult; - -export interface ResolveConfigOptions { - /** - * If set to `false`, all caching will be bypassed. - */ - useCache?: boolean; - /** - * Pass directly the path of the config file if you don't wish to search for it. - */ - config?: string; - /** - * If set to `true` and an `.editorconfig` file is in your project, - * Prettier will parse it and convert its properties to the corresponding prettier configuration. - * This configuration will be overridden by `.prettierrc`, etc. Currently, - * the following EditorConfig properties are supported: - * - indent_style - * - indent_size/tab_width - * - max_line_length - */ - editorconfig?: boolean; -} - -/** - * `resolveConfig` can be used to resolve configuration for a given source file, - * passing its path as the first argument. The config search will start at the - * file path and continue to search up the directory. - * (You can use `process.cwd()` to start searching from the current directory). - * - * A promise is returned which will resolve to: - * - * - An options object, providing a [config file](https://github.com/prettier/prettier#configuration-file) was found. - * - `null`, if no file was found. - * - * The promise will be rejected if there was an error parsing the configuration file. - */ -export function resolveConfig(filePath: string, options?: ResolveConfigOptions): Promise; -export namespace resolveConfig { - function sync(filePath: string, options?: ResolveConfigOptions): null | Options; -} - -/** - * `resolveConfigFile` can be used to find the path of the Prettier configuration file, - * that will be used when resolving the config (i.e. when calling `resolveConfig`). - * - * A promise is returned which will resolve to: - * - * - The path of the configuration file. - * - `null`, if no file was found. - * - * The promise will be rejected if there was an error parsing the configuration file. - */ -export function resolveConfigFile(filePath?: string): Promise; -export namespace resolveConfigFile { - function sync(filePath?: string): null | string; -} - -/** - * As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache. - * Generally this is only needed for editor integrations that know that the file system has changed since the last format took place. - */ -export function clearConfigCache(): void; - -export interface SupportLanguage { - name: string; - since?: string; - parsers: BuiltInParserName[] | string[]; - group?: string; - tmScope?: string; - aceMode?: string; - codemirrorMode?: string; - codemirrorMimeType?: string; - aliases?: string[]; - extensions?: string[]; - filenames?: string[]; - linguistLanguageId?: number; - vscodeLanguageIds?: string[]; -} - -export interface SupportOptionDefault { - since: string; - value: SupportOptionValue; -} - -export interface SupportOption { - since?: string; - type: 'int' | 'boolean' | 'choice' | 'path'; - array?: boolean; - deprecated?: string; - redirect?: SupportOptionRedirect; - description: string; - oppositeDescription?: string; - default: SupportOptionValue | SupportOptionDefault[]; - range?: SupportOptionRange; - choices?: SupportOptionChoice[]; - category: string; -} - -export interface SupportOptionRedirect { - options: string; - value: SupportOptionValue; -} - -export interface SupportOptionRange { - start: number; - end: number; - step: number; -} - -export interface SupportOptionChoice { - value: boolean | string; - description?: string; - since?: string; - deprecated?: string; - redirect?: SupportOptionValue; -} - -export type SupportOptionValue = number | boolean | string; - -export interface SupportInfo { - languages: SupportLanguage[]; - options: SupportOption[]; -} - -export interface FileInfoOptions { - ignorePath?: string; - withNodeModules?: boolean; - plugins?: string[]; -} - -export interface FileInfoResult { - ignored: boolean; - inferredParser: string | null; -} - -export function getFileInfo(filePath: string, options?: FileInfoOptions): Promise; - -export namespace getFileInfo { - function sync(filePath: string, options?: FileInfoOptions): FileInfoResult; -} - -/** - * Returns an object representing the parsers, languages and file types Prettier supports. - * If `version` is provided (e.g. `"1.5.0"`), information for that version will be returned, - * otherwise information for the current version will be returned. - */ -export function getSupportInfo(version?: string): SupportInfo; - -/** - * `version` field in `package.json` - */ -export const version: string; - -// https://github.com/prettier/prettier/blob/master/src/common/util-shared.js -export namespace util { - function isNextLineEmpty(text: string, node: any, options: ParserOptions): boolean; - function isNextLineEmptyAfterIndex(text: string, index: number): boolean; - function getNextNonSpaceNonCommentCharacterIndex(text: string, node: any, options: ParserOptions): number; - function makeString(rawContent: string, enclosingQuote: "'" | '"', unescapeUnnecessaryEscapes: boolean): string; - function addLeadingComment(node: any, commentNode: any): void; - function addDanglingComment(node: any, commentNode: any): void; - function addTrailingComment(node: any, commentNode: any): void; -} - -// https://github.com/prettier/prettier/blob/master/src/doc/index.js -export namespace doc { - namespace builders { - type Doc = - | string - | Align - | BreakParent - | Concat - | Fill - | Group - | IfBreak - | Indent - | Line - | LineSuffix - | LineSuffixBoundary; - - interface Align { - type: 'align'; - contents: Doc; - n: number | string | { type: 'root' }; - } - - interface BreakParent { - type: 'break-parent'; - } - - interface Concat { - type: 'concat'; - parts: Doc[]; - } - - interface Fill { - type: 'fill'; - parts: Doc[]; - } - - interface Group { - type: 'group'; - contents: Doc; - break: boolean; - expandedStates: Doc[]; - } - - interface IfBreak { - type: 'if-break'; - breakContents: Doc; - flatContents: Doc; - } - - interface Indent { - type: 'indent'; - contents: Doc; - } - - interface Line { - type: 'line'; - soft?: boolean; - hard?: boolean; - literal?: boolean; - } - - interface LineSuffix { - type: 'line-suffix'; - contents: Doc; - } - - interface LineSuffixBoundary { - type: 'line-suffix-boundary'; - } - - function addAlignmentToDoc(doc: Doc, size: number, tabWidth: number): Doc; - function align(n: Align['n'], contents: Doc): Align; - const breakParent: BreakParent; - function concat(contents: Doc[]): Concat; - function conditionalGroup(states: Doc[], opts?: { shouldBreak: boolean }): Group; - function dedent(contents: Doc): Align; - function dedentToRoot(contents: Doc): Align; - function fill(parts: Doc[]): Fill; - function group(contents: Doc, opts?: { shouldBreak: boolean }): Group; - const hardline: Concat; - function ifBreak(breakContents: Doc, flatContents: Doc): IfBreak; - function indent(contents: Doc): Indent; - function join(separator: Doc, parts: Doc[]): Concat; - const line: Line; - function lineSuffix(contents: Doc): LineSuffix; - const lineSuffixBoundary: LineSuffixBoundary; - const literalline: Concat; - function markAsRoot(contents: Doc): Align; - const softline: Line; - } - namespace debug { - function printDocToDebug(doc: Doc): string; - } - namespace printer { - function printDocToString(doc: Doc, options: Options): { - formatted: string; - cursorNodeStart?: number; - cursorNodeText?: string; - }; - interface Options { - /** - * Specify the line length that the printer will wrap on. - */ - printWidth: number; - /** - * Specify the number of spaces per indentation-level. - */ - tabWidth: number; - /** - * Indent lines with tabs instead of spaces - */ - useTabs: boolean; - } - } - namespace utils { - function isEmpty(doc: Doc): boolean; - function isLineNext(doc: Doc): boolean; - function willBreak(doc: Doc): boolean; - function traverseDoc(doc: Doc, onEnter?: (doc: Doc) => void | boolean, onExit?: (doc: Doc) => void, shouldTraverseConditionalGroups?: boolean): void; - function mapDoc(doc: Doc, callback: (doc: Doc) => T): T; - function propagateBreaks(doc: Doc): void; - function removeLines(doc: Doc): Doc; - function stripTrailingHardline(doc: Doc): Doc; - } -} diff --git a/std/prettier/vendor/parser_babylon.d.ts b/std/prettier/vendor/parser_babylon.d.ts deleted file mode 100644 index 54a04a9532..0000000000 --- a/std/prettier/vendor/parser_babylon.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Parser } from './index.d.ts'; - -declare const parser: { parsers: { [parserName: string]: Parser } }; -export = parser; diff --git a/std/prettier/vendor/parser_babylon.js b/std/prettier/vendor/parser_babylon.js deleted file mode 100644 index 72a9329ba5..0000000000 --- a/std/prettier/vendor/parser_babylon.js +++ /dev/null @@ -1,11 +0,0 @@ -// This file is copied from prettier@1.19.1 -/** - * Copyright © James Long and contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t=t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babylon={}))}(globalThis,(function(t){"use strict";var e=function(t,e){var s=new SyntaxError(t+" ("+e.start.line+":"+e.start.column+")");return s.loc=e,s};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}var a,r=Object.freeze({__proto__:null,default:{EOL:"\n"}}),n=i((function(t){t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");var e=t.match(/(?:\r?\n)/g)||[];if(0===e.length)return null;var s=e.filter((function(t){return"\r\n"===t})).length;return s>e.length-s?"\r\n":"\n"},t.exports.graceful=function(e){return t.exports(e)||"\n"}})),o=(n.graceful,(a=r)&&a.default||a),h=i((function(t,e){function s(){var t=o;return s=function(){return t},t}function i(){var t,e=(t=n)&&t.__esModule?t:{default:t};return i=function(){return e},e}Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(t){var e=t.match(h);return e?e[0].trimLeft():""},e.strip=function(t){var e=t.match(h);return e&&e[0]?t.substring(e[0].length):t},e.parse=function(t){return f(t).pragmas},e.parseWithComments=f,e.print=function(t){var e=t.comments,a=void 0===e?"":e,r=t.pragmas,n=void 0===r?{}:r,o=(0,i().default)(a)||s().EOL,h=Object.keys(n),u=h.map((function(t){return m(t,n[t])})).reduce((function(t,e){return t.concat(e)}),[]).map((function(t){return" * "+t+o})).join("");if(!a){if(0===h.length)return"";if(1===h.length&&!Array.isArray(n[h[0]])){var l=n[h[0]];return"".concat("/**"," ").concat(m(h[0],l)[0]).concat(" */")}}var c=a.split(o).map((function(t){return"".concat(" *"," ").concat(t)})).join(o)+o;return"/**"+o+(a?c:"")+(a&&h.length?" *"+o:"")+u+" */"};var a=/\*\/$/,r=/^\/\*\*/,h=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,u=/(^|\s+)\/\/([^\r\n]*)/g,l=/^(\r?\n)+/,c=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,p=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,d=/(\r?\n|^) *\* ?/g;function f(t){var e=(0,i().default)(t)||s().EOL;t=t.replace(r,"").replace(a,"").replace(d,"$1");for(var n="";n!==t;)n=t,t=t.replace(c,"".concat(e,"$1 $2").concat(e));t=t.replace(l,"").trimRight();for(var o,h=Object.create(null),f=t.replace(p,"").replace(l,"").trimRight();o=p.exec(t);){var m=o[2].replace(u,"");"string"==typeof h[o[1]]||Array.isArray(h[o[1]])?h[o[1]]=[].concat(h[o[1]],m):h[o[1]]=m}return{comments:f,pragmas:h}}function m(t,e){return[].concat(e).map((function(e){return"@".concat(t," ").concat(e).trim()}))}}));s(h);h.extract,h.strip,h.parse,h.parseWithComments,h.print;var u=function(t){var e=Object.keys(h.parse(h.extract(t)));return-1!==e.indexOf("prettier")||-1!==e.indexOf("format")},l=function(t){return t.length>0?t[t.length-1]:null};var c={locStart:function t(e,s){return!(s=s||{}).ignoreDecorators&&e.declaration&&e.declaration.decorators&&e.declaration.decorators.length>0?t(e.declaration.decorators[0]):!s.ignoreDecorators&&e.decorators&&e.decorators.length>0?t(e.decorators[0]):e.__location?e.__location.startOffset:e.range?e.range[0]:"number"==typeof e.start?e.start:e.loc?e.loc.start:null},locEnd:function t(e){var s=e.nodes&&l(e.nodes);if(s&&e.source&&!e.source.end&&(e=s),e.__location)return e.__location.endOffset;var i=e.range?e.range[1]:"number"==typeof e.end?e.end:null;return e.typeAnnotation?Math.max(i,t(e.typeAnnotation)):e.loc&&!i?e.loc.end:i}};function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var s=0;s<~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}(),""):t},C=E,A=E;C.default=A;var w=function(t){return!Number.isNaN(t)&&(t>=4352&&(t<=4447||9001===t||9002===t||11904<=t&&t<=12871&&12351!==t||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141))},T=w,F=w;T.default=F;var N=function(t){if("string"!=typeof(t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===t.length)return 0;t=C(t);for(var e=0,s=0;s=127&&i<=159||(i>=768&&i<=879||(i>65535&&s++,e+=T(i)?2:1))}return e},S=N,I=N;S.default=I;var L=/[|\\{}()[\]^$+*?.]/g,B=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(L,"\\$&")},O=/[^\x20-\x7F]/;function M(t){if(t)switch(t.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function R(t){return function(e,s,i){var a=i&&i.backwards;if(!1===s)return!1;for(var r=e.length,n=s;n>=0&&n"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(t,e){t.forEach((function(t){G[t]=e}))}));var $={"==":!0,"!=":!0,"===":!0,"!==":!0},Y={"*":!0,"/":!0,"%":!0},Z={">>":!0,">>>":!0,"<<":!0};function tt(t,e,s){for(var i=0,a=s=s||0;a(s.match(n.regex)||[]).length?n.quote:r.quote);return o}function st(t,e,s){var i='"'===e?"'":'"',a=t.replace(/\\([\s\S])|(['"])/g,(function(t,a,r){return a===i?a:r===e?"\\"+r:r||(s&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(a)?a:"\\"+a)}));return e+a+e}function it(t){return t&&t.comments&&t.comments.length>0&&t.comments.some((function(t){return"prettier-ignore"===t.value.trim()}))}function at(t,e){(t.comments||(t.comments=[])).push(e),e.printed=!1,"JSXText"===t.type&&(e.printed=!0)}var rt={replaceEndOfLineWith:function(t,e){var s=[],i=!0,a=!1,r=void 0;try{for(var n,o=t.split("\n")[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){var h=n.value;0!==s.length&&s.push(e),s.push(h)}}catch(t){a=!0,r=t}finally{try{i||null==o.return||o.return()}finally{if(a)throw r}}return s},getStringWidth:function(t){return t?O.test(t)?S(t):t.length:0},getMaxContinuousCount:function(t,e){var s=t.match(new RegExp("(".concat(B(e),")+"),"g"));return null===s?0:s.reduce((function(t,s){return Math.max(t,s.length/e.length)}),0)},getMinNotPresentContinuousCount:function(t,e){var s=t.match(new RegExp("(".concat(B(e),")+"),"g"));if(null===s)return 0;var i=new Map,a=0,r=!0,n=!1,o=void 0;try{for(var h,u=s[Symbol.iterator]();!(r=(h=u.next()).done);r=!0){var l=h.value.length/e.length;i.set(l,!0),l>a&&(a=l)}}catch(t){n=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(n)throw o}}for(var c=1;c1?t[t.length-2]:null},getLast:l,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:J,getNextNonSpaceNonCommentCharacterIndex:H,getNextNonSpaceNonCommentCharacter:function(t,e,s){return t.charAt(H(t,e,s))},skip:R,skipWhitespace:_,skipSpaces:j,skipToLineEnd:q,skipEverythingButNewLine:U,skipInlineComment:V,skipTrailingComment:z,skipNewline:W,isNextLineEmptyAfterIndex:X,isNextLineEmpty:function(t,e,s){return X(t,s(e))},isPreviousLineEmpty:function(t,e,s){var i=s(e)-1;return i=W(t,i=j(t,i,{backwards:!0}),{backwards:!0}),(i=j(t,i,{backwards:!0}))!==W(t,i,{backwards:!0})},hasNewline:K,hasNewlineInRange:function(t,e,s){for(var i=e;i1&&void 0!==arguments[1]?arguments[1]:{};d(this,t),this.label=e,this.keyword=s.keyword,this.beforeExpr=!!s.beforeExpr,this.startsExpr=!!s.startsExpr,this.rightAssociative=!!s.rightAssociative,this.isLoop=!!s.isLoop,this.isAssign=!!s.isAssign,this.prefix=!!s.prefix,this.postfix=!!s.postfix,this.binop=null!=s.binop?s.binop:null,this.updateContext=null},a=new Map;function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.keyword=t;var s=new i(t,e);return a.set(t,s),s}function n(t,e){return new i(t,{beforeExpr:s,binop:e})}var o={num:new i("num",{startsExpr:!0}),bigint:new i("bigint",{startsExpr:!0}),regexp:new i("regexp",{startsExpr:!0}),string:new i("string",{startsExpr:!0}),name:new i("name",{startsExpr:!0}),eof:new i("eof"),bracketL:new i("[",{beforeExpr:s,startsExpr:!0}),bracketR:new i("]"),braceL:new i("{",{beforeExpr:s,startsExpr:!0}),braceBarL:new i("{|",{beforeExpr:s,startsExpr:!0}),braceR:new i("}"),braceBarR:new i("|}"),parenL:new i("(",{beforeExpr:s,startsExpr:!0}),parenR:new i(")"),comma:new i(",",{beforeExpr:s}),semi:new i(";",{beforeExpr:s}),colon:new i(":",{beforeExpr:s}),doubleColon:new i("::",{beforeExpr:s}),dot:new i("."),question:new i("?",{beforeExpr:s}),questionDot:new i("?."),arrow:new i("=>",{beforeExpr:s}),template:new i("template"),ellipsis:new i("...",{beforeExpr:s}),backQuote:new i("`",{startsExpr:!0}),dollarBraceL:new i("${",{beforeExpr:s,startsExpr:!0}),at:new i("@"),hash:new i("#",{startsExpr:!0}),interpreterDirective:new i("#!..."),eq:new i("=",{beforeExpr:s,isAssign:!0}),assign:new i("_=",{beforeExpr:s,isAssign:!0}),incDec:new i("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),bang:new i("!",{beforeExpr:s,prefix:!0,startsExpr:!0}),tilde:new i("~",{beforeExpr:s,prefix:!0,startsExpr:!0}),pipeline:n("|>",0),nullishCoalescing:n("??",1),logicalOR:n("||",2),logicalAND:n("&&",3),bitwiseOR:n("|",4),bitwiseXOR:n("^",5),bitwiseAND:n("&",6),equality:n("==/!=/===/!==",7),relational:n("/<=/>=",8),bitShift:n("<>/>>>",9),plusMin:new i("+/-",{beforeExpr:s,binop:10,prefix:!0,startsExpr:!0}),modulo:new i("%",{beforeExpr:s,binop:11,startsExpr:!0}),star:n("*",11),slash:n("/",11),exponent:new i("**",{beforeExpr:s,binop:12,rightAssociative:!0}),_break:r("break"),_case:r("case",{beforeExpr:s}),_catch:r("catch"),_continue:r("continue"),_debugger:r("debugger"),_default:r("default",{beforeExpr:s}),_do:r("do",{isLoop:!0,beforeExpr:s}),_else:r("else",{beforeExpr:s}),_finally:r("finally"),_for:r("for",{isLoop:!0}),_function:r("function",{startsExpr:!0}),_if:r("if"),_return:r("return",{beforeExpr:s}),_switch:r("switch"),_throw:r("throw",{beforeExpr:s,prefix:!0,startsExpr:!0}),_try:r("try"),_var:r("var"),_const:r("const"),_while:r("while",{isLoop:!0}),_with:r("with"),_new:r("new",{beforeExpr:s,startsExpr:!0}),_this:r("this",{startsExpr:!0}),_super:r("super",{startsExpr:!0}),_class:r("class",{startsExpr:!0}),_extends:r("extends",{beforeExpr:s}),_export:r("export"),_import:r("import",{startsExpr:!0}),_null:r("null",{startsExpr:!0}),_true:r("true",{startsExpr:!0}),_false:r("false",{startsExpr:!0}),_in:r("in",{beforeExpr:s,binop:8}),_instanceof:r("instanceof",{beforeExpr:s,binop:8}),_typeof:r("typeof",{beforeExpr:s,prefix:!0,startsExpr:!0}),_void:r("void",{beforeExpr:s,prefix:!0,startsExpr:!0}),_delete:r("delete",{beforeExpr:s,prefix:!0,startsExpr:!0})},h=2,u=4,l=8,c=513|h;function p(t,e){return h|(t?u:0)|(e?l:0)}function f(t){return null!=t&&"Property"===t.type&&"init"===t.kind&&!1===t.method}var v=/\r\n?|[\n\u2028\u2029]/,E=new RegExp(v.source,"g");function C(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var A=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function w(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var T=function t(e,s,i,a){d(this,t),this.token=e,this.isExpr=!!s,this.preserveSpace=!!i,this.override=a},F={braceStatement:new T("{",!1),braceExpression:new T("{",!0),templateQuasi:new T("${",!1),parenStatement:new T("(",!1),parenExpression:new T("(",!0),template:new T("`",!0,!0,(function(t){return t.readTmplToken()})),functionExpression:new T("function",!0),functionStatement:new T("function",!1)};o.parenR.updateContext=o.braceR.updateContext=function(){if(1!==this.state.context.length){var t=this.state.context.pop();t===F.braceStatement&&"function"===this.curContext().token&&(t=this.state.context.pop()),this.state.exprAllowed=!t.isExpr}else this.state.exprAllowed=!0},o.name.updateContext=function(t){var e=!1;t!==o.dot&&("of"===this.state.value&&!this.state.exprAllowed||"yield"===this.state.value&&this.scope.inGenerator)&&(e=!0),this.state.exprAllowed=e,this.state.isIterator&&(this.state.isIterator=!1)},o.braceL.updateContext=function(t){this.state.context.push(this.braceIsBlock(t)?F.braceStatement:F.braceExpression),this.state.exprAllowed=!0},o.dollarBraceL.updateContext=function(){this.state.context.push(F.templateQuasi),this.state.exprAllowed=!0},o.parenL.updateContext=function(t){var e=t===o._if||t===o._for||t===o._with||t===o._while;this.state.context.push(e?F.parenStatement:F.parenExpression),this.state.exprAllowed=!0},o.incDec.updateContext=function(){},o._function.updateContext=o._class.updateContext=function(t){!t.beforeExpr||t===o.semi||t===o._else||t===o._return&&v.test(this.input.slice(this.state.lastTokEnd,this.state.start))||(t===o.colon||t===o.braceL)&&this.curContext()===F.b_stat?this.state.context.push(F.functionStatement):this.state.context.push(F.functionExpression),this.state.exprAllowed=!1},o.backQuote.updateContext=function(){this.curContext()===F.template?this.state.context.pop():this.state.context.push(F.template),this.state.exprAllowed=!1};var N=["eval","arguments"],S=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),I=new Set(N),L=function(t,e){return e&&"await"===t||"enum"===t};function B(t,e){return L(t,e)||S.has(t)}function O(t){return I.has(t)}function M(t,e){return B(t,e)||O(t)}var R=/^in(stanceof)?$/,_="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-Ᶎꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭧꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",j="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",q=new RegExp("["+_+"]"),U=new RegExp("["+_+j+"]");_=j=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,14,29,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,477,28,11,0,9,21,155,22,13,52,76,44,33,24,27,35,30,0,12,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,21,0,33,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,0,161,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,270,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,754,9486,286,50,2,18,3,9,395,2309,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,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,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,15,7472,3104,541],z=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,525,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,4,9,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,232,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,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,262,6,10,9,419,13,1495,6,110,6,6,9,792487,239];function W(t,e){for(var s=65536,i=0,a=e.length;it)return!1;if((s+=e[i+1])>=t)return!0}return!1}function K(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&q.test(String.fromCharCode(t)):W(t,V)))}function X(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&U.test(String.fromCharCode(t)):W(t,V)||W(t,z))))}var J=["any","bool","boolean","empty","false","mixed","null","number","static","string","true","typeof","void","interface","extends","_"];function H(t){return"type"===t.importKind||"typeof"===t.importKind}function G(t){return(t.type===o.name||!!t.type.keyword)&&"from"!==t.value}var Q={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var $=/\*?\s*@((?:no)?flow)\b/,Y={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:"♦"},Z=/^[\da-fA-F]+$/,tt=/^\d+$/;function et(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function st(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return st(t.object)+"."+st(t.property);throw new Error("Node had unexpected type: "+t.type)}F.j_oTag=new T("...",!0,!0),o.jsxName=new i("jsxName"),o.jsxText=new i("jsxText",{beforeExpr:!0}),o.jsxTagStart=new i("jsxTagStart",{startsExpr:!0}),o.jsxTagEnd=new i("jsxTagEnd"),o.jsxTagStart.updateContext=function(){this.state.context.push(F.j_expr),this.state.context.push(F.j_oTag),this.state.exprAllowed=!1},o.jsxTagEnd.updateContext=function(t){var e=this.state.context.pop();e===F.j_oTag&&t===o.slash||e===F.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===F.j_expr):this.state.exprAllowed=!0};var it=function t(e){d(this,t),this.var=[],this.lexical=[],this.functions=[],this.flags=e},at=function(){function t(e,s){d(this,t),this.scopeStack=[],this.undefinedExports=new Map,this.raise=e,this.inModule=s}return m(t,[{key:"createScope",value:function(t){return new it(t)}},{key:"enter",value:function(t){this.scopeStack.push(this.createScope(t))}},{key:"exit",value:function(){this.scopeStack.pop()}},{key:"treatFunctionsAsVarInScope",value:function(t){return!!(t.flags&h||!this.inModule&&1&t.flags)}},{key:"declareName",value:function(t,e,s){var i=this.currentScope();if(8&e||16&e)this.checkRedeclarationInScope(i,t,e,s),16&e?i.functions.push(t):i.lexical.push(t),8&e&&this.maybeExportDefined(i,t);else if(4&e)for(var a=this.scopeStack.length-1;a>=0&&(i=this.scopeStack[a],this.checkRedeclarationInScope(i,t,e,s),i.var.push(t),this.maybeExportDefined(i,t),!(i.flags&c));--a);this.inModule&&1&i.flags&&this.undefinedExports.delete(t)}},{key:"maybeExportDefined",value:function(t,e){this.inModule&&1&t.flags&&this.undefinedExports.delete(e)}},{key:"checkRedeclarationInScope",value:function(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.raise(i,"Identifier '".concat(e,"' has already been declared"))}},{key:"isRedeclaredInScope",value:function(t,e,s){return!!(1&s)&&(8&s?t.lexical.indexOf(e)>-1||t.functions.indexOf(e)>-1||t.var.indexOf(e)>-1:16&s?t.lexical.indexOf(e)>-1||!this.treatFunctionsAsVarInScope(t)&&t.var.indexOf(e)>-1:t.lexical.indexOf(e)>-1&&!(32&t.flags&&t.lexical[0]===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.indexOf(e)>-1)}},{key:"checkLocalExport",value:function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&-1===this.scopeStack[0].functions.indexOf(t.name)&&this.undefinedExports.set(t.name,t.start)}},{key:"currentScope",value:function(){return this.scopeStack[this.scopeStack.length-1]}},{key:"currentVarScope",value:function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&c)return e}}},{key:"currentThisScope",value:function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if((e.flags&c||256&e.flags)&&!(16&e.flags))return e}}},{key:"inFunction",get:function(){return(this.currentVarScope().flags&h)>0}},{key:"inGenerator",get:function(){return(this.currentVarScope().flags&l)>0}},{key:"inAsync",get:function(){return(this.currentVarScope().flags&u)>0}},{key:"allowSuper",get:function(){return(64&this.currentThisScope().flags)>0}},{key:"allowDirectSuper",get:function(){return(128&this.currentThisScope().flags)>0}},{key:"inNonArrowFunction",get:function(){return(this.currentThisScope().flags&h)>0}},{key:"treatFunctionsAsVar",get:function(){return this.treatFunctionsAsVarInScope(this.currentScope())}}]),t}(),rt=function(t){function e(){var t,s;d(this,e);for(var i=arguments.length,a=new Array(i),r=0;r-1){if(256&i){var a=!!(512&i),r=t.constEnums.indexOf(s)>-1;return a!==r}return!0}return 128&i&&t.classes.indexOf(s)>-1?t.lexical.indexOf(s)>-1&&!!(1&i):!!(2&i&&t.types.indexOf(s)>-1)||k(D(e.prototype),"isRedeclaredInScope",this).apply(this,arguments)}},{key:"checkLocalExport",value:function(t){-1===this.scopeStack[0].types.indexOf(t.name)&&-1===this.scopeStack[0].exportOnlyBindings.indexOf(t.name)&&k(D(e.prototype),"checkLocalExport",this).call(this,t)}}]),e}(at);function ot(t){if(null==t)throw new Error("Unexpected ".concat(t," value."));return t}function ht(t){if(!t)throw new Error("Assert fail")}o.placeholder=new i("%%",{startsExpr:!0});function ut(t,e){return t.some((function(t){return Array.isArray(t)?t[0]===e:t===e}))}function lt(t,e,s){var i=t.find((function(t){return Array.isArray(t)?t[0]===e:t===e}));return i&&Array.isArray(i)?i[1][s]:null}var ct=["minimal","smart","fsharp"];var pt={estree:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"estreeParseRegExpLiteral",value:function(t){var e=t.pattern,s=t.flags,i=null;try{i=new RegExp(e,s)}catch(t){}var a=this.estreeParseLiteral(i);return a.regex={pattern:e,flags:s},a}},{key:"estreeParseLiteral",value:function(t){return this.parseLiteral(t,"Literal")}},{key:"directiveToStmt",value:function(t){var e=t.value,s=this.startNodeAt(t.start,t.loc.start),i=this.startNodeAt(e.start,e.loc.start);return i.value=e.value,i.raw=e.extra.raw,s.expression=this.finishNodeAt(i,"Literal",e.end,e.loc.end),s.directive=e.extra.raw.slice(1,-1),this.finishNodeAt(s,"ExpressionStatement",t.end,t.loc.end)}},{key:"initFunction",value:function(t,s){k(D(e.prototype),"initFunction",this).call(this,t,s),t.expression=!1}},{key:"checkDeclaration",value:function(t){f(t)?this.checkDeclaration(t.value):k(D(e.prototype),"checkDeclaration",this).call(this,t)}},{key:"checkGetterSetterParams",value:function(t){var e=t,s="get"===e.kind?0:1,i=e.start;e.value.params.length!==s?"get"===e.kind?this.raise(i,"getter must not have any formal parameters"):this.raise(i,"setter must have exactly one formal parameter"):"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raise(i,"setter function argument must not be a rest parameter")}},{key:"checkLVal",value:function(t){var s=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,a=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;switch(t.type){case"ObjectPattern":t.properties.forEach((function(t){s.checkLVal("Property"===t.type?t.value:t,i,a,"object destructuring pattern",n)}));break;default:k(D(e.prototype),"checkLVal",this).call(this,t,i,a,r,n)}}},{key:"checkDuplicatedProto",value:function(t,e){if(!("SpreadElement"===t.type||t.computed||t.method||t.shorthand)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&"init"===t.kind&&(e.used&&!e.start&&(e.start=s.start),e.used=!0)}}},{key:"isStrictBody",value:function(t){if("BlockStatement"===t.body.type&&t.body.body.length>0)for(var e=0,s=t.body.body;e2&&void 0!==arguments[2]&&arguments[2];k(D(e.prototype),"parseFunctionBody",this).call(this,t,s,i),t.expression="BlockStatement"!==t.body.type}},{key:"parseMethod",value:function(t,s,i,a,r,n){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],h=this.startNode();return h.kind=t.kind,(h=k(D(e.prototype),"parseMethod",this).call(this,h,s,i,a,r,n,o)).type="FunctionExpression",delete h.kind,t.value=h,n="ClassMethod"===n?"MethodDefinition":n,this.finishNode(t,n)}},{key:"parseObjectMethod",value:function(t,s,i,a,r){var n=k(D(e.prototype),"parseObjectMethod",this).call(this,t,s,i,a,r);return n&&(n.type="Property","method"===n.kind&&(n.kind="init"),n.shorthand=!1),n}},{key:"parseObjectProperty",value:function(t,s,i,a,r){var n=k(D(e.prototype),"parseObjectProperty",this).call(this,t,s,i,a,r);return n&&(n.kind="init",n.type="Property"),n}},{key:"toAssignable",value:function(t,s,i){return f(t)?(this.toAssignable(t.value,s,i),t):k(D(e.prototype),"toAssignable",this).call(this,t,s,i)}},{key:"toAssignableObjectExpressionProp",value:function(t,s,i){if("get"===t.kind||"set"===t.kind)throw this.raise(t.key.start,"Object pattern can't contain getter or setter");if(t.method)throw this.raise(t.key.start,"Object pattern can't contain methods");k(D(e.prototype),"toAssignableObjectExpressionProp",this).call(this,t,s,i)}}]),e}(t)},jsx:function(t){return function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"jsxReadToken",value:function(){for(var t="",s=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated JSX contents");var i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:return this.state.pos===this.state.start?60===i&&this.state.exprAllowed?(++this.state.pos,this.finishToken(o.jsxTagStart)):k(D(e.prototype),"getTokenFromCode",this).call(this,i):(t+=this.input.slice(s,this.state.pos),this.finishToken(o.jsxText,t));case 38:t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos;break;default:C(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}},{key:"jsxReadNewLine",value:function(t){var e,s=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===s&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,e}},{key:"jsxReadString",value:function(t){for(var e="",s=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;38===i?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos):C(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}return e+=this.input.slice(s,this.state.pos++),this.finishToken(o.string,e)}},{key:"jsxReadEntity",value:function(){for(var t,e="",s=0,i=this.input[this.state.pos],a=++this.state.pos;this.state.pos"):!et(a)&&et(r)?this.raise(r.start,"Expected corresponding JSX closing tag for <"+st(a.name)+">"):et(a)||et(r)||st(r.name)!==st(a.name)&&this.raise(r.start,"Expected corresponding JSX closing tag for <"+st(a.name)+">")}if(et(a)?(s.openingFragment=a,s.closingFragment=r):(s.openingElement=a,s.closingElement=r),s.children=i,this.isRelational("<"))throw this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?");return et(a)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}},{key:"jsxParseElement",value:function(){var t=this.state.start,e=this.state.startLoc;return this.next(),this.jsxParseElementAt(t,e)}},{key:"parseExprAtom",value:function(t){return this.match(o.jsxText)?this.parseLiteral(this.state.value,"JSXText"):this.match(o.jsxTagStart)?this.jsxParseElement():this.isRelational("<")&&33!==this.input.charCodeAt(this.state.pos)?(this.finishToken(o.jsxTagStart),this.jsxParseElement()):k(D(e.prototype),"parseExprAtom",this).call(this,t)}},{key:"getTokenFromCode",value:function(t){if(this.state.inPropertyName)return k(D(e.prototype),"getTokenFromCode",this).call(this,t);var s=this.curContext();if(s===F.j_expr)return this.jsxReadToken();if(s===F.j_oTag||s===F.j_cTag){if(K(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(o.jsxTagEnd);if((34===t||39===t)&&s===F.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed&&33!==this.input.charCodeAt(this.state.pos+1)?(++this.state.pos,this.finishToken(o.jsxTagStart)):k(D(e.prototype),"getTokenFromCode",this).call(this,t)}},{key:"updateContext",value:function(t){if(this.match(o.braceL)){var s=this.curContext();s===F.j_oTag?this.state.context.push(F.braceExpression):s===F.j_expr?this.state.context.push(F.templateQuasi):k(D(e.prototype),"updateContext",this).call(this,t),this.state.exprAllowed=!0}else{if(!this.match(o.slash)||t!==o.jsxTagStart)return k(D(e.prototype),"updateContext",this).call(this,t);this.state.context.length-=2,this.state.context.push(F.j_cTag),this.state.exprAllowed=!1}}}]),e}(t)},flow:function(t){return function(t){function e(t,s){var i;return d(this,e),(i=g(this,D(e).call(this,t,s))).flowPragma=void 0,i}return y(e,t),m(e,[{key:"shouldParseTypes",value:function(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}},{key:"shouldParseEnums",value:function(){return!!this.getPluginOption("flow","enums")}},{key:"finishToken",value:function(t,s){return t!==o.string&&t!==o.semi&&t!==o.interpreterDirective&&void 0===this.flowPragma&&(this.flowPragma=null),k(D(e.prototype),"finishToken",this).call(this,t,s)}},{key:"addComment",value:function(t){if(void 0===this.flowPragma){var s=$.exec(t.value);if(s)if("flow"===s[1])this.flowPragma="flow";else{if("noflow"!==s[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}return k(D(e.prototype),"addComment",this).call(this,t)}},{key:"flowParseTypeInitialiser",value:function(t){var e=this.state.inType;this.state.inType=!0,this.expect(t||o.colon);var s=this.flowParseType();return this.state.inType=e,s}},{key:"flowParsePredicate",value:function(){var t=this.startNode(),e=this.state.startLoc,s=this.state.start;this.expect(o.modulo);var i=this.state.startLoc;return this.expectContextual("checks"),e.line===i.line&&e.column===i.column-1||this.raise(s,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(o.parenL)?(t.value=this.parseExpression(),this.expect(o.parenR),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}},{key:"flowParseTypeAndPredicateInitialiser",value:function(){var t=this.state.inType;this.state.inType=!0,this.expect(o.colon);var e=null,s=null;return this.match(o.modulo)?(this.state.inType=t,s=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(o.modulo)&&(s=this.flowParsePredicate())),[e,s]}},{key:"flowParseDeclareClass",value:function(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}},{key:"flowParseDeclareFunction",value:function(t){this.next();var e=t.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.isRelational("<")?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(o.parenL);var a=this.flowParseFunctionTypeParams();s.params=a.params,s.rest=a.rest,this.expect(o.parenR);var r=P(this.flowParseTypeAndPredicateInitialiser(),2);return s.returnType=r[0],t.predicate=r[1],i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.finishNode(t,"DeclareFunction")}},{key:"flowParseDeclare",value:function(t,e){if(this.match(o._class))return this.flowParseDeclareClass(t);if(this.match(o._function))return this.flowParseDeclareFunction(t);if(this.match(o._var))return this.flowParseDeclareVariable(t);if(this.eatContextual("module"))return this.match(o.dot)?this.flowParseDeclareModuleExports(t):(e&&this.raise(this.state.lastTokStart,"`declare module` cannot be used inside another `declare module`"),this.flowParseDeclareModule(t));if(this.isContextual("type"))return this.flowParseDeclareTypeAlias(t);if(this.isContextual("opaque"))return this.flowParseDeclareOpaqueType(t);if(this.isContextual("interface"))return this.flowParseDeclareInterface(t);if(this.match(o._export))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}},{key:"flowParseDeclareVariable",value:function(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(t.id.name,5,t.id.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}},{key:"flowParseDeclareModule",value:function(t){var e=this;this.scope.enter(0),this.match(o.string)?t.id=this.parseExprAtom():t.id=this.parseIdentifier();var s=t.body=this.startNode(),i=s.body=[];for(this.expect(o.braceL);!this.match(o.braceR);){var a=this.startNode();this.match(o._import)?(this.next(),this.isContextual("type")||this.match(o._typeof)||this.raise(this.state.lastTokStart,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(a)):(this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),a=this.flowParseDeclare(a,!0)),i.push(a)}this.scope.exit(),this.expect(o.braceR),this.finishNode(s,"BlockStatement");var r=null,n=!1,h="Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module";return i.forEach((function(t){!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(n&&e.raise(t.start,"Duplicate `declare module.exports` statement"),"ES"===r&&e.raise(t.start,h),r="CommonJS",n=!0):("CommonJS"===r&&e.raise(t.start,h),r="ES")})),t.kind=r||"CommonJS",this.finishNode(t,"DeclareModule")}},{key:"flowParseDeclareExportDeclaration",value:function(t,e){if(this.expect(o._export),this.eat(o._default))return this.match(o._function)||this.match(o._class)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(o._const)||this.isLet()||(this.isContextual("type")||this.isContextual("interface"))&&!e){var s=this.state.value,i=Q[s];this.unexpected(this.state.start,"`declare export ".concat(s,"` is not supported. Use `").concat(i,"` instead"))}if(this.match(o._var)||this.match(o._function)||this.match(o._class)||this.isContextual("opaque"))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(o.star)||this.match(o.braceL)||this.isContextual("interface")||this.isContextual("type")||this.isContextual("opaque"))return"ExportNamedDeclaration"===(t=this.parseExport(t)).type&&(t.type="ExportDeclaration",t.default=!1,delete t.exportKind),t.type="Declare"+t.type,t;throw this.unexpected()}},{key:"flowParseDeclareModuleExports",value:function(t){return this.next(),this.expectContextual("exports"),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}},{key:"flowParseDeclareTypeAlias",value:function(t){return this.next(),this.flowParseTypeAlias(t),t.type="DeclareTypeAlias",t}},{key:"flowParseDeclareOpaqueType",value:function(t){return this.next(),this.flowParseOpaqueType(t,!0),t.type="DeclareOpaqueType",t}},{key:"flowParseDeclareInterface",value:function(t){return this.next(),this.flowParseInterfaceish(t),this.finishNode(t,"DeclareInterface")}},{key:"flowParseInterfaceish",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.id=this.flowParseRestrictedIdentifier(!e),this.scope.declareName(t.id.name,e?17:9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],t.implements=[],t.mixins=[],this.eat(o._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(o.comma));if(this.isContextual("mixins")){this.next();do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(o.comma))}if(this.isContextual("implements")){this.next();do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(o.comma))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}},{key:"flowParseInterfaceExtends",value:function(){var t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}},{key:"flowParseInterface",value:function(t){return this.flowParseInterfaceish(t),this.finishNode(t,"InterfaceDeclaration")}},{key:"checkNotUnderscore",value:function(t){"_"===t&&this.raise(this.state.start,"`_` is only allowed as a type argument to call or new")}},{key:"checkReservedType",value:function(t,e){J.indexOf(t)>-1&&this.raise(e,"Cannot overwrite reserved type ".concat(t))}},{key:"flowParseRestrictedIdentifier",value:function(t){return this.checkReservedType(this.state.value,this.state.start),this.parseIdentifier(t)}},{key:"flowParseTypeAlias",value:function(t){return t.id=this.flowParseRestrictedIdentifier(),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(o.eq),this.semicolon(),this.finishNode(t,"TypeAlias")}},{key:"flowParseOpaqueType",value:function(t,e){return this.expectContextual("type"),t.id=this.flowParseRestrictedIdentifier(!0),this.scope.declareName(t.id.name,9,t.id.start),this.isRelational("<")?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(o.colon)&&(t.supertype=this.flowParseTypeInitialiser(o.colon)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(o.eq)),this.semicolon(),this.finishNode(t,"OpaqueType")}},{key:"flowParseTypeParameter",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.state.start,s=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return s.name=a.name,s.variance=i,s.bound=a.typeAnnotation,this.match(o.eq)?(this.eat(o.eq),s.default=this.flowParseType()):t&&this.raise(e,"Type parameter declaration needs a default, since a preceding type parameter declaration has a default."),this.finishNode(s,"TypeParameter")}},{key:"flowParseTypeParameterDeclaration",value:function(){var t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.isRelational("<")||this.match(o.jsxTagStart)?this.next():this.unexpected();var s=!1;do{var i=this.flowParseTypeParameter(s);e.params.push(i),i.default&&(s=!0),this.isRelational(">")||this.expect(o.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}},{key:"flowParseTypeParameterInstantiation",value:function(){var t=this.startNode(),e=this.state.inType;t.params=[],this.state.inType=!0,this.expectRelational("<");var s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.isRelational(">");)t.params.push(this.flowParseType()),this.isRelational(">")||this.expect(o.comma);return this.state.noAnonFunctionType=s,this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}},{key:"flowParseTypeParameterInstantiationCallOrNew",value:function(){var t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.isRelational(">")||this.expect(o.comma);return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}},{key:"flowParseInterfaceType",value:function(){var t=this.startNode();if(this.expectContextual("interface"),t.extends=[],this.eat(o._extends))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(o.comma));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}},{key:"flowParseObjectPropertyKey",value:function(){return this.match(o.num)||this.match(o.string)?this.parseExprAtom():this.parseIdentifier(!0)}},{key:"flowParseObjectTypeIndexer",value:function(t,e,s){return t.static=e,this.lookahead().type===o.colon?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(o.bracketR),t.value=this.flowParseTypeInitialiser(),t.variance=s,this.finishNode(t,"ObjectTypeIndexer")}},{key:"flowParseObjectTypeInternalSlot",value:function(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(o.bracketR),this.expect(o.bracketR),this.isRelational("<")||this.match(o.parenL)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start))):(t.method=!1,this.eat(o.question)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}},{key:"flowParseObjectTypeMethodish",value:function(t){for(t.params=[],t.rest=null,t.typeParameters=null,this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(o.parenL);!this.match(o.parenR)&&!this.match(o.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(o.parenR)||this.expect(o.comma);return this.eat(o.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),this.expect(o.parenR),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}},{key:"flowParseObjectTypeCallProperty",value:function(t,e){var s=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(s),this.finishNode(t,"ObjectTypeCallProperty")}},{key:"flowParseObjectType",value:function(t){var e=t.allowStatic,s=t.allowExact,i=t.allowSpread,a=t.allowProto,r=t.allowInexact,n=this.state.inType;this.state.inType=!0;var h,u,l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];var c=!1;for(s&&this.match(o.braceBarL)?(this.expect(o.braceBarL),h=o.braceBarR,u=!0):(this.expect(o.braceL),h=o.braceR,u=!1),l.exact=u;!this.match(h);){var p=!1,d=null,f=null,m=this.startNode();if(a&&this.isContextual("proto")){var y=this.lookahead();y.type!==o.colon&&y.type!==o.question&&(this.next(),d=this.state.start,e=!1)}if(e&&this.isContextual("static")){var D=this.lookahead();D.type!==o.colon&&D.type!==o.question&&(this.next(),p=!0)}var v=this.flowParseVariance();if(this.eat(o.bracketL))null!=d&&this.unexpected(d),this.eat(o.bracketL)?(v&&this.unexpected(v.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(m,p))):l.indexers.push(this.flowParseObjectTypeIndexer(m,p,v));else if(this.match(o.parenL)||this.isRelational("<"))null!=d&&this.unexpected(d),v&&this.unexpected(v.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(m,p));else{var x,g="init";if(this.isContextual("get")||this.isContextual("set")){var k=this.lookahead();k.type!==o.name&&k.type!==o.string&&k.type!==o.num||(g=this.state.value,this.next())}var P=this.flowParseObjectTypeProperty(m,p,d,v,g,i,null!==(x=r)&&void 0!==x?x:!u);null===P?(c=!0,f=this.state.lastTokStart):l.properties.push(P)}this.flowObjectTypeSemicolon(),!f||this.match(o.braceR)||this.match(o.braceBarR)||this.raise(f,"Explicit inexact syntax must appear at the end of an inexact object")}this.expect(h),i&&(l.inexact=c);var b=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=n,b}},{key:"flowParseObjectTypeProperty",value:function(t,e,s,i,a,r,n){if(this.eat(o.ellipsis))return this.match(o.comma)||this.match(o.semi)||this.match(o.braceR)||this.match(o.braceBarR)?(r?n||this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear inside an explicit exact object type"):this.raise(this.state.lastTokStart,"Explicit inexact syntax cannot appear in class or interface definitions"),i&&this.raise(i.start,"Explicit inexact syntax cannot have variance"),null):(r||this.raise(this.state.lastTokStart,"Spread operator cannot appear in class or interface definitions"),null!=s&&this.unexpected(s),i&&this.raise(i.start,"Spread properties cannot have variance"),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=s,t.kind=a;var h=!1;return this.isRelational("<")||this.match(o.parenL)?(t.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.start,t.loc.start)),"get"!==a&&"set"!==a||this.flowCheckGetterSetterParams(t)):("init"!==a&&this.unexpected(),t.method=!1,this.eat(o.question)&&(h=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=h,this.finishNode(t,"ObjectTypeProperty")}},{key:"flowCheckGetterSetterParams",value:function(t){var e="get"===t.kind?0:1,s=t.start;t.value.params.length+(t.value.rest?1:0)!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&t.value.rest&&this.raise(s,"setter function argument must not be a rest parameter")}},{key:"flowObjectTypeSemicolon",value:function(){this.eat(o.semi)||this.eat(o.comma)||this.match(o.braceR)||this.match(o.braceBarR)||this.unexpected()}},{key:"flowParseQualifiedTypeIdentifier",value:function(t,e,s){t=t||this.state.start,e=e||this.state.startLoc;for(var i=s||this.parseIdentifier();this.eat(o.dot);){var a=this.startNodeAt(t,e);a.qualification=i,a.id=this.parseIdentifier(),i=this.finishNode(a,"QualifiedTypeIdentifier")}return i}},{key:"flowParseGenericType",value:function(t,e,s){var i=this.startNodeAt(t,e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(t,e,s),this.isRelational("<")&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}},{key:"flowParseTypeofType",value:function(){var t=this.startNode();return this.expect(o._typeof),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}},{key:"flowParseTupleType",value:function(){var t=this.startNode();for(t.types=[],this.expect(o.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],e=null;!this.match(o.parenR)&&!this.match(o.ellipsis);)t.push(this.flowParseFunctionTypeParam()),this.match(o.parenR)||this.expect(o.comma);return this.eat(o.ellipsis)&&(e=this.flowParseFunctionTypeParam()),{params:t,rest:e}}},{key:"flowIdentToTypeAnnotation",value:function(t,e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(t,e,i)}}},{key:"flowParsePrimaryType",value:function(){var t,s,i=this.state.start,a=this.state.startLoc,r=this.startNode(),n=!1,h=this.state.noAnonFunctionType;switch(this.state.type){case o.name:return this.isContextual("interface")?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(i,a,r,this.parseIdentifier());case o.braceL:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case o.braceBarL:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case o.bracketL:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=h,s;case o.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(o.parenL),t=this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(o.parenR),this.expect(o.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case o.parenL:if(this.next(),!this.match(o.parenR)&&!this.match(o.ellipsis))if(this.match(o.name)){var u=this.lookahead().type;n=u!==o.question&&u!==o.colon}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=h,this.state.noAnonFunctionType||!(this.match(o.comma)||this.match(o.parenR)&&this.lookahead().type===o.arrow))return this.expect(o.parenR),s;this.eat(o.comma)}return t=s?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):this.flowParseFunctionTypeParams(),r.params=t.params,r.rest=t.rest,this.expect(o.parenR),this.expect(o.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case o.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case o._true:case o._false:return r.value=this.match(o._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case o.plusMin:if("-"===this.state.value){if(this.next(),this.match(o.num))return this.parseLiteral(-this.state.value,"NumberLiteralTypeAnnotation",r.start,r.loc.start);if(this.match(o.bigint))return this.parseLiteral(-this.state.value,"BigIntLiteralTypeAnnotation",r.start,r.loc.start);throw this.raise(this.state.start,'Unexpected token, expected "number" or "bigint"')}this.unexpected();case o.num:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case o.bigint:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case o._void:return this.next(),this.finishNode(r,"VoidTypeAnnotation");case o._null:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case o._this:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case o.star:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType();if(this.state.type.keyword){var l=this.state.type.label;return this.next(),k(D(e.prototype),"createIdentifier",this).call(this,r,l)}}throw this.unexpected()}},{key:"flowParsePostfixType",value:function(){for(var t=this.state.start,e=this.state.startLoc,s=this.flowParsePrimaryType();this.match(o.bracketL)&&!this.canInsertSemicolon();){var i=this.startNodeAt(t,e);i.elementType=s,this.expect(o.bracketL),this.expect(o.bracketR),s=this.finishNode(i,"ArrayTypeAnnotation")}return s}},{key:"flowParsePrefixType",value:function(){var t=this.startNode();return this.eat(o.question)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}},{key:"flowParseAnonFunctionWithoutParens",value:function(){var t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(o.arrow)){var e=this.startNodeAt(t.start,t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}},{key:"flowParseIntersectionType",value:function(){var t=this.startNode();this.eat(o.bitwiseAND);var e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(o.bitwiseAND);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}},{key:"flowParseUnionType",value:function(){var t=this.startNode();this.eat(o.bitwiseOR);var e=this.flowParseIntersectionType();for(t.types=[e];this.eat(o.bitwiseOR);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}},{key:"flowParseType",value:function(){var t=this.state.inType;this.state.inType=!0;var e=this.flowParseUnionType();return this.state.inType=t,this.state.exprAllowed=this.state.exprAllowed||this.state.noAnonFunctionType,e}},{key:"flowParseTypeOrImplicitInstantiation",value:function(){if(this.state.type===o.name&&"_"===this.state.value){var t=this.state.start,e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(t,e,s)}return this.flowParseType()}},{key:"flowParseTypeAnnotation",value:function(){var t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}},{key:"flowParseTypeAnnotatableIdentifier",value:function(t){var e=t?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(o.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e)),e}},{key:"typeCastToParameter",value:function(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.end,t.typeAnnotation.loc.end),t.expression}},{key:"flowParseVariance",value:function(){var t=null;return this.match(o.plusMin)&&(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")),t}},{key:"parseFunctionBody",value:function(t,s){var i=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s?this.forwardNoArrowParamsConversionAt(t,(function(){return k(D(e.prototype),"parseFunctionBody",i).call(i,t,!0,a)})):k(D(e.prototype),"parseFunctionBody",this).call(this,t,!1,a)}},{key:"parseFunctionBodyAndFinish",value:function(t,s){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.match(o.colon)){var a=this.startNode(),r=this.flowParseTypeAndPredicateInitialiser(),n=P(r,2);a.typeAnnotation=n[0],t.predicate=n[1],t.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}k(D(e.prototype),"parseFunctionBodyAndFinish",this).call(this,t,s,i)}},{key:"parseStatement",value:function(t,s){if(this.state.strict&&this.match(o.name)&&"interface"===this.state.value){var i=this.startNode();return this.next(),this.flowParseInterface(i)}if(this.shouldParseEnums()&&this.isContextual("enum")){var a=this.startNode();return this.next(),this.flowParseEnumDeclaration(a)}var r=k(D(e.prototype),"parseStatement",this).call(this,t,s);return void 0!==this.flowPragma||this.isValidDirective(r)||(this.flowPragma=null),r}},{key:"parseExpressionStatement",value:function(t,s){if("Identifier"===s.type)if("declare"===s.name){if(this.match(o._class)||this.match(o.name)||this.match(o._function)||this.match(o._var)||this.match(o._export))return this.flowParseDeclare(t)}else if(this.match(o.name)){if("interface"===s.name)return this.flowParseInterface(t);if("type"===s.name)return this.flowParseTypeAlias(t);if("opaque"===s.name)return this.flowParseOpaqueType(t,!1)}return k(D(e.prototype),"parseExpressionStatement",this).call(this,t,s)}},{key:"shouldParseExportDeclaration",value:function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||this.shouldParseEnums()&&this.isContextual("enum")||k(D(e.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"isExportDefaultSpecifier",value:function(){return(!this.match(o.name)||!("type"===this.state.value||"interface"===this.state.value||"opaque"===this.state.value||this.shouldParseEnums()&&"enum"===this.state.value))&&k(D(e.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseExportDefaultExpression",value:function(){if(this.shouldParseEnums()&&this.isContextual("enum")){var t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return k(D(e.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseConditional",value:function(t,s,i,a,r){var n=this;if(!this.match(o.question))return t;if(r){var h=this.tryParse((function(){return k(D(e.prototype),"parseConditional",n).call(n,t,s,i,a)}));return h.node?(h.error&&(this.state=h.failState),h.node):(r.start=h.error.pos||this.state.start,t)}this.expect(o.question);var u=this.state.clone(),l=this.state.noArrowAt,c=this.startNodeAt(i,a),p=this.tryParseConditionalConsequent(),d=p.consequent,f=p.failed,m=P(this.getArrowLikeExpressions(d),2),y=m[0],v=m[1];if(f||v.length>0){var x=b(l);if(v.length>0){this.state=u,this.state.noArrowAt=x;for(var g=0;g1&&this.raise(u.start,"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate."),f&&1===y.length){this.state=u,this.state.noArrowAt=x.concat(y[0].start);var A=this.tryParseConditionalConsequent();d=A.consequent,f=A.failed}}return this.getArrowLikeExpressions(d,!0),this.state.noArrowAt=l,this.expect(o.colon),c.test=t,c.consequent=d,c.alternate=this.forwardNoArrowParamsConversionAt(c,(function(){return n.parseMaybeAssign(s,void 0,void 0,void 0)})),this.finishNode(c,"ConditionalExpression")}},{key:"tryParseConditionalConsequent",value:function(){this.state.noArrowParamsConversionAt.push(this.state.start);var t=this.parseMaybeAssign(),e=!this.match(o.colon);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}},{key:"getArrowLikeExpressions",value:function(t,e){for(var s=this,i=[t],a=[];0!==i.length;){var r=i.pop();"ArrowFunctionExpression"===r.type?(r.typeParameters||!r.returnType?this.finishArrowValidation(r):a.push(r),i.push(r.body)):"ConditionalExpression"===r.type&&(i.push(r.consequent),i.push(r.alternate))}return e?(a.forEach((function(t){return s.finishArrowValidation(t)})),[a,[]]):function(t,e){for(var s=[],i=[],a=0;a1)&&e||this.raise(i.typeAnnotation.start,"The type cast expression is expected to be wrapped with parenthesis")}return t}},{key:"checkLVal",value:function(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;if("TypeCastExpression"!==t.type)return k(D(e.prototype),"checkLVal",this).call(this,t,s,i,a)}},{key:"parseClassProperty",value:function(t){return this.match(o.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),k(D(e.prototype),"parseClassProperty",this).call(this,t)}},{key:"parseClassPrivateProperty",value:function(t){return this.match(o.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),k(D(e.prototype),"parseClassPrivateProperty",this).call(this,t)}},{key:"isClassMethod",value:function(){return this.isRelational("<")||k(D(e.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(o.colon)||k(D(e.prototype),"isClassProperty",this).call(this)}},{key:"isNonstaticConstructor",value:function(t){return!this.match(o.colon)&&k(D(e.prototype),"isNonstaticConstructor",this).call(this,t)}},{key:"pushClassMethod",value:function(t,s,i,a,r,n){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),k(D(e.prototype),"pushClassMethod",this).call(this,t,s,i,a,r,n)}},{key:"pushClassPrivateMethod",value:function(t,s,i,a){s.variance&&this.unexpected(s.variance.start),delete s.variance,this.isRelational("<")&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),k(D(e.prototype),"pushClassPrivateMethod",this).call(this,t,s,i,a)}},{key:"parseClassSuper",value:function(t){if(k(D(e.prototype),"parseClassSuper",this).call(this,t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var s=t.implements=[];do{var i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(o.comma))}}},{key:"parsePropertyName",value:function(t){var s=this.flowParseVariance(),i=k(D(e.prototype),"parsePropertyName",this).call(this,t);return t.variance=s,i}},{key:"parseObjPropValue",value:function(t,s,i,a,r,n,h,u){var l;t.variance&&this.unexpected(t.variance.start),delete t.variance,this.isRelational("<")&&(l=this.flowParseTypeParameterDeclaration(),this.match(o.parenL)||this.unexpected()),k(D(e.prototype),"parseObjPropValue",this).call(this,t,s,i,a,r,n,h,u),l&&((t.value||t).typeParameters=l)}},{key:"parseAssignableListItemTypes",value:function(t){return this.eat(o.question)&&("Identifier"!==t.type&&this.raise(t.start,"A binding pattern parameter cannot be optional in an implementation signature."),t.optional=!0),this.match(o.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.resetEndLocation(t),t}},{key:"parseMaybeDefault",value:function(t,s,i){var a=k(D(e.prototype),"parseMaybeDefault",this).call(this,t,s,i);return"AssignmentPattern"===a.type&&a.typeAnnotation&&a.right.starte.length){t.members=s;for(var r=0;r=p){r.members=n.booleanMembers,t.body=this.finishNode(r,"EnumBooleanBody");for(var d=0,f=n.defaultedMembers;d=p){r.members=n.numberMembers,t.body=this.finishNode(r,"EnumNumberBody");for(var y=0,D=n.defaultedMembers;y")}throw new Error("Unreachable")}},{key:"tsParseList",value:function(t,e){for(var s=[];!this.tsIsListTerminator(t);)s.push(e());return s}},{key:"tsParseDelimitedList",value:function(t,e){return ot(this.tsParseDelimitedListWorker(t,e,!0))}},{key:"tsParseDelimitedListWorker",value:function(t,e,s){for(var i=[];!this.tsIsListTerminator(t);){var a=e();if(null==a)return;if(i.push(a),!this.eat(o.comma)){if(this.tsIsListTerminator(t))break;return void(s&&this.expect(o.comma))}}return i}},{key:"tsParseBracketedList",value:function(t,e,s,i){i||(s?this.expect(o.bracketL):this.expectRelational("<"));var a=this.tsParseDelimitedList(t,e);return s?this.expect(o.bracketR):this.expectRelational(">"),a}},{key:"tsParseImportType",value:function(){var t=this.startNode();return this.expect(o._import),this.expect(o.parenL),this.match(o.string)||this.raise(this.state.start,"Argument in a type import must be a string literal"),t.argument=this.parseExprAtom(),this.expect(o.parenR),this.eat(o.dot)&&(t.qualifier=this.tsParseEntityName(!0)),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}},{key:"tsParseEntityName",value:function(t){for(var e=this.parseIdentifier();this.eat(o.dot);){var s=this.startNodeAtNode(e);s.left=e,s.right=this.parseIdentifier(t),e=this.finishNode(s,"TSQualifiedName")}return e}},{key:"tsParseTypeReference",value:function(){var t=this.startNode();return t.typeName=this.tsParseEntityName(!1),!this.hasPrecedingLineBreak()&&this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}},{key:"tsParseThisTypePredicate",value:function(t){this.next();var e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),this.finishNode(e,"TSTypePredicate")}},{key:"tsParseThisTypeNode",value:function(){var t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}},{key:"tsParseTypeQuery",value:function(){var t=this.startNode();return this.expect(o._typeof),this.match(o._import)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(!0),this.finishNode(t,"TSTypeQuery")}},{key:"tsParseTypeParameter",value:function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsEatThenParseType(o._extends),t.default=this.tsEatThenParseType(o.eq),this.finishNode(t,"TSTypeParameter")}},{key:"tsTryParseTypeParameters",value:function(){if(this.isRelational("<"))return this.tsParseTypeParameters()}},{key:"tsParseTypeParameters",value:function(){var t=this.startNode();return this.isRelational("<")||this.match(o.jsxTagStart)?this.next():this.unexpected(),t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this),!1,!0),this.finishNode(t,"TSTypeParameterDeclaration")}},{key:"tsTryNextParseConstantContext",value:function(){return this.lookahead().type===o._const?(this.next(),this.tsParseTypeReference()):null}},{key:"tsFillSignature",value:function(t,e){var s=t===o.arrow;e.typeParameters=this.tsTryParseTypeParameters(),this.expect(o.parenL),e.parameters=this.tsParseBindingListForSignature(),s?e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}},{key:"tsParseBindingListForSignature",value:function(){var t=this;return this.parseBindingList(o.parenR,41).map((function(e){return"Identifier"!==e.type&&"RestElement"!==e.type&&"ObjectPattern"!==e.type&&"ArrayPattern"!==e.type&&t.raise(e.start,"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern,"+"instead got ".concat(e.type)),e}))}},{key:"tsParseTypeMemberSemicolon",value:function(){this.eat(o.comma)||this.semicolon()}},{key:"tsParseSignatureMember",value:function(t,e){return this.tsFillSignature(o.colon,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}},{key:"tsIsUnambiguouslyIndexSignature",value:function(){return this.next(),this.eat(o.name)&&this.match(o.colon)}},{key:"tsTryParseIndexSignature",value:function(t){if(this.match(o.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))){this.expect(o.bracketL);var e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(o.bracketR),t.parameters=[e];var s=this.tsTryParseTypeAnnotation();return s&&(t.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}}},{key:"tsParsePropertyOrMethodSignature",value:function(t,e){this.eat(o.question)&&(t.optional=!0);var s=t;if(e||!this.match(o.parenL)&&!this.isRelational("<")){var i=s;e&&(i.readonly=!0);var a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}var r=s;return this.tsFillSignature(o.colon,r),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSMethodSignature")}},{key:"tsParseTypeMember",value:function(){var t=this.startNode();if(this.match(o.parenL)||this.isRelational("<"))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(o._new)){var e=this.startNode();return this.next(),this.match(o.parenL)||this.isRelational("<")?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}var s=!!this.tsParseModifier(["readonly"]),i=this.tsTryParseIndexSignature(t);return i?(s&&(t.readonly=!0),i):(this.parsePropertyName(t),this.tsParsePropertyOrMethodSignature(t,s))}},{key:"tsParseTypeLiteral",value:function(){var t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}},{key:"tsParseObjectTypeMembers",value:function(){this.expect(o.braceL);var t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(o.braceR),t}},{key:"tsIsStartOfMappedType",value:function(){return this.next(),this.eat(o.plusMin)?this.isContextual("readonly"):(this.isContextual("readonly")&&this.next(),!!this.match(o.bracketL)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(o._in))))}},{key:"tsParseMappedTypeParameter",value:function(){var t=this.startNode();return t.name=this.parseIdentifierName(t.start),t.constraint=this.tsExpectThenParseType(o._in),this.finishNode(t,"TSTypeParameter")}},{key:"tsParseMappedType",value:function(){var t=this.startNode();return this.expect(o.braceL),this.match(o.plusMin)?(t.readonly=this.state.value,this.next(),this.expectContextual("readonly")):this.eatContextual("readonly")&&(t.readonly=!0),this.expect(o.bracketL),t.typeParameter=this.tsParseMappedTypeParameter(),this.expect(o.bracketR),this.match(o.plusMin)?(t.optional=this.state.value,this.next(),this.expect(o.question)):this.eat(o.question)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(o.braceR),this.finishNode(t,"TSMappedType")}},{key:"tsParseTupleType",value:function(){var t=this,e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);var s=!1;return e.elementTypes.forEach((function(e){"TSOptionalType"===e.type?s=!0:s&&"TSRestType"!==e.type&&t.raise(e.start,"A required element cannot follow an optional element.")})),this.finishNode(e,"TSTupleType")}},{key:"tsParseTupleElementType",value:function(){if(this.match(o.ellipsis)){var t=this.startNode();return this.next(),t.typeAnnotation=this.tsParseType(),this.checkCommaAfterRest(93),this.finishNode(t,"TSRestType")}var e=this.tsParseType();if(this.eat(o.question)){var s=this.startNodeAtNode(e);return s.typeAnnotation=e,this.finishNode(s,"TSOptionalType")}return e}},{key:"tsParseParenthesizedType",value:function(){var t=this.startNode();return this.expect(o.parenL),t.typeAnnotation=this.tsParseType(),this.expect(o.parenR),this.finishNode(t,"TSParenthesizedType")}},{key:"tsParseFunctionOrConstructorType",value:function(t){var e=this.startNode();return"TSConstructorType"===t&&this.expect(o._new),this.tsFillSignature(o.arrow,e),this.finishNode(e,t)}},{key:"tsParseLiteralTypeNode",value:function(){var t=this,e=this.startNode();return e.literal=function(){switch(t.state.type){case o.num:case o.string:case o._true:case o._false:return t.parseExprAtom();default:throw t.unexpected()}}(),this.finishNode(e,"TSLiteralType")}},{key:"tsParseTemplateLiteralType",value:function(){var t=this.startNode(),e=this.parseTemplate(!1);return e.expressions.length>0&&this.raise(e.expressions[0].start,"Template literal types cannot have any substitution"),t.literal=e,this.finishNode(t,"TSLiteralType")}},{key:"tsParseNonArrayType",value:function(){switch(this.state.type){case o.name:case o._void:case o._null:var t=this.match(o._void)?"TSVoidKeyword":this.match(o._null)?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){var e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference();case o.string:case o.num:case o._true:case o._false:return this.tsParseLiteralTypeNode();case o.plusMin:if("-"===this.state.value){var s=this.startNode();if(this.lookahead().type!==o.num)throw this.unexpected();return s.literal=this.parseMaybeUnary(),this.finishNode(s,"TSLiteralType")}break;case o._this:var i=this.tsParseThisTypeNode();return this.isContextual("is")&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(i):i;case o._typeof:return this.tsParseTypeQuery();case o._import:return this.tsParseImportType();case o.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case o.bracketL:return this.tsParseTupleType();case o.parenL:return this.tsParseParenthesizedType();case o.backQuote:return this.tsParseTemplateLiteralType()}throw this.unexpected()}},{key:"tsParseArrayTypeOrHigher",value:function(){for(var t=this.tsParseNonArrayType();!this.hasPrecedingLineBreak()&&this.eat(o.bracketL);)if(this.match(o.bracketR)){var e=this.startNodeAtNode(t);e.elementType=t,this.expect(o.bracketR),t=this.finishNode(e,"TSArrayType")}else{var s=this.startNodeAtNode(t);s.objectType=t,s.indexType=this.tsParseType(),this.expect(o.bracketR),t=this.finishNode(s,"TSIndexedAccessType")}return t}},{key:"tsParseTypeOperator",value:function(t){var e=this.startNode();return this.expectContextual(t),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}},{key:"tsCheckTypeAnnotationForReadOnly",value:function(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(t.start,"'readonly' type modifier is only permitted on array and tuple literal types.")}}},{key:"tsParseInferType",value:function(){var t=this.startNode();this.expectContextual("infer");var e=this.startNode();return e.name=this.parseIdentifierName(e.start),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}},{key:"tsParseTypeOperatorOrHigher",value:function(){var t=this,e=["keyof","unique","readonly"].find((function(e){return t.isContextual(e)}));return e?this.tsParseTypeOperator(e):this.isContextual("infer")?this.tsParseInferType():this.tsParseArrayTypeOrHigher()}},{key:"tsParseUnionOrIntersectionType",value:function(t,e,s){this.eat(s);var i=e();if(this.match(s)){for(var a=[i];this.eat(s);)a.push(e());var r=this.startNodeAtNode(i);r.types=a,i=this.finishNode(r,t)}return i}},{key:"tsParseIntersectionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),o.bitwiseAND)}},{key:"tsParseUnionTypeOrHigher",value:function(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),o.bitwiseOR)}},{key:"tsIsStartOfFunctionType",value:function(){return!!this.isRelational("<")||this.match(o.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}},{key:"tsSkipParameterStart",value:function(){if(this.match(o.name)||this.match(o._this))return this.next(),!0;if(this.match(o.braceL)){var t=1;for(this.next();t>0;)this.match(o.braceL)?++t:this.match(o.braceR)&&--t,this.next();return!0}if(this.match(o.bracketL)){var e=1;for(this.next();e>0;)this.match(o.bracketL)?++e:this.match(o.bracketR)&&--e,this.next();return!0}return!1}},{key:"tsIsUnambiguouslyStartOfFunctionType",value:function(){if(this.next(),this.match(o.parenR)||this.match(o.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(o.colon)||this.match(o.comma)||this.match(o.question)||this.match(o.eq))return!0;if(this.match(o.parenR)&&(this.next(),this.match(o.arrow)))return!0}return!1}},{key:"tsParseTypeOrTypePredicateAnnotation",value:function(t){var e=this;return this.tsInType((function(){var s=e.startNode();e.expect(t);var i=e.tsTryParse(e.tsParseTypePredicateAsserts.bind(e)),a=e.tsIsIdentifier()&&e.tsTryParse(e.tsParseTypePredicatePrefix.bind(e));if(!a){if(!i)return e.tsParseTypeAnnotation(!1,s);var r=e.startNodeAtNode(s);return r.parameterName=e.parseIdentifier(),r.asserts=i,s.typeAnnotation=e.finishNode(r,"TSTypePredicate"),e.finishNode(s,"TSTypeAnnotation")}var n=e.tsParseTypeAnnotation(!1),o=e.startNodeAtNode(s);return o.parameterName=a,o.typeAnnotation=n,o.asserts=i,s.typeAnnotation=e.finishNode(o,"TSTypePredicate"),e.finishNode(s,"TSTypeAnnotation")}))}},{key:"tsTryParseTypeOrTypePredicateAnnotation",value:function(){return this.match(o.colon)?this.tsParseTypeOrTypePredicateAnnotation(o.colon):void 0}},{key:"tsTryParseTypeAnnotation",value:function(){return this.match(o.colon)?this.tsParseTypeAnnotation():void 0}},{key:"tsTryParseType",value:function(){return this.tsEatThenParseType(o.colon)}},{key:"tsParseTypePredicatePrefix",value:function(){var t=this.parseIdentifier();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),t}},{key:"tsParseTypePredicateAsserts",value:function(){return!!this.tsIsIdentifier()&&!("asserts"!==this.parseIdentifier().name||this.hasPrecedingLineBreak()||!this.tsIsIdentifier())}},{key:"tsParseTypeAnnotation",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.startNode();return this.tsInType((function(){e&&t.expect(o.colon),s.typeAnnotation=t.tsParseType()})),this.finishNode(s,"TSTypeAnnotation")}},{key:"tsParseType",value:function(){ht(this.state.inType);var t=this.tsParseNonConditionalType();if(this.hasPrecedingLineBreak()||!this.eat(o._extends))return t;var e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsParseNonConditionalType(),this.expect(o.question),e.trueType=this.tsParseType(),this.expect(o.colon),e.falseType=this.tsParseType(),this.finishNode(e,"TSConditionalType")}},{key:"tsParseNonConditionalType",value:function(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(o._new)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.tsParseUnionTypeOrHigher()}},{key:"tsParseTypeAssertion",value:function(){var t=this.startNode(),e=this.tsTryNextParseConstantContext();return t.typeAnnotation=e||this.tsNextThenParseType(),this.expectRelational(">"),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}},{key:"tsParseHeritageClause",value:function(t){var e=this.state.start,s=this.tsParseDelimitedList("HeritageClauseElement",this.tsParseExpressionWithTypeArguments.bind(this));return s.length||this.raise(e,"'".concat(t,"' list cannot be empty.")),s}},{key:"tsParseExpressionWithTypeArguments",value:function(){var t=this.startNode();return t.expression=this.tsParseEntityName(!1),this.isRelational("<")&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}},{key:"tsParseInterfaceDeclaration",value:function(t){t.id=this.parseIdentifier(),this.checkLVal(t.id,130,void 0,"typescript interface declaration"),t.typeParameters=this.tsTryParseTypeParameters(),this.eat(o._extends)&&(t.extends=this.tsParseHeritageClause("extends"));var e=this.startNode();return e.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(e,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}},{key:"tsParseTypeAliasDeclaration",value:function(t){return t.id=this.parseIdentifier(),this.checkLVal(t.id,2,void 0,"typescript type alias"),t.typeParameters=this.tsTryParseTypeParameters(),t.typeAnnotation=this.tsExpectThenParseType(o.eq),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}},{key:"tsInNoContext",value:function(t){var e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}},{key:"tsInType",value:function(t){var e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}},{key:"tsEatThenParseType",value:function(t){return this.match(t)?this.tsNextThenParseType():void 0}},{key:"tsExpectThenParseType",value:function(t){var e=this;return this.tsDoThenParseType((function(){return e.expect(t)}))}},{key:"tsNextThenParseType",value:function(){var t=this;return this.tsDoThenParseType((function(){return t.next()}))}},{key:"tsDoThenParseType",value:function(t){var e=this;return this.tsInType((function(){return t(),e.tsParseType()}))}},{key:"tsParseEnumMember",value:function(){var t=this.startNode();return t.id=this.match(o.string)?this.parseExprAtom():this.parseIdentifier(!0),this.eat(o.eq)&&(t.initializer=this.parseMaybeAssign()),this.finishNode(t,"TSEnumMember")}},{key:"tsParseEnumDeclaration",value:function(t,e){return e&&(t.const=!0),t.id=this.parseIdentifier(),this.checkLVal(t.id,e?779:267,void 0,"typescript enum declaration"),this.expect(o.braceL),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(o.braceR),this.finishNode(t,"TSEnumDeclaration")}},{key:"tsParseModuleBlock",value:function(){var t=this.startNode();return this.scope.enter(0),this.expect(o.braceL),this.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,o.braceR),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}},{key:"tsParseModuleOrNamespaceDeclaration",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.id=this.parseIdentifier(),e||this.checkLVal(t.id,1024,null,"module or namespace declaration"),this.eat(o.dot)){var s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),t.body=s}else this.scope.enter(512),t.body=this.tsParseModuleBlock(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}},{key:"tsParseAmbientExternalModuleDeclaration",value:function(t){return this.isContextual("global")?(t.global=!0,t.id=this.parseIdentifier()):this.match(o.string)?t.id=this.parseExprAtom():this.unexpected(),this.match(o.braceL)?(this.scope.enter(512),t.body=this.tsParseModuleBlock(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}},{key:"tsParseImportEqualsDeclaration",value:function(t,e){return t.isExport=e||!1,t.id=this.parseIdentifier(),this.expect(o.eq),t.moduleReference=this.tsParseModuleReference(),this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}},{key:"tsIsExternalModuleReference",value:function(){return this.isContextual("require")&&40===this.lookaheadCharCode()}},{key:"tsParseModuleReference",value:function(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}},{key:"tsParseExternalModuleReference",value:function(){var t=this.startNode();if(this.expectContextual("require"),this.expect(o.parenL),!this.match(o.string))throw this.unexpected();return t.expression=this.parseExprAtom(),this.expect(o.parenR),this.finishNode(t,"TSExternalModuleReference")}},{key:"tsLookAhead",value:function(t){var e=this.state.clone(),s=t();return this.state=e,s}},{key:"tsTryParseAndCatch",value:function(t){var e=this.tryParse((function(e){return t()||e()}));if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}},{key:"tsTryParse",value:function(t){var e=this.state.clone(),s=t();return void 0!==s&&!1!==s?s:void(this.state=e)}},{key:"tsTryParseDeclare",value:function(t){if(!this.isLineTerminator()){var e,s=this.state.type;switch(this.isContextual("let")&&(s=o._var,e="let"),s){case o._function:return this.parseFunctionStatement(t,!1,!0);case o._class:return t.declare=!0,this.parseClass(t,!0,!1);case o._const:if(this.match(o._const)&&this.isLookaheadContextual("enum"))return this.expect(o._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(t,!0);case o._var:return e=e||this.state.value,this.parseVarStatement(t,e);case o.name:var i=this.state.value;return"global"===i?this.tsParseAmbientExternalModuleDeclaration(t):this.tsParseDeclaration(t,i,!0)}}}},{key:"tsTryParseExportDeclaration",value:function(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0)}},{key:"tsParseExpressionStatement",value:function(t,e){switch(e.name){case"declare":var s=this.tsTryParseDeclare(t);if(s)return s.declare=!0,s;break;case"global":if(this.match(o.braceL)){this.scope.enter(512);var i=t;return i.global=!0,i.id=e,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(t,e.name,!1)}}},{key:"tsParseDeclaration",value:function(t,e,s){switch(e){case"abstract":if(this.tsCheckLineTerminatorAndMatch(o._class,s)){var i=t;return i.abstract=!0,s&&(this.next(),this.match(o._class)||this.unexpected(null,o._class)),this.parseClass(i,!0,!1)}break;case"enum":if(s||this.match(o.name))return s&&this.next(),this.tsParseEnumDeclaration(t,!1);break;case"interface":if(this.tsCheckLineTerminatorAndMatch(o.name,s))return s&&this.next(),this.tsParseInterfaceDeclaration(t);break;case"module":if(s&&this.next(),this.match(o.string))return this.tsParseAmbientExternalModuleDeclaration(t);if(this.tsCheckLineTerminatorAndMatch(o.name,s))return this.tsParseModuleOrNamespaceDeclaration(t);break;case"namespace":if(this.tsCheckLineTerminatorAndMatch(o.name,s))return s&&this.next(),this.tsParseModuleOrNamespaceDeclaration(t);break;case"type":if(this.tsCheckLineTerminatorAndMatch(o.name,s))return s&&this.next(),this.tsParseTypeAliasDeclaration(t)}}},{key:"tsCheckLineTerminatorAndMatch",value:function(t,e){return(e||this.match(t))&&!this.isLineTerminator()}},{key:"tsTryParseGenericAsyncArrowFunction",value:function(t,s){var i=this;if(this.isRelational("<")){var a=this.tsTryParseAndCatch((function(){var a=i.startNodeAt(t,s);return a.typeParameters=i.tsParseTypeParameters(),k(D(e.prototype),"parseFunctionParams",i).call(i,a),a.returnType=i.tsTryParseTypeOrTypePredicateAnnotation(),i.expect(o.arrow),a}));if(a)return this.parseArrowExpression(a,null,!0)}}},{key:"tsParseTypeArguments",value:function(){var t=this,e=this.startNode();return e.params=this.tsInType((function(){return t.tsInNoContext((function(){return t.expectRelational("<"),t.tsParseDelimitedList("TypeParametersOrArguments",t.tsParseType.bind(t))}))})),this.state.exprAllowed=!1,this.expectRelational(">"),this.finishNode(e,"TSTypeParameterInstantiation")}},{key:"tsIsDeclarationStart",value:function(){if(this.match(o.name))switch(this.state.value){case"abstract":case"declare":case"enum":case"interface":case"module":case"namespace":case"type":return!0}return!1}},{key:"isExportDefaultSpecifier",value:function(){return!this.tsIsDeclarationStart()&&k(D(e.prototype),"isExportDefaultSpecifier",this).call(this)}},{key:"parseAssignableListItem",value:function(t,e){var s,i=this.state.start,a=this.state.startLoc,r=!1;t&&(s=this.parseAccessModifier(),r=!!this.tsParseModifier(["readonly"]));var n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n);var o=this.parseMaybeDefault(n.start,n.loc.start,n);if(s||r){var h=this.startNodeAt(i,a);return e.length&&(h.decorators=e),s&&(h.accessibility=s),r&&(h.readonly=r),"Identifier"!==o.type&&"AssignmentPattern"!==o.type&&this.raise(h.start,"A parameter property may not be declared using a binding pattern."),h.parameter=o,this.finishNode(h,"TSParameterProperty")}return e.length&&(n.decorators=e),o}},{key:"parseFunctionBodyAndFinish",value:function(t,s){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.match(o.colon)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(o.colon));var a="FunctionDeclaration"===s?"TSDeclareFunction":"ClassMethod"===s?"TSDeclareMethod":void 0;a&&!this.match(o.braceL)&&this.isLineTerminator()?this.finishNode(t,a):k(D(e.prototype),"parseFunctionBodyAndFinish",this).call(this,t,s,i)}},{key:"registerFunctionStatementId",value:function(t){!t.body&&t.id?this.checkLVal(t.id,1024,null,"function name"):k(D(e.prototype),"registerFunctionStatementId",this).apply(this,arguments)}},{key:"parseSubscript",value:function(t,s,i,a,r){var n=this;if(!this.hasPrecedingLineBreak()&&this.match(o.bang)){this.state.exprAllowed=!1,this.next();var h=this.startNodeAt(s,i);return h.expression=t,this.finishNode(h,"TSNonNullExpression")}if(this.isRelational("<")){var u=this.tsTryParseAndCatch((function(){if(!a&&n.atPossibleAsync(t)){var e=n.tsTryParseGenericAsyncArrowFunction(s,i);if(e)return e}var h=n.startNodeAt(s,i);h.callee=t;var u=n.tsParseTypeArguments();if(u){if(!a&&n.eat(o.parenL))return h.arguments=n.parseCallExpressionArguments(o.parenR,!1),h.typeParameters=u,n.finishCallExpression(h,r.optionalChainMember);if(n.match(o.backQuote))return n.parseTaggedTemplateExpression(s,i,t,r,u)}n.unexpected()}));if(u)return u}return k(D(e.prototype),"parseSubscript",this).call(this,t,s,i,a,r)}},{key:"parseNewArguments",value:function(t){var s=this;if(this.isRelational("<")){var i=this.tsTryParseAndCatch((function(){var t=s.tsParseTypeArguments();return s.match(o.parenL)||s.unexpected(),t}));i&&(t.typeParameters=i)}k(D(e.prototype),"parseNewArguments",this).call(this,t)}},{key:"parseExprOp",value:function(t,s,i,a,r){if(ot(o._in.binop)>a&&!this.hasPrecedingLineBreak()&&this.isContextual("as")){var n=this.startNodeAt(s,i);n.expression=t;var h=this.tsTryNextParseConstantContext();return n.typeAnnotation=h||this.tsNextThenParseType(),this.finishNode(n,"TSAsExpression"),this.parseExprOp(n,s,i,a,r)}return k(D(e.prototype),"parseExprOp",this).call(this,t,s,i,a,r)}},{key:"checkReservedWord",value:function(t,e,s,i){}},{key:"checkDuplicateExports",value:function(){}},{key:"parseImport",value:function(t){return this.match(o.name)&&this.lookahead().type===o.eq?this.tsParseImportEqualsDeclaration(t):k(D(e.prototype),"parseImport",this).call(this,t)}},{key:"parseExport",value:function(t){if(this.match(o._import))return this.expect(o._import),this.tsParseImportEqualsDeclaration(t,!0);if(this.eat(o.eq)){var s=t;return s.expression=this.parseExpression(),this.semicolon(),this.finishNode(s,"TSExportAssignment")}if(this.eatContextual("as")){var i=t;return this.expectContextual("namespace"),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}return k(D(e.prototype),"parseExport",this).call(this,t)}},{key:"isAbstractClass",value:function(){return this.isContextual("abstract")&&this.lookahead().type===o._class}},{key:"parseExportDefaultExpression",value:function(){if(this.isAbstractClass()){var t=this.startNode();return this.next(),this.parseClass(t,!0,!0),t.abstract=!0,t}if("interface"===this.state.value){var s=this.tsParseDeclaration(this.startNode(),this.state.value,!0);if(s)return s}return k(D(e.prototype),"parseExportDefaultExpression",this).call(this)}},{key:"parseStatementContent",value:function(t,s){if(this.state.type===o._const){var i=this.lookahead();if(i.type===o.name&&"enum"===i.value){var a=this.startNode();return this.expect(o._const),this.expectContextual("enum"),this.tsParseEnumDeclaration(a,!0)}}return k(D(e.prototype),"parseStatementContent",this).call(this,t,s)}},{key:"parseAccessModifier",value:function(){return this.tsParseModifier(["public","protected","private"])}},{key:"parseClassMember",value:function(t,s,i,a){var r=this.parseAccessModifier();r&&(s.accessibility=r),k(D(e.prototype),"parseClassMember",this).call(this,t,s,i,a)}},{key:"parseClassMemberWithIsStatic",value:function(t,s,i,a,r){var n=this.tsParseModifiers(["abstract","readonly","declare"]);Object.assign(s,n);var o=this.tsTryParseIndexSignature(s);if(o)return t.body.push(o),n.abstract&&this.raise(s.start,"Index signatures cannot have the 'abstract' modifier"),a&&this.raise(s.start,"Index signatures cannot have the 'static' modifier"),void(s.accessibility&&this.raise(s.start,"Index signatures cannot have an accessibility modifier ('".concat(s.accessibility,"')")));k(D(e.prototype),"parseClassMemberWithIsStatic",this).call(this,t,s,i,a,r)}},{key:"parsePostMemberNameModifiers",value:function(t){this.eat(o.question)&&(t.optional=!0),t.readonly&&this.match(o.parenL)&&this.raise(t.start,"Class methods cannot have the 'readonly' modifier"),t.declare&&this.match(o.parenL)&&this.raise(t.start,"Class methods cannot have the 'declare' modifier")}},{key:"parseExpressionStatement",value:function(t,s){return("Identifier"===s.type?this.tsParseExpressionStatement(t,s):void 0)||k(D(e.prototype),"parseExpressionStatement",this).call(this,t,s)}},{key:"shouldParseExportDeclaration",value:function(){return!!this.tsIsDeclarationStart()||k(D(e.prototype),"shouldParseExportDeclaration",this).call(this)}},{key:"parseConditional",value:function(t,s,i,a,r){var n=this;if(!r||!this.match(o.question))return k(D(e.prototype),"parseConditional",this).call(this,t,s,i,a,r);var h=this.tryParse((function(){return k(D(e.prototype),"parseConditional",n).call(n,t,s,i,a)}));return h.node?(h.error&&(this.state=h.failState),h.node):(r.start=h.error.pos||this.state.start,t)}},{key:"parseParenItem",value:function(t,s,i){if(t=k(D(e.prototype),"parseParenItem",this).call(this,t,s,i),this.eat(o.question)&&(t.optional=!0,this.resetEndLocation(t)),this.match(o.colon)){var a=this.startNodeAt(s,i);return a.expression=t,a.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(a,"TSTypeCastExpression")}return t}},{key:"parseExportDeclaration",value:function(t){var s,i=this.state.start,a=this.state.startLoc,r=this.eatContextual("declare");return this.match(o.name)&&(s=this.tsTryParseExportDeclaration()),s||(s=k(D(e.prototype),"parseExportDeclaration",this).call(this,t)),s&&r&&(this.resetStartLocation(s,i,a),s.declare=!0),s}},{key:"parseClassId",value:function(t,s,i){if(s&&!i||!this.isContextual("implements")){k(D(e.prototype),"parseClassId",this).call(this,t,s,i,t.declare?1024:139);var a=this.tsTryParseTypeParameters();a&&(t.typeParameters=a)}}},{key:"parseClassPropertyAnnotation",value:function(t){!t.optional&&this.eat(o.bang)&&(t.definite=!0);var e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}},{key:"parseClassProperty",value:function(t){return this.parseClassPropertyAnnotation(t),t.declare&&this.match(o.equal)&&this.raise(this.state.start,"'declare' class fields cannot have an initializer"),k(D(e.prototype),"parseClassProperty",this).call(this,t)}},{key:"parseClassPrivateProperty",value:function(t){return t.abstract&&this.raise(t.start,"Private elements cannot have the 'abstract' modifier."),t.accessibility&&this.raise(t.start,"Private elements cannot have an accessibility modifier ('".concat(t.accessibility,"')")),this.parseClassPropertyAnnotation(t),k(D(e.prototype),"parseClassPrivateProperty",this).call(this,t)}},{key:"pushClassMethod",value:function(t,s,i,a,r,n){var o=this.tsTryParseTypeParameters();o&&(s.typeParameters=o),k(D(e.prototype),"pushClassMethod",this).call(this,t,s,i,a,r,n)}},{key:"pushClassPrivateMethod",value:function(t,s,i,a){var r=this.tsTryParseTypeParameters();r&&(s.typeParameters=r),k(D(e.prototype),"pushClassPrivateMethod",this).call(this,t,s,i,a)}},{key:"parseClassSuper",value:function(t){k(D(e.prototype),"parseClassSuper",this).call(this,t),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.tsParseTypeArguments()),this.eatContextual("implements")&&(t.implements=this.tsParseHeritageClause("implements"))}},{key:"parseObjPropValue",value:function(t){var s,i=this.tsTryParseTypeParameters();i&&(t.typeParameters=i);for(var a=arguments.length,r=new Array(a>1?a-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:64,i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;switch(t.type){case"TSTypeCastExpression":return;case"TSParameterProperty":return void this.checkLVal(t.parameter,s,i,"parameter property");case"TSAsExpression":case"TSNonNullExpression":case"TSTypeAssertion":return void this.checkLVal(t.expression,s,i,a);default:return void k(D(e.prototype),"checkLVal",this).call(this,t,s,i,a)}}},{key:"parseBindingAtom",value:function(){switch(this.state.type){case o._this:return this.parseIdentifier(!0);default:return k(D(e.prototype),"parseBindingAtom",this).call(this)}}},{key:"parseMaybeDecoratorArguments",value:function(t){if(this.isRelational("<")){var s=this.tsParseTypeArguments();if(this.match(o.parenL)){var i=k(D(e.prototype),"parseMaybeDecoratorArguments",this).call(this,t);return i.typeParameters=s,i}this.unexpected(this.state.start,o.parenL)}return k(D(e.prototype),"parseMaybeDecoratorArguments",this).call(this,t)}},{key:"isClassMethod",value:function(){return this.isRelational("<")||k(D(e.prototype),"isClassMethod",this).call(this)}},{key:"isClassProperty",value:function(){return this.match(o.bang)||this.match(o.colon)||k(D(e.prototype),"isClassProperty",this).call(this)}},{key:"parseMaybeDefault",value:function(){for(var t,s=arguments.length,i=new Array(s),a=0;a0)||k(D(e.prototype),"maybeParseExportDefaultSpecifier",this).apply(this,arguments)}},{key:"checkExport",value:function(t){var s=t.specifiers;s&&s.length&&(t.specifiers=s.filter((function(t){return"Placeholder"===t.exported.type}))),k(D(e.prototype),"checkExport",this).call(this,t),t.specifiers=s}},{key:"parseImport",value:function(t){var s=this.parsePlaceholder("Identifier");if(!s)return k(D(e.prototype),"parseImport",this).apply(this,arguments);if(t.specifiers=[],!this.isContextual("from")&&!this.match(o.comma))return t.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");var i=this.startNodeAtNode(s);if(i.local=s,this.finishNode(i,"ImportDefaultSpecifier"),t.specifiers.push(i),this.eat(o.comma)){var a=this.maybeParseStarImportSpecifier(t);a||this.parseNamedImportSpecifiers(t)}return this.expectContextual("from"),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.parsePlaceholder("StringLiteral")||k(D(e.prototype),"parseImportSource",this).apply(this,arguments)}}]),e}(t)}},dt=Object.keys(pt),ft={sourceType:"script",sourceFilename:void 0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1};var mt=function t(e,s){d(this,t),this.line=e,this.column=s},yt=function t(e,s){d(this,t),this.start=e,this.end=s};function Dt(t){return t[t.length-1]}var vt=function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"getLocationForPosition",value:function(t){return t===this.state.start?this.state.startLoc:t===this.state.lastTokStart?this.state.lastTokStartLoc:t===this.state.end?this.state.endLoc:t===this.state.lastTokEnd?this.state.lastTokEndLoc:function(t,e){var s,i=1,a=0;for(E.lastIndex=0;(s=E.exec(t))&&s.index2&&void 0!==arguments[2]?arguments[2]:{},i=s.missingPluginNames,a=s.code,r=this.getLocationForPosition(t);e+=" (".concat(r.line,":").concat(r.column,")");var n=new SyntaxError(e);if(n.pos=t,n.loc=r,i&&(n.missingPlugin=i),void 0!==a&&(n.code=a),this.options.errorRecovery)return this.isLookahead||this.state.errors.push(n),n;throw n}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"addComment",value:function(t){this.filename&&(t.loc.filename=this.filename),this.state.trailingComments.push(t),this.state.leadingComments.push(t)}},{key:"adjustCommentsAfterTrailingComma",value:function(t,e,s){if(0!==this.state.leadingComments.length){for(var i=null,a=e.length;null===i&&a>0;)i=e[--a];if(null!==i){for(var r=0;r0?i.trailingComments=n:void 0!==i.trailingComments&&(i.trailingComments=[])}}}},{key:"processComment",value:function(t){if(!("Program"===t.type&&t.body.length>0)){var e,s,i,a,r,n=this.state.commentStack;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=t.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else if(n.length>0){var o=Dt(n);o.trailingComments&&o.trailingComments[0].start>=t.end&&(i=o.trailingComments,delete o.trailingComments)}for(n.length>0&&Dt(n).start>=t.start&&(e=n.pop());n.length>0&&Dt(n).start>=t.start;)s=n.pop();if(!s&&e&&(s=e),e)switch(t.type){case"ObjectExpression":this.adjustCommentsAfterTrailingComma(t,t.properties);break;case"ObjectPattern":this.adjustCommentsAfterTrailingComma(t,t.properties,!0);break;case"CallExpression":this.adjustCommentsAfterTrailingComma(t,t.arguments);break;case"ArrayExpression":this.adjustCommentsAfterTrailingComma(t,t.elements);break;case"ArrayPattern":this.adjustCommentsAfterTrailingComma(t,t.elements,!0)}else this.state.commentPreviousNode&&("ImportSpecifier"===this.state.commentPreviousNode.type&&"ImportSpecifier"!==t.type||"ExportSpecifier"===this.state.commentPreviousNode.type&&"ExportSpecifier"!==t.type)&&this.adjustCommentsAfterTrailingComma(t,[this.state.commentPreviousNode],!0);if(s){if(s.leadingComments)if(s!==t&&s.leadingComments.length>0&&Dt(s.leadingComments).end<=t.start)t.leadingComments=s.leadingComments,delete s.leadingComments;else for(a=s.leadingComments.length-2;a>=0;--a)if(s.leadingComments[a].end<=t.start){t.leadingComments=s.leadingComments.splice(0,a+1);break}}else if(this.state.leadingComments.length>0)if(Dt(this.state.leadingComments).end<=t.start){if(this.state.commentPreviousNode)for(r=0;r0&&(t.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(a=0;at.start);a++);var h=this.state.leadingComments.slice(0,a);h.length&&(t.leadingComments=h),0===(i=this.state.leadingComments.slice(a)).length&&(i=null)}this.state.commentPreviousNode=t,i&&(i.length&&i[0].start>=t.start&&Dt(i).end<=t.end?t.innerComments=i:t.trailingComments=i),n.push(t)}}}]),e}(function(){function t(){d(this,t),this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}return m(t,[{key:"hasPlugin",value:function(t){return this.plugins.has(t)}},{key:"getPluginOption",value:function(t,e){if(this.hasPlugin(t))return this.plugins.get(t)[e]}}]),t}())),xt=function(){function t(){d(this,t),this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.inParameters=!1,this.maybeInArrowParameters=!1,this.inPipeline=!1,this.inType=!1,this.noAnonFunctionType=!1,this.inPropertyName=!1,this.inClassProperty=!1,this.hasFlowComment=!1,this.isIterator=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.classLevel=0,this.labels=[],this.decoratorStack=[[]],this.yieldPos=-1,this.awaitPos=-1,this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.commentPreviousNode=null,this.pos=0,this.lineStart=0,this.type=o.eof,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.lastTokEnd=0,this.context=[F.braceStatement],this.exprAllowed=!0,this.containsEsc=!1,this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this.invalidTemplateEscapePosition=null}return m(t,[{key:"init",value:function(t){this.strict=!1!==t.strictMode&&"module"===t.sourceType,this.curLine=t.startLine,this.startLoc=this.endLoc=this.curPosition()}},{key:"curPosition",value:function(){return new mt(this.curLine,this.pos-this.lineStart)}},{key:"clone",value:function(e){for(var s=new t,i=Object.keys(this),a=0,r=i.length;a=48&&t<=57},kt=new Set(["g","m","s","i","y","u"]),Pt={decBinOct:[46,66,69,79,95,98,101,111],hex:[46,88,95,120]},bt={bin:[48,49]};bt.oct=[].concat(b(bt.bin),[50,51,52,53,54,55]),bt.dec=[].concat(b(bt.oct),[56,57]),bt.hex=[].concat(b(bt.dec),[65,66,67,68,69,70,97,98,99,100,101,102]);var Et=function t(e){d(this,t),this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new yt(e.startLoc,e.endLoc)},Ct=/^('|")((?:\\?.)*?)\1/,At=function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"addExtra",value:function(t,e,s){t&&((t.extra=t.extra||{})[e]=s)}},{key:"isRelational",value:function(t){return this.match(o.relational)&&this.state.value===t}},{key:"isLookaheadRelational",value:function(t){var e=this.nextTokenStart();if(this.input.charAt(e)===t){if(e+1===this.input.length)return!0;var s=this.input.charCodeAt(e+1);return s!==t.charCodeAt(0)&&61!==s}return!1}},{key:"expectRelational",value:function(t){this.isRelational(t)?this.next():this.unexpected(null,o.relational)}},{key:"eatRelational",value:function(t){return!!this.isRelational(t)&&(this.next(),!0)}},{key:"isContextual",value:function(t){return this.match(o.name)&&this.state.value===t&&!this.state.containsEsc}},{key:"isUnparsedContextual",value:function(t,e){var s=t+e.length;return this.input.slice(t,s)===e&&(s===this.input.length||!X(this.input.charCodeAt(s)))}},{key:"isLookaheadContextual",value:function(t){var e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}},{key:"eatContextual",value:function(t){return this.isContextual(t)&&this.eat(o.name)}},{key:"expectContextual",value:function(t,e){this.eatContextual(t)||this.unexpected(null,e)}},{key:"canInsertSemicolon",value:function(){return this.match(o.eof)||this.match(o.braceR)||this.hasPrecedingLineBreak()}},{key:"hasPrecedingLineBreak",value:function(){return v.test(this.input.slice(this.state.lastTokEnd,this.state.start))}},{key:"isLineTerminator",value:function(){return this.eat(o.semi)||this.canInsertSemicolon()}},{key:"semicolon",value:function(){this.isLineTerminator()||this.unexpected(null,o.semi)}},{key:"expect",value:function(t,e){this.eat(t)||this.unexpected(e,t)}},{key:"assertNoSpace",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Unexpected space.";this.state.start>this.state.lastTokEnd&&this.raise(this.state.lastTokEnd,t)}},{key:"unexpected",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";throw"string"!=typeof e&&(e='Unexpected token, expected "'.concat(e.label,'"')),this.raise(null!=t?t:this.state.start,e)}},{key:"expectPlugin",value:function(t,e){if(!this.hasPlugin(t))throw this.raise(null!=e?e:this.state.start,"This experimental syntax requires enabling the parser plugin: '".concat(t,"'"),{missingPluginNames:[t]});return!0}},{key:"expectOnePlugin",value:function(t,e){var s=this;if(!t.some((function(t){return s.hasPlugin(t)})))throw this.raise(null!=e?e:this.state.start,"This experimental syntax requires enabling one of the following parser plugin(s): '".concat(t.join(", "),"'"),{missingPluginNames:t})}},{key:"checkYieldAwaitInDefaultParams",value:function(){-1!==this.state.yieldPos&&(-1===this.state.awaitPos||this.state.yieldPos1&&void 0!==arguments[1]?arguments[1]:this.state.clone(),s={node:null};try{var i=t((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;throw s.node=t,s}));if(this.state.errors.length>e.errors.length){var a=this.state;return this.state=e,{node:i,error:a.errors[e.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(t){var r=this.state;if(this.state=e,t instanceof SyntaxError)return{node:null,error:t,thrown:!0,aborted:!1,failState:r};if(t===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw t}}}]),e}(function(t){function e(t,s){var i;return d(this,e),(i=g(this,D(e).call(this))).state=new xt,i.state.init(t),i.input=s,i.length=s.length,i.isLookahead=!1,i}return y(e,t),m(e,[{key:"next",value:function(){this.isLookahead||(this.checkKeywordEscapes(),this.options.tokens&&this.state.tokens.push(new Et(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()}},{key:"eat",value:function(t){return!!this.match(t)&&(this.next(),!0)}},{key:"match",value:function(t){return this.state.type===t}},{key:"lookahead",value:function(){var t=this.state;this.state=t.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var e=this.state;return this.state=t,e}},{key:"nextTokenStart",value:function(){var t=this.state.pos;return A.lastIndex=t,t+A.exec(this.input)[0].length}},{key:"lookaheadCharCode",value:function(){return this.input.charCodeAt(this.nextTokenStart())}},{key:"setStrict",value:function(t){if(this.state.strict=t,this.match(o.num)||this.match(o.string)){for(this.state.pos=this.state.start;this.state.pos=this.length?this.finishToken(o.eof):t.override?t.override(this):this.getTokenFromCode(this.input.codePointAt(this.state.pos))}},{key:"pushComment",value:function(t,e,s,i,a,r){var n={type:t?"CommentBlock":"CommentLine",value:e,start:s,end:i,loc:new yt(a,r)};this.options.tokens&&this.state.tokens.push(n),this.state.comments.push(n),this.addComment(n)}},{key:"skipBlockComment",value:function(){var t,e=this.state.curPosition(),s=this.state.pos,i=this.input.indexOf("*/",this.state.pos+2);if(-1===i)throw this.raise(s,"Unterminated comment");for(this.state.pos=i+2,E.lastIndex=s;(t=E.exec(this.input))&&t.index=48&&e<=57)throw this.raise(this.state.pos,"Unexpected digit after hash token");if((this.hasPlugin("classPrivateProperties")||this.hasPlugin("classPrivateMethods"))&&this.state.classLevel>0)return++this.state.pos,void this.finishToken(o.hash);if("smart"!==this.getPluginOption("pipelineOperator","proposal"))throw this.raise(this.state.pos,"Unexpected character '#'");this.finishOp(o.hash,1)}}},{key:"readToken_dot",value:function(){var t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(o.ellipsis)):(++this.state.pos,this.finishToken(o.dot))}},{key:"readToken_slash",value:function(){if(this.state.exprAllowed&&!this.state.inType)return++this.state.pos,void this.readRegexp();61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.assign,2):this.finishOp(o.slash,1)}},{key:"readToken_interpreter",value:function(){if(0!==this.state.pos||this.length<2)return!1;var t=this.state.pos;this.state.pos+=1;var e=this.input.charCodeAt(this.state.pos);if(33!==e)return!1;for(;!C(e)&&++this.state.pos=48&&e<=57?(++this.state.pos,this.finishToken(o.question)):(this.state.pos+=2,this.finishToken(o.questionDot)):61===e?this.finishOp(o.assign,3):this.finishOp(o.nullishCoalescing,2)}},{key:"getTokenFromCode",value:function(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(o.parenL);case 41:return++this.state.pos,void this.finishToken(o.parenR);case 59:return++this.state.pos,void this.finishToken(o.semi);case 44:return++this.state.pos,void this.finishToken(o.comma);case 91:return++this.state.pos,void this.finishToken(o.bracketL);case 93:return++this.state.pos,void this.finishToken(o.bracketR);case 123:return++this.state.pos,void this.finishToken(o.braceL);case 125:return++this.state.pos,void this.finishToken(o.braceR);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(o.doubleColon,2):(++this.state.pos,this.finishToken(o.colon)));case 63:return void this.readToken_question();case 96:return++this.state.pos,void this.finishToken(o.backQuote);case 48:var e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:case 62:return void this.readToken_lt_gt(t);case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(o.tilde,1);case 64:return++this.state.pos,void this.finishToken(o.at);case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(K(t))return void this.readWord()}throw this.raise(this.state.pos,"Unexpected character '".concat(String.fromCodePoint(t),"'"))}},{key:"finishOp",value:function(t,e){var s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}},{key:"readRegexp",value:function(){for(var t,e,s=this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(s,"Unterminated regular expression");var i=this.input.charAt(this.state.pos);if(v.test(i))throw this.raise(s,"Unterminated regular expression");if(t)t=!1;else{if("["===i)e=!0;else if("]"===i&&e)e=!1;else if("/"===i&&!e)break;t="\\"===i}++this.state.pos}var a=this.input.slice(s,this.state.pos);++this.state.pos;for(var r="";this.state.pos-1&&this.raise(this.state.pos+1,"Duplicate regular expression flag");else{if(!X(h)&&92!==h)break;this.raise(this.state.pos+1,"Invalid regular expression flag")}++this.state.pos,r+=n}this.finishToken(o.regexp,{pattern:a,flags:r})}},{key:"readInt",value:function(t,e,s){for(var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this.state.pos,r=16===t?Pt.hex:Pt.decBinOct,n=16===t?bt.hex:10===t?bt.dec:8===t?bt.oct:bt.bin,o=!1,h=0,u=0,l=null==e?1/0:e;u-1||r.indexOf(f)>-1||Number.isNaN(f))&&this.raise(this.state.pos,"A numeric separator is only allowed between two digits"),i||this.raise(this.state.pos,"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences"),++this.state.pos}else{if((p=c>=97?c-97+10:c>=65?c-65+10:gt(c)?c-48:1/0)>=t)if(this.options.errorRecovery&&p<=9)p=0,this.raise(this.state.start+u+2,"Expected number in radix "+t);else{if(!s)break;p=0,o=!0}++this.state.pos,h=h*t+p}}return this.state.pos===a||null!=e&&this.state.pos-a!==e||o?null:h}},{key:"readRadixNumber",value:function(t){var e=this.state.pos,s=!1;this.state.pos+=2;var i=this.readInt(t);if(null==i&&this.raise(this.state.start+2,"Expected number in radix "+t),this.hasPlugin("bigInt")&&110===this.input.charCodeAt(this.state.pos)&&(++this.state.pos,s=!0),K(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");if(s){var a=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(o.bigint,a)}else this.finishToken(o.num,i)}},{key:"readNumber",value:function(t){var e=this.state.pos,s=!1,i=!1,a=!1;t||null!==this.readInt(10)||this.raise(e,"Invalid number");var r=this.state.pos-e>=2&&48===this.input.charCodeAt(e);r&&(this.state.strict&&this.raise(e,"Legacy octal literals are not allowed in strict mode"),/[89]/.test(this.input.slice(e,this.state.pos))&&(r=!1,a=!0));var n=this.input.charCodeAt(this.state.pos);if(46!==n||r||(++this.state.pos,this.readInt(10),s=!0,n=this.input.charCodeAt(this.state.pos)),69!==n&&101!==n||r||(43!==(n=this.input.charCodeAt(++this.state.pos))&&45!==n||++this.state.pos,null===this.readInt(10)&&this.raise(e,"Invalid number"),s=!0,n=this.input.charCodeAt(this.state.pos)),this.hasPlugin("numericSeparator")&&(r||a)){var h=this.input.slice(e,this.state.pos).indexOf("_");h>0&&this.raise(h+e,"Numeric separator can not be used after leading 0")}if(this.hasPlugin("bigInt")&&110===n&&((s||r||a)&&this.raise(e,"Invalid BigIntLiteral"),++this.state.pos,i=!0),K(this.input.codePointAt(this.state.pos)))throw this.raise(this.state.pos,"Identifier directly after number");var u=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");if(i)this.finishToken(o.bigint,u);else{var l=r?parseInt(u,8):parseFloat(u);this.finishToken(o.num,l)}}},{key:"readCodePoint",value:function(t){var e;if(123===this.input.charCodeAt(this.state.pos)){var s=++this.state.pos;if(e=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,!0,t),++this.state.pos,null===e)--this.state.invalidTemplateEscapePosition;else if(e>1114111){if(!t)return this.state.invalidTemplateEscapePosition=s-2,null;this.raise(s,"Code point out of bounds")}}else e=this.readHexChar(4,!1,t);return e}},{key:"readString",value:function(t){for(var e="",s=++this.state.pos;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated string constant");var i=this.input.charCodeAt(this.state.pos);if(i===t)break;if(92===i)e+=this.input.slice(s,this.state.pos),e+=this.readEscapedChar(!1),s=this.state.pos;else if(8232===i||8233===i)++this.state.pos,++this.state.curLine;else{if(C(i))throw this.raise(this.state.start,"Unterminated string constant");++this.state.pos}}e+=this.input.slice(s,this.state.pos++),this.finishToken(o.string,e)}},{key:"readTmplToken",value:function(){for(var t="",e=this.state.pos,s=!1;;){if(this.state.pos>=this.length)throw this.raise(this.state.start,"Unterminated template");var i=this.input.charCodeAt(this.state.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(o.template)?36===i?(this.state.pos+=2,void this.finishToken(o.dollarBraceL)):(++this.state.pos,void this.finishToken(o.backQuote)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(o.template,s?null:t));if(92===i){t+=this.input.slice(e,this.state.pos);var a=this.readEscapedChar(!0);null===a?s=!0:t+=a,e=this.state.pos}else if(C(i)){switch(t+=this.input.slice(e,this.state.pos),++this.state.pos,i){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}++this.state.curLine,this.state.lineStart=this.state.pos,e=this.state.pos}else++this.state.pos}}},{key:"readEscapedChar",value:function(t){var e=!t,s=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,s){case 110:return"\n";case 114:return"\r";case 120:var i=this.readHexChar(2,!1,e);return null===i?null:String.fromCharCode(i);case 117:var a=this.readCodePoint(e);return null===a?null:String.fromCodePoint(a);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:this.state.lineStart=this.state.pos,++this.state.curLine;case 8232:case 8233:return"";case 56:case 57:if(t){var r=this.state.pos-1;return this.state.invalidTemplateEscapePosition=r,null}default:if(s>=48&&s<=55){var n=this.state.pos-1,o=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],h=parseInt(o,8);h>255&&(o=o.slice(0,-1),h=parseInt(o,8)),this.state.pos+=o.length-1;var u=this.input.charCodeAt(this.state.pos);if("0"!==o||56===u||57===u){if(t)return this.state.invalidTemplateEscapePosition=n,null;this.state.strict?this.raise(n,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=n)}return String.fromCharCode(h)}return String.fromCharCode(s)}}},{key:"readHexChar",value:function(t,e,s){var i=this.state.pos,a=this.readInt(16,t,e,!1);return null===a&&(s?this.raise(i,"Bad character escape sequence"):(this.state.pos=i-1,this.state.invalidTemplateEscapePosition=i-1)),a}},{key:"readWord1",value:function(){var t="";this.state.containsEsc=!1;for(var e=this.state.pos,s=this.state.pos;this.state.pos0)for(var s=0,i=Array.from(this.scope.undefinedExports);s-1&&this.unexpected(e),this.parseFor(t,null);var s=this.isLet();if(this.match(o._var)||this.match(o._const)||s){var i=this.startNode(),a=s?"let":this.state.value;return this.next(),this.parseVar(i,!0,a),this.finishNode(i,"VariableDeclaration"),(this.match(o._in)||this.isContextual("of"))&&1===i.declarations.length?this.parseForIn(t,i,e):(e>-1&&this.unexpected(e),this.parseFor(t,i))}var r={start:0},n=this.parseExpression(!0,r);if(this.match(o._in)||this.isContextual("of")){var h=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(n,void 0,h),this.checkLVal(n,void 0,void 0,h),this.parseForIn(t,n,e)}return r.start&&this.unexpected(r.start),e>-1&&this.unexpected(e),this.parseFor(t,n)}},{key:"parseFunctionStatement",value:function(t,e,s){return this.next(),this.parseFunction(t,1|(s?0:2),e)}},{key:"parseIfStatement",value:function(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(o._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")}},{key:"parseReturnStatement",value:function(t){return this.scope.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}},{key:"parseSwitchStatement",value:function(t){this.next(),t.discriminant=this.parseHeaderExpression();var e,s,i=t.cases=[];for(this.expect(o.braceL),this.state.labels.push(Ft),this.scope.enter(0);!this.match(o.braceR);)if(this.match(o._case)||this.match(o._default)){var a=this.match(o._case);e&&this.finishNode(e,"SwitchCase"),i.push(e=this.startNode()),e.consequent=[],this.next(),a?e.test=this.parseExpression():(s&&this.raise(this.state.lastTokStart,"Multiple default clauses"),s=!0,e.test=null),this.expect(o.colon)}else e?e.consequent.push(this.parseStatement(null)):this.unexpected();return this.scope.exit(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}},{key:"parseThrowStatement",value:function(t){return this.next(),v.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}},{key:"parseTryStatement",value:function(t){var e=this;if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(o._catch)){var s=this.startNode();if(this.next(),this.match(o.parenL)){this.expect(o.parenL),s.param=this.parseBindingAtom();var i="Identifier"===s.param.type;this.scope.enter(i?32:0),this.checkLVal(s.param,9,null,"catch clause"),this.expect(o.parenR)}else s.param=null,this.scope.enter(0);s.body=this.withTopicForbiddingContext((function(){return e.parseBlock(!1,!1)})),this.scope.exit(),t.handler=this.finishNode(s,"CatchClause")}return t.finalizer=this.eat(o._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")}},{key:"parseVarStatement",value:function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")}},{key:"parseWhileStatement",value:function(t){var e=this;return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Tt),t.body=this.withTopicForbiddingContext((function(){return e.parseStatement("while")})),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}},{key:"parseWithStatement",value:function(t){var e=this;return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withTopicForbiddingContext((function(){return e.parseStatement("with")})),this.finishNode(t,"WithStatement")}},{key:"parseEmptyStatement",value:function(t){return this.next(),this.finishNode(t,"EmptyStatement")}},{key:"parseLabeledStatement",value:function(t,e,s,i){for(var a=0,r=this.state.labels;a=0;h--){var u=this.state.labels[h];if(u.statementStart!==t.start)break;u.statementStart=this.state.start,u.kind=n}return this.state.labels.push({name:e,kind:n,statementStart:this.state.start}),t.body=this.parseStatement(i?-1===i.indexOf("label")?i+"label":i:"label"),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}},{key:"parseExpressionStatement",value:function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}},{key:"parseBlock",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.startNode();return this.expect(o.braceL),e&&this.scope.enter(0),this.parseBlockBody(s,t,!1,o.braceR),e&&this.scope.exit(),this.finishNode(s,"BlockStatement")}},{key:"isValidDirective",value:function(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}},{key:"parseBlockBody",value:function(t,e,s,i){var a=t.body=[],r=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?r:void 0,s,i)}},{key:"parseBlockOrModuleBlockBody",value:function(t,e,s,i){for(var a,r,n=!1;!this.eat(i);){n||!this.state.containsOctal||r||(r=this.state.octalPosition);var o=this.parseStatement(null,s);if(e&&!n&&this.isValidDirective(o)){var h=this.stmtToDirective(o);e.push(h),void 0===a&&"use strict"===h.value.value&&(a=this.state.strict,this.setStrict(!0),r&&this.raise(r,"Octal literal in strict mode"))}else n=!0,t.push(o)}!1===a&&this.setStrict(!1)}},{key:"parseFor",value:function(t,e){var s=this;return t.init=e,this.expect(o.semi),t.test=this.match(o.semi)?null:this.parseExpression(),this.expect(o.semi),t.update=this.match(o.parenR)?null:this.parseExpression(),this.expect(o.parenR),t.body=this.withTopicForbiddingContext((function(){return s.parseStatement("for")})),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}},{key:"parseForIn",value:function(t,e,s){var i=this,a=this.match(o._in);return this.next(),a?s>-1&&this.unexpected(s):t.await=s>-1,"VariableDeclaration"!==e.type||null==e.declarations[0].init||a&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type?"AssignmentPattern"===e.type&&this.raise(e.start,"Invalid left-hand side in for-loop"):this.raise(e.start,"".concat(a?"for-in":"for-of"," loop variable declaration may not have an initializer")),t.left=e,t.right=a?this.parseExpression():this.parseMaybeAssign(),this.expect(o.parenR),t.body=this.withTopicForbiddingContext((function(){return i.parseStatement("for")})),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,a?"ForInStatement":"ForOfStatement")}},{key:"parseVar",value:function(t,e,s){var i=t.declarations=[],a=this.hasPlugin("typescript");for(t.kind=s;;){var r=this.startNode();if(this.parseVarId(r,s),this.eat(o.eq)?r.init=this.parseMaybeAssign(e):("const"!==s||this.match(o._in)||this.isContextual("of")?"Identifier"===r.id.type||e&&(this.match(o._in)||this.isContextual("of"))||this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):a||this.unexpected(),r.init=null),i.push(this.finishNode(r,"VariableDeclarator")),!this.eat(o.comma))break}return t}},{key:"parseVarId",value:function(t,e){t.id=this.parseBindingAtom(),this.checkLVal(t.id,"var"===e?5:9,void 0,"variable declaration","var"!==e)}},{key:"parseFunction",value:function(t){var e=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=1&s,r=2&s,n=!(!a||4&s);this.initFunction(t,i),this.match(o.star)&&r&&this.raise(this.state.start,"Generators can only be declared at the top level or inside a block"),t.generator=this.eat(o.star),a&&(t.id=this.parseFunctionId(n));var h=this.state.maybeInArrowParameters,u=this.state.inClassProperty,l=this.state.yieldPos,c=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.inClassProperty=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,this.scope.enter(p(t.async,t.generator)),a||(t.id=this.parseFunctionId()),this.parseFunctionParams(t),this.withTopicForbiddingContext((function(){e.parseFunctionBodyAndFinish(t,a?"FunctionDeclaration":"FunctionExpression")})),this.scope.exit(),a&&!r&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=h,this.state.inClassProperty=u,this.state.yieldPos=l,this.state.awaitPos=c,t}},{key:"parseFunctionId",value:function(t){return t||this.match(o.name)?this.parseIdentifier():null}},{key:"parseFunctionParams",value:function(t,e){var s=this.state.inParameters;this.state.inParameters=!0,this.expect(o.parenL),t.params=this.parseBindingList(o.parenR,41,!1,e),this.state.inParameters=s,this.checkYieldAwaitInDefaultParams()}},{key:"registerFunctionStatementId",value:function(t){t.id&&this.scope.declareName(t.id.name,this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:9:17,t.id.start)}},{key:"parseClass",value:function(t,e,s){this.next(),this.takeDecorators(t);var i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass),this.state.strict=i,this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}},{key:"isClassProperty",value:function(){return this.match(o.eq)||this.match(o.semi)||this.match(o.braceR)}},{key:"isClassMethod",value:function(){return this.match(o.parenL)}},{key:"isNonstaticConstructor",value:function(t){return!(t.computed||t.static||"constructor"!==t.key.name&&"constructor"!==t.key.value)}},{key:"parseClassBody",value:function(t){var e=this;this.state.classLevel++;var s={hadConstructor:!1},i=[],a=this.startNode();if(a.body=[],this.expect(o.braceL),this.withTopicForbiddingContext((function(){for(;!e.eat(o.braceR);)if(e.eat(o.semi)){if(i.length>0)throw e.raise(e.state.lastTokEnd,"Decorators must not be followed by a semicolon")}else if(e.match(o.at))i.push(e.parseDecorator());else{var r=e.startNode();i.length&&(r.decorators=i,e.resetStartLocationFromNode(r,i[0]),i=[]),e.parseClassMember(a,r,s,t),"constructor"===r.kind&&r.decorators&&r.decorators.length>0&&e.raise(r.start,"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?")}})),i.length)throw this.raise(this.state.start,"You have trailing decorators with no method");return this.state.classLevel--,this.finishNode(a,"ClassBody")}},{key:"parseClassMember",value:function(t,e,s,i){var a=!1,r=this.state.containsEsc;if(this.match(o.name)&&"static"===this.state.value){var n=this.parseIdentifier(!0);if(this.isClassMethod()){var h=e;return h.kind="method",h.computed=!1,h.key=n,h.static=!1,void this.pushClassMethod(t,h,!1,!1,!1,!1)}if(this.isClassProperty()){var u=e;return u.computed=!1,u.key=n,u.static=!1,void t.body.push(this.parseClassProperty(u))}if(r)throw this.unexpected();a=!0}this.parseClassMemberWithIsStatic(t,e,s,a,i)}},{key:"parseClassMemberWithIsStatic",value:function(t,e,s,i,a){var r=e,n=e,h=e,u=e,l=r,c=r;if(e.static=i,this.eat(o.star))return l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?void this.pushClassPrivateMethod(t,n,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be a generator"),void this.pushClassMethod(t,r,!0,!1,!1,!1));var p=this.state.containsEsc,d=this.parseClassPropertyName(e),f="PrivateName"===d.type,m="Identifier"===d.type,y=this.state.start;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",f)return void this.pushClassPrivateMethod(t,n,!1,!1);var D=this.isNonstaticConstructor(r),v=!1;D&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(d.start,"Duplicate constructor in the same class"),s.hadConstructor=!0,v=a),this.pushClassMethod(t,r,!1,!1,D,v)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(t,u):this.pushClassProperty(t,h);else if(!m||"async"!==d.name||p||this.isLineTerminator())!m||"get"!==d.name&&"set"!==d.name||p||this.match(o.star)&&this.isLineTerminator()?this.isLineTerminator()?f?this.pushClassPrivateProperty(t,u):this.pushClassProperty(t,h):this.unexpected():(l.kind=d.name,this.parseClassPropertyName(r),"PrivateName"===l.key.type?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't have get/set modifier"),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r));else{var x=this.eat(o.star);c.optional&&this.unexpected(y),l.kind="method",this.parseClassPropertyName(l),"PrivateName"===l.key.type?this.pushClassPrivateMethod(t,n,x,!0):(this.isNonstaticConstructor(r)&&this.raise(r.key.start,"Constructor can't be an async function"),this.pushClassMethod(t,r,x,!0,!1,!1))}}},{key:"parseClassPropertyName",value:function(t){var e=this.parsePropertyName(t);return t.computed||!t.static||"prototype"!==e.name&&"prototype"!==e.value||this.raise(e.start,"Classes may not have static property named prototype"),"PrivateName"===e.type&&"constructor"===e.id.name&&this.raise(e.start,"Classes may not have a private field named '#constructor'"),e}},{key:"pushClassProperty",value:function(t,e){e.computed||"constructor"!==e.key.name&&"constructor"!==e.key.value||this.raise(e.key.start,"Classes may not have a field named 'constructor'"),t.body.push(this.parseClassProperty(e))}},{key:"pushClassPrivateProperty",value:function(t,e){this.expectPlugin("classPrivateProperties",e.key.start),t.body.push(this.parseClassPrivateProperty(e))}},{key:"pushClassMethod",value:function(t,e,s,i,a,r){t.body.push(this.parseMethod(e,s,i,a,r,"ClassMethod",!0))}},{key:"pushClassPrivateMethod",value:function(t,e,s,i){this.expectPlugin("classPrivateMethods",e.key.start),t.body.push(this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0))}},{key:"parsePostMemberNameModifiers",value:function(t){}},{key:"parseAccessModifier",value:function(){}},{key:"parseClassPrivateProperty",value:function(t){return this.state.inClassProperty=!0,this.scope.enter(320),t.value=this.eat(o.eq)?this.parseMaybeAssign():null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(t,"ClassPrivateProperty")}},{key:"parseClassProperty",value:function(t){return t.typeAnnotation||this.expectPlugin("classProperties"),this.state.inClassProperty=!0,this.scope.enter(320),this.match(o.eq)?(this.expectPlugin("classProperties"),this.next(),t.value=this.parseMaybeAssign()):t.value=null,this.semicolon(),this.state.inClassProperty=!1,this.scope.exit(),this.finishNode(t,"ClassProperty")}},{key:"parseClassId",value:function(t,e,s){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:139;this.match(o.name)?(t.id=this.parseIdentifier(),e&&this.checkLVal(t.id,i,void 0,"class name")):s||!e?t.id=null:this.unexpected(null,"A class name is required")}},{key:"parseClassSuper",value:function(t){t.superClass=this.eat(o._extends)?this.parseExprSubscripts():null}},{key:"parseExport",value:function(t){var e=this.maybeParseExportDefaultSpecifier(t),s=!e||this.eat(o.comma),i=s&&this.eatExportStar(t),a=i&&this.maybeParseExportNamespaceSpecifier(t),r=s&&(!a||this.eat(o.comma)),n=e||i;if(i&&!a)return e&&this.unexpected(),this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration");var h,u=this.maybeParseExportNamedSpecifiers(t);if(e&&s&&!i&&!u||a&&r&&!u)throw this.unexpected(null,o.braceL);if(n||u?(h=!1,this.parseExportFrom(t,n)):h=this.maybeParseExportDeclaration(t),n||u||h)return this.checkExport(t,!0,!1,!!t.source),this.finishNode(t,"ExportNamedDeclaration");if(this.eat(o._default))return t.declaration=this.parseExportDefaultExpression(),this.checkExport(t,!0,!0),this.finishNode(t,"ExportDefaultDeclaration");throw this.unexpected(null,o.braceL)}},{key:"eatExportStar",value:function(t){return this.eat(o.star)}},{key:"maybeParseExportDefaultSpecifier",value:function(t){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");var e=this.startNode();return e.exported=this.parseIdentifier(!0),t.specifiers=[this.finishNode(e,"ExportDefaultSpecifier")],!0}return!1}},{key:"maybeParseExportNamespaceSpecifier",value:function(t){if(this.isContextual("as")){t.specifiers||(t.specifiers=[]);var e=this.startNodeAt(this.state.lastTokStart,this.state.lastTokStartLoc);return this.next(),e.exported=this.parseIdentifier(!0),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}},{key:"maybeParseExportNamedSpecifiers",value:function(t){var e;return!!this.match(o.braceL)&&(t.specifiers||(t.specifiers=[]),(e=t.specifiers).push.apply(e,b(this.parseExportSpecifiers())),t.source=null,t.declaration=null,!0)}},{key:"maybeParseExportDeclaration",value:function(t){if(this.shouldParseExportDeclaration()){if(this.isContextual("async")){var e=this.nextTokenStart();this.isUnparsedContextual(e,"function")||this.unexpected(e,'Unexpected token, expected "function"')}return t.specifiers=[],t.source=null,t.declaration=this.parseExportDeclaration(t),!0}return!1}},{key:"isAsyncFunction",value:function(){if(!this.isContextual("async"))return!1;var t=this.nextTokenStart();return!v.test(this.input.slice(this.state.pos,t))&&this.isUnparsedContextual(t,"function")}},{key:"parseExportDefaultExpression",value:function(){var t=this.startNode(),e=this.isAsyncFunction();if(this.match(o._function)||e)return this.next(),e&&this.next(),this.parseFunction(t,5,e);if(this.match(o._class))return this.parseClass(t,!0,!0);if(this.match(o.at))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax"),this.parseDecorators(!1),this.parseClass(t,!0,!0);if(this.match(o._const)||this.match(o._var)||this.isLet())throw this.raise(this.state.start,"Only expressions, functions or classes are allowed as the `default` export.");var s=this.parseMaybeAssign();return this.semicolon(),s}},{key:"parseExportDeclaration",value:function(t){return this.parseStatement(null)}},{key:"isExportDefaultSpecifier",value:function(){if(this.match(o.name))return"async"!==this.state.value&&"let"!==this.state.value;if(!this.match(o._default))return!1;var t=this.nextTokenStart();return 44===this.input.charCodeAt(t)||this.isUnparsedContextual(t,"from")}},{key:"parseExportFrom",value:function(t,e){this.eatContextual("from")?(t.source=this.parseImportSource(),this.checkExport(t)):e?this.unexpected():t.source=null,this.semicolon()}},{key:"shouldParseExportDeclaration",value:function(){if(this.match(o.at)&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))){if(!this.getPluginOption("decorators","decoratorsBeforeExport"))return!0;this.unexpected(this.state.start,"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax")}return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isLet()||this.isAsyncFunction()}},{key:"checkExport",value:function(t,e,s,i){if(e)if(s)this.checkDuplicateExports(t,"default");else if(t.specifiers&&t.specifiers.length)for(var a=0,r=t.specifiers;a-1&&this.raise(t.start,"default"===e?"Only one default export allowed per module.":"`".concat(e,"` has already been exported. Exported identifiers must be unique.")),this.state.exportedIdentifiers.push(e)}},{key:"parseExportSpecifiers",value:function(){var t=[],e=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(e)e=!1;else if(this.expect(o.comma),this.eat(o.braceR))break;var s=this.startNode();s.local=this.parseIdentifier(!0),s.exported=this.eatContextual("as")?this.parseIdentifier(!0):s.local.__clone(),t.push(this.finishNode(s,"ExportSpecifier"))}return t}},{key:"parseImport",value:function(t){if(t.specifiers=[],!this.match(o.string)){var e=!this.maybeParseDefaultImportSpecifier(t)||this.eat(o.comma),s=e&&this.maybeParseStarImportSpecifier(t);e&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual("from")}return t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}},{key:"parseImportSource",value:function(){return this.match(o.string)||this.unexpected(),this.parseExprAtom()}},{key:"shouldParseDefaultImport",value:function(t){return this.match(o.name)}},{key:"parseImportSpecifierLocal",value:function(t,e,s,i){e.local=this.parseIdentifier(),this.checkLVal(e.local,9,void 0,i),t.specifiers.push(this.finishNode(e,s))}},{key:"maybeParseDefaultImportSpecifier",value:function(t){return!!this.shouldParseDefaultImport(t)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier","default import specifier"),!0)}},{key:"maybeParseStarImportSpecifier",value:function(t){if(this.match(o.star)){var e=this.startNode();return this.next(),this.expectContextual("as"),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier","import namespace specifier"),!0}return!1}},{key:"parseNamedImportSpecifiers",value:function(t){var e=!0;for(this.expect(o.braceL);!this.eat(o.braceR);){if(e)e=!1;else{if(this.eat(o.colon))throw this.raise(this.state.start,"ES2015 named imports do not destructure. Use another statement for destructuring after the import.");if(this.expect(o.comma),this.eat(o.braceR))break}this.parseImportSpecifier(t)}}},{key:"parseImportSpecifier",value:function(t){var e=this.startNode();e.imported=this.parseIdentifier(!0),this.eatContextual("as")?e.local=this.parseIdentifier():(this.checkReservedWord(e.imported.name,e.start,!0,!0),e.local=e.imported.__clone()),this.checkLVal(e.local,9,void 0,"import specifier"),t.specifiers.push(this.finishNode(e,"ImportSpecifier"))}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"checkDuplicatedProto",value:function(t,e){if(!("SpreadElement"===t.type||t.computed||t.kind||t.shorthand)){var s=t.key;"__proto__"===("Identifier"===s.type?s.name:String(s.value))&&(e.used&&!e.start&&(e.start=s.start),e.used=!0)}}},{key:"getExpression",value:function(){this.scope.enter(1),this.nextToken();var t=this.parseExpression();return this.match(o.eof)||this.unexpected(),t.comments=this.state.comments,t.errors=this.state.errors,t}},{key:"parseExpression",value:function(t,e){var s=this.state.start,i=this.state.startLoc,a=this.parseMaybeAssign(t,e);if(this.match(o.comma)){var r=this.startNodeAt(s,i);for(r.expressions=[a];this.eat(o.comma);)r.expressions.push(this.parseMaybeAssign(t,e));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return a}},{key:"parseMaybeAssign",value:function(t,e,s,i){var a,r=this.state.start,n=this.state.startLoc;if(this.isContextual("yield")){if(this.scope.inGenerator){var h=this.parseYield(t);return s&&(h=s.call(this,h,r,n)),h}this.state.exprAllowed=!1}e?a=!1:(e={start:0},a=!0),(this.match(o.parenL)||this.match(o.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(t,e,i);if(s&&(u=s.call(this,u,r,n)),this.state.type.isAssign){var l=this.startNodeAt(r,n),c=this.state.value;l.operator=c,"??="===c&&(this.expectPlugin("nullishCoalescingOperator"),this.expectPlugin("logicalAssignment")),"||="!==c&&"&&="!==c||this.expectPlugin("logicalAssignment"),l.left=this.match(o.eq)?this.toAssignable(u,void 0,"assignment expression"):u,e.start>=l.left.start&&(e.start=0),this.checkLVal(u,void 0,void 0,"assignment expression");var p,d=function t(e){return"ParenthesizedExpression"===e.type?t(e.expression):e}(u);return"ObjectPattern"===d.type?p="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===d.type&&(p="`([a]) = 0` use `([a] = 0)`"),p&&(u.extra&&u.extra.parenthesized||"ParenthesizedExpression"===u.type)&&this.raise(d.start,"You're trying to assign to a parenthesized expression, eg. instead of ".concat(p)),this.next(),l.right=this.parseMaybeAssign(t),this.finishNode(l,"AssignmentExpression")}return a&&e.start&&this.unexpected(e.start),u}},{key:"parseMaybeConditional",value:function(t,e,s){var i=this.state.start,a=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(t,e);return"ArrowFunctionExpression"===n.type&&n.start===r?n:e&&e.start?n:this.parseConditional(n,t,i,a,s)}},{key:"parseConditional",value:function(t,e,s,i,a){if(this.eat(o.question)){var r=this.startNodeAt(s,i);return r.test=t,r.consequent=this.parseMaybeAssign(),this.expect(o.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return t}},{key:"parseExprOps",value:function(t,e){var s=this.state.start,i=this.state.startLoc,a=this.state.potentialArrowAt,r=this.parseMaybeUnary(e);return"ArrowFunctionExpression"===r.type&&r.start===a?r:e&&e.start?r:this.parseExprOp(r,s,i,-1,t)}},{key:"parseExprOp",value:function(t,e,s,i,a){var r=this.state.type.binop;if(!(null==r||a&&this.match(o._in))&&r>i){var n=this.state.value;if("|>"===n&&this.state.inFSharpPipelineDirectBody)return t;var h=this.startNodeAt(e,s);h.left=t,h.operator=n,"**"!==n||"UnaryExpression"!==t.type||!this.options.createParenthesizedExpressions&&t.extra&&t.extra.parenthesized||this.raise(t.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var u=this.state.type;if(u===o.pipeline?(this.expectPlugin("pipelineOperator"),this.state.inPipeline=!0,this.checkPipelineAtInfixOperator(t,e)):u===o.nullishCoalescing&&this.expectPlugin("nullishCoalescingOperator"),this.next(),u===o.pipeline&&"minimal"===this.getPluginOption("pipelineOperator","proposal")&&this.match(o.name)&&"await"===this.state.value&&this.scope.inAsync)throw this.raise(this.state.start,'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal');if(h.right=this.parseExprOpRightExpr(u,r,a),u===o.nullishCoalescing){if(!("LogicalExpression"!==t.type||"??"===t.operator||t.extra&&t.extra.parenthesized))throw this.raise(t.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators");if(!("LogicalExpression"!==h.right.type||"??"===h.right.operator||h.right.extra&&h.right.extra.parenthesized))throw this.raise(h.right.start,"Nullish coalescing operator(??) requires parens when mixing with logical operators")}return this.finishNode(h,u===o.logicalOR||u===o.logicalAND||u===o.nullishCoalescing?"LogicalExpression":"BinaryExpression"),this.parseExprOp(h,e,s,i,a)}return t}},{key:"parseExprOpRightExpr",value:function(t,e,s){var i=this,a=this.state.start,r=this.state.startLoc;switch(t){case o.pipeline:switch(this.getPluginOption("pipelineOperator","proposal")){case"smart":return this.withTopicPermittingContext((function(){return i.parseSmartPipelineBody(i.parseExprOpBaseRightExpr(t,e,s),a,r)}));case"fsharp":return this.withSoloAwaitPermittingContext((function(){return i.parseFSharpPipelineBody(e,s)}))}default:return this.parseExprOpBaseRightExpr(t,e,s)}}},{key:"parseExprOpBaseRightExpr",value:function(t,e,s){var i=this.state.start,a=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnary(),i,a,t.rightAssociative?e-1:e,s)}},{key:"parseMaybeUnary",value:function(t){if(this.isContextual("await")&&this.isAwaitAllowed())return this.parseAwait();if(this.state.type.prefix){var e=this.startNode(),s=this.match(o.incDec);if(e.operator=this.state.value,e.prefix=!0,"throw"===e.operator&&this.expectPlugin("throwExpressions"),this.next(),e.argument=this.parseMaybeUnary(),t&&t.start&&this.unexpected(t.start),s)this.checkLVal(e.argument,void 0,void 0,"prefix operation");else if(this.state.strict&&"delete"===e.operator){var i=e.argument;"Identifier"===i.type?this.raise(e.start,"Deleting local variable in strict mode"):"MemberExpression"===i.type&&"PrivateName"===i.property.type&&this.raise(e.start,"Deleting a private field is not allowed")}return this.finishNode(e,s?"UpdateExpression":"UnaryExpression")}var a=this.state.start,r=this.state.startLoc,n=this.parseExprSubscripts(t);if(t&&t.start)return n;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var h=this.startNodeAt(a,r);h.operator=this.state.value,h.prefix=!1,h.argument=n,this.checkLVal(n,void 0,void 0,"postfix operation"),this.next(),n=this.finishNode(h,"UpdateExpression")}return n}},{key:"parseExprSubscripts",value:function(t){var e=this.state.start,s=this.state.startLoc,i=this.state.potentialArrowAt,a=this.parseExprAtom(t);return"ArrowFunctionExpression"===a.type&&a.start===i?a:t&&t.start?a:this.parseSubscripts(a,e,s)}},{key:"parseSubscripts",value:function(t,e,s,i){var a={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsync(t),stop:!1};do{t=this.parseSubscript(t,e,s,i,a),a.maybeAsyncArrow=!1}while(!a.stop);return t}},{key:"parseSubscript",value:function(t,e,s,i,a){if(!i&&this.eat(o.doubleColon)){var r=this.startNodeAt(e,s);return r.object=t,r.callee=this.parseNoCallExpr(),a.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s,i)}if(this.match(o.questionDot)){if(this.expectPlugin("optionalChaining"),a.optionalChainMember=!0,i&&40===this.lookaheadCharCode())return a.stop=!0,t;this.next();var n=this.startNodeAt(e,s);return this.eat(o.bracketL)?(n.object=t,n.property=this.parseExpression(),n.computed=!0,n.optional=!0,this.expect(o.bracketR),this.finishNode(n,"OptionalMemberExpression")):this.eat(o.parenL)?(n.callee=t,n.arguments=this.parseCallExpressionArguments(o.parenR,!1),n.optional=!0,this.finishCallExpression(n,!0)):(n.object=t,n.property=this.parseIdentifier(!0),n.computed=!1,n.optional=!0,this.finishNode(n,"OptionalMemberExpression"))}if(this.eat(o.dot)){var h=this.startNodeAt(e,s);return h.object=t,h.property=this.parseMaybePrivateName(),h.computed=!1,"PrivateName"===h.property.type&&"Super"===h.object.type&&this.raise(e,"Private fields can't be accessed on super"),a.optionalChainMember?(h.optional=!1,this.finishNode(h,"OptionalMemberExpression")):this.finishNode(h,"MemberExpression")}if(this.eat(o.bracketL)){var u=this.startNodeAt(e,s);return u.object=t,u.property=this.parseExpression(),u.computed=!0,this.expect(o.bracketR),a.optionalChainMember?(u.optional=!1,this.finishNode(u,"OptionalMemberExpression")):this.finishNode(u,"MemberExpression")}if(!i&&this.match(o.parenL)){var l=this.state.maybeInArrowParameters,c=this.state.yieldPos,p=this.state.awaitPos;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.next();var d=this.startNodeAt(e,s);return d.callee=t,d.arguments=this.parseCallExpressionArguments(o.parenR,a.maybeAsyncArrow,"Import"===t.type,"Super"!==t.type,d),this.finishCallExpression(d,a.optionalChainMember),a.maybeAsyncArrow&&this.shouldParseAsyncArrow()?(a.stop=!0,d=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e,s),d),this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=c,this.state.awaitPos=p):(this.toReferencedListDeep(d.arguments),-1!==c&&(this.state.yieldPos=c),(this.isAwaitAllowed()||l)&&-1===p||(this.state.awaitPos=p)),this.state.maybeInArrowParameters=l,d}return this.match(o.backQuote)?this.parseTaggedTemplateExpression(e,s,t,a):(a.stop=!0,t)}},{key:"parseTaggedTemplateExpression",value:function(t,e,s,i,a){var r=this.startNodeAt(t,e);return r.tag=s,r.quasi=this.parseTemplate(!0),a&&(r.typeParameters=a),i.optionalChainMember&&this.raise(t,"Tagged Template Literals are not allowed in optionalChain"),this.finishNode(r,"TaggedTemplateExpression")}},{key:"atPossibleAsync",value:function(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEnd===t.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(t.start,t.end)}},{key:"finishCallExpression",value:function(t,e){if("Import"===t.callee.type)if(1!==t.arguments.length)this.raise(t.start,"import() requires exactly one argument");else{var s=t.arguments[0];s&&"SpreadElement"===s.type&&this.raise(s.start,"... is not allowed in import()")}return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}},{key:"parseCallExpressionArguments",value:function(t,e,s,i,a){var r,n=[],h=!0,u=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(h)h=!1;else if(this.expect(o.comma),this.match(t)){s&&this.raise(this.state.lastTokStart,"Trailing comma is disallowed inside import(...) arguments"),a&&this.addExtra(a,"trailingComma",this.state.lastTokStart),this.next();break}this.match(o.parenL)&&!r&&(r=this.state.start),n.push(this.parseExprListItem(!1,e?{start:0}:void 0,e?{start:0}:void 0,i))}return e&&r&&this.shouldParseAsyncArrow()&&this.unexpected(),this.state.inFSharpPipelineDirectBody=u,n}},{key:"shouldParseAsyncArrow",value:function(){return this.match(o.arrow)&&!this.canInsertSemicolon()}},{key:"parseAsyncArrowFromCallExpression",value:function(t,e){var s;return this.expect(o.arrow),this.parseArrowExpression(t,e.arguments,!0,null===(s=e.extra)||void 0===s?void 0:s.trailingComma),t}},{key:"parseNoCallExpr",value:function(){var t=this.state.start,e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,e,!0)}},{key:"parseExprAtom",value:function(t){this.state.type===o.slash&&this.readRegexp();var e,s=this.state.potentialArrowAt===this.state.start;switch(this.state.type){case o._super:return e=this.startNode(),this.next(),!this.match(o.parenL)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(e.start,"super is only allowed in object methods and classes"):this.raise(e.start,"super() is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?"),this.match(o.parenL)||this.match(o.bracketL)||this.match(o.dot)||this.raise(e.start,"super can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop])"),this.finishNode(e,"Super");case o._import:return e=this.startNode(),this.next(),this.match(o.dot)?this.parseImportMetaProperty(e):(this.expectPlugin("dynamicImport",e.start),this.match(o.parenL)||this.unexpected(null,o.parenL),this.finishNode(e,"Import"));case o._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case o.name:e=this.startNode();var i=this.state.containsEsc,a=this.parseIdentifier();if(!i&&"async"===a.name&&this.match(o._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(e,void 0,!0);if(s&&!i&&"async"===a.name&&this.match(o.name)&&!this.canInsertSemicolon()){var r=[this.parseIdentifier()];return this.expect(o.arrow),this.parseArrowExpression(e,r,!0),e}return s&&this.match(o.arrow)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(e,[a],!1),e):a;case o._do:this.expectPlugin("doExpressions");var n=this.startNode();this.next();var h=this.state.labels;return this.state.labels=[],n.body=this.parseBlock(),this.state.labels=h,this.finishNode(n,"DoExpression");case o.regexp:var u=this.state.value;return(e=this.parseLiteral(u.value,"RegExpLiteral")).pattern=u.pattern,e.flags=u.flags,e;case o.num:return this.parseLiteral(this.state.value,"NumericLiteral");case o.bigint:return this.parseLiteral(this.state.value,"BigIntLiteral");case o.string:return this.parseLiteral(this.state.value,"StringLiteral");case o._null:return e=this.startNode(),this.next(),this.finishNode(e,"NullLiteral");case o._true:case o._false:return this.parseBooleanLiteral();case o.parenL:return this.parseParenAndDistinguishExpression(s);case o.bracketL:var l=this.state.inFSharpPipelineDirectBody;return this.state.inFSharpPipelineDirectBody=!1,e=this.startNode(),this.next(),e.elements=this.parseExprList(o.bracketR,!0,t,e),this.state.maybeInArrowParameters||this.toReferencedList(e.elements),this.state.inFSharpPipelineDirectBody=l,this.finishNode(e,"ArrayExpression");case o.braceL:var c=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;var p=this.parseObj(!1,t);return this.state.inFSharpPipelineDirectBody=c,p;case o._function:return this.parseFunctionExpression();case o.at:this.parseDecorators();case o._class:return e=this.startNode(),this.takeDecorators(e),this.parseClass(e,!1);case o._new:return this.parseNew();case o.backQuote:return this.parseTemplate(!1);case o.doubleColon:e=this.startNode(),this.next(),e.object=null;var d=e.callee=this.parseNoCallExpr();if("MemberExpression"===d.type)return this.finishNode(e,"BindExpression");throw this.raise(d.start,"Binding should be performed on object property.");case o.hash:if(this.state.inPipeline)return e=this.startNode(),"smart"!==this.getPluginOption("pipelineOperator","proposal")&&this.raise(e.start,"Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option."),this.next(),this.primaryTopicReferenceIsAllowedInCurrentTopicContext()||this.raise(e.start,"Topic reference was used in a lexical context without topic binding"),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference");default:throw this.unexpected()}}},{key:"parseBooleanLiteral",value:function(){var t=this.startNode();return t.value=this.match(o._true),this.next(),this.finishNode(t,"BooleanLiteral")}},{key:"parseMaybePrivateName",value:function(){if(this.match(o.hash)){this.expectOnePlugin(["classPrivateProperties","classPrivateMethods"]);var t=this.startNode();return this.next(),this.assertNoSpace("Unexpected space between # and identifier"),t.id=this.parseIdentifier(!0),this.finishNode(t,"PrivateName")}return this.parseIdentifier(!0)}},{key:"parseFunctionExpression",value:function(){var t=this.startNode(),e=this.startNode();return this.next(),e=this.createIdentifier(e,"function"),this.scope.inGenerator&&this.eat(o.dot)?this.parseMetaProperty(t,e,"sent"):this.parseFunction(t)}},{key:"parseMetaProperty",value:function(t,e,s){t.meta=e,"function"===e.name&&"sent"===s&&(this.isContextual(s)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected());var i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(t.property.start,"The only valid meta property for ".concat(e.name," is ").concat(e.name,".").concat(s)),this.finishNode(t,"MetaProperty")}},{key:"parseImportMetaProperty",value:function(t){var e=this.createIdentifier(this.startNodeAtNode(t),"import");return this.expect(o.dot),this.isContextual("meta")?(this.expectPlugin("importMeta"),this.inModule||this.raise(e.start,"import.meta may appear only with 'sourceType: \"module\"'",{code:"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"}),this.sawUnambiguousESM=!0):this.hasPlugin("importMeta")||this.raise(e.start,"Dynamic imports require a parameter: import('a.js')"),this.parseMetaProperty(t,e,"meta")}},{key:"parseLiteral",value:function(t,e,s,i){s=s||this.state.start,i=i||this.state.startLoc;var a=this.startNodeAt(s,i);return this.addExtra(a,"rawValue",t),this.addExtra(a,"raw",this.input.slice(s,this.state.end)),a.value=t,this.next(),this.finishNode(a,e)}},{key:"parseParenAndDistinguishExpression",value:function(t){var e,s=this.state.start,i=this.state.startLoc;this.expect(o.parenL);var a=this.state.maybeInArrowParameters,r=this.state.yieldPos,n=this.state.awaitPos,h=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.yieldPos=-1,this.state.awaitPos=-1,this.state.inFSharpPipelineDirectBody=!1;for(var u,l,c=this.state.start,p=this.state.startLoc,d=[],f={start:0},m={start:0},y=!0;!this.match(o.parenR);){if(y)y=!1;else if(this.expect(o.comma,m.start||null),this.match(o.parenR)){l=this.state.start;break}if(this.match(o.ellipsis)){var D=this.state.start,v=this.state.startLoc;u=this.state.start,d.push(this.parseParenItem(this.parseRestBinding(),D,v)),this.checkCommaAfterRest(41);break}d.push(this.parseMaybeAssign(!1,f,this.parseParenItem,m))}var x=this.state.start,g=this.state.startLoc;this.expect(o.parenR),this.state.maybeInArrowParameters=a,this.state.inFSharpPipelineDirectBody=h;var k=this.startNodeAt(s,i);if(t&&this.shouldParseArrow()&&(k=this.parseArrow(k))){this.checkYieldAwaitInDefaultParams(),this.state.yieldPos=r,this.state.awaitPos=n;for(var P=0;P1?((e=this.startNodeAt(c,p)).expressions=d,this.finishNodeAt(e,"SequenceExpression",x,g)):e=d[0],!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",s),e;var E=this.startNodeAt(s,i);return E.expression=e,this.finishNode(E,"ParenthesizedExpression"),E}},{key:"shouldParseArrow",value:function(){return!this.canInsertSemicolon()}},{key:"parseArrow",value:function(t){if(this.eat(o.arrow))return t}},{key:"parseParenItem",value:function(t,e,s){return t}},{key:"parseNew",value:function(){var t=this.startNode(),e=this.startNode();if(this.next(),e=this.createIdentifier(e,"new"),this.eat(o.dot)){var s=this.parseMetaProperty(t,e,"target");if(!this.scope.inNonArrowFunction&&!this.state.inClassProperty){var i="new.target can only be used in functions";this.hasPlugin("classProperties")&&(i+=" or class properties"),this.raise(s.start,i)}return s}return t.callee=this.parseNoCallExpr(),"Import"===t.callee.type?this.raise(t.callee.start,"Cannot use new with import(...)"):"OptionalMemberExpression"===t.callee.type||"OptionalCallExpression"===t.callee.type?this.raise(this.state.lastTokEnd,"constructors in/after an Optional Chain are not allowed"):this.eat(o.questionDot)&&this.raise(this.state.start,"constructors in/after an Optional Chain are not allowed"),this.parseNewArguments(t),this.finishNode(t,"NewExpression")}},{key:"parseNewArguments",value:function(t){if(this.eat(o.parenL)){var e=this.parseExprList(o.parenR);this.toReferencedList(e),t.arguments=e}else t.arguments=[]}},{key:"parseTemplateElement",value:function(t){var e=this.startNode();return null===this.state.value&&(t?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition||0,"Invalid escape sequence in template")),e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(o.backQuote),this.finishNode(e,"TemplateElement")}},{key:"parseTemplate",value:function(t){var e=this.startNode();this.next(),e.expressions=[];var s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)this.expect(o.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(o.braceR),e.quasis.push(s=this.parseTemplateElement(t));return this.next(),this.finishNode(e,"TemplateLiteral")}},{key:"parseObj",value:function(t,e){var s=Object.create(null),i=!0,a=this.startNode();for(a.properties=[],this.next();!this.eat(o.braceR);){if(i)i=!1;else if(this.expect(o.comma),this.match(o.braceR)){this.addExtra(a,"trailingComma",this.state.lastTokStart),this.next();break}var r=this.parseObjectMember(t,e);t||this.checkDuplicatedProto(r,s),r.shorthand&&this.addExtra(r,"shorthand",!0),a.properties.push(r)}return this.match(o.eq)||void 0===s.start||this.raise(s.start,"Redefinition of __proto__ property"),this.finishNode(a,t?"ObjectPattern":"ObjectExpression")}},{key:"isAsyncProp",value:function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.match(o.name)||this.match(o.num)||this.match(o.string)||this.match(o.bracketL)||this.state.type.keyword||this.match(o.star))&&!this.hasPrecedingLineBreak()}},{key:"parseObjectMember",value:function(t,e){var s=[];if(this.match(o.at))for(this.hasPlugin("decorators")&&this.raise(this.state.start,"Stage 2 decorators disallow object literal property decorators");this.match(o.at);)s.push(this.parseDecorator());var i,a,r=this.startNode(),n=!1,h=!1;if(this.match(o.ellipsis))return s.length&&this.unexpected(),t?(this.next(),r.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(r,"RestElement")):this.parseSpread();s.length&&(r.decorators=s,s=[]),r.method=!1,(t||e)&&(i=this.state.start,a=this.state.startLoc),t||(n=this.eat(o.star));var u=this.state.containsEsc;return this.parsePropertyName(r),t||u||n||!this.isAsyncProp(r)?h=!1:(h=!0,n=this.eat(o.star),this.parsePropertyName(r)),this.parseObjPropValue(r,i,a,n,h,t,e,u),r}},{key:"isGetterOrSetterMethod",value:function(t,e){return!e&&!t.computed&&"Identifier"===t.key.type&&("get"===t.key.name||"set"===t.key.name)&&(this.match(o.string)||this.match(o.num)||this.match(o.bracketL)||this.match(o.name)||!!this.state.type.keyword)}},{key:"getGetterSetterExpectedParamCount",value:function(t){return"get"===t.kind?0:1}},{key:"checkGetterSetterParams",value:function(t){var e=this.getGetterSetterExpectedParamCount(t),s=t.start;t.params.length!==e&&("get"===t.kind?this.raise(s,"getter must not have any formal parameters"):this.raise(s,"setter must have exactly one formal parameter")),"set"===t.kind&&"RestElement"===t.params[t.params.length-1].type&&this.raise(s,"setter function argument must not be a rest parameter")}},{key:"parseObjectMethod",value:function(t,e,s,i,a){return s||e||this.match(o.parenL)?(i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")):!a&&this.isGetterOrSetterMethod(t,i)?((e||s)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),this.parseMethod(t,!1,!1,!1,!1,"ObjectMethod"),this.checkGetterSetterParams(t),t):void 0}},{key:"parseObjectProperty",value:function(t,e,s,i,a){return t.shorthand=!1,this.eat(o.colon)?(t.value=i?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,a),this.finishNode(t,"ObjectProperty")):t.computed||"Identifier"!==t.key.type?void 0:(this.checkReservedWord(t.key.name,t.key.start,!0,!0),i?t.value=this.parseMaybeDefault(e,s,t.key.__clone()):this.match(o.eq)&&a?(a.start||(a.start=this.state.start),t.value=this.parseMaybeDefault(e,s,t.key.__clone())):t.value=t.key.__clone(),t.shorthand=!0,this.finishNode(t,"ObjectProperty"))}},{key:"parseObjPropValue",value:function(t,e,s,i,a,r,n,o){var h=this.parseObjectMethod(t,i,a,r,o)||this.parseObjectProperty(t,e,s,r,n);return h||this.unexpected(),h}},{key:"parsePropertyName",value:function(t){if(this.eat(o.bracketL))t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(o.bracketR);else{var e=this.state.inPropertyName;this.state.inPropertyName=!0,t.key=this.match(o.num)||this.match(o.string)?this.parseExprAtom():this.parseMaybePrivateName(),"PrivateName"!==t.key.type&&(t.computed=!1),this.state.inPropertyName=e}return t.key}},{key:"initFunction",value:function(t,e){t.id=null,t.generator=!1,t.async=!!e}},{key:"parseMethod",value:function(t,e,s,i,a,r){var n=arguments.length>6&&void 0!==arguments[6]&&arguments[6],o=this.state.yieldPos,h=this.state.awaitPos;this.state.yieldPos=-1,this.state.awaitPos=-1,this.initFunction(t,s),t.generator=!!e;var u=i;return this.scope.enter(64|p(s,t.generator)|(n?256:0)|(a?128:0)),this.parseFunctionParams(t,u),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBodyAndFinish(t,r,!0),this.scope.exit(),this.state.yieldPos=o,this.state.awaitPos=h,t}},{key:"parseArrowExpression",value:function(t,e,s,i){this.scope.enter(16|p(s,!1)),this.initFunction(t,s);var a=this.state.maybeInArrowParameters,r=this.state.yieldPos,n=this.state.awaitPos;return this.state.maybeInArrowParameters=!1,this.state.yieldPos=-1,this.state.awaitPos=-1,e&&this.setArrowFunctionParameters(t,e,i),this.parseFunctionBody(t,!0),this.scope.exit(),this.state.maybeInArrowParameters=a,this.state.yieldPos=r,this.state.awaitPos=n,this.finishNode(t,"ArrowFunctionExpression")}},{key:"setArrowFunctionParameters",value:function(t,e,s){t.params=this.toAssignableList(e,!0,"arrow function parameters",s)}},{key:"isStrictBody",value:function(t){if("BlockStatement"===t.body.type&&t.body.directives.length)for(var e=0,s=t.body.directives;e2&&void 0!==arguments[2]&&arguments[2];this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}},{key:"parseFunctionBody",value:function(t,e){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e&&!this.match(o.braceL),a=this.state.strict,r=!1,n=this.state.inParameters;if(this.state.inParameters=!1,i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{var h=!this.isSimpleParamList(t.params);if((!a||h)&&(r=this.strictDirective(this.state.end))&&h){var u="method"!==t.kind&&"constructor"!==t.kind||!t.key?t.start:t.key.end;this.raise(u,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.state.labels;this.state.labels=[],r&&(this.state.strict=!0),this.checkParams(t,!(a||r||e||s||h),e,!a&&r),t.body=this.parseBlock(!0,!1),this.state.labels=l}this.state.inParameters=n,this.state.strict&&t.id&&this.checkLVal(t.id,65,void 0,"function name",void 0,!a&&r),this.state.strict=a}},{key:"isSimpleParamList",value:function(t){for(var e=0,s=t.length;e3&&void 0!==arguments[3])||arguments[3],a=Object.create(null),r=0;r" after pipeline body; arrow function in pipeline body must be parenthesized');"PipelineTopicExpression"===e&&"SequenceExpression"===t.type&&this.raise(s,"Pipeline body may not be a comma-separated sequence expression")}},{key:"parseSmartPipelineBodyInStyle",value:function(t,e,s,i){var a=this.startNodeAt(s,i);switch(e){case"PipelineBareFunction":a.callee=t;break;case"PipelineBareConstructor":a.callee=t.callee;break;case"PipelineBareAwaitedFunction":a.callee=t.argument;break;case"PipelineTopicExpression":this.topicReferenceWasUsedInCurrentTopicContext()||this.raise(s,"Pipeline is in topic style but does not use topic reference"),a.expression=t;break;default:throw new Error("Internal @babel/parser error: Unknown pipeline style (".concat(e,")"))}return this.finishNode(a,e)}},{key:"checkSmartPipelineBodyStyle",value:function(t){return t.type,this.isSimpleReference(t)?"PipelineBareFunction":"PipelineTopicExpression"}},{key:"isSimpleReference",value:function(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}},{key:"withTopicPermittingContext",value:function(t){var e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}},{key:"withTopicForbiddingContext",value:function(t){var e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}},{key:"withSoloAwaitPermittingContext",value:function(t){var e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}},{key:"registerTopicReference",value:function(){this.state.topicContext.maxTopicIndex=0}},{key:"primaryTopicReferenceIsAllowedInCurrentTopicContext",value:function(){return this.state.topicContext.maxNumOfResolvableTopics>=1}},{key:"topicReferenceWasUsedInCurrentTopicContext",value:function(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}},{key:"parseFSharpPipelineBody",value:function(t,e){var s=this.state.start,i=this.state.startLoc;this.state.potentialArrowAt=this.state.start;var a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;var r=this.parseExprOp(this.parseMaybeUnary(),s,i,t,e);return this.state.inFSharpPipelineDirectBody=a,r}}]),e}(function(t){function e(){return d(this,e),g(this,D(e).apply(this,arguments))}return y(e,t),m(e,[{key:"toAssignable",value:function(t,e,s){var i;if(t)switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":t.type="ObjectPattern";for(var a=0,r=t.properties.length,n=r-1;a1&&void 0!==arguments[1]?arguments[1]:64,s=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5];switch(t.type){case"Identifier":if(this.state.strict&&(r?M(t.name,this.inModule):O(t.name))&&this.raise(t.start,"".concat(64===e?"Assigning to":"Binding"," '").concat(t.name,"' in strict mode")),s){var n="_".concat(t.name);s[n]?this.raise(t.start,"Argument name clash"):s[n]=!0}a&&"let"===t.name&&this.raise(t.start,"'let' is not allowed to be used as a name in 'let' or 'const' declarations."),64&e||this.scope.declareName(t.name,e,t.start);break;case"MemberExpression":64!==e&&this.raise(t.start,"Binding member expression");break;case"ObjectPattern":for(var o=0,h=t.properties;o1&&void 0!==arguments[1]?arguments[1]:this.state.lastTokEnd,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.state.lastTokEndLoc;t.end=e,t.loc.end=s,this.options.ranges&&(t.range[1]=e)}},{key:"resetStartLocationFromNode",value:function(t,e){this.resetStartLocation(t,e.start,e.loc.start)}}]),e}(At)))));function St(t,e){var s=Nt;return t&&t.plugins&&(!function(t){if(ut(t,"decorators")){if(ut(t,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");var e=lt(t,"decorators","decoratorsBeforeExport");if(null==e)throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you are migrating from Babylon/Babel 6 or want to use the old decorators proposal, you should use the 'decorators-legacy' plugin instead of 'decorators'.");if("boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean.")}if(ut(t,"flow")&&ut(t,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(ut(t,"placeholders")&&ut(t,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(ut(t,"pipelineOperator")&&-1===ct.indexOf(lt(t,"pipelineOperator","proposal")))throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: "+ct.map((function(t){return"'".concat(t,"'")})).join(", "))}(t.plugins),s=function(t){var e=dt.filter((function(e){return ut(t,e)})),s=e.join("/"),i=It[s];if(!i){i=Nt;for(var a=0;at)return{line:r+1,column:t-(e[r-1]||0)+1,offset:t};return{}}}function w(e){return function(t){var r=t&&t.line,n=t&&t.column;if(!isNaN(r)&&!isNaN(n)&&r-1 in e)return(e[r-2]||0)+n-1||0;return-1}}var k=function(e,t){return function(r){var n,i=0,a=r.indexOf("\\"),o=e[t],u=[];for(;-1!==a;)u.push(r.slice(i,a)),i=a+1,(n=r.charAt(i))&&-1!==o.indexOf(n)||u.push("\\"),a=r.indexOf("\\",i);return u.push(r.slice(i)),u.join("")}};var T={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:"‌"},_=Object.freeze({__proto__:null,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:"≪",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:"Ƶ",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:"‌",default:T}),S={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:"ÿ"},F=Object.freeze({__proto__:null,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:"ÿ",default:S}),x=Object.freeze({__proto__:null,default:{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:"Ÿ"}}),q=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57};var N=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var L=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var B=function(e){return L(e)||q(e)};var P=D(_),O=D(F),R=D(x),I=function(e,t){var r,n,i={};t||(t={});for(n in te)r=t[n],i[n]=null==r?te[n]:r;(i.position.indent||i.position.start)&&(i.indent=i.position.indent||[],i.position=i.position.start);return function(e,t){var r,n,i,a,o,u,s,c,l,p,f,h,d,D,g,m,v,b,y=t.additional,E=t.nonTerminated,C=t.text,A=t.reference,w=t.warning,k=t.textContext,T=t.referenceContext,_=t.warningContext,S=t.position,F=t.indent||[],x=e.length,q=0,N=-1,L=S.column||1,I=S.line||1,te=K,de=[];g=ge(),s=w?function(e,t){var r=ge();r.column+=t,r.offset+=t,w.call(_,me[e],r,e)}:V,q--,x++;for(;++q=55296&&De<=57343||De>1114111?(s(he,v),o=M):o in R?(s(fe,v),o=R[o]):(l=K,ve(o)&&s(fe,v),o>65535&&(l+=$((o-=65536)>>>10|55296),o=56320|1023&o),o=l+$(o))):d!==re&&s(le,v)),o?(ye(),g=ge(),q=b-1,L+=b-h+1,de.push(o),(m=ge()).offset++,A&&A.call(T,o,{start:g,end:m},e.slice(h-1,b)),g=m):(i=e.slice(h-1,b),te+=i,L+=i.length,q=b-1)}var De;return de.join(K);function ge(){return{line:I,column:L,offset:q+(S.offset||0)}}function be(t){return e.charAt(t)}function ye(){te&&(de.push(te),C&&C.call(k,te,{start:g,end:ge()}),te=K)}}(e,i)},U={}.hasOwnProperty,$=String.fromCharCode,V=Function.prototype,M="�",j="\f",z="&",G="#",H=";",X="\n",W="x",Q="X",Y=" ",Z="<",J="=",K="",ee="\t",te={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},re="named",ne="hexadecimal",ie="decimal",ae={};ae[ne]=16,ae[ie]=10;var oe={};oe[re]=B,oe[ie]=q,oe[ne]=N;var ue=1,se=2,ce=3,le=4,pe=5,fe=6,he=7,de="Numeric character references",De=" must be terminated by a semicolon",ge=" cannot be empty",me={};function ve(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}me[ue]="Named character references"+De,me[se]=de+De,me[ce]="Named character references"+ge,me[le]=de+ge,me[pe]="Named character references must be known",me[fe]=de+" cannot be disallowed",me[he]=de+" cannot be outside the permissible Unicode range";var be=function(e){return n.raw=function(e,n,i){return I(e,p(i,{position:t(n),warning:r}))},n;function t(t){for(var r=e.offset,n=t.line,i=[];++n&&n in r;)i.push((r[n]||0)+1);return{start:t,indent:i}}function r(t,r,n){3!==n&&e.file.message(t,r)}function n(n,i,a){I(n,{position:t(i),warning:r,text:a,reference:a,textContext:e,referenceContext:e})}};var ye=function(e){return function(t,r){var n,i,a,o,u,s,c=this,l=c.offset,p=[],f=c[e+"Methods"],h=c[e+"Tokenizers"],d=r.line,D=r.column;if(!t)return p;b.now=m,b.file=c.file,g("");for(;t;){for(n=-1,i=f.length,u=!1;++n"],ke=we.concat(["~","|"]),Te=ke.concat(["\n",'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);function _e(e){var t=e||{};return t.commonmark?Te:t.gfm?ke:we}_e.default=we,_e.gfm=ke,_e.commonmark=Te;var Se={position:!0,gfm:!0,commonmark:!1,footnotes:!1,pedantic:!1,blocks:D(Object.freeze({__proto__:null,default:["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"]}))},Fe=function(e){var r,n,i=this.options;if(null==e)e={};else{if("object"!==t(e))throw new Error("Invalid value `"+e+"` for setting `options`");e=p(e)}for(r in Se){if(null==(n=e[r])&&(n=i[r]),"blocks"!==r&&"boolean"!=typeof n||"blocks"===r&&"object"!==t(n))throw new Error("Invalid value `"+n+"` for setting `options."+r+"`");e[r]=n}return this.options=e,this.escape=Ae(e),this};var xe=function(e,t,r,n){"function"==typeof t&&(n=r,r=t,t=null);function i(e,a,o){var u;return a=a||(o?0:null),t&&e.type!==t||(u=r(e,a,o||null)),e.children&&!1!==u?function(e,t){var r,a=n?-1:1,o=e.length,u=(n?o:-1)+a;for(;u>-1&&u - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */;var Ve,Me="",je=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var r=e.length*t;if(Ve!==e||void 0===Ve)Ve=e,Me="";else if(Me.length>=r)return Me.substr(0,r);for(;r>Me.length&&t>1;)1&t&&(Me+=e),t>>=1,e+=e;return Me=(Me+=e).substr(0,r)};var ze=function(e){var t=String(e),r=t.length;for(;t.charAt(--r)===Ge;);return t.slice(0,r+1)},Ge="\n";var He=function(e,t,r){var n,i,a,o=-1,u=t.length,s="",c="",l="",p="";for(;++o=it)){for(u="";gmt)return;if(!a||!o.pedantic&&t.charAt(s+1)===gt)return;u=t.length+1,i="";for(;++s=kt&&(!n||n===bt)?(c+=o,!!r||e(c)({type:"thematicBreak"})):void 0;o+=n}},bt="\n",yt="\t",Et=" ",Ct="*",At="_",wt="-",kt=3;var Tt=function(e){var t,r=0,n=0,i=e.charAt(r),a={};for(;i in _t;)t=_t[i],n+=t,t>1&&(n=Math.floor(n/t)*t),a[n]=r,i=e.charAt(++r);return{indent:n,stops:a}},_t={" ":1,"\t":4};var St=function(e,t){var r,n,i,a,o=e.split(xt),u=o.length+1,s=1/0,c=[];o.unshift(je(Ft,t)+"!");for(;u--;)if(n=Tt(o[u]),c[u]=n.stops,0!==at(o[u]).length){if(!n.indent){s=1/0;break}n.indent>0&&n.indent=$t)return;if(o=t.charAt(N),n=_?Wt:Xt,!0===Ht[o])u=o,a=!1;else{for(a=!0,i="";N=$t&&(T=!0),b&&P>=b.indent&&(T=!0),o=t.charAt(N),p=null,!T){if(!0===Ht[o])p=o,N++,P++;else{for(i="";N=b.indent||P>$t):T=!0,l=!1,N=c;if(h=t.slice(c,s),f=c===N?h:t.slice(N,s),(p===Lt||p===Bt||p===Pt)&&F.thematicBreak.call(this,e,h,!0))break;if(d=D,D=!at(f).length,T&&b)b.value=b.value.concat(v,h),m=m.concat(v,h),v=[];else if(l)0!==v.length&&(b.value.push(""),b.trail=v.concat()),b={value:[h],indent:P,trail:[]},g.push(b),m=m.concat(v,h),v=[];else if(D){if(d)break;v.push(h)}else{if(d)break;if(ot(x,F,this,[e,h,!0]))break;b.value=b.value.concat(v,h),m=m.concat(v,h),v=[]}N=s+1}A=e(m.join(Rt)).reset({type:"list",ordered:a,start:B,loose:null,children:[]}),y=this.enterList(),E=this.enterBlock(),C=!1,N=-1,L=g.length;for(;++N=rr){l--;break}p+=a}n="",i="";for(;++l`\\u0000-\\u0020]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ar="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",or={openCloseTag:new RegExp("^(?:"+ir+"|"+ar+")"),tag:new RegExp("^(?:"+ir+"|"+ar+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|]*>|)")},ur=or.openCloseTag,sr=function(e,t,r){var n,i,a,o,u,s,c,l=this.options.blocks,p=t.length,f=0,h=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(ur.source+"\\s*$"),/^$/,!1]];for(;fw){if(y1&&(p?(o+=l.slice(0,l.length-1),l=l.charAt(l.length-1)):(o+=l,l="")),v=e.now(),e(o)({type:"tableCell",children:this.tokenizeInline(d,v)},u)),e(l+p),l="",d=""}else if(l&&(d+=l,l=""),d+=p,p===zr&&n!==s-2&&(d+=E.charAt(n+1),n++),p===Gr){for(g=1;E.charAt(n+1)===p;)d+=p,n++,g++;m?g>=m&&(m=0):m=g}D=!1,n++}else d?l+=p:e(p),n++;b||e(Yr+i)}return A},zr="\\",Gr="`",Hr="-",Xr="|",Wr=":",Qr=" ",Yr="\n",Zr="\t",Jr=1,Kr=2,en="left",tn="center",rn="right",nn=null;var an=function(e,t,r){var n,i,a,o,u,s=this.options,c=s.commonmark,l=s.gfm,p=this.blockTokenizers,f=this.interruptParagraph,h=t.indexOf(on),d=t.length;for(;h=cn){h=t.indexOf(on,h+1);continue}}if(i=t.slice(h+1),ot(f,p,this,[e,i,!0]))break;if(p.list.call(this,e,i,!0)&&(this.inList||c||l&&!q(at.left(i).charAt(0))))break;if(n=h,-1!==(h=t.indexOf(on,h+1))&&""===at(t.slice(n,h))){h=n;break}}if(i=t.slice(0,h),""===at(i))return e(i),null;if(r)return!0;return u=e.now(),i=ze(i),e(i)({type:"paragraph",children:this.tokenizeInline(i,u)})},on="\n",un="\t",sn=" ",cn=4;var ln=function(e,t){return e.indexOf("\\",t)};var pn=fn;function fn(e,t,r){var n,i;if("\\"===t.charAt(0)&&(n=t.charAt(1),-1!==this.escape.indexOf(n)))return!!r||(i="\n"===n?{type:"break"}:{type:"text",value:n},e("\\"+n)(i))}fn.locator=ln;var hn=function(e,t){return e.indexOf("<",t)};var dn=En;En.locator=hn,En.notInLink=!0;var Dn="<",gn=">",mn="@",vn="/",bn="mailto:",yn=bn.length;function En(e,t,r){var n,i,a,o,u,s,c,l,p,f,h;if(t.charAt(0)===Dn){for(this,n="",i=t.length,a=0,o="",s=!1,c="",a++,n=Dn;a/i;function Un(e,t,r){var n,i,a=t.length;if(!("<"!==t.charAt(0)||a<3)&&(n=t.charAt(1),(L(n)||"?"===n||"!"===n||"/"===n)&&(i=t.match(Pn))))return!!r||(i=i[0],!this.inLink&&Rn.test(i)?this.inLink=!0:this.inLink&&In.test(i)&&(this.inLink=!1),e(i)({type:"html",value:i}))}var $n=function(e,t){var r=e.indexOf("[",t),n=e.indexOf("![",t);if(-1===n)return r;return r",Yn="`",Zn={'"':'"',"'":"'"},Jn={};function Kn(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d,D,g,m,v,b,y,E,C="",A=0,w=t.charAt(0),k=this.options.pedantic,T=this.options.commonmark,_=this.options.gfm;if("!"===w&&(p=!0,C=w,w=t.charAt(++A)),w===zn&&(p||!this.inLink)){for(C+=w,m="",A++,d=t.length,g=0,(b=e.now()).column+=A,b.offset+=A;A=a&&(a=0):a=i}else if(w===jn)A++,s+=t.charAt(A);else if(a&&!_||w!==zn){if((!a||_)&&w===Gn){if(!g){if(!k)for(;At&&" "===e.charAt(r-1);)r--;return r};var Pi=Ri;Ri.locator=Bi;var Oi=2;function Ri(e,t,r){for(var n,i=t.length,a=-1,o="";++a1)for(var r=1;r - * @license MIT - */function Ma(e){var t,r,n;if(e){if("string"==typeof e||Ra(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof Ma))return new Ma(e);for(this.data={},this.messages=[],this.history=[],this.cwd=Ba.cwd(),r=-1,n=Va.length;++ra.length;o&&a.push(n);try{t=e.apply(null,a)}catch(e){if(o&&r)throw e;return n(e)}o||(t&&"function"==typeof t.then?t.then(i,n):t instanceof Error?n(t):i(t))};function n(){r||(r=!0,t.apply(null,arguments))}function i(e){n(null,e)}}(o,i).apply(null,r):n.apply(null,[null].concat(r))}}).apply(null,[null].concat(r))},t.use=function(r){if("function"!=typeof r)throw new Error("Expected `fn` to be a function, not "+r);return e.push(r),t},t},Qa=[].slice;var Ya=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},Za=function e(){var r=[];var n=Wa();var i={};var a=!1;var o=-1;u.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(io("data",a),i[e]=t,u):Ka.call(i,e)&&i[e]||null;if(e)return io("data",a),i=e,u;return i};u.freeze=s;u.attachers=r;u.use=function(e){var n;if(io("use",a),null==e);else if("function"==typeof e)l.apply(null,arguments);else{if("object"!==t(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?c(e):o(e)}n&&(i.settings=Ki(i.settings||{},n));return u;function o(e){c(e.plugins),e.settings&&(n=Ki(n||{},e.settings))}function s(e){if("function"==typeof e)l(e);else{if("object"!==t(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):o(e)}}function c(e){var r,n;if(null==e);else{if(!("object"===t(e)&&"length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");for(r=e.length,n=-1;++n<~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}(),""):e},bo=vo,yo=vo;bo.default=yo;var Eo=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))},Co=Eo,Ao=Eo;Co.default=Ao;var wo=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=bo(e);for(var t=0,r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=Co(n)?2:1))}return t},ko=wo,To=wo;ko.default=To;function _o(e){return function(t,r,n){var i=n&&n.backwards;if(!1===r)return!1;for(var a=t.length,o=r;o>=0&&o"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){So[e]=t}))}));var Fo=Do,xo=go,qo=mo,No=function(e){return e.length>0?e[e.length-1]:null},Lo=["liquidNode","inlineCode","emphasis","strong","delete","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"],Bo=Lo.concat(["tableCell","paragraph","heading"]),Po=new RegExp(xo),Oo=new RegExp(qo);var Ro={mapAst:function(e,t){return function e(r,n,i){var a=t(r,n,i=i||[]);return Array.isArray(a)?a:((a=Object.assign({},a)).children&&(a.children=a.children.reduce((function(t,r,n){var o=e(r,n,[a].concat(i));return Array.isArray(o)||(o=[o]),t.push.apply(t,o),t}),[])),a)}(e,null,null)},splitText:function(e,t){var r="non-cjk",n="cj-letter",i="cjk-punctuation",a=[];return("preserve"===t.proseWrap?e:e.replace(new RegExp("(".concat(Fo,")\n(").concat(Fo,")"),"g"),"$1$2")).split(/([ \t\n]+)/).forEach((function(e,t,u){t%2!=1?(0!==t&&t!==u.length-1||""!==e)&&e.split(new RegExp("(".concat(Fo,")"))).forEach((function(e,t,a){(0!==t&&t!==a.length-1||""!==e)&&(t%2!=0?o(Oo.test(e)?{type:"word",value:e,kind:i,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:e,kind:Po.test(e)?"k-letter":n,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1}):""!==e&&o({type:"word",value:e,kind:r,hasLeadingPunctuation:Oo.test(e[0]),hasTrailingPunctuation:Oo.test(No(e))}))})):a.push({type:"whitespace",value:/\n/.test(e)?"\n":" "})})),a;function o(e){var t,o,u=No(a);u&&"word"===u.type&&(u.kind===r&&e.kind===n&&!u.hasTrailingPunctuation||u.kind===n&&e.kind===r&&!e.hasLeadingPunctuation?a.push({type:"whitespace",value:" "}):(t=r,o=i,u.kind===t&&e.kind===o||u.kind===o&&e.kind===t||[u.value,e.value].some((function(e){return/\u3000/.test(e)}))||a.push({type:"whitespace",value:""}))),a.push(e)}},punctuationPattern:qo,getFencedCodeBlockValue:function(e,t){var r=t.slice(e.position.start.offset,e.position.end.offset),n=r.match(/^\s*/)[0].length,i=new RegExp("^\\s{0,".concat(n,"}")),a=r.split("\n"),o=r[n],u=r.slice(n).match(new RegExp("^[".concat(o,"]+")))[0],s=new RegExp("^\\s{0,3}".concat(u)).test(a[a.length-1].slice(c(a.length-1)));return a.slice(1,s?-1:void 0).map((function(e,t){return e.slice(c(t+1)).replace(i,"")})).join("\n");function c(t){return e.position.indent[t-1]-1}},getOrderedListItemInfo:function(e,t){var r=l(t.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/),4);return{numberText:r[1],marker:r[2],leadingSpaces:r[3]}},INLINE_NODE_TYPES:Lo,INLINE_NODE_WRAPPER_TYPES:Bo},Io=/^import\s/,Uo=/^export\s/,$o=function(e){return Io.test(e)},Vo=function(e){return Uo.test(e)},Mo=function(e,t){var r=t.indexOf("\n\n"),n=t.slice(0,r);if(Vo(n)||$o(n))return e(n)({type:Vo(n)?"export":"import",value:n})};Mo.locator=function(e){return Vo(e)||$o(e)?-1:1};var jo={esSyntax:function(){var e=this.Parser,t=e.prototype.blockTokenizers,r=e.prototype.blockMethods;t.esSyntax=Mo,r.splice(r.indexOf("paragraph"),0,"esSyntax")},BLOCKS_REGEX:"[a-z\\.]*(\\.){0,1}[a-z][a-z0-9\\.]*",COMMENT_REGEX:"\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e"};function zo(e,t){return e.indexOf("$",t)}var Go=/^\\\$/,Ho=/^\$((?:\\\$|[^$])+)\$/,Xo=/^\$\$((?:\\\$|[^$])+)\$\$/,Wo=function(e){function t(t,r,n){var i=!0,a=Xo.exec(r);a||(a=Ho.exec(r),i=!1);var o=Go.exec(r);if(o)return!!n||t(o[0])({type:"text",value:"$"});if("\\$"===r.slice(-2))return t(r)({type:"text",value:r.slice(0,-2)+"$"});if(a){if(n)return!0;if(a[0].includes("`")&&r.slice(a[0].length).includes("`")){var u=r.slice(0,r.indexOf("`"));return t(u)({type:"text",value:u})}var s=a[1].trim();return t(a[0])({type:"inlineMath",value:s,data:{hName:"span",hProperties:{className:"inlineMath"+(i&&e.inlineMathDouble?" inlineMathDouble":"")},hChildren:[{type:"text",value:s}]}})}}t.locator=zo;var r=this.Parser,n=r.prototype.inlineTokenizers,i=r.prototype.inlineMethods;n.math=t,i.splice(i.indexOf("text"),0,"math");var a=this.Compiler;null!=a&&(a.prototype.visitors.inlineMath=function(e){return"$"+e.value+"$"})},Qo="\n",Yo="\t",Zo=" ",Jo="$",Ko=2,eu=4,tu=function(e){var t=this.Parser,r=t.prototype.blockTokenizers,n=t.prototype.blockMethods;r.math=function(e,t,r){for(var n,i,a,o,u,s,c,l,p,f,h=t.length+1,d=0,D="";d=eu)){for(o="";de.sourceSpan.end.line:"root"===e.parent.type||e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function ec(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return-1!==["script","select"].indexOf(e.name)}return!1}function tc(e){return"block"===e||"list-item"===e||e.startsWith("table")}function rc(e){return nc(e).startsWith("pre")}function nc(e){return"element"===e.type&&!e.namespace&&Us[e.name]||$s}var ic={HTML_ELEMENT_ATTRIBUTES:function(e,t){for(var r=Object.create(null),n=0,i=Object.keys(e);n1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=0,i=e.stack.length-1;i>=0;i--){var a=e.stack[i];a&&"object"===t(a)&&!Array.isArray(a)&&r(a)&&n++}return n},dedentString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var t=1/0,r=!0,n=!1,i=void 0;try{for(var a,o=e.split("\n")[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var u=a.value;if(0!==u.length){if(/\S/.test(u[0]))return 0;var s=u.match(/^\s*/)[0].length;u.length!==s&&s/.test(e)};var oc=function(e,t){var r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r},uc={attrs:!0,children:!0},sc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e);for(var n=0,i=Object.keys(t);n)([\s\S]*?)",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",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:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},t.NGSP_UNICODE="",t.NAMED_ENTITIES.ngsp=t.NGSP_UNICODE}));h(Dc);Dc.TagContentType,Dc.splitNsName,Dc.isNgContainer,Dc.isNgContent,Dc.isNgTemplate,Dc.getNsPrefix,Dc.mergeNsAndName,Dc.NAMED_ENTITIES,Dc.NGSP_UNICODE;var gc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n,a,o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.closedByChildren,a=n.requiredParents,o=n.implicitNamespacePrefix,u=n.contentType,s=void 0===u?Dc.TagContentType.PARSABLE_DATA:u,c=n.closedByParent,l=void 0!==c&&c,p=n.isVoid,f=void 0!==p&&p,h=n.ignoreFirstLf,d=void 0!==h&&h;r(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,i&&i.length>0&&i.forEach((function(e){return t.closedByChildren[e]=!0})),this.isVoid=f,this.closedByParent=l||f,a&&a.length>0&&(this.requiredParents={},this.parentToAdd=a[0],a.forEach((function(e){return t.requiredParents[e]=!0}))),this.implicitNamespacePrefix=o||null,this.contentType=s,this.ignoreFirstLf=d}return i(e,[{key:"requireExtraParent",value:function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return!("template"===t||"ng-template"===e)&&1!=this.requiredParents[t]}},{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();t.HtmlTagDefinition=o,t.getHtmlTagDefinition=function(e){return a||(n=new o,a={base:new o({isVoid:!0}),meta:new o({isVoid:!0}),area:new o({isVoid:!0}),embed:new o({isVoid:!0}),link:new o({isVoid:!0}),img:new o({isVoid:!0}),input:new o({isVoid:!0}),param:new o({isVoid:!0}),hr:new o({isVoid:!0}),br:new o({isVoid:!0}),source:new o({isVoid:!0}),track:new o({isVoid:!0}),wbr:new o({isVoid:!0}),p:new o({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new o({closedByChildren:["tbody","tfoot"]}),tbody:new o({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new o({closedByChildren:["tbody"],closedByParent:!0}),tr:new o({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new o({closedByChildren:["td","th"],closedByParent:!0}),th:new o({closedByChildren:["td","th"],closedByParent:!0}),col:new o({requiredParents:["colgroup"],isVoid:!0}),svg:new o({implicitNamespacePrefix:"svg"}),math:new o({implicitNamespacePrefix:"math"}),li:new o({closedByChildren:["li"],closedByParent:!0}),dt:new o({closedByChildren:["dt","dd"]}),dd:new o({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new o({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new o({closedByChildren:["optgroup"],closedByParent:!0}),option:new o({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new o({ignoreFirstLf:!0}),listing:new o({ignoreFirstLf:!0}),style:new o({contentType:Dc.TagContentType.RAW_TEXT}),script:new o({contentType:Dc.TagContentType.RAW_TEXT}),title:new o({contentType:Dc.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new o({contentType:Dc.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),a[e]||n}}));h(gc);gc.HtmlTagDefinition,gc.getHtmlTagDefinition;var mc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayOfStrings=function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '".concat(e,"' to be an array of strings."));for(var r=0;r]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){var n=t[0],i=t[1];r.forEach((function(e){if(e.test(n)||e.test(i))throw new Error("['".concat(n,"', '").concat(i,"'] contains unusable interpolation symbol."))}))}}}));h(mc);mc.assertArrayOfStrings,mc.assertInterpolationSymbols;var vc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){r(this,e),this.start=t,this.end=n}return i(e,null,[{key:"fromArray",value:function(r){return r?(mc.assertInterpolationSymbols("interpolation",r),new e(r[0],r[1])):t.DEFAULT_INTERPOLATION_CONFIG}}]),e}();t.InterpolationConfig=n,t.DEFAULT_INTERPOLATION_CONFIG=new n("{{","}}")}));h(vc);vc.InterpolationConfig,vc.DEFAULT_INTERPOLATION_CONFIG;var bc=d((function(e,t){function r(e){return t.$0<=e&&e<=t.$9} -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0}),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63,t.$0=48,t.$9=57,t.$A=65,t.$E=69,t.$F=70,t.$X=88,t.$Z=90,t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93,t.$CARET=94,t.$_=95,t.$a=97,t.$e=101,t.$f=102,t.$n=110,t.$r=114,t.$t=116,t.$u=117,t.$v=118,t.$x=120,t.$z=122,t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125,t.$NBSP=160,t.$PIPE=124,t.$TILDA=126,t.$AT=64,t.$BT=96,t.isWhitespace=function(e){return e>=t.$TAB&&e<=t.$SPACE||e==t.$NBSP},t.isDigit=r,t.isAsciiLetter=function(e){return e>=t.$a&&e<=t.$z||e>=t.$A&&e<=t.$Z},t.isAsciiHexDigit=function(e){return e>=t.$a&&e<=t.$f||e>=t.$A&&e<=t.$F||r(e)}}));h(bc);bc.$EOF,bc.$TAB,bc.$LF,bc.$VTAB,bc.$FF,bc.$CR,bc.$SPACE,bc.$BANG,bc.$DQ,bc.$HASH,bc.$$,bc.$PERCENT,bc.$AMPERSAND,bc.$SQ,bc.$LPAREN,bc.$RPAREN,bc.$STAR,bc.$PLUS,bc.$COMMA,bc.$MINUS,bc.$PERIOD,bc.$SLASH,bc.$COLON,bc.$SEMICOLON,bc.$LT,bc.$EQ,bc.$GT,bc.$QUESTION,bc.$0,bc.$9,bc.$A,bc.$E,bc.$F,bc.$X,bc.$Z,bc.$LBRACKET,bc.$BACKSLASH,bc.$RBRACKET,bc.$CARET,bc.$_,bc.$a,bc.$e,bc.$f,bc.$n,bc.$r,bc.$t,bc.$u,bc.$v,bc.$x,bc.$z,bc.$LBRACE,bc.$BAR,bc.$RBRACE,bc.$NBSP,bc.$PIPE,bc.$TILDA,bc.$AT,bc.$BT,bc.isWhitespace,bc.isDigit,bc.isAsciiLetter,bc.isAsciiHexDigit;var yc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n,i){r(this,e),this.filePath=t,this.name=n,this.members=i}return i(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();t.StaticSymbol=n;var a=function(){function e(){r(this,e),this.cache=new Map}return i(e,[{key:"get",value:function(e,t,r){var i=(r=r||[]).length?".".concat(r.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new n(e,t,r),this.cache.set(a,o)),o}}]),e}();t.StaticSymbolCache=a}));h(yc);yc.StaticSymbol,yc.StaticSymbolCache;var Ec=d((function(e,n){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(n,"__esModule",{value:!0});var a=/-+([a-z0-9])/g;function o(e,t,r){var n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function u(e,r,n){return Array.isArray(e)?r.visitArray(e,n):"object"===t(i=e)&&null!==i&&Object.getPrototypeOf(i)===p?r.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?r.visitPrimitive(e,n):r.visitOther(e,n);var i}n.dashCaseToCamelCase=function(e){return e.replace(a,(function(){for(var e=arguments.length,t=new Array(e),r=0;r=55296&&n<=56319&&e.length>r+1){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(r++,n=(n-55296<<10)+i-56320+65536)}n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(n>>6&31|192,63&n|128):n<=65535?t+=String.fromCharCode(n>>12|224,n>>6&63|128,63&n|128):n<=2097151&&(t+=String.fromCharCode(n>>18&7|240,n>>12&63|128,n>>6&63|128,63&n|128))}return t},n.stringify=function e(t){if("string"==typeof t)return t;if(t instanceof Array)return"["+t.map(e).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var r=t.toString();if(null==r)return""+r;var n=r.indexOf("\n");return-1===n?r:r.substring(0,n)},n.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},n.isPromise=f;n.Version=function e(t){r(this,e),this.full=t;var n=t.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}}));h(Ec);Ec.dashCaseToCamelCase,Ec.splitAtColon,Ec.splitAtPeriod,Ec.visitValue,Ec.isDefined,Ec.noUndefined,Ec.ValueTransformer,Ec.SyncAsync,Ec.error,Ec.syntaxError,Ec.isSyntaxError,Ec.getParseErrors,Ec.escapeRegExp,Ec.utf8Encode,Ec.stringify,Ec.resolveForwardRef,Ec.isPromise,Ec.Version;var Cc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function a(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=a;var o,u=0;function s(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof yc.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var r=Ec.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(u++),t.__anonymousType=r):r=a(r),r}t.identifierName=s,t.identifierModuleUrl=function(e){var t=e.reference;return t instanceof yc.StaticSymbol?t.filePath:"./".concat(Ec.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(s({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(s({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(s({reference:e}))},t.componentFactoryName=function(e){return"".concat(s({reference:e}),"NgFactory")},function(e){e[e.Pipe=0]="Pipe",e[e.Directive=1]="Directive",e[e.NgModule=2]="NgModule",e[e.Injectable=3]="Injectable"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?a(e.value):s(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.moduleUrl,i=t.styles,a=t.styleUrls;r(this,e),this.moduleUrl=n||null,this.styles=d(i),this.styleUrls=d(a)};var c=function(){function e(t){var n=t.encapsulation,i=t.template,a=t.templateUrl,o=t.htmlAst,u=t.styles,s=t.styleUrls,c=t.externalStylesheets,l=t.animations,p=t.ngContentSelectors,f=t.interpolation,h=t.isInline,g=t.preserveWhitespaces;if(r(this,e),this.encapsulation=n,this.template=i,this.templateUrl=a,this.htmlAst=o,this.styles=d(u),this.styleUrls=d(s),this.externalStylesheets=d(c),this.animations=l?D(l):[],this.ngContentSelectors=p||[],f&&2!=f.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=f,this.isInline=h,this.preserveWhitespaces=g}return i(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();t.CompileTemplateMetadata=c;var l=function(){function e(t){var n=t.isHost,i=t.type,a=t.isComponent,o=t.selector,u=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,p=t.hostListeners,f=t.hostProperties,h=t.hostAttributes,D=t.providers,g=t.viewProviders,m=t.queries,v=t.guards,b=t.viewQueries,y=t.entryComponents,E=t.template,C=t.componentViewType,A=t.rendererType,w=t.componentFactory;r(this,e),this.isHost=!!n,this.type=i,this.isComponent=a,this.selector=o,this.exportAs=u,this.changeDetection=s,this.inputs=c,this.outputs=l,this.hostListeners=p,this.hostProperties=f,this.hostAttributes=h,this.providers=d(D),this.viewProviders=d(g),this.queries=d(m),this.guards=v,this.viewQueries=d(b),this.entryComponents=d(y),this.template=E,this.componentViewType=C,this.rendererType=A,this.componentFactory=w}return i(e,null,[{key:"create",value:function(t){var r=t.isHost,i=t.type,a=t.isComponent,o=t.selector,u=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,p=t.host,f=t.providers,h=t.viewProviders,d=t.queries,D=t.guards,g=t.viewQueries,m=t.entryComponents,v=t.template,b=t.componentViewType,y=t.rendererType,E=t.componentFactory,C={},A={},w={};null!=p&&Object.keys(p).forEach((function(e){var t=p[e],r=e.match(n);null===r?w[e]=t:null!=r[1]?A[r[1]]=t:null!=r[2]&&(C[r[2]]=t)}));var k={};null!=c&&c.forEach((function(e){var t=Ec.splitAtColon(e,[e,e]);k[t[0]]=t[1]}));var T={};return null!=l&&l.forEach((function(e){var t=Ec.splitAtColon(e,[e,e]);T[t[0]]=t[1]})),new e({isHost:r,type:i,isComponent:!!a,selector:o,exportAs:u,changeDetection:s,inputs:k,outputs:T,hostListeners:C,hostProperties:A,hostAttributes:w,providers:f,viewProviders:h,queries:d,guards:D,viewQueries:g,entryComponents:m,template:v,componentViewType:b,rendererType:y,componentFactory:E})}}]),i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}}]),e}();t.CompileDirectiveMetadata=l;var p=function(){function e(t){var n=t.type,i=t.name,a=t.pure;r(this,e),this.type=n,this.name=i,this.pure=!!a}return i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Pipe,type:this.type,name:this.name,pure:this.pure}}}]),e}();t.CompilePipeMetadata=p;t.CompileShallowModuleMetadata=function e(){r(this,e)};var f=function(){function e(t){var n=t.type,i=t.providers,a=t.declaredDirectives,o=t.exportedDirectives,u=t.declaredPipes,s=t.exportedPipes,c=t.entryComponents,l=t.bootstrapComponents,p=t.importedModules,f=t.exportedModules,h=t.schemas,D=t.transitiveModule,g=t.id;r(this,e),this.type=n||null,this.declaredDirectives=d(a),this.exportedDirectives=d(o),this.declaredPipes=d(u),this.exportedPipes=d(s),this.providers=d(i),this.entryComponents=d(c),this.bootstrapComponents=d(l),this.importedModules=d(p),this.exportedModules=d(f),this.schemas=d(h),this.id=g||null,this.transitiveModule=D||null}return i(e,[{key:"toSummary",value:function(){var e=this.transitiveModule;return{summaryKind:o.NgModule,type:this.type,entryComponents:e.entryComponents,providers:e.providers,modules:e.modules,exportedDirectives:e.exportedDirectives,exportedPipes:e.exportedPipes}}}]),e}();t.CompileNgModuleMetadata=f;var h=function(){function e(){r(this,e),this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}return i(e,[{key:"addProvider",value:function(e,t){this.providers.push({provider:e,module:t})}},{key:"addDirective",value:function(e){this.directivesSet.has(e.reference)||(this.directivesSet.add(e.reference),this.directives.push(e))}},{key:"addExportedDirective",value:function(e){this.exportedDirectivesSet.has(e.reference)||(this.exportedDirectivesSet.add(e.reference),this.exportedDirectives.push(e))}},{key:"addPipe",value:function(e){this.pipesSet.has(e.reference)||(this.pipesSet.add(e.reference),this.pipes.push(e))}},{key:"addExportedPipe",value:function(e){this.exportedPipesSet.has(e.reference)||(this.exportedPipesSet.add(e.reference),this.exportedPipes.push(e))}},{key:"addModule",value:function(e){this.modulesSet.has(e.reference)||(this.modulesSet.add(e.reference),this.modules.push(e))}},{key:"addEntryComponent",value:function(e){this.entryComponentsSet.has(e.componentType)||(this.entryComponentsSet.add(e.componentType),this.entryComponents.push(e))}}]),e}();function d(e){return e||[]}t.TransitiveCompileNgModuleMetadata=h;function D(e){return e.reduce((function(e,t){var r=Array.isArray(t)?D(t):t;return e.concat(r)}),[])}function g(e){return e.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}t.ProviderMeta=function e(t,n){var i=n.useClass,a=n.useValue,o=n.useExisting,u=n.useFactory,s=n.deps,c=n.multi;r(this,e),this.token=t,this.useClass=i||null,this.useValue=a,this.useExisting=o,this.useFactory=u||null,this.dependencies=s||null,this.multi=!!c},t.flatten=D,t.templateSourceUrl=function(e,t,r){var n;return n=r.isInline?t.type.reference instanceof yc.StaticSymbol?"".concat(t.type.reference.filePath,".").concat(t.type.reference.name,".html"):"".concat(s(e),"/").concat(s(t.type),".html"):r.templateUrl,t.type.reference instanceof yc.StaticSymbol?n:g(n)},t.sharedStylesheetJitUrl=function(e,t){var r=e.moduleUrl.split(/\/\\/g),n=r[r.length-1];return g("css/".concat(t).concat(n,".ngstyle.js"))},t.ngModuleJitUrl=function(e){return g("".concat(s(e.type),"/module.ngfactory.js"))},t.templateJitUrl=function(e,t){return g("".concat(s(e),"/").concat(s(t.type),".ngfactory.js"))}}));h(Cc);Cc.sanitizeIdentifier,Cc.identifierName,Cc.identifierModuleUrl,Cc.viewClassName,Cc.rendererTypeName,Cc.hostViewClassName,Cc.componentFactoryName,Cc.CompileSummaryKind,Cc.tokenName,Cc.tokenReference,Cc.CompileStylesheetMetadata,Cc.CompileTemplateMetadata,Cc.CompileDirectiveMetadata,Cc.CompilePipeMetadata,Cc.CompileShallowModuleMetadata,Cc.CompileNgModuleMetadata,Cc.TransitiveCompileNgModuleMetadata,Cc.ProviderMeta,Cc.flatten,Cc.templateSourceUrl,Cc.sharedStylesheetJitUrl,Cc.ngModuleJitUrl,Cc.templateJitUrl;var Ac=d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}); -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var n=function(){function e(t,n,i,a){r(this,e),this.file=t,this.offset=n,this.line=i,this.col=a}return i(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var r=this.file.content,n=r.length,i=this.offset,a=this.line,o=this.col;i>0&&t<0;){if(i--,t++,r.charCodeAt(i)==bc.$LF){a--;var u=r.substr(0,i-1).lastIndexOf(String.fromCharCode(bc.$LF));o=u>0?i-u:i}else o--}for(;i0;){var s=r.charCodeAt(i);i++,t--,s==bc.$LF?(a++,o=0):o++}return new e(this.file,i,a,o)}},{key:"getContext",value:function(e,t){var r=this.file.content,n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);for(var i=n,a=0,o=0;a0&&(a++,"\n"!=r[--n]||++o!=t););for(a=0,o=0;a2&&void 0!==arguments[2]?arguments[2]:null;r(this,e),this.start=t,this.end=n,this.details=i}return i(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();t.ParseSourceSpan=u,function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=t.ParseErrorLevel||(t.ParseErrorLevel={}));var s=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.ERROR;r(this,e),this.span=t,this.msg=n,this.level=i}return i(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(o[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}();t.ParseError=s,t.typeSourceSpan=function(e,t){var r=Cc.identifierModuleUrl(t),i=null!=r?"in ".concat(e," ").concat(Cc.identifierName(t)," in ").concat(r):"in ".concat(e," ").concat(Cc.identifierName(t)),o=new a("",i);return new u(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));h(Ac);Ac.ParseLocation,Ac.ParseSourceFile,Ac.ParseSourceSpan,Ac.ParseErrorLevel,Ac.ParseError,Ac.typeSourceSpan;var wc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;r(this,e),this.path=t,this.position=n}return i(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var r=this.path[t];if(r instanceof e)return r}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}();t.AstPath=n}));h(wc);wc.AstPath;var kc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}();t.Text=n;var u=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}();t.CDATA=u;var c=function(){function e(t,n,i,a,o){r(this,e),this.switchValue=t,this.type=n,this.cases=i,this.sourceSpan=a,this.switchValueSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}();t.Expansion=c;var l=function(){function e(t,n,i,a,o){r(this,e),this.value=t,this.expression=n,this.sourceSpan=i,this.valueSourceSpan=a,this.expSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}();t.ExpansionCase=l;var p=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;r(this,e),this.name=t,this.value=n,this.sourceSpan=i,this.valueSpan=a,this.nameSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();t.Attribute=p;var f=function(){function e(t,n,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;r(this,e),this.name=t,this.attrs=n,this.children=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=u,this.nameSpan=s}return i(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();t.Element=f;var h=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}();t.Comment=h;var d=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}();function D(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach((function(e){var t=i(e);t&&n.push(t)})),n}t.DocType=d,t.visitAll=D;var g=function(){function e(){r(this,e)}return i(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,(function(t){t(e.attrs),t(e.children)}))}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,(function(t){t(e.cases)}))}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var r=[],n=this;return t((function(t){t&&r.push(D(n,t,e))})),[].concat.apply([],r)}}]),e}();t.RecursiveVisitor=g,t.findNode=function(e,t){var n=[];return D(new(function(e){function u(){return r(this,u),s(this,o(u).apply(this,arguments))}return a(u,e),i(u,[{key:"visit",value:function(e,r){var i=function e(t){var r=t.sourceSpan.start.offset,n=t.sourceSpan.end.offset;return t instanceof f&&(t.endSourceSpan?n=t.endSourceSpan.end.offset:t.children&&t.children.length&&(n=e(t.children[t.children.length-1]).end)),{start:r,end:n}}(e);if(!(i.start<=t&&t3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return new D(new Ac.ParseSourceFile(e,t),r,n,i,a,o).tokenize()};var p=/\r\n?/g;function f(e){var t=e===bc.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function h(e){return'Unknown entity "'.concat(e,'" - use the "&#;" or "&#x;" syntax')}var d=function e(t){r(this,e),this.error=t},D=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5];r(this,e),this._file=t,this._getTagDefinition=n,this._tokenizeIcu=i,this._interpolationConfig=a,this.canSelfClose=o,this.allowHtmComponentClosingTags=u,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=t.content,this._length=t.content.length,this._advance()}return i(e,[{key:"_processCarriageReturns",value:function(e){return e.replace(p,"\n")}},{key:"tokenize",value:function(){for(;this._peek!==bc.$EOF;){var e=this._getLocation();try{if(this._attemptCharCode(bc.$LT))if(this._attemptCharCode(bc.$BANG))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(bc.$SLASH))this._consumeTagClose(e);else{var t=this._savePosition();this._attemptCharCode(bc.$QUESTION)?(this._restorePosition(t),this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof d))throw e;this.errors.push(e.error)}}return this._beginToken(n.EOF),this._endToken([]),new l(function(e){for(var t=[],r=void 0,i=0;i0&&void 0!==arguments[0]?arguments[0]:this._getLocation(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();return new Ac.ParseSourceSpan(e,t)}},{key:"_beginToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation();this._currentTokenStart=t,this._currentTokenType=e}},{key:"_endToken",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getLocation(),r=new u(this._currentTokenType,e,new Ac.ParseSourceSpan(this._currentTokenStart,t));return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}},{key:"_createError",value:function(e,t){this._isInExpansionForm()&&(e+=' (Do you have an unescaped "{" in your template? Use "{{ \'{\' }}") to escape it.)');var r=new c(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new d(r)}},{key:"_advance",value:function(){if(this._index>=this._length)throw this._createError(f(bc.$EOF),this._getSpan());this._peek===bc.$LF?(this._line++,this._column=0):this._peek!==bc.$LF&&this._peek!==bc.$CR&&this._column++,this._index++,this._peek=this._index>=this._length?bc.$EOF:this._input.charCodeAt(this._index),this._nextPeek=this._index+1>=this._length?bc.$EOF:this._input.charCodeAt(this._index+1)}},{key:"_attemptCharCode",value:function(e){return this._peek===e&&(this._advance(),!0)}},{key:"_attemptCharCodeCaseInsensitive",value:function(e){return t=this._peek,r=e,E(t)==E(r)&&(this._advance(),!0);var t,r}},{key:"_requireCharCode",value:function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(f(this._peek),this._getSpan(t,t))}},{key:"_attemptStr",value:function(e){var t=e.length;if(this._index+t>this._length)return!1;for(var r=this._savePosition(),n=0;ni.offset&&o.push(this._input.substring(i.offset,this._index));this._peek!==t;)o.push(this._readChar(e));return this._endToken([this._processCarriageReturns(o.join(""))],i)}},{key:"_consumeComment",value:function(e){var t=this;this._beginToken(n.COMMENT_START,e),this._endToken([]);var r=this._consumeRawText(!1,bc.$MINUS,(function(){return t._attemptStr("->")}));this._beginToken(n.COMMENT_END,r.sourceSpan.end),this._endToken([])}},{key:"_consumeBogusComment",value:function(e){this._beginToken(n.COMMENT_START,e),this._endToken([]);var t=this._consumeRawText(!1,bc.$GT,(function(){return!0}));this._beginToken(n.COMMENT_END,t.sourceSpan.end),this._endToken([])}},{key:"_consumeCdata",value:function(e){var t=this;this._beginToken(n.CDATA_START,e),this._endToken([]);var r=this._consumeRawText(!1,bc.$RBRACKET,(function(){return t._attemptStr("]>")}));this._beginToken(n.CDATA_END,r.sourceSpan.end),this._endToken([])}},{key:"_consumeDocType",value:function(e){this._beginToken(n.DOC_TYPE_START,e),this._endToken([]);var t=this._consumeRawText(!1,bc.$GT,(function(){return!0}));this._beginToken(n.DOC_TYPE_END,t.sourceSpan.end),this._endToken([])}},{key:"_consumePrefixAndName",value:function(){for(var e,t,r=this._index,n=null;this._peek!==bc.$COLON&&!(((e=this._peek)bc.$9));)this._advance();return this._peek===bc.$COLON?(this._advance(),n=this._input.substring(r,this._index-1),t=this._index):t=r,this._requireCharCodeUntilFn(m,this._index===t?1:0),[n,this._input.substring(t,this._index)]}},{key:"_consumeTagOpen",value:function(e){var t,r,i=this._savePosition();try{if(!bc.isAsciiLetter(this._peek))throw this._createError(f(this._peek),this._getSpan());var a=this._index;for(this._consumeTagOpenStart(e),r=(t=this._input.substring(a,this._index)).toLowerCase(),this._attemptCharCodeUntilFn(g);this._peek!==bc.$SLASH&&this._peek!==bc.$GT;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(g),this._attemptCharCode(bc.$EQ)&&(this._attemptCharCodeUntilFn(g),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(g);this._consumeTagOpenEnd()}catch(t){if(t instanceof d)return this._restorePosition(i),this._beginToken(n.TEXT,e),void this._endToken(["<"]);throw t}if(!this.canSelfClose||this.tokens[this.tokens.length-1].type!==n.TAG_OPEN_END_VOID){var o=this._getTagDefinition(t).contentType;o===Dc.TagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(r,!1):o===Dc.TagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,!0)}}},{key:"_consumeRawTextWithTagClose",value:function(e,t){var r=this,i=this._consumeRawText(t,bc.$LT,(function(){return!!r._attemptCharCode(bc.$SLASH)&&(r._attemptCharCodeUntilFn(g),!!r._attemptStrCaseInsensitive(e)&&(r._attemptCharCodeUntilFn(g),r._attemptCharCode(bc.$GT)))}));this._beginToken(n.TAG_CLOSE,i.sourceSpan.end),this._endToken([null,e])}},{key:"_consumeTagOpenStart",value:function(e){this._beginToken(n.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)}},{key:"_consumeAttributeName",value:function(){this._beginToken(n.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)}},{key:"_consumeAttributeValue",value:function(){var e;if(this._beginToken(n.ATTR_VALUE),this._peek===bc.$SQ||this._peek===bc.$DQ){var t=this._peek;this._advance();for(var r=[];this._peek!==t;)r.push(this._readChar(!0));e=r.join(""),this._advance()}else{var i=this._index;this._requireCharCodeUntilFn(m,1),e=this._input.substring(i,this._index)}this._endToken([this._processCarriageReturns(e)])}},{key:"_consumeTagOpenEnd",value:function(){var e=this._attemptCharCode(bc.$SLASH)?n.TAG_OPEN_END_VOID:n.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(bc.$GT),this._endToken([])}},{key:"_consumeTagClose",value:function(e){if(this._beginToken(n.TAG_CLOSE,e),this._attemptCharCodeUntilFn(g),this.allowHtmComponentClosingTags&&this._attemptCharCode(bc.$SLASH))this._attemptCharCodeUntilFn(g),this._requireCharCode(bc.$GT),this._endToken([]);else{var t=this._consumePrefixAndName();this._attemptCharCodeUntilFn(g),this._requireCharCode(bc.$GT),this._endToken(t)}}},{key:"_consumeExpansionFormStart",value:function(){this._beginToken(n.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(bc.$LBRACE),this._endToken([]),this._expansionCaseStack.push(n.EXPANSION_FORM_START),this._beginToken(n.RAW_TEXT,this._getLocation());var e=this._readUntil(bc.$COMMA);this._endToken([e],this._getLocation()),this._requireCharCode(bc.$COMMA),this._attemptCharCodeUntilFn(g),this._beginToken(n.RAW_TEXT,this._getLocation());var t=this._readUntil(bc.$COMMA);this._endToken([t],this._getLocation()),this._requireCharCode(bc.$COMMA),this._attemptCharCodeUntilFn(g)}},{key:"_consumeExpansionCaseStart",value:function(){this._beginToken(n.EXPANSION_CASE_VALUE,this._getLocation());var e=this._readUntil(bc.$LBRACE).trim();this._endToken([e],this._getLocation()),this._attemptCharCodeUntilFn(g),this._beginToken(n.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(bc.$LBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(g),this._expansionCaseStack.push(n.EXPANSION_CASE_EXP_START)}},{key:"_consumeExpansionCaseEnd",value:function(){this._beginToken(n.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode(bc.$RBRACE),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(g),this._expansionCaseStack.pop()}},{key:"_consumeExpansionFormEnd",value:function(){this._beginToken(n.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode(bc.$RBRACE),this._endToken([]),this._expansionCaseStack.pop()}},{key:"_consumeText",value:function(){var e=this._getLocation();this._beginToken(n.TEXT,e);var t=[];do{this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(t.push(this._interpolationConfig.start),this._inInterpolation=!0):this._interpolationConfig&&this._inInterpolation&&this._attemptStr(this._interpolationConfig.end)?(t.push(this._interpolationConfig.end),this._inInterpolation=!1):t.push(this._readChar(!0))}while(!this._isTextEnd());this._endToken([this._processCarriageReturns(t.join(""))])}},{key:"_isTextEnd",value:function(){if(this._peek===bc.$LT||this._peek===bc.$EOF)return!0;if(this._tokenizeIcu&&!this._inInterpolation){if(y(this._input,this._index,this._interpolationConfig))return!0;if(this._peek===bc.$RBRACE&&this._isInExpansionCase())return!0}return!1}},{key:"_savePosition",value:function(){return[this._peek,this._index,this._column,this._line,this.tokens.length]}},{key:"_readUntil",value:function(e){var t=this._index;return this._attemptUntilChar(e),this._input.substring(t,this._index)}},{key:"_restorePosition",value:function(e){this._peek=e[0],this._index=e[1],this._column=e[2],this._line=e[3];var t=e[4];t0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_CASE_EXP_START}},{key:"_isInExpansionForm",value:function(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===n.EXPANSION_FORM_START}}]),e}();function g(e){return!bc.isWhitespace(e)||e===bc.$EOF}function m(e){return bc.isWhitespace(e)||e===bc.$GT||e===bc.$SLASH||e===bc.$SQ||e===bc.$DQ||e===bc.$EQ}function v(e){return e==bc.$SEMICOLON||e==bc.$EOF||!bc.isAsciiHexDigit(e)}function b(e){return e==bc.$SEMICOLON||e==bc.$EOF||!bc.isAsciiLetter(e)}function y(e,t,r){var n=!!r&&e.indexOf(r.start,t)==t;return e.charCodeAt(t)==bc.$LBRACE&&!n}function E(e){return e>=bc.$a&&e<=bc.$z?e-bc.$a+bc.$A:e}}));h(Tc);Tc.TokenType,Tc.Token,Tc.TokenError,Tc.TokenizeResult,Tc.tokenize;var _c=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(e,n,i){var a;return r(this,t),(a=s(this,o(t).call(this,n,i))).elementName=e,a}return a(t,e),i(t,null,[{key:"create",value:function(e,r,n){return new t(e,r,n)}}]),t}(Ac.ParseError);t.TreeError=n;var u=function e(t,n){r(this,e),this.rootNodes=t,this.errors=n};t.ParseTreeResult=u;var c=function(){function e(t){r(this,e),this.getTagDefinition=t}return i(e,[{key:"parse",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=s?this.getTagDefinition:function(e){return r.getTagDefinition(e.toLowerCase())},p=Tc.tokenize(e,t,c,n,i,a,o),f=new l(p.tokens,c,a,o,s).build();return new u(f.rootNodes,p.errors.concat(f.errors))}}]),e}();t.Parser=c;var l=function(){function e(t,n,i,a,o){r(this,e),this.tokens=t,this.getTagDefinition=n,this.canSelfClose=i,this.allowHtmComponentClosingTags=a,this.isTagNameCaseSensitive=o,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return i(e,[{key:"build",value:function(){for(;this._peek.type!==Tc.TokenType.EOF;)this._peek.type===Tc.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Tc.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Tc.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Tc.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Tc.TokenType.TEXT||this._peek.type===Tc.TokenType.RAW_TEXT||this._peek.type===Tc.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Tc.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===Tc.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new u(this._rootNodes,this._errors)}},{key:"_advance",value:function(){var e=this._peek;return this._index0)return this._errors=this._errors.concat(o.errors),null;var u=new Ac.ParseSourceSpan(t.sourceSpan.start,a.sourceSpan.end),s=new Ac.ParseSourceSpan(r.sourceSpan.start,a.sourceSpan.end);return new kc.ExpansionCase(t.parts[0],o.rootNodes,u,t.sourceSpan,s)}},{key:"_collectExpansionExpTokens",value:function(e){for(var t=[],r=[Tc.TokenType.EXPANSION_CASE_EXP_START];;){if(this._peek.type!==Tc.TokenType.EXPANSION_FORM_START&&this._peek.type!==Tc.TokenType.EXPANSION_CASE_EXP_START||r.push(this._peek.type),this._peek.type===Tc.TokenType.EXPANSION_CASE_EXP_END){if(!p(r,Tc.TokenType.EXPANSION_CASE_EXP_START))return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(r.pop(),0==r.length)return t}if(this._peek.type===Tc.TokenType.EXPANSION_FORM_END){if(!p(r,Tc.TokenType.EXPANSION_FORM_START))return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.pop()}if(this._peek.type===Tc.TokenType.EOF)return this._errors.push(n.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;t.push(this._advance())}}},{key:"_getText",value:function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var r=this._getParentElement();null!=r&&0==r.children.length&&this.getTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}return t}},{key:"_consumeText",value:function(e){var t=this._getText(e);t.length>0&&this._addToParent(new kc.Text(t,e.sourceSpan))}},{key:"_closeVoidElement",value:function(){var e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}},{key:"_consumeStartTag",value:function(e){for(var t=e.parts[0],r=e.parts[1],i=[];this._peek.type===Tc.TokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var a=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===Tc.TokenType.TAG_OPEN_END_VOID){this._advance(),o=!0;var u=this.getTagDefinition(a);this.canSelfClose||u.canSelfClose||null!==Dc.getNsPrefix(a)||u.isVoid||this._errors.push(n.create(a,e.sourceSpan,'Only void and foreign elements can be self closed "'.concat(e.parts[1],'"')))}else this._peek.type===Tc.TokenType.TAG_OPEN_END&&(this._advance(),o=!1);var s=this._peek.sourceSpan.start,c=new Ac.ParseSourceSpan(e.sourceSpan.start,s),l=new Ac.ParseSourceSpan(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),p=new kc.Element(a,i,[],c,c,void 0,l);this._pushElement(p),o&&(this._popElement(a),p.endSourceSpan=c)}},{key:"_pushElement",value:function(e){var t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop();var r=this.getTagDefinition(e.name),n=this._getParentElementSkippingContainers(),i=n.parent,a=n.container;if(i&&r.requireExtraParent(i.name)){var o=new kc.Element(r.parentToAdd,[],[],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);this._insertBeforeContainer(i,a,o)}this._addToParent(e),this._elementStack.push(e)}},{key:"_consumeEndTag",value:function(e){var t=this.allowHtmComponentClosingTags&&0===e.parts.length?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(this._getParentElement()&&(this._getParentElement().endSourceSpan=e.sourceSpan),t&&this.getTagDefinition(t).isVoid)this._errors.push(n.create(t,e.sourceSpan,'Void elements do not have end tags "'.concat(e.parts[1],'"')));else if(!this._popElement(t)){var r='Unexpected closing tag "'.concat(t,'". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags');this._errors.push(n.create(t,e.sourceSpan,r))}}},{key:"_popElement",value:function(e){for(var t=this._elementStack.length-1;t>=0;t--){var r=this._elementStack[t];if(!e||(Dc.getNsPrefix(r.name)?r.name==e:r.name.toLowerCase()==e.toLowerCase()))return this._elementStack.splice(t,this._elementStack.length-t),!0;if(!this.getTagDefinition(r.name).closedByParent)return!1}return!1}},{key:"_consumeAttr",value:function(e){var t=Dc.mergeNsAndName(e.parts[0],e.parts[1]),r=e.sourceSpan.end,n="",i=void 0;if(this._peek.type===Tc.TokenType.ATTR_VALUE){var a=this._advance();n=a.parts[0],r=a.sourceSpan.end,i=a.sourceSpan}return new kc.Attribute(t,n,new Ac.ParseSourceSpan(e.sourceSpan.start,r),i,e.sourceSpan)}},{key:"_getParentElement",value:function(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}},{key:"_getParentElementSkippingContainers",value:function(){for(var e=null,t=this._elementStack.length-1;t>=0;t--){if(!Dc.isNgContainer(this._elementStack[t].name))return{parent:this._elementStack[t],container:e};e=this._elementStack[t]}return{parent:null,container:e}}},{key:"_addToParent",value:function(e){var t=this._getParentElement();null!=t?t.children.push(e):this._rootNodes.push(e)}},{key:"_insertBeforeContainer",value:function(e,t,r){if(t){if(e){var n=e.children.indexOf(t);e.children[n]=r}else this._rootNodes.push(r);r.children.push(t),this._elementStack.splice(this._elementStack.indexOf(t),0,r)}else this._addToParent(r),this._elementStack.push(r)}},{key:"_getElementFullName",value:function(e,t,r){return null==e&&null==(e=this.getTagDefinition(t).implicitNamespacePrefix)&&null!=r&&(e=Dc.getNsPrefix(r.name)),Dc.mergeNsAndName(e,t)}}]),e}();function p(e,t){return e.length>0&&e[e.length-1]===t}}));h(_c);_c.TreeError,_c.ParseTreeResult,_c.Parser;var Sc=d((function(e,t){ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Object.defineProperty(t,"__esModule",{value:!0});var n=_c;t.ParseTreeResult=n.ParseTreeResult,t.TreeError=n.TreeError;var u=function(e){function t(){return r(this,t),s(this,o(t).call(this,gc.getHtmlTagDefinition))}return a(t,e),i(t,[{key:"parse",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return c(o(t.prototype),"parse",this).call(this,e,r,n,i,a,u,s)}}]),t}(_c.Parser);t.HtmlParser=u}));h(Sc);Sc.ParseTreeResult,Sc.TreeError,Sc.HtmlParser;var Fc=d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=null,n=function(){return r||(r=new Sc.HtmlParser),r};t.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.canSelfClose,i=void 0!==r&&r,a=t.allowHtmComponentClosingTags,o=void 0!==a&&a,u=t.isTagNameCaseSensitive,s=void 0!==u&&u;return n().parse(e,"angular-html-parser",!1,void 0,i,o,s)}}));h(Fc);Fc.parse;var xc=ic.HTML_ELEMENT_ATTRIBUTES,qc=ic.HTML_TAGS,Nc=ac,Lc=fc.Node,Bc=dc;function Pc(e,t){var n=t.recognizeSelfClosing,u=t.normalizeTagName,c=t.normalizeAttributeName,l=t.allowHtmComponentClosingTags,p=t.isTagNameCaseSensitive,f=Fc,h=kc.RecursiveVisitor,d=kc.visitAll,D=kc.Attribute,g=kc.CDATA,m=kc.Comment,v=kc.DocType,b=kc.Element,y=kc.Text,E=Ac.ParseSourceSpan,C=gc.getHtmlTagDefinition,A=f.parse(e,{canSelfClose:n,allowHtmComponentClosingTags:l,isTagNameCaseSensitive:p}),w=A.rootNodes,k=A.errors;if(0!==k.length){var T=k[0],_=T.msg,S=T.span.start,F=S.line,x=S.col;throw oc(_,{start:{line:F+1,column:x+1}})}var q=function(e){var t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan?e.nameSpan.toString():e.name,n=r.startsWith("".concat(t,":")),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},N=function(e,t){var r=e.toLowerCase();return t(r)?r:e};return d(new(function(e){function t(){return r(this,t),s(this,o(t).apply(this,arguments))}return a(t,e),i(t,[{key:"visit",value:function(e){!function(e){if(e instanceof D)e.type="attribute";else if(e instanceof g)e.type="cdata";else if(e instanceof m)e.type="comment";else if(e instanceof v)e.type="docType";else if(e instanceof b)e.type="element";else{if(!(e instanceof y))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}}(e),function(e){e instanceof b?(q(e),e.attrs.forEach((function(e){q(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null}))):e instanceof m?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof y&&(e.value=e.sourceSpan.toString())}(e),function(e){if(e instanceof b){var t=C(p?e.name:e.name.toLowerCase());e.namespace&&e.namespace!==t.implicitNamespacePrefix?e.tagDefinition=C(""):e.tagDefinition=t}}(e),function(e){if(e instanceof b&&(!u||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix||(e.name=N(e.name,(function(e){return e in qc}))),c)){var t=xc[e.name]||Object.create(null);e.attrs.forEach((function(r){r.namespace||(r.name=N(r.name,(function(r){return e.name in xc&&(r in xc["*"]||r in t)})))}))}}(e),function(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new E(e.sourceSpan.start,e.endSourceSpan.end))}(e)}}]),t}(h)),w),w}function Oc(e){return e.sourceSpan.start.offset}function Rc(e){return e.sourceSpan.end.offset}function Ic(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.recognizeSelfClosing,r=void 0!==t&&t,n=e.normalizeTagName,i=void 0!==n&&n,a=e.normalizeAttributeName,o=void 0!==a&&a,u=e.allowHtmComponentClosingTags,s=void 0!==u&&u,c=e.isTagNameCaseSensitive,l=void 0!==c&&c;return{parse:function(e,t,n){return function e(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?lo(t):{frontMatter:null,content:t},a=i.frontMatter,o=i.content,u={type:"root",sourceSpan:{start:{offset:0},end:{offset:t.length}},children:Pc(o,n)};a&&u.children.unshift(a);var s=new Lc(u),c=function(i,a){var o=a.offset,u=e(t.slice(0,o).replace(/[^\r\n]/g," ")+i,r,n,!1),s=u.children[0].sourceSpan.constructor;u.sourceSpan=new s(a,u.children[u.children.length-1].sourceSpan.end);var c=u.children[0];return c.length===o?u.children.shift():(c.sourceSpan=new s(c.sourceSpan.start.moveBy(o),c.sourceSpan.end),c.value=c.value.slice(o)),u},l=function(e){return"element"===e.type&&!e.nameSpan};return s.map((function(e){if(e.children&&e.children.some(l)){var t=[],r=!0,n=!1,i=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var u=a.value;l(u)?Array.prototype.push.apply(t,u.children):t.push(u)}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return e.clone({children:t})}if("comment"===e.type){var s=Bc(e,c);if(s)return s}return e}))}(e,n,{recognizeSelfClosing:r,normalizeTagName:i,normalizeAttributeName:o,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:l})},hasPragma:Nc,astFormat:"html",locStart:Oc,locEnd:Rc}}var Uc={parsers:{html:Ic({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Ic(),vue:Ic({recognizeSelfClosing:!0,isTagNameCaseSensitive:!0}),lwc:Ic()}},$c=Ro.mapAst,Vc=Ro.INLINE_NODE_WRAPPER_TYPES,Mc=Uc.parsers.html;function jc(e){var t=e.isMDX;return function(e){var r=Za().use(ji,Object.assign({footnotes:!0,commonmark:!0},t&&{blocks:[jo.BLOCKS_REGEX]})).use(Hc).use(ru).use(t?jo.esSyntax:zc).use(Xc).use(t?Gc:zc);return r.runSync(r.parse(e))}}function zc(e){return e}function Gc(){return function(e){return $c(e,(function(e,t,r){var n=l(r,1)[0];if("html"!==e.type||e.value.match(jo.COMMENT_REGEX)||-1!==Vc.indexOf(n.type))return e;var i=Mc.parse(e.value).children;return i.length<=1?Object.assign({},e,{type:"jsx"}):i.reduce((function(t,r){var n=r.sourceSpan,i=r.type,a=e.value.slice(n.start.offset,n.end.offset);return a&&t.push({type:"element"===i?"jsx":i,value:a,position:n}),t}),[])}))}}function Hc(){var e=this.Parser.prototype;function t(e,t){var r=lo(t);if(r.frontMatter)return e(r.frontMatter.raw)(r.frontMatter)}e.blockMethods=["frontMatter"].concat(e.blockMethods),e.blockTokenizers.frontMatter=t,t.onlyAtStart=!0}function Xc(){var e=this.Parser.prototype,t=e.inlineMethods;function r(e,t){var r=t.match(/^({%[\s\S]*?%}|{{[\s\S]*?}})/);if(r)return e(r[0])({type:"liquidNode",value:r[0]})}t.splice(t.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=r,r.locator=function(e,t){return e.indexOf("{",t)}}var Wc={astFormat:"mdast",hasPragma:ho.hasPragma,locStart:function(e){return e.position.start.offset},locEnd:function(e){return e.position.end.offset},preprocess:function(e){return e.replace(/\n\s+$/,"\n")}},Qc=Object.assign({},Wc,{parse:jc({isMDX:!1})}),Yc={parsers:{remark:Qc,markdown:Qc,mdx:Object.assign({},Wc,{parse:jc({isMDX:!0})})}},Zc=Yc.parsers;e.default=Yc,e.parsers=Zc,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/std/prettier/vendor/parser_typescript.d.ts b/std/prettier/vendor/parser_typescript.d.ts deleted file mode 100644 index 54a04a9532..0000000000 --- a/std/prettier/vendor/parser_typescript.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Parser } from './index.d.ts'; - -declare const parser: { parsers: { [parserName: string]: Parser } }; -export = parser; diff --git a/std/prettier/vendor/parser_typescript.js b/std/prettier/vendor/parser_typescript.js deleted file mode 100644 index 108c3964fb..0000000000 --- a/std/prettier/vendor/parser_typescript.js +++ /dev/null @@ -1,24 +0,0 @@ -// This file is copied from prettier@1.19.1 -/** - * Copyright © James Long and contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.typescript={}))}(globalThis,(function(e){"use strict";var t=function(e,t){var r=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return r.loc=t,r};var r=function(e,t){if(e.startsWith("#!")){var r=e.indexOf("\n"),n={type:"Line",value:e.slice(2,r),range:[0,r],loc:{source:null,start:{line:1,column:0},end:{line:1,column:r}}};t.comments=[n].concat(t.comments)}},n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,t){return e(t={exports:{}},t.exports),t.exports}function o(e){return e&&e.default||e}var s=Object.freeze({__proto__:null,default:{EOL:"\n"}}),c=a((function(e){e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t=e.match(/(?:\r?\n)/g)||[];if(0===t.length)return null;var r=t.filter((function(e){return"\r\n"===e})).length;return r>t.length-r?"\r\n":"\n"},e.exports.graceful=function(t){return e.exports(t)||"\n"}})),u=(c.graceful,o(s)),l=a((function(e,t){function r(){var e=u;return r=function(){return e},e}function n(){var e,t=(e=c)&&e.__esModule?e:{default:e};return n=function(){return t},t}Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e){var t=e.match(o);return t?t[0].trimLeft():""},t.strip=function(e){var t=e.match(o);return t&&t[0]?e.substring(t[0].length):e},t.parse=function(e){return f(e).pragmas},t.parseWithComments=f,t.print=function(e){var t=e.comments,i=void 0===t?"":t,a=e.pragmas,o=void 0===a?{}:a,s=(0,n().default)(i)||r().EOL,c=Object.keys(o),u=c.map((function(e){return m(e,o[e])})).reduce((function(e,t){return e.concat(t)}),[]).map((function(e){return" * "+e+s})).join("");if(!i){if(0===c.length)return"";if(1===c.length&&!Array.isArray(o[c[0]])){var l=o[c[0]];return"".concat("/**"," ").concat(m(c[0],l)[0]).concat(" */")}}var _=i.split(s).map((function(e){return"".concat(" *"," ").concat(e)})).join(s)+s;return"/**"+s+(i?_:"")+(i&&c.length?" *"+s:"")+u+" */"};var i=/\*\/$/,a=/^\/\*\*/,o=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,s=/(^|\s+)\/\/([^\r\n]*)/g,l=/^(\r?\n)+/,_=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,d=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,p=/(\r?\n|^) *\* ?/g;function f(e){var t=(0,n().default)(e)||r().EOL;e=e.replace(a,"").replace(i,"").replace(p,"$1");for(var o="";o!==e;)o=e,e=e.replace(_,"".concat(t,"$1 $2").concat(t));e=e.replace(l,"").trimRight();for(var c,u=Object.create(null),f=e.replace(d,"").replace(l,"").trimRight();c=d.exec(e);){var m=c[2].replace(s,"");"string"==typeof u[c[1]]||Array.isArray(u[c[1]])?u[c[1]]=[].concat(u[c[1]],m):u[c[1]]=m}return{comments:f,pragmas:u}}function m(e,t){return[].concat(t).map((function(t){return"@".concat(e," ").concat(t).trim()}))}}));i(l);l.extract,l.strip,l.parse,l.parseWithComments,l.print;var _=function(e){var t=Object.keys(l.parse(l.extract(e)));return-1!==t.indexOf("prettier")||-1!==t.indexOf("format")},d=function(e){return e.length>0?e[e.length-1]:null};var p={locStart:function e(t,r){return!(r=r||{}).ignoreDecorators&&t.declaration&&t.declaration.decorators&&t.declaration.decorators.length>0?e(t.declaration.decorators[0]):!r.ignoreDecorators&&t.decorators&&t.decorators.length>0?e(t.decorators[0]):t.__location?t.__location.startOffset:t.range?t.range[0]:"number"==typeof t.start?t.start:t.loc?t.loc.start:null},locEnd:function e(t){var r=t.nodes&&d(t.nodes);if(r&&t.source&&!t.source.end&&(t=r),t.__location)return t.__location.endOffset;var n=t.range?t.range[1]:"number"==typeof t.end?t.end:null;return t.typeAnnotation?Math.max(n,e(t.typeAnnotation)):t.loc&&!n?t.loc.end:n}};function f(e){return(f="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})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<~]))"].join("|");return new RegExp(t,e.onlyFirst?void 0:"g")}(),""):e},k=C,N=C;k.default=N;var A=function(e){return!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141))},F=A,P=A;F.default=P;var w=function(e){if("string"!=typeof(e=e.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===e.length)return 0;e=k(e);for(var t=0,r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=F(n)?2:1))}return t},I=w,O=w;I.default=O;var M=/[|\\{}()[\]^$+*?.]/g,L=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(M,"\\$&")},R=/[^\x20-\x7F]/;function B(e){if(e)switch(e.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function j(e){return function(t,r,n){var i=n&&n.backwards;if(!1===r)return!1;for(var a=t.length,o=r;o>=0&&o"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){Q[e]=t}))}));var Z={"==":!0,"!=":!0,"===":!0,"!==":!0},ee={"*":!0,"/":!0,"%":!0},te={">>":!0,">>>":!0,"<<":!0};function re(e,t,r){for(var n=0,i=r=r||0;i(r.match(o.regex)||[]).length?o.quote:a.quote);return s}function ie(e,t,r){var n='"'===t?"'":'"',i=e.replace(/\\([\s\S])|(['"])/g,(function(e,i,a){return i===n?i:a===t?"\\"+a:a||(r&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(i)?i:"\\"+i)}));return t+i+t}function ae(e){return e&&e.comments&&e.comments.length>0&&e.comments.some((function(e){return"prettier-ignore"===e.value.trim()}))}function oe(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}var se={replaceEndOfLineWith:function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e.split("\n")[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;0!==r.length&&r.push(t),r.push(c)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r},getStringWidth:function(e){return e?R.test(e)?I(e):e.length:0},getMaxContinuousCount:function(e,t){var r=e.match(new RegExp("(".concat(L(t),")+"),"g"));return null===r?0:r.reduce((function(e,r){return Math.max(e,r.length/t.length)}),0)},getMinNotPresentContinuousCount:function(e,t){var r=e.match(new RegExp("(".concat(L(t),")+"),"g"));if(null===r)return 0;var n=new Map,i=0,a=!0,o=!1,s=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var l=c.value.length/t.length;n.set(l,!0),l>i&&(i=l)}}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}for(var _=1;_1?e[e.length-2]:null},getLast:d,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:Y,getNextNonSpaceNonCommentCharacterIndex:X,getNextNonSpaceNonCommentCharacter:function(e,t,r){return e.charAt(X(e,t,r))},skip:j,skipWhitespace:K,skipSpaces:J,skipToLineEnd:z,skipEverythingButNewLine:U,skipInlineComment:V,skipTrailingComment:q,skipNewline:W,isNextLineEmptyAfterIndex:H,isNextLineEmpty:function(e,t,r){return H(e,r(t))},isPreviousLineEmpty:function(e,t,r){var n=r(t)-1;return n=W(e,n=J(e,n,{backwards:!0}),{backwards:!0}),(n=J(e,n,{backwards:!0}))!==W(e,n,{backwards:!0})},hasNewline:G,hasNewlineInRange:function(e,t,r){for(var n=t;n1)for(var r=1;r)?=?)",u("XRANGEIDENTIFIERLOOSE"),o[s.XRANGEIDENTIFIERLOOSE]=o[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",u("XRANGEIDENTIFIER"),o[s.XRANGEIDENTIFIER]=o[s.NUMERICIDENTIFIER]+"|x|X|\\*",u("XRANGEPLAIN"),o[s.XRANGEPLAIN]="[v=\\s]*("+o[s.XRANGEIDENTIFIER]+")(?:\\.("+o[s.XRANGEIDENTIFIER]+")(?:\\.("+o[s.XRANGEIDENTIFIER]+")(?:"+o[s.PRERELEASE]+")?"+o[s.BUILD]+"?)?)?",u("XRANGEPLAINLOOSE"),o[s.XRANGEPLAINLOOSE]="[v=\\s]*("+o[s.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+o[s.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+o[s.XRANGEIDENTIFIERLOOSE]+")(?:"+o[s.PRERELEASELOOSE]+")?"+o[s.BUILD]+"?)?)?",u("XRANGE"),o[s.XRANGE]="^"+o[s.GTLT]+"\\s*"+o[s.XRANGEPLAIN]+"$",u("XRANGELOOSE"),o[s.XRANGELOOSE]="^"+o[s.GTLT]+"\\s*"+o[s.XRANGEPLAINLOOSE]+"$",u("COERCE"),o[s.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",u("COERCERTL"),a[s.COERCERTL]=new RegExp(o[s.COERCE],"g"),u("LONETILDE"),o[s.LONETILDE]="(?:~>?)",u("TILDETRIM"),o[s.TILDETRIM]="(\\s*)"+o[s.LONETILDE]+"\\s+",a[s.TILDETRIM]=new RegExp(o[s.TILDETRIM],"g");u("TILDE"),o[s.TILDE]="^"+o[s.LONETILDE]+o[s.XRANGEPLAIN]+"$",u("TILDELOOSE"),o[s.TILDELOOSE]="^"+o[s.LONETILDE]+o[s.XRANGEPLAINLOOSE]+"$",u("LONECARET"),o[s.LONECARET]="(?:\\^)",u("CARETTRIM"),o[s.CARETTRIM]="(\\s*)"+o[s.LONECARET]+"\\s+",a[s.CARETTRIM]=new RegExp(o[s.CARETTRIM],"g");u("CARET"),o[s.CARET]="^"+o[s.LONECARET]+o[s.XRANGEPLAIN]+"$",u("CARETLOOSE"),o[s.CARETLOOSE]="^"+o[s.LONECARET]+o[s.XRANGEPLAINLOOSE]+"$",u("COMPARATORLOOSE"),o[s.COMPARATORLOOSE]="^"+o[s.GTLT]+"\\s*("+o[s.LOOSEPLAIN]+")$|^$",u("COMPARATOR"),o[s.COMPARATOR]="^"+o[s.GTLT]+"\\s*("+o[s.FULLPLAIN]+")$|^$",u("COMPARATORTRIM"),o[s.COMPARATORTRIM]="(\\s*)"+o[s.GTLT]+"\\s*("+o[s.LOOSEPLAIN]+"|"+o[s.XRANGEPLAIN]+")",a[s.COMPARATORTRIM]=new RegExp(o[s.COMPARATORTRIM],"g");u("HYPHENRANGE"),o[s.HYPHENRANGE]="^\\s*("+o[s.XRANGEPLAIN]+")\\s+-\\s+("+o[s.XRANGEPLAIN]+")\\s*$",u("HYPHENRANGELOOSE"),o[s.HYPHENRANGELOOSE]="^\\s*("+o[s.XRANGEPLAINLOOSE]+")\\s+-\\s+("+o[s.XRANGEPLAINLOOSE]+")\\s*$",u("STAR"),o[s.STAR]="(<|>)?=?\\s*\\*";for(var l=0;ln)return null;if(!(t.loose?a[s.LOOSE]:a[s.FULL]).test(e))return null;try{return new d(e,t)}catch(e){return null}}function d(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof d){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof d))return new d(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new d(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(v(e,t))return null;var r=_(e),n=_(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var a="prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==n[o])return i+o;return a},t.compareIdentifiers=m;var p=/^[0-9]+$/;function m(e,t){var r=p.test(e),n=p.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function h(e,t,r){return g(e,t,r)<0}function v(e,t,r){return 0===g(e,t,r)}function b(e,t,r){return 0!==g(e,t,r)}function x(e,t,r){return g(e,t,r)>=0}function D(e,t,r){return g(e,t,r)<=0}function S(e,t,r,n){switch(t){case"===":return"object"===f(e)&&(e=e.version),"object"===f(r)&&(r=r.version),e===r;case"!==":return"object"===f(e)&&(e=e.version),"object"===f(r)&&(r=r.version),e!==r;case"":case"=":case"==":return v(e,r,n);case"!=":return b(e,r,n);case">":return y(e,r,n);case">=":return x(e,r,n);case"<":return h(e,r,n);case"<=":return D(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function T(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof T){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof T))return new T(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===E?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return m(t,e)},t.major=function(e,t){return new d(e,t).major},t.minor=function(e,t){return new d(e,t).minor},t.patch=function(e,t){return new d(e,t).patch},t.compare=g,t.compareLoose=function(e,t){return g(e,t,!0)},t.compareBuild=function(e,t,r){var n=new d(e,r),i=new d(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return g(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=y,t.lt=h,t.eq=v,t.neq=b,t.gte=x,t.lte=D,t.cmp=S,t.Comparator=T;var E={};function C(e,t){if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),e instanceof C)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new C(e.raw,t);if(e instanceof T)return new C(e.value,t);if(!(this instanceof C))return new C(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function k(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function N(e){return!e||"x"===e.toLowerCase()||"*"===e}function A(e,t,r,n,i,a,o,s,c,u,l,_,d){return((t=N(r)?"":N(n)?">="+r+".0.0":N(i)?">="+r+"."+n+".0":">="+t)+" "+(s=N(c)?"":N(u)?"<"+(+c+1)+".0.0":N(l)?"<"+c+"."+(+u+1)+".0":_?"<="+c+"."+u+"."+l+"-"+_:"<="+s)).trim()}function F(e,t,n){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function P(e,t,r){try{t=new C(t,r)}catch(e){return!1}return t.test(e)}function w(e,t,r,n){var i,a,o,s,c;switch(e=new d(e,n),t=new C(t,n),r){case">":i=y,a=D,o=h,s=">",c=">=";break;case"<":i=h,a=x,o=y,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(P(e,t,n))return!1;for(var u=0;u=0.0.0")),_=_||e,p=p||e,i(e.semver,_.semver,n)?_=e:o(e.semver,p.semver,n)&&(p=e)})),_.operator===s||_.operator===c)return!1;if((!p.operator||p.operator===s)&&a(e,p.semver))return!1;if(p.operator===c&&o(e,p.semver))return!1}return!0}T.prototype.parse=function(e){var t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new d(r[2],this.options.loose):this.semver=E},T.prototype.toString=function(){return this.value},T.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===E||e===E)return!0;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}return S(e,this.operator,this.semver,this.options)},T.prototype.intersects=function(e,t){if(!(e instanceof T))throw new TypeError("a Comparator is required");var r;if(t&&"object"===f(t)||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new C(e.value,t),P(this.value,r,t));if(""===e.operator)return""===e.value||(r=new C(this.value,t),P(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=S(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=S(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=C,C.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},C.prototype.toString=function(){return this.range},C.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[s.HYPHENRANGELOOSE]:a[s.HYPHENRANGE];e=e.replace(n,A),r("hyphen replace",e),e=e.replace(a[s.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,a[s.COMPARATORTRIM]),e=(e=(e=e.replace(a[s.TILDETRIM],"$1~")).replace(a[s.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],o=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?a[s.CARETLOOSE]:a[s.CARET];return e.replace(n,(function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),N(n)?s="":N(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":N(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?a[s.TILDELOOSE]:a[s.TILDE];return e.replace(n,(function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),N(n)?s="":N(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":N(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?a[s.XRANGELOOSE]:a[s.XRANGE];return e.replace(n,(function(n,i,a,o,s,c){r("xRange",e,n,i,a,o,s,c);var u=N(a),l=u||N(o),_=l||N(s),d=_;return"="===i&&d&&(i=""),c=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&d?(l&&(o=0),s=0,">"===i?(i=">=",l?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",l?a=+a+1:o=+o+1),n=i+a+"."+o+"."+s+c):l?n=">="+a+".0.0"+c+" <"+(+a+1)+".0.0"+c:_&&(n=">="+a+"."+o+".0"+c+" <"+a+"."+(+o+1)+".0"+c),r("xRange return",n),n}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[s.STAR],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o=o.map((function(e){return new T(e,this.options)}),this)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw new TypeError("a Range is required");return this.set.some((function(r){return k(r,t)&&e.set.some((function(e){return k(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new C(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},C.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!y(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new C(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return w(e,t,"<",r)},t.gtr=function(e,t,r){return w(e,t,">",r)},t.outside=w,t.prerelease=function(e,t){var r=_(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new C(e,r),t=new C(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof d)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=a[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),a[s.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;a[s.COERCERTL].lastIndex=-1}else r=e.match(a[s.COERCE]);if(null===r)return null;return _(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}})),Le=(Me.SEMVER_SPEC_VERSION,Me.re,Me.src,Me.tokens,Me.parse,Me.valid,Me.clean,Me.SemVer,Me.inc,Me.diff,Me.compareIdentifiers,Me.rcompareIdentifiers,Me.major,Me.minor,Me.patch,Me.compare,Me.compareLoose,Me.compareBuild,Me.rcompare,Me.sort,Me.rsort,Me.gt,Me.lt,Me.eq,Me.neq,Me.gte,Me.lte,Me.cmp,Me.Comparator,Me.Range,Me.toComparators,Me.satisfies,Me.maxSatisfying,Me.minSatisfying,Me.minVersion,Me.validRange,Me.ltr,Me.gtr,Me.outside,Me.prerelease,Me.intersects,Me.coerce,"/Users/lydell/forks/prettier/node_modules/typescript/lib"),Re=Object.freeze({__proto__:null,default:{}});var Be=Object.freeze({__proto__:null,extname:function(e){var t=e.lastIndexOf(".");return-1===t?"":e.slice(t)}}),je=Object.freeze({__proto__:null,default:{}}),Ke=Object.freeze({__proto__:null,default:{}}),Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),ze=function(e){if(0<=e&&e>>=5)>0&&(t|=32),r+=ze(t)}while(n>0);return r},qe=function(e,t,r){var n,i,a,o,s=e.length,c=0,u=0;do{if(t>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=Ue(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&i),c+=(i&=31)<>1,1==(1&a)?-o:o),r.rest=t},We=a((function(e,t){t.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 r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(e){var t=e.match(r);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function a(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 o(e){var r=e,n=i(e);if(n){if(!n.path)return e;r=n.path}for(var o,s=t.isAbsolute(r),c=r.split(/\/+/),u=0,l=c.length-1;l>=0;l--)"."===(o=c[l])?c.splice(l,1):".."===o?u++:u>0&&(""===o?(c.splice(l+1,u),u=0):(c.splice(l,2),u--));return""===(r=c.join("/"))&&(r=s?"/":"."),n?(n.path=r,a(n)):r}function s(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),s=i(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),a(r);if(r||t.match(n))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=c,a(s)):c}t.urlParse=i,t.urlGenerate=a,t.normalize=o,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||r.test(e)},t.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 c=!("__proto__"in Object.create(null));function u(e){return e}function l(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 _(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=c?u:function(e){return l(e)?"$"+e:e},t.fromSetString=c?u:function(e){return l(e)?e.slice(1):e},t.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)},t.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)},t.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?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)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var n=i(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var c=n.path.lastIndexOf("/");c>=0&&(n.path=n.path.substring(0,c+1))}t=s(a(n),t)}return o(t)}})),Ge=(We.getArg,We.urlParse,We.urlGenerate,We.normalize,We.join,We.isAbsolute,We.relative,We.toSetString,We.fromSetString,We.compareByOriginalPositions,We.compareByGeneratedPositionsDeflated,We.compareByGeneratedPositionsInflated,We.parseSourceMapInput,We.computeSourceURL,Object.prototype.hasOwnProperty),He="undefined"!=typeof Map;function Ye(){this._array=[],this._set=He?new Map:Object.create(null)}Ye.fromArray=function(e,t){for(var r=new Ye,n=0,i=e.length;n=0)return t}else{var r=We.toSetString(e);if(Ge.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},Ye.prototype.at=function(e){if(e>=0&&en||i==n&&o>=a||We.compareByGeneratedPositionsInflated(t,r)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},Qe.prototype.toArray=function(){return this._sorted||(this._array.sort(We.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};var $e=Xe.ArraySet,Ze={MappingList:Qe}.MappingList;function et(e){e||(e={}),this._file=We.getArg(e,"file",null),this._sourceRoot=We.getArg(e,"sourceRoot",null),this._skipValidation=We.getArg(e,"skipValidation",!1),this._sources=new $e,this._names=new $e,this._mappings=new Ze,this._sourcesContents=null}et.prototype._version=3,et.fromSourceMap=function(e){var t=e.sourceRoot,r=new et({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=We.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(n){var i=n;null!==t&&(i=We.relative(t,n)),r._sources.has(i)||r._sources.add(i);var a=e.sourceContentFor(n);null!=a&&r.setSourceContent(n,a)})),r},et.prototype.addMapping=function(e){var t=We.getArg(e,"generated"),r=We.getArg(e,"original",null),n=We.getArg(e,"source",null),i=We.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})},et.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=We.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[We.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[We.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},et.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=We.relative(i,n));var a=new $e,o=new $e;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=s.source&&(t.source=s.source,null!=r&&(t.source=We.join(r,t.source)),null!=i&&(t.source=We.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,null!=s.name&&(t.name=s.name))}var c=t.source;null==c||a.has(c)||a.add(c);var u=t.name;null==u||o.has(u)||o.add(u)}),this),this._sources=a,this._names=o,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=We.join(r,t)),null!=i&&(t=We.relative(i,t)),this.setSourceContent(t,n))}),this)},et.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}))},et.prototype._serializeMappings=function(){for(var e,t,r,n,i=0,a=1,o=0,s=0,c=0,u=0,l="",_=this._mappings.toArray(),d=0,p=_.length;d0){if(!We.compareByGeneratedPositionsInflated(t,_[d-1]))continue;e+=","}e+=Ve(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=Ve(n-u),u=n,e+=Ve(t.originalLine-1-s),s=t.originalLine-1,e+=Ve(t.originalColumn-o),o=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=Ve(r-c),c=r)),l+=e}return l},et.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=We.relative(t,e));var r=We.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},et.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},et.prototype.toString=function(){return JSON.stringify(this.toJSON())};var tt={SourceMapGenerator:et},rt=a((function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,n,i){if(0===r.length)return-1;var a=function e(r,n,i,a,o,s){var c=Math.floor((n-r)/2)+r,u=o(i,a[c],!0);return 0===u?c:u>0?n-c>1?e(c,n,i,a,o,s):s==t.LEAST_UPPER_BOUND?n1?e(r,c,i,a,o,s):s==t.LEAST_UPPER_BOUND?c:r<0?-1:r}(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===n(r[a],r[a-1],!0);)--a;return a}}));rt.GREATEST_LOWER_BOUND,rt.LEAST_UPPER_BOUND,rt.search;function nt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function it(e,t,r,n){if(r=0){var a=this._originalMappings[i];if(void 0===e.column)for(var o=a.originalLine;a&&a.originalLine===o;)n.push({line:We.getArg(a,"generatedLine",null),column:We.getArg(a,"generatedColumn",null),lastColumn:We.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i];else for(var s=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==s;)n.push({line:We.getArg(a,"generatedLine",null),column:We.getArg(a,"generatedColumn",null),lastColumn:We.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++i]}return n};function ct(e,t){var r=e;"string"==typeof e&&(r=We.parseSourceMapInput(e));var n=We.getArg(r,"version"),i=We.getArg(r,"sources"),a=We.getArg(r,"names",[]),o=We.getArg(r,"sourceRoot",null),s=We.getArg(r,"sourcesContent",null),c=We.getArg(r,"mappings"),u=We.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=We.normalize(o)),i=i.map(String).map(We.normalize).map((function(e){return o&&We.isAbsolute(o)&&We.isAbsolute(e)?We.relative(o,e):e})),this._names=at.fromArray(a.map(String),!0),this._sources=at.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map((function(e){return We.computeSourceURL(o,e,t)})),this.sourceRoot=o,this.sourcesContent=s,this._mappings=c,this._sourceMapURL=t,this.file=u}function ut(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ct.prototype=Object.create(st.prototype),ct.prototype.consumer=st,ct.prototype._findSourceIndex=function(e){var t,r=e;if(null!=this.sourceRoot&&(r=We.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(t=0;t1&&(r.source=_+i[1],_+=i[1],r.originalLine=u+i[2],u=r.originalLine,r.originalLine+=1,r.originalColumn=l+i[3],l=r.originalColumn,i.length>4&&(r.name=d+i[4],d+=i[4])),h.push(r),"number"==typeof r.originalLine&&y.push(r)}ot(h,We.compareByGeneratedPositionsDeflated),this.__generatedMappings=h,ot(y,We.compareByOriginalPositions),this.__originalMappings=y},ct.prototype._findMapping=function(e,t,r,n,i,a){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 rt.search(e,t,i,a)},ct.prototype.computeColumnSpans=function(){for(var e=0;e=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var i=We.getArg(n,"source",null);null!==i&&(i=this._sources.at(i),i=We.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=We.getArg(n,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:We.getArg(n,"originalLine",null),column:We.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},ct.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e})))},ct.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var n,i=e;if(null!=this.sourceRoot&&(i=We.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=We.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},ct.prototype.generatedPositionFor=function(e){var t=We.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:We.getArg(e,"line"),originalColumn:We.getArg(e,"column")},n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",We.compareByOriginalPositions,We.getArg(e,"bias",st.GREATEST_LOWER_BOUND));if(n>=0){var i=this._originalMappings[n];if(i.source===r.source)return{line:We.getArg(i,"generatedLine",null),column:We.getArg(i,"generatedColumn",null),lastColumn:We.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};function lt(e,t){var r=e;"string"==typeof e&&(r=We.parseSourceMapInput(e));var n=We.getArg(r,"version"),i=We.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new at,this._names=new at;var a={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 r=We.getArg(e,"offset"),n=We.getArg(r,"line"),i=We.getArg(r,"column");if(n=0;t--)this.prepend(e[t]);else{if(!e[pt]&&"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},ft.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r>18&63]+mt[i>>12&63]+mt[i>>6&63]+mt[63&i]);return a.join("")}function xt(e){var t;ht||vt();for(var r=e.length,n=r%3,i="",a=[],o=0,s=r-n;os?s:o+16383));return 1===n?(t=e[r-1],i+=mt[t>>2],i+=mt[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=mt[t>>10],i+=mt[t>>4&63],i+=mt[t<<2&63],i+="="),a.push(i),a.join("")}function Dt(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,_=r?i-1:0,d=r?-1:1,p=e[t+_];for(_+=d,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+_],_+=d,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+_],_+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)}function St(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,f=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+_>=1?d/c:d*Math.pow(2,1-_))*c>=2&&(o++,c/=2),o+_>=l?(s=0,o=l):o+_>=1?(s=(t*c-1)*Math.pow(2,i),o+=_):(s=t*Math.pow(2,_-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=f,s/=256,i-=8);for(o=o<0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*m}var Tt={}.toString,Et=Array.isArray||function(e){return"[object Array]"==Tt.call(e)};function Ct(){return Nt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function kt(e,t){if(Ct()=Ct())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct().toString(16)+" bytes");return 0|e}function Ot(e){return!(null==e||!e._isBuffer)}function Mt(e,t){if(Ot(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))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 cr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return ur(e).length;default:if(n)return cr(e).length;t=(""+t).toLowerCase(),n=!0}}function Lt(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))return"";for(e||(e="utf8");;)switch(e){case"hex":return Qt(this,t,r);case"utf8":case"utf-8":return Gt(this,t,r);case"ascii":return Yt(this,t,r);case"latin1":case"binary":return Xt(this,t,r);case"base64":return Wt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function Rt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function Bt(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Nt.from(t,n)),Ot(t))return 0===t.length?-1:jt(e,t,r,n,i);if("number"==typeof t)return t&=255,Nt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):jt(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function jt(e,t,r,n,i){var a,o=1,s=e.length,c=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;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){for(var _=!0,d=0;di&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function Wt(e,t,r){return 0===t&&r===e.length?xt(e):xt(e.slice(t,r))}function Gt(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+_<=r)switch(_){case 1:u<128&&(l=u);break;case 2:128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)>127&&(l=c);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(c=(15&u)<<12|(63&a)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,_=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=_}return function(e){var t=e.length;if(t<=Ht)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},Nt.prototype.compare=function(e,t,r,n,i){if(!Ot(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===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),l=0;li)&&(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 a=!1;;)switch(n){case"hex":return Kt(this,e,t,r);case"utf8":case"utf-8":return Jt(this,e,t,r);case"ascii":return zt(this,e,t,r);case"latin1":case"binary":return Ut(this,e,t,r);case"base64":return Vt(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qt(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Nt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ht=4096;function Yt(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function er(e,t,r,n,i,a){if(!Ot(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function tr(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function rr(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function nr(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ir(e,t,r,n,i){return i||nr(e,0,r,4),St(e,t,r,n,23,4),r+4}function ar(e,t,r,n,i){return i||nr(e,0,r,8),St(e,t,r,n,52,8),r+8}Nt.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},Nt.prototype.readUInt8=function(e,t){return t||Zt(e,1,this.length),this[e]},Nt.prototype.readUInt16LE=function(e,t){return t||Zt(e,2,this.length),this[e]|this[e+1]<<8},Nt.prototype.readUInt16BE=function(e,t){return t||Zt(e,2,this.length),this[e]<<8|this[e+1]},Nt.prototype.readUInt32LE=function(e,t){return t||Zt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Nt.prototype.readUInt32BE=function(e,t){return t||Zt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Nt.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Zt(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},Nt.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Zt(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Nt.prototype.readInt8=function(e,t){return t||Zt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Nt.prototype.readInt16LE=function(e,t){t||Zt(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Nt.prototype.readInt16BE=function(e,t){t||Zt(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Nt.prototype.readInt32LE=function(e,t){return t||Zt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Nt.prototype.readInt32BE=function(e,t){return t||Zt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Nt.prototype.readFloatLE=function(e,t){return t||Zt(e,4,this.length),Dt(this,e,!0,23,4)},Nt.prototype.readFloatBE=function(e,t){return t||Zt(e,4,this.length),Dt(this,e,!1,23,4)},Nt.prototype.readDoubleLE=function(e,t){return t||Zt(e,8,this.length),Dt(this,e,!0,52,8)},Nt.prototype.readDoubleBE=function(e,t){return t||Zt(e,8,this.length),Dt(this,e,!1,52,8)},Nt.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||er(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},Nt.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,1,255,0),Nt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Nt.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,65535,0),Nt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):tr(this,e,t,!0),t+2},Nt.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,65535,0),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):tr(this,e,t,!1),t+2},Nt.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,4294967295,0),Nt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):rr(this,e,t,!0),t+4},Nt.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,4294967295,0),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rr(this,e,t,!1),t+4},Nt.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);er(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},Nt.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);er(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},Nt.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,1,127,-128),Nt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Nt.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,32767,-32768),Nt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):tr(this,e,t,!0),t+2},Nt.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,2,32767,-32768),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):tr(this,e,t,!1),t+2},Nt.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,2147483647,-2147483648),Nt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):rr(this,e,t,!0),t+4},Nt.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||er(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Nt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rr(this,e,t,!1),t+4},Nt.prototype.writeFloatLE=function(e,t,r){return ir(this,e,t,!0,r)},Nt.prototype.writeFloatBE=function(e,t,r){return ir(this,e,t,!1,r)},Nt.prototype.writeDoubleLE=function(e,t,r){return ar(this,e,t,!0,r)},Nt.prototype.writeDoubleBE=function(e,t,r){return ar(this,e,t,!1,r)},Nt.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=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=0;--i)e[i+t]=this[i+r];else if(a<1e3||!Nt.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.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;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function ur(e){return function(e){var t,r,n,i,a,o;ht||vt();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new yt(3*s/4-a),n=a>0?s-4:s;var c=0;for(t=0,r=0;t>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=gt[e.charCodeAt(t)]<<2|gt[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=gt[e.charCodeAt(t)]<<10|gt[e.charCodeAt(t+1)]<<4|gt[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(or,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function lr(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function _r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var dr=Object.prototype.toString,pr="function"==typeof Nt.alloc&&"function"==typeof Nt.allocUnsafe&&"function"==typeof Nt.from;var fr,mr=function(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return n=e,"ArrayBuffer"===dr.call(n).slice(8,-1)?function(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(void 0===r)r=n;else if((r>>>=0)>n)throw new RangeError("'length' is out of bounds");return pr?Nt.from(e.slice(t,t+r)):new Nt(new Uint8Array(e.slice(t,t+r)))}(e,t,r):"string"==typeof e?function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Nt.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return pr?Nt.from(e,t):new Nt(e,t)}(e,t):pr?Nt.from(e):new Nt(e);var n},gr=Object.freeze({__proto__:null,default:{}}),yr=o(Be),hr=o(Re),vr=(o(gr),yr);try{(fr=hr).existsSync&&fr.readFileSync||(fr=null)}catch(e){}var br="auto",xr={},Dr=/^data:application\/json[^,]+base64,/,Sr=[],Tr=[];function Er(){return"browser"===br||"node"!==br&&("undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type))}function Cr(e){return function(t){for(var r=0;r0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0;for(var r=0,n=e;r>1);switch(n(r(e[c]),t)){case-1:o=c+1;break;case 0:return c;case 1:s=c-1}}return~o}function m(e,t,r,n,i){if(e&&e.length>0){var a=e.length;if(a>0){var o=void 0===n||n<0?0:n,s=void 0===i||o+i>a-1?a-1:o+i,c=void 0;for(arguments.length<=2?(c=e[o],o++):c=r;o<=s;)c=t(c,e[o],o),o++;return c}}return r}e.emptyArray=[],e.Map=e.tryGetNativeMap()||function(){if("function"==typeof e.createMapShim)return e.createMapShim();throw new Error("TypeScript requires an environment that provides a compatible native Map implementation.")}(),e.createMap=r,e.createMapFromEntries=function(e){for(var t=r(),n=0,i=e;n=0;r--){var n=t(e[r],r);if(n)return n}},e.firstDefined=function(e,t){if(void 0!==e)for(var r=0;r=0;r--){var n=e[r];if(t(n,r))return n}},e.findIndex=function(e,t,r){for(var n=r||0;n=0;n--)if(t(e[n],n))return n;return-1},e.findMap=function(t,r){for(var n=0;n0&&e.Debug.assertGreaterThanOrEqual(n(r[o],r[o-1]),0);t:for(var s=a;as&&e.Debug.assertGreaterThanOrEqual(n(t[a],t[a-1]),0),n(r[o],t[a])){case-1:i.push(r[o]);continue e;case 0:continue e;case 1:continue t}}return i},e.sum=function(e,t){for(var r=0,n=0,i=e;nt?1:0}function P(e,t){return N(e,t)}e.hasProperty=y,e.getProperty=function(e,t){return g.call(e,t)?e[t]:void 0},e.getOwnKeys=function(e){var t=[];for(var r in e)g.call(e,r)&&t.push(r);return t},e.getAllKeys=function(e){var t=[];do{for(var r=0,n=Object.getOwnPropertyNames(e);r0?1:0}function i(e){var t=new Intl.Collator(e,{usage:"sort",sensitivity:"variant"}).compare;return function(e,r){return n(e,r,t)}}function a(e){return void 0!==e?o():function(e,r){return n(e,r,t)};function t(e,t){return e.localeCompare(t)}}function o(){return function(t,r){return n(t,r,e)};function e(e,r){return t(e.toUpperCase(),r.toUpperCase())||t(e,r)}function t(e,t){return et?1:0}}}();function M(e,t,r){for(var n=new Array(t.length+1),i=new Array(t.length+1),a=r+1,o=0;o<=t.length;o++)n[o]=o;for(o=1;o<=e.length;o++){var s=e.charCodeAt(o-1),c=o>r?o-r:1,u=t.length>r+o?r+o:t.length;i[0]=o;for(var l=o,_=1;_r)return;var p=n;n=i,i=p}var f=n[t.length];return f>r?void 0:f}function L(e,t){var r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function R(e,t){for(var r=t;r=r.length+n.length&&K(t,r)&&L(t,n)}e.getUILocale=function(){return I},e.setUILocale=function(e){I!==e&&(I=e,w=void 0)},e.compareStringsCaseSensitiveUI=function(e,t){return(w||(w=O(I)))(e,t)},e.compareProperties=function(e,t,r,n){return e===t?0:void 0===e?-1:void 0===t?1:n(e[r],t[r])},e.compareBooleans=function(e,t){return A(e?1:0,t?1:0)},e.getSpellingSuggestion=function(t,r,n){for(var i,a=Math.min(2,Math.floor(.34*t.length)),o=Math.floor(.4*t.length)+1,s=!1,c=t.toLowerCase(),u=0,l=r;ui&&(i=c.prefix.length,n=s)}return n},e.startsWith=K,e.removePrefix=function(e,t){return K(e,t)?e.substr(t.length):e},e.tryRemovePrefix=function(e,t,r){return void 0===r&&(r=E),K(r(e),r(t))?e.substring(t.length):void 0},e.and=function(e,t){return function(r){return e(r)&&t(r)}},e.or=function(){for(var e=[],t=0;t=e}function n(e,t,r,a){e||(r&&(t+="\r\nVerbose Debug Information: "+("string"==typeof r?r:r())),i(t?"False expression: "+t:"False expression.",a||n))}function i(e,t){var r=new Error(e?"Debug Failure. "+e:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(r,t||i),r}function a(e,t){return null==e?i(t):e}function o(e){if("function"!=typeof e)return"";if(e.hasOwnProperty("name"))return e.name;var t=Function.prototype.toString.call(e),r=/^function\s+([\w\$]+)\s*\(/.exec(t);return r?r[1]:""}function s(t,r,n){void 0===t&&(t=0);var i=function(t){var r=[];for(var n in t){var i=t[n];"number"==typeof i&&r.push([i,n])}return e.stableSort(r,(function(t,r){return e.compareValues(t[0],r[0])}))}(r);if(0===t)return i.length>0&&0===i[0][0]?i[0][1]:"0";if(n){for(var a="",o=t,s=i.length-1;s>=0&&0!==o;s--){var c=i[s],u=c[0],l=c[1];0!==u&&(o&u)===u&&(o&=~u,a=l+(a?"|":"")+a)}if(0===o)return a}else for(var _=0,d=i;_=t&&i("Expected "+e+" < "+t+". "+(r||""))},t.assertLessThanOrEqual=function(e,t){e>t&&i("Expected "+e+" <= "+t)},t.assertGreaterThanOrEqual=function(e,t){e= "+t)},t.fail=i,t.assertDefined=a,t.assertEachDefined=function(e,t){for(var r=0,n=e;r=0,"Invalid argument: major"),e.Debug.assert(i>=0,"Invalid argument: minor"),e.Debug.assert(a>=0,"Invalid argument: patch"),e.Debug.assert(!s||r.test(s),"Invalid argument: prerelease"),e.Debug.assert(!c||n.test(c),"Invalid argument: build"),this.major=t,this.minor=i,this.patch=a,this.prerelease=s?s.split("."):e.emptyArray,this.build=c?c.split("."):e.emptyArray}return t.tryParse=function(e){var r=o(e);if(r)return new t(r.major,r.minor,r.patch,r.prerelease,r.build)},t.prototype.compareTo=function(t){return this===t?0:void 0===t?1:e.compareValues(this.major,t.major)||e.compareValues(this.minor,t.minor)||e.compareValues(this.patch,t.patch)||function(t,r){if(t===r)return 0;if(0===t.length)return 0===r.length?0:1;if(0===r.length)return-1;for(var n=Math.min(t.length,r.length),a=0;a|>=|=)?\s*([a-z0-9-+.*]+)$/i;function p(e){for(var t=[],r=0,n=e.trim().split(c);r=",n.version)),y(i.major)||r.push(y(i.minor)?h("<",i.version.increment("major")):y(i.patch)?h("<",i.version.increment("minor")):h("<=",i.version)),!0)}function g(e,t,r){var n=f(t);if(!n)return!1;var i=n.version,o=n.major,s=n.minor,c=n.patch;if(y(o))"<"!==e&&">"!==e||r.push(h("<",a.zero));else switch(e){case"~":r.push(h(">=",i)),r.push(h("<",i.increment(y(s)?"major":"minor")));break;case"^":r.push(h(">=",i)),r.push(h("<",i.increment(i.major>0||y(s)?"major":i.minor>0||y(c)?"minor":"patch")));break;case"<":case">=":r.push(h(e,i));break;case"<=":case">":r.push(y(s)?h("<="===e?"<":">=",i.increment("major")):y(c)?h("<="===e?"<":">=",i.increment("minor")):h(e,i));break;case"=":case void 0:y(s)||y(c)?(r.push(h(">=",i)),r.push(h("<",i.increment(y(s)?"major":"minor")))):r.push(h("=",i));break;default:return!1}return!0}function y(e){return"*"===e||"x"===e||"X"===e}function h(e,t){return{operator:e,operand:t}}function v(e,t){for(var r=0,n=t;r":return i>0;case">=":return i>=0;case"=":return 0===i;default:return e.Debug.assertNever(r)}}function x(t){return e.map(t,D).join(" ")}function D(e){return""+e.operator+e.operand}}(s||(s={})),function(e){!function(e){e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NumericLiteral=8]="NumericLiteral",e[e.BigIntLiteral=9]="BigIntLiteral",e[e.StringLiteral=10]="StringLiteral",e[e.JsxText=11]="JsxText",e[e.JsxTextAllWhiteSpaces=12]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=13]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=14]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=15]="TemplateHead",e[e.TemplateMiddle=16]="TemplateMiddle",e[e.TemplateTail=17]="TemplateTail",e[e.OpenBraceToken=18]="OpenBraceToken",e[e.CloseBraceToken=19]="CloseBraceToken",e[e.OpenParenToken=20]="OpenParenToken",e[e.CloseParenToken=21]="CloseParenToken",e[e.OpenBracketToken=22]="OpenBracketToken",e[e.CloseBracketToken=23]="CloseBracketToken",e[e.DotToken=24]="DotToken",e[e.DotDotDotToken=25]="DotDotDotToken",e[e.SemicolonToken=26]="SemicolonToken",e[e.CommaToken=27]="CommaToken",e[e.QuestionDotToken=28]="QuestionDotToken",e[e.LessThanToken=29]="LessThanToken",e[e.LessThanSlashToken=30]="LessThanSlashToken",e[e.GreaterThanToken=31]="GreaterThanToken",e[e.LessThanEqualsToken=32]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=33]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=34]="EqualsEqualsToken",e[e.ExclamationEqualsToken=35]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=36]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=37]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=38]="EqualsGreaterThanToken",e[e.PlusToken=39]="PlusToken",e[e.MinusToken=40]="MinusToken",e[e.AsteriskToken=41]="AsteriskToken",e[e.AsteriskAsteriskToken=42]="AsteriskAsteriskToken",e[e.SlashToken=43]="SlashToken",e[e.PercentToken=44]="PercentToken",e[e.PlusPlusToken=45]="PlusPlusToken",e[e.MinusMinusToken=46]="MinusMinusToken",e[e.LessThanLessThanToken=47]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=48]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=49]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=50]="AmpersandToken",e[e.BarToken=51]="BarToken",e[e.CaretToken=52]="CaretToken",e[e.ExclamationToken=53]="ExclamationToken",e[e.TildeToken=54]="TildeToken",e[e.AmpersandAmpersandToken=55]="AmpersandAmpersandToken",e[e.BarBarToken=56]="BarBarToken",e[e.QuestionToken=57]="QuestionToken",e[e.ColonToken=58]="ColonToken",e[e.AtToken=59]="AtToken",e[e.QuestionQuestionToken=60]="QuestionQuestionToken",e[e.BacktickToken=61]="BacktickToken",e[e.EqualsToken=62]="EqualsToken",e[e.PlusEqualsToken=63]="PlusEqualsToken",e[e.MinusEqualsToken=64]="MinusEqualsToken",e[e.AsteriskEqualsToken=65]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=66]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=67]="SlashEqualsToken",e[e.PercentEqualsToken=68]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=69]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=70]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=71]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=72]="AmpersandEqualsToken",e[e.BarEqualsToken=73]="BarEqualsToken",e[e.CaretEqualsToken=74]="CaretEqualsToken",e[e.Identifier=75]="Identifier",e[e.BreakKeyword=76]="BreakKeyword",e[e.CaseKeyword=77]="CaseKeyword",e[e.CatchKeyword=78]="CatchKeyword",e[e.ClassKeyword=79]="ClassKeyword",e[e.ConstKeyword=80]="ConstKeyword",e[e.ContinueKeyword=81]="ContinueKeyword",e[e.DebuggerKeyword=82]="DebuggerKeyword",e[e.DefaultKeyword=83]="DefaultKeyword",e[e.DeleteKeyword=84]="DeleteKeyword",e[e.DoKeyword=85]="DoKeyword",e[e.ElseKeyword=86]="ElseKeyword",e[e.EnumKeyword=87]="EnumKeyword",e[e.ExportKeyword=88]="ExportKeyword",e[e.ExtendsKeyword=89]="ExtendsKeyword",e[e.FalseKeyword=90]="FalseKeyword",e[e.FinallyKeyword=91]="FinallyKeyword",e[e.ForKeyword=92]="ForKeyword",e[e.FunctionKeyword=93]="FunctionKeyword",e[e.IfKeyword=94]="IfKeyword",e[e.ImportKeyword=95]="ImportKeyword",e[e.InKeyword=96]="InKeyword",e[e.InstanceOfKeyword=97]="InstanceOfKeyword",e[e.NewKeyword=98]="NewKeyword",e[e.NullKeyword=99]="NullKeyword",e[e.ReturnKeyword=100]="ReturnKeyword",e[e.SuperKeyword=101]="SuperKeyword",e[e.SwitchKeyword=102]="SwitchKeyword",e[e.ThisKeyword=103]="ThisKeyword",e[e.ThrowKeyword=104]="ThrowKeyword",e[e.TrueKeyword=105]="TrueKeyword",e[e.TryKeyword=106]="TryKeyword",e[e.TypeOfKeyword=107]="TypeOfKeyword",e[e.VarKeyword=108]="VarKeyword",e[e.VoidKeyword=109]="VoidKeyword",e[e.WhileKeyword=110]="WhileKeyword",e[e.WithKeyword=111]="WithKeyword",e[e.ImplementsKeyword=112]="ImplementsKeyword",e[e.InterfaceKeyword=113]="InterfaceKeyword",e[e.LetKeyword=114]="LetKeyword",e[e.PackageKeyword=115]="PackageKeyword",e[e.PrivateKeyword=116]="PrivateKeyword",e[e.ProtectedKeyword=117]="ProtectedKeyword",e[e.PublicKeyword=118]="PublicKeyword",e[e.StaticKeyword=119]="StaticKeyword",e[e.YieldKeyword=120]="YieldKeyword",e[e.AbstractKeyword=121]="AbstractKeyword",e[e.AsKeyword=122]="AsKeyword",e[e.AssertsKeyword=123]="AssertsKeyword",e[e.AnyKeyword=124]="AnyKeyword",e[e.AsyncKeyword=125]="AsyncKeyword",e[e.AwaitKeyword=126]="AwaitKeyword",e[e.BooleanKeyword=127]="BooleanKeyword",e[e.ConstructorKeyword=128]="ConstructorKeyword",e[e.DeclareKeyword=129]="DeclareKeyword",e[e.GetKeyword=130]="GetKeyword",e[e.InferKeyword=131]="InferKeyword",e[e.IsKeyword=132]="IsKeyword",e[e.KeyOfKeyword=133]="KeyOfKeyword",e[e.ModuleKeyword=134]="ModuleKeyword",e[e.NamespaceKeyword=135]="NamespaceKeyword",e[e.NeverKeyword=136]="NeverKeyword",e[e.ReadonlyKeyword=137]="ReadonlyKeyword",e[e.RequireKeyword=138]="RequireKeyword",e[e.NumberKeyword=139]="NumberKeyword",e[e.ObjectKeyword=140]="ObjectKeyword",e[e.SetKeyword=141]="SetKeyword",e[e.StringKeyword=142]="StringKeyword",e[e.SymbolKeyword=143]="SymbolKeyword",e[e.TypeKeyword=144]="TypeKeyword",e[e.UndefinedKeyword=145]="UndefinedKeyword",e[e.UniqueKeyword=146]="UniqueKeyword",e[e.UnknownKeyword=147]="UnknownKeyword",e[e.FromKeyword=148]="FromKeyword",e[e.GlobalKeyword=149]="GlobalKeyword",e[e.BigIntKeyword=150]="BigIntKeyword",e[e.OfKeyword=151]="OfKeyword",e[e.QualifiedName=152]="QualifiedName",e[e.ComputedPropertyName=153]="ComputedPropertyName",e[e.TypeParameter=154]="TypeParameter",e[e.Parameter=155]="Parameter",e[e.Decorator=156]="Decorator",e[e.PropertySignature=157]="PropertySignature",e[e.PropertyDeclaration=158]="PropertyDeclaration",e[e.MethodSignature=159]="MethodSignature",e[e.MethodDeclaration=160]="MethodDeclaration",e[e.Constructor=161]="Constructor",e[e.GetAccessor=162]="GetAccessor",e[e.SetAccessor=163]="SetAccessor",e[e.CallSignature=164]="CallSignature",e[e.ConstructSignature=165]="ConstructSignature",e[e.IndexSignature=166]="IndexSignature",e[e.TypePredicate=167]="TypePredicate",e[e.TypeReference=168]="TypeReference",e[e.FunctionType=169]="FunctionType",e[e.ConstructorType=170]="ConstructorType",e[e.TypeQuery=171]="TypeQuery",e[e.TypeLiteral=172]="TypeLiteral",e[e.ArrayType=173]="ArrayType",e[e.TupleType=174]="TupleType",e[e.OptionalType=175]="OptionalType",e[e.RestType=176]="RestType",e[e.UnionType=177]="UnionType",e[e.IntersectionType=178]="IntersectionType",e[e.ConditionalType=179]="ConditionalType",e[e.InferType=180]="InferType",e[e.ParenthesizedType=181]="ParenthesizedType",e[e.ThisType=182]="ThisType",e[e.TypeOperator=183]="TypeOperator",e[e.IndexedAccessType=184]="IndexedAccessType",e[e.MappedType=185]="MappedType",e[e.LiteralType=186]="LiteralType",e[e.ImportType=187]="ImportType",e[e.ObjectBindingPattern=188]="ObjectBindingPattern",e[e.ArrayBindingPattern=189]="ArrayBindingPattern",e[e.BindingElement=190]="BindingElement",e[e.ArrayLiteralExpression=191]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=192]="ObjectLiteralExpression",e[e.PropertyAccessExpression=193]="PropertyAccessExpression",e[e.ElementAccessExpression=194]="ElementAccessExpression",e[e.CallExpression=195]="CallExpression",e[e.NewExpression=196]="NewExpression",e[e.TaggedTemplateExpression=197]="TaggedTemplateExpression",e[e.TypeAssertionExpression=198]="TypeAssertionExpression",e[e.ParenthesizedExpression=199]="ParenthesizedExpression",e[e.FunctionExpression=200]="FunctionExpression",e[e.ArrowFunction=201]="ArrowFunction",e[e.DeleteExpression=202]="DeleteExpression",e[e.TypeOfExpression=203]="TypeOfExpression",e[e.VoidExpression=204]="VoidExpression",e[e.AwaitExpression=205]="AwaitExpression",e[e.PrefixUnaryExpression=206]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=207]="PostfixUnaryExpression",e[e.BinaryExpression=208]="BinaryExpression",e[e.ConditionalExpression=209]="ConditionalExpression",e[e.TemplateExpression=210]="TemplateExpression",e[e.YieldExpression=211]="YieldExpression",e[e.SpreadElement=212]="SpreadElement",e[e.ClassExpression=213]="ClassExpression",e[e.OmittedExpression=214]="OmittedExpression",e[e.ExpressionWithTypeArguments=215]="ExpressionWithTypeArguments",e[e.AsExpression=216]="AsExpression",e[e.NonNullExpression=217]="NonNullExpression",e[e.MetaProperty=218]="MetaProperty",e[e.SyntheticExpression=219]="SyntheticExpression",e[e.TemplateSpan=220]="TemplateSpan",e[e.SemicolonClassElement=221]="SemicolonClassElement",e[e.Block=222]="Block",e[e.EmptyStatement=223]="EmptyStatement",e[e.VariableStatement=224]="VariableStatement",e[e.ExpressionStatement=225]="ExpressionStatement",e[e.IfStatement=226]="IfStatement",e[e.DoStatement=227]="DoStatement",e[e.WhileStatement=228]="WhileStatement",e[e.ForStatement=229]="ForStatement",e[e.ForInStatement=230]="ForInStatement",e[e.ForOfStatement=231]="ForOfStatement",e[e.ContinueStatement=232]="ContinueStatement",e[e.BreakStatement=233]="BreakStatement",e[e.ReturnStatement=234]="ReturnStatement",e[e.WithStatement=235]="WithStatement",e[e.SwitchStatement=236]="SwitchStatement",e[e.LabeledStatement=237]="LabeledStatement",e[e.ThrowStatement=238]="ThrowStatement",e[e.TryStatement=239]="TryStatement",e[e.DebuggerStatement=240]="DebuggerStatement",e[e.VariableDeclaration=241]="VariableDeclaration",e[e.VariableDeclarationList=242]="VariableDeclarationList",e[e.FunctionDeclaration=243]="FunctionDeclaration",e[e.ClassDeclaration=244]="ClassDeclaration",e[e.InterfaceDeclaration=245]="InterfaceDeclaration",e[e.TypeAliasDeclaration=246]="TypeAliasDeclaration",e[e.EnumDeclaration=247]="EnumDeclaration",e[e.ModuleDeclaration=248]="ModuleDeclaration",e[e.ModuleBlock=249]="ModuleBlock",e[e.CaseBlock=250]="CaseBlock",e[e.NamespaceExportDeclaration=251]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=252]="ImportEqualsDeclaration",e[e.ImportDeclaration=253]="ImportDeclaration",e[e.ImportClause=254]="ImportClause",e[e.NamespaceImport=255]="NamespaceImport",e[e.NamedImports=256]="NamedImports",e[e.ImportSpecifier=257]="ImportSpecifier",e[e.ExportAssignment=258]="ExportAssignment",e[e.ExportDeclaration=259]="ExportDeclaration",e[e.NamedExports=260]="NamedExports",e[e.ExportSpecifier=261]="ExportSpecifier",e[e.MissingDeclaration=262]="MissingDeclaration",e[e.ExternalModuleReference=263]="ExternalModuleReference",e[e.JsxElement=264]="JsxElement",e[e.JsxSelfClosingElement=265]="JsxSelfClosingElement",e[e.JsxOpeningElement=266]="JsxOpeningElement",e[e.JsxClosingElement=267]="JsxClosingElement",e[e.JsxFragment=268]="JsxFragment",e[e.JsxOpeningFragment=269]="JsxOpeningFragment",e[e.JsxClosingFragment=270]="JsxClosingFragment",e[e.JsxAttribute=271]="JsxAttribute",e[e.JsxAttributes=272]="JsxAttributes",e[e.JsxSpreadAttribute=273]="JsxSpreadAttribute",e[e.JsxExpression=274]="JsxExpression",e[e.CaseClause=275]="CaseClause",e[e.DefaultClause=276]="DefaultClause",e[e.HeritageClause=277]="HeritageClause",e[e.CatchClause=278]="CatchClause",e[e.PropertyAssignment=279]="PropertyAssignment",e[e.ShorthandPropertyAssignment=280]="ShorthandPropertyAssignment",e[e.SpreadAssignment=281]="SpreadAssignment",e[e.EnumMember=282]="EnumMember",e[e.UnparsedPrologue=283]="UnparsedPrologue",e[e.UnparsedPrepend=284]="UnparsedPrepend",e[e.UnparsedText=285]="UnparsedText",e[e.UnparsedInternalText=286]="UnparsedInternalText",e[e.UnparsedSyntheticReference=287]="UnparsedSyntheticReference",e[e.SourceFile=288]="SourceFile",e[e.Bundle=289]="Bundle",e[e.UnparsedSource=290]="UnparsedSource",e[e.InputFiles=291]="InputFiles",e[e.JSDocTypeExpression=292]="JSDocTypeExpression",e[e.JSDocAllType=293]="JSDocAllType",e[e.JSDocUnknownType=294]="JSDocUnknownType",e[e.JSDocNullableType=295]="JSDocNullableType",e[e.JSDocNonNullableType=296]="JSDocNonNullableType",e[e.JSDocOptionalType=297]="JSDocOptionalType",e[e.JSDocFunctionType=298]="JSDocFunctionType",e[e.JSDocVariadicType=299]="JSDocVariadicType",e[e.JSDocNamepathType=300]="JSDocNamepathType",e[e.JSDocComment=301]="JSDocComment",e[e.JSDocTypeLiteral=302]="JSDocTypeLiteral",e[e.JSDocSignature=303]="JSDocSignature",e[e.JSDocTag=304]="JSDocTag",e[e.JSDocAugmentsTag=305]="JSDocAugmentsTag",e[e.JSDocAuthorTag=306]="JSDocAuthorTag",e[e.JSDocClassTag=307]="JSDocClassTag",e[e.JSDocCallbackTag=308]="JSDocCallbackTag",e[e.JSDocEnumTag=309]="JSDocEnumTag",e[e.JSDocParameterTag=310]="JSDocParameterTag",e[e.JSDocReturnTag=311]="JSDocReturnTag",e[e.JSDocThisTag=312]="JSDocThisTag",e[e.JSDocTypeTag=313]="JSDocTypeTag",e[e.JSDocTemplateTag=314]="JSDocTemplateTag",e[e.JSDocTypedefTag=315]="JSDocTypedefTag",e[e.JSDocPropertyTag=316]="JSDocPropertyTag",e[e.SyntaxList=317]="SyntaxList",e[e.NotEmittedStatement=318]="NotEmittedStatement",e[e.PartiallyEmittedExpression=319]="PartiallyEmittedExpression",e[e.CommaListExpression=320]="CommaListExpression",e[e.MergeDeclarationMarker=321]="MergeDeclarationMarker",e[e.EndOfDeclarationMarker=322]="EndOfDeclarationMarker",e[e.SyntheticReferenceExpression=323]="SyntheticReferenceExpression",e[e.Count=324]="Count",e[e.FirstAssignment=62]="FirstAssignment",e[e.LastAssignment=74]="LastAssignment",e[e.FirstCompoundAssignment=63]="FirstCompoundAssignment",e[e.LastCompoundAssignment=74]="LastCompoundAssignment",e[e.FirstReservedWord=76]="FirstReservedWord",e[e.LastReservedWord=111]="LastReservedWord",e[e.FirstKeyword=76]="FirstKeyword",e[e.LastKeyword=151]="LastKeyword",e[e.FirstFutureReservedWord=112]="FirstFutureReservedWord",e[e.LastFutureReservedWord=120]="LastFutureReservedWord",e[e.FirstTypeNode=167]="FirstTypeNode",e[e.LastTypeNode=187]="LastTypeNode",e[e.FirstPunctuation=18]="FirstPunctuation",e[e.LastPunctuation=74]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=151]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=8]="FirstLiteralToken",e[e.LastLiteralToken=14]="LastLiteralToken",e[e.FirstTemplateToken=14]="FirstTemplateToken",e[e.LastTemplateToken=17]="LastTemplateToken",e[e.FirstBinaryOperator=29]="FirstBinaryOperator",e[e.LastBinaryOperator=74]="LastBinaryOperator",e[e.FirstStatement=224]="FirstStatement",e[e.LastStatement=240]="LastStatement",e[e.FirstNode=152]="FirstNode",e[e.FirstJSDocNode=292]="FirstJSDocNode",e[e.LastJSDocNode=316]="LastJSDocNode",e[e.FirstJSDocTagNode=304]="FirstJSDocTagNode",e[e.LastJSDocTagNode=316]="LastJSDocTagNode",e[e.FirstContextualKeyword=121]="FirstContextualKeyword",e[e.LastContextualKeyword=151]="LastContextualKeyword"}(e.SyntaxKind||(e.SyntaxKind={})),function(e){e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.NestedNamespace=4]="NestedNamespace",e[e.Synthesized=8]="Synthesized",e[e.Namespace=16]="Namespace",e[e.OptionalChain=32]="OptionalChain",e[e.ExportContext=64]="ExportContext",e[e.ContainsThis=128]="ContainsThis",e[e.HasImplicitReturn=256]="HasImplicitReturn",e[e.HasExplicitReturn=512]="HasExplicitReturn",e[e.GlobalAugmentation=1024]="GlobalAugmentation",e[e.HasAsyncFunctions=2048]="HasAsyncFunctions",e[e.DisallowInContext=4096]="DisallowInContext",e[e.YieldContext=8192]="YieldContext",e[e.DecoratorContext=16384]="DecoratorContext",e[e.AwaitContext=32768]="AwaitContext",e[e.ThisNodeHasError=65536]="ThisNodeHasError",e[e.JavaScriptFile=131072]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=262144]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=524288]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=1048576]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=2097152]="PossiblyContainsImportMeta",e[e.JSDoc=4194304]="JSDoc",e[e.Ambient=8388608]="Ambient",e[e.InWithStatement=16777216]="InWithStatement",e[e.JsonFile=33554432]="JsonFile",e[e.BlockScoped=3]="BlockScoped",e[e.ReachabilityCheckFlags=768]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=2816]="ReachabilityAndEmitFlags",e[e.ContextFlags=25358336]="ContextFlags",e[e.TypeExcludesFlags=40960]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=3145728]="PermanentlySetIncrementalFlags"}(e.NodeFlags||(e.NodeFlags={})),function(e){e[e.None=0]="None",e[e.Export=1]="Export",e[e.Ambient=2]="Ambient",e[e.Public=4]="Public",e[e.Private=8]="Private",e[e.Protected=16]="Protected",e[e.Static=32]="Static",e[e.Readonly=64]="Readonly",e[e.Abstract=128]="Abstract",e[e.Async=256]="Async",e[e.Default=512]="Default",e[e.Const=2048]="Const",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=28]="AccessibilityModifier",e[e.ParameterPropertyModifier=92]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=24]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=2270]="TypeScriptModifier",e[e.ExportDefault=513]="ExportDefault",e[e.All=3071]="All"}(e.ModifierFlags||(e.ModifierFlags={})),function(e){e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement"}(e.JsxFlags||(e.JsxFlags={})),function(e){e[e.Succeeded=1]="Succeeded",e[e.Failed=2]="Failed",e[e.Reported=4]="Reported",e[e.ReportsUnmeasurable=8]="ReportsUnmeasurable",e[e.ReportsUnreliable=16]="ReportsUnreliable",e[e.ReportsMask=24]="ReportsMask"}(e.RelationComparisonResult||(e.RelationComparisonResult={})),function(e){e[e.None=0]="None",e[e.Auto=1]="Auto",e[e.Loop=2]="Loop",e[e.Unique=3]="Unique",e[e.Node=4]="Node",e[e.KindMask=7]="KindMask",e[e.ReservedInNestedScopes=8]="ReservedInNestedScopes",e[e.Optimistic=16]="Optimistic",e[e.FileLevel=32]="FileLevel"}(e.GeneratedIdentifierFlags||(e.GeneratedIdentifierFlags={})),function(e){e[e.None=0]="None",e[e.PrecedingLineBreak=1]="PrecedingLineBreak",e[e.PrecedingJSDocComment=2]="PrecedingJSDocComment",e[e.Unterminated=4]="Unterminated",e[e.ExtendedUnicodeEscape=8]="ExtendedUnicodeEscape",e[e.Scientific=16]="Scientific",e[e.Octal=32]="Octal",e[e.HexSpecifier=64]="HexSpecifier",e[e.BinarySpecifier=128]="BinarySpecifier",e[e.OctalSpecifier=256]="OctalSpecifier",e[e.ContainsSeparator=512]="ContainsSeparator",e[e.UnicodeEscape=1024]="UnicodeEscape",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.NumericLiteralFlags=1008]="NumericLiteralFlags"}(e.TokenFlags||(e.TokenFlags={})),function(e){e[e.Unreachable=1]="Unreachable",e[e.Start=2]="Start",e[e.BranchLabel=4]="BranchLabel",e[e.LoopLabel=8]="LoopLabel",e[e.Assignment=16]="Assignment",e[e.TrueCondition=32]="TrueCondition",e[e.FalseCondition=64]="FalseCondition",e[e.SwitchClause=128]="SwitchClause",e[e.ArrayMutation=256]="ArrayMutation",e[e.Call=512]="Call",e[e.Referenced=1024]="Referenced",e[e.Shared=2048]="Shared",e[e.PreFinally=4096]="PreFinally",e[e.AfterFinally=8192]="AfterFinally",e[e.Cached=16384]="Cached",e[e.Label=12]="Label",e[e.Condition=96]="Condition"}(e.FlowFlags||(e.FlowFlags={}));var t,r=function(){};e.OperationCanceledException=r,function(e){e[e.Import=0]="Import",e[e.ReferenceFile=1]="ReferenceFile",e[e.TypeReferenceDirective=2]="TypeReferenceDirective"}(e.RefFileKind||(e.RefFileKind={})),function(e){e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely"}(e.StructureIsReused||(e.StructureIsReused={})),function(e){e[e.Success=0]="Success",e[e.DiagnosticsPresent_OutputsSkipped=1]="DiagnosticsPresent_OutputsSkipped",e[e.DiagnosticsPresent_OutputsGenerated=2]="DiagnosticsPresent_OutputsGenerated",e[e.InvalidProject_OutputsSkipped=3]="InvalidProject_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkipped=4]="ProjectReferenceCycle_OutputsSkipped",e[e.ProjectReferenceCycle_OutputsSkupped=4]="ProjectReferenceCycle_OutputsSkupped"}(e.ExitStatus||(e.ExitStatus={})),function(e){e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype"}(e.UnionReduction||(e.UnionReduction={})),function(e){e[e.None=0]="None",e[e.Signature=1]="Signature",e[e.NoConstraints=2]="NoConstraints",e[e.Completion=4]="Completion"}(e.ContextFlags||(e.ContextFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.GenerateNamesForShadowedTypeParams=4]="GenerateNamesForShadowedTypeParams",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.ForbidIndexedAccessSymbolReferences=16]="ForbidIndexedAccessSymbolReferences",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.UseOnlyExternalAliasing=128]="UseOnlyExternalAliasing",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.WriteTypeParametersInQualifiedName=512]="WriteTypeParametersInQualifiedName",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifedNameInPlaceOfIdentifier=65536]="AllowQualifedNameInPlaceOfIdentifier",e[e.AllowAnonymousIdentifier=131072]="AllowAnonymousIdentifier",e[e.AllowEmptyUnionOrIntersection=262144]="AllowEmptyUnionOrIntersection",e[e.AllowEmptyTuple=524288]="AllowEmptyTuple",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AllowEmptyIndexInfoType=2097152]="AllowEmptyIndexInfoType",e[e.AllowNodeModulesRelativePaths=67108864]="AllowNodeModulesRelativePaths",e[e.DoNotIncludeSymbolChain=134217728]="DoNotIncludeSymbolChain",e[e.IgnoreErrors=70221824]="IgnoreErrors",e[e.InObjectTypeLiteral=4194304]="InObjectTypeLiteral",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.InInitialEntityName=16777216]="InInitialEntityName",e[e.InReverseMappedType=33554432]="InReverseMappedType"}(e.NodeBuilderFlags||(e.NodeBuilderFlags={})),function(e){e[e.None=0]="None",e[e.NoTruncation=1]="NoTruncation",e[e.WriteArrayAsGenericType=2]="WriteArrayAsGenericType",e[e.UseStructuralFallback=8]="UseStructuralFallback",e[e.WriteTypeArgumentsOfSignature=32]="WriteTypeArgumentsOfSignature",e[e.UseFullyQualifiedType=64]="UseFullyQualifiedType",e[e.SuppressAnyReturnType=256]="SuppressAnyReturnType",e[e.MultilineObjectLiterals=1024]="MultilineObjectLiterals",e[e.WriteClassExpressionAsTypeLiteral=2048]="WriteClassExpressionAsTypeLiteral",e[e.UseTypeOfFunction=4096]="UseTypeOfFunction",e[e.OmitParameterModifiers=8192]="OmitParameterModifiers",e[e.UseAliasDefinedOutsideCurrentScope=16384]="UseAliasDefinedOutsideCurrentScope",e[e.AllowUniqueESSymbolType=1048576]="AllowUniqueESSymbolType",e[e.AddUndefined=131072]="AddUndefined",e[e.WriteArrowStyleSignature=262144]="WriteArrowStyleSignature",e[e.InArrayType=524288]="InArrayType",e[e.InElementType=2097152]="InElementType",e[e.InFirstTypeArgument=4194304]="InFirstTypeArgument",e[e.InTypeAlias=8388608]="InTypeAlias",e[e.WriteOwnNameForAnyLike=0]="WriteOwnNameForAnyLike",e[e.NodeBuilderFlagsMask=9469291]="NodeBuilderFlagsMask"}(e.TypeFormatFlags||(e.TypeFormatFlags={})),function(e){e[e.None=0]="None",e[e.WriteTypeParametersOrArguments=1]="WriteTypeParametersOrArguments",e[e.UseOnlyExternalAliasing=2]="UseOnlyExternalAliasing",e[e.AllowAnyNodeKind=4]="AllowAnyNodeKind",e[e.UseAliasDefinedOutsideCurrentScope=8]="UseAliasDefinedOutsideCurrentScope",e[e.DoNotIncludeSymbolChain=16]="DoNotIncludeSymbolChain"}(e.SymbolFormatFlags||(e.SymbolFormatFlags={})),function(e){e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed"}(e.SymbolAccessibility||(e.SymbolAccessibility={})),function(e){e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread"}(e.SyntheticSymbolKind||(e.SyntheticSymbolKind={})),function(e){e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier"}(e.TypePredicateKind||(e.TypePredicateKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.TypeWithConstructSignatureAndValue=1]="TypeWithConstructSignatureAndValue",e[e.VoidNullableOrNeverType=2]="VoidNullableOrNeverType",e[e.NumberLikeType=3]="NumberLikeType",e[e.BigIntLikeType=4]="BigIntLikeType",e[e.StringLikeType=5]="StringLikeType",e[e.BooleanType=6]="BooleanType",e[e.ArrayLikeType=7]="ArrayLikeType",e[e.ESSymbolType=8]="ESSymbolType",e[e.Promise=9]="Promise",e[e.TypeWithCallSignature=10]="TypeWithCallSignature",e[e.ObjectType=11]="ObjectType"}(e.TypeReferenceSerializationKind||(e.TypeReferenceSerializationKind={})),function(e){e[e.None=0]="None",e[e.FunctionScopedVariable=1]="FunctionScopedVariable",e[e.BlockScopedVariable=2]="BlockScopedVariable",e[e.Property=4]="Property",e[e.EnumMember=8]="EnumMember",e[e.Function=16]="Function",e[e.Class=32]="Class",e[e.Interface=64]="Interface",e[e.ConstEnum=128]="ConstEnum",e[e.RegularEnum=256]="RegularEnum",e[e.ValueModule=512]="ValueModule",e[e.NamespaceModule=1024]="NamespaceModule",e[e.TypeLiteral=2048]="TypeLiteral",e[e.ObjectLiteral=4096]="ObjectLiteral",e[e.Method=8192]="Method",e[e.Constructor=16384]="Constructor",e[e.GetAccessor=32768]="GetAccessor",e[e.SetAccessor=65536]="SetAccessor",e[e.Signature=131072]="Signature",e[e.TypeParameter=262144]="TypeParameter",e[e.TypeAlias=524288]="TypeAlias",e[e.ExportValue=1048576]="ExportValue",e[e.Alias=2097152]="Alias",e[e.Prototype=4194304]="Prototype",e[e.ExportStar=8388608]="ExportStar",e[e.Optional=16777216]="Optional",e[e.Transient=33554432]="Transient",e[e.Assignment=67108864]="Assignment",e[e.ModuleExports=134217728]="ModuleExports",e[e.All=67108863]="All",e[e.Enum=384]="Enum",e[e.Variable=3]="Variable",e[e.Value=111551]="Value",e[e.Type=788968]="Type",e[e.Namespace=1920]="Namespace",e[e.Module=1536]="Module",e[e.Accessor=98304]="Accessor",e[e.FunctionScopedVariableExcludes=111550]="FunctionScopedVariableExcludes",e[e.BlockScopedVariableExcludes=111551]="BlockScopedVariableExcludes",e[e.ParameterExcludes=111551]="ParameterExcludes",e[e.PropertyExcludes=0]="PropertyExcludes",e[e.EnumMemberExcludes=900095]="EnumMemberExcludes",e[e.FunctionExcludes=110991]="FunctionExcludes",e[e.ClassExcludes=899503]="ClassExcludes",e[e.InterfaceExcludes=788872]="InterfaceExcludes",e[e.RegularEnumExcludes=899327]="RegularEnumExcludes",e[e.ConstEnumExcludes=899967]="ConstEnumExcludes",e[e.ValueModuleExcludes=110735]="ValueModuleExcludes",e[e.NamespaceModuleExcludes=0]="NamespaceModuleExcludes",e[e.MethodExcludes=103359]="MethodExcludes",e[e.GetAccessorExcludes=46015]="GetAccessorExcludes",e[e.SetAccessorExcludes=78783]="SetAccessorExcludes",e[e.TypeParameterExcludes=526824]="TypeParameterExcludes",e[e.TypeAliasExcludes=788968]="TypeAliasExcludes",e[e.AliasExcludes=2097152]="AliasExcludes",e[e.ModuleMember=2623475]="ModuleMember",e[e.ExportHasLocal=944]="ExportHasLocal",e[e.BlockScoped=418]="BlockScoped",e[e.PropertyOrAccessor=98308]="PropertyOrAccessor",e[e.ClassMember=106500]="ClassMember",e[e.ExportSupportsDefaultModifier=112]="ExportSupportsDefaultModifier",e[e.ExportDoesNotSupportDefaultModifier=-113]="ExportDoesNotSupportDefaultModifier",e[e.Classifiable=2885600]="Classifiable",e[e.LateBindingContainer=6256]="LateBindingContainer"}(e.SymbolFlags||(e.SymbolFlags={})),function(e){e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal"}(e.EnumKind||(e.EnumKind={})),function(e){e[e.Instantiated=1]="Instantiated",e[e.SyntheticProperty=2]="SyntheticProperty",e[e.SyntheticMethod=4]="SyntheticMethod",e[e.Readonly=8]="Readonly",e[e.ReadPartial=16]="ReadPartial",e[e.WritePartial=32]="WritePartial",e[e.HasNonUniformType=64]="HasNonUniformType",e[e.HasLiteralType=128]="HasLiteralType",e[e.ContainsPublic=256]="ContainsPublic",e[e.ContainsProtected=512]="ContainsProtected",e[e.ContainsPrivate=1024]="ContainsPrivate",e[e.ContainsStatic=2048]="ContainsStatic",e[e.Late=4096]="Late",e[e.ReverseMapped=8192]="ReverseMapped",e[e.OptionalParameter=16384]="OptionalParameter",e[e.RestParameter=32768]="RestParameter",e[e.DeferredType=65536]="DeferredType",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial"}(e.CheckFlags||(e.CheckFlags={})),function(e){e.Call="__call",e.Constructor="__constructor",e.New="__new",e.Index="__index",e.ExportStar="__export",e.Global="__global",e.Missing="__missing",e.Type="__type",e.Object="__object",e.JSXAttributes="__jsxAttributes",e.Class="__class",e.Function="__function",e.Computed="__computed",e.Resolving="__resolving__",e.ExportEquals="export=",e.Default="default",e.This="this"}(e.InternalSymbolName||(e.InternalSymbolName={})),function(e){e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=256]="SuperInstance",e[e.SuperStatic=512]="SuperStatic",e[e.ContextChecked=1024]="ContextChecked",e[e.AsyncMethodWithSuper=2048]="AsyncMethodWithSuper",e[e.AsyncMethodWithSuperBinding=4096]="AsyncMethodWithSuperBinding",e[e.CaptureArguments=8192]="CaptureArguments",e[e.EnumValuesComputed=16384]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=32768]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=65536]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=131072]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=262144]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=524288]="BlockScopedBindingInLoop",e[e.ClassWithBodyScopedClassBinding=1048576]="ClassWithBodyScopedClassBinding",e[e.BodyScopedClassBinding=2097152]="BodyScopedClassBinding",e[e.NeedsLoopOutParameter=4194304]="NeedsLoopOutParameter",e[e.AssignmentsMarked=8388608]="AssignmentsMarked",e[e.ClassWithConstructorReference=16777216]="ClassWithConstructorReference",e[e.ConstructorReferenceInClass=33554432]="ConstructorReferenceInClass"}(e.NodeCheckFlags||(e.NodeCheckFlags={})),function(e){e[e.Any=1]="Any",e[e.Unknown=2]="Unknown",e[e.String=4]="String",e[e.Number=8]="Number",e[e.Boolean=16]="Boolean",e[e.Enum=32]="Enum",e[e.BigInt=64]="BigInt",e[e.StringLiteral=128]="StringLiteral",e[e.NumberLiteral=256]="NumberLiteral",e[e.BooleanLiteral=512]="BooleanLiteral",e[e.EnumLiteral=1024]="EnumLiteral",e[e.BigIntLiteral=2048]="BigIntLiteral",e[e.ESSymbol=4096]="ESSymbol",e[e.UniqueESSymbol=8192]="UniqueESSymbol",e[e.Void=16384]="Void",e[e.Undefined=32768]="Undefined",e[e.Null=65536]="Null",e[e.Never=131072]="Never",e[e.TypeParameter=262144]="TypeParameter",e[e.Object=524288]="Object",e[e.Union=1048576]="Union",e[e.Intersection=2097152]="Intersection",e[e.Index=4194304]="Index",e[e.IndexedAccess=8388608]="IndexedAccess",e[e.Conditional=16777216]="Conditional",e[e.Substitution=33554432]="Substitution",e[e.NonPrimitive=67108864]="NonPrimitive",e[e.AnyOrUnknown=3]="AnyOrUnknown",e[e.Nullable=98304]="Nullable",e[e.Literal=2944]="Literal",e[e.Unit=109440]="Unit",e[e.StringOrNumberLiteral=384]="StringOrNumberLiteral",e[e.StringOrNumberLiteralOrUnique=8576]="StringOrNumberLiteralOrUnique",e[e.DefinitelyFalsy=117632]="DefinitelyFalsy",e[e.PossiblyFalsy=117724]="PossiblyFalsy",e[e.Intrinsic=67359327]="Intrinsic",e[e.Primitive=131068]="Primitive",e[e.StringLike=132]="StringLike",e[e.NumberLike=296]="NumberLike",e[e.BigIntLike=2112]="BigIntLike",e[e.BooleanLike=528]="BooleanLike",e[e.EnumLike=1056]="EnumLike",e[e.ESSymbolLike=12288]="ESSymbolLike",e[e.VoidLike=49152]="VoidLike",e[e.DisjointDomains=67238908]="DisjointDomains",e[e.UnionOrIntersection=3145728]="UnionOrIntersection",e[e.StructuredType=3670016]="StructuredType",e[e.TypeVariable=8650752]="TypeVariable",e[e.InstantiableNonPrimitive=58982400]="InstantiableNonPrimitive",e[e.InstantiablePrimitive=4194304]="InstantiablePrimitive",e[e.Instantiable=63176704]="Instantiable",e[e.StructuredOrInstantiable=66846720]="StructuredOrInstantiable",e[e.ObjectFlagsType=3899392]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Narrowable=133970943]="Narrowable",e[e.NotUnionOrUnit=67637251]="NotUnionOrUnit",e[e.NotPrimitiveUnion=66994211]="NotPrimitiveUnion",e[e.IncludesMask=68943871]="IncludesMask",e[e.IncludesStructuredOrInstantiable=262144]="IncludesStructuredOrInstantiable",e[e.IncludesNonWideningType=2097152]="IncludesNonWideningType",e[e.IncludesWildcard=4194304]="IncludesWildcard",e[e.IncludesEmptyObject=8388608]="IncludesEmptyObject",e[e.GenericMappedType=131072]="GenericMappedType"}(e.TypeFlags||(e.TypeFlags={})),function(e){e[e.Class=1]="Class",e[e.Interface=2]="Interface",e[e.Reference=4]="Reference",e[e.Tuple=8]="Tuple",e[e.Anonymous=16]="Anonymous",e[e.Mapped=32]="Mapped",e[e.Instantiated=64]="Instantiated",e[e.ObjectLiteral=128]="ObjectLiteral",e[e.EvolvingArray=256]="EvolvingArray",e[e.ObjectLiteralPatternWithComputedProperties=512]="ObjectLiteralPatternWithComputedProperties",e[e.ContainsSpread=1024]="ContainsSpread",e[e.ReverseMapped=2048]="ReverseMapped",e[e.JsxAttributes=4096]="JsxAttributes",e[e.MarkerType=8192]="MarkerType",e[e.JSLiteral=16384]="JSLiteral",e[e.FreshLiteral=32768]="FreshLiteral",e[e.ArrayLiteral=65536]="ArrayLiteral",e[e.PrimitiveUnion=131072]="PrimitiveUnion",e[e.ContainsWideningType=262144]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=524288]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=1048576]="NonInferrableType",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=786432]="RequiresWidening",e[e.PropagatingFlags=1835008]="PropagatingFlags"}(e.ObjectFlags||(e.ObjectFlags={})),function(e){e[e.Invariant=0]="Invariant",e[e.Covariant=1]="Covariant",e[e.Contravariant=2]="Contravariant",e[e.Bivariant=3]="Bivariant",e[e.Independent=4]="Independent",e[e.VarianceMask=7]="VarianceMask",e[e.Unmeasurable=8]="Unmeasurable",e[e.Unreliable=16]="Unreliable",e[e.AllowsStructuralFallback=24]="AllowsStructuralFallback"}(e.VarianceFlags||(e.VarianceFlags={})),function(e){e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed"}(e.JsxReferenceKind||(e.JsxReferenceKind={})),function(e){e[e.Call=0]="Call",e[e.Construct=1]="Construct"}(e.SignatureKind||(e.SignatureKind={})),function(e){e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.IsOptionalCall=4]="IsOptionalCall",e[e.PropagatingFlags=3]="PropagatingFlags"}(e.SignatureFlags||(e.SignatureFlags={})),function(e){e[e.String=0]="String",e[e.Number=1]="Number"}(e.IndexKind||(e.IndexKind={})),function(e){e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.HomomorphicMappedType=2]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=4]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=8]="MappedTypeConstraint",e[e.ReturnType=16]="ReturnType",e[e.LiteralKeyof=32]="LiteralKeyof",e[e.NoConstraints=64]="NoConstraints",e[e.AlwaysStrict=128]="AlwaysStrict",e[e.MaxValue=256]="MaxValue",e[e.PriorityImpliesCombination=56]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity"}(e.InferencePriority||(e.InferencePriority={})),function(e){e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction"}(e.InferenceFlags||(e.InferenceFlags={})),function(e){e[e.False=0]="False",e[e.Maybe=1]="Maybe",e[e.True=-1]="True"}(e.Ternary||(e.Ternary={})),function(e){e[e.None=0]="None",e[e.ExportsProperty=1]="ExportsProperty",e[e.ModuleExports=2]="ModuleExports",e[e.PrototypeProperty=3]="PrototypeProperty",e[e.ThisProperty=4]="ThisProperty",e[e.Property=5]="Property",e[e.Prototype=6]="Prototype",e[e.ObjectDefinePropertyValue=7]="ObjectDefinePropertyValue",e[e.ObjectDefinePropertyExports=8]="ObjectDefinePropertyExports",e[e.ObjectDefinePrototypeProperty=9]="ObjectDefinePrototypeProperty"}(e.AssignmentDeclarationKind||(e.AssignmentDeclarationKind={})),function(e){e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message"}(t=e.DiagnosticCategory||(e.DiagnosticCategory={})),e.diagnosticCategoryName=function(e,r){void 0===r&&(r=!0);var n=t[e.category];return r?n.toLowerCase():n},function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(e.ModuleResolutionKind||(e.ModuleResolutionKind={})),function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext"}(e.ModuleKind||(e.ModuleKind={})),function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative"}(e.JsxEmit||(e.JsxEmit={})),function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(e.NewLineKind||(e.NewLineKind={})),function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX",e[e.External=5]="External",e[e.JSON=6]="JSON",e[e.Deferred=7]="Deferred"}(e.ScriptKind||(e.ScriptKind={})),function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest"}(e.ScriptTarget||(e.ScriptTarget={})),function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"}(e.LanguageVariant||(e.LanguageVariant={})),function(e){e[e.None=0]="None",e[e.Recursive=1]="Recursive"}(e.WatchDirectoryFlags||(e.WatchDirectoryFlags={})),function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.backtick=96]="backtick",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.hash=35]="hash",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(e.CharacterCodes||(e.CharacterCodes={})),function(e){e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo"}(e.Extension||(e.Extension={})),function(e){e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2019=8]="ContainsES2019",e[e.ContainsES2018=16]="ContainsES2018",e[e.ContainsES2017=32]="ContainsES2017",e[e.ContainsES2016=64]="ContainsES2016",e[e.ContainsES2015=128]="ContainsES2015",e[e.ContainsGenerator=256]="ContainsGenerator",e[e.ContainsDestructuringAssignment=512]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=1024]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=2048]="ContainsLexicalThis",e[e.ContainsRestOrSpread=4096]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=8192]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=16384]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=32768]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=65536]="ContainsBindingPattern",e[e.ContainsYield=131072]="ContainsYield",e[e.ContainsHoistedDeclarationOrCompletion=262144]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=524288]="ContainsDynamicImport",e[e.ContainsClassFields=1048576]="ContainsClassFields",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2019=8]="AssertES2019",e[e.AssertES2018=16]="AssertES2018",e[e.AssertES2017=32]="AssertES2017",e[e.AssertES2016=64]="AssertES2016",e[e.AssertES2015=128]="AssertES2015",e[e.AssertGenerator=256]="AssertGenerator",e[e.AssertDestructuringAssignment=512]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=536870912]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=536870912]="PropertyAccessExcludes",e[e.NodeExcludes=536870912]="NodeExcludes",e[e.ArrowFunctionExcludes=537371648]="ArrowFunctionExcludes",e[e.FunctionExcludes=537373696]="FunctionExcludes",e[e.ConstructorExcludes=537372672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=537372672]="MethodOrAccessorExcludes",e[e.PropertyExcludes=536872960]="PropertyExcludes",e[e.ClassExcludes=536888320]="ClassExcludes",e[e.ModuleExcludes=537168896]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=536896512]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=536875008]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=536944640]="VariableDeclarationListExcludes",e[e.ParameterExcludes=536870912]="ParameterExcludes",e[e.CatchClauseExcludes=536879104]="CatchClauseExcludes",e[e.BindingPatternExcludes=536875008]="BindingPatternExcludes",e[e.PropertyNamePropagatingFlags=2048]="PropertyNamePropagatingFlags"}(e.TransformFlags||(e.TransformFlags={})),function(e){e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.AdviseOnEmitNode=2]="AdviseOnEmitNode",e[e.NoSubstitution=4]="NoSubstitution",e[e.CapturesThis=8]="CapturesThis",e[e.NoLeadingSourceMap=16]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=32]="NoTrailingSourceMap",e[e.NoSourceMap=48]="NoSourceMap",e[e.NoNestedSourceMaps=64]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=128]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=256]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=384]="NoTokenSourceMaps",e[e.NoLeadingComments=512]="NoLeadingComments",e[e.NoTrailingComments=1024]="NoTrailingComments",e[e.NoComments=1536]="NoComments",e[e.NoNestedComments=2048]="NoNestedComments",e[e.HelperName=4096]="HelperName",e[e.ExportName=8192]="ExportName",e[e.LocalName=16384]="LocalName",e[e.InternalName=32768]="InternalName",e[e.Indented=65536]="Indented",e[e.NoIndentation=131072]="NoIndentation",e[e.AsyncFunctionBody=262144]="AsyncFunctionBody",e[e.ReuseTempVariableScope=524288]="ReuseTempVariableScope",e[e.CustomPrologue=1048576]="CustomPrologue",e[e.NoHoisting=2097152]="NoHoisting",e[e.HasEndOfDeclarationMarker=4194304]="HasEndOfDeclarationMarker",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e[e.TypeScriptClassWrapper=33554432]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=67108864]="NeverApplyImportHelper"}(e.EmitFlags||(e.EmitFlags={})),function(e){e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.Metadata=16]="Metadata",e[e.Param=32]="Param",e[e.Awaiter=64]="Awaiter",e[e.Generator=128]="Generator",e[e.Values=256]="Values",e[e.Read=512]="Read",e[e.Spread=1024]="Spread",e[e.SpreadArrays=2048]="SpreadArrays",e[e.Await=4096]="Await",e[e.AsyncGenerator=8192]="AsyncGenerator",e[e.AsyncDelegator=16384]="AsyncDelegator",e[e.AsyncValues=32768]="AsyncValues",e[e.ExportStar=65536]="ExportStar",e[e.MakeTemplateObject=131072]="MakeTemplateObject",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=131072]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=32768]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=12288]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=53248]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes"}(e.ExternalEmitHelpers||(e.ExternalEmitHelpers={})),function(e){e[e.SourceFile=0]="SourceFile",e[e.Expression=1]="Expression",e[e.IdentifierName=2]="IdentifierName",e[e.MappedTypeParameter=3]="MappedTypeParameter",e[e.Unspecified=4]="Unspecified",e[e.EmbeddedStatement=5]="EmbeddedStatement"}(e.EmitHint||(e.EmitHint={})),function(e){e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal"}(e.BundleFileSectionKind||(e.BundleFileSectionKind={})),function(e){e[e.None=0]="None",e[e.SingleLine=0]="SingleLine",e[e.MultiLine=1]="MultiLine",e[e.PreserveLines=2]="PreserveLines",e[e.LinesMask=3]="LinesMask",e[e.NotDelimited=0]="NotDelimited",e[e.BarDelimited=4]="BarDelimited",e[e.AmpersandDelimited=8]="AmpersandDelimited",e[e.CommaDelimited=16]="CommaDelimited",e[e.AsteriskDelimited=32]="AsteriskDelimited",e[e.DelimitersMask=60]="DelimitersMask",e[e.AllowTrailingComma=64]="AllowTrailingComma",e[e.Indented=128]="Indented",e[e.SpaceBetweenBraces=256]="SpaceBetweenBraces",e[e.SpaceBetweenSiblings=512]="SpaceBetweenSiblings",e[e.Braces=1024]="Braces",e[e.Parenthesis=2048]="Parenthesis",e[e.AngleBrackets=4096]="AngleBrackets",e[e.SquareBrackets=8192]="SquareBrackets",e[e.BracketsMask=15360]="BracketsMask",e[e.OptionalIfUndefined=16384]="OptionalIfUndefined",e[e.OptionalIfEmpty=32768]="OptionalIfEmpty",e[e.Optional=49152]="Optional",e[e.PreferNewLine=65536]="PreferNewLine",e[e.NoTrailingNewLine=131072]="NoTrailingNewLine",e[e.NoInterveningComments=262144]="NoInterveningComments",e[e.NoSpaceIfEmpty=524288]="NoSpaceIfEmpty",e[e.SingleElement=1048576]="SingleElement",e[e.Modifiers=262656]="Modifiers",e[e.HeritageClauses=512]="HeritageClauses",e[e.SingleLineTypeLiteralMembers=768]="SingleLineTypeLiteralMembers",e[e.MultiLineTypeLiteralMembers=32897]="MultiLineTypeLiteralMembers",e[e.TupleTypeElements=528]="TupleTypeElements",e[e.UnionTypeConstituents=516]="UnionTypeConstituents",e[e.IntersectionTypeConstituents=520]="IntersectionTypeConstituents",e[e.ObjectBindingPatternElements=525136]="ObjectBindingPatternElements",e[e.ArrayBindingPatternElements=524880]="ArrayBindingPatternElements",e[e.ObjectLiteralExpressionProperties=526226]="ObjectLiteralExpressionProperties",e[e.ArrayLiteralExpressionElements=8914]="ArrayLiteralExpressionElements",e[e.CommaListElements=528]="CommaListElements",e[e.CallExpressionArguments=2576]="CallExpressionArguments",e[e.NewExpressionArguments=18960]="NewExpressionArguments",e[e.TemplateExpressionSpans=262144]="TemplateExpressionSpans",e[e.SingleLineBlockStatements=768]="SingleLineBlockStatements",e[e.MultiLineBlockStatements=129]="MultiLineBlockStatements",e[e.VariableDeclarationList=528]="VariableDeclarationList",e[e.SingleLineFunctionBodyStatements=768]="SingleLineFunctionBodyStatements",e[e.MultiLineFunctionBodyStatements=1]="MultiLineFunctionBodyStatements",e[e.ClassHeritageClauses=0]="ClassHeritageClauses",e[e.ClassMembers=129]="ClassMembers",e[e.InterfaceMembers=129]="InterfaceMembers",e[e.EnumMembers=145]="EnumMembers",e[e.CaseBlockClauses=129]="CaseBlockClauses",e[e.NamedImportsOrExportsElements=525136]="NamedImportsOrExportsElements",e[e.JsxElementOrFragmentChildren=262144]="JsxElementOrFragmentChildren",e[e.JsxElementAttributes=262656]="JsxElementAttributes",e[e.CaseOrDefaultClauseStatements=163969]="CaseOrDefaultClauseStatements",e[e.HeritageClauseTypes=528]="HeritageClauseTypes",e[e.SourceFileStatements=131073]="SourceFileStatements",e[e.Decorators=49153]="Decorators",e[e.TypeArguments=53776]="TypeArguments",e[e.TypeParameters=53776]="TypeParameters",e[e.Parameters=2576]="Parameters",e[e.IndexSignatureParameters=8848]="IndexSignatureParameters",e[e.JSDocComment=33]="JSDocComment"}(e.ListFormat||(e.ListFormat={})),function(e){e[e.None=0]="None",e[e.TripleSlashXML=1]="TripleSlashXML",e[e.SingleLine=2]="SingleLine",e[e.MultiLine=4]="MultiLine",e[e.All=7]="All",e[e.Default=7]="Default"}(e.PragmaKindFlags||(e.PragmaKindFlags={})),e.commentPragmas={reference:{args:[{name:"types",optional:!0,captureSpan:!0},{name:"lib",optional:!0,captureSpan:!0},{name:"path",optional:!0,captureSpan:!0},{name:"no-default-lib",optional:!0}],kind:1},"amd-dependency":{args:[{name:"path"},{name:"name",optional:!0}],kind:1},"amd-module":{args:[{name:"name"}],kind:1},"ts-check":{kind:2},"ts-nocheck":{kind:2},jsx:{args:[{name:"factory"}],kind:4}}}(s||(s={})),function(e){function t(e){for(var t=5381,r=0;r0;d(),s--){var l=t[a];if(l)if(l.isClosed)t[a]=void 0;else{u++;var _=p(l,v(l.fileName));l.isClosed?t[a]=void 0:_?(l.unchangedPolls=0,t!==n&&(t[a]=void 0,g(l))):l.unchangedPolls!==e.unchangedPollThresholds[r]?l.unchangedPolls++:t===n?(l.unchangedPolls=1,t[a]=void 0,m(l,i.Low)):r!==i.High&&(l.unchangedPolls++,t[a]=void 0,m(l,r===i.Low?i.Medium:i.High)),t[a]&&(c0}function s(e){return 0!==d(e)}function c(e){return/^\.\.?($|[\\/])/.test(e)}function u(t,r){return t.length>r.length&&e.endsWith(t,r)}function l(e){return e.length>0&&a(e.charCodeAt(e.length-1))}function _(e){return e>=97&&e<=122||e>=65&&e<=90}function d(t){if(!t)return 0;var i=t.charCodeAt(0);if(47===i||92===i){if(t.charCodeAt(1)!==i)return 1;var a=t.indexOf(47===i?e.directorySeparator:r,2);return a<0?t.length:a+1}if(_(i)&&58===t.charCodeAt(1)){var o=t.charCodeAt(2);if(47===o||92===o)return 3;if(2===t.length)return 2}var s=t.indexOf(n);if(-1!==s){var c=s+n.length,u=t.indexOf(e.directorySeparator,c);if(-1!==u){var l=t.slice(0,s),d=t.slice(c,u);if("file"===l&&(""===d||"localhost"===d)&&_(t.charCodeAt(u+1))){var p=function(e,t){var r=e.charCodeAt(t);if(58===r)return t+1;if(37===r&&51===e.charCodeAt(t+1)){var n=e.charCodeAt(t+2);if(97===n||65===n)return t+3}return-1}(t,u+2);if(-1!==p){if(47===t.charCodeAt(p))return~(p+1);if(p===t.length)return~p}}return~(u+1)}return~t.length}return 0}function p(e){var t=d(e);return t<0?~t:t}function f(t){var r=p(t=b(t));return r===t.length?t:(t=k(t)).slice(0,Math.max(r,t.lastIndexOf(e.directorySeparator)))}function m(t,r,n){if(p(t=b(t))===t.length)return"";var i=(t=k(t)).slice(Math.max(p(t),t.lastIndexOf(e.directorySeparator)+1)),a=void 0!==r&&void 0!==n?y(i,r,n):void 0;return a?i.slice(0,i.length-a.length):i}function g(t,r,n){if(e.startsWith(r,".")||(r="."+r),t.length>=r.length&&46===t.charCodeAt(t.length-r.length)){var i=t.slice(t.length-r.length);if(n(i,r))return i}}function y(t,r,n){if(r)return function(e,t,r){if("string"==typeof t)return g(e,t,r)||"";for(var n=0,i=t;n=0?i.substring(a):""}function h(r,n){return void 0===n&&(n=""),function(r,n){var i=r.substring(0,n),a=r.substring(n).split(e.directorySeparator);return a.length&&!e.lastOrUndefined(a)&&a.pop(),t([i],a)}(r=D(n,r),p(r))}function v(t){return 0===t.length?"":(t[0]&&N(t[0]))+t.slice(1).join(e.directorySeparator)}function b(t){return t.replace(i,e.directorySeparator)}function x(t){if(!e.some(t))return[];for(var r=[t[0]],n=1;n1){if(".."!==r[r.length-1]){r.pop();continue}}else if(r[0])continue;r.push(i)}}return r}function D(e){for(var t=[],r=1;r0&&t===e.length},e.pathIsAbsolute=s,e.pathIsRelative=c,e.hasExtension=function(t){return e.stringContains(m(t),".")},e.fileExtensionIs=u,e.fileExtensionIsOneOf=function(e,t){for(var r=0,n=t;r0==p(r)>0,"Paths must either both be absolute or both be relative");var i="function"==typeof n?n:e.identity;return v(w(t,r,"boolean"==typeof n&&n?e.equateStringsCaseInsensitive:e.equateStringsCaseSensitive,i))}function O(t,r,n,i,a){var s=w(S(n,t),S(n,r),e.equateStringsCaseSensitive,i),c=s[0];if(a&&o(c)){var u=c.charAt(0)===e.directorySeparator?"file://":"file:///";s[0]=u+c}return v(s)}e.comparePathsCaseSensitive=function(t,r){return P(t,r,e.compareStringsCaseSensitive)},e.comparePathsCaseInsensitive=function(t,r){return P(t,r,e.compareStringsCaseInsensitive)},e.comparePaths=function(t,r,n,i){return"string"==typeof n?(t=D(n,t),r=D(n,r)):"boolean"==typeof n&&(i=n),P(t,r,e.getStringComparer(i))},e.containsPath=function(t,r,n,i){if("string"==typeof n?(t=D(n,t),r=D(n,r)):"boolean"==typeof n&&(i=n),void 0===t||void 0===r)return!1;if(t===r)return!0;var a=x(h(t)),o=x(h(r));if(o.length type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:t(1066,e.DiagnosticCategory.Error,"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066","In ambient enum declarations member initializer must be constant expression."),Unexpected_token_A_constructor_method_accessor_or_property_was_expected:t(1068,e.DiagnosticCategory.Error,"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068","Unexpected token. A constructor, method, accessor, or property was expected."),Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces:t(1069,e.DiagnosticCategory.Error,"Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069","Unexpected token. A type parameter name was expected without curly braces."),_0_modifier_cannot_appear_on_a_type_member:t(1070,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_type_member_1070","'{0}' modifier cannot appear on a type member."),_0_modifier_cannot_appear_on_an_index_signature:t(1071,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_an_index_signature_1071","'{0}' modifier cannot appear on an index signature."),A_0_modifier_cannot_be_used_with_an_import_declaration:t(1079,e.DiagnosticCategory.Error,"A_0_modifier_cannot_be_used_with_an_import_declaration_1079","A '{0}' modifier cannot be used with an import declaration."),Invalid_reference_directive_syntax:t(1084,e.DiagnosticCategory.Error,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:t(1085,e.DiagnosticCategory.Error,"Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085","Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."),_0_modifier_cannot_appear_on_a_constructor_declaration:t(1089,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:t(1090,e.DiagnosticCategory.Error,"_0_modifier_cannot_appear_on_a_parameter_1090","'{0}' modifier cannot appear on a parameter."),Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:t(1091,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091","Only a single variable declaration is allowed in a 'for...in' statement."),Type_parameters_cannot_appear_on_a_constructor_declaration:t(1092,e.DiagnosticCategory.Error,"Type_parameters_cannot_appear_on_a_constructor_declaration_1092","Type parameters cannot appear on a constructor declaration."),Type_annotation_cannot_appear_on_a_constructor_declaration:t(1093,e.DiagnosticCategory.Error,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:t(1094,e.DiagnosticCategory.Error,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:t(1095,e.DiagnosticCategory.Error,"A_set_accessor_cannot_have_a_return_type_annotation_1095","A 'set' accessor cannot have a return type annotation."),An_index_signature_must_have_exactly_one_parameter:t(1096,e.DiagnosticCategory.Error,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:t(1097,e.DiagnosticCategory.Error,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:t(1098,e.DiagnosticCategory.Error,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:t(1099,e.DiagnosticCategory.Error,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:t(1100,e.DiagnosticCategory.Error,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:t(1101,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_strict_mode_1101","'with' statements are not allowed in strict mode."),delete_cannot_be_called_on_an_identifier_in_strict_mode:t(1102,e.DiagnosticCategory.Error,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator:t(1103,e.DiagnosticCategory.Error,"A_for_await_of_statement_is_only_allowed_within_an_async_function_or_async_generator_1103","A 'for-await-of' statement is only allowed within an async function or async generator."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:t(1104,e.DiagnosticCategory.Error,"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104","A 'continue' statement can only be used within an enclosing iteration statement."),A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:t(1105,e.DiagnosticCategory.Error,"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105","A 'break' statement can only be used within an enclosing iteration or switch statement."),Jump_target_cannot_cross_function_boundary:t(1107,e.DiagnosticCategory.Error,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:t(1108,e.DiagnosticCategory.Error,"A_return_statement_can_only_be_used_within_a_function_body_1108","A 'return' statement can only be used within a function body."),Expression_expected:t(1109,e.DiagnosticCategory.Error,"Expression_expected_1109","Expression expected."),Type_expected:t(1110,e.DiagnosticCategory.Error,"Type_expected_1110","Type expected."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:t(1113,e.DiagnosticCategory.Error,"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113","A 'default' clause cannot appear more than once in a 'switch' statement."),Duplicate_label_0:t(1114,e.DiagnosticCategory.Error,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:t(1115,e.DiagnosticCategory.Error,"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115","A 'continue' statement can only jump to a label of an enclosing iteration statement."),A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:t(1116,e.DiagnosticCategory.Error,"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116","A 'break' statement can only jump to a label of an enclosing statement."),An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:t(1117,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117","An object literal cannot have multiple properties with the same name in strict mode."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:t(1118,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118","An object literal cannot have multiple get/set accessors with the same name."),An_object_literal_cannot_have_property_and_accessor_with_the_same_name:t(1119,e.DiagnosticCategory.Error,"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119","An object literal cannot have property and accessor with the same name."),An_export_assignment_cannot_have_modifiers:t(1120,e.DiagnosticCategory.Error,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_in_strict_mode:t(1121,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_strict_mode_1121","Octal literals are not allowed in strict mode."),Variable_declaration_list_cannot_be_empty:t(1123,e.DiagnosticCategory.Error,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:t(1124,e.DiagnosticCategory.Error,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:t(1125,e.DiagnosticCategory.Error,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:t(1126,e.DiagnosticCategory.Error,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:t(1127,e.DiagnosticCategory.Error,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:t(1128,e.DiagnosticCategory.Error,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:t(1129,e.DiagnosticCategory.Error,"Statement_expected_1129","Statement expected."),case_or_default_expected:t(1130,e.DiagnosticCategory.Error,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:t(1131,e.DiagnosticCategory.Error,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:t(1132,e.DiagnosticCategory.Error,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:t(1134,e.DiagnosticCategory.Error,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:t(1135,e.DiagnosticCategory.Error,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:t(1136,e.DiagnosticCategory.Error,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:t(1137,e.DiagnosticCategory.Error,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:t(1138,e.DiagnosticCategory.Error,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:t(1139,e.DiagnosticCategory.Error,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:t(1140,e.DiagnosticCategory.Error,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:t(1141,e.DiagnosticCategory.Error,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:t(1142,e.DiagnosticCategory.Error,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:t(1144,e.DiagnosticCategory.Error,"or_expected_1144","'{' or ';' expected."),Declaration_expected:t(1146,e.DiagnosticCategory.Error,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:t(1147,e.DiagnosticCategory.Error,"Import_declarations_in_a_namespace_cannot_reference_a_module_1147","Import declarations in a namespace cannot reference a module."),Cannot_use_imports_exports_or_module_augmentations_when_module_is_none:t(1148,e.DiagnosticCategory.Error,"Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148","Cannot use imports, exports, or module augmentations when '--module' is 'none'."),File_name_0_differs_from_already_included_file_name_1_only_in_casing:t(1149,e.DiagnosticCategory.Error,"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149","File name '{0}' differs from already included file name '{1}' only in casing."),const_declarations_must_be_initialized:t(1155,e.DiagnosticCategory.Error,"const_declarations_must_be_initialized_1155","'const' declarations must be initialized."),const_declarations_can_only_be_declared_inside_a_block:t(1156,e.DiagnosticCategory.Error,"const_declarations_can_only_be_declared_inside_a_block_1156","'const' declarations can only be declared inside a block."),let_declarations_can_only_be_declared_inside_a_block:t(1157,e.DiagnosticCategory.Error,"let_declarations_can_only_be_declared_inside_a_block_1157","'let' declarations can only be declared inside a block."),Unterminated_template_literal:t(1160,e.DiagnosticCategory.Error,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:t(1161,e.DiagnosticCategory.Error,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:t(1162,e.DiagnosticCategory.Error,"An_object_member_cannot_be_declared_optional_1162","An object member cannot be declared optional."),A_yield_expression_is_only_allowed_in_a_generator_body:t(1163,e.DiagnosticCategory.Error,"A_yield_expression_is_only_allowed_in_a_generator_body_1163","A 'yield' expression is only allowed in a generator body."),Computed_property_names_are_not_allowed_in_enums:t(1164,e.DiagnosticCategory.Error,"Computed_property_names_are_not_allowed_in_enums_1164","Computed property names are not allowed in enums."),A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1165,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165","A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1166,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166","A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1168,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168","A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1169,e.DiagnosticCategory.Error,"A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169","A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type:t(1170,e.DiagnosticCategory.Error,"A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170","A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),A_comma_expression_is_not_allowed_in_a_computed_property_name:t(1171,e.DiagnosticCategory.Error,"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171","A comma expression is not allowed in a computed property name."),extends_clause_already_seen:t(1172,e.DiagnosticCategory.Error,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:t(1173,e.DiagnosticCategory.Error,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:t(1174,e.DiagnosticCategory.Error,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:t(1175,e.DiagnosticCategory.Error,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:t(1176,e.DiagnosticCategory.Error,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:t(1177,e.DiagnosticCategory.Error,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:t(1178,e.DiagnosticCategory.Error,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:t(1179,e.DiagnosticCategory.Error,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:t(1180,e.DiagnosticCategory.Error,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:t(1181,e.DiagnosticCategory.Error,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:t(1182,e.DiagnosticCategory.Error,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:t(1183,e.DiagnosticCategory.Error,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:t(1184,e.DiagnosticCategory.Error,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:t(1185,e.DiagnosticCategory.Error,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:t(1186,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_an_initializer_1186","A rest element cannot have an initializer."),A_parameter_property_may_not_be_declared_using_a_binding_pattern:t(1187,e.DiagnosticCategory.Error,"A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187","A parameter property may not be declared using a binding pattern."),Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:t(1188,e.DiagnosticCategory.Error,"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188","Only a single variable declaration is allowed in a 'for...of' statement."),The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:t(1189,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189","The variable declaration of a 'for...in' statement cannot have an initializer."),The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:t(1190,e.DiagnosticCategory.Error,"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190","The variable declaration of a 'for...of' statement cannot have an initializer."),An_import_declaration_cannot_have_modifiers:t(1191,e.DiagnosticCategory.Error,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:t(1192,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:t(1193,e.DiagnosticCategory.Error,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:t(1194,e.DiagnosticCategory.Error,"Export_declarations_are_not_permitted_in_a_namespace_1194","Export declarations are not permitted in a namespace."),Catch_clause_variable_cannot_have_a_type_annotation:t(1196,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_a_type_annotation_1196","Catch clause variable cannot have a type annotation."),Catch_clause_variable_cannot_have_an_initializer:t(1197,e.DiagnosticCategory.Error,"Catch_clause_variable_cannot_have_an_initializer_1197","Catch clause variable cannot have an initializer."),An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:t(1198,e.DiagnosticCategory.Error,"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198","An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."),Unterminated_Unicode_escape_sequence:t(1199,e.DiagnosticCategory.Error,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:t(1200,e.DiagnosticCategory.Error,"Line_terminator_not_permitted_before_arrow_1200","Line terminator not permitted before arrow."),Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:t(1202,e.DiagnosticCategory.Error,"Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202","Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."),Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead:t(1203,e.DiagnosticCategory.Error,"Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203","Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."),Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided:t(1205,e.DiagnosticCategory.Error,"Cannot_re_export_a_type_when_the_isolatedModules_flag_is_provided_1205","Cannot re-export a type when the '--isolatedModules' flag is provided."),Decorators_are_not_valid_here:t(1206,e.DiagnosticCategory.Error,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:t(1207,e.DiagnosticCategory.Error,"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207","Decorators cannot be applied to multiple get/set accessors of the same name."),All_files_must_be_modules_when_the_isolatedModules_flag_is_provided:t(1208,e.DiagnosticCategory.Error,"All_files_must_be_modules_when_the_isolatedModules_flag_is_provided_1208","All files must be modules when the '--isolatedModules' flag is provided."),Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:t(1210,e.DiagnosticCategory.Error,"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210","Invalid use of '{0}'. Class definitions are automatically in strict mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:t(1211,e.DiagnosticCategory.Error,"A_class_declaration_without_the_default_modifier_must_have_a_name_1211","A class declaration without the 'default' modifier must have a name."),Identifier_expected_0_is_a_reserved_word_in_strict_mode:t(1212,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212","Identifier expected. '{0}' is a reserved word in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:t(1213,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213","Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:t(1214,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214","Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."),Invalid_use_of_0_Modules_are_automatically_in_strict_mode:t(1215,e.DiagnosticCategory.Error,"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215","Invalid use of '{0}'. Modules are automatically in strict mode."),Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules:t(1216,e.DiagnosticCategory.Error,"Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216","Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),Export_assignment_is_not_supported_when_module_flag_is_system:t(1218,e.DiagnosticCategory.Error,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning:t(1219,e.DiagnosticCategory.Error,"Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219","Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."),Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher:t(1220,e.DiagnosticCategory.Error,"Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220","Generators are only available when targeting ECMAScript 2015 or higher."),Generators_are_not_allowed_in_an_ambient_context:t(1221,e.DiagnosticCategory.Error,"Generators_are_not_allowed_in_an_ambient_context_1221","Generators are not allowed in an ambient context."),An_overload_signature_cannot_be_declared_as_a_generator:t(1222,e.DiagnosticCategory.Error,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:t(1223,e.DiagnosticCategory.Error,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:t(1224,e.DiagnosticCategory.Error,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:t(1225,e.DiagnosticCategory.Error,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:t(1226,e.DiagnosticCategory.Error,"Type_predicate_0_is_not_assignable_to_1_1226","Type predicate '{0}' is not assignable to '{1}'."),Parameter_0_is_not_in_the_same_position_as_parameter_1:t(1227,e.DiagnosticCategory.Error,"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227","Parameter '{0}' is not in the same position as parameter '{1}'."),A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:t(1228,e.DiagnosticCategory.Error,"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228","A type predicate is only allowed in return type position for functions and methods."),A_type_predicate_cannot_reference_a_rest_parameter:t(1229,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_a_rest_parameter_1229","A type predicate cannot reference a rest parameter."),A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:t(1230,e.DiagnosticCategory.Error,"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230","A type predicate cannot reference element '{0}' in a binding pattern."),An_export_assignment_can_only_be_used_in_a_module:t(1231,e.DiagnosticCategory.Error,"An_export_assignment_can_only_be_used_in_a_module_1231","An export assignment can only be used in a module."),An_import_declaration_can_only_be_used_in_a_namespace_or_module:t(1232,e.DiagnosticCategory.Error,"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232","An import declaration can only be used in a namespace or module."),An_export_declaration_can_only_be_used_in_a_module:t(1233,e.DiagnosticCategory.Error,"An_export_declaration_can_only_be_used_in_a_module_1233","An export declaration can only be used in a module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:t(1234,e.DiagnosticCategory.Error,"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234","An ambient module declaration is only allowed at the top level in a file."),A_namespace_declaration_is_only_allowed_in_a_namespace_or_module:t(1235,e.DiagnosticCategory.Error,"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235","A namespace declaration is only allowed in a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:t(1236,e.DiagnosticCategory.Error,"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236","The return type of a property decorator function must be either 'void' or 'any'."),The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:t(1237,e.DiagnosticCategory.Error,"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237","The return type of a parameter decorator function must be either 'void' or 'any'."),Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:t(1238,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238","Unable to resolve signature of class decorator when called as an expression."),Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:t(1239,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239","Unable to resolve signature of parameter decorator when called as an expression."),Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:t(1240,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240","Unable to resolve signature of property decorator when called as an expression."),Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:t(1241,e.DiagnosticCategory.Error,"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241","Unable to resolve signature of method decorator when called as an expression."),abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration:t(1242,e.DiagnosticCategory.Error,"abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242","'abstract' modifier can only appear on a class, method, or property declaration."),_0_modifier_cannot_be_used_with_1_modifier:t(1243,e.DiagnosticCategory.Error,"_0_modifier_cannot_be_used_with_1_modifier_1243","'{0}' modifier cannot be used with '{1}' modifier."),Abstract_methods_can_only_appear_within_an_abstract_class:t(1244,e.DiagnosticCategory.Error,"Abstract_methods_can_only_appear_within_an_abstract_class_1244","Abstract methods can only appear within an abstract class."),Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:t(1245,e.DiagnosticCategory.Error,"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245","Method '{0}' cannot have an implementation because it is marked abstract."),An_interface_property_cannot_have_an_initializer:t(1246,e.DiagnosticCategory.Error,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:t(1247,e.DiagnosticCategory.Error,"A_type_literal_property_cannot_have_an_initializer_1247","A type literal property cannot have an initializer."),A_class_member_cannot_have_the_0_keyword:t(1248,e.DiagnosticCategory.Error,"A_class_member_cannot_have_the_0_keyword_1248","A class member cannot have the '{0}' keyword."),A_decorator_can_only_decorate_a_method_implementation_not_an_overload:t(1249,e.DiagnosticCategory.Error,"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249","A decorator can only decorate a method implementation, not an overload."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5:t(1250,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:t(1251,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."),Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:t(1252,e.DiagnosticCategory.Error,"Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252","Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."),_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag:t(1253,e.DiagnosticCategory.Error,"_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253","'{0}' tag cannot be used independently as a top level JSDoc tag."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:t(1254,e.DiagnosticCategory.Error,"A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254","A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),A_definite_assignment_assertion_is_not_permitted_in_this_context:t(1255,e.DiagnosticCategory.Error,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_rest_element_must_be_last_in_a_tuple_type:t(1256,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_tuple_type_1256","A rest element must be last in a tuple type."),A_required_element_cannot_follow_an_optional_element:t(1257,e.DiagnosticCategory.Error,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation:t(1258,e.DiagnosticCategory.Error,"Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation_1258","Definite assignment assertions can only be used along with a type annotation."),Module_0_can_only_be_default_imported_using_the_1_flag:t(1259,e.DiagnosticCategory.Error,"Module_0_can_only_be_default_imported_using_the_1_flag_1259","Module '{0}' can only be default-imported using the '{1}' flag"),Keywords_cannot_contain_escape_characters:t(1260,e.DiagnosticCategory.Error,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),with_statements_are_not_allowed_in_an_async_function_block:t(1300,e.DiagnosticCategory.Error,"with_statements_are_not_allowed_in_an_async_function_block_1300","'with' statements are not allowed in an async function block."),await_expression_is_only_allowed_within_an_async_function:t(1308,e.DiagnosticCategory.Error,"await_expression_is_only_allowed_within_an_async_function_1308","'await' expression is only allowed within an async function."),can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment:t(1312,e.DiagnosticCategory.Error,"can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312","'=' can only be used in an object literal property inside a destructuring assignment."),The_body_of_an_if_statement_cannot_be_the_empty_statement:t(1313,e.DiagnosticCategory.Error,"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313","The body of an 'if' statement cannot be the empty statement."),Global_module_exports_may_only_appear_in_module_files:t(1314,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_module_files_1314","Global module exports may only appear in module files."),Global_module_exports_may_only_appear_in_declaration_files:t(1315,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_in_declaration_files_1315","Global module exports may only appear in declaration files."),Global_module_exports_may_only_appear_at_top_level:t(1316,e.DiagnosticCategory.Error,"Global_module_exports_may_only_appear_at_top_level_1316","Global module exports may only appear at top level."),A_parameter_property_cannot_be_declared_using_a_rest_parameter:t(1317,e.DiagnosticCategory.Error,"A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317","A parameter property cannot be declared using a rest parameter."),An_abstract_accessor_cannot_have_an_implementation:t(1318,e.DiagnosticCategory.Error,"An_abstract_accessor_cannot_have_an_implementation_1318","An abstract accessor cannot have an implementation."),A_default_export_can_only_be_used_in_an_ECMAScript_style_module:t(1319,e.DiagnosticCategory.Error,"A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319","A default export can only be used in an ECMAScript-style module."),Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1320,e.DiagnosticCategory.Error,"Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320","Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1321,e.DiagnosticCategory.Error,"Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321","Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:t(1322,e.DiagnosticCategory.Error,"Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322","Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd:t(1323,e.DiagnosticCategory.Error,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_esnext_commonjs_amd_system_or_umd_1323","Dynamic imports are only supported when the '--module' flag is set to 'esnext', 'commonjs', 'amd', 'system', or 'umd'."),Dynamic_import_must_have_one_specifier_as_an_argument:t(1324,e.DiagnosticCategory.Error,"Dynamic_import_must_have_one_specifier_as_an_argument_1324","Dynamic import must have one specifier as an argument."),Specifier_of_dynamic_import_cannot_be_spread_element:t(1325,e.DiagnosticCategory.Error,"Specifier_of_dynamic_import_cannot_be_spread_element_1325","Specifier of dynamic import cannot be spread element."),Dynamic_import_cannot_have_type_arguments:t(1326,e.DiagnosticCategory.Error,"Dynamic_import_cannot_have_type_arguments_1326","Dynamic import cannot have type arguments"),String_literal_with_double_quotes_expected:t(1327,e.DiagnosticCategory.Error,"String_literal_with_double_quotes_expected_1327","String literal with double quotes expected."),Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal:t(1328,e.DiagnosticCategory.Error,"Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328","Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0:t(1329,e.DiagnosticCategory.Error,"_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329","'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"),A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly:t(1330,e.DiagnosticCategory.Error,"A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330","A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."),A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly:t(1331,e.DiagnosticCategory.Error,"A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331","A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."),A_variable_whose_type_is_a_unique_symbol_type_must_be_const:t(1332,e.DiagnosticCategory.Error,"A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332","A variable whose type is a 'unique symbol' type must be 'const'."),unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name:t(1333,e.DiagnosticCategory.Error,"unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333","'unique symbol' types may not be used on a variable declaration with a binding name."),unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement:t(1334,e.DiagnosticCategory.Error,"unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334","'unique symbol' types are only allowed on variables in a variable statement."),unique_symbol_types_are_not_allowed_here:t(1335,e.DiagnosticCategory.Error,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead:t(1336,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336","An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."),An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead:t(1337,e.DiagnosticCategory.Error,"An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337","An index signature parameter type cannot be a union type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:t(1338,e.DiagnosticCategory.Error,"infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338","'infer' declarations are only permitted in the 'extends' clause of a conditional type."),Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here:t(1339,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339","Module '{0}' does not refer to a value, but is used as a value here."),Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0:t(1340,e.DiagnosticCategory.Error,"Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340","Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),Type_arguments_cannot_be_used_here:t(1342,e.DiagnosticCategory.Error,"Type_arguments_cannot_be_used_here_1342","Type arguments cannot be used here."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system:t(1343,e.DiagnosticCategory.Error,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_esnext_or_system_1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'esnext' or 'system'."),A_label_is_not_allowed_here:t(1344,e.DiagnosticCategory.Error,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:t(1345,e.DiagnosticCategory.Error,"An_expression_of_type_void_cannot_be_tested_for_truthiness_1345","An expression of type 'void' cannot be tested for truthiness"),This_parameter_is_not_allowed_with_use_strict_directive:t(1346,e.DiagnosticCategory.Error,"This_parameter_is_not_allowed_with_use_strict_directive_1346","This parameter is not allowed with 'use strict' directive."),use_strict_directive_cannot_be_used_with_non_simple_parameter_list:t(1347,e.DiagnosticCategory.Error,"use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347","'use strict' directive cannot be used with non-simple parameter list."),Non_simple_parameter_declared_here:t(1348,e.DiagnosticCategory.Error,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:t(1349,e.DiagnosticCategory.Error,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:t(1350,e.DiagnosticCategory.Message,"Print_the_final_configuration_instead_of_building_1350","Print the final configuration instead of building."),An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal:t(1351,e.DiagnosticCategory.Error,"An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351","An identifier or keyword cannot immediately follow a numeric literal."),A_bigint_literal_cannot_use_exponential_notation:t(1352,e.DiagnosticCategory.Error,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:t(1353,e.DiagnosticCategory.Error,"A_bigint_literal_must_be_an_integer_1353","A bigint literal must be an integer."),readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types:t(1354,e.DiagnosticCategory.Error,"readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354","'readonly' type modifier is only permitted on array and tuple literal types."),A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals:t(1355,e.DiagnosticCategory.Error,"A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355","A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."),Did_you_mean_to_mark_this_function_as_async:t(1356,e.DiagnosticCategory.Error,"Did_you_mean_to_mark_this_function_as_async_1356","Did you mean to mark this function as 'async'?"),An_enum_member_name_must_be_followed_by_a_or:t(1357,e.DiagnosticCategory.Error,"An_enum_member_name_must_be_followed_by_a_or_1357","An enum member name must be followed by a ',', '=', or '}'."),Tagged_template_expressions_are_not_permitted_in_an_optional_chain:t(1358,e.DiagnosticCategory.Error,"Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358","Tagged template expressions are not permitted in an optional chain."),Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:t(1359,e.DiagnosticCategory.Error,"Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359","Identifier expected. '{0}' is a reserved word that cannot be used here."),The_types_of_0_are_incompatible_between_these_types:t(2200,e.DiagnosticCategory.Error,"The_types_of_0_are_incompatible_between_these_types_2200","The types of '{0}' are incompatible between these types."),The_types_returned_by_0_are_incompatible_between_these_types:t(2201,e.DiagnosticCategory.Error,"The_types_returned_by_0_are_incompatible_between_these_types_2201","The types returned by '{0}' are incompatible between these types."),Call_signature_return_types_0_and_1_are_incompatible:t(2202,e.DiagnosticCategory.Error,"Call_signature_return_types_0_and_1_are_incompatible_2202","Call signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Construct_signature_return_types_0_and_1_are_incompatible:t(2203,e.DiagnosticCategory.Error,"Construct_signature_return_types_0_and_1_are_incompatible_2203","Construct signature return types '{0}' and '{1}' are incompatible.",void 0,!0),Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:t(2204,e.DiagnosticCategory.Error,"Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204","Call signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1:t(2205,e.DiagnosticCategory.Error,"Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205","Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.",void 0,!0),Duplicate_identifier_0:t(2300,e.DiagnosticCategory.Error,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:t(2301,e.DiagnosticCategory.Error,"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301","Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),Static_members_cannot_reference_class_type_parameters:t(2302,e.DiagnosticCategory.Error,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:t(2303,e.DiagnosticCategory.Error,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:t(2304,e.DiagnosticCategory.Error,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:t(2305,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:t(2306,e.DiagnosticCategory.Error,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0:t(2307,e.DiagnosticCategory.Error,"Cannot_find_module_0_2307","Cannot find module '{0}'."),Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:t(2308,e.DiagnosticCategory.Error,"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308","Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:t(2309,e.DiagnosticCategory.Error,"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309","An export assignment cannot be used in a module with other exported elements."),Type_0_recursively_references_itself_as_a_base_type:t(2310,e.DiagnosticCategory.Error,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),A_class_may_only_extend_another_class:t(2311,e.DiagnosticCategory.Error,"A_class_may_only_extend_another_class_2311","A class may only extend another class."),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2312,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312","An interface can only extend an object type or intersection of object types with statically known members."),Type_parameter_0_has_a_circular_constraint:t(2313,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:t(2314,e.DiagnosticCategory.Error,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:t(2315,e.DiagnosticCategory.Error,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:t(2316,e.DiagnosticCategory.Error,"Global_type_0_must_be_a_class_or_interface_type_2316","Global type '{0}' must be a class or interface type."),Global_type_0_must_have_1_type_parameter_s:t(2317,e.DiagnosticCategory.Error,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:t(2318,e.DiagnosticCategory.Error,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:t(2319,e.DiagnosticCategory.Error,"Named_property_0_of_types_1_and_2_are_not_identical_2319","Named property '{0}' of types '{1}' and '{2}' are not identical."),Interface_0_cannot_simultaneously_extend_types_1_and_2:t(2320,e.DiagnosticCategory.Error,"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320","Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."),Excessive_stack_depth_comparing_types_0_and_1:t(2321,e.DiagnosticCategory.Error,"Excessive_stack_depth_comparing_types_0_and_1_2321","Excessive stack depth comparing types '{0}' and '{1}'."),Type_0_is_not_assignable_to_type_1:t(2322,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:t(2323,e.DiagnosticCategory.Error,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:t(2324,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_2324","Property '{0}' is missing in type '{1}'."),Property_0_is_private_in_type_1_but_not_in_type_2:t(2325,e.DiagnosticCategory.Error,"Property_0_is_private_in_type_1_but_not_in_type_2_2325","Property '{0}' is private in type '{1}' but not in type '{2}'."),Types_of_property_0_are_incompatible:t(2326,e.DiagnosticCategory.Error,"Types_of_property_0_are_incompatible_2326","Types of property '{0}' are incompatible."),Property_0_is_optional_in_type_1_but_required_in_type_2:t(2327,e.DiagnosticCategory.Error,"Property_0_is_optional_in_type_1_but_required_in_type_2_2327","Property '{0}' is optional in type '{1}' but required in type '{2}'."),Types_of_parameters_0_and_1_are_incompatible:t(2328,e.DiagnosticCategory.Error,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_is_missing_in_type_0:t(2329,e.DiagnosticCategory.Error,"Index_signature_is_missing_in_type_0_2329","Index signature is missing in type '{0}'."),Index_signatures_are_incompatible:t(2330,e.DiagnosticCategory.Error,"Index_signatures_are_incompatible_2330","Index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:t(2331,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_module_or_namespace_body_2331","'this' cannot be referenced in a module or namespace body."),this_cannot_be_referenced_in_current_location:t(2332,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:t(2333,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:t(2334,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_static_property_initializer_2334","'this' cannot be referenced in a static property initializer."),super_can_only_be_referenced_in_a_derived_class:t(2335,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_a_derived_class_2335","'super' can only be referenced in a derived class."),super_cannot_be_referenced_in_constructor_arguments:t(2336,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_constructor_arguments_2336","'super' cannot be referenced in constructor arguments."),Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:t(2337,e.DiagnosticCategory.Error,"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337","Super calls are not permitted outside constructors or in nested functions inside constructors."),super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:t(2338,e.DiagnosticCategory.Error,"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338","'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."),Property_0_does_not_exist_on_type_1:t(2339,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_2339","Property '{0}' does not exist on type '{1}'."),Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:t(2340,e.DiagnosticCategory.Error,"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340","Only public and protected methods of the base class are accessible via the 'super' keyword."),Property_0_is_private_and_only_accessible_within_class_1:t(2341,e.DiagnosticCategory.Error,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),An_index_expression_argument_must_be_of_type_string_number_symbol_or_any:t(2342,e.DiagnosticCategory.Error,"An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342","An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:t(2343,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343","This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),Type_0_does_not_satisfy_the_constraint_1:t(2344,e.DiagnosticCategory.Error,"Type_0_does_not_satisfy_the_constraint_1_2344","Type '{0}' does not satisfy the constraint '{1}'."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:t(2345,e.DiagnosticCategory.Error,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345","Argument of type '{0}' is not assignable to parameter of type '{1}'."),Call_target_does_not_contain_any_signatures:t(2346,e.DiagnosticCategory.Error,"Call_target_does_not_contain_any_signatures_2346","Call target does not contain any signatures."),Untyped_function_calls_may_not_accept_type_arguments:t(2347,e.DiagnosticCategory.Error,"Untyped_function_calls_may_not_accept_type_arguments_2347","Untyped function calls may not accept type arguments."),Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:t(2348,e.DiagnosticCategory.Error,"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348","Value of type '{0}' is not callable. Did you mean to include 'new'?"),This_expression_is_not_callable:t(2349,e.DiagnosticCategory.Error,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:t(2350,e.DiagnosticCategory.Error,"Only_a_void_function_can_be_called_with_the_new_keyword_2350","Only a void function can be called with the 'new' keyword."),This_expression_is_not_constructable:t(2351,e.DiagnosticCategory.Error,"This_expression_is_not_constructable_2351","This expression is not constructable."),Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first:t(2352,e.DiagnosticCategory.Error,"Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352","Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."),Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:t(2353,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353","Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."),This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found:t(2354,e.DiagnosticCategory.Error,"This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354","This syntax requires an imported helper but module '{0}' cannot be found."),A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value:t(2355,e.DiagnosticCategory.Error,"A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'void' nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:t(2356,e.DiagnosticCategory.Error,"An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356","An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."),The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access:t(2357,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357","The operand of an increment or decrement operator must be a variable or a property access."),The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2358,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358","The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type:t(2359,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359","The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol:t(2360,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360","The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."),The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:t(2361,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361","The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2362,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362","The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:t(2363,e.DiagnosticCategory.Error,"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363","The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access:t(2364,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364","The left-hand side of an assignment expression must be a variable or a property access."),Operator_0_cannot_be_applied_to_types_1_and_2:t(2365,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_types_1_and_2_2365","Operator '{0}' cannot be applied to types '{1}' and '{2}'."),Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined:t(2366,e.DiagnosticCategory.Error,"Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366","Function lacks ending return statement and return type does not include 'undefined'."),This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap:t(2367,e.DiagnosticCategory.Error,"This_condition_will_always_return_0_since_the_types_1_and_2_have_no_overlap_2367","This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap."),Type_parameter_name_cannot_be_0:t(2368,e.DiagnosticCategory.Error,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:t(2369,e.DiagnosticCategory.Error,"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369","A parameter property is only allowed in a constructor implementation."),A_rest_parameter_must_be_of_an_array_type:t(2370,e.DiagnosticCategory.Error,"A_rest_parameter_must_be_of_an_array_type_2370","A rest parameter must be of an array type."),A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:t(2371,e.DiagnosticCategory.Error,"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371","A parameter initializer is only allowed in a function or constructor implementation."),Parameter_0_cannot_be_referenced_in_its_initializer:t(2372,e.DiagnosticCategory.Error,"Parameter_0_cannot_be_referenced_in_its_initializer_2372","Parameter '{0}' cannot be referenced in its initializer."),Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:t(2373,e.DiagnosticCategory.Error,"Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_string_index_signature:t(2374,e.DiagnosticCategory.Error,"Duplicate_string_index_signature_2374","Duplicate string index signature."),Duplicate_number_index_signature:t(2375,e.DiagnosticCategory.Error,"Duplicate_number_index_signature_2375","Duplicate number index signature."),A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:t(2376,e.DiagnosticCategory.Error,"A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376","A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties."),Constructors_for_derived_classes_must_contain_a_super_call:t(2377,e.DiagnosticCategory.Error,"Constructors_for_derived_classes_must_contain_a_super_call_2377","Constructors for derived classes must contain a 'super' call."),A_get_accessor_must_return_a_value:t(2378,e.DiagnosticCategory.Error,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Getter_and_setter_accessors_do_not_agree_in_visibility:t(2379,e.DiagnosticCategory.Error,"Getter_and_setter_accessors_do_not_agree_in_visibility_2379","Getter and setter accessors do not agree in visibility."),get_and_set_accessor_must_have_the_same_type:t(2380,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_type_2380","'get' and 'set' accessor must have the same type."),A_signature_with_an_implementation_cannot_use_a_string_literal_type:t(2381,e.DiagnosticCategory.Error,"A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381","A signature with an implementation cannot use a string literal type."),Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:t(2382,e.DiagnosticCategory.Error,"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382","Specialized overload signature is not assignable to any non-specialized signature."),Overload_signatures_must_all_be_exported_or_non_exported:t(2383,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_exported_or_non_exported_2383","Overload signatures must all be exported or non-exported."),Overload_signatures_must_all_be_ambient_or_non_ambient:t(2384,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_ambient_or_non_ambient_2384","Overload signatures must all be ambient or non-ambient."),Overload_signatures_must_all_be_public_private_or_protected:t(2385,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_public_private_or_protected_2385","Overload signatures must all be public, private or protected."),Overload_signatures_must_all_be_optional_or_required:t(2386,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:t(2387,e.DiagnosticCategory.Error,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:t(2388,e.DiagnosticCategory.Error,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:t(2389,e.DiagnosticCategory.Error,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:t(2390,e.DiagnosticCategory.Error,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:t(2391,e.DiagnosticCategory.Error,"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391","Function implementation is missing or not immediately following the declaration."),Multiple_constructor_implementations_are_not_allowed:t(2392,e.DiagnosticCategory.Error,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:t(2393,e.DiagnosticCategory.Error,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:t(2394,e.DiagnosticCategory.Error,"This_overload_signature_is_not_compatible_with_its_implementation_signature_2394","This overload signature is not compatible with its implementation signature."),Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:t(2395,e.DiagnosticCategory.Error,"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395","Individual declarations in merged declaration '{0}' must be all exported or all local."),Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:t(2396,e.DiagnosticCategory.Error,"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396","Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."),Declaration_name_conflicts_with_built_in_global_identifier_0:t(2397,e.DiagnosticCategory.Error,"Declaration_name_conflicts_with_built_in_global_identifier_0_2397","Declaration name conflicts with built-in global identifier '{0}'."),Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:t(2399,e.DiagnosticCategory.Error,"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399","Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:t(2400,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400","Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:t(2401,e.DiagnosticCategory.Error,"Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401","Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:t(2402,e.DiagnosticCategory.Error,"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402","Expression resolves to '_super' that compiler uses to capture base class reference."),Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:t(2403,e.DiagnosticCategory.Error,"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403","Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."),The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:t(2404,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404","The left-hand side of a 'for...in' statement cannot use a type annotation."),The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:t(2405,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405","The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."),The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access:t(2406,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406","The left-hand side of a 'for...in' statement must be a variable or a property access."),The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0:t(2407,e.DiagnosticCategory.Error,"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407","The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."),Setters_cannot_return_a_value:t(2408,e.DiagnosticCategory.Error,"Setters_cannot_return_a_value_2408","Setters cannot return a value."),Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:t(2409,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409","Return type of constructor signature must be assignable to the instance type of the class."),The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any:t(2410,e.DiagnosticCategory.Error,"The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410","The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),Property_0_of_type_1_is_not_assignable_to_string_index_type_2:t(2411,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411","Property '{0}' of type '{1}' is not assignable to string index type '{2}'."),Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:t(2412,e.DiagnosticCategory.Error,"Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412","Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."),Numeric_index_type_0_is_not_assignable_to_string_index_type_1:t(2413,e.DiagnosticCategory.Error,"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413","Numeric index type '{0}' is not assignable to string index type '{1}'."),Class_name_cannot_be_0:t(2414,e.DiagnosticCategory.Error,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:t(2415,e.DiagnosticCategory.Error,"Class_0_incorrectly_extends_base_class_1_2415","Class '{0}' incorrectly extends base class '{1}'."),Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2:t(2416,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416","Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),Class_static_side_0_incorrectly_extends_base_class_static_side_1:t(2417,e.DiagnosticCategory.Error,"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417","Class static side '{0}' incorrectly extends base class static side '{1}'."),Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1:t(2418,e.DiagnosticCategory.Error,"Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418","Type of computed property's value is '{0}', which is not assignable to type '{1}'."),Class_0_incorrectly_implements_interface_1:t(2420,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_interface_1_2420","Class '{0}' incorrectly implements interface '{1}'."),A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2422,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422","A class can only implement an object type or intersection of object types with statically known members."),Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2423,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423","Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:t(2425,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:t(2426,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."),Interface_name_cannot_be_0:t(2427,e.DiagnosticCategory.Error,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:t(2428,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_type_parameters_2428","All declarations of '{0}' must have identical type parameters."),Interface_0_incorrectly_extends_interface_1:t(2430,e.DiagnosticCategory.Error,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:t(2431,e.DiagnosticCategory.Error,"Enum_name_cannot_be_0_2431","Enum name cannot be '{0}'."),In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:t(2432,e.DiagnosticCategory.Error,"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432","In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."),A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:t(2433,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433","A namespace declaration cannot be in a different file from a class or function with which it is merged."),A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:t(2434,e.DiagnosticCategory.Error,"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434","A namespace declaration cannot be located prior to a class or function with which it is merged."),Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:t(2435,e.DiagnosticCategory.Error,"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435","Ambient modules cannot be nested in other modules or namespaces."),Ambient_module_declaration_cannot_specify_relative_module_name:t(2436,e.DiagnosticCategory.Error,"Ambient_module_declaration_cannot_specify_relative_module_name_2436","Ambient module declaration cannot specify relative module name."),Module_0_is_hidden_by_a_local_declaration_with_the_same_name:t(2437,e.DiagnosticCategory.Error,"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437","Module '{0}' is hidden by a local declaration with the same name."),Import_name_cannot_be_0:t(2438,e.DiagnosticCategory.Error,"Import_name_cannot_be_0_2438","Import name cannot be '{0}'."),Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:t(2439,e.DiagnosticCategory.Error,"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439","Import or export declaration in an ambient module declaration cannot reference module through relative module name."),Import_declaration_conflicts_with_local_declaration_of_0:t(2440,e.DiagnosticCategory.Error,"Import_declaration_conflicts_with_local_declaration_of_0_2440","Import declaration conflicts with local declaration of '{0}'."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:t(2441,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."),Types_have_separate_declarations_of_a_private_property_0:t(2442,e.DiagnosticCategory.Error,"Types_have_separate_declarations_of_a_private_property_0_2442","Types have separate declarations of a private property '{0}'."),Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:t(2443,e.DiagnosticCategory.Error,"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443","Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),Property_0_is_protected_in_type_1_but_public_in_type_2:t(2444,e.DiagnosticCategory.Error,"Property_0_is_protected_in_type_1_but_public_in_type_2_2444","Property '{0}' is protected in type '{1}' but public in type '{2}'."),Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:t(2445,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445","Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:t(2446,e.DiagnosticCategory.Error,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:t(2447,e.DiagnosticCategory.Error,"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447","The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),Block_scoped_variable_0_used_before_its_declaration:t(2448,e.DiagnosticCategory.Error,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:t(2449,e.DiagnosticCategory.Error,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:t(2450,e.DiagnosticCategory.Error,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:t(2451,e.DiagnosticCategory.Error,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:t(2452,e.DiagnosticCategory.Error,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:t(2453,e.DiagnosticCategory.Error,"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453","The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."),Variable_0_is_used_before_being_assigned:t(2454,e.DiagnosticCategory.Error,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:t(2455,e.DiagnosticCategory.Error,"Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455","Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."),Type_alias_0_circularly_references_itself:t(2456,e.DiagnosticCategory.Error,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:t(2457,e.DiagnosticCategory.Error,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:t(2458,e.DiagnosticCategory.Error,"An_AMD_module_cannot_have_multiple_name_assignments_2458","An AMD module cannot have multiple name assignments."),Type_0_is_not_an_array_type:t(2461,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_2461","Type '{0}' is not an array type."),A_rest_element_must_be_last_in_a_destructuring_pattern:t(2462,e.DiagnosticCategory.Error,"A_rest_element_must_be_last_in_a_destructuring_pattern_2462","A rest element must be last in a destructuring pattern."),A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:t(2463,e.DiagnosticCategory.Error,"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463","A binding pattern parameter cannot be optional in an implementation signature."),A_computed_property_name_must_be_of_type_string_number_symbol_or_any:t(2464,e.DiagnosticCategory.Error,"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464","A computed property name must be of type 'string', 'number', 'symbol', or 'any'."),this_cannot_be_referenced_in_a_computed_property_name:t(2465,e.DiagnosticCategory.Error,"this_cannot_be_referenced_in_a_computed_property_name_2465","'this' cannot be referenced in a computed property name."),super_cannot_be_referenced_in_a_computed_property_name:t(2466,e.DiagnosticCategory.Error,"super_cannot_be_referenced_in_a_computed_property_name_2466","'super' cannot be referenced in a computed property name."),A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:t(2467,e.DiagnosticCategory.Error,"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467","A computed property name cannot reference a type parameter from its containing type."),Cannot_find_global_value_0:t(2468,e.DiagnosticCategory.Error,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:t(2469,e.DiagnosticCategory.Error,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object:t(2470,e.DiagnosticCategory.Error,"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470","'Symbol' reference does not refer to the global Symbol constructor object."),A_computed_property_name_of_the_form_0_must_be_of_type_symbol:t(2471,e.DiagnosticCategory.Error,"A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471","A computed property name of the form '{0}' must be of type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:t(2472,e.DiagnosticCategory.Error,"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472","Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),Enum_declarations_must_all_be_const_or_non_const:t(2473,e.DiagnosticCategory.Error,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values:t(2474,e.DiagnosticCategory.Error,"const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474","const enum member initializers can only contain literal values and other computed enum values."),const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query:t(2475,e.DiagnosticCategory.Error,"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475","'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."),A_const_enum_member_can_only_be_accessed_using_a_string_literal:t(2476,e.DiagnosticCategory.Error,"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476","A const enum member can only be accessed using a string literal."),const_enum_member_initializer_was_evaluated_to_a_non_finite_value:t(2477,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477","'const' enum member initializer was evaluated to a non-finite value."),const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:t(2478,e.DiagnosticCategory.Error,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),Property_0_does_not_exist_on_const_enum_1:t(2479,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_const_enum_1_2479","Property '{0}' does not exist on 'const' enum '{1}'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:t(2480,e.DiagnosticCategory.Error,"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480","'let' is not allowed to be used as a name in 'let' or 'const' declarations."),Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:t(2481,e.DiagnosticCategory.Error,"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481","Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:t(2483,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483","The left-hand side of a 'for...of' statement cannot use a type annotation."),Export_declaration_conflicts_with_exported_declaration_of_0:t(2484,e.DiagnosticCategory.Error,"Export_declaration_conflicts_with_exported_declaration_of_0_2484","Export declaration conflicts with exported declaration of '{0}'."),The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access:t(2487,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487","The left-hand side of a 'for...of' statement must be a variable or a property access."),Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2488,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488","Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."),An_iterator_must_have_a_next_method:t(2489,e.DiagnosticCategory.Error,"An_iterator_must_have_a_next_method_2489","An iterator must have a 'next()' method."),The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property:t(2490,e.DiagnosticCategory.Error,"The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490","The type returned by the '{0}()' method of an iterator must have a 'value' property."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:t(2491,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491","The left-hand side of a 'for...in' statement cannot be a destructuring pattern."),Cannot_redeclare_identifier_0_in_catch_clause:t(2492,e.DiagnosticCategory.Error,"Cannot_redeclare_identifier_0_in_catch_clause_2492","Cannot redeclare identifier '{0}' in catch clause."),Tuple_type_0_of_length_1_has_no_element_at_index_2:t(2493,e.DiagnosticCategory.Error,"Tuple_type_0_of_length_1_has_no_element_at_index_2_2493","Tuple type '{0}' of length '{1}' has no element at index '{2}'."),Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:t(2494,e.DiagnosticCategory.Error,"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494","Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."),Type_0_is_not_an_array_type_or_a_string_type:t(2495,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_2495","Type '{0}' is not an array type or a string type."),The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression:t(2496,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496","The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."),This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export:t(2497,e.DiagnosticCategory.Error,"This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497","This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."),Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:t(2498,e.DiagnosticCategory.Error,"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498","Module '{0}' uses 'export =' and cannot be used with 'export *'."),An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2499,e.DiagnosticCategory.Error,"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499","An interface can only extend an identifier/qualified-name with optional type arguments."),A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:t(2500,e.DiagnosticCategory.Error,"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500","A class can only implement an identifier/qualified-name with optional type arguments."),A_rest_element_cannot_contain_a_binding_pattern:t(2501,e.DiagnosticCategory.Error,"A_rest_element_cannot_contain_a_binding_pattern_2501","A rest element cannot contain a binding pattern."),_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:t(2502,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502","'{0}' is referenced directly or indirectly in its own type annotation."),Cannot_find_namespace_0:t(2503,e.DiagnosticCategory.Error,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:t(2504,e.DiagnosticCategory.Error,"Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504","Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."),A_generator_cannot_have_a_void_type_annotation:t(2505,e.DiagnosticCategory.Error,"A_generator_cannot_have_a_void_type_annotation_2505","A generator cannot have a 'void' type annotation."),_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:t(2506,e.DiagnosticCategory.Error,"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506","'{0}' is referenced directly or indirectly in its own base expression."),Type_0_is_not_a_constructor_function_type:t(2507,e.DiagnosticCategory.Error,"Type_0_is_not_a_constructor_function_type_2507","Type '{0}' is not a constructor function type."),No_base_constructor_has_the_specified_number_of_type_arguments:t(2508,e.DiagnosticCategory.Error,"No_base_constructor_has_the_specified_number_of_type_arguments_2508","No base constructor has the specified number of type arguments."),Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members:t(2509,e.DiagnosticCategory.Error,"Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509","Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."),Base_constructors_must_all_have_the_same_return_type:t(2510,e.DiagnosticCategory.Error,"Base_constructors_must_all_have_the_same_return_type_2510","Base constructors must all have the same return type."),Cannot_create_an_instance_of_an_abstract_class:t(2511,e.DiagnosticCategory.Error,"Cannot_create_an_instance_of_an_abstract_class_2511","Cannot create an instance of an abstract class."),Overload_signatures_must_all_be_abstract_or_non_abstract:t(2512,e.DiagnosticCategory.Error,"Overload_signatures_must_all_be_abstract_or_non_abstract_2512","Overload signatures must all be abstract or non-abstract."),Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:t(2513,e.DiagnosticCategory.Error,"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513","Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),Classes_containing_abstract_methods_must_be_marked_abstract:t(2514,e.DiagnosticCategory.Error,"Classes_containing_abstract_methods_must_be_marked_abstract_2514","Classes containing abstract methods must be marked abstract."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:t(2515,e.DiagnosticCategory.Error,"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515","Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),All_declarations_of_an_abstract_method_must_be_consecutive:t(2516,e.DiagnosticCategory.Error,"All_declarations_of_an_abstract_method_must_be_consecutive_2516","All declarations of an abstract method must be consecutive."),Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:t(2517,e.DiagnosticCategory.Error,"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517","Cannot assign an abstract constructor type to a non-abstract constructor type."),A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:t(2518,e.DiagnosticCategory.Error,"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518","A 'this'-based type guard is not compatible with a parameter-based type guard."),An_async_iterator_must_have_a_next_method:t(2519,e.DiagnosticCategory.Error,"An_async_iterator_must_have_a_next_method_2519","An async iterator must have a 'next()' method."),Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:t(2520,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions:t(2521,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521","Expression resolves to variable declaration '{0}' that compiler uses to support async functions."),The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method:t(2522,e.DiagnosticCategory.Error,"The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522","The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."),yield_expressions_cannot_be_used_in_a_parameter_initializer:t(2523,e.DiagnosticCategory.Error,"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523","'yield' expressions cannot be used in a parameter initializer."),await_expressions_cannot_be_used_in_a_parameter_initializer:t(2524,e.DiagnosticCategory.Error,"await_expressions_cannot_be_used_in_a_parameter_initializer_2524","'await' expressions cannot be used in a parameter initializer."),Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:t(2525,e.DiagnosticCategory.Error,"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525","Initializer provides no value for this binding element and the binding element has no default value."),A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:t(2526,e.DiagnosticCategory.Error,"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526","A 'this' type is available only in a non-static member of a class or interface."),The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary:t(2527,e.DiagnosticCategory.Error,"The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527","The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."),A_module_cannot_have_multiple_default_exports:t(2528,e.DiagnosticCategory.Error,"A_module_cannot_have_multiple_default_exports_2528","A module cannot have multiple default exports."),Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:t(2529,e.DiagnosticCategory.Error,"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529","Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."),Property_0_is_incompatible_with_index_signature:t(2530,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:t(2531,e.DiagnosticCategory.Error,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:t(2532,e.DiagnosticCategory.Error,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:t(2533,e.DiagnosticCategory.Error,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:t(2534,e.DiagnosticCategory.Error,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Enum_type_0_has_members_with_initializers_that_are_not_literals:t(2535,e.DiagnosticCategory.Error,"Enum_type_0_has_members_with_initializers_that_are_not_literals_2535","Enum type '{0}' has members with initializers that are not literals."),Type_0_cannot_be_used_to_index_type_1:t(2536,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_to_index_type_1_2536","Type '{0}' cannot be used to index type '{1}'."),Type_0_has_no_matching_index_signature_for_type_1:t(2537,e.DiagnosticCategory.Error,"Type_0_has_no_matching_index_signature_for_type_1_2537","Type '{0}' has no matching index signature for type '{1}'."),Type_0_cannot_be_used_as_an_index_type:t(2538,e.DiagnosticCategory.Error,"Type_0_cannot_be_used_as_an_index_type_2538","Type '{0}' cannot be used as an index type."),Cannot_assign_to_0_because_it_is_not_a_variable:t(2539,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_not_a_variable_2539","Cannot assign to '{0}' because it is not a variable."),Cannot_assign_to_0_because_it_is_a_read_only_property:t(2540,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),The_target_of_an_assignment_must_be_a_variable_or_a_property_access:t(2541,e.DiagnosticCategory.Error,"The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541","The target of an assignment must be a variable or a property access."),Index_signature_in_type_0_only_permits_reading:t(2542,e.DiagnosticCategory.Error,"Index_signature_in_type_0_only_permits_reading_2542","Index signature in type '{0}' only permits reading."),Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference:t(2543,e.DiagnosticCategory.Error,"Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543","Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference:t(2544,e.DiagnosticCategory.Error,"Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544","Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any:t(2545,e.DiagnosticCategory.Error,"A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545","A mixin class must have a constructor with a single rest parameter of type 'any[]'."),Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1:t(2546,e.DiagnosticCategory.Error,"Property_0_has_conflicting_declarations_and_is_inaccessible_in_type_1_2546","Property '{0}' has conflicting declarations and is inaccessible in type '{1}'."),The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property:t(2547,e.DiagnosticCategory.Error,"The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547","The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2548,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548","Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator:t(2549,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549","Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),Property_0_does_not_exist_on_type_1_Did_you_mean_2:t(2551,e.DiagnosticCategory.Error,"Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551","Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),Cannot_find_name_0_Did_you_mean_1:t(2552,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_1_2552","Cannot find name '{0}'. Did you mean '{1}'?"),Computed_values_are_not_permitted_in_an_enum_with_string_valued_members:t(2553,e.DiagnosticCategory.Error,"Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553","Computed values are not permitted in an enum with string valued members."),Expected_0_arguments_but_got_1:t(2554,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:t(2555,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),Expected_0_arguments_but_got_1_or_more:t(2556,e.DiagnosticCategory.Error,"Expected_0_arguments_but_got_1_or_more_2556","Expected {0} arguments, but got {1} or more."),Expected_at_least_0_arguments_but_got_1_or_more:t(2557,e.DiagnosticCategory.Error,"Expected_at_least_0_arguments_but_got_1_or_more_2557","Expected at least {0} arguments, but got {1} or more."),Expected_0_type_arguments_but_got_1:t(2558,e.DiagnosticCategory.Error,"Expected_0_type_arguments_but_got_1_2558","Expected {0} type arguments, but got {1}."),Type_0_has_no_properties_in_common_with_type_1:t(2559,e.DiagnosticCategory.Error,"Type_0_has_no_properties_in_common_with_type_1_2559","Type '{0}' has no properties in common with type '{1}'."),Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it:t(2560,e.DiagnosticCategory.Error,"Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560","Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2:t(2561,e.DiagnosticCategory.Error,"Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561","Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"),Base_class_expressions_cannot_reference_class_type_parameters:t(2562,e.DiagnosticCategory.Error,"Base_class_expressions_cannot_reference_class_type_parameters_2562","Base class expressions cannot reference class type parameters."),The_containing_function_or_module_body_is_too_large_for_control_flow_analysis:t(2563,e.DiagnosticCategory.Error,"The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563","The containing function or module body is too large for control flow analysis."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor:t(2564,e.DiagnosticCategory.Error,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564","Property '{0}' has no initializer and is not definitely assigned in the constructor."),Property_0_is_used_before_being_assigned:t(2565,e.DiagnosticCategory.Error,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:t(2566,e.DiagnosticCategory.Error,"A_rest_element_cannot_have_a_property_name_2566","A rest element cannot have a property name."),Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations:t(2567,e.DiagnosticCategory.Error,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators:t(2569,e.DiagnosticCategory.Error,"Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569","Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),Object_is_of_type_unknown:t(2571,e.DiagnosticCategory.Error,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),Rest_signatures_are_incompatible:t(2572,e.DiagnosticCategory.Error,"Rest_signatures_are_incompatible_2572","Rest signatures are incompatible."),Property_0_is_incompatible_with_rest_element_type:t(2573,e.DiagnosticCategory.Error,"Property_0_is_incompatible_with_rest_element_type_2573","Property '{0}' is incompatible with rest element type."),A_rest_element_type_must_be_an_array_type:t(2574,e.DiagnosticCategory.Error,"A_rest_element_type_must_be_an_array_type_2574","A rest element type must be an array type."),No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments:t(2575,e.DiagnosticCategory.Error,"No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575","No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),Property_0_is_a_static_member_of_type_1:t(2576,e.DiagnosticCategory.Error,"Property_0_is_a_static_member_of_type_1_2576","Property '{0}' is a static member of type '{1}'"),Return_type_annotation_circularly_references_itself:t(2577,e.DiagnosticCategory.Error,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode:t(2580,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_2580","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery:t(2581,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_2581","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha:t(2582,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2582","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2583,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom:t(2584,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584","Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:t(2585,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585","'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),Enum_type_0_circularly_references_itself:t(2586,e.DiagnosticCategory.Error,"Enum_type_0_circularly_references_itself_2586","Enum type '{0}' circularly references itself."),JSDoc_type_0_circularly_references_itself:t(2587,e.DiagnosticCategory.Error,"JSDoc_type_0_circularly_references_itself_2587","JSDoc type '{0}' circularly references itself."),Cannot_assign_to_0_because_it_is_a_constant:t(2588,e.DiagnosticCategory.Error,"Cannot_assign_to_0_because_it_is_a_constant_2588","Cannot assign to '{0}' because it is a constant."),Type_instantiation_is_excessively_deep_and_possibly_infinite:t(2589,e.DiagnosticCategory.Error,"Type_instantiation_is_excessively_deep_and_possibly_infinite_2589","Type instantiation is excessively deep and possibly infinite."),Expression_produces_a_union_type_that_is_too_complex_to_represent:t(2590,e.DiagnosticCategory.Error,"Expression_produces_a_union_type_that_is_too_complex_to_represent_2590","Expression produces a union type that is too complex to represent."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig:t(2591,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_th_2591","Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig:t(2592,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_an_2592","Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig."),Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig:t(2593,e.DiagnosticCategory.Error,"Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashje_2593","Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig."),This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:t(2594,e.DiagnosticCategory.Error,"This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594","This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag."),JSX_element_attributes_type_0_may_not_be_a_union_type:t(2600,e.DiagnosticCategory.Error,"JSX_element_attributes_type_0_may_not_be_a_union_type_2600","JSX element attributes type '{0}' may not be a union type."),The_return_type_of_a_JSX_element_constructor_must_return_an_object_type:t(2601,e.DiagnosticCategory.Error,"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601","The return type of a JSX element constructor must return an object type."),JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:t(2602,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602","JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),Property_0_in_type_1_is_not_assignable_to_type_2:t(2603,e.DiagnosticCategory.Error,"Property_0_in_type_1_is_not_assignable_to_type_2_2603","Property '{0}' in type '{1}' is not assignable to type '{2}'."),JSX_element_type_0_does_not_have_any_construct_or_call_signatures:t(2604,e.DiagnosticCategory.Error,"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604","JSX element type '{0}' does not have any construct or call signatures."),JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements:t(2605,e.DiagnosticCategory.Error,"JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605","JSX element type '{0}' is not a constructor function for JSX elements."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:t(2606,e.DiagnosticCategory.Error,"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606","Property '{0}' of JSX spread attribute is not assignable to target property."),JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:t(2607,e.DiagnosticCategory.Error,"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607","JSX element class does not support attributes because it does not have a '{0}' property."),The_global_type_JSX_0_may_not_have_more_than_one_property:t(2608,e.DiagnosticCategory.Error,"The_global_type_JSX_0_may_not_have_more_than_one_property_2608","The global type 'JSX.{0}' may not have more than one property."),JSX_spread_child_must_be_an_array_type:t(2609,e.DiagnosticCategory.Error,"JSX_spread_child_must_be_an_array_type_2609","JSX spread child must be an array type."),Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property:t(2610,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_proper_2610","Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property."),Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor:t(2611,e.DiagnosticCategory.Error,"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_access_2611","Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor."),Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration:t(2612,e.DiagnosticCategory.Error,"Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612","Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."),Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead:t(2613,e.DiagnosticCategory.Error,"Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613","Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"),Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead:t(2614,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614","Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:t(2649,e.DiagnosticCategory.Error,"Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649","Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:t(2651,e.DiagnosticCategory.Error,"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651","A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:t(2652,e.DiagnosticCategory.Error,"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652","Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:t(2653,e.DiagnosticCategory.Error,"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653","Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition:t(2654,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654","Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."),Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition:t(2656,e.DiagnosticCategory.Error,"Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656","Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."),JSX_expressions_must_have_one_parent_element:t(2657,e.DiagnosticCategory.Error,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:t(2658,e.DiagnosticCategory.Error,"Type_0_provides_no_match_for_the_signature_1_2658","Type '{0}' provides no match for the signature '{1}'."),super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:t(2659,e.DiagnosticCategory.Error,"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659","'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:t(2660,e.DiagnosticCategory.Error,"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660","'super' can only be referenced in members of derived classes or object literal expressions."),Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module:t(2661,e.DiagnosticCategory.Error,"Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661","Cannot export '{0}'. Only local declarations can be exported from a module."),Cannot_find_name_0_Did_you_mean_the_static_member_1_0:t(2662,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662","Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"),Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:t(2663,e.DiagnosticCategory.Error,"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663","Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"),Invalid_module_name_in_augmentation_module_0_cannot_be_found:t(2664,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664","Invalid module name in augmentation, module '{0}' cannot be found."),Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented:t(2665,e.DiagnosticCategory.Error,"Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665","Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."),Exports_and_export_assignments_are_not_permitted_in_module_augmentations:t(2666,e.DiagnosticCategory.Error,"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666","Exports and export assignments are not permitted in module augmentations."),Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:t(2667,e.DiagnosticCategory.Error,"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667","Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."),export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:t(2668,e.DiagnosticCategory.Error,"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668","'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."),Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:t(2669,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669","Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."),Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:t(2670,e.DiagnosticCategory.Error,"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670","Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."),Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:t(2671,e.DiagnosticCategory.Error,"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671","Cannot augment module '{0}' because it resolves to a non-module entity."),Cannot_assign_a_0_constructor_type_to_a_1_constructor_type:t(2672,e.DiagnosticCategory.Error,"Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672","Cannot assign a '{0}' constructor type to a '{1}' constructor type."),Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration:t(2673,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673","Constructor of class '{0}' is private and only accessible within the class declaration."),Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration:t(2674,e.DiagnosticCategory.Error,"Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674","Constructor of class '{0}' is protected and only accessible within the class declaration."),Cannot_extend_a_class_0_Class_constructor_is_marked_as_private:t(2675,e.DiagnosticCategory.Error,"Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675","Cannot extend a class '{0}'. Class constructor is marked as private."),Accessors_must_both_be_abstract_or_non_abstract:t(2676,e.DiagnosticCategory.Error,"Accessors_must_both_be_abstract_or_non_abstract_2676","Accessors must both be abstract or non-abstract."),A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type:t(2677,e.DiagnosticCategory.Error,"A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677","A type predicate's type must be assignable to its parameter's type."),Type_0_is_not_comparable_to_type_1:t(2678,e.DiagnosticCategory.Error,"Type_0_is_not_comparable_to_type_1_2678","Type '{0}' is not comparable to type '{1}'."),A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void:t(2679,e.DiagnosticCategory.Error,"A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679","A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),A_0_parameter_must_be_the_first_parameter:t(2680,e.DiagnosticCategory.Error,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:t(2681,e.DiagnosticCategory.Error,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),get_and_set_accessor_must_have_the_same_this_type:t(2682,e.DiagnosticCategory.Error,"get_and_set_accessor_must_have_the_same_this_type_2682","'get' and 'set' accessor must have the same 'this' type."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:t(2683,e.DiagnosticCategory.Error,"this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683","'this' implicitly has type 'any' because it does not have a type annotation."),The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1:t(2684,e.DiagnosticCategory.Error,"The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684","The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),The_this_types_of_each_signature_are_incompatible:t(2685,e.DiagnosticCategory.Error,"The_this_types_of_each_signature_are_incompatible_2685","The 'this' types of each signature are incompatible."),_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead:t(2686,e.DiagnosticCategory.Error,"_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686","'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."),All_declarations_of_0_must_have_identical_modifiers:t(2687,e.DiagnosticCategory.Error,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:t(2688,e.DiagnosticCategory.Error,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:t(2689,e.DiagnosticCategory.Error,"Cannot_extend_an_interface_0_Did_you_mean_implements_2689","Cannot extend an interface '{0}'. Did you mean 'implements'?"),An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead:t(2691,e.DiagnosticCategory.Error,"An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691","An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:t(2692,e.DiagnosticCategory.Error,"_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692","'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."),_0_only_refers_to_a_type_but_is_being_used_as_a_value_here:t(2693,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693","'{0}' only refers to a type, but is being used as a value here."),Namespace_0_has_no_exported_member_1:t(2694,e.DiagnosticCategory.Error,"Namespace_0_has_no_exported_member_1_2694","Namespace '{0}' has no exported member '{1}'."),Left_side_of_comma_operator_is_unused_and_has_no_side_effects:t(2695,e.DiagnosticCategory.Error,"Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695","Left side of comma operator is unused and has no side effects.",!0),The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead:t(2696,e.DiagnosticCategory.Error,"The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696","The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2697,e.DiagnosticCategory.Error,"An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697","An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),Spread_types_may_only_be_created_from_object_types:t(2698,e.DiagnosticCategory.Error,"Spread_types_may_only_be_created_from_object_types_2698","Spread types may only be created from object types."),Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1:t(2699,e.DiagnosticCategory.Error,"Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699","Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),Rest_types_may_only_be_created_from_object_types:t(2700,e.DiagnosticCategory.Error,"Rest_types_may_only_be_created_from_object_types_2700","Rest types may only be created from object types."),The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access:t(2701,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701","The target of an object rest assignment must be a variable or a property access."),_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here:t(2702,e.DiagnosticCategory.Error,"_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702","'{0}' only refers to a type, but is being used as a namespace here."),The_operand_of_a_delete_operator_must_be_a_property_reference:t(2703,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_must_be_a_property_reference_2703","The operand of a delete operator must be a property reference."),The_operand_of_a_delete_operator_cannot_be_a_read_only_property:t(2704,e.DiagnosticCategory.Error,"The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704","The operand of a delete operator cannot be a read-only property."),An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2705,e.DiagnosticCategory.Error,"An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705","An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Required_type_parameters_may_not_follow_optional_type_parameters:t(2706,e.DiagnosticCategory.Error,"Required_type_parameters_may_not_follow_optional_type_parameters_2706","Required type parameters may not follow optional type parameters."),Generic_type_0_requires_between_1_and_2_type_arguments:t(2707,e.DiagnosticCategory.Error,"Generic_type_0_requires_between_1_and_2_type_arguments_2707","Generic type '{0}' requires between {1} and {2} type arguments."),Cannot_use_namespace_0_as_a_value:t(2708,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:t(2709,e.DiagnosticCategory.Error,"Cannot_use_namespace_0_as_a_type_2709","Cannot use namespace '{0}' as a type."),_0_are_specified_twice_The_attribute_named_0_will_be_overwritten:t(2710,e.DiagnosticCategory.Error,"_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710","'{0}' are specified twice. The attribute named '{0}' will be overwritten."),A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option:t(2711,e.DiagnosticCategory.Error,"A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711","A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option:t(2712,e.DiagnosticCategory.Error,"A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712","A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1:t(2713,e.DiagnosticCategory.Error,"Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713","Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context:t(2714,e.DiagnosticCategory.Error,"The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714","The expression of an export assignment must be an identifier or qualified name in an ambient context."),Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor:t(2715,e.DiagnosticCategory.Error,"Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715","Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),Type_parameter_0_has_a_circular_default:t(2716,e.DiagnosticCategory.Error,"Type_parameter_0_has_a_circular_default_2716","Type parameter '{0}' has a circular default."),Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:t(2717,e.DiagnosticCategory.Error,"Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717","Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."),Duplicate_property_0:t(2718,e.DiagnosticCategory.Error,"Duplicate_property_0_2718","Duplicate property '{0}'."),Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated:t(2719,e.DiagnosticCategory.Error,"Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719","Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."),Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass:t(2720,e.DiagnosticCategory.Error,"Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720","Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"),Cannot_invoke_an_object_which_is_possibly_null:t(2721,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_2721","Cannot invoke an object which is possibly 'null'."),Cannot_invoke_an_object_which_is_possibly_undefined:t(2722,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_undefined_2722","Cannot invoke an object which is possibly 'undefined'."),Cannot_invoke_an_object_which_is_possibly_null_or_undefined:t(2723,e.DiagnosticCategory.Error,"Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723","Cannot invoke an object which is possibly 'null' or 'undefined'."),Module_0_has_no_exported_member_1_Did_you_mean_2:t(2724,e.DiagnosticCategory.Error,"Module_0_has_no_exported_member_1_Did_you_mean_2_2724","Module '{0}' has no exported member '{1}'. Did you mean '{2}'?"),Class_name_cannot_be_Object_when_targeting_ES5_with_module_0:t(2725,e.DiagnosticCategory.Error,"Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725","Class name cannot be 'Object' when targeting ES5 with module {0}."),Cannot_find_lib_definition_for_0:t(2726,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:t(2727,e.DiagnosticCategory.Error,"Cannot_find_lib_definition_for_0_Did_you_mean_1_2727","Cannot find lib definition for '{0}'. Did you mean '{1}'?"),_0_is_declared_here:t(2728,e.DiagnosticCategory.Message,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:t(2729,e.DiagnosticCategory.Error,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:t(2730,e.DiagnosticCategory.Error,"An_arrow_function_cannot_have_a_this_parameter_2730","An arrow function cannot have a 'this' parameter."),Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String:t(2731,e.DiagnosticCategory.Error,"Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731","Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."),Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension:t(2732,e.DiagnosticCategory.Error,"Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732","Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension"),Property_0_was_also_declared_here:t(2733,e.DiagnosticCategory.Error,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),It_is_highly_likely_that_you_are_missing_a_semicolon:t(2734,e.DiagnosticCategory.Error,"It_is_highly_likely_that_you_are_missing_a_semicolon_2734","It is highly likely that you are missing a semicolon."),Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1:t(2735,e.DiagnosticCategory.Error,"Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735","Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"),Operator_0_cannot_be_applied_to_type_1:t(2736,e.DiagnosticCategory.Error,"Operator_0_cannot_be_applied_to_type_1_2736","Operator '{0}' cannot be applied to type '{1}'."),BigInt_literals_are_not_available_when_targeting_lower_than_ESNext:t(2737,e.DiagnosticCategory.Error,"BigInt_literals_are_not_available_when_targeting_lower_than_ESNext_2737","BigInt literals are not available when targeting lower than ESNext."),An_outer_value_of_this_is_shadowed_by_this_container:t(2738,e.DiagnosticCategory.Message,"An_outer_value_of_this_is_shadowed_by_this_container_2738","An outer value of 'this' is shadowed by this container."),Type_0_is_missing_the_following_properties_from_type_1_Colon_2:t(2739,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739","Type '{0}' is missing the following properties from type '{1}': {2}"),Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more:t(2740,e.DiagnosticCategory.Error,"Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740","Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."),Property_0_is_missing_in_type_1_but_required_in_type_2:t(2741,e.DiagnosticCategory.Error,"Property_0_is_missing_in_type_1_but_required_in_type_2_2741","Property '{0}' is missing in type '{1}' but required in type '{2}'."),The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary:t(2742,e.DiagnosticCategory.Error,"The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742","The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."),No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments:t(2743,e.DiagnosticCategory.Error,"No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743","No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."),Type_parameter_defaults_can_only_reference_previously_declared_type_parameters:t(2744,e.DiagnosticCategory.Error,"Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744","Type parameter defaults can only reference previously declared type parameters."),This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided:t(2745,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745","This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."),This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided:t(2746,e.DiagnosticCategory.Error,"This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746","This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."),_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2:t(2747,e.DiagnosticCategory.Error,"_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747","'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."),Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided:t(2748,e.DiagnosticCategory.Error,"Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748","Cannot access ambient const enums when the '--isolatedModules' flag is provided."),_0_refers_to_a_value_but_is_being_used_as_a_type_here:t(2749,e.DiagnosticCategory.Error,"_0_refers_to_a_value_but_is_being_used_as_a_type_here_2749","'{0}' refers to a value, but is being used as a type here."),The_implementation_signature_is_declared_here:t(2750,e.DiagnosticCategory.Error,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:t(2751,e.DiagnosticCategory.Error,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:t(2752,e.DiagnosticCategory.Error,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:t(2753,e.DiagnosticCategory.Error,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:t(2754,e.DiagnosticCategory.Error,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:t(2755,e.DiagnosticCategory.Error,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:t(2756,e.DiagnosticCategory.Error,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:t(2757,e.DiagnosticCategory.Error,"Type_0_has_no_call_signatures_2757","Type '{0}' has no call signatures."),Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other:t(2758,e.DiagnosticCategory.Error,"Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758","Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."),No_constituent_of_type_0_is_constructable:t(2759,e.DiagnosticCategory.Error,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:t(2760,e.DiagnosticCategory.Error,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:t(2761,e.DiagnosticCategory.Error,"Type_0_has_no_construct_signatures_2761","Type '{0}' has no construct signatures."),Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other:t(2762,e.DiagnosticCategory.Error,"Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762","Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:t(2763,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:t(2764,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."),Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:t(2765,e.DiagnosticCategory.Error,"Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765","Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."),Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:t(2766,e.DiagnosticCategory.Error,"Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766","Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."),The_0_property_of_an_iterator_must_be_a_method:t(2767,e.DiagnosticCategory.Error,"The_0_property_of_an_iterator_must_be_a_method_2767","The '{0}' property of an iterator must be a method."),The_0_property_of_an_async_iterator_must_be_a_method:t(2768,e.DiagnosticCategory.Error,"The_0_property_of_an_async_iterator_must_be_a_method_2768","The '{0}' property of an async iterator must be a method."),No_overload_matches_this_call:t(2769,e.DiagnosticCategory.Error,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:t(2770,e.DiagnosticCategory.Error,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:t(2771,e.DiagnosticCategory.Error,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:t(2772,e.DiagnosticCategory.Error,"Overload_0_of_1_2_gave_the_following_error_2772","Overload {0} of {1}, '{2}', gave the following error."),Did_you_forget_to_use_await:t(2773,e.DiagnosticCategory.Error,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead:t(2774,e.DiagnosticCategory.Error,"This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774","This condition will always return true since the function is always defined. Did you mean to call it instead?"),Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation:t(2775,e.DiagnosticCategory.Error,"Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775","Assertions require every name in the call target to be declared with an explicit type annotation."),Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name:t(2776,e.DiagnosticCategory.Error,"Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776","Assertions require the call target to be an identifier or qualified name."),The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access:t(2777,e.DiagnosticCategory.Error,"The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777","The operand of an increment or decrement operator may not be an optional property access."),The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access:t(2778,e.DiagnosticCategory.Error,"The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778","The target of an object rest assignment may not be an optional property access."),The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access:t(2779,e.DiagnosticCategory.Error,"The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779","The left-hand side of an assignment expression may not be an optional property access."),The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access:t(2780,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780","The left-hand side of a 'for...in' statement may not be an optional property access."),The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access:t(2781,e.DiagnosticCategory.Error,"The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781","The left-hand side of a 'for...of' statement may not be an optional property access."),Import_declaration_0_is_using_private_name_1:t(4e3,e.DiagnosticCategory.Error,"Import_declaration_0_is_using_private_name_1_4000","Import declaration '{0}' is using private name '{1}'."),Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:t(4002,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002","Type parameter '{0}' of exported class has or is using private name '{1}'."),Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:t(4004,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004","Type parameter '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4006,e.DiagnosticCategory.Error,"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006","Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4008,e.DiagnosticCategory.Error,"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008","Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4010,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010","Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4012,e.DiagnosticCategory.Error,"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012","Type parameter '{0}' of public method from exported class has or is using private name '{1}'."),Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4014,e.DiagnosticCategory.Error,"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014","Type parameter '{0}' of method from exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4016,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016","Type parameter '{0}' of exported function has or is using private name '{1}'."),Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4019,e.DiagnosticCategory.Error,"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019","Implements clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_class_0_has_or_is_using_private_name_1:t(4020,e.DiagnosticCategory.Error,"extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020","'extends' clause of exported class '{0}' has or is using private name '{1}'."),extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:t(4022,e.DiagnosticCategory.Error,"extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022","'extends' clause of exported interface '{0}' has or is using private name '{1}'."),Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4023,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023","Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."),Exported_variable_0_has_or_is_using_name_1_from_private_module_2:t(4024,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024","Exported variable '{0}' has or is using name '{1}' from private module '{2}'."),Exported_variable_0_has_or_is_using_private_name_1:t(4025,e.DiagnosticCategory.Error,"Exported_variable_0_has_or_is_using_private_name_1_4025","Exported variable '{0}' has or is using private name '{1}'."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4026,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026","Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4027,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027","Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:t(4028,e.DiagnosticCategory.Error,"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028","Public static property '{0}' of exported class has or is using private name '{1}'."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4029,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029","Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4030,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030","Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_property_0_of_exported_class_has_or_is_using_private_name_1:t(4031,e.DiagnosticCategory.Error,"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031","Public property '{0}' of exported class has or is using private name '{1}'."),Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4032,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032","Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Property_0_of_exported_interface_has_or_is_using_private_name_1:t(4033,e.DiagnosticCategory.Error,"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033","Property '{0}' of exported interface has or is using private name '{1}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4034,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034","Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4035,e.DiagnosticCategory.Error,"Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035","Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4036,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036","Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1:t(4037,e.DiagnosticCategory.Error,"Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037","Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4038,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038","Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4039,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039","Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4040,e.DiagnosticCategory.Error,"Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040","Return type of public static getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4041,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041","Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4042,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042","Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."),Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1:t(4043,e.DiagnosticCategory.Error,"Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043","Return type of public getter '{0}' from exported class has or is using private name '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4044,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044","Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:t(4045,e.DiagnosticCategory.Error,"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045","Return type of constructor signature from exported interface has or is using private name '{0}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4046,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046","Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:t(4047,e.DiagnosticCategory.Error,"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047","Return type of call signature from exported interface has or is using private name '{0}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4048,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048","Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:t(4049,e.DiagnosticCategory.Error,"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049","Return type of index signature from exported interface has or is using private name '{0}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4050,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050","Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4051,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051","Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:t(4052,e.DiagnosticCategory.Error,"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052","Return type of public static method from exported class has or is using private name '{0}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4053,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053","Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:t(4054,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054","Return type of public method from exported class has or is using name '{0}' from private module '{1}'."),Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:t(4055,e.DiagnosticCategory.Error,"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055","Return type of public method from exported class has or is using private name '{0}'."),Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:t(4056,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056","Return type of method from exported interface has or is using name '{0}' from private module '{1}'."),Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:t(4057,e.DiagnosticCategory.Error,"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057","Return type of method from exported interface has or is using private name '{0}'."),Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:t(4058,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058","Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."),Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:t(4059,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059","Return type of exported function has or is using name '{0}' from private module '{1}'."),Return_type_of_exported_function_has_or_is_using_private_name_0:t(4060,e.DiagnosticCategory.Error,"Return_type_of_exported_function_has_or_is_using_private_name_0_4060","Return type of exported function has or is using private name '{0}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4061,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061","Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4062,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062","Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:t(4063,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063","Parameter '{0}' of constructor from exported class has or is using private name '{1}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4064,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064","Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:t(4065,e.DiagnosticCategory.Error,"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065","Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4066,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066","Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:t(4067,e.DiagnosticCategory.Error,"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067","Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4068,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068","Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4069,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069","Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:t(4070,e.DiagnosticCategory.Error,"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070","Parameter '{0}' of public static method from exported class has or is using private name '{1}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4071,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071","Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:t(4072,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072","Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."),Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:t(4073,e.DiagnosticCategory.Error,"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073","Parameter '{0}' of public method from exported class has or is using private name '{1}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4074,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074","Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:t(4075,e.DiagnosticCategory.Error,"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075","Parameter '{0}' of method from exported interface has or is using private name '{1}'."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4076,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076","Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."),Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:t(4077,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077","Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."),Parameter_0_of_exported_function_has_or_is_using_private_name_1:t(4078,e.DiagnosticCategory.Error,"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078","Parameter '{0}' of exported function has or is using private name '{1}'."),Exported_type_alias_0_has_or_is_using_private_name_1:t(4081,e.DiagnosticCategory.Error,"Exported_type_alias_0_has_or_is_using_private_name_1_4081","Exported type alias '{0}' has or is using private name '{1}'."),Default_export_of_the_module_has_or_is_using_private_name_0:t(4082,e.DiagnosticCategory.Error,"Default_export_of_the_module_has_or_is_using_private_name_0_4082","Default export of the module has or is using private name '{0}'."),Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1:t(4083,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083","Type parameter '{0}' of exported type alias has or is using private name '{1}'."),Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict:t(4090,e.DiagnosticCategory.Error,"Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090","Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4091,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091","Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."),Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1:t(4092,e.DiagnosticCategory.Error,"Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092","Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."),Property_0_of_exported_class_expression_may_not_be_private_or_protected:t(4094,e.DiagnosticCategory.Error,"Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094","Property '{0}' of exported class expression may not be private or protected."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4095,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095","Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4096,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096","Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_static_method_0_of_exported_class_has_or_is_using_private_name_1:t(4097,e.DiagnosticCategory.Error,"Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097","Public static method '{0}' of exported class has or is using private name '{1}'."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4098,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098","Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."),Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:t(4099,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099","Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."),Public_method_0_of_exported_class_has_or_is_using_private_name_1:t(4100,e.DiagnosticCategory.Error,"Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100","Public method '{0}' of exported class has or is using private name '{1}'."),Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:t(4101,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101","Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."),Method_0_of_exported_interface_has_or_is_using_private_name_1:t(4102,e.DiagnosticCategory.Error,"Method_0_of_exported_interface_has_or_is_using_private_name_1_4102","Method '{0}' of exported interface has or is using private name '{1}'."),Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1:t(4103,e.DiagnosticCategory.Error,"Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103","Type parameter '{0}' of exported mapped object type is using private name '{1}'."),The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1:t(4104,e.DiagnosticCategory.Error,"The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104","The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."),Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter:t(4105,e.DiagnosticCategory.Error,"Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105","Private or protected member '{0}' cannot be accessed on a type parameter."),Parameter_0_of_accessor_has_or_is_using_private_name_1:t(4106,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_private_name_1_4106","Parameter '{0}' of accessor has or is using private name '{1}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2:t(4107,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107","Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."),Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:t(4108,e.DiagnosticCategory.Error,"Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108","Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."),Type_arguments_for_0_circularly_reference_themselves:t(4109,e.DiagnosticCategory.Error,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:t(4110,e.DiagnosticCategory.Error,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),The_current_host_does_not_support_the_0_option:t(5001,e.DiagnosticCategory.Error,"The_current_host_does_not_support_the_0_option_5001","The current host does not support the '{0}' option."),Cannot_find_the_common_subdirectory_path_for_the_input_files:t(5009,e.DiagnosticCategory.Error,"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009","Cannot find the common subdirectory path for the input files."),File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5010,e.DiagnosticCategory.Error,"File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010","File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),Cannot_read_file_0_Colon_1:t(5012,e.DiagnosticCategory.Error,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:t(5014,e.DiagnosticCategory.Error,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:t(5023,e.DiagnosticCategory.Error,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:t(5024,e.DiagnosticCategory.Error,"Compiler_option_0_requires_a_value_of_type_1_5024","Compiler option '{0}' requires a value of type {1}."),Could_not_write_file_0_Colon_1:t(5033,e.DiagnosticCategory.Error,"Could_not_write_file_0_Colon_1_5033","Could not write file '{0}': {1}."),Option_project_cannot_be_mixed_with_source_files_on_a_command_line:t(5042,e.DiagnosticCategory.Error,"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042","Option 'project' cannot be mixed with source files on a command line."),Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:t(5047,e.DiagnosticCategory.Error,"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047","Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."),Option_0_cannot_be_specified_when_option_target_is_ES3:t(5048,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_when_option_target_is_ES3_5048","Option '{0}' cannot be specified when option 'target' is 'ES3'."),Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:t(5051,e.DiagnosticCategory.Error,"Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051","Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."),Option_0_cannot_be_specified_without_specifying_option_1:t(5052,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_5052","Option '{0}' cannot be specified without specifying option '{1}'."),Option_0_cannot_be_specified_with_option_1:t(5053,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_with_option_1_5053","Option '{0}' cannot be specified with option '{1}'."),A_tsconfig_json_file_is_already_defined_at_Colon_0:t(5054,e.DiagnosticCategory.Error,"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054","A 'tsconfig.json' file is already defined at: '{0}'."),Cannot_write_file_0_because_it_would_overwrite_input_file:t(5055,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_overwrite_input_file_5055","Cannot write file '{0}' because it would overwrite input file."),Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:t(5056,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056","Cannot write file '{0}' because it would be overwritten by multiple input files."),Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:t(5057,e.DiagnosticCategory.Error,"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057","Cannot find a tsconfig.json file at the specified directory: '{0}'."),The_specified_path_does_not_exist_Colon_0:t(5058,e.DiagnosticCategory.Error,"The_specified_path_does_not_exist_Colon_0_5058","The specified path does not exist: '{0}'."),Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier:t(5059,e.DiagnosticCategory.Error,"Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059","Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."),Option_paths_cannot_be_used_without_specifying_baseUrl_option:t(5060,e.DiagnosticCategory.Error,"Option_paths_cannot_be_used_without_specifying_baseUrl_option_5060","Option 'paths' cannot be used without specifying '--baseUrl' option."),Pattern_0_can_have_at_most_one_Asterisk_character:t(5061,e.DiagnosticCategory.Error,"Pattern_0_can_have_at_most_one_Asterisk_character_5061","Pattern '{0}' can have at most one '*' character."),Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character:t(5062,e.DiagnosticCategory.Error,"Substitution_0_in_pattern_1_in_can_have_at_most_one_Asterisk_character_5062","Substitution '{0}' in pattern '{1}' in can have at most one '*' character."),Substitutions_for_pattern_0_should_be_an_array:t(5063,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_should_be_an_array_5063","Substitutions for pattern '{0}' should be an array."),Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2:t(5064,e.DiagnosticCategory.Error,"Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064","Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."),File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0:t(5065,e.DiagnosticCategory.Error,"File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065","File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."),Substitutions_for_pattern_0_shouldn_t_be_an_empty_array:t(5066,e.DiagnosticCategory.Error,"Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066","Substitutions for pattern '{0}' shouldn't be an empty array."),Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name:t(5067,e.DiagnosticCategory.Error,"Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067","Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."),Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig:t(5068,e.DiagnosticCategory.Error,"Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068","Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."),Option_0_cannot_be_specified_without_specifying_option_1_or_option_2:t(5069,e.DiagnosticCategory.Error,"Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069","Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."),Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy:t(5070,e.DiagnosticCategory.Error,"Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070","Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:t(5071,e.DiagnosticCategory.Error,"Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071","Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),Unknown_build_option_0:t(5072,e.DiagnosticCategory.Error,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:t(5073,e.DiagnosticCategory.Error,"Build_option_0_requires_a_value_of_type_1_5073","Build option '{0}' requires a value of type {1}."),Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified:t(5074,e.DiagnosticCategory.Error,"Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074","Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."),_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2:t(5075,e.DiagnosticCategory.Error,"_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075","'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),_0_and_1_operations_cannot_be_mixed_without_parentheses:t(5076,e.DiagnosticCategory.Error,"_0_and_1_operations_cannot_be_mixed_without_parentheses_5076","'{0}' and '{1}' operations cannot be mixed without parentheses."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:t(6e3,e.DiagnosticCategory.Message,"Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000","Generates a sourcemap for each corresponding '.d.ts' file."),Concatenate_and_emit_output_to_single_file:t(6001,e.DiagnosticCategory.Message,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:t(6002,e.DiagnosticCategory.Message,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:t(6003,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:t(6004,e.DiagnosticCategory.Message,"Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004","Specify the location where debugger should locate TypeScript files instead of source locations."),Watch_input_files:t(6005,e.DiagnosticCategory.Message,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:t(6006,e.DiagnosticCategory.Message,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:t(6007,e.DiagnosticCategory.Message,"Do_not_erase_const_enum_declarations_in_generated_code_6007","Do not erase const enum declarations in generated code."),Do_not_emit_outputs_if_any_errors_were_reported:t(6008,e.DiagnosticCategory.Message,"Do_not_emit_outputs_if_any_errors_were_reported_6008","Do not emit outputs if any errors were reported."),Do_not_emit_comments_to_output:t(6009,e.DiagnosticCategory.Message,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:t(6010,e.DiagnosticCategory.Message,"Do_not_emit_outputs_6010","Do not emit outputs."),Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:t(6011,e.DiagnosticCategory.Message,"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."),Skip_type_checking_of_declaration_files:t(6012,e.DiagnosticCategory.Message,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:t(6013,e.DiagnosticCategory.Message,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:t(6014,e.DiagnosticCategory.Message,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT:t(6015,e.DiagnosticCategory.Message,"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT_6015","Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'."),Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext:t(6016,e.DiagnosticCategory.Message,"Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext_6016","Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'."),Print_this_message:t(6017,e.DiagnosticCategory.Message,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:t(6019,e.DiagnosticCategory.Message,"Print_the_compiler_s_version_6019","Print the compiler's version."),Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json:t(6020,e.DiagnosticCategory.Message,"Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020","Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),Syntax_Colon_0:t(6023,e.DiagnosticCategory.Message,"Syntax_Colon_0_6023","Syntax: {0}"),options:t(6024,e.DiagnosticCategory.Message,"options_6024","options"),file:t(6025,e.DiagnosticCategory.Message,"file_6025","file"),Examples_Colon_0:t(6026,e.DiagnosticCategory.Message,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:t(6027,e.DiagnosticCategory.Message,"Options_Colon_6027","Options:"),Version_0:t(6029,e.DiagnosticCategory.Message,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:t(6030,e.DiagnosticCategory.Message,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:t(6031,e.DiagnosticCategory.Message,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:t(6032,e.DiagnosticCategory.Message,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:t(6034,e.DiagnosticCategory.Message,"KIND_6034","KIND"),FILE:t(6035,e.DiagnosticCategory.Message,"FILE_6035","FILE"),VERSION:t(6036,e.DiagnosticCategory.Message,"VERSION_6036","VERSION"),LOCATION:t(6037,e.DiagnosticCategory.Message,"LOCATION_6037","LOCATION"),DIRECTORY:t(6038,e.DiagnosticCategory.Message,"DIRECTORY_6038","DIRECTORY"),STRATEGY:t(6039,e.DiagnosticCategory.Message,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:t(6040,e.DiagnosticCategory.Message,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Generates_corresponding_map_file:t(6043,e.DiagnosticCategory.Message,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:t(6044,e.DiagnosticCategory.Error,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:t(6045,e.DiagnosticCategory.Error,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:t(6046,e.DiagnosticCategory.Error,"Argument_for_0_option_must_be_Colon_1_6046","Argument for '{0}' option must be: {1}."),Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:t(6048,e.DiagnosticCategory.Error,"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048","Locale must be of the form or -. For example '{0}' or '{1}'."),Unsupported_locale_0:t(6049,e.DiagnosticCategory.Error,"Unsupported_locale_0_6049","Unsupported locale '{0}'."),Unable_to_open_file_0:t(6050,e.DiagnosticCategory.Error,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:t(6051,e.DiagnosticCategory.Error,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:t(6052,e.DiagnosticCategory.Message,"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052","Raise error on expressions and declarations with an implied 'any' type."),File_0_not_found:t(6053,e.DiagnosticCategory.Error,"File_0_not_found_6053","File '{0}' not found."),File_0_has_unsupported_extension_The_only_supported_extensions_are_1:t(6054,e.DiagnosticCategory.Error,"File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054","File '{0}' has unsupported extension. The only supported extensions are {1}."),Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:t(6055,e.DiagnosticCategory.Message,"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055","Suppress noImplicitAny errors for indexing objects lacking index signatures."),Do_not_emit_declarations_for_code_that_has_an_internal_annotation:t(6056,e.DiagnosticCategory.Message,"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056","Do not emit declarations for code that has an '@internal' annotation."),Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:t(6058,e.DiagnosticCategory.Message,"Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058","Specify the root directory of input files. Use to control the output directory structure with --outDir."),File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:t(6059,e.DiagnosticCategory.Error,"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059","File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."),Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:t(6060,e.DiagnosticCategory.Message,"Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060","Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."),NEWLINE:t(6061,e.DiagnosticCategory.Message,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file:t(6064,e.DiagnosticCategory.Error,"Option_0_can_only_be_specified_in_tsconfig_json_file_6064","Option '{0}' can only be specified in 'tsconfig.json' file."),Enables_experimental_support_for_ES7_decorators:t(6065,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:t(6066,e.DiagnosticCategory.Message,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Enables_experimental_support_for_ES7_async_functions:t(6068,e.DiagnosticCategory.Message,"Enables_experimental_support_for_ES7_async_functions_6068","Enables experimental support for ES7 async functions."),Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6:t(6069,e.DiagnosticCategory.Message,"Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069","Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:t(6070,e.DiagnosticCategory.Message,"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070","Initializes a TypeScript project and creates a tsconfig.json file."),Successfully_created_a_tsconfig_json_file:t(6071,e.DiagnosticCategory.Message,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:t(6072,e.DiagnosticCategory.Message,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:t(6073,e.DiagnosticCategory.Message,"Stylize_errors_and_messages_using_color_and_context_experimental_6073","Stylize errors and messages using color and context (experimental)."),Do_not_report_errors_on_unused_labels:t(6074,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unused_labels_6074","Do not report errors on unused labels."),Report_error_when_not_all_code_paths_in_function_return_a_value:t(6075,e.DiagnosticCategory.Message,"Report_error_when_not_all_code_paths_in_function_return_a_value_6075","Report error when not all code paths in function return a value."),Report_errors_for_fallthrough_cases_in_switch_statement:t(6076,e.DiagnosticCategory.Message,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:t(6077,e.DiagnosticCategory.Message,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:t(6078,e.DiagnosticCategory.Message,"Disallow_inconsistently_cased_references_to_the_same_file_6078","Disallow inconsistently-cased references to the same file."),Specify_library_files_to_be_included_in_the_compilation:t(6079,e.DiagnosticCategory.Message,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation_Colon_preserve_react_native_or_react:t(6080,e.DiagnosticCategory.Message,"Specify_JSX_code_generation_Colon_preserve_react_native_or_react_6080","Specify JSX code generation: 'preserve', 'react-native', or 'react'."),File_0_has_an_unsupported_extension_so_skipping_it:t(6081,e.DiagnosticCategory.Message,"File_0_has_an_unsupported_extension_so_skipping_it_6081","File '{0}' has an unsupported extension, so skipping it."),Only_amd_and_system_modules_are_supported_alongside_0:t(6082,e.DiagnosticCategory.Error,"Only_amd_and_system_modules_are_supported_alongside_0_6082","Only 'amd' and 'system' modules are supported alongside --{0}."),Base_directory_to_resolve_non_absolute_module_names:t(6083,e.DiagnosticCategory.Message,"Base_directory_to_resolve_non_absolute_module_names_6083","Base directory to resolve non-absolute module names."),Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit:t(6084,e.DiagnosticCategory.Message,"Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084","[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"),Enable_tracing_of_the_name_resolution_process:t(6085,e.DiagnosticCategory.Message,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:t(6086,e.DiagnosticCategory.Message,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:t(6087,e.DiagnosticCategory.Message,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:t(6088,e.DiagnosticCategory.Message,"Module_resolution_kind_is_not_specified_using_0_6088","Module resolution kind is not specified, using '{0}'."),Module_name_0_was_successfully_resolved_to_1:t(6089,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:t(6090,e.DiagnosticCategory.Message,"Module_name_0_was_not_resolved_6090","======== Module name '{0}' was not resolved. ========"),paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0:t(6091,e.DiagnosticCategory.Message,"paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091","'paths' option is specified, looking for a pattern to match module name '{0}'."),Module_name_0_matched_pattern_1:t(6092,e.DiagnosticCategory.Message,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:t(6093,e.DiagnosticCategory.Message,"Trying_substitution_0_candidate_module_location_Colon_1_6093","Trying substitution '{0}', candidate module location: '{1}'."),Resolving_module_name_0_relative_to_base_url_1_2:t(6094,e.DiagnosticCategory.Message,"Resolving_module_name_0_relative_to_base_url_1_2_6094","Resolving module name '{0}' relative to base url '{1}' - '{2}'."),Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1:t(6095,e.DiagnosticCategory.Message,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1_6095","Loading module as file / folder, candidate module location '{0}', target file type '{1}'."),File_0_does_not_exist:t(6096,e.DiagnosticCategory.Message,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exist_use_it_as_a_name_resolution_result:t(6097,e.DiagnosticCategory.Message,"File_0_exist_use_it_as_a_name_resolution_result_6097","File '{0}' exist - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_type_1:t(6098,e.DiagnosticCategory.Message,"Loading_module_0_from_node_modules_folder_target_file_type_1_6098","Loading module '{0}' from 'node_modules' folder, target file type '{1}'."),Found_package_json_at_0:t(6099,e.DiagnosticCategory.Message,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:t(6100,e.DiagnosticCategory.Message,"package_json_does_not_have_a_0_field_6100","'package.json' does not have a '{0}' field."),package_json_has_0_field_1_that_references_2:t(6101,e.DiagnosticCategory.Message,"package_json_has_0_field_1_that_references_2_6101","'package.json' has '{0}' field '{1}' that references '{2}'."),Allow_javascript_files_to_be_compiled:t(6102,e.DiagnosticCategory.Message,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Option_0_should_have_array_of_strings_as_a_value:t(6103,e.DiagnosticCategory.Error,"Option_0_should_have_array_of_strings_as_a_value_6103","Option '{0}' should have array of strings as a value."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:t(6104,e.DiagnosticCategory.Message,"Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104","Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),Expected_type_of_0_field_in_package_json_to_be_1_got_2:t(6105,e.DiagnosticCategory.Message,"Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105","Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1:t(6106,e.DiagnosticCategory.Message,"baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106","'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0:t(6107,e.DiagnosticCategory.Message,"rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107","'rootDirs' option is set, using it to resolve relative module name '{0}'."),Longest_matching_prefix_for_0_is_1:t(6108,e.DiagnosticCategory.Message,"Longest_matching_prefix_for_0_is_1_6108","Longest matching prefix for '{0}' is '{1}'."),Loading_0_from_the_root_dir_1_candidate_location_2:t(6109,e.DiagnosticCategory.Message,"Loading_0_from_the_root_dir_1_candidate_location_2_6109","Loading '{0}' from the root dir '{1}', candidate location '{2}'."),Trying_other_entries_in_rootDirs:t(6110,e.DiagnosticCategory.Message,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:t(6111,e.DiagnosticCategory.Message,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:t(6112,e.DiagnosticCategory.Message,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:t(6113,e.DiagnosticCategory.Message,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:t(6114,e.DiagnosticCategory.Error,"Unknown_option_excludes_Did_you_mean_exclude_6114","Unknown option 'excludes'. Did you mean 'exclude'?"),Raise_error_on_this_expressions_with_an_implied_any_type:t(6115,e.DiagnosticCategory.Message,"Raise_error_on_this_expressions_with_an_implied_any_type_6115","Raise error on 'this' expressions with an implied 'any' type."),Resolving_type_reference_directive_0_containing_file_1_root_directory_2:t(6116,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Resolving_using_primary_search_paths:t(6117,e.DiagnosticCategory.Message,"Resolving_using_primary_search_paths_6117","Resolving using primary search paths..."),Resolving_from_node_modules_folder:t(6118,e.DiagnosticCategory.Message,"Resolving_from_node_modules_folder_6118","Resolving from node_modules folder..."),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:t(6119,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119","======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),Type_reference_directive_0_was_not_resolved:t(6120,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:t(6121,e.DiagnosticCategory.Message,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:t(6122,e.DiagnosticCategory.Message,"Root_directory_cannot_be_determined_skipping_primary_search_paths_6122","Root directory cannot be determined, skipping primary search paths."),Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set:t(6123,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123","======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"),Type_declaration_files_to_be_included_in_compilation:t(6124,e.DiagnosticCategory.Message,"Type_declaration_files_to_be_included_in_compilation_6124","Type declaration files to be included in compilation."),Looking_up_in_node_modules_folder_initial_location_0:t(6125,e.DiagnosticCategory.Message,"Looking_up_in_node_modules_folder_initial_location_0_6125","Looking up in 'node_modules' folder, initial location '{0}'."),Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder:t(6126,e.DiagnosticCategory.Message,"Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126","Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1:t(6127,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127","======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"),Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set:t(6128,e.DiagnosticCategory.Message,"Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128","======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"),Resolving_real_path_for_0_result_1:t(6130,e.DiagnosticCategory.Message,"Resolving_real_path_for_0_result_1_6130","Resolving real path for '{0}', result '{1}'."),Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system:t(6131,e.DiagnosticCategory.Error,"Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131","Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."),File_name_0_has_a_1_extension_stripping_it:t(6132,e.DiagnosticCategory.Message,"File_name_0_has_a_1_extension_stripping_it_6132","File name '{0}' has a '{1}' extension - stripping it."),_0_is_declared_but_its_value_is_never_read:t(6133,e.DiagnosticCategory.Error,"_0_is_declared_but_its_value_is_never_read_6133","'{0}' is declared but its value is never read.",!0),Report_errors_on_unused_locals:t(6134,e.DiagnosticCategory.Message,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:t(6135,e.DiagnosticCategory.Message,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:t(6136,e.DiagnosticCategory.Message,"The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136","The maximum dependency depth to search under node_modules and load JavaScript files."),Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1:t(6137,e.DiagnosticCategory.Error,"Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137","Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."),Property_0_is_declared_but_its_value_is_never_read:t(6138,e.DiagnosticCategory.Error,"Property_0_is_declared_but_its_value_is_never_read_6138","Property '{0}' is declared but its value is never read.",!0),Import_emit_helpers_from_tslib:t(6139,e.DiagnosticCategory.Message,"Import_emit_helpers_from_tslib_6139","Import emit helpers from 'tslib'."),Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2:t(6140,e.DiagnosticCategory.Error,"Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140","Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."),Parse_in_strict_mode_and_emit_use_strict_for_each_source_file:t(6141,e.DiagnosticCategory.Message,"Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141",'Parse in strict mode and emit "use strict" for each source file.'),Module_0_was_resolved_to_1_but_jsx_is_not_set:t(6142,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_jsx_is_not_set_6142","Module '{0}' was resolved to '{1}', but '--jsx' is not set."),Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1:t(6144,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144","Module '{0}' was resolved as locally declared ambient module in file '{1}'."),Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified:t(6145,e.DiagnosticCategory.Message,"Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145","Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."),Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h:t(6146,e.DiagnosticCategory.Message,"Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146","Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."),Resolution_for_module_0_was_found_in_cache_from_location_1:t(6147,e.DiagnosticCategory.Message,"Resolution_for_module_0_was_found_in_cache_from_location_1_6147","Resolution for module '{0}' was found in cache from location '{1}'."),Directory_0_does_not_exist_skipping_all_lookups_in_it:t(6148,e.DiagnosticCategory.Message,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:t(6149,e.DiagnosticCategory.Message,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:t(6150,e.DiagnosticCategory.Message,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:t(6151,e.DiagnosticCategory.Message,"Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151","Emit a single file with source maps instead of having a separate file."),Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set:t(6152,e.DiagnosticCategory.Message,"Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152","Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."),Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule:t(6153,e.DiagnosticCategory.Message,"Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153","Transpile each file as a separate module (similar to 'ts.transpileModule')."),Print_names_of_generated_files_part_of_the_compilation:t(6154,e.DiagnosticCategory.Message,"Print_names_of_generated_files_part_of_the_compilation_6154","Print names of generated files part of the compilation."),Print_names_of_files_part_of_the_compilation:t(6155,e.DiagnosticCategory.Message,"Print_names_of_files_part_of_the_compilation_6155","Print names of files part of the compilation."),The_locale_used_when_displaying_messages_to_the_user_e_g_en_us:t(6156,e.DiagnosticCategory.Message,"The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156","The locale used when displaying messages to the user (e.g. 'en-us')"),Do_not_generate_custom_helper_functions_like_extends_in_compiled_output:t(6157,e.DiagnosticCategory.Message,"Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157","Do not generate custom helper functions like '__extends' in compiled output."),Do_not_include_the_default_library_file_lib_d_ts:t(6158,e.DiagnosticCategory.Message,"Do_not_include_the_default_library_file_lib_d_ts_6158","Do not include the default library file (lib.d.ts)."),Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files:t(6159,e.DiagnosticCategory.Message,"Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159","Do not add triple-slash references or imported modules to the list of compiled files."),Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files:t(6160,e.DiagnosticCategory.Message,"Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160","[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."),List_of_folders_to_include_type_definitions_from:t(6161,e.DiagnosticCategory.Message,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:t(6162,e.DiagnosticCategory.Message,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:t(6163,e.DiagnosticCategory.Message,"The_character_set_of_the_input_files_6163","The character set of the input files."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:t(6164,e.DiagnosticCategory.Message,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Do_not_truncate_error_messages:t(6165,e.DiagnosticCategory.Message,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:t(6166,e.DiagnosticCategory.Message,"Output_directory_for_generated_declaration_files_6166","Output directory for generated declaration files."),A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl:t(6167,e.DiagnosticCategory.Message,"A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167","A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime:t(6168,e.DiagnosticCategory.Message,"List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168","List of root folders whose combined content represents the structure of the project at runtime."),Show_all_compiler_options:t(6169,e.DiagnosticCategory.Message,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:t(6170,e.DiagnosticCategory.Message,"Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170","[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),Command_line_Options:t(6171,e.DiagnosticCategory.Message,"Command_line_Options_6171","Command-line Options"),Basic_Options:t(6172,e.DiagnosticCategory.Message,"Basic_Options_6172","Basic Options"),Strict_Type_Checking_Options:t(6173,e.DiagnosticCategory.Message,"Strict_Type_Checking_Options_6173","Strict Type-Checking Options"),Module_Resolution_Options:t(6174,e.DiagnosticCategory.Message,"Module_Resolution_Options_6174","Module Resolution Options"),Source_Map_Options:t(6175,e.DiagnosticCategory.Message,"Source_Map_Options_6175","Source Map Options"),Additional_Checks:t(6176,e.DiagnosticCategory.Message,"Additional_Checks_6176","Additional Checks"),Experimental_Options:t(6177,e.DiagnosticCategory.Message,"Experimental_Options_6177","Experimental Options"),Advanced_Options:t(6178,e.DiagnosticCategory.Message,"Advanced_Options_6178","Advanced Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:t(6179,e.DiagnosticCategory.Message,"Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179","Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),Enable_all_strict_type_checking_options:t(6180,e.DiagnosticCategory.Message,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),List_of_language_service_plugins:t(6181,e.DiagnosticCategory.Message,"List_of_language_service_plugins_6181","List of language service plugins."),Scoped_package_detected_looking_in_0:t(6182,e.DiagnosticCategory.Message,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_to_file_1_from_old_program:t(6183,e.DiagnosticCategory.Message,"Reusing_resolution_of_module_0_to_file_1_from_old_program_6183","Reusing resolution of module '{0}' to file '{1}' from old program."),Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program:t(6184,e.DiagnosticCategory.Message,"Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184","Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."),Disable_strict_checking_of_generic_signatures_in_function_types:t(6185,e.DiagnosticCategory.Message,"Disable_strict_checking_of_generic_signatures_in_function_types_6185","Disable strict checking of generic signatures in function types."),Enable_strict_checking_of_function_types:t(6186,e.DiagnosticCategory.Message,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:t(6187,e.DiagnosticCategory.Message,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:t(6188,e.DiagnosticCategory.Error,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:t(6189,e.DiagnosticCategory.Error,"Multiple_consecutive_numeric_separators_are_not_permitted_6189","Multiple consecutive numeric separators are not permitted."),Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen:t(6191,e.DiagnosticCategory.Message,"Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191","Whether to keep outdated console output in watch mode instead of clearing the screen."),All_imports_in_import_declaration_are_unused:t(6192,e.DiagnosticCategory.Error,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:t(6193,e.DiagnosticCategory.Message,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:t(6194,e.DiagnosticCategory.Message,"Found_0_errors_Watching_for_file_changes_6194","Found {0} errors. Watching for file changes."),Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols:t(6195,e.DiagnosticCategory.Message,"Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195","Resolve 'keyof' to string valued property names only (no numbers or symbols)."),_0_is_declared_but_never_used:t(6196,e.DiagnosticCategory.Error,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:t(6197,e.DiagnosticCategory.Message,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:t(6198,e.DiagnosticCategory.Error,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:t(6199,e.DiagnosticCategory.Error,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:t(6200,e.DiagnosticCategory.Error,"Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200","Definitions of the following identifiers conflict with those in another file: {0}"),Conflicts_are_in_this_file:t(6201,e.DiagnosticCategory.Message,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:t(6202,e.DiagnosticCategory.Error,"Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202","Project references may not form a circular graph. Cycle detected: {0}"),_0_was_also_declared_here:t(6203,e.DiagnosticCategory.Message,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:t(6204,e.DiagnosticCategory.Message,"and_here_6204","and here."),All_type_parameters_are_unused:t(6205,e.DiagnosticCategory.Error,"All_type_parameters_are_unused_6205","All type parameters are unused"),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:t(6206,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206","'package.json' has a 'typesVersions' field with version-specific path mappings."),package_json_does_not_have_a_typesVersions_entry_that_matches_version_0:t(6207,e.DiagnosticCategory.Message,"package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207","'package.json' does not have a 'typesVersions' entry that matches version '{0}'."),package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2:t(6208,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208","'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."),package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range:t(6209,e.DiagnosticCategory.Message,"package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209","'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."),An_argument_for_0_was_not_provided:t(6210,e.DiagnosticCategory.Message,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:t(6211,e.DiagnosticCategory.Message,"An_argument_matching_this_binding_pattern_was_not_provided_6211","An argument matching this binding pattern was not provided."),Did_you_mean_to_call_this_expression:t(6212,e.DiagnosticCategory.Message,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:t(6213,e.DiagnosticCategory.Message,"Did_you_mean_to_use_new_with_this_expression_6213","Did you mean to use 'new' with this expression?"),Enable_strict_bind_call_and_apply_methods_on_functions:t(6214,e.DiagnosticCategory.Message,"Enable_strict_bind_call_and_apply_methods_on_functions_6214","Enable strict 'bind', 'call', and 'apply' methods on functions."),Using_compiler_options_of_project_reference_redirect_0:t(6215,e.DiagnosticCategory.Message,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:t(6216,e.DiagnosticCategory.Message,"Found_1_error_6216","Found 1 error."),Found_0_errors:t(6217,e.DiagnosticCategory.Message,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:t(6218,e.DiagnosticCategory.Message,"Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218","======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3:t(6219,e.DiagnosticCategory.Message,"Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219","======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"),package_json_had_a_falsy_0_field:t(6220,e.DiagnosticCategory.Message,"package_json_had_a_falsy_0_field_6220","'package.json' had a falsy '{0}' field."),Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects:t(6221,e.DiagnosticCategory.Message,"Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221","Disable use of source files instead of declaration files from referenced projects."),Emit_class_fields_with_Define_instead_of_Set:t(6222,e.DiagnosticCategory.Message,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:t(6223,e.DiagnosticCategory.Message,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Projects_to_reference:t(6300,e.DiagnosticCategory.Message,"Projects_to_reference_6300","Projects to reference"),Enable_project_compilation:t(6302,e.DiagnosticCategory.Message,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:t(6304,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_declaration_emit_6304","Composite projects may not disable declaration emit."),Output_file_0_has_not_been_built_from_source_file_1:t(6305,e.DiagnosticCategory.Error,"Output_file_0_has_not_been_built_from_source_file_1_6305","Output file '{0}' has not been built from source file '{1}'."),Referenced_project_0_must_have_setting_composite_Colon_true:t(6306,e.DiagnosticCategory.Error,"Referenced_project_0_must_have_setting_composite_Colon_true_6306","Referenced project '{0}' must have setting \"composite\": true."),File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern:t(6307,e.DiagnosticCategory.Error,"File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307","File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."),Cannot_prepend_project_0_because_it_does_not_have_outFile_set:t(6308,e.DiagnosticCategory.Error,"Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308","Cannot prepend project '{0}' because it does not have 'outFile' set"),Output_file_0_from_project_1_does_not_exist:t(6309,e.DiagnosticCategory.Error,"Output_file_0_from_project_1_does_not_exist_6309","Output file '{0}' from project '{1}' does not exist"),Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2:t(6350,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2_6350","Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2:t(6351,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_oldest_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:t(6352,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352","Project '{0}' is out of date because output file '{1}' does not exist"),Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date:t(6353,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353","Project '{0}' is out of date because its dependency '{1}' is out of date"),Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies:t(6354,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354","Project '{0}' is up to date with .d.ts files from its dependencies"),Projects_in_this_build_Colon_0:t(6355,e.DiagnosticCategory.Message,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:t(6356,e.DiagnosticCategory.Message,"A_non_dry_build_would_delete_the_following_files_Colon_0_6356","A non-dry build would delete the following files: {0}"),A_non_dry_build_would_build_project_0:t(6357,e.DiagnosticCategory.Message,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:t(6358,e.DiagnosticCategory.Message,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:t(6359,e.DiagnosticCategory.Message,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),delete_this_Project_0_is_up_to_date_because_it_was_previously_built:t(6360,e.DiagnosticCategory.Message,"delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360","delete this - Project '{0}' is up to date because it was previously built"),Project_0_is_up_to_date:t(6361,e.DiagnosticCategory.Message,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:t(6362,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362","Skipping build of project '{0}' because its dependency '{1}' has errors"),Project_0_can_t_be_built_because_its_dependency_1_has_errors:t(6363,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363","Project '{0}' can't be built because its dependency '{1}' has errors"),Build_one_or_more_projects_and_their_dependencies_if_out_of_date:t(6364,e.DiagnosticCategory.Message,"Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364","Build one or more projects and their dependencies, if out of date"),Delete_the_outputs_of_all_projects:t(6365,e.DiagnosticCategory.Message,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects"),Enable_verbose_logging:t(6366,e.DiagnosticCategory.Message,"Enable_verbose_logging_6366","Enable verbose logging"),Show_what_would_be_built_or_deleted_if_specified_with_clean:t(6367,e.DiagnosticCategory.Message,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Build_all_projects_including_those_that_appear_to_be_up_to_date:t(6368,e.DiagnosticCategory.Message,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6368","Build all projects, including those that appear to be up to date"),Option_build_must_be_the_first_command_line_argument:t(6369,e.DiagnosticCategory.Error,"Option_build_must_be_the_first_command_line_argument_6369","Option '--build' must be the first command line argument."),Options_0_and_1_cannot_be_combined:t(6370,e.DiagnosticCategory.Error,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:t(6371,e.DiagnosticCategory.Message,"Updating_unchanged_output_timestamps_of_project_0_6371","Updating unchanged output timestamps of project '{0}'..."),Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed:t(6372,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372","Project '{0}' is out of date because output of its dependency '{1}' has changed"),Updating_output_of_project_0:t(6373,e.DiagnosticCategory.Message,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:t(6374,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374","A non-dry build would update timestamps for output of project '{0}'"),A_non_dry_build_would_update_output_of_project_0:t(6375,e.DiagnosticCategory.Message,"A_non_dry_build_would_update_output_of_project_0_6375","A non-dry build would update output of project '{0}'"),Cannot_update_output_of_project_0_because_there_was_error_reading_file_1:t(6376,e.DiagnosticCategory.Message,"Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376","Cannot update output of project '{0}' because there was error reading file '{1}'"),Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1:t(6377,e.DiagnosticCategory.Error,"Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377","Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"),Enable_incremental_compilation:t(6378,e.DiagnosticCategory.Message,"Enable_incremental_compilation_6378","Enable incremental compilation"),Composite_projects_may_not_disable_incremental_compilation:t(6379,e.DiagnosticCategory.Error,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:t(6380,e.DiagnosticCategory.Message,"Specify_file_to_store_incremental_compilation_information_6380","Specify file to store incremental compilation information"),Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2:t(6381,e.DiagnosticCategory.Message,"Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381","Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"),Skipping_build_of_project_0_because_its_dependency_1_was_not_built:t(6382,e.DiagnosticCategory.Message,"Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382","Skipping build of project '{0}' because its dependency '{1}' was not built"),Project_0_can_t_be_built_because_its_dependency_1_was_not_built:t(6383,e.DiagnosticCategory.Message,"Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383","Project '{0}' can't be built because its dependency '{1}' was not built"),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:t(6500,e.DiagnosticCategory.Message,"The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500","The expected type comes from property '{0}' which is declared here on type '{1}'"),The_expected_type_comes_from_this_index_signature:t(6501,e.DiagnosticCategory.Message,"The_expected_type_comes_from_this_index_signature_6501","The expected type comes from this index signature."),The_expected_type_comes_from_the_return_type_of_this_signature:t(6502,e.DiagnosticCategory.Message,"The_expected_type_comes_from_the_return_type_of_this_signature_6502","The expected type comes from the return type of this signature."),Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing:t(6503,e.DiagnosticCategory.Message,"Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503","Print names of files that are part of the compilation and then stop processing."),Variable_0_implicitly_has_an_1_type:t(7005,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:t(7006,e.DiagnosticCategory.Error,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:t(7008,e.DiagnosticCategory.Error,"Member_0_implicitly_has_an_1_type_7008","Member '{0}' implicitly has an '{1}' type."),new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:t(7009,e.DiagnosticCategory.Error,"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009","'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:t(7010,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010","'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."),Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7011,e.DiagnosticCategory.Error,"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011","Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7013,e.DiagnosticCategory.Error,"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013","Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."),Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:t(7014,e.DiagnosticCategory.Error,"Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014","Function type, which lacks return-type annotation, implicitly has an '{0}' return type."),Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:t(7015,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015","Element implicitly has an 'any' type because index expression is not of type 'number'."),Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type:t(7016,e.DiagnosticCategory.Error,"Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016","Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature:t(7017,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017","Element implicitly has an 'any' type because type '{0}' has no index signature."),Object_literal_s_property_0_implicitly_has_an_1_type:t(7018,e.DiagnosticCategory.Error,"Object_literal_s_property_0_implicitly_has_an_1_type_7018","Object literal's property '{0}' implicitly has an '{1}' type."),Rest_parameter_0_implicitly_has_an_any_type:t(7019,e.DiagnosticCategory.Error,"Rest_parameter_0_implicitly_has_an_any_type_7019","Rest parameter '{0}' implicitly has an 'any[]' type."),Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:t(7020,e.DiagnosticCategory.Error,"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020","Call signature, which lacks return-type annotation, implicitly has an 'any' return type."),_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:t(7022,e.DiagnosticCategory.Error,"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022","'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."),_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7023,e.DiagnosticCategory.Error,"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023","'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:t(7024,e.DiagnosticCategory.Error,"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024","Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."),Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:t(7025,e.DiagnosticCategory.Error,"Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025","Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."),JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:t(7026,e.DiagnosticCategory.Error,"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026","JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."),Unreachable_code_detected:t(7027,e.DiagnosticCategory.Error,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:t(7028,e.DiagnosticCategory.Error,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:t(7029,e.DiagnosticCategory.Error,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:t(7030,e.DiagnosticCategory.Error,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:t(7031,e.DiagnosticCategory.Error,"Binding_element_0_implicitly_has_an_1_type_7031","Binding element '{0}' implicitly has an '{1}' type."),Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation:t(7032,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032","Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."),Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation:t(7033,e.DiagnosticCategory.Error,"Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033","Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."),Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined:t(7034,e.DiagnosticCategory.Error,"Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034","Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."),Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0:t(7035,e.DiagnosticCategory.Error,"Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_mod_7035","Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"),Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0:t(7036,e.DiagnosticCategory.Error,"Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036","Dynamic import's specifier must be of type 'string', but here has type '{0}'."),Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports:t(7037,e.DiagnosticCategory.Message,"Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037","Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead:t(7038,e.DiagnosticCategory.Message,"Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038","Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),Mapped_object_type_implicitly_has_an_any_template_type:t(7039,e.DiagnosticCategory.Error,"Mapped_object_type_implicitly_has_an_any_template_type_7039","Mapped object type implicitly has an 'any' template type."),If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1:t(7040,e.DiagnosticCategory.Error,"If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040","If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`"),The_containing_arrow_function_captures_the_global_value_of_this:t(7041,e.DiagnosticCategory.Error,"The_containing_arrow_function_captures_the_global_value_of_this_7041","The containing arrow function captures the global value of 'this'."),Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used:t(7042,e.DiagnosticCategory.Error,"Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042","Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7043,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043","Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7044,e.DiagnosticCategory.Suggestion,"Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044","Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage:t(7045,e.DiagnosticCategory.Suggestion,"Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045","Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage:t(7046,e.DiagnosticCategory.Suggestion,"Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046","Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."),Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:t(7047,e.DiagnosticCategory.Suggestion,"Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047","Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage:t(7048,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048","Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."),Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage:t(7049,e.DiagnosticCategory.Suggestion,"Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049","Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."),_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage:t(7050,e.DiagnosticCategory.Suggestion,"_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050","'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."),Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1:t(7051,e.DiagnosticCategory.Error,"Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051","Parameter has a name but no type. Did you mean '{0}: {1}'?"),Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1:t(7052,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052","Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}' ?"),Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1:t(7053,e.DiagnosticCategory.Error,"Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053","Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."),No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1:t(7054,e.DiagnosticCategory.Error,"No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054","No index signature with a parameter of type '{0}' was found on type '{1}'."),_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:t(7055,e.DiagnosticCategory.Error,"_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055","'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),You_cannot_rename_this_element:t(8e3,e.DiagnosticCategory.Error,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:t(8001,e.DiagnosticCategory.Error,"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001","You cannot rename elements that are defined in the standard TypeScript library."),import_can_only_be_used_in_a_ts_file:t(8002,e.DiagnosticCategory.Error,"import_can_only_be_used_in_a_ts_file_8002","'import ... =' can only be used in a .ts file."),export_can_only_be_used_in_a_ts_file:t(8003,e.DiagnosticCategory.Error,"export_can_only_be_used_in_a_ts_file_8003","'export=' can only be used in a .ts file."),type_parameter_declarations_can_only_be_used_in_a_ts_file:t(8004,e.DiagnosticCategory.Error,"type_parameter_declarations_can_only_be_used_in_a_ts_file_8004","'type parameter declarations' can only be used in a .ts file."),implements_clauses_can_only_be_used_in_a_ts_file:t(8005,e.DiagnosticCategory.Error,"implements_clauses_can_only_be_used_in_a_ts_file_8005","'implements clauses' can only be used in a .ts file."),interface_declarations_can_only_be_used_in_a_ts_file:t(8006,e.DiagnosticCategory.Error,"interface_declarations_can_only_be_used_in_a_ts_file_8006","'interface declarations' can only be used in a .ts file."),module_declarations_can_only_be_used_in_a_ts_file:t(8007,e.DiagnosticCategory.Error,"module_declarations_can_only_be_used_in_a_ts_file_8007","'module declarations' can only be used in a .ts file."),type_aliases_can_only_be_used_in_a_ts_file:t(8008,e.DiagnosticCategory.Error,"type_aliases_can_only_be_used_in_a_ts_file_8008","'type aliases' can only be used in a .ts file."),_0_can_only_be_used_in_a_ts_file:t(8009,e.DiagnosticCategory.Error,"_0_can_only_be_used_in_a_ts_file_8009","'{0}' can only be used in a .ts file."),types_can_only_be_used_in_a_ts_file:t(8010,e.DiagnosticCategory.Error,"types_can_only_be_used_in_a_ts_file_8010","'types' can only be used in a .ts file."),type_arguments_can_only_be_used_in_a_ts_file:t(8011,e.DiagnosticCategory.Error,"type_arguments_can_only_be_used_in_a_ts_file_8011","'type arguments' can only be used in a .ts file."),parameter_modifiers_can_only_be_used_in_a_ts_file:t(8012,e.DiagnosticCategory.Error,"parameter_modifiers_can_only_be_used_in_a_ts_file_8012","'parameter modifiers' can only be used in a .ts file."),non_null_assertions_can_only_be_used_in_a_ts_file:t(8013,e.DiagnosticCategory.Error,"non_null_assertions_can_only_be_used_in_a_ts_file_8013","'non-null assertions' can only be used in a .ts file."),enum_declarations_can_only_be_used_in_a_ts_file:t(8015,e.DiagnosticCategory.Error,"enum_declarations_can_only_be_used_in_a_ts_file_8015","'enum declarations' can only be used in a .ts file."),type_assertion_expressions_can_only_be_used_in_a_ts_file:t(8016,e.DiagnosticCategory.Error,"type_assertion_expressions_can_only_be_used_in_a_ts_file_8016","'type assertion expressions' can only be used in a .ts file."),Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:t(8017,e.DiagnosticCategory.Error,"Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017","Octal literal types must use ES2015 syntax. Use the syntax '{0}'."),Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0:t(8018,e.DiagnosticCategory.Error,"Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018","Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."),Report_errors_in_js_files:t(8019,e.DiagnosticCategory.Message,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:t(8020,e.DiagnosticCategory.Error,"JSDoc_types_can_only_be_used_inside_documentation_comments_8020","JSDoc types can only be used inside documentation comments."),JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags:t(8021,e.DiagnosticCategory.Error,"JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021","JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),JSDoc_0_is_not_attached_to_a_class:t(8022,e.DiagnosticCategory.Error,"JSDoc_0_is_not_attached_to_a_class_8022","JSDoc '@{0}' is not attached to a class."),JSDoc_0_1_does_not_match_the_extends_2_clause:t(8023,e.DiagnosticCategory.Error,"JSDoc_0_1_does_not_match_the_extends_2_clause_8023","JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name:t(8024,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024","JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),Class_declarations_cannot_have_more_than_one_augments_or_extends_tag:t(8025,e.DiagnosticCategory.Error,"Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025","Class declarations cannot have more than one `@augments` or `@extends` tag."),Expected_0_type_arguments_provide_these_with_an_extends_tag:t(8026,e.DiagnosticCategory.Error,"Expected_0_type_arguments_provide_these_with_an_extends_tag_8026","Expected {0} type arguments; provide these with an '@extends' tag."),Expected_0_1_type_arguments_provide_these_with_an_extends_tag:t(8027,e.DiagnosticCategory.Error,"Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027","Expected {0}-{1} type arguments; provide these with an '@extends' tag."),JSDoc_may_only_appear_in_the_last_parameter_of_a_signature:t(8028,e.DiagnosticCategory.Error,"JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028","JSDoc '...' may only appear in the last parameter of a signature."),JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type:t(8029,e.DiagnosticCategory.Error,"JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029","JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."),The_type_of_a_function_declaration_must_match_the_function_s_signature:t(8030,e.DiagnosticCategory.Error,"The_type_of_a_function_declaration_must_match_the_function_s_signature_8030","The type of a function declaration must match the function's signature."),You_cannot_rename_a_module_via_a_global_import:t(8031,e.DiagnosticCategory.Error,"You_cannot_rename_a_module_via_a_global_import_8031","You cannot rename a module via a global import."),Qualified_name_0_is_not_allowed_without_a_leading_param_object_1:t(8032,e.DiagnosticCategory.Error,"Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032","Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause:t(9002,e.DiagnosticCategory.Error,"Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002","Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."),class_expressions_are_not_currently_supported:t(9003,e.DiagnosticCategory.Error,"class_expressions_are_not_currently_supported_9003","'class' expressions are not currently supported."),Language_service_is_disabled:t(9004,e.DiagnosticCategory.Error,"Language_service_is_disabled_9004","Language service is disabled."),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:t(9005,e.DiagnosticCategory.Error,"Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005","Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit:t(9006,e.DiagnosticCategory.Error,"Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006","Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),JSX_attributes_must_only_be_assigned_a_non_empty_expression:t(17e3,e.DiagnosticCategory.Error,"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000","JSX attributes must only be assigned a non-empty 'expression'."),JSX_elements_cannot_have_multiple_attributes_with_the_same_name:t(17001,e.DiagnosticCategory.Error,"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001","JSX elements cannot have multiple attributes with the same name."),Expected_corresponding_JSX_closing_tag_for_0:t(17002,e.DiagnosticCategory.Error,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),JSX_attribute_expected:t(17003,e.DiagnosticCategory.Error,"JSX_attribute_expected_17003","JSX attribute expected."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:t(17004,e.DiagnosticCategory.Error,"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004","Cannot use JSX unless the '--jsx' flag is provided."),A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:t(17005,e.DiagnosticCategory.Error,"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005","A constructor cannot contain a 'super' call when its class extends 'null'."),An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17006,e.DiagnosticCategory.Error,"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006","An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:t(17007,e.DiagnosticCategory.Error,"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007","A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),JSX_element_0_has_no_corresponding_closing_tag:t(17008,e.DiagnosticCategory.Error,"JSX_element_0_has_no_corresponding_closing_tag_17008","JSX element '{0}' has no corresponding closing tag."),super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:t(17009,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009","'super' must be called before accessing 'this' in the constructor of a derived class."),Unknown_type_acquisition_option_0:t(17010,e.DiagnosticCategory.Error,"Unknown_type_acquisition_option_0_17010","Unknown type acquisition option '{0}'."),super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class:t(17011,e.DiagnosticCategory.Error,"super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011","'super' must be called before accessing a property of 'super' in the constructor of a derived class."),_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2:t(17012,e.DiagnosticCategory.Error,"_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012","'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"),Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor:t(17013,e.DiagnosticCategory.Error,"Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013","Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."),JSX_fragment_has_no_corresponding_closing_tag:t(17014,e.DiagnosticCategory.Error,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:t(17015,e.DiagnosticCategory.Error,"Expected_corresponding_closing_tag_for_JSX_fragment_17015","Expected corresponding closing tag for JSX fragment."),JSX_fragment_is_not_supported_when_using_jsxFactory:t(17016,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_jsxFactory_17016","JSX fragment is not supported when using --jsxFactory"),JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma:t(17017,e.DiagnosticCategory.Error,"JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma_17017","JSX fragment is not supported when using an inline JSX factory pragma"),Circularity_detected_while_resolving_configuration_Colon_0:t(18e3,e.DiagnosticCategory.Error,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not:t(18001,e.DiagnosticCategory.Error,"A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001","A path in an 'extends' option must be relative or rooted, but '{0}' is not."),The_files_list_in_config_file_0_is_empty:t(18002,e.DiagnosticCategory.Error,"The_files_list_in_config_file_0_is_empty_18002","The 'files' list in config file '{0}' is empty."),No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2:t(18003,e.DiagnosticCategory.Error,"No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003","No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module:t(80001,e.DiagnosticCategory.Suggestion,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001","File is a CommonJS module; it may be converted to an ES6 module."),This_constructor_function_may_be_converted_to_a_class_declaration:t(80002,e.DiagnosticCategory.Suggestion,"This_constructor_function_may_be_converted_to_a_class_declaration_80002","This constructor function may be converted to a class declaration."),Import_may_be_converted_to_a_default_import:t(80003,e.DiagnosticCategory.Suggestion,"Import_may_be_converted_to_a_default_import_80003","Import may be converted to a default import."),JSDoc_types_may_be_moved_to_TypeScript_types:t(80004,e.DiagnosticCategory.Suggestion,"JSDoc_types_may_be_moved_to_TypeScript_types_80004","JSDoc types may be moved to TypeScript types."),require_call_may_be_converted_to_an_import:t(80005,e.DiagnosticCategory.Suggestion,"require_call_may_be_converted_to_an_import_80005","'require' call may be converted to an import."),This_may_be_converted_to_an_async_function:t(80006,e.DiagnosticCategory.Suggestion,"This_may_be_converted_to_an_async_function_80006","This may be converted to an async function."),await_has_no_effect_on_the_type_of_this_expression:t(80007,e.DiagnosticCategory.Suggestion,"await_has_no_effect_on_the_type_of_this_expression_80007","'await' has no effect on the type of this expression."),Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers:t(80008,e.DiagnosticCategory.Suggestion,"Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008","Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."),Add_missing_super_call:t(90001,e.DiagnosticCategory.Message,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:t(90002,e.DiagnosticCategory.Message,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:t(90003,e.DiagnosticCategory.Message,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_declaration_for_Colon_0:t(90004,e.DiagnosticCategory.Message,"Remove_declaration_for_Colon_0_90004","Remove declaration for: '{0}'"),Remove_import_from_0:t(90005,e.DiagnosticCategory.Message,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:t(90006,e.DiagnosticCategory.Message,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:t(90007,e.DiagnosticCategory.Message,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:t(90008,e.DiagnosticCategory.Message,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_destructuring:t(90009,e.DiagnosticCategory.Message,"Remove_destructuring_90009","Remove destructuring"),Remove_variable_statement:t(90010,e.DiagnosticCategory.Message,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:t(90011,e.DiagnosticCategory.Message,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:t(90012,e.DiagnosticCategory.Message,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_module_1:t(90013,e.DiagnosticCategory.Message,"Import_0_from_module_1_90013","Import '{0}' from module \"{1}\""),Change_0_to_1:t(90014,e.DiagnosticCategory.Message,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Add_0_to_existing_import_declaration_from_1:t(90015,e.DiagnosticCategory.Message,"Add_0_to_existing_import_declaration_from_1_90015","Add '{0}' to existing import declaration from \"{1}\""),Declare_property_0:t(90016,e.DiagnosticCategory.Message,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:t(90017,e.DiagnosticCategory.Message,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:t(90018,e.DiagnosticCategory.Message,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:t(90019,e.DiagnosticCategory.Message,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:t(90020,e.DiagnosticCategory.Message,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:t(90021,e.DiagnosticCategory.Message,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:t(90022,e.DiagnosticCategory.Message,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:t(90023,e.DiagnosticCategory.Message,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:t(90024,e.DiagnosticCategory.Message,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:t(90025,e.DiagnosticCategory.Message,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:t(90026,e.DiagnosticCategory.Message,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:t(90027,e.DiagnosticCategory.Message,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:t(90028,e.DiagnosticCategory.Message,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:t(90029,e.DiagnosticCategory.Message,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:t(90030,e.DiagnosticCategory.Message,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:t(90031,e.DiagnosticCategory.Message,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Import_default_0_from_module_1:t(90032,e.DiagnosticCategory.Message,"Import_default_0_from_module_1_90032","Import default '{0}' from module \"{1}\""),Add_default_import_0_to_existing_import_declaration_from_1:t(90033,e.DiagnosticCategory.Message,"Add_default_import_0_to_existing_import_declaration_from_1_90033","Add default import '{0}' to existing import declaration from \"{1}\""),Add_parameter_name:t(90034,e.DiagnosticCategory.Message,"Add_parameter_name_90034","Add parameter name"),Convert_function_to_an_ES2015_class:t(95001,e.DiagnosticCategory.Message,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_function_0_to_class:t(95002,e.DiagnosticCategory.Message,"Convert_function_0_to_class_95002","Convert function '{0}' to class"),Extract_to_0_in_1:t(95004,e.DiagnosticCategory.Message,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:t(95005,e.DiagnosticCategory.Message,"Extract_function_95005","Extract function"),Extract_constant:t(95006,e.DiagnosticCategory.Message,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:t(95007,e.DiagnosticCategory.Message,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:t(95008,e.DiagnosticCategory.Message,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:t(95009,e.DiagnosticCategory.Message,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Annotate_with_types_from_JSDoc:t(95010,e.DiagnosticCategory.Message,"Annotate_with_types_from_JSDoc_95010","Annotate with types from JSDoc"),Infer_type_of_0_from_usage:t(95011,e.DiagnosticCategory.Message,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:t(95012,e.DiagnosticCategory.Message,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:t(95013,e.DiagnosticCategory.Message,"Convert_to_default_import_95013","Convert to default import"),Install_0:t(95014,e.DiagnosticCategory.Message,"Install_0_95014","Install '{0}'"),Replace_import_with_0:t(95015,e.DiagnosticCategory.Message,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:t(95016,e.DiagnosticCategory.Message,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES6_module:t(95017,e.DiagnosticCategory.Message,"Convert_to_ES6_module_95017","Convert to ES6 module"),Add_undefined_type_to_property_0:t(95018,e.DiagnosticCategory.Message,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:t(95019,e.DiagnosticCategory.Message,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:t(95020,e.DiagnosticCategory.Message,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Add_all_missing_members:t(95022,e.DiagnosticCategory.Message,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:t(95023,e.DiagnosticCategory.Message,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:t(95024,e.DiagnosticCategory.Message,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:t(95025,e.DiagnosticCategory.Message,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:t(95026,e.DiagnosticCategory.Message,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:t(95027,e.DiagnosticCategory.Message,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:t(95028,e.DiagnosticCategory.Message,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:t(95029,e.DiagnosticCategory.Message,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:t(95030,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_95030","Change all jsdoc-style types to TypeScript"),Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types:t(95031,e.DiagnosticCategory.Message,"Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031","Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"),Implement_all_unimplemented_interfaces:t(95032,e.DiagnosticCategory.Message,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:t(95033,e.DiagnosticCategory.Message,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:t(95034,e.DiagnosticCategory.Message,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:t(95035,e.DiagnosticCategory.Message,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:t(95036,e.DiagnosticCategory.Message,"Make_all_super_calls_the_first_statement_in_their_constructor_95036","Make all 'super()' calls the first statement in their constructor"),Add_qualifier_to_all_unresolved_variables_matching_a_member_name:t(95037,e.DiagnosticCategory.Message,"Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037","Add qualifier to all unresolved variables matching a member name"),Change_all_extended_interfaces_to_implements:t(95038,e.DiagnosticCategory.Message,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:t(95039,e.DiagnosticCategory.Message,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:t(95040,e.DiagnosticCategory.Message,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:t(95041,e.DiagnosticCategory.Message,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:t(95042,e.DiagnosticCategory.Message,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:t(95043,e.DiagnosticCategory.Message,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:t(95044,e.DiagnosticCategory.Message,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:t(95045,e.DiagnosticCategory.Message,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:t(95046,e.DiagnosticCategory.Message,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:t(95047,e.DiagnosticCategory.Message,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:t(95048,e.DiagnosticCategory.Message,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:t(95049,e.DiagnosticCategory.Message,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:t(95050,e.DiagnosticCategory.Message,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:t(95051,e.DiagnosticCategory.Message,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:t(95052,e.DiagnosticCategory.Message,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:t(95053,e.DiagnosticCategory.Message,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:t(95054,e.DiagnosticCategory.Message,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:t(95055,e.DiagnosticCategory.Message,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:t(95056,e.DiagnosticCategory.Message,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:t(95057,e.DiagnosticCategory.Message,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:t(95058,e.DiagnosticCategory.Message,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:t(95059,e.DiagnosticCategory.Message,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:t(95060,e.DiagnosticCategory.Message,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:t(95061,e.DiagnosticCategory.Message,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:t(95062,e.DiagnosticCategory.Message,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:t(95063,e.DiagnosticCategory.Message,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:t(95064,e.DiagnosticCategory.Message,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:t(95065,e.DiagnosticCategory.Message,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:t(95066,e.DiagnosticCategory.Message,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_unknown_conversion_for_non_overlapping_types:t(95069,e.DiagnosticCategory.Message,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:t(95070,e.DiagnosticCategory.Message,"Add_unknown_to_all_conversions_of_non_overlapping_types_95070","Add 'unknown' to all conversions of non-overlapping types"),Add_missing_new_operator_to_call:t(95071,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:t(95072,e.DiagnosticCategory.Message,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:t(95073,e.DiagnosticCategory.Message,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:t(95074,e.DiagnosticCategory.Message,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:t(95075,e.DiagnosticCategory.Message,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Allow_accessing_UMD_globals_from_modules:t(95076,e.DiagnosticCategory.Message,"Allow_accessing_UMD_globals_from_modules_95076","Allow accessing UMD globals from modules."),Extract_type:t(95077,e.DiagnosticCategory.Message,"Extract_type_95077","Extract type"),Extract_to_type_alias:t(95078,e.DiagnosticCategory.Message,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:t(95079,e.DiagnosticCategory.Message,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:t(95080,e.DiagnosticCategory.Message,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:t(95081,e.DiagnosticCategory.Message,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:t(95082,e.DiagnosticCategory.Message,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:t(95083,e.DiagnosticCategory.Message,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:t(95084,e.DiagnosticCategory.Message,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:t(95085,e.DiagnosticCategory.Message,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:t(95086,e.DiagnosticCategory.Message,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:t(95087,e.DiagnosticCategory.Message,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:t(95088,e.DiagnosticCategory.Message,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:t(95089,e.DiagnosticCategory.Message,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:t(95090,e.DiagnosticCategory.Message,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:t(95091,e.DiagnosticCategory.Message,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:t(95092,e.DiagnosticCategory.Message,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:t(95093,e.DiagnosticCategory.Message,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:t(95094,e.DiagnosticCategory.Message,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:t(95095,e.DiagnosticCategory.Message,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:t(18004,e.DiagnosticCategory.Error,"No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004","No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),Classes_may_not_have_a_field_named_constructor:t(18006,e.DiagnosticCategory.Error,"Classes_may_not_have_a_field_named_constructor_18006","Classes may not have a field named 'constructor'."),JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array:t(18007,e.DiagnosticCategory.Error,"JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007","JSX expressions may not use the comma operator. Did you mean to write an array?")}}(s||(s={})),function(e){var t;function n(e){return e>=75}e.tokenIsIdentifierOrKeyword=n,e.tokenIsIdentifierOrKeywordOrGreaterThan=function(e){return 31===e||n(e)};var i=((t={abstract:121,any:124,as:122,asserts:123,bigint:150,boolean:127,break:76,case:77,catch:78,class:79,continue:81,const:80}).constructor=128,t.debugger=82,t.declare=129,t.default=83,t.delete=84,t.do=85,t.else=86,t.enum=87,t.export=88,t.extends=89,t.false=90,t.finally=91,t.for=92,t.from=148,t.function=93,t.get=130,t.if=94,t.implements=112,t.import=95,t.in=96,t.infer=131,t.instanceof=97,t.interface=113,t.is=132,t.keyof=133,t.let=114,t.module=134,t.namespace=135,t.never=136,t.new=98,t.null=99,t.number=139,t.object=140,t.package=115,t.private=116,t.protected=117,t.public=118,t.readonly=137,t.require=138,t.global=149,t.return=100,t.set=141,t.static=119,t.string=142,t.super=101,t.switch=102,t.symbol=143,t.this=103,t.throw=104,t.true=105,t.try=106,t.type=144,t.typeof=107,t.undefined=145,t.unique=146,t.unknown=147,t.var=108,t.void=109,t.while=110,t.with=111,t.yield=120,t.async=125,t.await=126,t.of=151,t),a=e.createMapFromTemplate(i),o=e.createMapFromTemplate(r(r({},i),{"{":18,"}":19,"(":20,")":21,"[":22,"]":23,".":24,"...":25,";":26,",":27,"<":29,">":31,"<=":32,">=":33,"==":34,"!=":35,"===":36,"!==":37,"=>":38,"+":39,"-":40,"**":42,"*":41,"/":43,"%":44,"++":45,"--":46,"<<":47,">":48,">>>":49,"&":50,"|":51,"^":52,"!":53,"~":54,"&&":55,"||":56,"?":57,"??":60,"?.":28,":":58,"=":62,"+=":63,"-=":64,"*=":65,"**=":66,"/=":67,"%=":68,"<<=":69,">>=":70,">>>=":71,"&=":72,"|=":73,"^=":74,"@":59,"`":61})),s=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],c=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],u=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],l=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],_=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2208,2228,2230,2237,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6264,6272,6312,6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12730,12784,12799,13312,19893,19968,40943,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42653,42656,42735,42775,42783,42786,42888,42891,42943,42946,42950,42999,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43879,43888,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66176,66204,66208,66256,66304,66335,66349,66378,66384,66421,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66736,66771,66776,66811,66816,66855,66864,66915,67072,67382,67392,67413,67424,67431,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68899,69376,69404,69415,69415,69424,69445,69600,69622,69635,69687,69763,69807,69840,69864,69891,69926,69956,69956,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106,70108,70108,70144,70161,70163,70187,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497,70656,70708,70727,70730,70751,70751,70784,70831,70852,70853,70855,70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352,71424,71450,71680,71723,71840,71903,71935,71935,72096,72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250,72272,72272,72284,72329,72349,72349,72384,72440,72704,72712,72714,72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73728,74649,74752,74862,74880,75075,77824,78894,82944,83526,92160,92728,92736,92766,92880,92909,92928,92975,92992,92995,93027,93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177,94179,94179,94208,100343,100352,101106,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,123136,123180,123191,123197,123214,123214,123584,123627,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173782,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101],d=[48,57,65,90,95,95,97,122,170,170,181,181,183,183,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,895,895,902,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1327,1329,1366,1369,1369,1376,1416,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1519,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2045,2045,2048,2093,2112,2139,2144,2154,2208,2228,2230,2237,2259,2273,2275,2403,2406,2415,2417,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2556,2556,2558,2558,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2809,2815,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3072,3084,3086,3088,3090,3112,3114,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3162,3168,3171,3174,3183,3200,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3328,3331,3333,3340,3342,3344,3346,3396,3398,3400,3402,3406,3412,3415,3423,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3558,3567,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4969,4977,4992,5007,5024,5109,5112,5117,5121,5740,5743,5759,5761,5786,5792,5866,5870,5880,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6264,6272,6314,6320,6389,6400,6430,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6618,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6832,6845,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7296,7304,7312,7354,7357,7359,7376,7378,7380,7418,7424,7673,7675,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12730,12784,12799,13312,19893,19968,40943,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42737,42775,42783,42786,42888,42891,42943,42946,42950,42999,43047,43072,43123,43136,43205,43216,43225,43232,43255,43259,43259,43261,43309,43312,43347,43360,43388,43392,43456,43471,43481,43488,43518,43520,43574,43584,43597,43600,43609,43616,43638,43642,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43879,43888,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65071,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,65856,65908,66045,66045,66176,66204,66208,66256,66272,66272,66304,66335,66349,66378,66384,66426,66432,66461,66464,66499,66504,66511,66513,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,67072,67382,67392,67413,67424,67431,67584,67589,67592,67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68099,68101,68102,68108,68115,68117,68119,68121,68149,68152,68154,68159,68159,68192,68220,68224,68252,68288,68295,68297,68326,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680,68736,68786,68800,68850,68864,68903,68912,68921,69376,69404,69415,69415,69424,69456,69600,69622,69632,69702,69734,69743,69759,69818,69840,69864,69872,69881,69888,69940,69942,69951,69956,69958,69968,70003,70006,70006,70016,70084,70089,70092,70096,70106,70108,70108,70144,70161,70163,70199,70206,70206,70272,70278,70280,70280,70282,70285,70287,70301,70303,70312,70320,70378,70384,70393,70400,70403,70405,70412,70415,70416,70419,70440,70442,70448,70450,70451,70453,70457,70459,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70730,70736,70745,70750,70751,70784,70853,70855,70855,70864,70873,71040,71093,71096,71104,71128,71133,71168,71232,71236,71236,71248,71257,71296,71352,71360,71369,71424,71450,71453,71467,71472,71481,71680,71738,71840,71913,71935,71935,72096,72103,72106,72151,72154,72161,72163,72164,72192,72254,72263,72263,72272,72345,72349,72349,72384,72440,72704,72712,72714,72758,72760,72768,72784,72793,72818,72847,72850,72871,72873,72886,72960,72966,72968,72969,72971,73014,73018,73018,73020,73021,73023,73031,73040,73049,73056,73061,73063,73064,73066,73102,73104,73105,73107,73112,73120,73129,73440,73462,73728,74649,74752,74862,74880,75075,77824,78894,82944,83526,92160,92728,92736,92766,92768,92777,92880,92909,92912,92916,92928,92982,92992,92995,93008,93017,93027,93047,93053,93071,93760,93823,93952,94026,94031,94087,94095,94111,94176,94177,94179,94179,94208,100343,100352,101106,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113821,113822,119141,119145,119149,119154,119163,119170,119173,119179,119210,119213,119362,119364,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770,120772,120779,120782,120831,121344,121398,121403,121452,121461,121461,121476,121476,121499,121503,121505,121519,122880,122886,122888,122904,122907,122913,122915,122916,122918,122922,123136,123180,123184,123197,123200,123209,123214,123214,123584,123641,124928,125124,125136,125142,125184,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629,126633,126635,126651,131072,173782,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101,917760,917999];function p(e,t){if(e=2?_:1===t?u:s)}e.isUnicodeIdentifierStart=f;var m,g=(m=[],o.forEach((function(e,t){m[e]=t})),m);function y(e){for(var t=new Array,r=0,n=0;r127&&S(i)&&(t.push(n),n=r)}}return t.push(n),t}function h(t,r,n,i,a){(r<0||r>=t.length)&&(a?r=r<0?0:r>=t.length?t.length-1:r:e.Debug.fail("Bad line number. Line: "+r+", lineStarts.length: "+t.length+" , line map is correct? "+(void 0!==i?e.arraysEqual(t,y(i)):"unknown")));var o=t[r]+n;return a?o>t[r+1]?t[r+1]:"string"==typeof i&&o>i.length?i.length:o:(r=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function S(e){return 10===e||13===e||8232===e||8233===e}function T(e){return e>=48&&e<=57}function E(e){return e>=48&&e<=55}e.tokenToString=function(e){return g[e]},e.stringToToken=function(e){return o.get(e)},e.computeLineStarts=y,e.getPositionOfLineAndCharacter=function(e,t,r,n){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,r,n):h(v(e),t,r,e.text,n)},e.computePositionOfLineAndCharacter=h,e.getLineStarts=v,e.computeLineAndCharacterOfPosition=b,e.getLineAndCharacterOfPosition=function(e,t){return b(v(e),t)},e.isWhiteSpaceLike=x,e.isWhiteSpaceSingleLine=D,e.isLineBreak=S,e.isOctalDigit=E,e.couldStartTrivia=function(e,t){var r=e.charCodeAt(t);switch(r){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 124:case 61:case 62:return!0;case 35:return 0===t;default:return r>127}},e.skipTrivia=function(t,r,n,i){if(void 0===i&&(i=!1),e.positionIsSynthesized(r))return r;for(;;){var a=t.charCodeAt(r);switch(a){case 13:10===t.charCodeAt(r+1)&&r++;case 10:if(r++,n)return r;continue;case 9:case 11:case 12:case 32:r++;continue;case 47:if(i)break;if(47===t.charCodeAt(r+1)){for(r+=2;r127&&x(a)){r++;continue}}return r}};var C="<<<<<<<".length;function k(t,r){if(e.Debug.assert(r>=0),0===r||S(t.charCodeAt(r-1))){var n=t.charCodeAt(r);if(r+C=0&&r127&&x(m)){_&&S(m)&&(l=!0),r++;continue}break e}}return _&&(p=i(s,c,u,l,a,p)),p}function I(e,t,r,n,i){return w(!0,e,t,!1,r,n,i)}function O(e,t,r,n,i){return w(!0,e,t,!0,r,n,i)}function M(e,t,r,n,i,a){return a||(a=[]),a.push({kind:r,pos:e,end:t,hasTrailingNewLine:n}),a}function L(e){var t=A.exec(e);if(t)return t[0]}function R(e,t){return e>=65&&e<=90||e>=97&&e<=122||36===e||95===e||e>127&&f(e,t)}function B(e,t){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||36===e||95===e||e>127&&function(e,t){return p(e,t>=2?d:1===t?l:c)}(e,t)}e.isShebangTrivia=F,e.scanShebangTrivia=P,e.forEachLeadingCommentRange=function(e,t,r,n){return w(!1,e,t,!1,r,n)},e.forEachTrailingCommentRange=function(e,t,r,n){return w(!1,e,t,!0,r,n)},e.reduceEachLeadingCommentRange=I,e.reduceEachTrailingCommentRange=O,e.getLeadingCommentRanges=function(e,t){return I(e,t,M,void 0,void 0)},e.getTrailingCommentRanges=function(e,t){return O(e,t,M,void 0,void 0)},e.getShebang=L,e.isIdentifierStart=R,e.isIdentifierPart=B,e.isIdentifierText=function(e,t){var r=j(e,0);if(!R(r,t))return!1;for(var n=K(r);n111},isReservedWord:function(){return f>=76&&f<=111},isUnterminated:function(){return 0!=(4&g)},getTokenFlags:function(){return g},reScanGreaterToken:function(){if(31===f){if(62===y.charCodeAt(l))return 62===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=71):(l+=2,f=49):61===y.charCodeAt(l+1)?(l+=2,f=70):(l++,f=48);if(61===y.charCodeAt(l))return l++,f=33}return f},reScanSlashToken:function(){if(43===f||67===f){for(var r=p+1,n=!1,i=!1;;){if(r>=_){g|=4,b(e.Diagnostics.Unterminated_regular_expression_literal);break}var a=y.charCodeAt(r);if(S(a)){g|=4,b(e.Diagnostics.Unterminated_regular_expression_literal);break}if(n)n=!1;else{if(47===a&&!i){r++;break}91===a?i=!0:92===a?n=!0:93===a&&(i=!1)}r++}for(;r<_&&B(y.charCodeAt(r),t);)r++;l=r,m=y.substring(p,l),f=13}return f},reScanTemplateToken:function(){return e.Debug.assert(19===f,"'reScanTemplateToken' should only be called on a '}'"),l=p,f=z()},scanJsxIdentifier:function(){if(n(f))for(;l<_;){if(45!==y.charCodeAt(l)){var e=l;if(m+=Y(),l===e)break}else m+="-",l++}return f},scanJsxAttributeValue:function(){switch(d=l,y.charCodeAt(l)){case 34:case 39:return m=J(!0),f=10;default:return Z()}},reScanJsxToken:function(){return l=p=d,f=ee()},reScanLessThanToken:function(){if(47===f)return l=p+1,f=29;return f},reScanQuestionToken:function(){return e.Debug.assert(60===f,"'reScanQuestionToken' should only be called on a '??'"),l=p+1,f=57},scanJsxToken:ee,scanJsDocToken:function(){if(d=p=l,g=0,l>=_)return f=1;var e=j(y,l);switch(l+=K(e),e){case 9:case 11:case 12:case 32:for(;l<_&&D(y.charCodeAt(l));)l++;return f=5;case 64:return f=59;case 10:case 13:return g|=1,f=4;case 42:return f=41;case 123:return f=18;case 125:return f=19;case 91:return f=22;case 93:return f=23;case 60:return f=29;case 62:return f=31;case 61:return f=62;case 44:return f=27;case 46:return f=24;case 96:return f=61;case 92:l--;var r=H();if(r>=0&&R(r,t))return l+=3,g|=8,m=q()+Y(),f=X();var n=G();return n>=0&&R(n,t)?(l+=6,g|=1024,m=String.fromCharCode(n)+Y(),f=X()):(l++,f=0)}if(R(e,t)){for(var i=e;l<_&&B(i=j(y,l),t)||45===y.charCodeAt(l);)l+=K(i);return m=y.substring(p,l),92===i&&(m+=Y()),f=X()}return f=0},scan:Z,getText:function(){return y},setText:re,setScriptTarget:function(e){t=e},setLanguageVariant:function(e){i=e},setOnError:function(e){s=e},setTextPos:ne,setInJSDocType:function(e){h+=e?1:-1},tryScan:function(e){return te(e,!1)},lookAhead:function(e){return te(e,!0)},scanRange:function(e,t,r){var n=_,i=l,a=d,o=p,s=f,c=m,u=g;re(y,e,t);var h=r();return _=n,l=i,d=a,p=o,f=s,m=c,g=u,h}};return e.Debug.isDebugging&&Object.defineProperty(v,"__debugShowCurrentPositionInText",{get:function(){var e=v.getText();return e.slice(0,v.getStartPos())+"║"+e.slice(v.getStartPos())}}),v;function b(e,t,r){if(void 0===t&&(t=l),s){var n=l;l=t,s(e,r||0),l=n}}function C(){for(var t=l,r=!1,n=!1,i="";;){var a=y.charCodeAt(l);if(95!==a){if(!T(a))break;r=!0,n=!1,l++}else g|=512,r?(r=!1,n=!0,i+=y.substring(t,l)):b(n?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),t=++l}return 95===y.charCodeAt(l-1)&&b(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),i+y.substring(t,l)}function A(){var t,r,n=l,i=C();46===y.charCodeAt(l)&&(l++,t=C());var a,o=l;if(69===y.charCodeAt(l)||101===y.charCodeAt(l)){l++,g|=16,43!==y.charCodeAt(l)&&45!==y.charCodeAt(l)||l++;var s=l,c=C();c?(r=y.substring(o,s)+c,o=l):b(e.Diagnostics.Digit_expected)}if(512&g?(a=i,t&&(a+="."+t),r&&(a+=r)):a=y.substring(n,o),void 0!==t||16&g)return w(n,void 0===t&&!!(16&g)),{type:8,value:""+ +a};m=a;var u=$();return w(n),{type:u,value:m}}function w(r,n){if(R(j(y,l),t)){var i=l,a=Y().length;1===a&&"n"===y[i]?b(n?e.Diagnostics.A_bigint_literal_cannot_use_exponential_notation:e.Diagnostics.A_bigint_literal_must_be_an_integer,r,i-r+1):(b(e.Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,i,a),l=i)}}function I(){for(var e=l;E(y.charCodeAt(l));)l++;return+y.substring(e,l)}function O(e,t){var r=L(e,!1,t);return r?parseInt(r,16):-1}function M(e,t){return L(e,!0,t)}function L(t,r,n){for(var i=[],a=!1,o=!1;i.length=65&&s<=70)s+=32;else if(!(s>=48&&s<=57||s>=97&&s<=102))break;i.push(s),l++,o=!1}}return i.length=_){n+=y.substring(i,l),g|=4,b(e.Diagnostics.Unterminated_string_literal);break}var a=y.charCodeAt(l);if(a===r){n+=y.substring(i,l),l++;break}if(92!==a||t){if(S(a)&&!t){n+=y.substring(i,l),g|=4,b(e.Diagnostics.Unterminated_string_literal);break}l++}else n+=y.substring(i,l),n+=U(),i=l}return n}function z(){for(var t,r=96===y.charCodeAt(l),n=++l,i="";;){if(l>=_){i+=y.substring(n,l),g|=4,b(e.Diagnostics.Unterminated_template_literal),t=r?14:17;break}var a=y.charCodeAt(l);if(96===a){i+=y.substring(n,l),l++,t=r?14:17;break}if(36===a&&l+1<_&&123===y.charCodeAt(l+1)){i+=y.substring(n,l),l+=2,t=r?15:16;break}92!==a?13!==a?l++:(i+=y.substring(n,l),++l<_&&10===y.charCodeAt(l)&&l++,i+="\n",n=l):(i+=y.substring(n,l),i+=U(),n=l)}return e.Debug.assert(void 0!==t),m=i,t}function U(){if(++l>=_)return b(e.Diagnostics.Unexpected_end_of_text),"";var t=y.charCodeAt(l);switch(l++,t){case 48:return"\0";case 98:return"\b";case 116:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:return l<_&&123===y.charCodeAt(l)?(g|=8,l++,q()):(g|=1024,V(4));case 120:return V(2);case 13:l<_&&10===y.charCodeAt(l)&&l++;case 10:case 8232:case 8233:return"";default:return String.fromCharCode(t)}}function V(t){var r=O(t,!1);return r>=0?String.fromCharCode(r):(b(e.Diagnostics.Hexadecimal_digit_expected),"")}function q(){var t=M(1,!1),r=t?parseInt(t,16):-1,n=!1;return r<0?(b(e.Diagnostics.Hexadecimal_digit_expected),n=!0):r>1114111&&(b(e.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),n=!0),l>=_?(b(e.Diagnostics.Unexpected_end_of_text),n=!0):125===y.charCodeAt(l)?l++:(b(e.Diagnostics.Unterminated_Unicode_escape_sequence),n=!0),n?"":W(r)}function W(t){if(e.Debug.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);var r=Math.floor((t-65536)/1024)+55296,n=(t-65536)%1024+56320;return String.fromCharCode(r,n)}function G(){if(l+5<_&&117===y.charCodeAt(l+1)){var e=l;l+=2;var t=O(4,!1);return l=e,t}return-1}function H(){if(t>=2&&117===j(y,l+1)&&123===j(y,l+2)){var e=l;l+=3;var r=M(1,!1),n=r?parseInt(r,16):-1;return l=e,n}return-1}function Y(){for(var e="",r=l;l<_;){var n=j(y,l);if(B(n,t))l+=K(n);else{if(92!==n)break;if((n=H())>=0&&B(n,t)){l+=3,g|=8,e+=q(),r=l;continue}if(!((n=G())>=0&&B(n,t)))break;g|=1024,e+=y.substring(r,l),e+=W(n),r=l+=6}}return e+=y.substring(r,l)}function X(){var e=m.length;if(e>=2&&e<=11){var t=m.charCodeAt(0);if(t>=97&&t<=122){var r=a.get(m);if(void 0!==r)return f=r}}return f=75}function Q(t){for(var r="",n=!1,i=!1;;){var a=y.charCodeAt(l);if(95!==a){if(n=!0,!T(a)||a-48>=t)break;r+=y[l],l++,i=!1}else g|=512,n?(n=!1,i=!0):b(i?e.Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted:e.Diagnostics.Numeric_separators_are_not_allowed_here,l,1),l++}return 95===y.charCodeAt(l-1)&&b(e.Diagnostics.Numeric_separators_are_not_allowed_here,l-1,1),r}function $(){if(110===y.charCodeAt(l))return m+="n",384&g&&(m=e.parsePseudoBigInt(m)+"n"),l++,9;var t=128&g?parseInt(m.slice(2),2):256&g?parseInt(m.slice(2),8):+m;return m=""+t,8}function Z(){var n;d=l,g=0;for(var a=!1;;){if(p=l,l>=_)return f=1;var o=j(y,l);if(35===o&&0===l&&F(y,l)){if(l=P(y,l),r)continue;return f=6}switch(o){case 10:case 13:if(g|=1,r){l++;continue}return 13===o&&l+1<_&&10===y.charCodeAt(l+1)?l+=2:l++,f=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(r){l++;continue}for(;l<_&&D(y.charCodeAt(l));)l++;return f=5;case 33:return 61===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=37):(l+=2,f=35):(l++,f=53);case 34:case 39:return m=J(),f=10;case 96:return f=z();case 37:return 61===y.charCodeAt(l+1)?(l+=2,f=68):(l++,f=44);case 38:return 38===y.charCodeAt(l+1)?(l+=2,f=55):61===y.charCodeAt(l+1)?(l+=2,f=72):(l++,f=50);case 40:return l++,f=20;case 41:return l++,f=21;case 42:if(61===y.charCodeAt(l+1))return l+=2,f=65;if(42===y.charCodeAt(l+1))return 61===y.charCodeAt(l+2)?(l+=3,f=66):(l+=2,f=42);if(l++,h&&!a&&1&g){a=!0;continue}return f=41;case 43:return 43===y.charCodeAt(l+1)?(l+=2,f=45):61===y.charCodeAt(l+1)?(l+=2,f=63):(l++,f=39);case 44:return l++,f=27;case 45:return 45===y.charCodeAt(l+1)?(l+=2,f=46):61===y.charCodeAt(l+1)?(l+=2,f=64):(l++,f=40);case 46:return T(y.charCodeAt(l+1))?(m=A().value,f=8):46===y.charCodeAt(l+1)&&46===y.charCodeAt(l+2)?(l+=3,f=25):(l++,f=24);case 47:if(47===y.charCodeAt(l+1)){for(l+=2;l<_&&!S(y.charCodeAt(l));)l++;if(r)continue;return f=2}if(42===y.charCodeAt(l+1)){l+=2,42===y.charCodeAt(l)&&47!==y.charCodeAt(l+1)&&(g|=2);for(var s=!1;l<_;){var c=y.charCodeAt(l);if(42===c&&47===y.charCodeAt(l+1)){l+=2,s=!0;break}S(c)&&(g|=1),l++}if(s||b(e.Diagnostics.Asterisk_Slash_expected),r)continue;return s||(g|=4),f=3}return 61===y.charCodeAt(l+1)?(l+=2,f=67):(l++,f=43);case 48:if(l+2<_&&(88===y.charCodeAt(l+1)||120===y.charCodeAt(l+1)))return l+=2,(m=M(1,!0))||(b(e.Diagnostics.Hexadecimal_digit_expected),m="0"),m="0x"+m,g|=64,f=$();if(l+2<_&&(66===y.charCodeAt(l+1)||98===y.charCodeAt(l+1)))return l+=2,(m=Q(2))||(b(e.Diagnostics.Binary_digit_expected),m="0"),m="0b"+m,g|=128,f=$();if(l+2<_&&(79===y.charCodeAt(l+1)||111===y.charCodeAt(l+1)))return l+=2,(m=Q(8))||(b(e.Diagnostics.Octal_digit_expected),m="0"),m="0o"+m,g|=256,f=$();if(l+1<_&&E(y.charCodeAt(l+1)))return m=""+I(),g|=32,f=8;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n=A(),f=n.type,m=n.value,f;case 58:return l++,f=58;case 59:return l++,f=26;case 60:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return 60===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=69):(l+=2,f=47):61===y.charCodeAt(l+1)?(l+=2,f=32):1===i&&47===y.charCodeAt(l+1)&&42!==y.charCodeAt(l+2)?(l+=2,f=30):(l++,f=29);case 61:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return 61===y.charCodeAt(l+1)?61===y.charCodeAt(l+2)?(l+=3,f=36):(l+=2,f=34):62===y.charCodeAt(l+1)?(l+=2,f=38):(l++,f=62);case 62:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return l++,f=31;case 63:return l++,46!==y.charCodeAt(l)||T(y.charCodeAt(l+1))?63===y.charCodeAt(l)?(l++,f=60):f=57:(l++,f=28);case 91:return l++,f=22;case 93:return l++,f=23;case 94:return 61===y.charCodeAt(l+1)?(l+=2,f=74):(l++,f=52);case 123:return l++,f=18;case 124:if(k(y,l)){if(l=N(y,l,b),r)continue;return f=7}return 124===y.charCodeAt(l+1)?(l+=2,f=56):61===y.charCodeAt(l+1)?(l+=2,f=73):(l++,f=51);case 125:return l++,f=19;case 126:return l++,f=54;case 64:return l++,f=59;case 92:var u=H();if(u>=0&&R(u,t))return l+=3,g|=8,m=q()+Y(),f=X();var v=G();return v>=0&&R(v,t)?(l+=6,g|=1024,m=String.fromCharCode(v)+Y(),f=X()):(b(e.Diagnostics.Invalid_character),l++,f=0);default:if(R(o,t)){for(l+=K(o);l<_&&B(o=j(y,l),t);)l+=K(o);return m=y.substring(p,l),92===o&&(m+=Y()),f=X()}if(D(o)){l+=K(o);continue}if(S(o)){g|=1,l+=K(o);continue}return b(e.Diagnostics.Invalid_character),l+=K(o),f=0}}}function ee(){if(d=p=l,l>=_)return f=1;var e=y.charCodeAt(l);if(60===e)return 47===y.charCodeAt(l+1)?(l+=2,f=30):(l++,f=29);if(123===e)return l++,f=18;for(var t=0;l<_&&123!==(e=y.charCodeAt(l));){if(60===e){if(k(y,l))return l=N(y,l,b),f=7;break}S(e)&&0===t?t=-1:x(e)||(t=l),l++}return m=y.substring(d,l),-1===t?12:11}function te(e,t){var r=l,n=d,i=p,a=f,o=m,s=g,c=e();return c&&!t||(l=r,d=n,p=i,f=a,m=o,g=s),c}function re(e,t,r){y=e||"",_=void 0===r?y.length:t+r,ne(t||0)}function ne(t){e.Debug.assert(t>=0),l=t,d=t,p=t,f=0,m=void 0,g=0}};var j=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){var r=e.length;if(!(t<0||t>=r)){var n=e.charCodeAt(t);if(n>=55296&&n<=56319&&r>t+1){var i=e.charCodeAt(t+1);if(i>=56320&&i<=57343)return 1024*(n-55296)+i-56320+65536}return n}};function K(e){return e>=65536?2:1}}(s||(s={})),function(e){e.isExternalModuleNameRelative=function(t){return e.pathIsRelative(t)||e.isRootedDiskPath(t)},e.sortAndDeduplicateDiagnostics=function(t){return e.sortAndDeduplicate(t,e.compareDiagnostics)}}(s||(s={})),function(e){e.resolvingEmptyArray=[],e.emptyMap=e.createMap(),e.emptyUnderscoreEscapedMap=e.emptyMap,e.externalHelpersModuleNameText="tslib",e.defaultMaximumTruncationLength=160,e.getDeclarationOfKind=function(e,t){var r=e.declarations;if(r)for(var n=0,i=r;n=0);var n=e.getLineStarts(r),i=t,a=r.text;if(i+1===n.length)return a.length-1;var o=n[i],s=n[i+1]-1;for(e.Debug.assert(e.isLineBreak(a.charCodeAt(s)));o<=s&&e.isLineBreak(a.charCodeAt(s));)s--;return s}function p(e){return void 0===e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function m(e){return!p(e)}function g(e,r,n){if(void 0===r||0===r.length)return e;for(var i=0;i0?b(t._children[0],r,n):e.skipTrivia((r||_(t)).text,t.pos)}function x(e,t,r){return void 0===r&&(r=!1),D(e.text,t,r)}function D(t,r,n){if(void 0===n&&(n=!1),p(r))return"";var i=t.substring(n?r.pos:e.skipTrivia(t,r.pos),r.end);return function e(t){return 292===t.kind||t.parent&&e(t.parent)}(r)&&(i=i.replace(/(^|\r?\n|\r)\s*\*\s*/g,"$1")),i}function S(e,t){return void 0===t&&(t=!1),x(_(e),e,t)}function T(e){return e.pos}function E(e){var t=e.emitNode;return t&&t.flags||0}function C(e){var t=lt(e);return 241===t.kind&&278===t.parent.kind}function k(t){return e.isModuleDeclaration(t)&&(10===t.name.kind||N(t))}function N(e){return!!(1024&e.flags)}function A(e){return k(e)&&F(e)}function F(t){switch(t.parent.kind){case 288:return e.isExternalModule(t.parent);case 249:return k(t.parent.parent)&&e.isSourceFile(t.parent.parent.parent)&&!e.isExternalModule(t.parent.parent.parent)}return!1}function P(t,r){switch(t.kind){case 288:case 250:case 278:case 248:case 229:case 230:case 231:case 161:case 160:case 162:case 163:case 243:case 200:case 201:return!0;case 222:return!e.isFunctionLike(r)}return!1}function w(t){switch(t.kind){case 164:case 165:case 159:case 166:case 169:case 170:case 298:case 244:case 213:case 245:case 246:case 314:case 243:case 160:case 161:case 162:case 163:case 200:case 201:return!0;default:return e.assertType(t),!1}}function I(e){switch(e.kind){case 253:case 252:return!0;default:return!1}}function O(e){return e&&0!==u(e)?S(e):"(Missing)"}function M(t){switch(t.kind){case 75:return t.escapedText;case 10:case 8:case 14:return e.escapeLeadingUnderscores(t.text);case 153:return et(t.expression)?e.escapeLeadingUnderscores(t.expression.text):e.Debug.fail("Text of property name cannot be read from non-literal-valued ComputedPropertyNames");default:return e.Debug.assertNever(t)}}function L(t,r,n,i,a,o,s){var c=B(t,r);return e.createFileDiagnostic(t,c.start,c.length,n,i,a,o,s)}function R(t,r){var n=e.createScanner(t.languageVersion,!0,t.languageVariant,t.text,void 0,r);n.scan();var i=n.getTokenPos();return e.createTextSpanFromBounds(i,n.getTextPos())}function B(t,r){var n=r;switch(r.kind){case 288:var i=e.skipTrivia(t.text,0,!1);return i===t.text.length?e.createTextSpan(0,0):R(t,i);case 241:case 190:case 244:case 213:case 245:case 248:case 247:case 282:case 243:case 200:case 160:case 162:case 163:case 246:case 158:case 157:n=r.name;break;case 201:return function(t,r){var n=e.skipTrivia(t.text,r.pos);if(r.body&&222===r.body.kind){var i=e.getLineAndCharacterOfPosition(t,r.body.pos).line;if(i0?r.statements[0].pos:r.end;return e.createTextSpanFromBounds(a,o)}if(void 0===n)return R(t,r.pos);e.Debug.assert(!e.isJSDoc(n));var s=p(n),c=s||e.isJsxText(r)?n.pos:e.skipTrivia(t.text,n.pos);return s?(e.Debug.assert(c===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(c===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(e.Debug.assert(c>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),e.Debug.assert(c<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),e.createTextSpanFromBounds(c,n.end)}function j(e){return 6===e.scriptKind}function K(t){return!!(2&e.getCombinedNodeFlags(t))}function J(e){return 195===e.kind&&95===e.expression.kind}function z(t){return e.isImportTypeNode(t)&&e.isLiteralTypeNode(t.argument)&&e.isStringLiteral(t.argument.literal)}function U(e){return 225===e.kind&&10===e.expression.kind}e.changesAffectModuleResolution=function(e,t){return e.configFilePath!==t.configFilePath||o(e,t)},e.optionsHaveModuleResolutionChanges=o,e.findAncestor=s,e.forEachAncestor=function(t,r){for(;;){var n=r(t);if("quit"===n)return;if(void 0!==n)return n;if(e.isSourceFile(t))return;t=t.parent}},e.forEachEntry=function(e,t){for(var r=e.entries(),n=r.next();!n.done;n=r.next()){var i=n.value,a=i[0],o=t(i[1],a);if(o)return o}},e.forEachKey=function(e,t){for(var r=e.keys(),n=r.next();!n.done;n=r.next()){var i=t(n.value);if(i)return i}},e.copyEntries=c,e.arrayToSet=function(t,r){return e.arrayToMap(t,r||function(e){return e},e.returnTrue)},e.cloneMap=function(t){var r=e.createMap();return c(t,r),r},e.usingSingleLineStringWriter=function(e){var t=a.getText();try{return e(a),a.getText()}finally{a.clear(),a.writeKeyword(t)}},e.getFullWidth=u,e.getResolvedModule=function(e,t){return e&&e.resolvedModules&&e.resolvedModules.get(t)},e.setResolvedModule=function(t,r,n){t.resolvedModules||(t.resolvedModules=e.createMap()),t.resolvedModules.set(r,n)},e.setResolvedTypeReferenceDirective=function(t,r,n){t.resolvedTypeReferenceDirectiveNames||(t.resolvedTypeReferenceDirectiveNames=e.createMap()),t.resolvedTypeReferenceDirectiveNames.set(r,n)},e.projectReferenceIsEqualTo=function(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular},e.moduleResolutionIsEqualTo=function(e,t){return e.isExternalLibraryImport===t.isExternalLibraryImport&&e.extension===t.extension&&e.resolvedFileName===t.resolvedFileName&&e.originalPath===t.originalPath&&(r=e.packageId,n=t.packageId,r===n||!!r&&!!n&&r.name===n.name&&r.subModuleName===n.subModuleName&&r.version===n.version);var r,n},e.packageIdToString=function(e){var t=e.name,r=e.subModuleName;return(r?t+"/"+r:t)+"@"+e.version},e.typeDirectiveIsEqualTo=function(e,t){return e.resolvedFileName===t.resolvedFileName&&e.primary===t.primary},e.hasChangesInResolutions=function(t,r,n,i){e.Debug.assert(t.length===r.length);for(var a=0;a=0),e.getLineStarts(r)[t]},e.nodePosToString=function(t){var r=_(t),n=e.getLineAndCharacterOfPosition(r,t.pos);return r.fileName+"("+(n.line+1)+","+(n.character+1)+")"},e.getEndLinePosition=d,e.isFileLevelUniqueName=function(e,t,r){return!(r&&r(t)||e.identifiers.has(t))},e.nodeIsMissing=p,e.nodeIsPresent=m,e.insertStatementsAfterStandardPrologue=function(e,t){return g(e,t,U)},e.insertStatementsAfterCustomPrologue=function(e,t){return g(e,t,h)},e.insertStatementAfterStandardPrologue=function(e,t){return y(e,t,U)},e.insertStatementAfterCustomPrologue=function(e,t){return y(e,t,h)},e.isRecognizedTripleSlashComment=function(t,r,n){if(47===t.charCodeAt(r+1)&&r+2=e.ModuleKind.ES2015||!r.noImplicitUseStrict)))},e.isBlockScope=P,e.isDeclarationWithTypeParameters=function(t){switch(t.kind){case 308:case 315:case 303:return!0;default:return e.assertType(t),w(t)}},e.isDeclarationWithTypeParameterChildren=w,e.isAnyImportSyntax=I,e.isLateVisibilityPaintedStatement=function(e){switch(e.kind){case 253:case 252:case 224:case 244:case 243:case 248:case 246:case 245:case 247:return!0;default:return!1}},e.isAnyImportOrReExport=function(t){return I(t)||e.isExportDeclaration(t)},e.getEnclosingBlockScopeContainer=function(e){return s(e.parent,(function(e){return P(e,e.parent)}))},e.declarationNameToString=O,e.getNameFromIndexInfo=function(e){return e.declaration?O(e.declaration.parameters[0].name):void 0},e.getTextOfPropertyName=M,e.entityNameToString=function t(r){switch(r.kind){case 75:return 0===u(r)?e.idText(r):S(r);case 152:return t(r.left)+"."+t(r.right);case 193:return t(r.expression)+"."+t(r.name);default:throw e.Debug.assertNever(r)}},e.createDiagnosticForNode=function(e,t,r,n,i,a){return L(_(e),e,t,r,n,i,a)},e.createDiagnosticForNodeArray=function(t,r,n,i,a,o,s){var c=e.skipTrivia(t.text,r.pos);return e.createFileDiagnostic(t,c,r.end-c,n,i,a,o,s)},e.createDiagnosticForNodeInSourceFile=L,e.createDiagnosticForNodeFromMessageChain=function(e,t,r){var n=_(e),i=B(n,e);return{file:n,start:i.start,length:i.length,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}},e.getSpanOfTokenAtPosition=R,e.getErrorSpanForNode=B,e.isExternalOrCommonJsModule=function(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)},e.isJsonSourceFile=j,e.isEnumConst=function(t){return!!(2048&e.getCombinedModifierFlags(t))},e.isDeclarationReadonly=function(t){return!(!(64&e.getCombinedModifierFlags(t))||e.isParameterPropertyDeclaration(t,t.parent))},e.isVarConst=K,e.isLet=function(t){return!!(1&e.getCombinedNodeFlags(t))},e.isSuperCall=function(e){return 195===e.kind&&101===e.expression.kind},e.isImportCall=J,e.isImportMeta=function(t){return e.isMetaProperty(t)&&95===t.keywordToken&&"meta"===t.name.escapedText},e.isLiteralImportTypeNode=z,e.isPrologueDirective=U,e.getLeadingCommentRangesOfNode=function(t,r){return 11!==t.kind?e.getLeadingCommentRanges(r.text,t.pos):void 0},e.getJSDocCommentRanges=function(t,r){var n=155===t.kind||154===t.kind||200===t.kind||201===t.kind||199===t.kind?e.concatenate(e.getTrailingCommentRanges(r,t.pos),e.getLeadingCommentRanges(r,t.pos)):e.getLeadingCommentRanges(r,t.pos);return e.filter(n,(function(e){return 42===r.charCodeAt(e.pos+1)&&42===r.charCodeAt(e.pos+2)&&47!==r.charCodeAt(e.pos+3)}))},e.fullTripleSlashReferencePathRegEx=/^(\/\/\/\s*/;var V=/^(\/\/\/\s*/;e.fullTripleSlashAMDReferencePathRegEx=/^(\/\/\/\s*/;var q=/^(\/\/\/\s*/;function W(t){if(167<=t.kind&&t.kind<=187)return!0;switch(t.kind){case 124:case 147:case 139:case 150:case 142:case 127:case 143:case 140:case 145:case 136:return!0;case 109:return 204!==t.parent.kind;case 215:return!ir(t);case 154:return 185===t.parent.kind||180===t.parent.kind;case 75:152===t.parent.kind&&t.parent.right===t?t=t.parent:193===t.parent.kind&&t.parent.name===t&&(t=t.parent),e.Debug.assert(75===t.kind||152===t.kind||193===t.kind,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 152:case 193:case 103:var r=t.parent;if(171===r.kind)return!1;if(187===r.kind)return!r.isTypeOf;if(167<=r.kind&&r.kind<=187)return!0;switch(r.kind){case 215:return!ir(r);case 154:case 314:return t===r.constraint;case 158:case 157:case 155:case 241:return t===r.type;case 243:case 200:case 201:case 161:case 160:case 159:case 162:case 163:return t===r.type;case 164:case 165:case 166:case 198:return t===r.type;case 195:case 196:return e.contains(r.typeArguments,t);case 197:return!1}}return!1}function G(e){if(e)switch(e.kind){case 190:case 282:case 155:case 279:case 158:case 157:case 280:case 241:return!0}return!1}function H(e){return 242===e.parent.kind&&224===e.parent.parent.kind}function Y(e,t,r){return e.properties.filter((function(e){if(279===e.kind){var n=M(e.name);return t===n||!!r&&r===n}return!1}))}function X(t){if(t&&t.statements.length){var r=t.statements[0].expression;return e.tryCast(r,e.isObjectLiteralExpression)}}function Q(t,r){var n=X(t);return n?Y(n,r):e.emptyArray}function $(t,r){for(e.Debug.assert(288!==t.kind);;){if(!(t=t.parent))return e.Debug.fail();switch(t.kind){case 153:if(e.isClassLike(t.parent.parent))return t;t=t.parent;break;case 156:155===t.parent.kind&&e.isClassElement(t.parent.parent)?t=t.parent.parent:e.isClassElement(t.parent)&&(t=t.parent);break;case 201:if(!r)continue;case 243:case 200:case 248:case 158:case 157:case 160:case 159:case 161:case 162:case 163:case 164:case 165:case 166:case 247:case 288:return t}}}function Z(e){var t=e.kind;return(193===t||194===t)&&101===e.expression.kind}function ee(e,t,r){switch(e.kind){case 244:return!0;case 158:return 244===t.kind;case 162:case 163:case 160:return void 0!==e.body&&244===t.kind;case 155:return void 0!==t.body&&(161===t.kind||160===t.kind||163===t.kind)&&244===r.kind}return!1}function te(e,t,r){return void 0!==e.decorators&&ee(e,t,r)}function re(e,t,r){return te(e,t,r)||ne(e,t)}function ne(t,r){switch(t.kind){case 244:return e.some(t.members,(function(e){return re(e,t,r)}));case 160:case 163:return e.some(t.parameters,(function(e){return te(e,t,r)}));default:return!1}}function ie(e){var t=e.parent;return(266===t.kind||265===t.kind||267===t.kind)&&t.tagName===e}function ae(e){switch(e.kind){case 101:case 99:case 105:case 90:case 13:case 191:case 192:case 193:case 194:case 195:case 196:case 197:case 216:case 198:case 217:case 199:case 200:case 213:case 201:case 204:case 202:case 203:case 206:case 207:case 208:case 209:case 212:case 210:case 214:case 264:case 265:case 268:case 211:case 205:case 218:return!0;case 152:for(;152===e.parent.kind;)e=e.parent;return 171===e.parent.kind||ie(e);case 75:if(171===e.parent.kind||ie(e))return!0;case 8:case 9:case 10:case 14:case 103:return oe(e);default:return!1}}function oe(e){var t=e.parent;switch(t.kind){case 241:case 155:case 158:case 157:case 282:case 279:case 190:return t.initializer===e;case 225:case 226:case 227:case 228:case 234:case 235:case 236:case 275:case 238:return t.expression===e;case 229:var r=t;return r.initializer===e&&242!==r.initializer.kind||r.condition===e||r.incrementor===e;case 230:case 231:var n=t;return n.initializer===e&&242!==n.initializer.kind||n.expression===e;case 198:case 216:case 220:case 153:return e===t.expression;case 156:case 274:case 273:case 281:return!0;case 215:return t.expression===e&&ir(t);case 280:return t.objectAssignmentInitializer===e;default:return ae(t)}}function se(e){return 252===e.kind&&263===e.moduleReference.kind}function ce(e){return ue(e)}function ue(e){return!!e&&!!(131072&e.flags)}function le(t,r){if(195!==t.kind)return!1;var n=t,i=n.expression,a=n.arguments;if(75!==i.kind||"require"!==i.escapedText)return!1;if(1!==a.length)return!1;var o=a[0];return!r||e.isStringLiteralLike(o)}function _e(t){return ue(t)&&t.initializer&&e.isBinaryExpression(t.initializer)&&(56===t.initializer.operatorToken.kind||60===t.initializer.operatorToken.kind)&&t.name&&ar(t.name)&&pe(t.name,t.initializer.left)?t.initializer.right:t.initializer}function de(t,r){if(e.isCallExpression(t)){var n=ze(t.expression);return 200===n.kind||201===n.kind?t:void 0}return 200===t.kind||213===t.kind||201===t.kind?t:e.isObjectLiteralExpression(t)&&(0===t.properties.length||r)?t:void 0}function pe(t,r){return ot(t)&&ot(r)?st(t)==st(t):e.isIdentifier(t)&&he(r)?(103===r.expression.kind||e.isIdentifier(r.expression)&&("window"===r.expression.escapedText||"self"===r.expression.escapedText||"global"===r.expression.escapedText))&&pe(t,Se(r)):!(!he(t)||!he(r))&&(Ee(t)===Ee(r)&&pe(t.expression,r.expression))}function fe(t){return e.isIdentifier(t)&&"exports"===t.escapedText}function me(t){return(e.isPropertyAccessExpression(t)||ve(t))&&e.isIdentifier(t.expression)&&"module"===t.expression.escapedText&&"exports"===Ee(t)}function ge(t){var r=function(t){if(e.isCallExpression(t)){if(!ye(t))return 0;var r=t.arguments[0];return fe(r)||me(r)?8:be(r)&&"prototype"===Ee(r)?9:7}if(62!==t.operatorToken.kind||!Cr(t.left))return 0;if(De(t.left.expression,!0)&&"prototype"===Ee(t.left)&&e.isObjectLiteralExpression(ke(t)))return 6;return Ce(t.left)}(t);return 5===r||ue(t)?r:0}function ye(t){return 3===e.length(t.arguments)&&e.isPropertyAccessExpression(t.expression)&&e.isIdentifier(t.expression.expression)&&"Object"===e.idText(t.expression.expression)&&"defineProperty"===e.idText(t.expression.name)&&et(t.arguments[1])&&De(t.arguments[0],!0)}function he(t){return e.isPropertyAccessExpression(t)||ve(t)}function ve(t){return e.isElementAccessExpression(t)&&(et(t.argumentExpression)||it(t.argumentExpression))}function be(t,r){return e.isPropertyAccessExpression(t)&&(!r&&103===t.expression.kind||De(t.expression,!0))||xe(t,r)}function xe(e,t){return ve(e)&&(!t&&103===e.expression.kind||ar(e.expression)||be(e.expression,!0))}function De(e,t){return ar(e)||be(e,t)}function Se(t){return e.isPropertyAccessExpression(t)?t.name:t.argumentExpression}function Te(t){if(e.isPropertyAccessExpression(t))return t.name;var r=ze(t.argumentExpression);return e.isNumericLiteral(r)||e.isStringLiteralLike(r)?r:t}function Ee(t){var r=Te(t);if(r){if(e.isIdentifier(r))return r.escapedText;if(e.isStringLiteralLike(r)||e.isNumericLiteral(r))return e.escapeLeadingUnderscores(r.text)}if(e.isElementAccessExpression(t)&&it(t.argumentExpression))return ct(e.idText(t.argumentExpression.name))}function Ce(t){if(103===t.expression.kind)return 4;if(me(t))return 2;if(De(t.expression,!0)){if(sr(t.expression))return 3;for(var r=t;!e.isIdentifier(r.expression);)r=r.expression;var n=r.expression;if(("exports"===n.escapedText||"module"===n.escapedText&&"exports"===Ee(r))&&be(t))return 1;if(De(t,!0)||e.isElementAccessExpression(t)&&nt(t)&&103!==t.expression.kind)return 5}return 0}function ke(t){for(;e.isBinaryExpression(t.right);)t=t.right;return t.right}function Ne(t){switch(t.parent.kind){case 253:case 259:return t.parent;case 263:return t.parent.parent;case 195:return J(t.parent)||le(t.parent,!1)?t.parent:void 0;case 186:return e.Debug.assert(e.isStringLiteral(t)),e.tryCast(t.parent.parent,e.isImportTypeNode);default:return}}function Ae(e){return 315===e.kind||308===e.kind||309===e.kind}function Fe(t){return e.isExpressionStatement(t)&&e.isBinaryExpression(t.expression)&&0!==ge(t.expression)&&e.isBinaryExpression(t.expression.right)&&(56===t.expression.right.operatorToken.kind||60===t.expression.right.operatorToken.kind)?t.expression.right.right:void 0}function Pe(e){switch(e.kind){case 224:var t=we(e);return t&&t.initializer;case 158:case 279:return e.initializer}}function we(t){return e.isVariableStatement(t)?e.firstOrUndefined(t.declarationList.declarations):void 0}function Ie(t){return e.isModuleDeclaration(t)&&t.body&&248===t.body.kind?t.body:void 0}function Oe(t){var r=t.parent;return 279===r.kind||258===r.kind||158===r.kind||225===r.kind&&193===t.kind||Ie(r)||e.isBinaryExpression(t)&&62===t.operatorToken.kind?r:r.parent&&(we(r.parent)===t||e.isBinaryExpression(r)&&62===r.operatorToken.kind)?r.parent:r.parent&&r.parent.parent&&(we(r.parent.parent)||Pe(r.parent.parent)===t||Fe(r.parent.parent))?r.parent.parent:void 0}function Me(e){return Le(Re(e))}function Le(t){var r=Fe(t)||function(t){return e.isExpressionStatement(t)&&t.expression&&e.isBinaryExpression(t.expression)&&62===t.expression.operatorToken.kind?t.expression.right:void 0}(t)||Pe(t)||we(t)||Ie(t)||t;return r&&e.isFunctionLike(r)?r:void 0}function Re(t){return e.Debug.assertDefined(s(t.parent,e.isJSDoc)).parent}function Be(t){var r=e.isJSDocParameterTag(t)?t.typeExpression&&t.typeExpression.type:t.type;return void 0!==t.dotDotDotToken||!!r&&299===r.kind}function je(e){for(var t=e.parent;;){switch(t.kind){case 208:var r=t.operatorToken.kind;return er(r)&&t.left===e?62===r?1:2:0;case 206:case 207:var n=t.operator;return 45===n||46===n?2:0;case 230:case 231:return t.initializer===e?1:0;case 199:case 191:case 212:case 217:e=t;break;case 280:if(t.name!==e)return 0;e=t.parent;break;case 279:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function Ke(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function Je(e){return Ke(e,199)}function ze(e){for(;199===e.kind;)e=e.expression;return e}function Ue(t){return ar(t)||e.isClassExpression(t)}function Ve(e){return Ue(qe(e))}function qe(t){return e.isExportAssignment(t)?t.expression:t.right}function We(t){var r=Ge(t);if(r&&ue(t)){var n=e.getJSDocAugmentsTag(t);if(n)return n.class}return r}function Ge(e){var t=Xe(e.heritageClauses,89);return t&&t.types.length>0?t.types[0]:void 0}function He(e){var t=Xe(e.heritageClauses,112);return t?t.types:void 0}function Ye(e){var t=Xe(e.heritageClauses,89);return t?t.types:void 0}function Xe(e,t){if(e)for(var r=0,n=e;r=0)return i[a];return},getGlobalDiagnostics:function(){return i=!0,t},getDiagnostics:function(i){if(i)return n.get(i)||[];var a=e.flatMapToMutable(r,(function(e){return n.get(e)}));if(!t.length)return a;return a.unshift.apply(a,t),a},reattachFileDiagnostics:function(t){e.forEach(n.get(t.fileName),(function(e){return e.file=t}))}}};var gt=/\$\{/g;var yt=/[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,ht=/[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,vt=/[\\\`]/g,bt=e.createMapFromTemplate({"\t":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","…":"\\u0085"});function xt(e,t){var r=96===t?vt:39===t?ht:yt;return e.replace(r,Dt)}function Dt(e,t,r){if(0===e.charCodeAt(0)){var n=r.charCodeAt(t+e.length);return n>=48&&n<=57?"\\x00":"\\0"}return bt.get(e)||St(e.charCodeAt(0))}function St(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}e.escapeString=xt,e.stripQuotes=function(e){var t,r=e.length;return r>=2&&e.charCodeAt(0)===e.charCodeAt(r-1)&&(39===(t=e.charCodeAt(0))||34===t||96===t)?e.substring(1,r-1):e},e.isIntrinsicJsxName=function(t){var r=t.charCodeAt(0);return r>=97&&r<=122||e.stringContains(t,"-")};var Tt=/[^\u0000-\u007F]/g;function Et(e,t){return e=xt(e,t),Tt.test(e)?e.replace(Tt,(function(e){return St(e.charCodeAt(0))})):e}e.escapeNonAsciiString=Et;var Ct=[""," "];function kt(e){return void 0===Ct[e]&&(Ct[e]=kt(e-1)+Ct[1]),Ct[e]}function Nt(){return Ct[1].length}function At(e,t,r){return t.moduleName||Ft(e,t.fileName,r&&r.fileName)}function Ft(t,r,n){var i=function(e){return t.getCanonicalFileName(e)},a=e.toPath(n?e.getDirectoryPath(n):t.getCommonSourceDirectory(),t.getCurrentDirectory(),i),o=e.getNormalizedAbsolutePath(r,t.getCurrentDirectory()),s=e.getRelativePathToDirectoryOrUrl(a,o,a,i,!1),c=e.removeFileExtension(s);return n?e.ensurePathIsNonModuleName(c):c}function Pt(t,r,n,i,a){var o=r.declarationDir||r.outDir,s=o?Ot(t,o,n,i,a):t;return e.removeFileExtension(s)+".d.ts"}function wt(e,t,r,n){return!(t.noEmitForJsFiles&&ce(e)||e.isDeclarationFile||r(e)||j(e)&&n(e.fileName))}function It(e,t,r){return Ot(e,r,t.getCurrentDirectory(),t.getCommonSourceDirectory(),(function(e){return t.getCanonicalFileName(e)}))}function Ot(t,r,n,i,a){var o=e.getNormalizedAbsolutePath(t,n);return o=0===a(o).indexOf(a(i))?o.substring(i.length):o,e.combinePaths(r,o)}function Mt(t,r){return e.getLineAndCharacterOfPosition(t,r).line}function Lt(t,r){return e.computeLineAndCharacterOfPosition(t,r).line}function Rt(e){if(e&&e.parameters.length>0){var t=2===e.parameters.length&&Bt(e.parameters[0]);return e.parameters[t?1:0]}}function Bt(e){return jt(e.name)}function jt(e){return!!e&&75===e.kind&&Kt(e)}function Kt(e){return 103===e.originalKeywordKind}function Jt(t){var r=t.type;return r||!ue(t)?r:e.isJSDocPropertyLikeTag(t)?t.typeExpression&&t.typeExpression.type:e.getJSDocType(t)}function zt(e,t,r,n){Ut(e,t,r.pos,n)}function Ut(e,t,r,n){n&&n.length&&r!==n[0].pos&&Lt(e,r)!==Lt(e,n[0].pos)&&t.writeLine()}function Vt(e,t,r,n,i,a,o,s){if(n&&n.length>0){i&&r.writeSpace(" ");for(var c=!1,u=0,l=n;u=62&&e<=74}function tr(e){var t=rr(e);return t&&!t.isImplements?t.class:void 0}function rr(t){return e.isExpressionWithTypeArguments(t)&&e.isHeritageClause(t.parent)&&e.isClassLike(t.parent.parent)?{class:t.parent.parent,isImplements:112===t.parent.token}:void 0}function nr(t,r){return e.isBinaryExpression(t)&&(r?62===t.operatorToken.kind:er(t.operatorToken.kind))&&e.isLeftHandSideExpression(t.left)}function ir(e){return void 0!==tr(e)}function ar(e){return 75===e.kind||or(e)}function or(t){return e.isPropertyAccessExpression(t)&&ar(t.expression)}function sr(e){return be(e)&&"prototype"===Ee(e)}e.getIndentString=kt,e.getIndentSize=Nt,e.createTextWriter=function(t){var r,n,i,a,o,s=!1;function c(t){var n=e.computeLineStarts(t);n.length>1?(a=a+n.length-1,o=r.length-t.length+e.last(n),i=o-r.length==0):i=!1}function u(e){e&&e.length&&(i&&(e=kt(n)+e,i=!1),r+=e,c(e))}function l(e){e&&(s=!1),u(e)}function _(){r="",n=0,i=!0,a=0,o=0,s=!1}return _(),{write:l,rawWrite:function(e){void 0!==e&&(r+=e,c(e),s=!1)},writeLiteral:function(e){e&&e.length&&l(e)},writeLine:function(){i||(a++,o=(r+=t).length,i=!0,s=!1)},increaseIndent:function(){n++},decreaseIndent:function(){n--},getIndent:function(){return n},getTextPos:function(){return r.length},getLine:function(){return a},getColumn:function(){return i?n*Nt():r.length-o},getText:function(){return r},isAtStartOfLine:function(){return i},hasTrailingComment:function(){return s},hasTrailingWhitespace:function(){return!!r.length&&e.isWhiteSpaceLike(r.charCodeAt(r.length-1))},clear:_,reportInaccessibleThisError:e.noop,reportPrivateInBaseOfClassExpression:e.noop,reportInaccessibleUniqueSymbolError:e.noop,trackSymbol:e.noop,writeKeyword:l,writeOperator:l,writeParameter:l,writeProperty:l,writePunctuation:l,writeSpace:l,writeStringLiteral:l,writeSymbol:function(e,t){return l(e)},writeTrailingSemicolon:l,writeComment:function(e){e&&(s=!0),u(e)},getTextPosWithWriteLine:function(){return i?r.length:r.length+t.length}}},e.getTrailingSemicolonDeferringWriter=function(e){var t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return r(r({},e),{writeTrailingSemicolon:function(){t=!0},writeLiteral:function(t){n(),e.writeLiteral(t)},writeStringLiteral:function(t){n(),e.writeStringLiteral(t)},writeSymbol:function(t,r){n(),e.writeSymbol(t,r)},writePunctuation:function(t){n(),e.writePunctuation(t)},writeKeyword:function(t){n(),e.writeKeyword(t)},writeOperator:function(t){n(),e.writeOperator(t)},writeParameter:function(t){n(),e.writeParameter(t)},writeSpace:function(t){n(),e.writeSpace(t)},writeProperty:function(t){n(),e.writeProperty(t)},writeComment:function(t){n(),e.writeComment(t)},writeLine:function(){n(),e.writeLine()},increaseIndent:function(){n(),e.increaseIndent()},decreaseIndent:function(){n(),e.decreaseIndent()}})},e.getResolvedExternalModuleName=At,e.getExternalModuleNameFromDeclaration=function(e,t,r){var n=t.getExternalModuleFileFromDeclaration(r);if(n&&!n.isDeclarationFile)return At(e,n)},e.getExternalModuleNameFromPath=Ft,e.getOwnEmitOutputFilePath=function(t,r,n){var i=r.getCompilerOptions();return(i.outDir?e.removeFileExtension(It(t,r,i.outDir)):e.removeFileExtension(t))+n},e.getDeclarationEmitOutputFilePath=function(e,t){return Pt(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),(function(e){return t.getCanonicalFileName(e)}))},e.getDeclarationEmitOutputFilePathWorker=Pt,e.getSourceFilesToEmit=function(t,r){var n=t.getCompilerOptions(),i=function(e){return t.isSourceFileFromExternalLibrary(e)},a=function(e){return t.getResolvedProjectReferenceToRedirect(e)};if(n.outFile||n.out){var o=e.getEmitModuleKind(n),s=n.emitDeclarationOnly||o===e.ModuleKind.AMD||o===e.ModuleKind.System;return e.filter(t.getSourceFiles(),(function(t){return(s||!e.isExternalModule(t))&&wt(t,n,i,a)}))}var c=void 0===r?t.getSourceFiles():[r];return e.filter(c,(function(e){return wt(e,n,i,a)}))},e.sourceFileMayBeEmitted=wt,e.getSourceFilePathInNewDir=It,e.getSourceFilePathInNewDirWorker=Ot,e.writeFile=function(t,r,n,i,a,o){t.writeFile(n,i,a,(function(t){r.add(e.createCompilerDiagnostic(e.Diagnostics.Could_not_write_file_0_Colon_1,n,t))}),o)},e.getLineOfLocalPosition=Mt,e.getLineOfLocalPositionFromLineMap=Lt,e.getFirstConstructorWithBody=function(t){return e.find(t.members,(function(t){return e.isConstructorDeclaration(t)&&m(t.body)}))},e.getSetAccessorValueParameter=Rt,e.getSetAccessorTypeAnnotationNode=function(e){var t=Rt(e);return t&&t.type},e.getThisParameter=function(t){if(t.parameters.length&&!e.isJSDocSignature(t)){var r=t.parameters[0];if(Bt(r))return r}},e.parameterIsThisKeyword=Bt,e.isThisIdentifier=jt,e.identifierIsThisKeyword=Kt,e.getAllAccessorDeclarations=function(t,r){var n,i,a,o;return rt(r)?(n=r,162===r.kind?a=r:163===r.kind?o=r:e.Debug.fail("Accessor has wrong kind")):e.forEach(t,(function(t){e.isAccessor(t)&&Gt(t,32)===Gt(r,32)&&(at(t.name)===at(r.name)&&(n?i||(i=t):n=t,162!==t.kind||a||(a=t),163!==t.kind||o||(o=t)))})),{firstAccessor:n,secondAccessor:i,getAccessor:a,setAccessor:o}},e.getEffectiveTypeAnnotationNode=Jt,e.getTypeAnnotationNode=function(e){return e.type},e.getEffectiveReturnTypeNode=function(t){return e.isJSDocSignature(t)?t.type&&t.type.typeExpression&&t.type.typeExpression.type:t.type||(ue(t)?e.getJSDocReturnType(t):void 0)},e.getJSDocTypeParameterDeclarations=function(t){return e.flatMap(e.getJSDocTags(t),(function(t){return function(t){return e.isJSDocTemplateTag(t)&&!(301===t.parent.kind&&t.parent.tags.some(Ae))}(t)?t.typeParameters:void 0}))},e.getEffectiveSetAccessorTypeAnnotationNode=function(e){var t=Rt(e);return t&&Jt(t)},e.emitNewLineBeforeLeadingComments=zt,e.emitNewLineBeforeLeadingCommentsOfPosition=Ut,e.emitNewLineBeforeLeadingCommentOfPosition=function(e,t,r,n){r!==n&&Lt(e,r)!==Lt(e,n)&&t.writeLine()},e.emitComments=Vt,e.emitDetachedComments=function(t,r,n,i,a,o,s){var c,u;if(s?0===a.pos&&(c=e.filter(e.getLeadingCommentRanges(t,a.pos),(function(e){return v(t,e.pos)}))):c=e.getLeadingCommentRanges(t,a.pos),c){for(var l=[],_=void 0,d=0,p=c;d=m+2)break}l.push(f),_=f}if(l.length){m=Lt(r,e.last(l).end);Lt(r,e.skipTrivia(t,a.pos))>=m+2&&(zt(r,n,a,c),Vt(t,r,n,l,!1,!0,o,i),u={nodePos:a.pos,detachedCommentEndPos:e.last(l).end})}}return u},e.writeCommentRange=function(t,r,n,i,a,o){if(42===t.charCodeAt(i+1))for(var s=e.computeLineAndCharacterOfPosition(r,i),c=r.length,u=void 0,l=i,_=s.line;l0){var f=p%Nt(),m=kt((p-f)/Nt());for(n.rawWrite(m);f;)n.rawWrite(" "),f--}else n.rawWrite("")}qt(t,a,n,o,l,d),l=d}else n.writeComment(t.substring(i,a))},e.hasModifiers=function(e){return 0!==Qt(e)},e.hasModifier=Gt,e.hasStaticModifier=Ht,e.hasReadonlyModifier=Yt,e.getSelectedModifierFlags=Xt,e.getModifierFlags=Qt,e.getModifierFlagsNoCache=$t,e.modifierToFlag=Zt,e.isLogicalOperator=function(e){return 56===e||55===e||53===e},e.isAssignmentOperator=er,e.tryGetClassExtendingExpressionWithTypeArguments=tr,e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments=rr,e.isAssignmentExpression=nr,e.isDestructuringAssignment=function(e){if(nr(e,!0)){var t=e.left.kind;return 192===t||191===t}return!1},e.isExpressionWithTypeArgumentsInClassExtendsClause=ir,e.isEntityNameExpression=ar,e.getFirstIdentifier=function(e){switch(e.kind){case 75:return e;case 152:do{e=e.left}while(75!==e.kind);return e;case 193:do{e=e.expression}while(75!==e.kind);return e}},e.isDottedName=function e(t){return 75===t.kind||103===t.kind||193===t.kind&&e(t.expression)||199===t.kind&&e(t.expression)},e.isPropertyAccessEntityNameExpression=or,e.tryGetPropertyAccessOrIdentifierToString=function t(r){return e.isPropertyAccessExpression(r)?t(r.expression)+"."+r.name:e.isIdentifier(r)?e.unescapeLeadingUnderscores(r.escapedText):void 0},e.isPrototypeAccess=sr,e.isRightSideOfQualifiedNameOrPropertyAccess=function(e){return 152===e.parent.kind&&e.parent.right===e||193===e.parent.kind&&e.parent.name===e},e.isEmptyObjectLiteral=function(e){return 192===e.kind&&0===e.properties.length},e.isEmptyArrayLiteral=function(e){return 191===e.kind&&0===e.elements.length},e.getLocalSymbolForExportDefault=function(t){return function(t){return t&&e.length(t.declarations)>0&&Gt(t.declarations[0],512)}(t)?t.declarations[0].localSymbol:void 0},e.tryExtractTSExtension=function(t){return e.find(e.supportedTSExtensionsForExtractExtension,(function(r){return e.fileExtensionIs(t,r)}))};var cr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function ur(t){for(var r,n,i,a,o="",s=function(t){for(var r=[],n=t.length,i=0;i>6|192),r.push(63&a|128)):a<65536?(r.push(a>>12|224),r.push(a>>6&63|128),r.push(63&a|128)):a<131072?(r.push(a>>18|240),r.push(a>>12&63|128),r.push(a>>6&63|128),r.push(63&a|128)):e.Debug.assert(!1,"Unexpected code point")}return r}(t),c=0,u=s.length;c>2,n=(3&s[c])<<4|s[c+1]>>4,i=(15&s[c+1])<<2|s[c+2]>>6,a=63&s[c+2],c+1>=u?i=a=64:c+2>=u&&(a=64),o+=cr.charAt(r)+cr.charAt(n)+cr.charAt(i)+cr.charAt(a),c+=3;return o}e.convertToBase64=ur,e.base64encode=function(e,t){return e&&e.base64encode?e.base64encode(t):ur(t)},e.base64decode=function(e,t){if(e&&e.base64decode)return e.base64decode(t);for(var r=t.length,n=[],i=0;i>4&3,l=(15&o)<<4|s>>2&15,_=(3&s)<<6|63&c;0===l&&0!==s?n.push(u):0===_&&0!==c?n.push(u,l):n.push(u,l,_),i+=4}return function(e){for(var t="",r=0,n=e.length;r=t||-1===r),{pos:t,end:r}}function fr(e,t){return pr(t,e.end)}function mr(e){return e.decorators&&e.decorators.length>0?fr(e,e.decorators.end):e}function gr(e,t,r){return yr(hr(e,r),t.end,r)}function yr(e,t,r){return e===t||Mt(r,e)===Mt(r,t)}function hr(t,r){return e.positionIsSynthesized(t.pos)?-1:e.skipTrivia(r.text,t.pos)}function vr(e){return void 0!==e.initializer}function br(e){return 33554432&e.flags?e.checkFlags:0}function xr(t){var r=t.parent;if(!r)return 0;switch(r.kind){case 199:return xr(r);case 207:case 206:var n=r.operator;return 45===n||46===n?c():0;case 208:var i=r,a=i.left,o=i.operatorToken;return a===t&&er(o.kind)?62===o.kind?1:c():0;case 193:return r.name!==t?0:xr(r);case 279:var s=xr(r.parent);return t===r.name?function(t){switch(t){case 0:return 1;case 1:return 0;case 2:return 2;default:return e.Debug.assertNever(t)}}(s):s;case 280:return t===r.objectAssignmentInitializer?0:xr(r.parent);case 191:return xr(r);default:return 0}function c(){return r.parent&&225===function(e){for(;199===e.kind;)e=e.parent;return e}(r.parent).kind?1:2}}function Dr(e,t,r){var n=r.onDeleteValue,i=r.onExistingValue;e.forEach((function(r,a){var o=t.get(a);void 0===o?(e.delete(a),n(r,a)):i&&i(r,o,a)}))}function Sr(e){if(32&e.flags){var t=Tr(e);return!!t&&Gt(t,128)}return!1}function Tr(t){return e.find(t.declarations,e.isClassLike)}function Er(e){return 3899392&e.flags?e.objectFlags:0}function Cr(e){return 193===e.kind||194===e.kind}e.getNewLineCharacter=function(t,r){switch(t.newLine){case 0:return _r;case 1:return dr}return r?r():e.sys?e.sys.newLine:_r},e.createRange=pr,e.moveRangeEnd=function(e,t){return pr(e.pos,t)},e.moveRangePos=fr,e.moveRangePastDecorators=mr,e.moveRangePastModifiers=function(e){return e.modifiers&&e.modifiers.length>0?fr(e,e.modifiers.end):mr(e)},e.isCollapsedRange=function(e){return e.pos===e.end},e.createTokenRange=function(t,r){return pr(t,t+e.tokenToString(r).length)},e.rangeIsOnSingleLine=function(e,t){return gr(e,e,t)},e.rangeStartPositionsAreOnSameLine=function(e,t,r){return yr(hr(e,r),hr(t,r),r)},e.rangeEndPositionsAreOnSameLine=function(e,t,r){return yr(e.end,t.end,r)},e.rangeStartIsOnSameLineAsRangeEnd=gr,e.rangeEndIsOnSameLineAsRangeStart=function(e,t,r){return yr(e.end,hr(t,r),r)},e.isNodeArrayMultiLine=function(e,t){return!yr(e.pos,e.end,t)},e.positionsAreOnSameLine=yr,e.getStartPositionOfRange=hr,e.isDeclarationNameOfEnumOrNamespace=function(t){var r=e.getParseTreeNode(t);if(r)switch(r.parent.kind){case 247:case 248:return r===r.parent.name}return!1},e.getInitializedVariables=function(t){return e.filter(t.declarations,vr)},e.isWatchSet=function(e){return e.watch&&e.hasOwnProperty("watch")},e.closeFileWatcher=function(e){e.close()},e.getCheckFlags=br,e.getDeclarationModifierFlagsFromSymbol=function(t){if(t.valueDeclaration){var r=e.getCombinedModifierFlags(t.valueDeclaration);return t.parent&&32&t.parent.flags?r:-29&r}if(6&br(t)){var n=t.checkFlags;return(1024&n?8:256&n?4:16)|(2048&n?32:0)}return 4194304&t.flags?36:0},e.skipAlias=function(e,t){return 2097152&e.flags?t.getAliasedSymbol(e):e},e.getCombinedLocalAndExportSymbolFlags=function(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags},e.isWriteOnlyAccess=function(e){return 1===xr(e)},e.isWriteAccess=function(e){return 0!==xr(e)},function(e){e[e.Read=0]="Read",e[e.Write=1]="Write",e[e.ReadWrite=2]="ReadWrite"}(lr||(lr={})),e.compareDataObjects=function e(t,r){if(!t||!r||Object.keys(t).length!==Object.keys(r).length)return!1;for(var n in t)if("object"===f(t[n])){if(!e(t[n],r[n]))return!1}else if("function"!=typeof t[n]&&t[n]!==r[n])return!1;return!0},e.clearMap=function(e,t){e.forEach(t),e.clear()},e.mutateMapSkippingNewValues=Dr,e.mutateMap=function(e,t,r){Dr(e,t,r);var n=r.createNewValue;t.forEach((function(t,r){e.has(r)||e.set(r,n(r,t))}))},e.isAbstractConstructorType=function(e){return!!(16&Er(e))&&!!e.symbol&&Sr(e.symbol)},e.isAbstractConstructorSymbol=Sr,e.getClassLikeDeclarationOfSymbol=Tr,e.getObjectFlags=Er,e.typeHasCallOrConstructSignatures=function(e,t){return 0!==t.getSignaturesOfType(e,0).length||0!==t.getSignaturesOfType(e,1).length},e.forSomeAncestorDirectory=function(t,r){return!!e.forEachAncestorDirectory(t,(function(e){return!!r(e)||void 0}))},e.isUMDExportSymbol=function(t){return!!t&&!!t.declarations&&!!t.declarations[0]&&e.isNamespaceExportDeclaration(t.declarations[0])},e.showModuleSpecifier=function(t){var r=t.moduleSpecifier;return e.isStringLiteral(r)?r.text:S(r)},e.getLastChild=function(t){var r;return e.forEachChild(t,(function(e){m(e)&&(r=e)}),(function(e){for(var t=e.length-1;t>=0;t--)if(m(e[t])){r=e[t];break}})),r},e.addToSeen=function(e,t,r){return void 0===r&&(r=!0),t=String(t),!e.has(t)&&(e.set(t,r),!0)},e.isObjectTypeDeclaration=function(t){return e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isTypeLiteralNode(t)},e.isTypeNodeKind=function(e){return e>=167&&e<=187||124===e||147===e||139===e||150===e||140===e||127===e||142===e||143===e||103===e||109===e||145===e||99===e||136===e||215===e||293===e||294===e||295===e||296===e||297===e||298===e||299===e},e.isAccessExpression=Cr,e.isBundleFileTextLike=function(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}},e.getDotOrQuestionDotToken=function(t){return t.questionDotToken||e.createNode(24,t.expression.end,t.name.pos)}}(s||(s={})),function(e){function t(e){return e.start+e.length}function r(e){return 0===e.length}function n(e,t){var r=a(e,t);return r&&0===r.length?void 0:r}function i(e,t,r,n){return r<=e+t&&r+n>=e}function a(e,r){var n=Math.max(e.start,r.start),i=Math.min(t(e),t(r));return n<=i?s(n,i):void 0}function o(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function s(e,t){return o(e,t-e)}function c(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function u(t){return!!e.isBindingPattern(t)&&e.every(t.elements,l)}function l(t){return!!e.isOmittedExpression(t)||u(t.name)}function _(t){for(var r=t.parent;e.isBindingElement(r.parent);)r=r.parent.parent;return r.parent}function d(t,r){e.isBindingElement(t)&&(t=_(t));var n=r(t);return 241===t.kind&&(t=t.parent),t&&242===t.kind&&(n|=r(t),t=t.parent),t&&224===t.kind&&(n|=r(t)),n}function p(e,t){if(e)for(;void 0!==e.original;)e=e.original;return!t||t(e)?e:void 0}function f(e){return 0==(8&e.flags)}function m(e){var t=e;return t.length>=3&&95===t.charCodeAt(0)&&95===t.charCodeAt(1)&&95===t.charCodeAt(2)?t.substr(1):t}function g(e){return m(e.escapedText)}function y(t){var r=t.parent.parent;if(r){if(e.isDeclaration(r))return h(r);switch(r.kind){case 224:if(r.declarationList&&r.declarationList.declarations[0])return h(r.declarationList.declarations[0]);break;case 225:var n=r.expression;switch(208===n.kind&&62===n.operatorToken.kind&&(n=n.left),n.kind){case 193:return n.name;case 194:var i=n.argumentExpression;if(e.isIdentifier(i))return i}break;case 199:return h(r.expression);case 237:if(e.isDeclaration(r.statement)||e.isExpression(r.statement))return h(r.statement)}}}function h(t){var r=D(t);return r&&e.isIdentifier(r)?r:void 0}function v(e){return e.name||y(e)}function b(e){return!!e.name}function x(t){switch(t.kind){case 75:return t;case 316:case 310:var r=t.name;if(152===r.kind)return r.right;break;case 195:case 208:var n=t;switch(e.getAssignmentDeclarationKind(n)){case 1:case 4:case 5:case 3:return e.getElementOrPropertyAccessArgumentExpressionOrName(n.left);case 7:case 8:case 9:return n.arguments[1];default:return}case 315:return v(t);case 309:return y(t);case 258:var i=t.expression;return e.isIdentifier(i)?i:void 0;case 194:var a=t;if(e.isBindableStaticElementAccessExpression(a))return a.argumentExpression}return t.name}function D(t){if(void 0!==t)return x(t)||(e.isFunctionExpression(t)||e.isClassExpression(t)?function(t){if(!t.parent)return;if(e.isPropertyAssignment(t.parent)||e.isBindingElement(t.parent))return t.parent.name;if(e.isBinaryExpression(t.parent)&&t===t.parent.right){if(e.isIdentifier(t.parent.left))return t.parent.left;if(e.isAccessExpression(t.parent.left))return e.getElementOrPropertyAccessArgumentExpressionOrName(t.parent.left)}else if(e.isVariableDeclaration(t.parent)&&e.isIdentifier(t.parent.name))return t.parent.name}(t):void 0)}function S(t){if(t.name){if(e.isIdentifier(t.name)){var r=t.name.escapedText;return k(t.parent).filter((function(t){return e.isJSDocParameterTag(t)&&e.isIdentifier(t.name)&&t.name.escapedText===r}))}var n=t.parent.parameters.indexOf(t);e.Debug.assert(n>-1,"Parameters should always be in their parents' parameter list");var i=k(t.parent).filter(e.isJSDocParameterTag);if(n=e.start&&r=e.pos&&t<=e.end},e.textSpanContainsTextSpan=function(e,r){return r.start>=e.start&&t(r)<=t(e)},e.textSpanOverlapsWith=function(e,t){return void 0!==n(e,t)},e.textSpanOverlap=n,e.textSpanIntersectsWithTextSpan=function(e,t){return i(e.start,e.length,t.start,t.length)},e.textSpanIntersectsWith=function(e,t,r){return i(e.start,e.length,t,r)},e.decodedTextSpanIntersectsWith=i,e.textSpanIntersectsWithPosition=function(e,r){return r<=t(e)&&r>=e.start},e.textSpanIntersection=a,e.createTextSpan=o,e.createTextSpanFromBounds=s,e.textChangeRangeNewSpan=function(e){return o(e.span.start,e.newLength)},e.textChangeRangeIsUnchanged=function(e){return r(e.span)&&0===e.newLength},e.createTextChangeRange=c,e.unchangedTextChangeRange=c(o(0,0),0),e.collapseTextChangeRangesAcrossMultipleVersions=function(r){if(0===r.length)return e.unchangedTextChangeRange;if(1===r.length)return r[0];for(var n=r[0],i=n.span.start,a=t(n.span),o=i+n.newLength,u=1;u=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?"_"+e:e},e.unescapeLeadingUnderscores=m,e.idText=g,e.symbolName=function(e){return m(e.escapedName)},e.nodeHasName=function t(r,n){return!(!b(r)||!e.isIdentifier(r.name)||g(r.name)!==g(n))||!(!e.isVariableStatement(r)||!e.some(r.declarationList.declarations,(function(e){return t(e,n)})))},e.getNameOfJSDocTypedef=v,e.isNamedDeclaration=b,e.getNonAssignedNameOfDeclaration=x,e.getNameOfDeclaration=D,e.getJSDocParameterTags=S,e.getJSDocTypeParameterTags=function(t){var r=t.name.escapedText;return k(t.parent).filter((function(t){return e.isJSDocTemplateTag(t)&&t.typeParameters.some((function(e){return e.name.escapedText===r}))}))},e.hasJSDocParameterTags=function(t){return!!N(t,e.isJSDocParameterTag)},e.getJSDocAugmentsTag=function(t){return N(t,e.isJSDocAugmentsTag)},e.getJSDocClassTag=function(t){return N(t,e.isJSDocClassTag)},e.getJSDocEnumTag=function(t){return N(t,e.isJSDocEnumTag)},e.getJSDocThisTag=function(t){return N(t,e.isJSDocThisTag)},e.getJSDocReturnTag=T,e.getJSDocTemplateTag=function(t){return N(t,e.isJSDocTemplateTag)},e.getJSDocTypeTag=E,e.getJSDocType=C,e.getJSDocReturnType=function(t){var r=T(t);if(r&&r.typeExpression)return r.typeExpression.type;var n=E(t);if(n&&n.typeExpression){var i=n.typeExpression.type;if(e.isTypeLiteralNode(i)){var a=e.find(i.members,e.isCallSignatureDeclaration);return a&&a.type}if(e.isFunctionTypeNode(i))return i.type}},e.getJSDocTags=k,e.getAllJSDocTagsOfKind=function(e,t){return k(e).filter((function(e){return e.kind===t}))},e.getEffectiveTypeParameterDeclarations=function(t){if(e.isJSDocSignature(t))return e.emptyArray;if(e.isJSDocTypeAlias(t))return e.Debug.assert(301===t.parent.kind),e.flatMap(t.parent.tags,(function(t){return e.isJSDocTemplateTag(t)?t.typeParameters:void 0}));if(t.typeParameters)return t.typeParameters;if(e.isInJSFile(t)){var r=e.getJSDocTypeParameterDeclarations(t);if(r.length)return r;var n=C(t);if(n&&e.isFunctionTypeNode(n)&&n.typeParameters)return n.typeParameters}return e.emptyArray},e.getEffectiveConstraintOfTypeParameter=function(t){return t.constraint?t.constraint:e.isJSDocTemplateTag(t.parent)&&t===t.parent.typeParameters[0]?t.parent.constraint:void 0}}(s||(s={})),function(e){function t(e){return 75===e.kind}function r(e){return 168===e.kind}function n(e){return 193===e.kind}function i(e){return 194===e.kind}function a(e){return 195===e.kind}function o(e){switch(e.kind){case 285:case 286:return!0;default:return!1}}e.isNumericLiteral=function(e){return 8===e.kind},e.isBigIntLiteral=function(e){return 9===e.kind},e.isStringLiteral=function(e){return 10===e.kind},e.isJsxText=function(e){return 11===e.kind},e.isRegularExpressionLiteral=function(e){return 13===e.kind},e.isNoSubstitutionTemplateLiteral=function(e){return 14===e.kind},e.isTemplateHead=function(e){return 15===e.kind},e.isTemplateMiddle=function(e){return 16===e.kind},e.isTemplateTail=function(e){return 17===e.kind},e.isIdentifier=t,e.isQualifiedName=function(e){return 152===e.kind},e.isComputedPropertyName=function(e){return 153===e.kind},e.isTypeParameterDeclaration=function(e){return 154===e.kind},e.isParameter=function(e){return 155===e.kind},e.isDecorator=function(e){return 156===e.kind},e.isPropertySignature=function(e){return 157===e.kind},e.isPropertyDeclaration=function(e){return 158===e.kind},e.isMethodSignature=function(e){return 159===e.kind},e.isMethodDeclaration=function(e){return 160===e.kind},e.isConstructorDeclaration=function(e){return 161===e.kind},e.isGetAccessorDeclaration=function(e){return 162===e.kind},e.isSetAccessorDeclaration=function(e){return 163===e.kind},e.isCallSignatureDeclaration=function(e){return 164===e.kind},e.isConstructSignatureDeclaration=function(e){return 165===e.kind},e.isIndexSignatureDeclaration=function(e){return 166===e.kind},e.isGetOrSetAccessorDeclaration=function(e){return 163===e.kind||162===e.kind},e.isTypePredicateNode=function(e){return 167===e.kind},e.isTypeReferenceNode=r,e.isFunctionTypeNode=function(e){return 169===e.kind},e.isConstructorTypeNode=function(e){return 170===e.kind},e.isTypeQueryNode=function(e){return 171===e.kind},e.isTypeLiteralNode=function(e){return 172===e.kind},e.isArrayTypeNode=function(e){return 173===e.kind},e.isTupleTypeNode=function(e){return 174===e.kind},e.isUnionTypeNode=function(e){return 177===e.kind},e.isIntersectionTypeNode=function(e){return 178===e.kind},e.isConditionalTypeNode=function(e){return 179===e.kind},e.isInferTypeNode=function(e){return 180===e.kind},e.isParenthesizedTypeNode=function(e){return 181===e.kind},e.isThisTypeNode=function(e){return 182===e.kind},e.isTypeOperatorNode=function(e){return 183===e.kind},e.isIndexedAccessTypeNode=function(e){return 184===e.kind},e.isMappedTypeNode=function(e){return 185===e.kind},e.isLiteralTypeNode=function(e){return 186===e.kind},e.isImportTypeNode=function(e){return 187===e.kind},e.isObjectBindingPattern=function(e){return 188===e.kind},e.isArrayBindingPattern=function(e){return 189===e.kind},e.isBindingElement=function(e){return 190===e.kind},e.isArrayLiteralExpression=function(e){return 191===e.kind},e.isObjectLiteralExpression=function(e){return 192===e.kind},e.isPropertyAccessExpression=n,e.isPropertyAccessChain=function(e){return n(e)&&!!(32&e.flags)},e.isElementAccessExpression=i,e.isElementAccessChain=function(e){return i(e)&&!!(32&e.flags)},e.isCallExpression=a,e.isCallChain=function(e){return a(e)&&!!(32&e.flags)},e.isOptionalChain=function(e){var t=e.kind;return!!(32&e.flags)&&(193===t||194===t||195===t)},e.isExpressionOfOptionalChainRoot=function(t){return e.isOptionalChainRoot(t.parent)&&t.parent.expression===t},e.isNullishCoalesce=function(e){return 208===e.kind&&60===e.operatorToken.kind},e.isNewExpression=function(e){return 196===e.kind},e.isTaggedTemplateExpression=function(e){return 197===e.kind},e.isTypeAssertion=function(e){return 198===e.kind},e.isConstTypeReference=function(e){return r(e)&&t(e.typeName)&&"const"===e.typeName.escapedText&&!e.typeArguments},e.isParenthesizedExpression=function(e){return 199===e.kind},e.skipPartiallyEmittedExpressions=function(e){for(;319===e.kind;)e=e.expression;return e},e.isFunctionExpression=function(e){return 200===e.kind},e.isArrowFunction=function(e){return 201===e.kind},e.isDeleteExpression=function(e){return 202===e.kind},e.isTypeOfExpression=function(e){return 203===e.kind},e.isVoidExpression=function(e){return 204===e.kind},e.isAwaitExpression=function(e){return 205===e.kind},e.isPrefixUnaryExpression=function(e){return 206===e.kind},e.isPostfixUnaryExpression=function(e){return 207===e.kind},e.isBinaryExpression=function(e){return 208===e.kind},e.isConditionalExpression=function(e){return 209===e.kind},e.isTemplateExpression=function(e){return 210===e.kind},e.isYieldExpression=function(e){return 211===e.kind},e.isSpreadElement=function(e){return 212===e.kind},e.isClassExpression=function(e){return 213===e.kind},e.isOmittedExpression=function(e){return 214===e.kind},e.isExpressionWithTypeArguments=function(e){return 215===e.kind},e.isAsExpression=function(e){return 216===e.kind},e.isNonNullExpression=function(e){return 217===e.kind},e.isMetaProperty=function(e){return 218===e.kind},e.isTemplateSpan=function(e){return 220===e.kind},e.isSemicolonClassElement=function(e){return 221===e.kind},e.isBlock=function(e){return 222===e.kind},e.isVariableStatement=function(e){return 224===e.kind},e.isEmptyStatement=function(e){return 223===e.kind},e.isExpressionStatement=function(e){return 225===e.kind},e.isIfStatement=function(e){return 226===e.kind},e.isDoStatement=function(e){return 227===e.kind},e.isWhileStatement=function(e){return 228===e.kind},e.isForStatement=function(e){return 229===e.kind},e.isForInStatement=function(e){return 230===e.kind},e.isForOfStatement=function(e){return 231===e.kind},e.isContinueStatement=function(e){return 232===e.kind},e.isBreakStatement=function(e){return 233===e.kind},e.isBreakOrContinueStatement=function(e){return 233===e.kind||232===e.kind},e.isReturnStatement=function(e){return 234===e.kind},e.isWithStatement=function(e){return 235===e.kind},e.isSwitchStatement=function(e){return 236===e.kind},e.isLabeledStatement=function(e){return 237===e.kind},e.isThrowStatement=function(e){return 238===e.kind},e.isTryStatement=function(e){return 239===e.kind},e.isDebuggerStatement=function(e){return 240===e.kind},e.isVariableDeclaration=function(e){return 241===e.kind},e.isVariableDeclarationList=function(e){return 242===e.kind},e.isFunctionDeclaration=function(e){return 243===e.kind},e.isClassDeclaration=function(e){return 244===e.kind},e.isInterfaceDeclaration=function(e){return 245===e.kind},e.isTypeAliasDeclaration=function(e){return 246===e.kind},e.isEnumDeclaration=function(e){return 247===e.kind},e.isModuleDeclaration=function(e){return 248===e.kind},e.isModuleBlock=function(e){return 249===e.kind},e.isCaseBlock=function(e){return 250===e.kind},e.isNamespaceExportDeclaration=function(e){return 251===e.kind},e.isImportEqualsDeclaration=function(e){return 252===e.kind},e.isImportDeclaration=function(e){return 253===e.kind},e.isImportClause=function(e){return 254===e.kind},e.isNamespaceImport=function(e){return 255===e.kind},e.isNamedImports=function(e){return 256===e.kind},e.isImportSpecifier=function(e){return 257===e.kind},e.isExportAssignment=function(e){return 258===e.kind},e.isExportDeclaration=function(e){return 259===e.kind},e.isNamedExports=function(e){return 260===e.kind},e.isExportSpecifier=function(e){return 261===e.kind},e.isMissingDeclaration=function(e){return 262===e.kind},e.isExternalModuleReference=function(e){return 263===e.kind},e.isJsxElement=function(e){return 264===e.kind},e.isJsxSelfClosingElement=function(e){return 265===e.kind},e.isJsxOpeningElement=function(e){return 266===e.kind},e.isJsxClosingElement=function(e){return 267===e.kind},e.isJsxFragment=function(e){return 268===e.kind},e.isJsxOpeningFragment=function(e){return 269===e.kind},e.isJsxClosingFragment=function(e){return 270===e.kind},e.isJsxAttribute=function(e){return 271===e.kind},e.isJsxAttributes=function(e){return 272===e.kind},e.isJsxSpreadAttribute=function(e){return 273===e.kind},e.isJsxExpression=function(e){return 274===e.kind},e.isCaseClause=function(e){return 275===e.kind},e.isDefaultClause=function(e){return 276===e.kind},e.isHeritageClause=function(e){return 277===e.kind},e.isCatchClause=function(e){return 278===e.kind},e.isPropertyAssignment=function(e){return 279===e.kind},e.isShorthandPropertyAssignment=function(e){return 280===e.kind},e.isSpreadAssignment=function(e){return 281===e.kind},e.isEnumMember=function(e){return 282===e.kind},e.isSourceFile=function(e){return 288===e.kind},e.isBundle=function(e){return 289===e.kind},e.isUnparsedSource=function(e){return 290===e.kind},e.isUnparsedPrepend=function(e){return 284===e.kind},e.isUnparsedTextLike=o,e.isUnparsedNode=function(e){return o(e)||283===e.kind||287===e.kind},e.isJSDocTypeExpression=function(e){return 292===e.kind},e.isJSDocAllType=function(e){return 293===e.kind},e.isJSDocUnknownType=function(e){return 294===e.kind},e.isJSDocNullableType=function(e){return 295===e.kind},e.isJSDocNonNullableType=function(e){return 296===e.kind},e.isJSDocOptionalType=function(e){return 297===e.kind},e.isJSDocFunctionType=function(e){return 298===e.kind},e.isJSDocVariadicType=function(e){return 299===e.kind},e.isJSDoc=function(e){return 301===e.kind},e.isJSDocAuthorTag=function(e){return 306===e.kind},e.isJSDocAugmentsTag=function(e){return 305===e.kind},e.isJSDocClassTag=function(e){return 307===e.kind},e.isJSDocEnumTag=function(e){return 309===e.kind},e.isJSDocThisTag=function(e){return 312===e.kind},e.isJSDocParameterTag=function(e){return 310===e.kind},e.isJSDocReturnTag=function(e){return 311===e.kind},e.isJSDocTypeTag=function(e){return 313===e.kind},e.isJSDocTemplateTag=function(e){return 314===e.kind},e.isJSDocTypedefTag=function(e){return 315===e.kind},e.isJSDocPropertyTag=function(e){return 316===e.kind},e.isJSDocPropertyLikeTag=function(e){return 316===e.kind||310===e.kind},e.isJSDocTypeLiteral=function(e){return 302===e.kind},e.isJSDocCallbackTag=function(e){return 308===e.kind},e.isJSDocSignature=function(e){return 303===e.kind}}(s||(s={})),function(e){function t(e){return e>=152}function r(e){return 8<=e&&e<=14}function n(e){return 14<=e&&e<=17}function i(e){switch(e){case 121:case 125:case 80:case 129:case 83:case 88:case 118:case 116:case 117:case 137:case 119:return!0}return!1}function a(t){return!!(92&e.modifierToFlag(t))}function o(e){return e&&c(e.kind)}function s(e){switch(e){case 243:case 160:case 161:case 162:case 163:case 200:case 201:return!0;default:return!1}}function c(e){switch(e){case 159:case 164:case 303:case 165:case 166:case 169:case 298:case 170:return!0;default:return s(e)}}function u(e){var t=e.kind;return 161===t||158===t||160===t||162===t||163===t||166===t||221===t}function l(e){var t=e.kind;return 165===t||164===t||157===t||159===t||166===t}function _(e){var t=e.kind;return 279===t||280===t||281===t||160===t||162===t||163===t}function d(e){switch(e.kind){case 188:case 192:return!0}return!1}function p(e){switch(e.kind){case 189:case 191:return!0}return!1}function f(e){switch(e){case 193:case 194:case 196:case 195:case 264:case 265:case 268:case 197:case 191:case 199:case 192:case 213:case 200:case 75:case 13:case 8:case 9:case 10:case 14:case 210:case 90:case 99:case 103:case 105:case 101:case 217:case 218:case 95:return!0;default:return!1}}function m(e){switch(e){case 206:case 207:case 202:case 203:case 204:case 205:case 198:return!0;default:return f(e)}}function g(t){return function(e){switch(e){case 209:case 211:case 201:case 208:case 212:case 216:case 214:case 320:case 319:return!0;default:return m(e)}}(e.skipPartiallyEmittedExpressions(t).kind)}function y(e){return 319===e.kind}function h(e){return 318===e.kind}function v(t){return e.isExportAssignment(t)||e.isExportDeclaration(t)}function b(e){return 243===e||262===e||244===e||245===e||246===e||247===e||248===e||253===e||252===e||259===e||258===e||251===e}function x(e){return 233===e||232===e||240===e||227===e||225===e||223===e||230===e||231===e||229===e||226===e||237===e||234===e||236===e||238===e||239===e||224===e||228===e||235===e||318===e||322===e||321===e}function D(e){return e.kind>=304&&e.kind<=316}function S(e){return!!e.initializer}e.isSyntaxList=function(e){return 317===e.kind},e.isNode=function(e){return t(e.kind)},e.isNodeKind=t,e.isToken=function(e){return e.kind>=0&&e.kind<=151},e.isNodeArray=function(e){return e.hasOwnProperty("pos")&&e.hasOwnProperty("end")},e.isLiteralKind=r,e.isLiteralExpression=function(e){return r(e.kind)},e.isTemplateLiteralKind=n,e.isTemplateLiteralToken=function(e){return n(e.kind)},e.isTemplateMiddleOrTemplateTail=function(e){var t=e.kind;return 16===t||17===t},e.isImportOrExportSpecifier=function(t){return e.isImportSpecifier(t)||e.isExportSpecifier(t)},e.isStringTextContainingNode=function(e){return 10===e.kind||n(e.kind)},e.isGeneratedIdentifier=function(t){return e.isIdentifier(t)&&(7&t.autoGenerateFlags)>0},e.isModifierKind=i,e.isParameterPropertyModifier=a,e.isClassMemberModifier=function(e){return a(e)||119===e},e.isModifier=function(e){return i(e.kind)},e.isEntityName=function(e){var t=e.kind;return 152===t||75===t},e.isPropertyName=function(e){var t=e.kind;return 75===t||10===t||8===t||153===t},e.isBindingName=function(e){var t=e.kind;return 75===t||188===t||189===t},e.isFunctionLike=o,e.isFunctionLikeDeclaration=function(e){return e&&s(e.kind)},e.isFunctionLikeKind=c,e.isFunctionOrModuleBlock=function(t){return e.isSourceFile(t)||e.isModuleBlock(t)||e.isBlock(t)&&o(t.parent)},e.isClassElement=u,e.isClassLike=function(e){return e&&(244===e.kind||213===e.kind)},e.isAccessor=function(e){return e&&(162===e.kind||163===e.kind)},e.isMethodOrAccessor=function(e){switch(e.kind){case 160:case 162:case 163:return!0;default:return!1}},e.isTypeElement=l,e.isClassOrTypeElement=function(e){return l(e)||u(e)},e.isObjectLiteralElementLike=_,e.isTypeNode=function(t){return e.isTypeNodeKind(t.kind)},e.isFunctionOrConstructorTypeNode=function(e){switch(e.kind){case 169:case 170:return!0}return!1},e.isBindingPattern=function(e){if(e){var t=e.kind;return 189===t||188===t}return!1},e.isAssignmentPattern=function(e){var t=e.kind;return 191===t||192===t},e.isArrayBindingElement=function(e){var t=e.kind;return 190===t||214===t},e.isDeclarationBindingElement=function(e){switch(e.kind){case 241:case 155:case 190:return!0}return!1},e.isBindingOrAssignmentPattern=function(e){return d(e)||p(e)},e.isObjectBindingOrAssignmentPattern=d,e.isArrayBindingOrAssignmentPattern=p,e.isPropertyAccessOrQualifiedNameOrImportTypeNode=function(e){var t=e.kind;return 193===t||152===t||187===t},e.isPropertyAccessOrQualifiedName=function(e){var t=e.kind;return 193===t||152===t},e.isCallLikeExpression=function(e){switch(e.kind){case 266:case 265:case 195:case 196:case 197:case 156:return!0;default:return!1}},e.isCallOrNewExpression=function(e){return 195===e.kind||196===e.kind},e.isTemplateLiteral=function(e){var t=e.kind;return 210===t||14===t},e.isLeftHandSideExpression=function(t){return f(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpression=function(t){return m(e.skipPartiallyEmittedExpressions(t).kind)},e.isUnaryExpressionWithWrite=function(e){switch(e.kind){case 207:return!0;case 206:return 45===e.operator||46===e.operator;default:return!1}},e.isExpression=g,e.isAssertionExpression=function(e){var t=e.kind;return 198===t||216===t},e.isPartiallyEmittedExpression=y,e.isNotEmittedStatement=h,e.isSyntheticReference=function(e){return 323===e.kind},e.isNotEmittedOrPartiallyEmittedNode=function(e){return h(e)||y(e)},e.isIterationStatement=function e(t,r){switch(t.kind){case 229:case 230:case 231:case 227:case 228:return!0;case 237:return r&&e(t.statement,r)}return!1},e.isScopeMarker=v,e.hasScopeMarker=function(t){return e.some(t,v)},e.needsScopeMarker=function(t){return!(e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasModifier(t,1)||e.isAmbientModule(t))},e.isExternalModuleIndicator=function(t){return e.isAnyImportOrReExport(t)||e.isExportAssignment(t)||e.hasModifier(t,1)},e.isForInOrOfStatement=function(e){return 230===e.kind||231===e.kind},e.isConciseBody=function(t){return e.isBlock(t)||g(t)},e.isFunctionBody=function(t){return e.isBlock(t)},e.isForInitializer=function(t){return e.isVariableDeclarationList(t)||g(t)},e.isModuleBody=function(e){var t=e.kind;return 249===t||248===t||75===t},e.isNamespaceBody=function(e){var t=e.kind;return 249===t||248===t},e.isJSDocNamespaceBody=function(e){var t=e.kind;return 75===t||248===t},e.isNamedImportBindings=function(e){var t=e.kind;return 256===t||255===t},e.isModuleOrEnumDeclaration=function(e){return 248===e.kind||247===e.kind},e.isDeclaration=function(t){return 154===t.kind?t.parent&&314!==t.parent.kind||e.isInJSFile(t):201===(r=t.kind)||190===r||244===r||213===r||161===r||247===r||282===r||261===r||243===r||200===r||162===r||254===r||252===r||257===r||245===r||271===r||160===r||159===r||248===r||251===r||255===r||155===r||279===r||158===r||157===r||163===r||280===r||246===r||154===r||241===r||315===r||308===r||316===r;var r},e.isDeclarationStatement=function(e){return b(e.kind)},e.isStatementButNotDeclaration=function(e){return x(e.kind)},e.isStatement=function(t){var r=t.kind;return x(r)||b(r)||function(t){if(222!==t.kind)return!1;if(void 0!==t.parent&&(239===t.parent.kind||278===t.parent.kind))return!1;return!e.isFunctionBlock(t)}(t)},e.isModuleReference=function(e){var t=e.kind;return 263===t||152===t||75===t},e.isJsxTagNameExpression=function(e){var t=e.kind;return 103===t||75===t||193===t},e.isJsxChild=function(e){var t=e.kind;return 264===t||274===t||265===t||11===t||268===t},e.isJsxAttributeLike=function(e){var t=e.kind;return 271===t||273===t},e.isStringLiteralOrJsxExpression=function(e){var t=e.kind;return 10===t||274===t},e.isJsxOpeningLikeElement=function(e){var t=e.kind;return 266===t||265===t},e.isCaseOrDefaultClause=function(e){var t=e.kind;return 275===t||276===t},e.isJSDocNode=function(e){return e.kind>=292&&e.kind<=316},e.isJSDocCommentContainingNode=function(t){return 301===t.kind||D(t)||e.isJSDocTypeLiteral(t)||e.isJSDocSignature(t)},e.isJSDocTag=D,e.isSetAccessor=function(e){return 163===e.kind},e.isGetAccessor=function(e){return 162===e.kind},e.isOptionalChainRoot=function(t){return e.isOptionalChain(t)&&!!t.questionDotToken},e.hasJSDocNodes=function(e){var t=e.jsDoc;return!!t&&t.length>0},e.hasType=function(e){return!!e.type},e.hasInitializer=S,e.hasOnlyExpressionInitializer=function(t){return S(t)&&!e.isForStatement(t)&&!e.isForInStatement(t)&&!e.isForOfStatement(t)&&!e.isJsxAttribute(t)},e.isObjectLiteralElement=function(e){return 271===e.kind||273===e.kind||_(e)},e.isTypeReferenceType=function(e){return 168===e.kind||215===e.kind};var T=1073741823;e.guessIndentation=function(t){for(var r=T,n=0,i=t;nn.next.length)return 1;return 0}(t.messageText,r.messageText)||0}function _(e){return e.target||0}function d(t){return"number"==typeof t.module?t.module:_(t)>=2?e.ModuleKind.ES2015:e.ModuleKind.CommonJS}function p(e){return!(!e.declaration&&!e.composite)}function f(e,t){return void 0===e[t]?!!e.strict:!!e[t]}function m(e,t){return t.strictFlag?f(e,t.name):e[t.name]}function g(t,r,n,i){for(var a=e.getPathComponents(e.toPath(t,n,i)),o=e.getPathComponents(e.toPath(r,n,i));!y(a[a.length-2],i)&&!y(o[o.length-2],i)&&i(a[a.length-1])===i(o[o.length-1]);)a.pop(),o.pop();return[e.getPathFromPathComponents(a),e.getPathFromPathComponents(o)]}function y(t,r){return"node_modules"===r(t)||e.startsWith(t,"@")}e.isNamedImportsOrExports=function(e){return 256===e.kind||260===e.kind},e.objectAllocator={getNodeConstructor:function(){return i},getTokenConstructor:function(){return i},getIdentifierConstructor:function(){return i},getSourceFileConstructor:function(){return i},getSymbolConstructor:function(){return t},getTypeConstructor:function(){return r},getSignatureConstructor:function(){return n},getSourceMapSourceConstructor:function(){return a}},e.formatStringFromArgs=o,e.getLocaleSpecificMessage=s,e.createFileDiagnostic=function(t,r,n,i){e.Debug.assertGreaterThanOrEqual(r,0),e.Debug.assertGreaterThanOrEqual(n,0),t&&(e.Debug.assertLessThanOrEqual(r,t.text.length),e.Debug.assertLessThanOrEqual(r+n,t.text.length));var a=s(i);return arguments.length>4&&(a=o(a,arguments,4)),{file:t,start:r,length:n,messageText:a,category:i.category,code:i.code,reportsUnnecessary:i.reportsUnnecessary}},e.formatMessage=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),r},e.createCompilerDiagnostic=function(e){var t=s(e);return arguments.length>1&&(t=o(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary}},e.createCompilerDiagnosticFromMessageChain=function(e){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText}},e.chainDiagnosticMessages=function(e,t){var r=s(t);return arguments.length>2&&(r=o(r,arguments,2)),{messageText:r,category:t.category,code:t.code,next:void 0===e||Array.isArray(e)?e:[e]}},e.concatenateDiagnosticMessageChains=function(e,t){for(var r=e;r.next;)r=r.next[0];r.next=[t]},e.compareDiagnostics=u,e.compareDiagnosticsSkipRelatedInformation=l,e.getEmitScriptTarget=_,e.getEmitModuleKind=d,e.getEmitModuleResolutionKind=function(t){var r=t.moduleResolution;return void 0===r&&(r=d(t)===e.ModuleKind.CommonJS?e.ModuleResolutionKind.NodeJs:e.ModuleResolutionKind.Classic),r},e.hasJsonModuleEmitEnabled=function(t){switch(d(t)){case e.ModuleKind.CommonJS:case e.ModuleKind.AMD:case e.ModuleKind.ES2015:case e.ModuleKind.ESNext:return!0;default:return!1}},e.unreachableCodeIsError=function(e){return!1===e.allowUnreachableCode},e.unusedLabelIsError=function(e){return!1===e.allowUnusedLabels},e.getAreDeclarationMapsEnabled=function(e){return!(!p(e)||!e.declarationMap)},e.getAllowSyntheticDefaultImports=function(t){var r=d(t);return void 0!==t.allowSyntheticDefaultImports?t.allowSyntheticDefaultImports:t.esModuleInterop||r===e.ModuleKind.System},e.getEmitDeclarations=p,e.isIncrementalCompilation=function(e){return!(!e.incremental&&!e.composite)},e.getStrictOptionValue=f,e.compilerOptionsAffectSemanticDiagnostics=function(t,r){return r!==t&&e.semanticDiagnosticsOptionDeclarations.some((function(n){return!e.isJsonEqual(m(r,n),m(t,n))}))},e.compilerOptionsAffectEmit=function(t,r){return r!==t&&e.affectsEmitOptionDeclarations.some((function(n){return!e.isJsonEqual(m(r,n),m(t,n))}))},e.getCompilerOptionValue=m,e.hasZeroOrOneAsteriskCharacter=function(e){for(var t=!1,r=0;r0;)l+=")?",m--;return l}(t,n,i,u[i])}))}function d(e){return!/[.*?]/.test(e)}function p(e,t){return"*"===e?t:"?"===e?"[^/]":"\\"+e}function m(t,r,n,i,a){t=e.normalizePath(t),a=e.normalizePath(a);var o=e.combinePaths(a,t);return{includeFilePatterns:e.map(_(n,o,"files"),(function(e){return"^"+e+"$"})),includeFilePattern:l(n,o,"files"),includeDirectoryPattern:l(n,o,"directories"),excludePattern:l(r,o,"exclude"),basePaths:y(t,n,i)}}function g(e,t){return new RegExp(e,t?"":"i")}function y(t,r,n){var i=[t];if(r){for(var a=[],o=0,s=r;o=0;n--)if(e.fileExtensionIs(t,r[n]))return T(n,r);return 0},e.adjustExtensionPriority=T,e.getNextLowestExtensionPriority=function(e,t){return e<2?2:t.length};var E=[".d.ts",".ts",".js",".tsx",".jsx",".json"];function C(t,r){return e.fileExtensionIs(t,r)?k(t,r):void 0}function k(e,t){return e.substring(0,e.length-t.length)}function N(t){e.Debug.assert(e.hasZeroOrOneAsteriskCharacter(t));var r=t.indexOf("*");return-1===r?void 0:{prefix:t.substr(0,r),suffix:t.substr(r+1)}}function A(e){return".ts"===e||".tsx"===e||".d.ts"===e}function F(t){return e.find(E,(function(r){return e.fileExtensionIs(t,r)}))}e.removeFileExtension=function(e){for(var t=0,r=E;t=0)},e.extensionIsTS=A,e.resolutionExtensionIsTSOrJson=function(e){return A(e)||".json"===e},e.extensionFromPath=function(t){var r=F(t);return void 0!==r?r:e.Debug.fail("File "+t+" has unknown extension.")},e.isAnySupportedFileExtension=function(e){return void 0!==F(e)},e.tryGetExtensionFromPath=F,e.isCheckJsEnabledForFile=function(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs},e.emptyFileSystemEntries={files:e.emptyArray,directories:e.emptyArray},e.matchPatternOrExact=function(t,r){for(var n=[],i=0,a=t;ii&&(i=o)}return{min:n,max:i}};var P=function(){function t(){this.map=e.createMap()}return t.prototype.add=function(t){this.map.set(String(e.getNodeId(t)),t)},t.prototype.tryAdd=function(e){return!this.has(e)&&(this.add(e),!0)},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach(e)},t.prototype.some=function(t){return e.forEachEntry(this.map,t)||!1},t}();e.NodeSet=P;var w=function(){function t(){this.map=e.createMap()}return t.prototype.get=function(t){var r=this.map.get(String(e.getNodeId(t)));return r&&r.value},t.prototype.getOrUpdate=function(e,t){var r=this.get(e);if(r)return r;var n=t();return this.set(e,n),n},t.prototype.set=function(t,r){this.map.set(String(e.getNodeId(t)),{node:t,value:r})},t.prototype.has=function(t){return this.map.has(String(e.getNodeId(t)))},t.prototype.forEach=function(e){this.map.forEach((function(t){var r=t.node,n=t.value;return e(n,r)}))},t}();e.NodeMap=w,e.rangeOfNode=function(t){return{pos:e.getTokenPosOfNode(t),end:t.end}},e.rangeOfTypeParameters=function(e){return{pos:e.pos-1,end:e.end+1}},e.skipTypeChecking=function(e,t,r){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||r.isSourceOfProjectReferenceRedirect(e.fileName)},e.isJsonEqual=function t(r,n){return r===n||"object"===f(r)&&null!==r&&"object"===f(n)&&null!==n&&e.equalOwnProperties(r,n,t)},e.getOrUpdate=function(e,t,r){var n=e.get(t);if(void 0===n){var i=r();return e.set(t,i),i}return n},e.parsePseudoBigInt=function(e){var t;switch(e.charCodeAt(1)){case 98:case 66:t=1;break;case 111:case 79:t=3;break;case 120:case 88:t=4;break;default:for(var r=e.length-1,n=0;48===e.charCodeAt(n);)n++;return e.slice(n,r)||"0"}for(var i=e.length-1,a=(i-2)*t,o=new Uint16Array((a>>>4)+(15&a?1:0)),s=i-1,c=0;s>=2;s--,c+=t){var u=c>>>4,l=e.charCodeAt(s),_=(l<=57?l-48:10+l-(l<=70?65:97))<<(15&c);o[u]|=_;var d=_>>>16;d&&(o[u+1]|=d)}for(var p="",f=o.length-1,m=!0;m;){var g=0;m=!1;for(u=f;u>=0;u--){var y=g<<16|o[u],h=y/10|0;o[u]=h,g=y-10*h,h&&!m&&(f=u,m=!0)}p=g+p}return p},e.pseudoBigIntToString=function(e){var t=e.negative,r=e.base10Value;return(t&&"0"!==r?"-":"")+r}}(s||(s={})),function(e){var t,r,n,i,a,o,s;function c(e,t){return t&&e(t)}function u(e,t,r){if(r){if(t)return t(r);for(var n=0,i=r;nt.checkJsDirective.pos)&&(t.checkJsDirective={enabled:"ts-check"===i,end:e.range.end,pos:e.range.pos})}));break;case"jsx":return;default:e.Debug.fail("Unhandled pragma kind")}}))}!function(e){e[e.None=0]="None",e[e.Yield=1]="Yield",e[e.Await=2]="Await",e[e.Type=4]="Type",e[e.IgnoreMissingOpenBrace=16]="IgnoreMissingOpenBrace",e[e.JSDoc=32]="JSDoc"}(t||(t={})),e.createNode=function(t,o,s){return 288===t?new(a||(a=e.objectAllocator.getSourceFileConstructor()))(t,o,s):75===t?new(i||(i=e.objectAllocator.getIdentifierConstructor()))(t,o,s):e.isNodeKind(t)?new(r||(r=e.objectAllocator.getNodeConstructor()))(t,o,s):new(n||(n=e.objectAllocator.getTokenConstructor()))(t,o,s)},e.isJSDocLikeText=l,e.forEachChild=_,e.createSourceFile=function(t,r,n,i,a){var s;return void 0===i&&(i=!1),e.performance.mark("beforeParse"),e.perfLogger.logStartParseSourceFile(t),s=100===n?o.parseSourceFile(t,r,n,void 0,i,6):o.parseSourceFile(t,r,n,void 0,i,a),e.perfLogger.logStopParseSourceFile(),e.performance.mark("afterParse"),e.performance.measure("Parse","beforeParse","afterParse"),s},e.parseIsolatedEntityName=function(e,t){return o.parseIsolatedEntityName(e,t)},e.parseJsonText=function(e,t){return o.parseJsonText(e,t)},e.isExternalModule=function(e){return void 0!==e.externalModuleIndicator},e.updateSourceFile=function(e,t,r,n){void 0===n&&(n=!1);var i=s.updateSourceFile(e,t,r,n);return i.flags|=3145728&e.flags,i},e.parseIsolatedJSDocComment=function(e,t,r){var n=o.JSDocParser.parseIsolatedJSDocComment(e,t,r);return n&&n.jsDoc&&o.fixupParentReferences(n.jsDoc),n},e.parseJSDocTypeExpressionForTests=function(e,t,r){return o.JSDocParser.parseJSDocTypeExpressionForTests(e,t,r)},function(t){var r,n,i,a,o,s,c,u,m,g,y,h,v,b,D,S,T,E,C=e.createScanner(99,!0),k=20480,N=!1;function A(t,r,n,i,a){void 0===n&&(n=2),P(r,n,i,6),(o=L(t,2,6,!1)).flags=D,ae();var c=re();if(1===ne())o.statements=Ee([],c,c),o.endOfFileToken=be();else{var u=Se(225);switch(ne()){case 22:u.expression=jr();break;case 105:case 90:case 99:u.expression=be();break;case 40:de((function(){return 8===ae()&&58!==ae()}))?u.expression=gr():u.expression=Jr();break;case 8:case 10:if(de((function(){return 58!==ae()}))){u.expression=ut();break}default:u.expression=Jr()}Ce(u),o.statements=Ee([u],c),o.endOfFileToken=ve(1,e.Diagnostics.Unexpected_token)}a&&M(o),o.nodeCount=g,o.identifierCount=h,o.identifiers=y,o.parseDiagnostics=s;var l=o;return w(),l}function F(e){return 4===e||2===e||1===e||6===e?1:0}function P(t,o,u,l){switch(r=e.objectAllocator.getNodeConstructor(),n=e.objectAllocator.getTokenConstructor(),i=e.objectAllocator.getIdentifierConstructor(),a=e.objectAllocator.getSourceFileConstructor(),m=t,c=u,s=[],v=0,y=e.createMap(),h=0,g=0,l){case 1:case 2:D=131072;break;case 6:D=33685504;break;default:D=0}N=!1,C.setText(m),C.setOnError(te),C.setScriptTarget(o),C.setLanguageVariant(F(l))}function w(){C.setText(""),C.setOnError(void 0),s=void 0,o=void 0,y=void 0,c=void 0,m=void 0,b=void 0}function I(t,r,n,i){var a=d(t);return a&&(D|=8388608),(o=L(t,r,i,a)).flags=D,ae(),p(o,m),f(o,(function(t,r,n){s.push(e.createFileDiagnostic(o,t,r,n))})),o.statements=Ye(0,an),e.Debug.assert(1===ne()),o.endOfFileToken=O(be()),function(t){t.externalModuleIndicator=e.forEach(t.statements,Hn)||function(e){return 2097152&e.flags?Yn(e):void 0}(t)}(o),o.nodeCount=g,o.identifierCount=h,o.identifiers=y,o.parseDiagnostics=s,n&&M(o),o}function O(t){e.Debug.assert(!t.jsDoc);var r=e.mapDefined(e.getJSDocCommentRanges(t,o.text),(function(e){return E.parseJSDocComment(t,e.pos,e.end-e.pos)}));return r.length&&(t.jsDoc=r),t}function M(t){var r=t;return void _(t,(function t(n){if(n.parent!==r){n.parent=r;var i=r;if(r=n,_(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;a111)}function me(t,r,n){return void 0===n&&(n=!0),ne()===t?(n&&ae(),!0):(r?Q(r):Q(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function ge(e){return ne()===e&&(ae(),!0)}function ye(e){if(ne()===e)return be()}function he(e){if(ne()===e)return function(){var e=Se(ne());return oe(),Ce(e)}()}function ve(t,r,n){return ye(t)||ke(t,!1,r||e.Diagnostics._0_expected,n||e.tokenToString(t))}function be(){var e=Se(ne());return ae(),Ce(e)}function xe(){return 26===ne()||(19===ne()||1===ne()||C.hasPrecedingLineBreak())}function De(){return xe()?(26===ne()&&ae(),!0):me(26)}function Se(t,a){g++;var o=a>=0?a:C.getStartPos();return e.isNodeKind(t)||0===t?new r(t,o,o):75===t?new i(t,o,o):new n(t,o,o)}function Te(e,t){var r=Se(e,t);return 2&C.getTokenFlags()&&O(r),r}function Ee(e,t,r){var n=e.length,i=n>=1&&n<=4?e.slice():e;return i.pos=t,i.end=void 0===r?C.getStartPos():r,i}function Ce(e,t){return e.end=void 0===t?C.getStartPos():t,D&&(e.flags|=D),N&&(N=!1,e.flags|=65536),e}function ke(t,r,n,i){r?$(C.getStartPos(),0,n,i):n&&Q(n,i);var a=Se(t);return 75===t?a.escapedText="":(e.isLiteralKind(t)||e.isTemplateLiteralKind(t))&&(a.text=""),Ce(a)}function Ne(e){var t=y.get(e);return void 0===t&&y.set(e,t=e),t}function Ae(t,r){if(h++,t){var n=Se(75);return 75!==ne()&&(n.originalKeywordKind=ne()),n.escapedText=e.escapeLeadingUnderscores(Ne(C.getTokenValue())),ie(),Ce(n)}var i=1===ne(),a=C.isReservedWord(),o=C.getTokenText(),s=a?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:e.Diagnostics.Identifier_expected;return ke(75,i,r||s,o)}function Fe(e){return Ae(fe(),e)}function Pe(t){return Ae(e.tokenIsIdentifierOrKeyword(ne()),t)}function we(){return e.tokenIsIdentifierOrKeyword(ne())||10===ne()||8===ne()}function Ie(e){if(10===ne()||8===ne()){var t=ut();return t.text=Ne(t.text),t}return e&&22===ne()?function(){var e=Se(153);return me(22),e.expression=V(rr),me(23),Ce(e)}():Pe()}function Oe(){return Ie(!0)}function Me(e){return ne()===e&&pe(Re)}function Le(){return ae(),!C.hasPrecedingLineBreak()&&Be()}function Re(){switch(ne()){case 80:return 87===ae();case 88:return ae(),83===ne()?de(je):41!==ne()&&122!==ne()&&18!==ne()&&Be();case 83:return je();case 119:case 130:case 141:return ae(),Be();default:return Le()}}function Be(){return 22===ne()||18===ne()||41===ne()||25===ne()||we()}function je(){return ae(),79===ne()||93===ne()||113===ne()||121===ne()&&de(Qr)||125===ne()&&de($r)}function Ke(t,r){if(Qe(t))return!0;switch(t){case 0:case 1:case 3:return!(26===ne()&&r)&&rn();case 2:return 77===ne()||83===ne();case 4:return de(kt);case 5:return de(Cn)||26===ne()&&!r;case 6:return 22===ne()||we();case 12:switch(ne()){case 22:case 41:case 25:case 24:return!0;default:return we()}case 18:return we();case 9:return 22===ne()||25===ne()||we();case 7:return 18===ne()?de(Je):r?fe()&&!qe():er()&&!qe();case 8:return pn();case 10:return 27===ne()||25===ne()||pn();case 19:return fe();case 15:switch(ne()){case 27:case 24:return!0}case 11:return 25===ne()||tr();case 16:return vt(!1);case 17:return vt(!0);case 20:case 21:return 27===ne()||zt();case 22:return Rn();case 23:return e.tokenIsIdentifierOrKeyword(ne());case 13:return e.tokenIsIdentifierOrKeyword(ne())||18===ne();case 14:return!0}return e.Debug.fail("Non-exhaustive case in 'isListElement'.")}function Je(){if(e.Debug.assert(18===ne()),19===ae()){var t=ae();return 27===t||18===t||89===t||112===t}return!0}function ze(){return ae(),fe()}function Ue(){return ae(),e.tokenIsIdentifierOrKeyword(ne())}function Ve(){return ae(),e.tokenIsIdentifierOrKeywordOrGreaterThan(ne())}function qe(){return(112===ne()||89===ne())&&de(We)}function We(){return ae(),tr()}function Ge(){return ae(),zt()}function He(e){if(1===ne())return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:return 19===ne();case 3:return 19===ne()||77===ne()||83===ne();case 7:return 18===ne()||89===ne()||112===ne();case 8:return function(){if(xe())return!0;if(dr(ne()))return!0;if(38===ne())return!0;return!1}();case 19:return 31===ne()||20===ne()||18===ne()||89===ne()||112===ne();case 11:return 21===ne()||26===ne();case 15:case 21:case 10:return 23===ne();case 17:case 16:case 18:return 21===ne()||23===ne();case 20:return 27!==ne();case 22:return 18===ne()||19===ne();case 13:return 31===ne()||43===ne();case 14:return 29===ne()&&de(zn);default:return!1}}function Ye(e,t){var r=v;v|=1<=0&&(c.hasTrailingComma=!0),c}function tt(t){return 6===t?e.Diagnostics.An_enum_member_name_must_be_followed_by_a_or:void 0}function rt(){var e=Ee([],re());return e.isMissingList=!0,e}function nt(e,t,r,n){if(me(r)){var i=et(e,t);return me(n),i}return rt()}function it(e,t){for(var r=e?Pe(t):Fe(t),n=C.getStartPos();ge(24);){if(29===ne()){r.jsdocDotPos=n;break}n=C.getStartPos(),r=at(r,ot(e))}return r}function at(e,t){var r=Se(152,e.pos);return r.left=e,r.right=t,Ce(r)}function ot(t){if(C.hasPrecedingLineBreak()&&e.tokenIsIdentifierOrKeyword(ne())&&de(Xr))return ke(75,!0,e.Diagnostics.Identifier_expected);return t?Pe():Fe()}function st(){var t,r=Se(210);r.head=(t=lt(ne()),e.Debug.assert(15===t.kind,"Template head has wrong token kind"),t),e.Debug.assert(15===r.head.kind,"Template head has wrong token kind");var n=[],i=re();do{n.push(ct())}while(16===e.last(n).literal.kind);return r.templateSpans=Ee(n,i),Ce(r)}function ct(){var t,r,n=Se(220);return n.expression=V(rr),19===ne()?(u=C.reScanTemplateToken(),r=lt(ne()),e.Debug.assert(16===r.kind||17===r.kind,"Template fragment has wrong token kind"),t=r):t=ve(17,e.Diagnostics._0_expected,e.tokenToString(19)),n.literal=t,Ce(n)}function ut(){return lt(ne())}function lt(e){var t=Se(e);switch(t.text=C.getTokenValue(),e){case 14:case 15:case 16:case 17:var r=14===e||17===e,n=C.getTokenText();t.rawText=n.substring(1,n.length-(C.isUnterminated()?0:r?1:2))}return C.hasExtendedUnicodeEscape()&&(t.hasExtendedUnicodeEscape=!0),C.isUnterminated()&&(t.isUnterminated=!0),8===t.kind&&(t.numericLiteralFlags=1008&C.getTokenFlags()),ae(),Ce(t),t}function _t(){var t=Se(168);return t.typeName=it(!0,e.Diagnostics.Type_expected),C.hasPrecedingLineBreak()||29!==ce()||(t.typeArguments=nt(20,Qt,29,31)),Ce(t)}function dt(){var e=Se(182);return ae(),Ce(e)}function pt(e){var t=Se(293);return e?Vt(297,t):(ae(),Ce(t))}function ft(){var e=Se(155);return 103!==ne()&&98!==ne()||(e.name=Pe(),me(58)),e.type=mt(),Ce(e)}function mt(){C.setInJSDocType(!0);var e=ye(134);if(e){var t=Se(300,e.pos);e:for(;;)switch(ne()){case 19:case 1:case 27:case 5:break e;default:oe()}return C.setInJSDocType(!1),Ce(t)}var r=ye(25),n=Yt();if(C.setInJSDocType(!1),r){var i=Se(299,r.pos);i.type=n,n=Ce(i)}return 62===ne()?Vt(297,n):n}function gt(){var e=Se(154);return e.name=Fe(),ge(89)&&(zt()||!tr()?e.constraint=Qt():e.expression=yr()),ge(62)&&(e.default=Qt()),Ce(e)}function yt(){if(29===ne())return nt(19,gt,29,31)}function ht(){if(ge(58))return Qt()}function vt(t){return 25===ne()||pn()||e.isModifierKind(ne())||59===ne()||zt(!t)}function bt(){var t=Te(155);return 103===ne()?(t.name=Ae(!0),t.type=ht(),Ce(t)):(t.decorators=kn(),t.modifiers=Nn(),t.dotDotDotToken=ye(25),t.name=fn(),0===e.getFullWidth(t.name)&&!e.hasModifiers(t)&&e.isModifierKind(ne())&&ae(),t.questionToken=ye(57),t.type=ht(),t.initializer=nr(),Ce(t))}function xt(t,r,n){32&r||(n.typeParameters=yt());var i=function(e,t){if(!me(20))return e.parameters=rt(),!1;var r=G(),n=X();return j(!!(1&t)),J(!!(2&t)),e.parameters=32&t?et(17,ft):et(16,bt),j(r),J(n),me(21)}(n,r);return(!function(t,r){if(38===t)return me(t),!0;if(ge(58))return!0;if(r&&38===ne())return Q(e.Diagnostics._0_expected,e.tokenToString(58)),ae(),!0;return!1}(t,!!(4&r))||(n.type=Yt(),!function t(r){switch(r.kind){case 168:return e.nodeIsMissing(r.typeName);case 169:case 170:var n=r,i=n.parameters,a=n.type;return!!i.isMissingList||t(a);case 181:return t(r.type);default:return!1}}(n.type)))&&i}function Dt(){ge(27)||De()}function St(e){var t=Te(e);return 165===e&&me(98),xt(58,4,t),Dt(),Ce(t)}function Tt(){return 22===ne()&&de(Et)}function Et(){if(ae(),25===ne()||23===ne())return!0;if(e.isModifierKind(ne())){if(ae(),fe())return!0}else{if(!fe())return!1;ae()}return 58===ne()||27===ne()||57===ne()&&(ae(),58===ne()||27===ne()||23===ne())}function Ct(e){return e.kind=166,e.parameters=nt(16,bt,22,23),e.type=Zt(),Dt(),Ce(e)}function kt(){if(20===ne()||29===ne())return!0;for(var t=!1;e.isModifierKind(ne());)t=!0,ae();return 22===ne()||(we()&&(t=!0,ae()),!!t&&(20===ne()||29===ne()||57===ne()||58===ne()||27===ne()||xe()))}function Nt(){if(20===ne()||29===ne())return St(164);if(98===ne()&&de(At))return St(165);var e=Te(0);return e.modifiers=Nn(),Tt()?Ct(e):function(e){return e.name=Oe(),e.questionToken=ye(57),20===ne()||29===ne()?(e.kind=159,xt(58,4,e)):(e.kind=157,e.type=Zt(),62===ne()&&(e.initializer=nr())),Dt(),Ce(e)}(e)}function At(){return ae(),20===ne()||29===ne()}function Ft(){return 24===ae()}function Pt(){switch(ae()){case 20:case 29:case 24:return!0}return!1}function wt(){var e;return me(18)?(e=Ye(4,Nt),me(19)):e=rt(),e}function It(){return ae(),39===ne()||40===ne()?137===ae():(137===ne()&&ae(),22===ne()&&ze()&&96===ae())}function Ot(){var e=Se(185);return me(18),137!==ne()&&39!==ne()&&40!==ne()||(e.readonlyToken=be(),137!==e.readonlyToken.kind&&ve(137)),me(22),e.typeParameter=function(){var e=Se(154);return e.name=Fe(),me(96),e.constraint=Qt(),Ce(e)}(),me(23),57!==ne()&&39!==ne()&&40!==ne()||(e.questionToken=be(),57!==e.questionToken.kind&&ve(57)),e.type=Zt(),De(),me(19),Ce(e)}function Mt(){var e=re();if(ge(25)){var t=Se(176,e);return t.type=Qt(),Ce(t)}var r=Qt();return 4194304&D||295!==r.kind||r.pos!==r.type.pos||(r.kind=175),r}function Lt(){var e=be();return 24===ne()?void 0:e}function Rt(e){var t,r=Se(186);e&&((t=Se(206)).operator=40,ae());var n=105===ne()||90===ne()?be():lt(ne());return e&&(t.operand=n,Ce(t),n=t),r.literal=n,Ce(r)}function Bt(){return ae(),95===ne()}function jt(){o.flags|=1048576;var t=Se(187);return ge(107)&&(t.isTypeOf=!0),me(95),me(20),t.argument=Qt(),me(21),ge(24)&&(t.qualifier=it(!0,e.Diagnostics.Type_expected)),C.hasPrecedingLineBreak()||29!==ce()||(t.typeArguments=nt(20,Qt,29,31)),Ce(t)}function Kt(){return ae(),8===ne()||9===ne()}function Jt(){switch(ne()){case 124:case 147:case 142:case 139:case 150:case 143:case 127:case 145:case 136:case 140:return pe(Lt)||_t();case 41:return pt(!1);case 65:return pt(!0);case 60:C.reScanQuestionToken();case 57:return r=C.getStartPos(),ae(),27===ne()||19===ne()||21===ne()||31===ne()||62===ne()||51===ne()?Ce(t=Se(294,r)):((t=Se(295,r)).type=Qt(),Ce(t));case 93:return function(){if(de(Jn)){var e=Te(298);return ae(),xt(58,36,e),Ce(e)}var t=Se(168);return t.typeName=Pe(),Ce(t)}();case 53:return function(){var e=Se(296);return ae(),e.type=Jt(),Ce(e)}();case 14:case 10:case 8:case 9:case 105:case 90:return Rt();case 40:return de(Kt)?Rt(!0):_t();case 109:case 99:return be();case 103:var e=dt();return 132!==ne()||C.hasPrecedingLineBreak()?e:function(e){ae();var t=Se(167,e.pos);return t.parameterName=e,t.type=Qt(),Ce(t)}(e);case 107:return de(Bt)?jt():function(){var e=Se(171);return me(107),e.exprName=it(!0),Ce(e)}();case 18:return de(It)?Ot():function(){var e=Se(172);return e.members=wt(),Ce(e)}();case 22:return function(){var e=Se(174);return e.elementTypes=nt(21,Mt,22,23),Ce(e)}();case 20:return function(){var e=Se(181);return me(20),e.type=Qt(),me(21),Ce(e)}();case 95:return jt();case 123:return de(Xr)?function(){var e=Se(167);return e.assertsModifier=ve(123),e.parameterName=103===ne()?dt():Fe(),e.type=ge(132)?Qt():void 0,Ce(e)}():_t();default:return _t()}var t,r}function zt(e){switch(ne()){case 124:case 147:case 142:case 139:case 150:case 127:case 137:case 143:case 146:case 109:case 145:case 99:case 103:case 107:case 136:case 18:case 22:case 29:case 51:case 50:case 98:case 10:case 8:case 9:case 105:case 90:case 140:case 41:case 57:case 53:case 25:case 131:case 95:case 123:return!0;case 93:return!e;case 40:return!e&&de(Kt);case 20:return!e&&de(Ut);default:return fe()}}function Ut(){return ae(),21===ne()||vt(!1)||zt()}function Vt(e,t){ae();var r=Se(e,t.pos);return r.type=t,Ce(r)}function qt(){var e=ne();switch(e){case 133:case 146:case 137:return function(e){var t=Se(183);return me(e),t.operator=e,t.type=qt(),Ce(t)}(e);case 131:return function(){var e=Se(180);me(131);var t=Se(154);return t.name=Fe(),e.typeParameter=Ce(t),Ce(e)}()}return function(){for(var e=Jt();!C.hasPrecedingLineBreak();)switch(ne()){case 53:e=Vt(296,e);break;case 57:if(!(4194304&D)&&de(Ge))return e;e=Vt(295,e);break;case 22:var t;if(me(22),zt())(t=Se(184,e.pos)).objectType=e,t.indexType=Qt(),me(23),e=Ce(t);else(t=Se(173,e.pos)).elementType=e,me(23),e=Ce(t);break;default:return e}return e}()}function Wt(e,t,r){var n=C.getStartPos(),i=ge(r),a=t();if(ne()===r||i){for(var o=[a];ge(r);)o.push(t());var s=Se(e,n);s.types=Ee(o,n),a=Ce(s)}return a}function Gt(){return Wt(178,qt,50)}function Ht(){if(ae(),21===ne()||25===ne())return!0;if(function(){if(e.isModifierKind(ne())&&Nn(),fe()||103===ne())return ae(),!0;if(22===ne()||18===ne()){var t=s.length;return fn(),t===s.length}return!1}()){if(58===ne()||27===ne()||57===ne()||62===ne())return!0;if(21===ne()&&(ae(),38===ne()))return!0}return!1}function Yt(){var e=fe()&&pe(Xt),t=Qt();if(e){var r=Se(167,e.pos);return r.assertsModifier=void 0,r.parameterName=e,r.type=t,Ce(r)}return t}function Xt(){var e=Fe();if(132===ne()&&!C.hasPrecedingLineBreak())return ae(),e}function Qt(){return z(40960,$t)}function $t(e){if(29===ne()||20===ne()&&de(Ht)||98===ne())return function(){var e=re(),t=Te(ge(98)?170:169,e);return xt(38,4,t),Ce(t)}();var t=Wt(177,Gt,51);if(!e&&!C.hasPrecedingLineBreak()&&ge(89)){var r=Se(179,t.pos);return r.checkType=t,r.extendsType=$t(!0),me(57),r.trueType=$t(),me(58),r.falseType=$t(),Ce(r)}return t}function Zt(){return ge(58)?Qt():void 0}function er(){switch(ne()){case 103:case 101:case 99:case 105:case 90:case 8:case 9:case 10:case 14:case 15:case 20:case 22:case 18:case 93:case 79:case 98:case 43:case 67:case 75:return!0;case 95:return de(Pt);default:return fe()}}function tr(){if(er())return!0;switch(ne()){case 39:case 40:case 54:case 53:case 84:case 107:case 109:case 45:case 46:case 29:case 126:case 120:return!0;default:return!!function(){if(H()&&96===ne())return!1;return e.getBinaryOperatorPrecedence(ne())>0}()||fe()}}function rr(){var e=Y();e&&K(!1);for(var t,r=ir();t=ye(27);)r=fr(r,t,ir());return e&&K(!0),r}function nr(){return ge(62)?ir():void 0}function ir(){if(function(){if(120===ne())return!!G()||de(Zr);return!1}())return function(){var e=Se(211);return ae(),C.hasPrecedingLineBreak()||41!==ne()&&!tr()?Ce(e):(e.asteriskToken=ye(41),e.expression=ir(),Ce(e))}();var t=function(){var t=function(){if(20===ne()||29===ne()||125===ne())return de(or);if(38===ne())return 1;return 0}();if(0===t)return;var r=1===t?ur(!0):pe(sr);if(!r)return;var n=e.hasModifier(r,256),i=ne();return r.equalsGreaterThanToken=ve(38),r.body=38===i||18===i?lr(n):Fe(),Ce(r)}()||function(){if(125===ne()&&1===de(cr)){var e=An();return ar(_r(0),e)}return}();if(t)return t;var r=_r(0);return 75===r.kind&&38===ne()?ar(r):e.isLeftHandSideExpression(r)&&e.isAssignmentOperator(se())?fr(r,be(),ir()):function(t){var r=ye(57);if(!r)return t;var n=Se(209,t.pos);return n.condition=t,n.questionToken=r,n.whenTrue=z(k,ir),n.colonToken=ve(58),n.whenFalse=e.nodeIsPresent(n.colonToken)?ir():ke(75,!1,e.Diagnostics._0_expected,e.tokenToString(58)),Ce(n)}(r)}function ar(t,r){var n;e.Debug.assert(38===ne(),"parseSimpleArrowFunctionExpression should only have been called if we had a =>"),r?(n=Se(201,r.pos)).modifiers=r:n=Se(201,t.pos);var i=Se(155,t.pos);return i.name=t,Ce(i),n.parameters=Ee([i],i.pos,i.end),n.equalsGreaterThanToken=ve(38),n.body=lr(!!r),O(Ce(n))}function or(){if(125===ne()){if(ae(),C.hasPrecedingLineBreak())return 0;if(20!==ne()&&29!==ne())return 0}var t=ne(),r=ae();if(20===t){if(21===r)switch(ae()){case 38:case 58:case 18:return 1;default:return 0}if(22===r||18===r)return 2;if(25===r)return 1;if(e.isModifierKind(r)&&125!==r&&de(ze))return 1;if(!fe()&&103!==r)return 0;switch(ae()){case 58:return 1;case 57:return ae(),58===ne()||27===ne()||62===ne()||21===ne()?1:0;case 27:case 62:case 21:return 2}return 0}return e.Debug.assert(29===t),fe()?1===o.languageVariant?de((function(){var e=ae();if(89===e)switch(ae()){case 62:case 31:return!1;default:return!0}else if(27===e)return!0;return!1}))?1:0:2:0}function sr(){var t=C.getTokenPos();if(!b||!b.has(t.toString())){var r=ur(!1);return r||(b||(b=e.createMap())).set(t.toString(),!0),r}}function cr(){if(125===ne()){if(ae(),C.hasPrecedingLineBreak()||38===ne())return 0;var e=_r(0);if(!C.hasPrecedingLineBreak()&&75===e.kind&&38===ne())return 1}return 0}function ur(t){var r=Te(201);if(r.modifiers=An(),xt(58,e.hasModifier(r,256)?2:0,r)||t){var n=r.type&&e.isJSDocFunctionType(r.type);if(t||38===ne()||!n&&18===ne())return r}}function lr(e){return 18===ne()?qr(e?2:0):26===ne()||93===ne()||79===ne()||!rn()||18!==ne()&&93!==ne()&&79!==ne()&&59!==ne()&&tr()?e?q(ir):z(32768,ir):qr(16|(e?2:0))}function _r(e){return pr(e,yr())}function dr(e){return 96===e||151===e}function pr(t,r){for(;;){se();var n=e.getBinaryOperatorPrecedence(ne());if(!(42===ne()?n>=t:n>t))break;if(96===ne()&&H())break;if(122===ne()){if(C.hasPrecedingLineBreak())break;ae(),r=mr(r,Qt())}else r=fr(r,be(),_r(n))}return r}function fr(e,t,r){var n=Se(208,e.pos);return n.left=e,n.operatorToken=t,n.right=r,Ce(n)}function mr(e,t){var r=Se(216,e.pos);return r.expression=e,r.type=t,Ce(r)}function gr(){var e=Se(206);return e.operator=ne(),ae(),e.operand=hr(),Ce(e)}function yr(){if(function(){switch(ne()){case 39:case 40:case 54:case 53:case 84:case 107:case 109:case 126:return!1;case 29:if(1!==o.languageVariant)return!1;default:return!0}}()){var t=vr();return 42===ne()?pr(e.getBinaryOperatorPrecedence(ne()),t):t}var r=ne(),n=hr();if(42===ne()){var i=e.skipTrivia(m,n.pos),a=n.end;198===n.kind?Z(i,a,e.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):Z(i,a,e.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,e.tokenToString(r))}return n}function hr(){switch(ne()){case 39:case 40:case 54:case 53:return gr();case 84:return function(){var e=Se(202);return ae(),e.expression=hr(),Ce(e)}();case 107:return function(){var e=Se(203);return ae(),e.expression=hr(),Ce(e)}();case 109:return function(){var e=Se(204);return ae(),e.expression=hr(),Ce(e)}();case 29:return function(){var e=Se(198);return me(29),e.type=Qt(),me(31),e.expression=hr(),Ce(e)}();case 126:if(126===ne()&&(X()||de(Zr)))return function(){var e=Se(205);return ae(),e.expression=hr(),Ce(e)}();default:return vr()}}function vr(){if(45===ne()||46===ne())return(t=Se(206)).operator=ne(),ae(),t.operand=br(),Ce(t);if(1===o.languageVariant&&29===ne()&&de(Ve))return Dr(!0);var t,r=br();return e.Debug.assert(e.isLeftHandSideExpression(r)),45!==ne()&&46!==ne()||C.hasPrecedingLineBreak()?r:((t=Se(207,r.pos)).operand=r,t.operator=ne(),ae(),Ce(t))}function br(){var t;if(95===ne())if(de(At))o.flags|=1048576,t=be();else if(de(Ft)){var r=C.getStartPos();ae(),ae();var n=Se(218,r);n.keywordToken=95,n.name=Pe(),t=Ce(n),o.flags|=2097152}else t=xr();else t=101===ne()?function(){var t=be();if(29===ne()){var r=re();void 0!==pe(Mr)&&Z(r,re(),e.Diagnostics.super_may_not_use_type_arguments)}if(20===ne()||24===ne()||22===ne())return t;var n=Se(193,t.pos);return n.expression=t,ve(24,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),n.name=ot(!0),Ce(n)}():xr();return function(t){for(;;){t=Pr(t,!0);var r=ye(28);if(29===ne()||47===ne()){var n=pe(Mr);if(n){if(wr()){t=Ir(t,r,n);continue}(i=Se(195,t.pos)).expression=t,i.questionDotToken=r,i.typeArguments=n,i.arguments=Or(),(r||32&t.flags)&&(i.flags|=32),t=Ce(i);continue}}else if(20===ne()){var i;(i=Se(195,t.pos)).expression=t,i.questionDotToken=r,i.arguments=Or(),(r||32&t.flags)&&(i.flags|=32),t=Ce(i);continue}if(r){var a=Se(193,t.pos);a.expression=t,a.questionDotToken=r,a.name=ke(75,!1,e.Diagnostics.Identifier_expected),a.flags|=32,t=Ce(a)}break}return t}(t)}function xr(){return Pr(Lr(),!0)}function Dr(t){var r,n=function(e){var t=C.getStartPos();if(me(29),31===ne()){var r=Se(269,t);return le(),Ce(r)}var n,i=Er(),a=Ln(),o=(s=Se(272),s.properties=Ye(13,kr),Ce(s));var s;31===ne()?(n=Se(266,t),le()):(me(43),e?me(31):(me(31,void 0,!1),le()),n=Se(265,t));return n.tagName=i,n.typeArguments=a,n.attributes=o,Ce(n)}(t);if(266===n.kind)(i=Se(264,n.pos)).openingElement=n,i.children=Tr(i.openingElement),i.closingElement=function(e){var t=Se(267);me(30),t.tagName=Er(),e?me(31):(me(31,void 0,!1),le());return Ce(t)}(t),x(i.openingElement.tagName,i.closingElement.tagName)||ee(i.closingElement,e.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0,e.getTextOfNodeFromSourceText(m,i.openingElement.tagName)),r=Ce(i);else if(269===n.kind){var i;(i=Se(268,n.pos)).openingFragment=n,i.children=Tr(i.openingFragment),i.closingFragment=function(t){var r=Se(270);me(30),e.tokenIsIdentifierOrKeyword(ne())&&ee(Er(),e.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);t?me(31):(me(31,void 0,!1),le());return Ce(r)}(t),r=Ce(i)}else e.Debug.assert(265===n.kind),r=n;if(t&&29===ne()){var a=pe((function(){return Dr(!0)}));if(a){Q(e.Diagnostics.JSX_expressions_must_have_one_parent_element);var o=Se(208,r.pos);return o.end=a.end,o.left=r,o.right=a,o.operatorToken=ke(27,!1),o.operatorToken.pos=o.operatorToken.end=o.right.pos,o}}return r}function Sr(t,r){switch(r){case 1:return void(e.isJsxOpeningFragment(t)?ee(t,e.Diagnostics.JSX_fragment_has_no_corresponding_closing_tag):ee(t.tagName,e.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag,e.getTextOfNodeFromSourceText(m,t.tagName)));case 30:case 7:return;case 11:case 12:return function(){var e=Se(11);return e.text=C.getTokenValue(),e.containsOnlyTriviaWhiteSpaces=12===u,u=C.scanJsxToken(),Ce(e)}();case 18:return Cr(!1);case 29:return Dr(!1);default:return e.Debug.assertNever(r)}}function Tr(e){var t=[],r=re(),n=v;for(v|=16384;;){var i=Sr(e,u=C.reScanJsxToken());if(!i)break;t.push(i)}return v=n,Ee(t,r)}function Er(){ue();for(var e=103===ne()?be():Pe();ge(24);){var t=Se(193,e.pos);t.expression=e,t.name=ot(!0),e=Ce(t)}return e}function Cr(e){var t=Se(274);if(me(18))return 19!==ne()&&(t.dotDotDotToken=ye(25),t.expression=rr()),e?me(19):me(19,void 0,!1)&&le(),Ce(t)}function kr(){if(18===ne())return function(){var e=Se(273);return me(18),me(25),e.expression=rr(),me(19),Ce(e)}();ue();var e=Se(271);if(e.name=Pe(),62===ne())switch(u=C.scanJsxAttributeValue()){case 10:e.initializer=ut();break;default:e.initializer=Cr(!0)}return Ce(e)}function Nr(){return ae(),e.tokenIsIdentifierOrKeyword(ne())||22===ne()||wr()}function Ar(e,t){var r=Se(193,e.pos);return r.expression=e,r.questionDotToken=t,r.name=ot(!0),(t||32&e.flags)&&(r.flags|=32),Ce(r)}function Fr(t,r){var n=Se(194,t.pos);if(n.expression=t,n.questionDotToken=r,23===ne())n.argumentExpression=ke(75,!0,e.Diagnostics.An_element_access_expression_should_take_an_argument);else{var i=V(rr);e.isStringOrNumericLiteralLike(i)&&(i.text=Ne(i.text)),n.argumentExpression=i}return me(23),(r||32&t.flags)&&(n.flags|=32),Ce(n)}function Pr(t,r){for(;;){var n=void 0,i=!1;if(r&&28===ne()&&de(Nr)?(n=ve(28),i=e.tokenIsIdentifierOrKeyword(ne())):i=ge(24),i)t=Ar(t,n);else if(n||53!==ne()||C.hasPrecedingLineBreak())if(!n&&Y()||!ge(22)){if(!wr())return t;t=Ir(t,n,void 0)}else t=Fr(t,n);else{ae();var a=Se(217,t.pos);a.expression=t,t=Ce(a)}}}function wr(){return 14===ne()||15===ne()}function Ir(e,t,r){var n=Se(197,e.pos);return n.tag=e,n.questionDotToken=t,n.typeArguments=r,n.template=14===ne()?ut():st(),(t||32&e.flags)&&(n.flags|=32),Ce(n)}function Or(){me(20);var e=et(11,Br);return me(21),e}function Mr(){if(29===ce()){ae();var e=et(20,Qt);if(me(31))return e&&function(){switch(ne()){case 20:case 14:case 15:case 24:case 21:case 23:case 58:case 26:case 57:case 34:case 36:case 35:case 37:case 55:case 56:case 60:case 52:case 50:case 51:case 19:case 1:return!0;case 27:case 18:default:return!1}}()?e:void 0}}function Lr(){switch(ne()){case 8:case 9:case 10:case 14:return ut();case 103:case 101:case 99:case 105:case 90:return be();case 20:return function(){var e=Te(199);return me(20),e.expression=V(rr),me(21),Ce(e)}();case 22:return jr();case 18:return Jr();case 125:if(!de($r))break;return zr();case 79:return wn(Te(0),213);case 93:return zr();case 98:return function(){var t=C.getStartPos();if(me(98),ge(24)){var r=Se(218,t);return r.keywordToken=98,r.name=Pe(),Ce(r)}var n,i=Lr();for(;;){i=Pr(i,!1),n=pe(Mr),wr()&&(e.Debug.assert(!!n,"Expected a type argument list; all plain tagged template starts should be consumed in 'parseMemberExpressionRest'"),i=Ir(i,void 0,n),n=void 0);break}var a=Se(196,t);a.expression=i,a.typeArguments=n,(a.typeArguments||20===ne())&&(a.arguments=Or());return Ce(a)}();case 43:case 67:if(13===(u=C.reScanSlashToken()))return ut();break;case 15:return st()}return Fe(e.Diagnostics.Expression_expected)}function Rr(){return 25===ne()?function(){var e=Se(212);return me(25),e.expression=ir(),Ce(e)}():27===ne()?Se(214):ir()}function Br(){return z(k,Rr)}function jr(){var e=Se(191);return me(22),C.hasPrecedingLineBreak()&&(e.multiLine=!0),e.elements=et(15,Rr),me(23),Ce(e)}function Kr(){var e=Te(0);if(ye(25))return e.kind=281,e.expression=ir(),Ce(e);if(e.decorators=kn(),e.modifiers=Nn(),Me(130))return En(e,162);if(Me(141))return En(e,163);var t=ye(41),r=fe();if(e.name=Oe(),e.questionToken=ye(57),e.exclamationToken=ye(53),t||20===ne()||29===ne())return Dn(e,t);if(r&&58!==ne()){e.kind=280;var n=ye(62);n&&(e.equalsToken=n,e.objectAssignmentInitializer=V(ir))}else e.kind=279,me(58),e.initializer=V(ir);return Ce(e)}function Jr(){var e=Se(192);return me(18),C.hasPrecedingLineBreak()&&(e.multiLine=!0),e.properties=et(12,Kr,!0),me(19),Ce(e)}function zr(){var t=Y();t&&K(!1);var r=Te(200);r.modifiers=Nn(),me(93),r.asteriskToken=ye(41);var n=r.asteriskToken?1:0,i=e.hasModifier(r,256)?2:0;return r.name=n&&i?U(40960,Ur):n?function(e){return U(8192,e)}(Ur):i?q(Ur):Ur(),xt(58,n|i,r),r.body=qr(n|i),t&&K(!0),Ce(r)}function Ur(){return fe()?Fe():void 0}function Vr(e,t){var r=Se(222);return me(18,t)||e?(C.hasPrecedingLineBreak()&&(r.multiLine=!0),r.statements=Ye(1,an),me(19)):r.statements=rt(),Ce(r)}function qr(e,t){var r=G();j(!!(1&e));var n=X();J(!!(2&e));var i=Y();i&&K(!1);var a=Vr(!!(16&e),t);return i&&K(!0),j(r),J(n),a}function Wr(){var e=re();me(92);var t,r,n=ye(126);if(me(20),26!==ne()&&(t=108===ne()||114===ne()||80===ne()?yn(!0):U(4096,rr)),n?me(151):ge(151)){var i=Se(231,e);i.awaitModifier=n,i.initializer=t,i.expression=V(ir),me(21),r=i}else if(ge(96)){var a=Se(230,e);a.initializer=t,a.expression=V(rr),me(21),r=a}else{var o=Se(229,e);o.initializer=t,me(26),26!==ne()&&21!==ne()&&(o.condition=V(rr)),me(26),21!==ne()&&(o.incrementor=V(rr)),me(21),r=o}return r.statement=an(),Ce(r)}function Gr(e){var t=Se(e);return me(233===e?76:81),xe()||(t.label=Fe()),De(),Ce(t)}function Hr(){return 77===ne()?function(){var e=Se(275);return me(77),e.expression=V(rr),me(58),e.statements=Ye(3,an),Ce(e)}():function(){var e=Se(276);return me(83),me(58),e.statements=Ye(3,an),Ce(e)}()}function Yr(){var e=Se(239);return me(106),e.tryBlock=Vr(!1),e.catchClause=78===ne()?function(){var e=Se(278);me(78),ge(20)?(e.variableDeclaration=gn(),me(21)):e.variableDeclaration=void 0;return e.block=Vr(!1),Ce(e)}():void 0,e.catchClause&&91!==ne()||(me(91),e.finallyBlock=Vr(!1)),Ce(e)}function Xr(){return ae(),e.tokenIsIdentifierOrKeyword(ne())&&!C.hasPrecedingLineBreak()}function Qr(){return ae(),79===ne()&&!C.hasPrecedingLineBreak()}function $r(){return ae(),93===ne()&&!C.hasPrecedingLineBreak()}function Zr(){return ae(),(e.tokenIsIdentifierOrKeyword(ne())||8===ne()||9===ne()||10===ne())&&!C.hasPrecedingLineBreak()}function en(){for(;;)switch(ne()){case 108:case 114:case 80:case 93:case 79:case 87:return!0;case 113:case 144:return ae(),!C.hasPrecedingLineBreak()&&fe();case 134:case 135:return un();case 121:case 125:case 129:case 116:case 117:case 118:case 137:if(ae(),C.hasPrecedingLineBreak())return!1;continue;case 149:return ae(),18===ne()||75===ne()||88===ne();case 95:return ae(),10===ne()||41===ne()||18===ne()||e.tokenIsIdentifierOrKeyword(ne());case 88:if(ae(),62===ne()||41===ne()||18===ne()||83===ne()||122===ne())return!0;continue;case 119:ae();continue;default:return!1}}function tn(){return de(en)}function rn(){switch(ne()){case 59:case 26:case 18:case 108:case 114:case 93:case 79:case 87:case 94:case 85:case 110:case 92:case 81:case 76:case 100:case 111:case 102:case 104:case 106:case 82:case 78:case 91:return!0;case 95:return tn()||de(Pt);case 80:case 88:return tn();case 125:case 129:case 113:case 134:case 135:case 144:case 149:return!0;case 118:case 116:case 117:case 119:case 137:return tn()||!de(Xr);default:return tr()}}function nn(){return ae(),fe()||18===ne()||22===ne()}function an(){switch(ne()){case 26:return function(){var e=Se(223);return me(26),Ce(e)}();case 18:return Vr(!1);case 108:return vn(Te(241));case 114:if(de(nn))return vn(Te(241));break;case 93:return bn(Te(243));case 79:return Pn(Te(244));case 94:return function(){var e=Se(226);return me(94),me(20),e.expression=V(rr),me(21),e.thenStatement=an(),e.elseStatement=ge(86)?an():void 0,Ce(e)}();case 85:return function(){var e=Se(227);return me(85),e.statement=an(),me(110),me(20),e.expression=V(rr),me(21),ge(26),Ce(e)}();case 110:return function(){var e=Se(228);return me(110),me(20),e.expression=V(rr),me(21),e.statement=an(),Ce(e)}();case 92:return Wr();case 81:return Gr(232);case 76:return Gr(233);case 100:return function(){var e=Se(234);return me(100),xe()||(e.expression=V(rr)),De(),Ce(e)}();case 111:return function(){var e=Se(235);return me(111),me(20),e.expression=V(rr),me(21),e.statement=U(16777216,an),Ce(e)}();case 102:return function(){var e=Se(236);me(102),me(20),e.expression=V(rr),me(21);var t=Se(250);return me(18),t.clauses=Ye(2,Hr),me(19),e.caseBlock=Ce(t),Ce(e)}();case 104:return function(){var e=Se(238);return me(104),e.expression=C.hasPrecedingLineBreak()?void 0:V(rr),De(),Ce(e)}();case 106:case 78:case 91:return Yr();case 82:return function(){var e=Se(240);return me(82),De(),Ce(e)}();case 59:return sn();case 125:case 113:case 144:case 134:case 135:case 129:case 80:case 87:case 88:case 95:case 116:case 117:case 118:case 121:case 119:case 137:case 149:if(tn())return sn()}return function(){var e=Te(0),t=V(rr);return 75===t.kind&&ge(58)?(e.kind=237,e.label=t,e.statement=an()):(e.kind=225,e.expression=t,De()),Ce(e)}()}function on(e){return 129===e.kind}function sn(){var t=de((function(){return kn(),Nn()})),r=e.some(t,on);if(r){var n=U(8388608,(function(){var e=Qe(v);if(e)return $e(e)}));if(n)return n}var i=Te(0);if(i.decorators=kn(),i.modifiers=Nn(),r){for(var a=0,o=i.modifiers;a=0),e.Debug.assert(t<=a),e.Debug.assert(a<=i.length),l(i,t)){var o,s,c,u=[];return C.scanRange(t+3,n-5,(function(){var e,r,n=1,l=t-Math.max(i.lastIndexOf("\n",t),0)+4;function p(t){e||(e=l),u.push(t),l+=t.length}for(oe();I(5););I(4)&&(n=0,l=0);e:for(;;){switch(ne()){case 59:0===n||1===n?(d(u),b(y(l)),n=0,e=void 0):p(C.getTokenText());break;case 4:u.push(C.getTokenText()),n=0,l=0;break;case 41:var f=C.getTokenText();1===n||2===n?(n=2,p(f)):(n=1,l+=f.length);break;case 5:var m=C.getTokenText();2===n?u.push(m):void 0!==e&&l+m.length>e&&u.push(m.slice(e-l-1)),l+=m.length;break;case 1:break e;default:n=2,p(C.getTokenText())}oe()}return _(u),d(u),(r=Se(301,t)).tags=o&&Ee(o,s,c),r.comment=u.length?u.join(""):void 0,Ce(r,a)}))}function _(e){for(;e.length&&("\n"===e[0]||"\r"===e[0]);)e.shift()}function d(e){for(;e.length&&""===e[e.length-1].trim();)e.pop()}function p(){for(;;){if(oe(),1===ne())return!0;if(5!==ne()&&4!==ne())return!1}}function f(){if(5!==ne()&&4!==ne()||!de(p))for(;5===ne()||4===ne();)oe()}function g(){if((5===ne()||4===ne())&&de(p))return"";for(var e=C.hasPrecedingLineBreak(),t=!1,r="";e&&41===ne()||5===ne()||4===ne();)r+=C.getTokenText(),4===ne()?(e=!0,t=!0,r=""):41===ne()&&(e=!1),oe();return t?r:""}function y(t){e.Debug.assert(59===ne());var n=C.getTokenPos();oe();var i,a=O(void 0),s=g();switch(a.escapedText){case"author":i=function(e,t,r){var n=Se(306,e);n.tagName=t;var i=pe((function(){return function(){var e=[],t=!1,r=!1,n=C.getToken();e:for(;;){switch(n){case 75:case 5:case 24:case 59:e.push(C.getTokenText());break;case 29:if(t||r)return;t=!0,e.push(C.getTokenText());break;case 31:if(!t||r)return;r=!0,e.push(C.getTokenText()),C.setTextPos(C.getTokenPos()+1);break e;case 4:case 1:break e}n=oe()}if(t&&r)return 0===e.length?void 0:e.join("")}()}));if(!i)return Ce(n);if(n.comment=i,de((function(){return 4!==ae()}))){var a=v(r);a&&(n.comment+=a)}return Ce(n)}(n,a,t);break;case"augments":case"extends":i=function(e,t){var r=Se(305,e);return r.tagName=t,r.class=function(){var e=ge(18),t=Se(215);t.expression=function(){var e=O();for(;ge(24);){var t=Se(193,e.pos);t.expression=e,t.name=O(),e=Ce(t)}return e}(),t.typeArguments=Ln();var r=Ce(t);e&&me(19);return r}(),Ce(r)}(n,a);break;case"class":case"constructor":i=function(e,t){var r=Se(307,e);return r.tagName=t,Ce(r)}(n,a);break;case"this":i=function(e,t){var n=Se(312,e);return n.tagName=t,n.typeExpression=r(!0),f(),Ce(n)}(n,a);break;case"enum":i=function(e,t){var n=Se(309,e);return n.tagName=t,n.typeExpression=r(!0),f(),Ce(n)}(n,a);break;case"arg":case"argument":case"param":return T(n,a,2,t);case"return":case"returns":i=function(t,r){e.some(o,e.isJSDocReturnTag)&&Z(r.pos,C.getTokenPos(),e.Diagnostics._0_tag_already_specified,r.escapedText);var n=Se(311,t);return n.tagName=r,n.typeExpression=x(),Ce(n)}(n,a);break;case"template":i=function(t,n){var i;18===ne()&&(i=r());var a=[],o=re();do{f();var s=Se(154);s.name=O(e.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),Ce(s),f(),a.push(s)}while(I(27));var c=Se(314,t);return c.tagName=n,c.constraint=i,c.typeParameters=Ee(a,o),Ce(c),c}(n,a);break;case"type":i=E(n,a);break;case"typedef":i=function(t,r,n){var i=x();g();var a,o=Se(315,t);if(o.tagName=r,o.fullName=k(),o.name=N(o.fullName),f(),o.comment=v(n),o.typeExpression=i,!i||S(i.type)){for(var s=void 0,c=void 0,u=void 0;s=pe((function(){return F(n)}));)if(c||(c=Se(302,t)),313===s.kind){if(u)break;u=s}else c.jsDocPropertyTags=e.append(c.jsDocPropertyTags,s);c&&(i&&173===i.type.kind&&(c.isArrayType=!0),o.typeExpression=u&&u.typeExpression&&!S(u.typeExpression.type)?u.typeExpression:Ce(c),a=o.typeExpression.end)}return Ce(o,a||void 0!==o.comment?C.getStartPos():(o.fullName||o.typeExpression||o.tagName).end)}(n,a,t);break;case"callback":i=function(t,r,n){var i,a=Se(308,t);a.tagName=r,a.fullName=k(),a.name=N(a.fullName),f(),a.comment=v(n);var o=Se(303,t);o.parameters=[];for(;i=pe((function(){return P(4,n)}));)o.parameters=e.append(o.parameters,i);var s=pe((function(){if(I(59)){var e=y(n);if(e&&311===e.kind)return e}}));s&&(o.type=s);return a.typeExpression=Ce(o),Ce(a)}(n,a,t);break;default:i=function(e,t){var r=Se(304,e);return r.tagName=t,Ce(r)}(n,a)}return i.comment||(s||(t+=i.end-i.pos),i.comment=v(t,s.slice(t))),i}function v(t,r){var n,i=[],a=0;function o(e){n||(n=t),i.push(e),t+=e.length}r&&(o(r),a=2);var s=ne();e:for(;;){switch(s){case 4:a>=1&&(a=0,i.push(C.getTokenText())),t=0;break;case 59:if(3===a){i.push(C.getTokenText());break}C.setTextPos(C.getTextPos()-1);case 1:break e;case 5:if(2===a||3===a)o(C.getTokenText());else{var c=C.getTokenText();void 0!==n&&t+c.length>n&&i.push(c.slice(n-t)),t+=c.length}break;case 18:a=2,de((function(){return 59===oe()&&e.tokenIsIdentifierOrKeyword(oe())&&"link"===C.getTokenText()}))&&(o(C.getTokenText()),oe(),o(C.getTokenText()),oe()),o(C.getTokenText());break;case 61:a=3===a?2:3,o(C.getTokenText());break;case 41:if(0===a){a=1,t+=1;break}default:3!==a&&(a=2),o(C.getTokenText())}s=oe()}return _(i),d(i),0===i.length?void 0:i.join("")}function b(e){e&&(o?o.push(e):(o=[e],s=e.pos),c=e.end)}function x(){return g(),18===ne()?r():void 0}function D(){var t=I(22);t&&f();var r,n=I(61),i=function(){var e=O();ge(22)&&me(23);for(;ge(24);){var t=O();ge(22)&&me(23),e=at(e,t)}return e}();return n&&(he(r=61)||ke(r,!1,e.Diagnostics._0_expected,e.tokenToString(r))),t&&(f(),ye(62)&&rr(),me(23)),{name:i,isBracketed:t}}function S(t){switch(t.kind){case 140:return!0;case 173:return S(t.elementType);default:return e.isTypeReferenceNode(t)&&e.isIdentifier(t.typeName)&&"Object"===t.typeName.escapedText}}function T(t,r,n,i){var a=x(),o=!a;g();var s=D(),c=s.name,u=s.isBracketed;f(),o&&(a=x());var l=Se(1===n?316:310,t),_=v(i+C.getStartPos()-t),d=4!==n&&function(t,r,n,i){if(t&&S(t.type)){for(var a=Se(292,C.getTokenPos()),o=void 0,s=void 0,c=C.getStartPos(),u=void 0;o=pe((function(){return P(n,i,r)}));)310!==o.kind&&316!==o.kind||(u=e.append(u,o));if(u)return(s=Se(302,c)).jsDocPropertyTags=u,173===t.type.kind&&(s.isArrayType=!0),a.type=Ce(s),Ce(a)}}(a,c,n,i);return d&&(a=d,o=!0),l.tagName=r,l.typeExpression=a,l.name=c,l.isNameFirst=o,l.isBracketed=u,l.comment=_,Ce(l)}function E(t,n){e.some(o,e.isJSDocTypeTag)&&Z(n.pos,C.getTokenPos(),e.Diagnostics._0_tag_already_specified,n.escapedText);var i=Se(313,t);return i.tagName=n,i.typeExpression=r(!0),Ce(i)}function k(t){var r=C.getTokenPos();if(e.tokenIsIdentifierOrKeyword(ne())){var n=O();if(ge(24)){var i=Se(248,r);return t&&(i.flags|=4),i.name=n,i.body=k(!0),Ce(i)}return t&&(n.isInJSDocNamespace=!0),n}}function N(t){if(t)for(var r=t;;){if(e.isIdentifier(r)||!r.body)return e.isIdentifier(r)?r:r.name;r=r.body}}function A(t,r){for(;!e.isIdentifier(t)||!e.isIdentifier(r);){if(e.isIdentifier(t)||e.isIdentifier(r)||t.right.escapedText!==r.right.escapedText)return!1;t=t.left,r=r.left}return t.escapedText===r.escapedText}function F(e){return P(1,e)}function P(t,r,n){for(var i=!0,a=!1;;)switch(oe()){case 59:if(i){var o=w(t,r);return!(o&&(310===o.kind||316===o.kind)&&4!==t&&n&&(e.isIdentifier(o.name)||!A(n,o.name.left)))&&o}a=!1;break;case 4:i=!0,a=!1;break;case 41:a&&(i=!1),a=!0;break;case 75:i=!1;break;case 1:return!1}}function w(t,r){e.Debug.assert(59===ne());var n=C.getStartPos();oe();var i,a=O();switch(f(),a.escapedText){case"type":return 1===t&&E(n,a);case"prop":case"property":i=1;break;case"arg":case"argument":case"param":i=6;break;default:return!1}return!!(t&i)&&T(n,a,t,r)}function I(e){return ne()===e&&(oe(),!0)}function O(t){if(!e.tokenIsIdentifierOrKeyword(ne()))return ke(75,!t,t||e.Diagnostics.Identifier_expected);h++;var r=C.getTokenPos(),n=C.getTextPos(),i=Se(75,r);return 75!==ne()&&(i.originalKeywordKind=ne()),i.escapedText=e.escapeLeadingUnderscores(Ne(C.getTokenValue())),Ce(i,n),oe(),i}}t.parseJSDocTypeExpressionForTests=function(e,t,n){P(e,99,void 0,1),o=L("file.js",99,1,!1),C.setText(e,t,n),u=C.scan();var i=r(),a=s;return w(),i?{jsDocTypeExpression:i,diagnostics:a}:void 0},t.parseJSDocTypeExpression=r,t.parseIsolatedJSDocComment=function(e,t,r){P(e,99,void 0,1),o={languageVariant:0,text:e};var n=U(4194304,(function(){return a(t,r)})),i=s;return w(),n?{jsDoc:n,diagnostics:i}:void 0},t.parseJSDocComment=function(e,t,r){var n,i=u,c=s.length,l=N,_=U(4194304,(function(){return a(t,r)}));return _&&(_.parent=e),131072&D&&(o.jsDocDiagnostics||(o.jsDocDiagnostics=[]),(n=o.jsDocDiagnostics).push.apply(n,s)),u=i,s.length=c,N=l,_},function(e){e[e.BeginningOfLine=0]="BeginningOfLine",e[e.SawAsterisk=1]="SawAsterisk",e[e.SavingComments=2]="SavingComments",e[e.SavingBackticks=3]="SavingBackticks"}(n||(n={})),function(e){e[e.Property=1]="Property",e[e.Parameter=2]="Parameter",e[e.CallbackParameter=4]="CallbackParameter"}(i||(i={}))}(E=t.JSDocParser||(t.JSDocParser={}))}(o||(o={})),function(t){function r(t,r,i,o,s,c){return void(r?l(t):u(t));function u(t){var r="";if(c&&n(t)&&(r=o.substring(t.pos,t.end)),t._children&&(t._children=void 0),t.pos+=i,t.end+=i,c&&n(t)&&e.Debug.assert(r===s.substring(t.pos,t.end)),_(t,u,l),e.hasJSDocNodes(t))for(var d=0,p=t.jsDoc;d=r,"Adjusting an element that was entirely before the change range"),e.Debug.assert(t.pos<=n,"Adjusting an element that was entirely after the change range"),e.Debug.assert(t.pos<=t.end),t.pos=Math.min(t.pos,i),t.end>=n?t.end+=a:t.end=Math.min(t.end,i),e.Debug.assert(t.pos<=t.end),t.parent&&(e.Debug.assert(t.pos>=t.parent.pos),e.Debug.assert(t.end<=t.parent.end))}function a(t,r){if(r){var n=t.pos,i=function(t){e.Debug.assert(t.pos>=n),n=t.end};if(e.hasJSDocNodes(t))for(var a=0,o=t.jsDoc;ar),!0;if(a.pos>=i.pos&&(i=a),ri.pos&&(i=a)}return i}function c(t,r,n,i){var a=t.text;if(n&&(e.Debug.assert(a.length-n.span.length+n.newLength===r.length),i||e.Debug.shouldAssert(3))){var o=a.substr(0,n.span.start),s=r.substr(0,n.span.start);e.Debug.assert(o===s);var c=a.substring(e.textSpanEnd(n.span),a.length),u=r.substring(e.textSpanEnd(e.textChangeRangeNewSpan(n)),r.length);e.Debug.assert(c===u)}}var u;t.updateSourceFile=function(t,n,u,l){if(c(t,n,u,l=l||e.Debug.shouldAssert(2)),e.textChangeRangeIsUnchanged(u))return t;if(0===t.statements.length)return o.parseSourceFile(t.fileName,n,t.languageVersion,void 0,!0,t.scriptKind);var d=t;e.Debug.assert(!d.hasBeenIncrementallyParsed),d.hasBeenIncrementallyParsed=!0;var p=t.text,f=function(t){var r=t.statements,n=0;e.Debug.assert(n=t.pos&&e=t.pos&&e0&&i<=1;i++){var a=s(t,n);e.Debug.assert(a.pos<=n);var o=a.pos;n=Math.max(0,o-1)}var c=e.createTextSpanFromBounds(n,e.textSpanEnd(r.span)),u=r.newLength+(r.span.start-n);return e.createTextChangeRange(c,u)}(t,u);c(t,n,m,l),e.Debug.assert(m.span.start<=u.span.start),e.Debug.assert(e.textSpanEnd(m.span)===e.textSpanEnd(u.span)),e.Debug.assert(e.textSpanEnd(e.textChangeRangeNewSpan(m))===e.textSpanEnd(e.textChangeRangeNewSpan(u)));var g=e.textChangeRangeNewSpan(m).length-m.span.length;return function(t,n,o,s,c,u,l,d){return void p(t);function p(t){if(e.Debug.assert(t.pos<=t.end),t.pos>o)r(t,!1,c,u,l,d);else{var m=t.end;if(m>=n){if(t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c),_(t,p,f),e.hasJSDocNodes(t))for(var g=0,y=t.jsDoc;go)r(t,!0,c,u,l,d);else{var a=t.end;if(a>=n){t.intersectsChange=!0,t._children=void 0,i(t,n,o,s,c);for(var _=0,f=t;_/im,h=/^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im;function v(t,r,n){var i=2===r.kind&&y.exec(n);if(i){var a=i[1].toLowerCase(),o=e.commentPragmas[a];if(!(o&&1&o.kind))return;if(o.args){for(var s={},c=0,u=o.args;c=r.length)break;var o=a;if(34===r.charCodeAt(o)){for(a++;a32;)a++;n.push(r.substring(o,a))}}l(n)}else u.push(e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t))}}function m(e,t){return g(s,e,t)}function g(e,t,r){void 0===r&&(r=!1),t=t.toLowerCase();var n=e(),i=n.optionNameMap,a=n.shortOptionNames;if(r){var o=a.get(t);void 0!==o&&(t=o)}return i.get(t)}function y(t,r){var n=e.parseJsonText(t,r);return{config:x(n,n.parseDiagnostics),error:n.parseDiagnostics.length?n.parseDiagnostics[0]:void 0}}function h(t,r){var n=v(t,r);return e.isString(n)?e.parseJsonText(t,n):{parseDiagnostics:[n]}}function v(t,r){var n;try{n=r(t)}catch(r){return e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,r.message)}return void 0===n?e.createCompilerDiagnostic(e.Diagnostics.The_specified_path_does_not_exist_Colon_0,t):n}function b(t){return e.arrayToMap(t,(function(e){return e.name}))}function x(e,t){return D(e,t,!0,void 0,void 0)}function D(t,r,n,i,a){return t.statements.length?c(t.statements[0].expression,i):n?{}:void 0;function o(e){return i&&i.elementOptions===e}function s(i,s,l,_){for(var d=n?{}:void 0,p=0,f=i.properties;p=0)return u.push(e.createCompilerDiagnostic(e.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0,t(c,[_]).join(" -> "))),{raw:r||x(n,u)};var d=r?function(t,r,n,i,a){e.hasProperty(t,"excludes")&&a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));var o,s=J(t.compilerOptions,n,a,i),c=U(t.typeAcquisition||t.typingOptions,n,a,i);if(t.compileOnSave=function(t,r,n){if(!e.hasProperty(t,e.compileOnSaveCommandLineOption.name))return!1;var i=q(e.compileOnSaveCommandLineOption,t.compileOnSave,r,n);return"boolean"==typeof i&&i}(t,n,a),t.extends)if(e.isString(t.extends)){var u=i?w(i,n):n;o=j(t.extends,r,u,a,e.createCompilerDiagnostic)}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,"extends","string"));return{raw:t,options:s,typeAcquisition:c,extendedConfigPath:o}}(r,a,o,s,u):function(t,r,n,a,o){var s,c,u,l=K(a),_={onSetValidOptionKeyValueInParent:function(t,r,i){e.Debug.assert("compilerOptions"===t||"typeAcquisition"===t||"typingOptions"===t),("compilerOptions"===t?l:"typeAcquisition"===t?s||(s=z(a)):c||(c=z(a)))[r.name]=function t(r,n,i){if(P(i))return;if("list"===r.type){var a=r;return a.element.isFilePath||!e.isString(a.element.type)?e.filter(e.map(i,(function(e){return t(a.element,n,e)})),(function(e){return!!e})):i}if(!e.isString(r.type))return r.type.get(e.isString(i)?i.toLowerCase():i);return W(r,n,i)}(r,n,i)},onSetValidOptionKeyValueInRoot:function(i,s,c,l){switch(i){case"extends":var _=a?w(a,n):n;return void(u=j(c,r,_,o,(function(r,n){return e.createDiagnosticForNodeInSourceFile(t,l,r,n)})))}},onSetUnknownOptionKeyValueInRoot:function(r,n,i,a){"excludes"===r&&o.push(e.createDiagnosticForNodeInSourceFile(t,n,e.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude))}},d=D(t,o,!0,(void 0===i&&(i={name:void 0,type:"object",elementOptions:b([{name:"compilerOptions",type:"object",elementOptions:b(e.optionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_compiler_option_0},{name:"typingOptions",type:"object",elementOptions:b(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"typeAcquisition",type:"object",elementOptions:b(e.typeAcquisitionDeclarations),extraKeyDiagnosticMessage:e.Diagnostics.Unknown_type_acquisition_option_0},{name:"extends",type:"string"},{name:"references",type:"list",element:{name:"references",type:"object"}},{name:"files",type:"list",element:{name:"files",type:"string"}},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}},e.compileOnSaveCommandLineOption])}),i),_);s||(s=c?void 0!==c.enableAutoDiscovery?{enable:c.enableAutoDiscovery,include:c.include,exclude:c.exclude}:c:z(a));return{raw:d,options:l,typeAcquisition:s,extendedConfigPath:u}}(n,a,o,s,u);if(d.extendedConfigPath){c=c.concat([_]);var p=function(t,r,n,i,a,o,s){var c,u,l,_,d=n.useCaseSensitiveFileNames?r:e.toLowerCase(r);if(s&&(u=s.get(d)))l=u.extendedResult,_=u.extendedConfig;else{if(!(l=h(r,(function(e){return n.readFile(e)}))).parseDiagnostics.length){var p=e.getDirectoryPath(r);if(R(_=B(void 0,l,n,p,e.getBaseFileName(r),a,o,s))){var f=e.convertToRelativePath(p,i,e.identity),m=function(t){return e.isRootedDiskPath(t)?t:e.combinePaths(f,t)},g=function(t){y[t]&&(y[t]=e.map(y[t],m))},y=_.raw;g("include"),g("exclude"),g("files")}}s&&s.set(d,{extendedResult:l,extendedConfig:_})}t&&(t.extendedSourceFiles=[l.fileName],l.extendedSourceFiles&&(c=t.extendedSourceFiles).push.apply(c,l.extendedSourceFiles));if(l.parseDiagnostics.length)return void o.push.apply(o,l.parseDiagnostics);return _}(n,d.extendedConfigPath,a,o,c,u,l);if(p&&R(p)){var f=p.raw,m=d.raw,g=function(e){var t=m[e]||f[e];t&&(m[e]=t)};g("include"),g("exclude"),g("files"),void 0===m.compileOnSave&&(m.compileOnSave=f.compileOnSave),d.options=e.assign({},p.options,d.options)}}return d}function j(t,r,n,i,a){if(t=e.normalizeSlashes(t),e.isRootedDiskPath(t)||e.startsWith(t,"./")||e.startsWith(t,"../")){var o=e.getNormalizedAbsolutePath(t,n);return r.fileExists(o)||e.endsWith(o,".json")||(o+=".json",r.fileExists(o))?o:void i.push(a(e.Diagnostics.File_0_not_found,t))}var s=e.nodeModuleNameResolver(t,e.combinePaths(n,"tsconfig.json"),{moduleResolution:e.ModuleResolutionKind.NodeJs},r,void 0,void 0,!0);if(s.resolvedModule)return s.resolvedModule.resolvedFileName;i.push(a(e.Diagnostics.File_0_not_found,t))}function K(t){return t&&"jsconfig.json"===e.getBaseFileName(t)?{allowJs:!0,maxNodeModuleJsDepth:2,allowSyntheticDefaultImports:!0,skipLibCheck:!0,noEmit:!0}:{}}function J(t,r,n,i){var a=K(i);return V(e.optionDeclarations,t,r,a,e.Diagnostics.Unknown_compiler_option_0,n),i&&(a.configFilePath=e.normalizeSlashes(i)),a}function z(t){return{enable:!!t&&"jsconfig.json"===e.getBaseFileName(t),include:[],exclude:[]}}function U(t,r,n,i){var a=z(i),s=o(t);return V(e.typeAcquisitionDeclarations,s,r,a,e.Diagnostics.Unknown_type_acquisition_option_0,n),a}function V(t,r,n,i,a,o){if(r){var s=b(t);for(var c in r){var u=s.get(c);u?i[u.name]=q(u,r[c],n,o):o.push(e.createCompilerDiagnostic(a,c))}}}function q(t,r,n,i){if(T(t,r)){var a=t.type;return"list"===a&&e.isArray(r)?function(t,r,n,i){return e.filter(e.map(r,(function(e){return q(t.element,e,n,i)})),(function(e){return!!e}))}(t,r,n,i):e.isString(a)?W(t,n,r):G(t,r,i)}i.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,t.name,S(t)))}function W(t,r,n){return t.isFilePath&&""===(n=e.getNormalizedAbsolutePath(n,r))&&(n="."),n}function G(e,t,r){if(!P(t)){var n=t.toLowerCase(),i=e.type.get(n);if(void 0!==i)return i;r.push(u(e))}}function H(e){return"function"==typeof e.trim?e.trim():e.replace(/^[\s]+|[\s]+$/g,"")}e.libs=a.map((function(e){return e[0]})),e.libMap=e.createMapFromEntries(a),e.commonOptionsWithBuild=[{name:"help",shortName:"h",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_this_message},{name:"help",shortName:"?",type:"boolean"},{name:"watch",shortName:"w",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Watch_input_files},{name:"preserveWatchOutput",type:"boolean",showInSimplifiedHelpView:!1,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen},{name:"listFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_files_part_of_the_compilation},{name:"listEmittedFiles",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Print_names_of_generated_files_part_of_the_compilation},{name:"pretty",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental},{name:"traceResolution",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Enable_tracing_of_the_name_resolution_process},{name:"diagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_diagnostic_information},{name:"extendedDiagnostics",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Show_verbose_diagnostic_information},{name:"generateCpuProfile",type:"string",isFilePath:!0,paramType:e.Diagnostics.FILE_OR_DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Generates_a_CPU_profile},{name:"incremental",shortName:"i",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_incremental_compilation,transpileOptionValue:void 0},{name:"locale",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us}],e.optionDeclarations=t(e.commonOptionsWithBuild,[{name:"all",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_all_compiler_options},{name:"version",shortName:"v",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Print_the_compiler_s_version},{name:"init",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file},{name:"project",shortName:"p",type:"string",isFilePath:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,paramType:e.Diagnostics.FILE_OR_DIRECTORY,description:e.Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json},{name:"build",type:"boolean",shortName:"b",showInSimplifiedHelpView:!0,category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date},{name:"showConfig",type:"boolean",category:e.Diagnostics.Command_line_Options,isCommandLineOnly:!0,description:e.Diagnostics.Print_the_final_configuration_instead_of_building},{name:"listFilesOnly",type:"boolean",category:e.Diagnostics.Command_line_Options,affectsSemanticDiagnostics:!0,affectsEmit:!0,isCommandLineOnly:!0,description:e.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing},{name:"target",shortName:"t",type:e.createMapFromTemplate({es3:0,es5:1,es6:2,es2015:2,es2016:3,es2017:4,es2018:5,es2019:6,es2020:7,esnext:99}),affectsSourceFile:!0,affectsModuleResolution:!0,affectsEmit:!0,paramType:e.Diagnostics.VERSION,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_or_ESNEXT},{name:"module",shortName:"m",type:e.createMapFromTemplate({none:e.ModuleKind.None,commonjs:e.ModuleKind.CommonJS,amd:e.ModuleKind.AMD,system:e.ModuleKind.System,umd:e.ModuleKind.UMD,es6:e.ModuleKind.ES2015,es2015:e.ModuleKind.ES2015,esnext:e.ModuleKind.ESNext}),affectsModuleResolution:!0,affectsEmit:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_or_ESNext},{name:"lib",type:"list",element:{name:"lib",type:e.libMap},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_library_files_to_be_included_in_the_compilation,transpileOptionValue:void 0},{name:"allowJs",type:"boolean",affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Allow_javascript_files_to_be_compiled},{name:"checkJs",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Report_errors_in_js_files},{name:"jsx",type:e.createMapFromTemplate({preserve:1,"react-native":3,react:2}),affectsSourceFile:!0,paramType:e.Diagnostics.KIND,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_or_react},{name:"declaration",shortName:"d",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_d_ts_file,transpileOptionValue:void 0},{name:"declarationMap",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file,transpileOptionValue:void 0},{name:"emitDeclarationOnly",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Only_emit_d_ts_declaration_files,transpileOptionValue:void 0},{name:"sourceMap",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Generates_corresponding_map_file},{name:"outFile",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.FILE,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Concatenate_and_emit_output_to_single_file,transpileOptionValue:void 0},{name:"outDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Redirect_output_structure_to_the_directory},{name:"rootDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir},{name:"composite",type:"boolean",affectsEmit:!0,isTSConfigOnly:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Enable_project_compilation,transpileOptionValue:void 0},{name:"tsBuildInfoFile",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.FILE,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Specify_file_to_store_incremental_compilation_information,transpileOptionValue:void 0},{name:"removeComments",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_comments_to_output},{name:"noEmit",type:"boolean",affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Do_not_emit_outputs,transpileOptionValue:void 0},{name:"importHelpers",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Import_emit_helpers_from_tslib},{name:"downlevelIteration",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3},{name:"isolatedModules",type:"boolean",category:e.Diagnostics.Basic_Options,description:e.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule,transpileOptionValue:!0},{name:"strict",type:"boolean",showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_all_strict_type_checking_options},{name:"noImplicitAny",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type},{name:"strictNullChecks",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_null_checks},{name:"strictFunctionTypes",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_function_types},{name:"strictBindCallApply",type:"boolean",strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions},{name:"strictPropertyInitialization",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Enable_strict_checking_of_property_initialization_in_classes},{name:"noImplicitThis",type:"boolean",affectsSemanticDiagnostics:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type},{name:"alwaysStrict",type:"boolean",affectsSourceFile:!0,strictFlag:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Strict_Type_Checking_Options,description:e.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file},{name:"noUnusedLocals",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_locals},{name:"noUnusedParameters",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_on_unused_parameters},{name:"noImplicitReturns",type:"boolean",affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value},{name:"noFallthroughCasesInSwitch",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Additional_Checks,description:e.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement},{name:"moduleResolution",type:e.createMapFromTemplate({node:e.ModuleResolutionKind.NodeJs,classic:e.ModuleResolutionKind.Classic}),affectsModuleResolution:!0,paramType:e.Diagnostics.STRATEGY,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6},{name:"baseUrl",type:"string",affectsModuleResolution:!0,isFilePath:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Base_directory_to_resolve_non_absolute_module_names},{name:"paths",type:"object",affectsModuleResolution:!0,isTSConfigOnly:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl,transpileOptionValue:void 0},{name:"rootDirs",type:"list",isTSConfigOnly:!0,element:{name:"rootDirs",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime,transpileOptionValue:void 0},{name:"typeRoots",type:"list",element:{name:"typeRoots",type:"string",isFilePath:!0},affectsModuleResolution:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.List_of_folders_to_include_type_definitions_from},{name:"types",type:"list",element:{name:"types",type:"string"},affectsModuleResolution:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Type_declaration_files_to_be_included_in_compilation,transpileOptionValue:void 0},{name:"allowSyntheticDefaultImports",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking},{name:"esModuleInterop",type:"boolean",affectsSemanticDiagnostics:!0,affectsEmit:!0,showInSimplifiedHelpView:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports},{name:"preserveSymlinks",type:"boolean",category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Do_not_resolve_the_real_path_of_symlinks},{name:"allowUmdGlobalAccess",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Module_Resolution_Options,description:e.Diagnostics.Allow_accessing_UMD_globals_from_modules},{name:"sourceRoot",type:"string",affectsEmit:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations},{name:"mapRoot",type:"string",affectsEmit:!0,paramType:e.Diagnostics.LOCATION,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations},{name:"inlineSourceMap",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file},{name:"inlineSources",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Source_Map_Options,description:e.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set},{name:"experimentalDecorators",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_ES7_decorators},{name:"emitDecoratorMetadata",type:"boolean",category:e.Diagnostics.Experimental_Options,description:e.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators},{name:"jsxFactory",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h},{name:"resolveJsonModule",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Include_modules_imported_with_json_extension},{name:"out",type:"string",affectsEmit:!0,isFilePath:!1,category:e.Diagnostics.Advanced_Options,paramType:e.Diagnostics.FILE,description:e.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,transpileOptionValue:void 0},{name:"reactNamespace",type:"string",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit},{name:"skipDefaultLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files},{name:"charset",type:"string",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_character_set_of_the_input_files},{name:"emitBOM",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files},{name:"newLine",type:e.createMapFromTemplate({crlf:0,lf:1}),affectsEmit:!0,paramType:e.Diagnostics.NEWLINE,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix},{name:"noErrorTruncation",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_truncate_error_messages},{name:"noLib",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts,transpileOptionValue:!0},{name:"noResolve",type:"boolean",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files,transpileOptionValue:!0},{name:"stripInternal",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation},{name:"disableSizeLimit",type:"boolean",affectsSourceFile:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_size_limitations_on_JavaScript_projects},{name:"disableSourceOfProjectReferenceRedirect",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects},{name:"noImplicitUseStrict",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_use_strict_directives_in_module_output},{name:"noEmitHelpers",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output},{name:"noEmitOnError",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,transpileOptionValue:void 0},{name:"preserveConstEnums",type:"boolean",affectsEmit:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code},{name:"declarationDir",type:"string",affectsEmit:!0,isFilePath:!0,paramType:e.Diagnostics.DIRECTORY,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Output_directory_for_generated_declaration_files,transpileOptionValue:void 0},{name:"skipLibCheck",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Skip_type_checking_of_declaration_files},{name:"allowUnusedLabels",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unused_labels},{name:"allowUnreachableCode",type:"boolean",affectsBindDiagnostics:!0,affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Do_not_report_errors_on_unreachable_code},{name:"suppressExcessPropertyErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_excess_property_checks_for_object_literals},{name:"suppressImplicitAnyIndexErrors",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures},{name:"forceConsistentCasingInFileNames",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file},{name:"maxNodeModuleJsDepth",type:"number",affectsModuleResolution:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files},{name:"noStrictGenericChecks",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types},{name:"useDefineForClassFields",type:"boolean",affectsSemanticDiagnostics:!0,category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Emit_class_fields_with_Define_instead_of_Set},{name:"keyofStringsOnly",type:"boolean",category:e.Diagnostics.Advanced_Options,description:e.Diagnostics.Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols},{name:"plugins",type:"list",isTSConfigOnly:!0,element:{name:"plugin",type:"object"},description:e.Diagnostics.List_of_language_service_plugins}]),e.semanticDiagnosticsOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsSemanticDiagnostics})),e.affectsEmitOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsEmit})),e.moduleResolutionOptionDeclarations=e.optionDeclarations.filter((function(e){return!!e.affectsModuleResolution})),e.sourceFileAffectingCompilerOptions=e.optionDeclarations.filter((function(e){return!!e.affectsSourceFile||!!e.affectsModuleResolution||!!e.affectsBindDiagnostics})),e.transpileOptionValueCompilerOptions=e.optionDeclarations.filter((function(t){return e.hasProperty(t,"transpileOptionValue")})),e.buildOpts=t(e.commonOptionsWithBuild,[{name:"verbose",shortName:"v",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Enable_verbose_logging,type:"boolean"},{name:"dry",shortName:"d",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,type:"boolean"},{name:"force",shortName:"f",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,type:"boolean"},{name:"clean",category:e.Diagnostics.Command_line_Options,description:e.Diagnostics.Delete_the_outputs_of_all_projects,type:"boolean"}]),e.typeAcquisitionDeclarations=[{name:"enableAutoDiscovery",type:"boolean"},{name:"enable",type:"boolean"},{name:"include",type:"list",element:{name:"include",type:"string"}},{name:"exclude",type:"list",element:{name:"exclude",type:"string"}}],e.defaultInitCompilerOptions={module:e.ModuleKind.CommonJS,target:1,strict:!0,esModuleInterop:!0,forceConsistentCasingInFileNames:!0},e.convertEnableAutoDiscoveryToEnable=o,e.getOptionNameMap=s,e.createOptionNameMap=c,e.createCompilerDiagnosticForInvalidCustomType=u,e.parseCustomTypeOption=_,e.parseListTypeOption=d,e.parseCommandLine=function(t,r){return p(s,[e.Diagnostics.Unknown_compiler_option_0,e.Diagnostics.Compiler_option_0_expects_an_argument],t,r)},e.getOptionFromName=m,e.parseBuildCommand=function(t){var r,n=p((function(){return r||(r=c(e.buildOpts))}),[e.Diagnostics.Unknown_build_option_0,e.Diagnostics.Build_option_0_requires_a_value_of_type_1],t),i=n.options,a=n.fileNames,o=n.errors,s=i;return 0===a.length&&a.push("."),s.clean&&s.force&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","force")),s.clean&&s.verbose&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","verbose")),s.clean&&s.watch&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"clean","watch")),s.watch&&s.dry&&o.push(e.createCompilerDiagnostic(e.Diagnostics.Options_0_and_1_cannot_be_combined,"watch","dry")),{buildOptions:s,projects:a,errors:o}},e.getDiagnosticText=function(t){for(var r=[],n=1;n0)for(var x=function(t){if(e.fileExtensionIs(t,".json")){if(!o){var n=d.filter((function(t){return e.endsWith(t,".json")})),a=e.map(e.getRegularExpressionsForWildcards(n,r,"files"),(function(e){return"^"+e+"$"}));o=a?a.map((function(t){return e.getRegexFromPattern(t,i.useCaseSensitiveFileNames)})):e.emptyArray}if(-1!==e.findIndex(o,(function(e){return e.test(t)}))){var _=s(t);c.has(_)||l.has(_)||l.set(_,t)}return"continue"}if(function(t,r,n,i,a){for(var o=e.getExtensionPriority(t,i),s=e.adjustExtensionPriority(o,i),c=0;cn&&(n=u),1===n)return n}return n}break;case 249:var l=0;return e.forEachChild(t,(function(t){var n=a(t,r);switch(n){case 0:return;case 2:return void(l=2);case 1:return l=1,!0;default:e.Debug.assertNever(n)}})),l;case 248:return i(t,r);case 75:if(t.isInJSDocNamespace)return 0}return 1}(t,r);return r.set(n,s),s}function o(t,r){for(var n=t.propertyName||t.name,i=t.parent;i;){if(e.isBlock(i)||e.isModuleBlock(i)||e.isSourceFile(i)){for(var o=void 0,s=0,c=i.statements;so)&&(o=l),1===o)return o}}if(void 0!==o)return o}i=i.parent}return 1}function s(t){return e.Debug.attachFlowNodeDebugInfo(t),t}!function(e){e[e.NonInstantiated=0]="NonInstantiated",e[e.Instantiated=1]="Instantiated",e[e.ConstEnumOnly=2]="ConstEnumOnly"}(e.ModuleInstanceState||(e.ModuleInstanceState={})),e.getModuleInstanceState=i,function(e){e[e.None=0]="None",e[e.IsContainer=1]="IsContainer",e[e.IsBlockScopedContainer=2]="IsBlockScopedContainer",e[e.IsControlFlowContainer=4]="IsControlFlowContainer",e[e.IsFunctionLike=8]="IsFunctionLike",e[e.IsFunctionExpression=16]="IsFunctionExpression",e[e.HasLocals=32]="HasLocals",e[e.IsInterface=64]="IsInterface",e[e.IsObjectLiteralOrClassExpressionMethod=128]="IsObjectLiteralOrClassExpressionMethod"}(n||(n={}));var c=s,u=function(){var n,a,o,u,f,y,h,v,b,x,D,S,T,E,C,k,N,A,F,P,w,I,O,M,L=0,R={flags:1},B={flags:1},j=0;function K(t,r,i,a,o){return e.createDiagnosticForNodeInSourceFile(e.getSourceFileOfNode(t)||n,t,r,i,a,o)}return function(t,r){n=t,a=r,o=e.getEmitScriptTarget(a),w=function(t,r){return!(!e.getStrictOptionValue(r,"alwaysStrict")||t.isDeclarationFile)||!!t.externalModuleIndicator}(n,r),O=e.createUnderscoreEscapedMap(),L=0,M=n.isDeclarationFile,I=e.objectAllocator.getSymbolConstructor(),e.Debug.attachFlowNodeDebugInfo(R),e.Debug.attachFlowNodeDebugInfo(B),n.locals||(Be(n),n.symbolCount=L,n.classifiableNames=O,function(){if(!b)return;for(var t=f,r=v,i=h,a=u,o=D,c=0,l=b;c=224&&t.kind<=240&&!a.allowUnreachableCode&&(t.flowNode=D),t.kind){case 228:!function(e){var t=ie(),r=ne(),n=ne();oe(t,D),D=t,me(e.expression,r,n),D=_e(r),ge(e.statement,n,t),oe(t,D),D=_e(n)}(t);break;case 227:!function(t){var r=ie(),n=237===t.parent.kind?e.lastOrUndefined(A):void 0,i=n?n.continueTarget:ne(),a=n?n.breakTarget:ne();oe(r,D),D=r,ge(t.statement,a,i),oe(i,D),D=_e(i),me(t.expression,r,a),D=_e(a)}(t);break;case 229:!function(e){var t=ie(),r=ne(),n=ne();Be(e.initializer),oe(t,D),D=t,me(e.condition,r,n),D=_e(r),ge(e.statement,n,t),Be(e.incrementor),oe(t,D),D=_e(n)}(t);break;case 230:case 231:!function(e){var t=ie(),r=ne();Be(e.expression),oe(t,D),D=t,231===e.kind&&Be(e.awaitModifier);oe(r,D),Be(e.initializer),242!==e.initializer.kind&&ve(e.initializer);ge(e.statement,r,t),oe(t,D),D=_e(r)}(t);break;case 226:!function(e){var t=ne(),r=ne(),n=ne();me(e.expression,t,r),D=_e(t),Be(e.thenStatement),oe(n,D),D=_e(r),Be(e.elseStatement),oe(n,D),D=_e(n)}(t);break;case 234:case 238:!function(e){Be(e.expression),234===e.kind&&(F=!0,E&&oe(E,D));D=R}(t);break;case 233:case 232:!function(e){if(Be(e.label),e.label){var t=function(e){if(A)for(var t=0,r=A;t=112&&t.originalKeywordKind<=120)||e.isIdentifierName(t)||8388608&t.flags||4194304&t.flags||n.parseDiagnostics.length||n.bindDiagnostics.push(K(t,function(t){if(e.getContainingClass(t))return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;if(n.externalModuleIndicator)return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode}(t),e.declarationNameToString(t)))}function Ie(t,r){if(r&&75===r.kind){var i=r;if(function(t){return e.isIdentifier(t)&&("eval"===t.escapedText||"arguments"===t.escapedText)}(i)){var a=e.getErrorSpanForNode(n,r);n.bindDiagnostics.push(e.createFileDiagnostic(n,a.start,a.length,function(t){if(e.getContainingClass(t))return e.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;if(n.externalModuleIndicator)return e.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;return e.Diagnostics.Invalid_use_of_0_in_strict_mode}(t),e.idText(i)))}}}function Oe(e){w&&Ie(e,e.name)}function Me(t){if(o<2&&288!==h.kind&&248!==h.kind&&!e.isFunctionLike(h)){var r=e.getErrorSpanForNode(n,t);n.bindDiagnostics.push(e.createFileDiagnostic(n,r.start,r.length,function(t){return e.getContainingClass(t)?e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode:n.externalModuleIndicator?e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode:e.Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5}(t)))}}function Le(t,r,i,a,o){var s=e.getSpanOfTokenAtPosition(n,t.pos);n.bindDiagnostics.push(e.createFileDiagnostic(n,s.start,s.length,r,i,a,o))}function Re(t,i,a,o){!function(t,i,a){var o=e.createFileDiagnostic(n,i.pos,i.end-i.pos,a);t?n.bindDiagnostics.push(o):n.bindSuggestionDiagnostics=e.append(n.bindSuggestionDiagnostics,r(r({},o),{category:e.DiagnosticCategory.Suggestion}))}(t,{pos:e.getTokenPosOfNode(i,n),end:a.end},o)}function Be(t){if(t){t.parent=u;var r=w;if(function(t){switch(t.kind){case 75:if(t.isInJSDocNamespace){for(var r=t.parent;r&&!e.isJSDocTypeAlias(r);)r=r.parent;Pe(r,524288,788968);break}case 103:return D&&(e.isExpression(t)||280===u.kind)&&(t.flowNode=D),we(t);case 193:case 194:var i=t;D&&ee(i)&&(i.flowNode=D),e.isSpecialPropertyDeclaration(i)&&function(t){103===t.expression.kind?qe(t):e.isBindableStaticAccessExpression(t)&&288===t.parent.parent.kind&&(e.isPrototypeAccess(t.expression)?He(t,t.parent):Ye(t))}(i),e.isInJSFile(i)&&n.commonJsModuleIndicator&&e.isModuleExportsAccessExpression(i)&&!d(h,"module")&&W(n.locals,void 0,i.expression,134217729,111550);break;case 208:switch(e.getAssignmentDeclarationKind(t)){case 1:Ve(t);break;case 2:!function(t){if(!Ue(t))return;var r=e.getRightMostAssignedExpression(t.right);if(e.isEmptyObjectLiteral(r)||f===n&&_(n,r))return;var i=e.exportAssignmentIsAlias(t)?2097152:1049092;U(W(n.symbol.exports,n.symbol,t,67108864|i,0),t)}(t);break;case 3:He(t.left,t);break;case 6:!function(e){e.left.parent=e,e.right.parent=e,Ze(e.left.expression,e.left,!1,!0)}(t);break;case 4:qe(t);break;case 5:!function(t){var r=et(t.left.expression);if(!e.isInJSFile(t)&&!e.isFunctionSymbol(r))return;if(t.left.parent=t,t.right.parent=t,e.isIdentifier(t.left.expression)&&f===n&&_(n,t.left.expression))Ve(t);else if(e.hasDynamicName(t)){Fe(t,67108868,"__computed");var i=Xe(r,t.left.expression,$e(t.left),!1,!1);Ge(t,i)}else Ye(e.cast(t.left,e.isBindableStaticAccessExpression))}(t);break;case 0:break;default:e.Debug.fail("Unknown binary expression special property assignment kind")}return function(t){w&&e.isLeftHandSideExpression(t.left)&&e.isAssignmentOperator(t.operatorToken.kind)&&Ie(t,t.left)}(t);case 278:return function(e){w&&e.variableDeclaration&&Ie(e,e.variableDeclaration.name)}(t);case 202:return function(t){if(w&&75===t.expression.kind){var r=e.getErrorSpanForNode(n,t.expression);n.bindDiagnostics.push(e.createFileDiagnostic(n,r.start,r.length,e.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}(t);case 8:return function(t){w&&32&t.numericLiteralFlags&&n.bindDiagnostics.push(K(t,e.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode))}(t);case 207:return function(e){w&&Ie(e,e.operand)}(t);case 206:return function(e){w&&(45!==e.operator&&46!==e.operator||Ie(e,e.operand))}(t);case 235:return function(t){w&&Le(t,e.Diagnostics.with_statements_are_not_allowed_in_strict_mode)}(t);case 237:return function(t){w&&a.target>=2&&(e.isDeclarationStatement(t.statement)||e.isVariableStatement(t.statement))&&Le(t.label,e.Diagnostics.A_label_is_not_allowed_here)}(t);case 182:return void(x=!0);case 167:break;case 154:return function(t){if(e.isJSDocTemplateTag(t.parent)){var r=e.find(t.parent.parent.tags,e.isJSDocTypeAlias)||e.getHostSignatureFromJSDoc(t.parent);r?(r.locals||(r.locals=e.createSymbolTable()),W(r.locals,void 0,t,262144,526824)):ke(t,262144,526824)}else if(180===t.parent.kind){var n=function(t){var r=e.findAncestor(t,(function(t){return t.parent&&e.isConditionalTypeNode(t.parent)&&t.parent.extendsType===t}));return r&&r.parent}(t.parent);n?(n.locals||(n.locals=e.createSymbolTable()),W(n.locals,void 0,t,262144,526824)):Fe(t,262144,V(t))}else ke(t,262144,526824)}(t);case 155:return nt(t);case 241:return rt(t);case 190:return t.flowNode=D,rt(t);case 158:case 157:return function(e){return it(e,4|(e.questionToken?16777216:0),0)}(t);case 279:case 280:return it(t,4,0);case 282:return it(t,8,900095);case 164:case 165:case 166:return ke(t,131072,0);case 160:case 159:return it(t,8192|(t.questionToken?16777216:0),e.isObjectLiteralMethod(t)?0:103359);case 243:return function(t){n.isDeclarationFile||8388608&t.flags||e.isAsyncFunction(t)&&(P|=2048);Oe(t),w?(Me(t),Pe(t,16,110991)):ke(t,16,110991)}(t);case 161:return ke(t,16384,0);case 162:return it(t,32768,46015);case 163:return it(t,65536,78783);case 169:case 298:case 303:case 170:return function(t){var r=J(131072,V(t));z(r,t,131072);var n=J(2048,"__type");z(n,t,2048),n.members=e.createSymbolTable(),n.members.set(r.escapedName,r)}(t);case 172:case 302:case 185:return function(e){return Fe(e,2048,"__type")}(t);case 307:return function(t){Q(t);var r=e.getHostSignatureFromJSDoc(t);r&&160!==r.kind&&z(r.symbol,r,32)}(t);case 192:return function(t){var r;if(function(e){e[e.Property=1]="Property",e[e.Accessor=2]="Accessor"}(r||(r={})),w)for(var i=e.createUnderscoreEscapedMap(),a=0,o=t.properties;a151){var i=u;u=t;var o=Ee(t);0===o?H(t):function(t,r){var n=f,i=y,a=h;if(1&r?(201!==t.kind&&(y=f),f=h=t,32&r&&(f.locals=e.createSymbolTable()),Ce(f)):2&r&&((h=t).locals=void 0),4&r){var o=c,u=D,l=S,_=T,d=E,p=A,m=F,g=16&r&&!e.hasModifier(t,256)&&!t.asteriskToken&&!!e.getImmediatelyInvokedFunctionExpression(t);g||(D=s({flags:2}),144&r&&(D.node=t)),E=g||161===t.kind?ne():void 0,S=void 0,T=void 0,A=void 0,F=!1,c=s,H(t),t.flags&=-2817,!(1&D.flags)&&8&r&&e.nodeIsPresent(t.body)&&(t.flags|=256,F&&(t.flags|=512),t.endFlowNode=D),288===t.kind&&(t.flags|=P),E&&(oe(E,D),D=_e(E),161===t.kind&&(t.returnFlowNode=D)),g||(D=u),S=l,T=_,E=d,A=p,F=m,c=o}else 64&r?(x=!1,H(t),t.flags=x?128|t.flags:-129&t.flags):H(t);f=n,y=i,h=a}(t,o),u=i}else if(!M&&0==(536870912&t.transformFlags)){j|=p(t,0);i=u;1===t.kind&&(u=t),je(t),u=i}w=r}}function je(t){if(e.hasJSDocNodes(t))if(e.isInJSFile(t))for(var r=0,n=t.jsDoc;r=167&&e<=187)return-2;switch(e){case 195:case 196:case 191:return 536875008;case 248:return 537168896;case 155:return 536870912;case 201:return 537371648;case 200:case 243:return 537373696;case 242:return 536944640;case 244:case 213:return 536888320;case 161:return 537372672;case 160:case 162:case 163:return 537372672;case 124:case 139:case 150:case 136:case 142:case 140:case 127:case 143:case 109:case 154:case 157:case 159:case 164:case 165:case 166:case 245:case 246:return-2;case 192:return 536896512;case 278:return 536879104;case 188:case 189:return 536875008;case 198:case 216:case 319:case 199:case 101:return 536870912;case 193:case 194:default:return 536870912}}function g(t,r){r.parent=t,e.forEachChild(r,(function(e){return g(r,e)}))}e.bindSourceFile=function(t,r){e.performance.mark("beforeBind"),e.perfLogger.logStartBindFile(""+t.fileName),u(t,r),e.perfLogger.logStopBindFile(),e.performance.mark("afterBind"),e.performance.measure("Bind","beforeBind","afterBind")},e.isExportsOrModuleExportsOrAlias=_,e.computeTransformFlagsForNode=p,e.getTransformFlagsSubtreeExclusions=m}(s||(s={})),function(e){e.createGetSymbolWalker=function(t,r,n,i,a,o,s,c,u,l,_){return function(d){void 0===d&&(d=function(){return!0});var p=[],f=[];return{walkType:function(t){try{return m(t),{visitedTypes:e.getOwnValues(p),visitedSymbols:e.getOwnValues(f)}}finally{e.clear(p),e.clear(f)}},walkSymbol:function(t){try{return h(t),{visitedTypes:e.getOwnValues(p),visitedSymbols:e.getOwnValues(f)}}finally{e.clear(p),e.clear(f)}}};function m(t){if(t&&(!p[t.id]&&(p[t.id]=t,!h(t.symbol)))){if(524288&t.flags){var r=t,n=r.objectFlags;4&n&&function(t){m(t.target),e.forEach(_(t),m)}(t),32&n&&function(e){m(e.typeParameter),m(e.constraintType),m(e.templateType),m(e.modifiersType)}(t),3&n&&(y(a=t),e.forEach(a.typeParameters,m),e.forEach(i(a),m),m(a.thisType)),24&n&&y(r)}var a;262144&t.flags&&function(e){m(u(e))}(t),3145728&t.flags&&function(t){e.forEach(t.types,m)}(t),4194304&t.flags&&function(e){m(e.type)}(t),8388608&t.flags&&function(e){m(e.objectType),m(e.indexType),m(e.constraint)}(t)}}function g(i){var a=r(i);a&&m(a.type),e.forEach(i.typeParameters,m);for(var o=0,s=i.parameters;o1&&2097152&b.flags&&(i=e.createSymbolTable()).set("export=",b);return N(i),function(r){r=function(t){var r=e.find(t,(function(t){return e.isExportDeclaration(t)&&!t.moduleSpecifier&&!!t.exportClause}));if(r){var n=e.mapDefined(r.exportClause.elements,(function(r){if(!r.propertyName){var n=e.filter(t,(function(t){return e.nodeHasName(t,r.name)}));if(e.length(n)&&e.every(n,S))return void e.forEach(n,T)}return r}));e.length(n)?r.exportClause.elements=e.createNodeArray(n):t=e.filter(t,(function(e){return e!==r}))}return t}(r=function(r){var n=e.filter(r,(function(t){return e.isExportDeclaration(t)&&!t.moduleSpecifier&&!!t.exportClause}));if(e.length(n)>1){var i=e.filter(r,(function(t){return!e.isExportDeclaration(t)||!!t.moduleSpecifier||!t.exportClause}));r=t(i,[e.createExportDeclaration(void 0,void 0,e.createNamedExports(e.flatMap(n,(function(e){return e.exportClause.elements}))),void 0)])}var a=e.filter(r,(function(t){return e.isExportDeclaration(t)&&!!t.moduleSpecifier&&!!t.exportClause}));if(e.length(a)>1){var o=e.group(a,(function(t){return e.isStringLiteral(t.moduleSpecifier)?">"+t.moduleSpecifier.text:">"}));if(o.length!==a.length)for(var s=function(n){n.length>1&&(r=t(e.filter(r,(function(e){return-1===n.indexOf(e)})),[e.createExportDeclaration(void 0,void 0,e.createNamedExports(e.flatMap(n,(function(e){return e.exportClause.elements}))),n[0].moduleSpecifier)]))},c=0,u=o;c0&&e.isSingleOrDoubleQuote(i.charCodeAt(0))?e.stripQuotes(i):i}return"default"===r?r="_default":"export="===r&&(r="_exports"),r=e.isIdentifierText(r,J)&&!e.isStringANonContextualKeyword(r)?r:"_"+r.replace(/[^a-zA-Z0-9]/g,"_")}function Q(e,t){return a.remappedSymbolNames.has(""+A(e))?a.remappedSymbolNames.get(""+A(e)):(t=X(e,t),a.remappedSymbolNames.set(""+A(e),t),t)}}(a,i,l)}))}};function i(t,r,i,a){e.Debug.assert(void 0===t||0==(8&t.flags));var o={enclosingDeclaration:t,flags:r||0,tracker:i&&i.trackSymbol?i:{trackSymbol:e.noop,moduleResolverHost:134217728&r?{getCommonSourceDirectory:n.getCommonSourceDirectory?function(){return n.getCommonSourceDirectory()}:function(){return""},getSourceFiles:function(){return n.getSourceFiles()},getCurrentDirectory:e.maybeBind(n,n.getCurrentDirectory),getProbableSymlinks:e.maybeBind(n,n.getProbableSymlinks)}:void 0},encounteredError:!1,visitedTypes:void 0,symbolDepth:void 0,inferTypeParameters:void 0,approximateLength:0},s=a(o);return o.encounteredError?void 0:s}function a(t){return t.truncating?t.truncating:t.truncating=!(1&t.flags)&&t.approximateLength>e.defaultMaximumTruncationLength}function s(t,r){o&&o.throwIfCancellationRequested&&o.throwIfCancellationRequested();var n=8388608&r.flags;if(r.flags&=-8388609,t){if(1&t.flags)return r.approximateLength+=3,e.createKeywordTypeNode(124);if(2&t.flags)return e.createKeywordTypeNode(147);if(4&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(142);if(8&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(139);if(64&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(150);if(16&t.flags)return r.approximateLength+=7,e.createKeywordTypeNode(127);if(1024&t.flags&&!(1048576&t.flags)){var i=ni(t.symbol),c=S(i,r,788968);return ro(i)===t?c:R(c,e.createTypeReferenceNode(e.symbolName(t.symbol),void 0))}if(1056&t.flags)return S(t.symbol,r,788968);if(128&t.flags)return r.approximateLength+=t.value.length+2,e.createLiteralTypeNode(e.setEmitFlags(e.createLiteral(t.value),16777216));if(256&t.flags){var m=t.value;return r.approximateLength+=(""+m).length,e.createLiteralTypeNode(m<0?e.createPrefix(40,e.createLiteral(-m)):e.createLiteral(m))}if(2048&t.flags)return r.approximateLength+=e.pseudoBigIntToString(t.value).length+1,e.createLiteralTypeNode(e.createLiteral(t.value));if(512&t.flags)return r.approximateLength+=t.intrinsicName.length,"true"===t.intrinsicName?e.createTrue():e.createFalse();if(8192&t.flags){if(!(1048576&r.flags)){if(Ti(t.symbol,r.enclosingDeclaration))return r.approximateLength+=6,S(t.symbol,r,111551);r.tracker.reportInaccessibleUniqueSymbolError&&r.tracker.reportInaccessibleUniqueSymbolError()}return r.approximateLength+=13,e.createTypeOperatorNode(146,e.createKeywordTypeNode(143))}if(16384&t.flags)return r.approximateLength+=4,e.createKeywordTypeNode(109);if(32768&t.flags)return r.approximateLength+=9,e.createKeywordTypeNode(145);if(65536&t.flags)return r.approximateLength+=4,e.createKeywordTypeNode(99);if(131072&t.flags)return r.approximateLength+=5,e.createKeywordTypeNode(136);if(4096&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(143);if(67108864&t.flags)return r.approximateLength+=6,e.createKeywordTypeNode(140);if(hu(t))return 4194304&r.flags&&(r.encounteredError||32768&r.flags||(r.encounteredError=!0),r.tracker.reportInaccessibleThisError&&r.tracker.reportInaccessibleThisError()),r.approximateLength+=4,e.createThis();if(!n&&t.aliasSymbol&&(16384&r.flags||Si(t.aliasSymbol,r.enclosingDeclaration))){var g=_(t.aliasTypeArguments,r);return!mi(t.aliasSymbol.escapedName)||32&t.aliasSymbol.flags?S(t.aliasSymbol,r,788968,g):e.createTypeReferenceNode(e.createIdentifier(""),g)}var y=e.getObjectFlags(t);if(4&y)return e.Debug.assert(!!(524288&t.flags)),t.node?O(t,L):L(t);if(262144&t.flags||3&y){if(262144&t.flags&&e.contains(r.inferTypeParameters,t))return r.approximateLength+=e.symbolName(t.symbol).length+6,e.createInferTypeNode(f(t,r,void 0));if(4&r.flags&&262144&t.flags&&!Si(t.symbol,r.enclosingDeclaration)){var h=E(t,r);return r.approximateLength+=e.idText(h).length,e.createTypeReferenceNode(e.createIdentifier(e.idText(h)),void 0)}return t.symbol?S(t.symbol,r,788968):e.createTypeReferenceNode(e.createIdentifier("?"),void 0)}if(3145728&t.flags){var v=1048576&t.flags?function(e){for(var t=[],r=0,n=0;n0?e.createUnionOrIntersectionTypeNode(1048576&t.flags?177:178,b):void(r.encounteredError||262144&r.flags||(r.encounteredError=!0))}if(48&y)return e.Debug.assert(!!(524288&t.flags)),I(t);if(4194304&t.flags){var x=t.type;r.approximateLength+=6;var D=s(x,r);return e.createTypeOperatorNode(D)}if(8388608&t.flags){var T=s(t.objectType,r);D=s(t.indexType,r);return r.approximateLength+=2,e.createIndexedAccessTypeNode(T,D)}if(16777216&t.flags){var C=s(t.checkType,r),k=r.inferTypeParameters;r.inferTypeParameters=t.root.inferTypeParameters;var F=s(t.extendsType,r);r.inferTypeParameters=k;var P=s(Au(t),r),w=s(Fu(t),r);return r.approximateLength+=15,e.createConditionalTypeNode(C,F,P,w)}return 33554432&t.flags?s(t.typeVariable,r):e.Debug.fail("Should be unreachable.")}function I(t){var n=""+t.id,i=t.symbol;if(i){if(Sg(i.valueDeclaration)){var a=t===Ha(i)?788968:111551;return S(i,r,a)}if(32&i.flags&&!Na(i)&&!(213===i.valueDeclaration.kind&&2048&r.flags)||896&i.flags||function(){var t=!!(8192&i.flags)&&e.some(i.declarations,(function(t){return e.hasModifier(t,32)})),a=!!(16&i.flags)&&(i.parent||e.forEach(i.declarations,(function(e){return 288===e.parent.kind||249===e.parent.kind})));if(t||a)return(!!(4096&r.flags)||r.visitedTypes&&r.visitedTypes.has(n))&&(!(8&r.flags)||Ti(i,r.enclosingDeclaration))}())return S(i,r,111551);if(r.visitedTypes&&r.visitedTypes.has(n)){var o=function(t){if(t.symbol&&2048&t.symbol.flags){var r=e.findAncestor(t.symbol.declarations[0].parent,(function(e){return 181!==e.kind}));if(246===r.kind)return ri(r)}return}(t);return o?S(o,r,788968):u(r)}return O(t,M)}return M(t)}function O(t,n){var i,a=""+t.id,o=16&e.getObjectFlags(t)&&t.symbol&&32&t.symbol.flags,s=4&e.getObjectFlags(t)&&t.node?"N"+N(t.node):t.symbol?(o?"+":"")+A(t.symbol):void 0;if(r.visitedTypes||(r.visitedTypes=e.createMap()),s&&!r.symbolDepth&&(r.symbolDepth=e.createMap()),s){if((i=r.symbolDepth.get(s)||0)>10)return u(r);r.symbolDepth.set(s,i+1)}r.visitedTypes.set(a,!0);var c=n(t);return r.visitedTypes.delete(a),s&&r.symbolDepth.set(s,i),c}function M(t){if(Xo(t))return function(t){e.Debug.assert(!!(524288&t.flags));var n,i=t.declaration.readonlyToken?e.createToken(t.declaration.readonlyToken.kind):void 0,a=t.declaration.questionToken?e.createToken(t.declaration.questionToken.kind):void 0;n=qo(t)?e.createTypeOperatorNode(s(Wo(t),r)):s(zo(t),r);var o=f(Jo(t),r,n),c=s(Uo(t),r),u=e.createMappedTypeNode(i,o,a,c);return r.approximateLength+=10,e.setEmitFlags(u,1)}(t);var n=Qo(t);if(!n.properties.length&&!n.stringIndexInfo&&!n.numberIndexInfo){if(!n.callSignatures.length&&!n.constructSignatures.length)return r.approximateLength+=2,e.setEmitFlags(e.createTypeLiteralNode(void 0),1);if(1===n.callSignatures.length&&!n.constructSignatures.length)return p(n.callSignatures[0],169,r);if(1===n.constructSignatures.length&&!n.callSignatures.length)return p(n.constructSignatures[0],170,r)}var i=r.flags;r.flags|=4194304;var o=function(t){if(a(r))return[e.createPropertySignature(void 0,"...",void 0,void 0,void 0)];for(var n=[],i=0,o=t.callSignatures;i0){var h=(t.target.typeParameters||e.emptyArray).length;y=_(n.slice(E,h),r)}var v=r.flags;r.flags|=16;var b=S(t.symbol,r,788968,y);return r.flags=v,u?R(u,b):b}if(n.length>0){var x=dc(t),D=_(n.slice(0,x),r),T=t.target.hasRestElement;if(D){for(var E=t.target.minLength;E2)return[s(t[0],r),e.createTypeReferenceNode("... "+(t.length-2)+" more ...",void 0),s(t[t.length-1],r)]}for(var i=[],o=0,c=0,u=t;c0)),a}function b(t,r){var n;return 524384&Iv(t).flags&&(n=e.createNodeArray(e.map(ja(t),(function(e){return m(e,r)})))),n}function x(t,r,n){e.Debug.assert(t&&0<=r&&r1?g(a,a.length-1,1):void 0,c=i||x(a,0,r),u=D(a[0],r);!(67108864&r.flags)&&e.getEmitModuleResolutionKind(K)===e.ModuleResolutionKind.NodeJs&&u.indexOf("/node_modules/")>=0&&(r.encounteredError=!0,r.tracker.reportLikelyUnsafeImportRequiredError&&r.tracker.reportLikelyUnsafeImportRequiredError(u));var l=e.createLiteralTypeNode(e.createLiteral(u));if(r.tracker.trackExternalModuleSymbolOfImportTypeNode&&r.tracker.trackExternalModuleSymbolOfImportTypeNode(a[0]),r.approximateLength+=u.length+10,!s||e.isEntityName(s)){if(s)(f=e.isIdentifier(s)?s:s.right).typeArguments=void 0;return e.createImportTypeNode(l,s,c,o)}var _=function t(r){return e.isIndexedAccessTypeNode(r.objectType)?t(r.objectType):r}(s),d=_.objectType.typeName;return e.createIndexedAccessTypeNode(e.createImportTypeNode(l,d,c,o),_.indexType)}var p=g(a,a.length-1,0);if(e.isIndexedAccessTypeNode(p))return p;if(o)return e.createTypeQueryNode(p);var f,m=(f=e.isIdentifier(p)?p:p.right).typeArguments;return f.typeArguments=void 0,e.createTypeReferenceNode(p,m);function g(t,n,a){var o,s=n===t.length-1?i:x(t,n,r),c=t[n],u=t[n-1];if(0===n)r.flags|=16777216,o=zi(c,r),r.approximateLength+=(o?o.length:0)+1,r.flags^=16777216;else if(u&&Qn(u)){var l=Qn(u);e.forEachEntry(l,(function(t,r){if(oi(t,c)&&!fo(r)&&"export="!==r)return o=e.unescapeLeadingUnderscores(r),!0}))}if(o||(o=zi(c,r)),r.approximateLength+=o.length+1,!(16&r.flags)&&u&&bo(u)&&bo(u).get(c.escapedName)&&oi(bo(u).get(c.escapedName),c)){var _=g(t,n-1,a);return e.isIndexedAccessTypeNode(_)?e.createIndexedAccessTypeNode(_,e.createLiteralTypeNode(e.createLiteral(o))):e.createIndexedAccessTypeNode(e.createTypeReferenceNode(_,s),e.createLiteralTypeNode(e.createLiteral(o)))}var d=e.setEmitFlags(e.createIdentifier(o,s),16777216);if(d.symbol=c,n>a){_=g(t,n-1,a);return e.isEntityName(_)?e.createQualifiedName(_,d):e.Debug.fail("Impossible construct - an export of an indexed access cannot be reachable")}return d}}function T(e,t){return!!gn(t.enclosingDeclaration,e,788968,void 0,e,!1)}function E(t,r){if(4&r.flags&&r.typeParameterNames){var n=r.typeParameterNames.get(""+qc(t));if(n)return n}var i=C(t.symbol,r,788968,!0);if(!(75&i.kind))return e.createIdentifier("(Missing type parameter)");if(4&r.flags){for(var a=i.escapedText,o=0,s=a;r.typeParameterNamesByText&&r.typeParameterNamesByText.get(s)||T(s,r);)s=a+"_"+ ++o;s!==a&&(i=e.createIdentifier(s,i.typeArguments)),(r.typeParameterNames||(r.typeParameterNames=e.createMap())).set(""+qc(t),i),(r.typeParameterNamesByText||(r.typeParameterNamesByText=e.createMap())).set(i.escapedText,!0)}return i}function C(t,r,n,i){var a=h(t,r,n);return!i||1===a.length||r.encounteredError||65536&r.flags||(r.encounteredError=!0),function t(n,i){var a=x(n,i,r);var o=n[i];0===i&&(r.flags|=16777216);var s=zi(o,r);0===i&&(r.flags^=16777216);var c=e.setEmitFlags(e.createIdentifier(s,a),16777216);c.symbol=o;return i>0?e.createQualifiedName(t(n,i-1),c):c}(a,a.length-1)}function k(t,r,n){var i=h(t,r,n);return function t(n,i){var a=x(n,i,r);var o=n[i];0===i&&(r.flags|=16777216);var s=zi(o,r);0===i&&(r.flags^=16777216);var c=s.charCodeAt(0);if(e.isSingleOrDoubleQuote(c)&&e.some(o.declarations,Ni))return e.createLiteral(D(o,r));var u=e.isIdentifierStart(c,J);if(0===i||u){var l=e.setEmitFlags(e.createIdentifier(s,a),16777216);return l.symbol=o,i>0?e.createPropertyAccess(t(n,i-1),l):l}91===c&&(s=s.substring(1,s.length-1),c=s.charCodeAt(0));var _=void 0;return e.isSingleOrDoubleQuote(c)?(_=e.createLiteral(s.substring(1,s.length-1).replace(/\\./g,(function(e){return e.substring(1)})))).singleQuote=39===c:""+ +s===s&&(_=e.createLiteral(+s)),_||((_=e.setEmitFlags(e.createIdentifier(s,a),16777216)).symbol=o),e.createElementAccess(t(n,i-1),_)}(i,i.length-1)}function F(t){return e.isIdentifierText(t,K.target)?e.createIdentifier(t):e.createLiteral(Mf(t)?+t:t)}}(),ee=e.createSymbolTable(),te=en(4,"undefined");te.declarations=[];var re=en(1536,"globalThis",8);re.exports=ee,ee.set(re.escapedName,re);var ne,ie=en(4,"arguments"),ae=en(4,"require"),oe={getNodeCount:function(){return e.sum(n.getSourceFiles(),"nodeCount")},getIdentifierCount:function(){return e.sum(n.getSourceFiles(),"identifierCount")},getSymbolCount:function(){return e.sum(n.getSourceFiles(),"symbolCount")+v},getTypeCount:function(){return h},getRelationCacheSizes:function(){return{assignable:Vr.size,identity:Wr.size,subtype:Ur.size}},isUndefinedSymbol:function(e){return e===te},isArgumentsSymbol:function(e){return e===ie},isUnknownSymbol:function(e){return e===ge},getMergedSymbol:ti,getDiagnostics:eb,getGlobalDiagnostics:function(){return tb(),jr.getGlobalDiagnostics()},getTypeOfSymbolAtLocation:function(t,r){return(r=e.getParseTreeNode(r))?function(t,r){if(t=t.exportSymbol||t,75===r.kind&&(e.isRightSideOfQualifiedNameOrPropertyAccess(r)&&(r=r.parent),e.isExpressionNode(r)&&!e.isAssignmentTarget(r))){var n=Ky(r);if(si(dn(r).resolvedSymbol)===t)return n}return wa(t)}(t,r):xe},getSymbolsOfParameterPropertyDeclaration:function(t,r){var n=e.getParseTreeNode(t,e.isParameter);return void 0===n?e.Debug.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."):function(t,r){var n=t.parent,i=t.parent.parent,a=fn(n.locals,r,111551),o=fn(bo(i.symbol),r,111551);if(a&&o)return[a,o];return e.Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration")}(n,e.escapeLeadingUnderscores(r))},getDeclaredTypeOfSymbol:ro,getPropertiesOfType:ts,getPropertyOfType:function(t,r){return vs(t,e.escapeLeadingUnderscores(r))},getTypeOfPropertyOfType:function(t,r){return Xi(t,e.escapeLeadingUnderscores(r))},getIndexInfoOfType:Ts,getSignaturesOfType:xs,getIndexTypeOfType:Es,getBaseTypes:Wa,getBaseTypeOfLiteralType:k_,getWidenedType:rd,getTypeFromTypeNode:function(t){var r=e.getParseTreeNode(t,e.isTypeNode);return r?Yu(r):xe},getParameterType:Mg,getPromisedTypeOfPromise:lh,getReturnTypeOfSignature:zs,isNullableType:_m,getNullableType:J_,getNonNullableType:U_,getNonOptionalType:W_,getTypeArguments:_c,typeToTypeNode:Z.typeToTypeNode,indexInfoToIndexSignatureDeclaration:Z.indexInfoToIndexSignatureDeclaration,signatureToSignatureDeclaration:Z.signatureToSignatureDeclaration,symbolToEntityName:Z.symbolToEntityName,symbolToExpression:Z.symbolToExpression,symbolToTypeParameterDeclarations:Z.symbolToTypeParameterDeclarations,symbolToParameterDeclaration:Z.symbolToParameterDeclaration,typeParameterToDeclaration:Z.typeParameterToDeclaration,getSymbolsInScope:function(t,r){return(t=e.getParseTreeNode(t))?function(t,r){if(16777216&t.flags)return[];var n=e.createSymbolTable(),i=!1;return function(){for(;t;){switch(t.locals&&!pn(t)&&o(t.locals,r),t.kind){case 288:if(!e.isExternalOrCommonJsModule(t))break;case 248:o(ri(t).exports,2623475&r);break;case 247:o(ri(t).exports,8&r);break;case 213:t.name&&a(t.symbol,r);case 244:case 245:i||o(bo(ri(t)),788968&r);break;case 200:t.name&&a(t.symbol,r)}e.introducesArgumentsExoticObject(t)&&a(ie,r),i=e.hasModifier(t,32),t=t.parent}o(ee,r)}(),n.delete("this"),Ns(n);function a(t,r){if(e.getCombinedLocalAndExportSymbolFlags(t)&r){var i=t.escapedName;n.has(i)||n.set(i,t)}}function o(e,t){t&&e.forEach((function(e){a(e,t)}))}}(t,r):[]},getSymbolAtLocation:function(t){return(t=e.getParseTreeNode(t))?cb(t):void 0},getShorthandAssignmentValueSymbol:function(t){return(t=e.getParseTreeNode(t))?function(e){if(e&&280===e.kind)return Kn(e.name,2208703);return}(t):void 0},getExportSpecifierLocalTargetSymbol:function(t){var r=e.getParseTreeNode(t,e.isExportSpecifier);return r?function(e){return e.parent.parent.moduleSpecifier?An(e.parent.parent,e):Kn(e.propertyName||e.name,2998271)}(r):void 0},getExportSymbolOfSymbol:function(e){return ti(e.exportSymbol||e)},getTypeAtLocation:function(t){return(t=e.getParseTreeNode(t))?ub(t):xe},getTypeOfAssignmentPattern:function(t){var r=e.getParseTreeNode(t,e.isAssignmentPattern);return r&&lb(r)||xe},getPropertySymbolOfDestructuringAssignment:function(t){var r=e.getParseTreeNode(t,e.isIdentifier);return r?function(t){var r=lb(e.cast(t.parent.parent,e.isAssignmentPattern));return r&&vs(r,t.escapedText)}(r):void 0},signatureToString:function(t,r,n,i){return wi(t,e.getParseTreeNode(r),n,i)},typeToString:function(t,r,n){return Ii(t,e.getParseTreeNode(r),n)},symbolToString:function(t,r,n,i){return Pi(t,e.getParseTreeNode(r),n,i)},typePredicateToString:function(t,r,n){return Ri(t,e.getParseTreeNode(r),n)},writeSignature:function(t,r,n,i,a){return wi(t,e.getParseTreeNode(r),n,i,a)},writeType:function(t,r,n,i){return Ii(t,e.getParseTreeNode(r),n,i)},writeSymbol:function(t,r,n,i,a){return Pi(t,e.getParseTreeNode(r),n,i,a)},writeTypePredicate:function(t,r,n,i){return Ri(t,e.getParseTreeNode(r),n,i)},getAugmentedPropertiesOfType:fb,getRootSymbols:function t(r){var n=function(t){if(6&e.getCheckFlags(t))return e.mapDefined(_n(t).containingType.types,(function(e){return vs(e,t.escapedName)}));if(33554432&t.flags){var r=t,n=r.leftSpread,i=r.rightSpread,a=r.syntheticOrigin;return n?[n,i]:a?[a]:e.singleElementArray(function(e){var t,r=e;for(;r=_n(r).target;)t=r;return t}(t))}return}(r);return n?e.flatMap(n,t):[r]},getContextualType:function(t,r){var n=e.getParseTreeNode(t,e.isExpression);return n?xf(n,r):void 0},getContextualTypeForObjectLiteralElement:function(t){var r=e.getParseTreeNode(t,e.isObjectLiteralElementLike);return r?pf(r):void 0},getContextualTypeForArgumentAtIndex:function(t,r){var n=e.getParseTreeNode(t,e.isCallLikeExpression);return n&&uf(n,r)},getContextualTypeForJsxAttribute:function(t){var r=e.getParseTreeNode(t,e.isJsxAttributeLike);return r&&gf(r)},isContextSensitive:bl,getFullyQualifiedName:jn,getResolvedSignature:function(e,t,r){return se(e,t,r,0)},getResolvedSignatureForSignatureHelp:function(e,t,r){return se(e,t,r,16)},getExpandedParameters:No,hasEffectiveRestParameter:Kg,getConstantValue:function(t){var r=e.getParseTreeNode(t,Ob);return r?Mb(r):void 0},isValidPropertyAccess:function(t,r){var n=e.getParseTreeNode(t,e.isPropertyAccessOrQualifiedNameOrImportTypeNode);return!!n&&function(e,t){switch(e.kind){case 193:return Pm(e,101===e.expression.kind,t,rd(zy(e.expression)));case 152:return Pm(e,!1,t,rd(zy(e.left)));case 187:return Pm(e,!1,t,Yu(e))}}(n,e.escapeLeadingUnderscores(r))},isValidPropertyAccessForCompletions:function(t,r,n){var i=e.getParseTreeNode(t,e.isPropertyAccessExpression);return!!i&&function(e,t,r){return Pm(e,193===e.kind&&101===e.expression.kind,r.escapedName,t)}(i,r,n)},getSignatureFromDeclaration:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?Ls(r):void 0},isImplementationOfOverload:function(t){var r=e.getParseTreeNode(t,e.isFunctionLike);return r?kb(r):void 0},getImmediateAliasedSymbol:Bf,getAliasedSymbol:Mn,getEmitResolver:function(e,t){return eb(e,t),$},getExportsOfModule:Yn,getExportsAndPropertiesOfModule:function(t){var r=Yn(t),n=Wn(t);n!==t&&e.addRange(r,ts(wa(n)));return r},getSymbolWalker:e.createGetSymbolWalker((function(e){return qs(e)||he}),Js,zs,Wa,Qo,wa,Od,Ss,ns,e.getFirstIdentifier,_c),getAmbientModules:function(){at||(at=[],ee.forEach((function(e,t){c.test(t)&&at.push(e)})));return at},getJsxIntrinsicTagNamesAt:function(t){var r=Wf(C.IntrinsicElements,t);return r?ts(r):e.emptyArray},isOptionalParameter:function(t){var r=e.getParseTreeNode(t,e.isParameter);return!!r&&Ps(r)},tryGetMemberInModuleExports:function(t,r){return Xn(e.escapeLeadingUnderscores(t),r)},tryGetMemberInModuleExportsAndProperties:function(t,r){return function(e,t){var r=Xn(e,t);if(r)return r;var n=Wn(t);if(n===t)return;var i=wa(n);return 131068&i.flags?void 0:vs(i,e)}(e.escapeLeadingUnderscores(t),r)},tryFindAmbientModuleWithoutAugmentations:function(e){return Fs(e,!1)},getApparentType:ms,getUnionType:Qc,isTypeAssignableTo:function(e,t){return Fl(e,t)},createAnonymousType:hi,createSignature:To,createSymbol:en,createIndexInfo:tc,getAnyType:function(){return he},getStringType:function(){return Ne},getNumberType:function(){return Ae},createPromiseType:Gg,createArrayType:jc,getElementTypeOfArrayType:v_,getBooleanType:function(){return Me},getFalseType:function(e){return e?Pe:we},getTrueType:function(e){return e?Ie:Oe},getVoidType:function(){return Re},getUndefinedType:function(){return Se},getNullType:function(){return Ce},getESSymbolType:function(){return Le},getNeverType:function(){return Be},getOptionalType:function(){return Ee},isSymbolAccessible:Ei,getObjectFlags:e.getObjectFlags,isArrayType:y_,isTupleType:w_,isArrayLikeType:b_,isTypeInvalidDueToUnionDiscriminant:function(e,t){return t.properties.some((function(t){var r=t.name&&ou(t.name),n=r&&_o(r)?yo(r):void 0,i=void 0===n?void 0:Xi(e,n);return!!i&&C_(i)&&!Fl(ub(t),i)}))},getAllPossiblePropertiesOfTypes:function(t){var r=Qc(t);if(!(1048576&r.flags))return fb(r);for(var n=e.createSymbolTable(),i=0,a=t;i>",0,he),$t=To(void 0,void 0,void 0,e.emptyArray,he,void 0,0,0),Zt=To(void 0,void 0,void 0,e.emptyArray,xe,void 0,0,0),er=To(void 0,void 0,void 0,e.emptyArray,he,void 0,0,0),tr=To(void 0,void 0,void 0,e.emptyArray,je,void 0,0,0),rr=tc(Ne,!0),nr=e.createMap(),ir={get yieldType(){throw new Error("Not supported")},get returnType(){throw new Error("Not supported")},get nextType(){throw new Error("Not supported")}},ar=rv(he,he,he),or=rv(he,he,De),sr=rv(Be,he,Se),cr={iterableCacheKey:"iterationTypesOfAsyncIterable",iteratorCacheKey:"iterationTypesOfAsyncIterator",iteratorSymbolName:"asyncIterator",getGlobalIteratorType:function(e){return Rt||(Rt=Fc("AsyncIterator",3,e))||Qe},getGlobalIterableType:function(e){return Lt||(Lt=Fc("AsyncIterable",1,e))||Qe},getGlobalIterableIteratorType:function(e){return Bt||(Bt=Fc("AsyncIterableIterator",1,e))||Qe},getGlobalGeneratorType:function(e){return jt||(jt=Fc("AsyncGenerator",3,e))||Qe},resolveIterationType:dh,mustHaveANextMethodDiagnostic:e.Diagnostics.An_async_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:e.Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method,mustHaveAValueDiagnostic:e.Diagnostics.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property},ur={iterableCacheKey:"iterationTypesOfIterable",iteratorCacheKey:"iterationTypesOfIterator",iteratorSymbolName:"iterator",getGlobalIteratorType:function(e){return Pt||(Pt=Fc("Iterator",3,e))||Qe},getGlobalIterableType:Mc,getGlobalIterableIteratorType:function(e){return wt||(wt=Fc("IterableIterator",1,e))||Qe},getGlobalGeneratorType:function(e){return It||(It=Fc("Generator",3,e))||Qe},resolveIterationType:function(e,t){return e},mustHaveANextMethodDiagnostic:e.Diagnostics.An_iterator_must_have_a_next_method,mustBeAMethodDiagnostic:e.Diagnostics.The_0_property_of_an_iterator_must_be_a_method,mustHaveAValueDiagnostic:e.Diagnostics.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property},lr=e.createMap(),_r=e.createMap(),dr=0,pr=0,fr=0,mr=!1,gr=0,yr=Wu(""),hr=Wu(0),vr=Wu({negative:!1,base10Value:"0"}),br=[],xr=[],Dr=[],Sr=0,Tr=10,Er=[],Cr=[],kr=[],Nr=[],Ar=[],Fr=[],Pr=[],wr=[],Ir=[],Or=[],Mr=[],Lr=[],Rr=[],Br=[],jr=e.createDiagnosticCollection(),Kr=e.createDiagnosticCollection(),Jr=e.createMapFromTemplate({string:Ne,number:Ae,bigint:Fe,boolean:Me,symbol:Le,undefined:Se}),zr=Qc(e.arrayFrom(D.keys(),Wu)),Ur=e.createMap(),Vr=e.createMap(),qr=e.createMap(),Wr=e.createMap(),Gr=e.createMap(),Hr=e.createSymbolTable();return Hr.set(te.escapedName,te),function(){for(var t=0,r=n.getSourceFiles();t=5||e.addRelatedInfo(a,e.length(a.relatedInformation)?e.createDiagnosticForNode(c,e.Diagnostics.and_here):e.createDiagnosticForNode(c,e.Diagnostics._0_was_also_declared_here,n))}}function un(e,t,r){void 0===r&&(r=!1),t.forEach((function(t,n){var i=e.get(n);e.set(n,i?on(i,t,r):t)}))}function ln(t){var r=t.parent;if(r.symbol.declarations[0]===r)if(e.isGlobalScopeAugmentation(r))un(ee,r.symbol.exports);else{var n=Un(t,t,8388608&t.parent.parent.flags?void 0:e.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found,!0);if(!n)return;if(1920&(n=Wn(n)).flags)if(e.some(ot,(function(e){return n===e.symbol}))){var i=on(r.symbol,n,!0);st||(st=e.createMap()),st.set(t.text,i)}else on(n,r.symbol);else Xr(t,e.Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,t.text)}else e.Debug.assert(r.symbol.declarations.length>1)}function _n(e){if(33554432&e.flags)return e;var t=A(e);return Cr[t]||(Cr[t]={})}function dn(e){var t=N(e);return kr[t]||(kr[t]={flags:0})}function pn(t){return 288===t.kind&&!e.isExternalOrCommonJsModule(t)}function fn(t,r,n){if(n){var i=t.get(r);if(i){if(e.Debug.assert(0==(1&e.getCheckFlags(i)),"Should never get an instantiated symbol here."),i.flags&n)return i;if(2097152&i.flags){var a=Mn(i);if(a===ge||a.flags&n)return i}}}}function mn(t,r){var i=e.getSourceFileOfNode(t),a=e.getSourceFileOfNode(r);if(i!==a){if(z&&(i.externalModuleIndicator||a.externalModuleIndicator)||!K.outFile&&!K.out||Md(r)||8388608&t.flags)return!0;if(u(r,t))return!0;var o=n.getSourceFiles();return o.indexOf(i)<=o.indexOf(a)}if(t.pos<=r.pos){if(190===t.kind){var s=e.getAncestor(r,190);return s?e.findAncestor(s,e.isBindingElement)!==e.findAncestor(t,e.isBindingElement)||t.post.end)return!1;return void 0===e.findAncestor(r,(function(e){if(e===t)return"quit";switch(e.kind){case 201:case 158:return!0;case 222:switch(e.parent.kind){case 162:case 160:case 163:return!0;default:return!1}default:return!1}}))}(t,r)}if(261===r.parent.kind||258===r.parent.kind&&r.parent.isExportEquals)return!0;if(258===r.kind&&r.isExportEquals)return!0;var c=e.getEnclosingBlockScopeContainer(t);return!!(4194304&r.flags)||Md(r)||u(r,t,c);function u(t,r,n){return!!e.findAncestor(t,(function(i){if(i===n)return"quit";if(e.isFunctionLike(i))return!0;if(i.parent&&158===i.parent.kind&&i.parent.initializer===i)if(e.hasModifier(i.parent,32)){if(160===r.kind)return!0}else if(!(158===r.kind&&!e.hasModifier(r,32))||e.getContainingClass(t)!==e.getContainingClass(r))return!0;return!1}))}}function gn(e,t,r,n,i,a,o,s){return void 0===o&&(o=!1),yn(e,t,r,n,i,a,o,fn,s)}function yn(t,r,n,i,a,o,s,c,u){var l,_,d,p,f,m,g=t,y=!1,h=t,v=!1;e:for(;t;){if(t.locals&&!pn(t)&&(l=c(t.locals,r,n))){var b=!0;if(e.isFunctionLike(t)&&_&&_!==t.body){if(n&l.flags&788968&&301!==_.kind&&(b=!!(262144&l.flags)&&(_===t.type||155===_.kind||154===_.kind)),n&l.flags&3){var x=t;K.target&&K.target>=2&&e.isParameter(_)&&x.body&&l.valueDeclaration.pos>=x.body.pos&&l.valueDeclaration.end<=x.body.end?b=!1:1&l.flags&&(b=155===_.kind||_===t.type&&!!e.findAncestor(l.valueDeclaration,e.isParameter))}}else 179===t.kind&&(b=_===t.trueType);if(b)break e;l=void 0}switch(y=y||hn(t,_),t.kind){case 288:if(!e.isExternalOrCommonJsModule(t))break;v=!0;case 248:var D=ri(t).exports||B;if(288===t.kind||e.isModuleDeclaration(t)&&8388608&t.flags&&!e.isGlobalScopeAugmentation(t)){if(l=D.get("default")){var S=e.getLocalSymbolForExportDefault(l);if(S&&l.flags&n&&S.escapedName===r)break e;l=void 0}var T=D.get(r);if(T&&2097152===T.flags&&e.getDeclarationOfKind(T,261))break}if("default"!==r&&(l=c(D,r,2623475&n))){if(!e.isSourceFile(t)||!t.commonJsModuleIndicator||l.declarations.some(e.isJSDocTypeAlias))break e;l=void 0}break;case 247:if(l=c(ri(t).exports,r,8&n))break e;break;case 158:if(!e.hasModifier(t,32)){var E=ui(t.parent);E&&E.locals&&c(E.locals,r,111551&n)&&(p=t)}break;case 244:case 213:case 245:if(l=c(ri(t).members||B,r,788968&n)){if(!xn(l,t)){l=void 0;break}if(_&&e.hasModifier(_,32))return void Xr(h,e.Diagnostics.Static_members_cannot_reference_class_type_parameters);break e}if(213===t.kind&&32&n){var C=t.name;if(C&&r===C.escapedText){l=t.symbol;break e}}break;case 215:if(_===t.expression&&89===t.parent.token){var k=t.parent.parent;if(e.isClassLike(k)&&(l=c(ri(k).members,r,788968&n)))return void(i&&Xr(h,e.Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters))}break;case 153:if(m=t.parent.parent,(e.isClassLike(m)||245===m.kind)&&(l=c(ri(m).members,r,788968&n)))return void Xr(h,e.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);break;case 201:if(K.target>=2)break;case 160:case 161:case 162:case 163:case 243:if(3&n&&"arguments"===r){l=ie;break e}break;case 200:if(3&n&&"arguments"===r){l=ie;break e}if(16&n){var N=t.name;if(N&&r===N.escapedText){l=t.symbol;break e}}break;case 156:t.parent&&155===t.parent.kind&&(t=t.parent),t.parent&&(e.isClassElement(t.parent)||244===t.parent.kind)&&(t=t.parent);break;case 315:case 308:case 309:t=e.getJSDocHost(t);break;case 155:_&&_===t.initializer&&(f=t);break;case 190:if(_&&_===t.initializer)155===(I=e.getRootDeclaration(t)).kind&&(f=t)}vn(t)&&(d=t),_=t,t=t.parent}if(!o||!l||d&&l===d.symbol||(l.isReferenced|=n),!l){if(_&&(e.Debug.assert(288===_.kind),_.commonJsModuleIndicator&&"exports"===r&&n&_.symbol.flags))return _.symbol;s||(l=c(ee,r,n))}if(!l&&g&&e.isInJSFile(g)&&g.parent&&e.isRequireCall(g.parent,!1))return ae;if(l){if(i){if(p){var A=p.name;return void Xr(h,e.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,e.declarationNameToString(A),bn(a))}if(h&&(2&n||(32&n||384&n)&&111551==(111551&n))){var F=si(l);(2&F.flags||32&F.flags||384&F.flags)&&function(t,r){if(e.Debug.assert(!!(2&t.flags||32&t.flags||384&t.flags)),67108881&t.flags&&32&t.flags)return;var n=e.find(t.declarations,(function(t){return e.isBlockOrCatchScoped(t)||e.isClassLike(t)||247===t.kind}));if(void 0===n)return e.Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");if(!(8388608&n.flags||mn(n,r))){var i=void 0,a=e.declarationNameToString(e.getNameOfDeclaration(n));2&t.flags?i=Xr(r,e.Diagnostics.Block_scoped_variable_0_used_before_its_declaration,a):32&t.flags?i=Xr(r,e.Diagnostics.Class_0_used_before_its_declaration,a):256&t.flags?i=Xr(r,e.Diagnostics.Enum_0_used_before_its_declaration,a):(e.Debug.assert(!!(128&t.flags)),K.preserveConstEnums&&(i=Xr(r,e.Diagnostics.Class_0_used_before_its_declaration,a))),i&&e.addRelatedInfo(i,e.createDiagnosticForNode(n,e.Diagnostics._0_is_declared_here,a))}}(F,h)}if(l&&v&&111551==(111551&n)&&!(4194304&g.flags)){var P=ti(l);e.length(P.declarations)&&e.every(P.declarations,(function(t){return e.isNamespaceExportDeclaration(t)||e.isSourceFile(t)&&!!t.symbol.globalExports}))&&$r(!K.allowUmdGlobalAccess,h,e.Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead,e.unescapeLeadingUnderscores(r))}if(l&&f&&!y&&111551==(111551&n)){var w=ti(xo(l)),I=e.getRootDeclaration(f);w===ri(f)?Xr(h,e.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer,e.declarationNameToString(f.name)):w.valueDeclaration&&w.valueDeclaration.pos>f.pos&&I.parent.locals&&c(I.parent.locals,w.escapedName,n)===w&&Xr(h,e.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it,e.declarationNameToString(f.name),e.declarationNameToString(h))}}return l}if(i&&!(h&&(function(t,r,n){if(!e.isIdentifier(t)||t.escapedText!==r||nb(t)||Md(t))return!1;var i=e.getThisContainer(t,!1),a=i;for(;a;){if(e.isClassLike(a.parent)){var o=ri(a.parent);if(!o)break;if(vs(wa(o),r))return Xr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,bn(n),Pi(o)),!0;if(a===i&&!e.hasModifier(a,32))if(vs(ro(o).thisType,r))return Xr(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,bn(n)),!0}a=a.parent}return!1}(h,r,a)||Dn(h)||function(t,r,n){var i=1920|(e.isInJSFile(t)?111551:0);if(n===i){var a=On(gn(t,r,788968&~i,void 0,void 0,!1)),o=t.parent;if(a){if(e.isQualifiedName(o)){e.Debug.assert(o.left===t,"Should only be resolving left side of qualified name as a namespace");var s=o.right.escapedText;if(vs(ro(a),s))return Xr(o,e.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1,e.unescapeLeadingUnderscores(r),e.unescapeLeadingUnderscores(s)),!0}return Xr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here,e.unescapeLeadingUnderscores(r)),!0}}return!1}(h,r,n)||function(t,r,n){if(111551&n){if("any"===r||"string"===r||"number"===r||"boolean"===r||"never"===r)return Xr(t,e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here,e.unescapeLeadingUnderscores(r)),!0;var i=On(gn(t,r,788544,void 0,void 0,!1));if(i&&!(1024&i.flags)){var a=function(e){switch(e){case"Promise":case"Symbol":case"Map":case"WeakMap":case"Set":case"WeakSet":return!0}return!1}(r)?e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later:e.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here;return Xr(t,a,e.unescapeLeadingUnderscores(r)),!0}}return!1}(h,r,n)||function(t,r,n){if(111127&n){if(On(gn(t,r,1024,void 0,void 0,!1)))return Xr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_value,e.unescapeLeadingUnderscores(r)),!0}else if(788544&n){if(On(gn(t,r,1536,void 0,void 0,!1)))return Xr(t,e.Diagnostics.Cannot_use_namespace_0_as_a_type,e.unescapeLeadingUnderscores(r)),!0}return!1}(h,r,n)||function(t,r,n){if(788584&n){var i=On(gn(t,r,111127,void 0,void 0,!1));if(i&&!(1920&i.flags))return Xr(t,e.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here,e.unescapeLeadingUnderscores(r)),!0}return!1}(h,r,n)))){var O=void 0;if(u&&Sr=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop",s=n.exports.get("export=").valueDeclaration,c=Xr(t.name,e.Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag,Pi(n),o);e.addRelatedInfo(c,e.createDiagnosticForNode(s,e.Diagnostics.This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag,o))}else n.exports&&n.exports.has(t.symbol.escapedName)?Xr(t.name,e.Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead,Pi(n),Pi(t.symbol)):Xr(t.name,e.Diagnostics.Module_0_has_no_default_export,Pi(n));return i}}(t,r);case 255:return function(e,t){var r=e.parent.parent.moduleSpecifier;return Gn(zn(e,r),r,t,!1)}(t,r);case 257:return function(e,t){return An(e.parent.parent.parent,e,t)}(t,r);case 261:return Fn(t,901119,r);case 258:case 208:return function(t,r){return Pn(e.isExportAssignment(t)?t.expression:t.right,r)}(t,r);case 251:return function(e,t){return Wn(e.parent.symbol,t)}(t,r);case 280:return Kn(t.name,901119,!0,r);case 279:return function(e,t){return Pn(e.initializer,t)}(t,r);case 193:return function(t,r){if(e.isBinaryExpression(t.parent)&&t.parent.left===t&&62===t.parent.operatorToken.kind)return Pn(t.parent.right,r)}(t,r);default:return e.Debug.fail()}}function In(e,t){return void 0===t&&(t=901119),!!e&&(2097152==(e.flags&(2097152|t))||!!(2097152&e.flags&&67108864&e.flags))}function On(e,t){return!t&&In(e)?Mn(e):e}function Mn(t){e.Debug.assert(0!=(2097152&t.flags),"Should only get Alias here.");var r=_n(t);if(r.target)r.target===ye&&(r.target=ge);else{r.target=ye;var n=En(t);if(!n)return e.Debug.fail();var i=wn(n);r.target===ye?r.target=i||ge:Xr(n,e.Diagnostics.Circular_definition_of_import_alias_0,Pi(t))}return r.target}function Ln(e){var t=ri(e),r=Mn(t);r&&((r===ge||111551&r.flags&&!Cb(r))&&Rn(t))}function Rn(t){var r=_n(t);if(!r.referenced){r.referenced=!0;var n=En(t);if(!n)return e.Debug.fail();if(e.isInternalModuleImportEqualsDeclaration(n)){var i=On(t);(i===ge||111551&i.flags)&&ky(n.moduleReference)}}}function Bn(t,r){return 75===t.kind&&e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),75===t.kind||152===t.parent.kind?Kn(t,1920,!1,r):(e.Debug.assert(252===t.parent.kind),Kn(t,901119,!1,r))}function jn(e,t){return e.parent?jn(e.parent,t)+"."+Pi(e):Pi(e,t,void 0,20)}function Kn(t,r,n,i,a){if(!e.nodeIsMissing(t)){var o,s=1920|(e.isInJSFile(t)?111551&r:0);if(75===t.kind){var c=r===s?e.Diagnostics.Cannot_find_namespace_0:Id(e.getFirstIdentifier(t)),u=e.isInJSFile(t)?function(t,r){if(Dc(t.parent)){var n=function(t){if(e.findAncestor(t,(function(t){return e.isJSDocNode(t)||4194304&t.flags?e.isJSDocTypeAlias(t):"quit"})))return;var r=e.getJSDocHost(t);if(e.isExpressionStatement(r)&&e.isBinaryExpression(r.expression)&&3===e.getAssignmentDeclarationKind(r.expression)){if(i=ri(r.expression.left))return Jn(i)}if((e.isObjectLiteralMethod(r)||e.isPropertyAssignment(r))&&e.isBinaryExpression(r.parent.parent)&&6===e.getAssignmentDeclarationKind(r.parent.parent)){if(i=ri(r.parent.parent.left))return Jn(i)}var n=e.getHostSignatureFromJSDocHost(r);if(n){var i;return(i=ri(n))&&i.valueDeclaration}}(t.parent);if(n)return gn(n,t.escapedText,r,void 0,t,!0)}}(t,r):void 0;if(!(o=gn(a||t,t.escapedText,r,n||u?void 0:c,t,!0)))return u}else{if(152!==t.kind&&193!==t.kind)throw e.Debug.assertNever(t,"Unknown entity name kind.");var l=152===t.kind?t.left:t.expression,_=152===t.kind?t.right:t.name,d=Kn(l,s,n,!1,a);if(!d||e.nodeIsMissing(_))return;if(d===ge)return d;if(e.isInJSFile(t)&&d.valueDeclaration&&e.isVariableDeclaration(d.valueDeclaration)&&d.valueDeclaration.initializer&&Ag(d.valueDeclaration.initializer)){var p=d.valueDeclaration.initializer.arguments[0],f=zn(p,p);if(f){var m=Wn(f);m&&(d=m)}}if(!(o=fn(Qn(d),_.escapedText,r)))return void(n||Xr(_,e.Diagnostics.Namespace_0_has_no_exported_member_1,jn(d),e.declarationNameToString(_)))}return e.Debug.assert(0==(1&e.getCheckFlags(o)),"Should never get an instantiated symbol here."),o.flags&r||i?o:Mn(o)}}function Jn(t){var r=t.parent.valueDeclaration;if(r)return(e.isAssignmentDeclaration(r)?e.getAssignedExpandoInitializer(r):e.hasOnlyExpressionInitializer(r)?e.getDeclaredExpandoInitializer(r):void 0)||r}function zn(t,r,n){return Un(t,r,n?void 0:e.Diagnostics.Cannot_find_module_0)}function Un(t,r,n,i){return void 0===i&&(i=!1),e.isStringLiteralLike(r)?Vn(t,r.text,n,r,i):void 0}function Vn(t,r,i,a,o){(void 0===o&&(o=!1),e.startsWith(r,"@types/"))&&Xr(a,e.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1,e.removePrefix(r,"@types/"),r);var s=Fs(r,!0);if(s)return s;var c=e.getSourceFileOfNode(t),u=e.getResolvedModule(c,r),l=u&&e.getResolutionDiagnostic(K,u),_=u&&!l&&n.getSourceFile(u.resolvedFileName);if(_)return _.symbol?(u.isExternalLibraryImport&&!e.resolutionExtensionIsTSOrJson(u.extension)&&qn(!1,a,u,r),ti(_.symbol)):void(i&&Xr(a,e.Diagnostics.File_0_is_not_a_module,_.fileName));if(ot){var d=e.findBestPatternMatch(ot,(function(e){return e.pattern}),r);if(d){var p=st&&st.get(r);return ti(p?p:d.symbol)}}if(u&&!e.resolutionExtensionIsTSOrJson(u.extension)&&void 0===l||l===e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type)o?Xr(a,e.Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented,r,u.resolvedFileName):qn(H&&!!i,a,u,r);else if(i){if(u){var f=n.getProjectReferenceRedirect(u.resolvedFileName);if(f)return void Xr(a,e.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1,f,u.resolvedFileName)}if(l)Xr(a,l,r,u.resolvedFileName);else{var m=e.tryExtractTSExtension(r);if(m)Xr(a,e.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead,m,e.removeExtension(r,m));else!K.resolveJsonModule&&e.fileExtensionIs(r,".json")&&e.getEmitModuleResolutionKind(K)===e.ModuleResolutionKind.NodeJs&&e.hasJsonModuleEmitEnabled(K)?Xr(a,e.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension,r):Xr(a,i,r)}}}function qn(t,r,n,i){var a,o=n.packageId,s=n.resolvedFileName,c=!e.isExternalModuleNameRelative(i)&&o?(a=o.name,p().has(e.getTypesPackageName(a))?e.chainDiagnosticMessages(void 0,e.Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1,o.name,e.mangleScopedPackageName(o.name)):e.chainDiagnosticMessages(void 0,e.Diagnostics.Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,i,e.mangleScopedPackageName(o.name))):void 0;$r(t,r,e.chainDiagnosticMessages(c,e.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type,i,s))}function Wn(t,r){if(t){var n=function(t,r){if(!t||t===ge||t===r||1===r.exports.size||2097152&t.flags)return t;var n=_n(t);if(n.cjsExportMerged)return n.cjsExportMerged;var i=33554432&t.flags?t:an(t);i.flags=512|i.flags,void 0===i.exports&&(i.exports=e.createSymbolTable());return r.exports.forEach((function(e,t){"export="!==t&&i.exports.set(t,i.exports.has(t)?on(i.exports.get(t),e):e)})),_n(i).cjsExportMerged=i,n.cjsExportMerged=i}(ti(On(t.exports.get("export="),r)),ti(t));return ti(n)||t}}function Gn(t,r,n,i){var a=Wn(t,n);if(!n&&a){if(!(i||1539&a.flags||e.getDeclarationOfKind(a,288))){var o=z>=e.ModuleKind.ES2015?"allowSyntheticDefaultImports":"esModuleInterop";return Xr(r,e.Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export,o),a}if(K.esModuleInterop){var s=r.parent;if(e.isImportDeclaration(s)&&e.getNamespaceDeclarationNode(s)||e.isImportCall(s)){var c=wa(a),u=bs(c,0);if(u&&u.length||(u=bs(c,1)),u&&u.length){var l=Ng(c,a,t),_=en(a.flags,a.escapedName);_.declarations=a.declarations?a.declarations.slice():[],_.parent=a.parent,_.target=a,_.originatingImport=s,a.valueDeclaration&&(_.valueDeclaration=a.valueDeclaration),a.constEnumOnlyModule&&(_.constEnumOnlyModule=!0),a.members&&(_.members=e.cloneMap(a.members)),a.exports&&(_.exports=e.cloneMap(a.exports));var d=Qo(l);return _.type=hi(_,d.members,e.emptyArray,e.emptyArray,d.stringIndexInfo,d.numberIndexInfo),_}}}}return a}function Hn(e){return void 0!==e.exports.get("export=")}function Yn(e){return Ns($n(e))}function Xn(e,t){var r=$n(t);if(r)return r.get(e)}function Qn(e){return 6256&e.flags?vo(e,"resolvedExports"):1536&e.flags?$n(e):e.exports||B}function $n(e){var t=_n(e);return t.resolvedExports||(t.resolvedExports=ei(e))}function Zn(t,r,n,i){r&&r.forEach((function(r,a){if("default"!==a){var o=t.get(a);if(o){if(n&&i&&o&&On(o)!==On(r)){var s=n.get(a);s.exportsWithDuplicate?s.exportsWithDuplicate.push(i):s.exportsWithDuplicate=[i]}}else t.set(a,r),n&&i&&n.set(a,{specifierText:e.getTextOfNode(i.moduleSpecifier)})}}))}function ei(t){var r=[];return function t(n){if(!(n&&n.exports&&e.pushIfUnique(r,n)))return;var i=e.cloneMap(n.exports);var a=n.exports.get("__export");if(a){for(var o=e.createSymbolTable(),s=e.createMap(),c=0,u=a.declarations;c=l?u.substr(0,l-"...".length)+"...":u}function Oi(e,t){var r=Mi(e.symbol)?Ii(e,e.symbol.valueDeclaration):Ii(e),n=Mi(t.symbol)?Ii(t,t.symbol.valueDeclaration):Ii(t);return r===n&&(r=Ii(e,void 0,64),n=Ii(t,void 0,64)),[r,n]}function Mi(t){return t&&t.valueDeclaration&&e.isExpression(t.valueDeclaration)&&!bl(t.valueDeclaration)}function Li(e){return void 0===e&&(e=0),9469291&e}function Ri(t,r,n,i){return void 0===n&&(n=16384),i?a(i).getText():e.usingSingleLineStringWriter(a);function a(i){var a=e.createTypePredicateNodeWithModifier(2===t.kind||3===t.kind?e.createToken(123):void 0,1===t.kind||3===t.kind?e.createIdentifier(t.parameterName):e.createThisTypeNode(),t.type&&Z.typeToTypeNode(t.type,r,70222336|Li(n))),o=e.createPrinter({removeComments:!0}),s=r&&e.getSourceFileOfNode(r);return o.writeNode(4,a,s,i),i}}function Bi(e){return 8===e?"private":16===e?"protected":"public"}function ji(t){return t&&t.parent&&249===t.parent.kind&&e.isExternalModuleAugmentation(t.parent.parent)}function Ki(t){return 288===t.kind||e.isAmbientModule(t)}function Ji(t,r){var n=t.nameType;if(n){if(384&n.flags){var i=""+n.value;return e.isIdentifierText(i,K.target)||Mf(i)?Mf(i)&&e.startsWith(i,"-")?"["+i+"]":i:'"'+e.escapeString(i,34)+'"'}if(8192&n.flags)return"["+zi(n.symbol,r)+"]"}}function zi(t,r){if(r&&"default"===t.escapedName&&!(16384&r.flags)&&(!(16777216&r.flags)||!t.declarations||r.enclosingDeclaration&&e.findAncestor(t.declarations[0],Ki)!==e.findAncestor(r.enclosingDeclaration,Ki)))return"default";if(t.declarations&&t.declarations.length){var n=e.firstDefined(t.declarations,(function(t){return e.getNameOfDeclaration(t)?t:void 0})),i=n&&e.getNameOfDeclaration(n);if(n&&i){if(e.isCallExpression(n)&&e.isBindableObjectDefinePropertyCall(n))return e.symbolName(t);if(e.isComputedPropertyName(i)&&!(4096&e.getCheckFlags(t))&&t.nameType&&384&t.nameType.flags){var a=Ji(t,r);if(void 0!==a)return a}return e.declarationNameToString(i)}if(n||(n=t.declarations[0]),n.parent&&241===n.parent.kind)return e.declarationNameToString(n.parent.name);switch(n.kind){case 213:case 200:case 201:return!r||r.encounteredError||131072&r.flags||(r.encounteredError=!0),213===n.kind?"(Anonymous class)":"(Anonymous function)"}}var o=Ji(t,r);return void 0!==o?o:e.symbolName(t)}function Ui(t){if(t){var r=dn(t);return void 0===r.isVisible&&(r.isVisible=!!function(){switch(t.kind){case 308:case 315:case 309:return!!(t.parent&&t.parent.parent&&t.parent.parent.parent&&e.isSourceFile(t.parent.parent.parent));case 190:return Ui(t.parent.parent);case 241:if(e.isBindingPattern(t.name)&&!t.name.elements.length)return!1;case 248:case 244:case 245:case 246:case 243:case 247:case 252:if(e.isExternalModuleAugmentation(t))return!0;var r=Yi(t);return 1&e.getCombinedModifierFlags(t)||252!==t.kind&&288!==r.kind&&8388608&r.flags?Ui(r):pn(r);case 158:case 157:case 162:case 163:case 160:case 159:if(e.hasModifier(t,24))return!1;case 161:case 165:case 164:case 166:case 155:case 249:case 169:case 170:case 172:case 168:case 173:case 174:case 177:case 178:case 181:return Ui(t.parent);case 254:case 255:case 257:return!1;case 154:case 288:case 251:return!0;case 258:default:return!1}}()),r.isVisible}return!1}function Vi(t,r){var n,i,a;return t.parent&&258===t.parent.kind?n=gn(t,t.escapedText,2998271,void 0,t,!1):261===t.parent.kind&&(n=Fn(t.parent,2998271)),n&&((a=e.createMap()).set(""+A(n),!0),function t(n){e.forEach(n,(function(n){var o=Tn(n)||n;if(r?dn(n).isVisible=!0:(i=i||[],e.pushIfUnique(i,o)),e.isInternalModuleImportEqualsDeclaration(n)){var s=n.moduleReference,c=gn(n,e.getFirstIdentifier(s).escapedText,901119,void 0,void 0,!1),u=c&&""+A(c);c&&!a.has(u)&&(a.set(u,!0),t(c.declarations))}}))}(n.declarations)),i}function qi(e,t){var r=Wi(e,t);if(r>=0){for(var n=br.length,i=r;i=0;r--){if(Gi(br[r],Dr[r]))return-1;if(br[r]===e&&Dr[r]===t)return r}return-1}function Gi(t,r){switch(r){case 0:return!!_n(t).type;case 5:return!!dn(t).resolvedEnumType;case 2:return!!_n(t).declaredType;case 1:return!!t.resolvedBaseConstructorType;case 3:return!!t.resolvedReturnType;case 4:return!!t.immediateBaseConstraint;case 6:return!!_n(t).resolvedJSDocType;case 7:return!!t.resolvedTypeArguments}return e.Debug.assertNever(r)}function Hi(){return br.pop(),Dr.pop(),xr.pop()}function Yi(t){return e.findAncestor(e.getRootDeclaration(t),(function(e){switch(e.kind){case 241:case 242:case 257:case 256:case 255:case 254:return!1;default:return!0}})).parent}function Xi(e,t){var r=vs(e,t);return r?wa(r):void 0}function Qi(e){return e&&0!=(1&e.flags)}function $i(e){var t=ri(e);return t&&_n(t).type||ua(e,!1)}function Zi(t){return 153===t.kind&&!e.isStringOrNumericLiteralLike(t.expression)}function ea(t,r,n){if(131072&(t=_p(t,(function(e){return!(98304&e.flags)}))).flags)return Ge;if(1048576&t.flags)return pp(t,(function(e){return ea(e,r,n)}));var i=Qc(e.map(r,ou));if(gu(t)||yu(i)){if(131072&i.flags)return t;var a=Ut||(Ut=Ac("Omit",524288,e.Diagnostics.Cannot_find_global_type_0));return a?fc(a,[t,i]):xe}for(var o=e.createSymbolTable(),s=0,c=ts(t);s=2?(i=he,Rc(Mc(!0),[i])):vt;var c=Uc(e.map(a,(function(t){return e.isOmittedExpression(t)?he:ma(t,r,n)})),e.findLastIndex(a,(function(t){return!e.isOmittedExpression(t)&&!Af(t)}),a.length-(s?2:1))+1,s);return r&&((c=uc(c)).pattern=t),c}function ya(t,r,n){return void 0===r&&(r=!1),void 0===n&&(n=!1),188===t.kind?function(t,r,n){var i,a=e.createSymbolTable(),o=524416;e.forEach(t.elements,(function(e){var t=e.propertyName||e.name;if(e.dotDotDotToken)i=tc(he,!1);else{var s=ou(t);if(_o(s)){var c=yo(s),u=en(4|(e.initializer?16777216:0),c);u.type=ma(e,r,n),u.bindingElement=e,a.set(u.escapedName,u)}else o|=512}}));var s=hi(void 0,a,e.emptyArray,e.emptyArray,i,void 0);return s.objectFlags|=o,r&&(s.pattern=t),s}(t,r,n):ga(t,r,n)}function ha(e,t){return va(ua(e,!0),e,t)}function va(t,r,n){return t?(n&&ad(r,t),8192&t.flags&&(e.isBindingElement(r)||!r.type)&&t.symbol!==ri(r)&&(t=Le),rd(t)):(t=e.isParameter(r)&&r.dotDotDotToken?vt:he,n&&(ba(r)||id(r,t)),t)}function ba(t){var r=e.getRootDeclaration(t);return ah(155===r.kind?r.parent:r)}function xa(t){var r=e.getEffectiveTypeAnnotationNode(t);if(r)return Yu(r)}function Da(t){var r=_n(t);if(!r.type){var n=function(t){if(4194304&t.flags)return(r=ro(ni(t))).typeParameters?cc(r,e.map(r.typeParameters,(function(e){return he}))):r;var r;if(t===ae)return he;if(134217728&t.flags){var n=ri(e.getSourceFileOfNode(t.valueDeclaration)),i=e.createSymbolTable();return i.set("exports",n),hi(t,i,e.emptyArray,e.emptyArray,void 0,void 0)}var a,o=t.valueDeclaration;if(e.isCatchClauseVariableDeclarationOrBindingElement(o))return he;if(e.isSourceFile(o)&&e.isJsonSourceFile(o)){if(!o.statements.length)return Ge;var s=N_(zy(o.statements[0].expression));return 524288&s.flags?Q_(s):s}if(!qi(t,0))return 512&t.flags&&!(67108864&t.flags)?Aa(t):Pa(t);if(258===o.kind)a=va(ky(o.expression),o);else if(e.isBinaryExpression(o)||e.isInJSFile(o)&&(e.isCallExpression(o)||(e.isPropertyAccessExpression(o)||e.isBindableStaticElementAccessExpression(o))&&e.isBinaryExpression(o.parent)))a=la(t);else if(e.isJSDocPropertyLikeTag(o)||e.isPropertyAccessExpression(o)||e.isElementAccessExpression(o)||e.isIdentifier(o)||e.isStringLiteralLike(o)||e.isNumericLiteral(o)||e.isClassDeclaration(o)||e.isFunctionDeclaration(o)||e.isMethodDeclaration(o)&&!e.isObjectLiteralMethod(o)||e.isMethodSignature(o)||e.isSourceFile(o)){if(9136&t.flags)return Aa(t);a=e.isBinaryExpression(o.parent)?la(t):xa(o)||he}else if(e.isPropertyAssignment(o))a=xa(o)||Iy(o);else if(e.isJsxAttribute(o))a=xa(o)||Uf(o);else if(e.isShorthandPropertyAssignment(o))a=xa(o)||wy(o.name,0);else if(e.isObjectLiteralMethod(o))a=xa(o)||Oy(o,0);else if(e.isParameter(o)||e.isPropertyDeclaration(o)||e.isPropertySignature(o)||e.isVariableDeclaration(o)||e.isBindingElement(o))a=ha(o,!0);else if(e.isEnumDeclaration(o))a=Aa(t);else if(e.isEnumMember(o))a=Fa(t);else{if(!e.isAccessor(o))return e.Debug.fail("Unhandled declaration kind! "+e.Debug.formatSyntaxKind(o.kind)+" for "+e.Debug.formatSymbol(t));a=ka(t)}if(!Hi())return 512&t.flags&&!(67108864&t.flags)?Aa(t):Pa(t);return a}(t);r.type||(r.type=n)}return r.type}function Sa(t){if(t)return 162===t.kind?e.getEffectiveReturnTypeNode(t):e.getEffectiveSetAccessorTypeAnnotationNode(t)}function Ta(e){var t=Sa(e);return t&&Yu(t)}function Ea(e){return Ks(Ls(e))}function Ca(t){var r=_n(t);return r.type||(r.type=function(t){if(!qi(t,0))return xe;var r=ka(t);if(!Hi()){if(r=he,H)Xr(e.getDeclarationOfKind(t,162),e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,Pi(t))}return r}(t))}function ka(t){var r=e.getDeclarationOfKind(t,162),n=e.getDeclarationOfKind(t,163);if(r&&e.isInJSFile(r)){var i=aa(r);if(i)return i}var a=Ta(r);if(a)return a;var o=Ta(n);return o||(r&&r.body?Xg(r):(n?ah(n)||$r(H,n,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation,Pi(t)):(e.Debug.assert(!!r,"there must exist a getter as we are current checking either setter or getter in this function"),ah(r)||$r(H,r,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation,Pi(t))),he))}function Na(t){var r=qa(Ha(t));return 8650752&r.flags?r:2097152&r.flags?e.find(r.types,(function(e){return!!(8650752&e.flags)})):void 0}function Aa(t){var r=_n(t),n=r;if(!r.type){var i=e.getDeclarationOfExpando(t.valueDeclaration);if(i){var a=Tg(t,ri(i));a&&(t=r=a)}n.type=r.type=function(t){var r=t.valueDeclaration;if(1536&t.flags&&e.isShorthandAmbientModuleSymbol(t))return he;if(208===r.kind||(193===r.kind||194===r.kind)&&208===r.parent.kind)return la(t);if(512&t.flags&&r&&e.isSourceFile(r)&&r.commonJsModuleIndicator){var n=Wn(t);if(n!==t){if(!qi(t,0))return xe;var i=ti(t.exports.get("export=")),a=la(i,i===n?void 0:n);return Hi()?a:Pa(t)}}var o=pi(16,t);if(32&t.flags){var s=Na(t);return s?iu([o,s]):o}return V&&16777216&t.flags?z_(o):o}(t)}return r.type}function Fa(e){var t=_n(e);return t.type||(t.type=eo(e))}function Pa(t){var r=t.valueDeclaration;return e.getEffectiveTypeAnnotationNode(r)?(Xr(t.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,Pi(t)),xe):(H&&(155!==r.kind||r.initializer)&&Xr(t.valueDeclaration,e.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,Pi(t)),he)}function wa(t){return 65536&e.getCheckFlags(t)?function(t){var r=_n(t);return r.type||(e.Debug.assertDefined(r.deferralParent),e.Debug.assertDefined(r.deferralConstituents),r.type=1048576&r.deferralParent.flags?Qc(r.deferralConstituents):iu(r.deferralConstituents)),r.type}(t):1&e.getCheckFlags(t)?function(e){var t=_n(e);if(!t.type){if(!qi(e,0))return t.type=xe;var r=gl(wa(t.target),t.mapper);Hi()||(r=Pa(e)),t.type=r}return t.type}(t):8192&e.getCheckFlags(t)?function(e){return hd(e.propertyType,e.mappedType,e.constraintType)}(t):7&t.flags?Da(t):9136&t.flags?Aa(t):8&t.flags?Fa(t):98304&t.flags?Ca(t):2097152&t.flags?function(e){var t=_n(e);if(!t.type){var r=Mn(e);t.type=111551&r.flags?wa(r):xe}return t.type}(t):xe}function Ia(t,r){return void 0!==t&&void 0!==r&&0!=(4&e.getObjectFlags(t))&&t.target===r}function Oa(t){return 4&e.getObjectFlags(t)?t.target:t}function Ma(t,r){return function t(n){if(7&e.getObjectFlags(n)){var i=Oa(n);return i===r||e.some(Wa(i),t)}if(2097152&n.flags)return e.some(n.types,t);return!1}(t)}function La(t,r){for(var n=0,i=r;n0)return!0;if(8650752&e.flags){var t=cs(e);return!!t&&Ka(t)}return!1}function za(t){return e.getEffectiveBaseTypeNode(t.symbol.valueDeclaration)}function Ua(t,r,n){var i=e.length(r),a=e.isInJSFile(n);return e.filter(xs(t,1),(function(t){return(a||i>=Os(t.typeParameters))&&i<=e.length(t.typeParameters)}))}function Va(t,r,n){var i=Ua(t,r,n),a=e.map(r,Yu);return e.sameMap(i,(function(t){return e.some(t.typeParameters)?Ws(t,a,e.isInJSFile(n)):t}))}function qa(t){if(!t.resolvedBaseConstructorType){var r=t.symbol.valueDeclaration,n=e.getEffectiveBaseTypeNode(r),i=za(t);if(!i)return t.resolvedBaseConstructorType=Se;if(!qi(t,1))return xe;var a=zy(i.expression);if(n&&i!==n&&(e.Debug.assert(!n.typeArguments),zy(n.expression)),2621440&a.flags&&Qo(a),!Hi())return Xr(t.symbol.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,Pi(t.symbol)),t.resolvedBaseConstructorType=xe;if(!(1&a.flags||a===ke||Ja(a))){var o=Xr(i.expression,e.Diagnostics.Type_0_is_not_a_constructor_function_type,Ii(a));if(262144&a.flags){var s=ic(a),c=De;if(s){var u=xs(s,1);u[0]&&(c=zs(u[0]))}e.addRelatedInfo(o,e.createDiagnosticForNode(a.symbol.declarations[0],e.Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1,Pi(a.symbol),Ii(c)))}return t.resolvedBaseConstructorType=xe}t.resolvedBaseConstructorType=a}return t.resolvedBaseConstructorType}function Wa(t){return t.resolvedBaseTypes||(8&t.objectFlags?t.resolvedBaseTypes=[jc(Qc(t.typeParameters||e.emptyArray),t.readonly)]:96&t.symbol.flags?(32&t.symbol.flags&&function(t){t.resolvedBaseTypes=e.resolvingEmptyArray;var r=ms(qa(t));if(!(2621441&r.flags))return t.resolvedBaseTypes=e.emptyArray;var n,i=za(t),a=r.symbol?ro(r.symbol):void 0;if(r.symbol&&32&r.symbol.flags&&function(e){var t=e.outerTypeParameters;if(t){var r=t.length-1,n=_c(e);return t[r].symbol!==n[r].symbol}return!0}(a))n=pc(i,r.symbol);else if(1&r.flags)n=r;else{var o=Va(r,i.typeArguments,i);if(!o.length)return Xr(i.expression,e.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments),t.resolvedBaseTypes=e.emptyArray;n=zs(o[0])}if(n===xe)return t.resolvedBaseTypes=e.emptyArray;if(!Ga(n))return Xr(i.expression,e.Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members,Ii(n)),t.resolvedBaseTypes=e.emptyArray;if(t===n||Ma(n,t))return Xr(t.symbol.valueDeclaration,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,Ii(t,void 0,2)),t.resolvedBaseTypes=e.emptyArray;t.resolvedBaseTypes===e.resolvingEmptyArray&&(t.members=void 0);t.resolvedBaseTypes=[n]}(t),64&t.symbol.flags&&function(t){t.resolvedBaseTypes=t.resolvedBaseTypes||e.emptyArray;for(var r=0,n=t.symbol.declarations;r=a?16384:0);return i.type=n===o?jc(e):e,i}));return e.concatenate(t.parameters.slice(0,r),s)}}return t.parameters}function Ao(e,t,r,n,i){for(var a=0,o=e;a0)return;for(var i=1;i1&&(n=void 0===n?i:-1);for(var a=0,o=t[i];a1){var l=s.thisParameter,_=e.forEach(c,(function(e){return e.thisParameter}));if(_)l=X_(_,iu(e.mapDefined(c,(function(e){return e.thisParameter&&wa(e.thisParameter)}))));(u=Co(s,c)).thisParameter=l}(r||(r=[])).push(u)}}}}if(!e.length(r)&&-1!==n){for(var d=t[void 0!==n?n:0],p=d.slice(),f=function(t){if(t!==d){var r=t[0];if(e.Debug.assert(!!r,"getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"),!(p=r.typeParameters&&e.some(p,(function(e){return!!e.typeParameters}))?void 0:e.map(p,(function(t){return function(t,r){var n=t.declaration,i=function(e,t){for(var r=Bg(e),n=Bg(t),i=r>=n?e:t,a=i===e?t:e,o=i===e?r:n,s=Kg(e)||Kg(t),c=s&&!Kg(i),u=new Array(o+(c?1:0)),l=0;l=jg(i)&&l>=jg(a),g=l>=r?void 0:Og(e,l),y=l>=n?void 0:Og(t,l),h=en(1|(m&&!f?16777216:0),(g===y?g:g?y?void 0:g:y)||"arg"+l);h.type=f?jc(p):p,u[l]=h}if(c){var v=en(1,"args");v.type=jc(Mg(a,o)),u[o]=v}return u}(t,r),a=function(e,t){if(!e||!t)return e||t;var r=iu([wa(e),wa(t)]);return X_(e,r)}(t.thisParameter,r.thisParameter),o=Math.max(t.minArgumentCount,r.minArgumentCount),s=To(n,t.typeParameters||r.typeParameters,a,i,void 0,void 0,o,3&(t.flags|r.flags));return s.unionSignatures=e.concatenate(t.unionSignatures||[t],[r]),s}(t,r)}))))return"break"}},m=0,g=t;m0})),n=e.map(t,Ka);if(r>0&&r===e.countWhere(n,(function(e){return e}))){var i=n.indexOf(!0);n[i]=!1}return n}function Ro(t){for(var r,n,i,a,o=t.types,s=Lo(o),c=e.countWhere(s,(function(e){return e})),u=function(u){var l=t.types[u];if(!s[u]){var _=xs(l,1);_.length&&c>0&&(_=e.map(_,(function(e){var t=Eo(e);return t.resolvedReturnType=function(e,t,r,n){for(var i=[],a=0;a=_&&o<=d){var p=d?Hs(l,Ms(a,l.typeParameters,_,i)):Eo(l);p.typeParameters=t.localTypeParameters,p.resolvedReturnType=t,s.push(p)}}return s}(l)),t.constructSignatures=i}}}function Ko(t){if(131069&t.flags)return t;if(4194304&t.flags)return lu(ms(t.type));if(16777216&t.flags){if(t.root.isDistributive){var r=t.checkType,n=Ko(r);if(n!==r)return ml(t,rl(Zu(t.root.checkType,n),t.mapper))}return t}return 1048576&t.flags?Qc(e.sameMap(t.types,Ko)):2097152&t.flags?iu(e.sameMap(t.types,Ko)):Be}function Jo(e){return e.typeParameter||(e.typeParameter=to(ri(e.declaration.typeParameter)))}function zo(e){return e.constraintType||(e.constraintType=ns(Jo(e))||xe)}function Uo(e){return e.templateType||(e.templateType=e.declaration.type?gl(sa(Yu(e.declaration.type),!!(4&Go(e))),e.mapper||j):xe)}function Vo(t){return e.getEffectiveConstraintOfTypeParameter(t.declaration.typeParameter)}function qo(e){var t=Vo(e);return 183===t.kind&&133===t.operator}function Wo(e){if(!e.modifiersType)if(qo(e))e.modifiersType=gl(Yu(Vo(e).type),e.mapper||j);else{var t=zo(Cu(e.declaration)),r=t&&262144&t.flags?ns(t):t;e.modifiersType=r&&4194304&r.flags?gl(r.type,e.mapper||j):De}return e.modifiersType}function Go(e){var t=e.declaration;return(t.readonlyToken?40===t.readonlyToken.kind?2:1:0)|(t.questionToken?40===t.questionToken.kind?8:4:0)}function Ho(e){var t=Go(e);return 8&t?-1:4&t?1:0}function Yo(e){var t=Ho(e),r=Wo(e);return t||(Xo(r)?Ho(r):0)}function Xo(t){return!!(32&e.getObjectFlags(t))&&yu(zo(t))}function Qo(t){return t.members||(524288&t.flags?4&t.objectFlags?function(t){var r=lo(t.target),n=e.concatenate(r.typeParameters,[r.thisType]),i=_c(t);So(t,r,n,i.length===n.length?i:e.concatenate(i,[t]))}(t):3&t.objectFlags?function(t){So(t,lo(t),e.emptyArray,e.emptyArray)}(t):2048&t.objectFlags?function(t){for(var r=Ts(t.source,0),n=Go(t.mappedType),i=!(1&n),a=4&n?0:16777216,o=r&&tc(hd(r.type,t.mappedType,t.constraintType),i&&r.isReadonly),s=e.createSymbolTable(),c=0,u=ts(t.source);c=50)return Xr(l,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),r=!0,t.immediateBaseConstraint=Ze;E++;var n=function(e){if(262144&e.flags){var t=ic(e);return e.isThisType||!t?t:i(t)}if(3145728&e.flags){for(var r=e.types,n=[],a=0,o=r;a=99,Vt||(Vt=Fc("BigInt",0,r))||Ge):528&n.flags?gt:12288&n.flags?wc(J>=2):67108864&n.flags?Ge:4194304&n.flags?qe:2&n.flags&&!V?Ge:n}function gs(t,r){for(var n,i=e.createMap(),a=1048576&t.flags,o=a?24:0,s=a?0:16777216,c=4,u=0,l=0,_=t.types;l<_.length;l++){if((E=ms(_[l]))!==xe){var d=(T=vs(E,r))?e.getDeclarationModifierFlagsFromSymbol(T):0;if(!T||d&o){if(a){var p=!fo(r)&&(Mf(r)&&Ts(E,1)||Ts(E,0));p?(u|=32|(p.isReadonly?8:0),n=e.append(n,w_(E)?I_(E)||Se:p.type)):Cd(E)?(u|=32,n=e.append(n,Se)):u|=16}}else{a?s|=16777216&T.flags:s&=T.flags;var f=""+A(T);i.has(f)||i.set(f,T),u|=(uy(T)?8:0)|(24&d?0:256)|(16&d?512:0)|(8&d?1024:0)|(32&d?2048:0),sm(T)||(c=2)}}}if(i.size){var m,g,y,h=e.arrayFrom(i.values());if(!(1!==h.length||16&u||n))return h[0];for(var v,b=[],x=!1,D=0,S=h;D2?(C.checkFlags|=65536,C.deferralParent=t,C.deferralConstituents=b):C.type=a?Qc(b):iu(b),C}}function ys(t,r){var n=t.propertyCache||(t.propertyCache=e.createSymbolTable()),i=n.get(r);return i||(i=gs(t,r))&&n.set(r,i),i}function hs(t,r){var n=ys(t,r);return!n||16&e.getCheckFlags(n)?void 0:n}function vs(e,t){if(524288&(e=ms(e)).flags){var r=Qo(e),n=r.members.get(t);if(n&&ci(n))return n;var i=r===$e?ut:r.callSignatures.length?lt:r.constructSignatures.length?_t:void 0;if(i){var a=Zo(i,t);if(a)return a}return Zo(ct,t)}if(3145728&e.flags)return hs(e,t)}function bs(t,r){if(3670016&t.flags){var n=Qo(t);return 0===r?n.callSignatures:n.constructSignatures}return e.emptyArray}function xs(e,t){return bs(ms(e),t)}function Ds(e,t){if(3670016&e.flags){var r=Qo(e);return 0===t?r.stringIndexInfo:r.numberIndexInfo}}function Ss(e,t){var r=Ds(e,t);return r&&r.type}function Ts(e,t){return Ds(ms(e),t)}function Es(e,t){return Ss(ms(e),t)}function Cs(t,r){if(Y_(t)){for(var n=[],i=0,a=ts(t);i=0),n>=jg(r)}var i=e.getImmediatelyInvokedFunctionExpression(t.parent);return!!i&&(!t.type&&!t.dotDotDotToken&&t.parent.parameters.indexOf(t)>=i.arguments.length)}function ws(t){if(!e.isJSDocParameterTag(t))return!1;var r=t.isBracketed,n=t.typeExpression;return r||!!n&&297===n.type.kind}function Is(e,t,r,n){return{kind:e,parameterName:t,parameterIndex:r,type:n}}function Os(t){var r,n=0;if(t)for(var i=0;i=n&&o<=a){for(var s=t?t.slice():[],c=o;cu.arguments.length&&!m||_||As(p)||(o=i.length)}if(!(162!==t.kind&&163!==t.kind||go(t)||c&&s)){var g=162===t.kind?163:162,y=e.getDeclarationOfKind(ri(t),g);y&&(s=(r=lx(y))&&r.symbol)}var h=161===t.kind?Ha(ti(t.parent.symbol)):void 0,v=h?h.localTypeParameters:ks(t);(e.hasRestParameter(t)||e.isInJSFile(t)&&function(t,r){if(e.isJSDocSignature(t)||!Bs(t))return!1;var n=e.lastOrUndefined(t.parameters),i=n?e.getJSDocParameterTags(n):e.getJSDocTags(t).filter(e.isJSDocParameterTag),a=e.firstDefined(i,(function(t){return t.typeExpression&&e.isJSDocVariadicType(t.typeExpression.type)?t.typeExpression.type:void 0})),o=en(3,"args",32768);o.type=a?jc(Yu(a.type)):vt,a&&r.pop();return r.push(o),!0}(t,i))&&(a|=1),n.resolvedSignature=To(t,v,s,i,void 0,void 0,o,a)}return n.resolvedSignature}function Rs(t){var r=e.isInJSFile(t)?e.getJSDocTypeTag(t):void 0,n=r&&r.typeExpression&&qm(Yu(r.typeExpression));return n&&Ys(n)}function Bs(t){var r=dn(t);return void 0===r.containsArgumentsReference&&(8192&r.flags?r.containsArgumentsReference=!0:r.containsArgumentsReference=function t(r){if(!r)return!1;switch(r.kind){case 75:return"arguments"===r.escapedText&&e.isExpressionNode(r);case 158:case 160:case 162:case 163:return 153===r.name.kind&&t(r.name);default:return!e.nodeStartsNewLexicalEnvironment(r)&&!e.isPartOfTypeNode(r)&&!!e.forEachChild(r,t)}}(t.body)),r.containsArgumentsReference}function js(t){if(!t)return e.emptyArray;for(var r=[],n=0;n0&&i.body){var a=t.declarations[n-1];if(i.parent===a.parent&&i.kind===a.kind&&i.pos===a.end)continue}r.push(Ls(i))}}return r}function Ks(e){if(e.thisParameter)return wa(e.thisParameter)}function Js(t){if(!t.resolvedTypePredicate){if(t.target){var r=Js(t.target);t.resolvedTypePredicate=r?(o=r,s=t.mapper,Is(o.kind,o.parameterName,o.parameterIndex,gl(o.type,s))):Qt}else if(t.unionSignatures)t.resolvedTypePredicate=function(e){for(var t,r=[],n=0,i=e;n=0}function qs(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]),r=w_(t)?I_(t):t;return r&&Es(r,1)}}function Ws(e,t,r,n){var i=Gs(e,Ms(t,e.typeParameters,Os(e.typeParameters),r));if(n){var a=Wm(zs(i));if(a){var o=Eo(a);o.typeParameters=n;var s=Eo(i);return s.resolvedReturnType=$s(o),s}}return i}function Gs(t,r){var n=t.instantiations||(t.instantiations=e.createMap()),i=oc(r),a=n.get(i);return a||n.set(i,a=Hs(t,r)),a}function Hs(e,t){return sl(e,function(e,t){return el(e.typeParameters,t)}(e,t),!0)}function Ys(e){return e.typeParameters?e.erasedSignatureCache||(e.erasedSignatureCache=function(e){return sl(e,tl(e.typeParameters),!0)}(e)):e}function Xs(t){return t.typeParameters?t.canonicalSignatureCache||(t.canonicalSignatureCache=function(t){return Ws(t,e.map(t.typeParameters,(function(e){return e.target&&!ns(e.target)?e.target:e})),e.isInJSFile(t.declaration))}(t)):t}function Qs(t){var r=t.typeParameters;if(r){var n=tl(r);return sl(t,el(r,e.map(r,(function(e){return gl(cs(e),n)||De}))),!0)}return t}function $s(t){if(!t.isolatedSignatureType){var r=t.declaration?t.declaration.kind:0,n=161===r||165===r||170===r,i=pi(16);i.members=B,i.properties=e.emptyArray,i.callSignatures=n?e.emptyArray:[t],i.constructSignatures=n?[t]:e.emptyArray,t.isolatedSignatureType=i}return t.isolatedSignatureType}function Zs(e){return e.members.get("__index")}function ec(t,r){var n=1===r?139:142,i=Zs(t);if(i)for(var a=0,o=i.declarations;a1&&(t+=":"+a),n+=a}return t}function sc(t,r){for(var n=0,i=0,a=t;ii.length)){var c=s&&e.isExpressionWithTypeArguments(t)&&!e.isJSDocAugmentsTag(t.parent);if(Xr(t,o===i.length?c?e.Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_1_type_argument_s:c?e.Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,Ii(n,void 0,2),o,i.length),!s)return xe}return 168===t.kind&&Jc(t)?lc(n,t,void 0):cc(n,e.concatenate(n.outerTypeParameters,Ms(Ec(t),i,o,s)))}return Sc(t,r)?n:xe}function fc(t,r){var n=ro(t),i=_n(t),a=i.typeParameters,o=oc(r),s=i.instantiations.get(o);return s||i.instantiations.set(o,s=gl(n,el(a,Ms(r,a,Os(a),e.isInJSFile(t.valueDeclaration))))),s}function mc(t){switch(t.kind){case 168:return t.typeName;case 215:var r=t.expression;if(e.isEntityNameExpression(r))return r}}function gc(e,t,r){return e&&Kn(e,t,r)||ge}function yc(t,r){if(r===ge)return xe;if(96&(r=function(t){var r=t.valueDeclaration;if(r&&e.isInJSFile(r)&&!(524288&t.flags)){var n=e.isVariableDeclaration(r)?e.getDeclaredExpandoInitializer(r):e.getAssignedExpandoInitializer(r);return n&&ri(n)||void 0}}(r)||r).flags)return pc(t,r);if(524288&r.flags)return function(t,r){var n=ro(r),i=_n(r).typeParameters;if(i){var a=e.length(t.typeArguments),o=Os(i);return ai.length?(Xr(t,o===i.length?e.Diagnostics.Generic_type_0_requires_1_type_argument_s:e.Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments,Pi(r),o,i.length),xe):fc(r,Ec(t))}return Sc(t,r)?n:xe}(t,r);var n=no(r);if(n)return Sc(t,r)?262144&n.flags?xc(n,t):Vu(n):xe;if(111551&r.flags&&Dc(t)){var i=function(t,r){var n=wa(r),i=n;if(r.valueDeclaration){var a=e.getRootDeclaration(r.valueDeclaration),o=!1;if(e.isVariableDeclaration(a)&&a.initializer){for(var s=a.initializer;e.isPropertyAccessExpression(s);)s=s.expression;o=e.isCallExpression(s)&&e.isRequireCall(s,!0)&&!!n.symbol}var c=r!==n.symbol&&ti(r)===n.symbol;(o||187===t.kind||c)&&(i=yc(t,n.symbol))}return _n(r).resolvedJSDocType=i}(t,r);return i||(gc(mc(t),788968),wa(r))}return xe}function hc(e,t){if(3&t.flags||t===e)return e;var r=qc(e)+">"+qc(t),n=pe.get(r);if(n)return n;var i=li(33554432);return i.typeVariable=e,i.substitute=t,pe.set(r,i),i}function vc(e){return 174===e.kind&&1===e.elementTypes.length}function bc(e,t,r){return vc(t)&&vc(r)?bc(e,t.elementTypes[0],r.elementTypes[0]):ku(Yu(t))===e?Yu(r):void 0}function xc(t,r){for(var n;r&&!e.isStatement(r)&&301!==r.kind;){var i=r.parent;if(179===i.kind&&r===i.trueType){var a=bc(t,i.checkType,i.extendsType);a&&(n=e.append(n,a))}r=i}return n?hc(t,iu(e.append(n,t))):t}function Dc(e){return!!(4194304&e.flags)&&(168===e.kind||187===e.kind)}function Sc(t,r){return!t.typeArguments||(Xr(t,e.Diagnostics.Type_0_is_not_generic,r?Pi(r):t.typeName?e.declarationNameToString(t.typeName):"(anonymous)"),!1)}function Tc(t){var r=dn(t);if(!r.resolvedType){var n=void 0,i=void 0;Dc(t)&&((i=function(t){if(e.isIdentifier(t.typeName)){var r=t.typeArguments;switch(t.typeName.escapedText){case"String":return Sc(t),Ne;case"Number":return Sc(t),Ae;case"Boolean":return Sc(t),Me;case"Void":return Sc(t),Re;case"Undefined":return Sc(t),Se;case"Null":return Sc(t),Ce;case"Function":case"function":return Sc(t),ut;case"Array":case"array":return r&&r.length||H?void 0:vt;case"Promise":case"promise":return r&&r.length||H?void 0:Gg(he);case"Object":if(r&&2===r.length){if(e.isJSDocIndexSignature(t)){var n=Yu(r[0]),i=tc(Yu(r[1]),!1);return hi(void 0,B,e.emptyArray,e.emptyArray,n===Ne?i:void 0,n===Ae?i:void 0)}return he}return Sc(t),H?void 0:he}}}(t))||((n=gc(mc(t),788968,!0))===ge?n=gc(mc(t),900095):gc(mc(t),788968),i=yc(t,n))),i||(i=yc(t,n=gc(mc(t),788968))),r.resolvedSymbol=n,r.resolvedType=i}return r.resolvedType}function Ec(t){return e.map(t.typeArguments,Yu)}function Cc(e){var t=dn(e);return t.resolvedType||(t.resolvedType=Vu(rd(zy(e.exprName)))),t.resolvedType}function kc(t,r){function n(e){for(var t=0,r=e.declarations;t=r?16777216:0),""+u,i?8:0);_.type=l,s.push(_)}}}var d=[];for(u=r;u<=c;u++)d.push(Wu(u));var p=en(4,"length");p.type=n?Ae:Qc(d),s.push(p);var f=pi(12);return f.typeParameters=o,f.outerTypeParameters=void 0,f.localTypeParameters=o,f.instantiations=e.createMap(),f.instantiations.set(oc(f.typeParameters),f),f.target=f,f.resolvedTypeArguments=f.typeParameters,f.thisType=fi(),f.thisType.isThisType=!0,f.thisType.constraint=f,f.declaredProperties=s,f.declaredCallSignatures=e.emptyArray,f.declaredConstructSignatures=e.emptyArray,f.declaredStringIndexInfo=void 0,f.declaredNumberIndexInfo=void 0,f.minLength=r,f.hasRestElement=n,f.readonly=i,f.associatedNames=a,f}(t,r,n,i,a)),s}function Uc(e,t,r,n,i){void 0===t&&(t=e.length),void 0===r&&(r=!1),void 0===n&&(n=!1);var a=e.length;if(1===a&&r)return jc(e[0],n);var o=zc(a,t,a>0&&r,n,i);return e.length?cc(o,e):o}function Vc(e,t){var r=e.target;return r.hasRestElement&&(t=Math.min(t,dc(e)-1)),Uc(_c(e).slice(t),Math.max(0,r.minLength-t),r.hasRestElement,r.readonly,r.associatedNames&&r.associatedNames.slice(t))}function qc(e){return e.id}function Wc(t,r){return e.binarySearch(t,r,qc,e.compareValues)>=0}function Gc(t,r){var n=e.binarySearch(t,r,qc,e.compareValues);return n<0&&(t.splice(~n,0,r),!0)}function Hc(t,r,n){var i=n.flags;if(1048576&i)return Yc(t,r,n.types);if(!(131072&i))if(r|=68943871&i,66846720&i&&(r|=262144),n===be&&(r|=4194304),!V&&98304&i)262144&e.getObjectFlags(n)||(r|=2097152);else{var a=t.length,o=a&&n.id>t[a-1].id?~a:e.binarySearch(t,n,qc,e.compareValues);o<0&&t.splice(~o,0,n)}return r}function Yc(e,t,r){for(var n=0,i=r;n0;)for(var o=t[--i],s=0,c=t;s(r?25e6:1e6))return Xr(l,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),!1;if(a++,Al(o,u)&&(!(1&e.getObjectFlags(Oa(o)))||!(1&e.getObjectFlags(Oa(u)))||Pl(o,u))){e.orderedRemoveItemAt(t,i);break}}}return!0}function Qc(t,r,n,i){if(void 0===r&&(r=1),0===t.length)return Be;if(1===t.length)return t[0];var a=[],o=Yc(a,0,t);if(0!==r){if(3&o)return 1&o?4194304&o?be:he:De;switch(r){case 1:11136&o&&function(t,r){for(var n=t.length;n>0;){var i=t[--n];(128&i.flags&&4&r||256&i.flags&&8&r||2048&i.flags&&64&r||8192&i.flags&&4096&r||qu(i)&&Wc(t,i.regularType))&&e.orderedRemoveItemAt(t,n)}}(a,o);break;case 2:if(!Xc(a,!(262144&o)))return xe}if(0===a.length)return 65536&o?2097152&o?Ce:ke:32768&o?2097152&o?Se:Te:Be}return Zc(a,66994211&o?0:131072,n,i)}function $c(e,t){return e.kind===t.kind&&e.parameterIndex===t.parameterIndex}function Zc(e,t,r,n){if(0===e.length)return Be;if(1===e.length)return e[0];var i=oc(e),a=ue.get(i);return a||(a=li(1048576),ue.set(i,a),a.objectFlags=t|sc(e,98304),a.types=e,a.aliasSymbol=r,a.aliasTypeArguments=n),a}function eu(e,t,r){var n=r.flags;return 2097152&n?tu(e,t,r.types):(Gl(r)?8388608&t||(t|=8388608,e.set(r.id.toString(),r)):(3&n?r===be&&(t|=4194304):!V&&98304&n||e.has(r.id.toString())||(109440&r.flags&&109440&t&&(t|=67108864),e.set(r.id.toString(),r)),t|=68943871&n),t)}function tu(e,t,r){for(var n=0,i=r;n0;){var i=t[--n];(4&i.flags&&128&r||8&i.flags&&256&r||64&i.flags&&2048&r||4096&i.flags&&8192&r)&&e.orderedRemoveItemAt(t,n)}}(o,a),8388608&a&&524288&a&&e.orderedRemoveItemAt(o,e.findIndex(o,Gl)),0===o.length)return De;if(1===o.length)return o[0];var s=oc(o),c=le.get(s);if(!c){if(1048576&a)if(function(t){var r,n=e.findIndex(t,(function(t){return!!(131072&e.getObjectFlags(t))}));if(n<0)return!1;for(var i=n+1;i=1e5)return Xr(l,e.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent),xe;var u=e.findIndex(o,(function(e){return 0!=(1048576&e.flags)})),_=o[u];c=Qc(e.map(_.types,(function(t){return iu(e.replaceElement(o,u,t))})),1,r,n)}else c=function(e,t,r){var n=li(2097152);return n.objectFlags=sc(e,98304),n.types=e,n.aliasSymbol=t,n.aliasTypeArguments=r,n}(o,r,n);le.set(s,c)}return c}function au(e,t){var r=li(4194304);return r.type=e,r.stringsOnly=t,r}function ou(t){return e.isIdentifier(t)?Wu(e.unescapeLeadingUnderscores(t.escapedText)):Vu(e.isComputedPropertyName(t)?Lf(t):zy(t))}function su(t,r){if(!(24&e.getDeclarationModifierFlagsFromSymbol(t))){var n=xo(t).nameType;if(!n&&!e.isKnownSymbol(t))if("default"===t.escapedName)n=Wu("default");else{var i=t.valueDeclaration&&e.getNameOfDeclaration(t.valueDeclaration);n=i&&ou(i)||Wu(e.symbolName(t))}if(n&&n.flags&r)return n}return Be}function cu(t,r){return Qc(e.map(ts(t),(function(e){return su(e,r)})))}function uu(e){var t=Ts(e,1);return t!==rr?t:void 0}function lu(t,r,n){return void 0===r&&(r=X),1048576&t.flags?iu(e.map(t.types,(function(e){return lu(e,r,n)}))):2097152&t.flags?Qc(e.map(t.types,(function(e){return lu(e,r,n)}))):fy(t,58982400)?function(e,t){return t?e.resolvedStringIndexType||(e.resolvedStringIndexType=au(e,!0)):e.resolvedIndexType||(e.resolvedIndexType=au(e,!1))}(t,r):32&e.getObjectFlags(t)?_p(zo(t),(function(e){return!(n&&5&e.flags)})):t===be?be:2&t.flags?Be:131073&t.flags?qe:r?!n&&Ts(t,0)?Ne:cu(t,128):!n&&Ts(t,0)?Qc([Ne,Ae,cu(t,8192)]):uu(t)?Qc([Ae,cu(t,8320)]):cu(t,8576)}function _u(t){if(X)return t;var r=zt||(zt=Ac("Extract",524288,e.Diagnostics.Cannot_find_global_type_0));return r?fc(r,[t,Ne]):Ne}function du(t){return!H&&(!!(16384&e.getObjectFlags(t))||(1048576&t.flags?e.every(t.types,du):2097152&t.flags?e.some(t.types,du):!!(63176704&t.flags)&&du(_s(t))))}function pu(t,r){var n=r&&194===r.kind?r:void 0;return _o(t)?yo(t):n&&Lm(n.argumentExpression,t,!1)?e.getPropertyNameForKnownSymbolName(e.idText(n.argumentExpression.name)):r&&e.isPropertyName(r)?e.getPropertyNameForPropertyNameNode(r):void 0}function fu(t,r,n,i,a,o,s){var c=o&&194===o.kind?o:void 0,u=pu(n,o);if(void 0!==u){var l=vs(r,u);if(l){if(c){if(Fm(l,c,103===c.expression.kind),e.isAssignmentTarget(c)&&(ly(c,l)||_y(c)))return void Xr(c.argumentExpression,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,Pi(l));4&s&&(dn(o).resolvedSymbol=l)}var _=wa(l);return c&&1!==e.getAssignmentTargetKind(c)?Op(c,_):_}if(lp(r,w_)&&Mf(u)&&+u>=0){if(o&&lp(r,(function(e){return!e.target.hasRestElement}))&&!(8&s)){var d=mu(o);w_(r)?Xr(d,e.Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2,Ii(r),dc(r),e.unescapeLeadingUnderscores(u)):Xr(d,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(u),Ii(r))}return v(Ts(r,1)),pp(r,(function(e){return I_(e)||Se}))}}if(!(98304&n.flags)&&my(n,12716)){if(131073&r.flags)return r;var p=Ts(r,0),f=my(n,296)&&Ts(r,1)||p;if(f)return 1&s&&f===p?void(c&&Xr(c,e.Diagnostics.Type_0_cannot_be_used_to_index_type_1,Ii(n),Ii(t))):o&&!my(n,12)?(Xr(d=mu(o),e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,Ii(n)),f.type):(v(f),f.type);if(131072&n.flags)return Be;if(du(r))return he;if(c&&!yy(r)){if(r.symbol===re&&void 0!==u&&re.exports.has(u)&&418&re.exports.get(u).flags)Xr(c,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.unescapeLeadingUnderscores(u),Ii(r));else if(H&&!K.suppressImplicitAnyIndexErrors&&!a)if(void 0!==u&&Tm(u,r))Xr(c,e.Diagnostics.Property_0_is_a_static_member_of_type_1,u,Ii(r));else if(Es(r,1))Xr(c.argumentExpression,e.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);else{var m=void 0;if(void 0!==u&&(m=Cm(u,r)))void 0!==m&&Xr(c.argumentExpression,e.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2,u,Ii(r),m);else{var g=function(t,r){var n=e.isAssignmentTarget(r)?"set":"get";if(!function(e,r){void 0===r&&(r=1);var n=Zo(t,e);if(n){var i=qm(wa(n));if(i&&jg(i)===r&&"string"===Ii(Mg(i,0)))return!0}return!1}(n))return;var i=e.tryGetPropertyAccessOrIdentifierToString(r);void 0===i?i=n:i+="."+n;return i}(r,c);if(void 0!==g)Xr(c,e.Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1,Ii(r),g);else{var y=void 0;if(1024&n.flags)y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,"["+Ii(n)+"]",Ii(r));else if(8192&n.flags){var h=jn(n.symbol,c);y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,"["+h+"]",Ii(r))}else 128&n.flags?y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,n.value,Ii(r)):256&n.flags?y=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_does_not_exist_on_type_1,n.value,Ii(r)):12&n.flags&&(y=e.chainDiagnosticMessages(void 0,e.Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,Ii(n),Ii(r)));y=e.chainDiagnosticMessages(y,e.Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1,Ii(i),Ii(r)),jr.add(e.createDiagnosticForNodeFromMessageChain(c,y))}}}return}}if(du(r))return he;if(o){d=mu(o);384&n.flags?Xr(d,e.Diagnostics.Property_0_does_not_exist_on_type_1,""+n.value,Ii(r)):12&n.flags?Xr(d,e.Diagnostics.Type_0_has_no_matching_index_signature_for_type_1,Ii(r),Ii(n)):Xr(d,e.Diagnostics.Type_0_cannot_be_used_as_an_index_type,Ii(n))}return Qi(n)?n:void 0;function v(t){t&&t.isReadonly&&c&&(e.isAssignmentTarget(c)||e.isDeleteTarget(c))&&Xr(c,e.Diagnostics.Index_signature_in_type_0_only_permits_reading,Ii(r))}}function mu(e){return 194===e.kind?e.argumentExpression:184===e.kind?e.indexType:153===e.kind?e.expression:e}function gu(e){return fy(e,59113472)}function yu(e){return fy(e,63176704)}function hu(e){return!!(262144&e.flags&&e.isThisType)}function vu(t,r){return 8388608&t.flags?function(t,r){var n=r?"simplifiedForWriting":"simplifiedForReading";if(t[n])return t[n]===et?t:t[n];t[n]=et;var i=vu(t.objectType,r),a=vu(t.indexType,r),o=function(t,r,n){if(1048576&r.flags){var i=e.map(r.types,(function(e){return vu(Su(t,e),n)}));return n?iu(i):Qc(i)}}(i,a,r);if(o)return t[n]=o;if(!(63176704&a.flags)){var s=bu(i,a,r);if(s)return t[n]=s}if(Xo(i))return t[n]=pp(Du(i,t.indexType),(function(e){return vu(e,r)}));return t[n]=t}(t,r):16777216&t.flags?function(e,t){var r=e.checkType,n=e.extendsType,i=Au(e),a=Fu(e);if(131072&a.flags&&ku(i)===ku(r)){if(1&r.flags||Fl(hl(r),hl(n)))return vu(i,t);if(xu(r,n))return Be}else if(131072&i.flags&&ku(a)===ku(r)){if(!(1&r.flags)&&Fl(hl(r),hl(n)))return Be;if(1&r.flags||xu(r,n))return vu(a,t)}return e}(t,r):t}function bu(t,r,n){if(3145728&t.flags){var i=e.map(t.types,(function(e){return vu(Su(e,r),n)}));return 2097152&t.flags||n?iu(i):Qc(i)}}function xu(e,t){return!!(131072&Qc([Io(e,t),Be]).flags)}function Du(e,t){var r=el([Jo(e)],[t]),n=rl(e.mapper,r);return gl(Uo(e),n)}function Su(e,t,r){return Tu(e,t,r,0)||(r?xe:De)}function Tu(e,t,r,n){if(void 0===n&&(n=0),e===be||t===be)return be;if(!Hl(e)||98304&t.flags||!my(t,12)||(t=Ne),yu(t)||(!r||184===r.kind)&&gu(e)){if(3&e.flags)return e;var i=e.id+","+t.id,a=de.get(i);return a||de.set(i,a=function(e,t){var r=li(8388608);return r.objectType=e,r.indexType=t,r}(e,t)),a}var o=ms(e);if(1048576&t.flags&&!(16&t.flags)){for(var s=[],c=!1,u=0,l=t.types;u=i,n)})),o=Go(r),s=4&o?0:8&o?dc(t)-(t.target.hasRestElement?1:0):i,c=dl(t.target.readonly,o);return e.contains(a,xe)?xe:Uc(a,s,t.target.hasRestElement,c,t.target.associatedNames)}(i,t,a):fl(t,a)}return i}))}return fl(t,r)}(n,m):fl(n,m),a.instantiations.set(p,f)}return f}return t}function ll(t,r){if(t.symbol&&t.symbol.declarations&&1===t.symbol.declarations.length){for(var n=t.symbol.declarations[0].parent,i=r;i!==n;i=i.parent)if(!i||222===i.kind||179===i.kind&&e.forEachChild(i.extendsType,a))return!0;return!!e.forEachChild(r,a)}return!0;function a(r){switch(r.kind){case 182:return!!t.isThisType;case 75:return!t.isThisType&&e.isPartOfTypeNode(r)&&function(e){return!(152===e.kind||168===e.parent.kind&&e.parent.typeArguments&&e===e.parent.typeName||187===e.parent.kind&&e.parent.typeArguments&&e===e.parent.qualifier)}(r)&&Yu(r)===t;case 171:return!0}return!!e.forEachChild(r,a)}}function _l(e){var t=zo(e);if(4194304&t.flags){var r=ku(t.type);if(262144&r.flags)return r}}function dl(e,t){return!!(1&t)||!(2&t)&&e}function pl(e,t,r,n){var i=rl(n,el([Jo(e)],[t])),a=gl(Uo(e.target||e),i),o=Go(e);return V&&4&o&&!Fl(Se,a)?z_(a):V&&8&o&&r?Hd(a,524288):a}function fl(e,t){var r=pi(64|e.objectFlags,e.symbol);if(32&e.objectFlags){r.declaration=e.declaration;var n=Jo(e),i=ol(n);r.typeParameter=i,t=rl(Zu(n,i),t),i.mapper=t}return r.target=e,r.mapper=t,r.aliasSymbol=e.aliasSymbol,r.aliasTypeArguments=Qu(e.aliasTypeArguments,t),r}function ml(t,r){var n=t.root;if(n.outerTypeParameters){var i=e.map(n.outerTypeParameters,r),a=oc(i),o=n.instantiations.get(a);if(!o)o=function(e,t){if(e.isDistributive){var r=e.checkType,n=t(r);if(r!==n&&1179648&n.flags)return pp(n,(function(n){return Nu(e,nl(r,n,t))}))}return Nu(e,t)}(n,el(n.outerTypeParameters,i)),n.instantiations.set(a,o);return o}return t}function gl(t,r){if(!t||!r||r===j)return t;if(50===T||x>=5e6)return Xr(l,e.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite),xe;x++,T++;var n=function(e,t){var r=e.flags;if(262144&r)return t(e);if(524288&r){var n=e.objectFlags;if(16&n)return md(e)?ul(e,t):e;if(32&n)return ul(e,t);if(4&n){if(e.node)return ul(e,t);var i=e.resolvedTypeArguments,a=Qu(i,t);return a!==i?cc(e.target,a):e}return e}if(1048576&r&&!(131068&r)){var o=e.types;return(s=Qu(o,t))!==o?Qc(s,1,e.aliasSymbol,Qu(e.aliasTypeArguments,t)):e}if(2097152&r){var s;o=e.types;return(s=Qu(o,t))!==o?iu(s,e.aliasSymbol,Qu(e.aliasTypeArguments,t)):e}if(4194304&r)return lu(gl(e.type,t));if(8388608&r)return Su(gl(e.objectType,t),gl(e.indexType,t));if(16777216&r)return ml(e,rl(e.mapper,t));if(33554432&r){var c=gl(e.typeVariable,t);if(8650752&c.flags)return hc(c,gl(e.substitute,t));var u=gl(e.substitute,t);return 3&u.flags||Fl(hl(c),hl(u))?c:u}return e}(t,r);return T--,n}function yl(e){return 262143&e.flags?e:e.permissiveInstantiation||(e.permissiveInstantiation=gl(e,il))}function hl(e){return 262143&e.flags?e:e.restrictiveInstantiation?e.restrictiveInstantiation:(e.restrictiveInstantiation=gl(e,al),e.restrictiveInstantiation.restrictiveInstantiation=e.restrictiveInstantiation,e.restrictiveInstantiation)}function vl(e,t){return e&&tc(gl(e.type,t),e.isReadonly,e.declaration)}function bl(t){switch(e.Debug.assert(160!==t.kind||e.isObjectLiteralMethod(t)),t.kind){case 200:case 201:case 160:case 243:return xl(t);case 192:return e.some(t.properties,bl);case 191:return e.some(t.elements,bl);case 209:return bl(t.whenTrue)||bl(t.whenFalse);case 208:return(56===t.operatorToken.kind||60===t.operatorToken.kind)&&(bl(t.left)||bl(t.right));case 279:return bl(t.initializer);case 199:return bl(t.expression);case 272:return e.some(t.properties,bl)||e.isJsxOpeningElement(t.parent)&&e.some(t.parent.parent.children,bl);case 271:var r=t.initializer;return!!r&&bl(r);case 274:var n=t.expression;return!!n&&bl(n)}return!1}function xl(t){if(e.isFunctionDeclaration(t)&&(!e.isInJSFile(t)||!aa(t)))return!1;if(t.typeParameters)return!1;if(e.some(t.parameters,(function(t){return!e.getEffectiveTypeAnnotationNode(t)})))return!0;if(201!==t.kind){var r=e.firstOrUndefined(t.parameters);if(!r||!e.parameterIsThisKeyword(r))return!0}return Dl(t)}function Dl(e){return!!e.body&&222!==e.body.kind&&bl(e.body)}function Sl(t){return(e.isInJSFile(t)&&e.isFunctionDeclaration(t)||Cf(t)||e.isObjectLiteralMethod(t))&&xl(t)}function Tl(t){if(524288&t.flags){var r=Qo(t);if(r.constructSignatures.length||r.callSignatures.length){var n=pi(16,t.symbol);return n.members=r.members,n.properties=r.properties,n.callSignatures=e.emptyArray,n.constructSignatures=e.emptyArray,n}}else if(2097152&t.flags)return iu(e.map(t.types,Tl));return t}function El(e,t){return Ql(e,t,Wr)}function Cl(e,t){return Ql(e,t,Wr)?-1:0}function kl(e,t){return Ql(e,t,Vr)?-1:0}function Nl(e,t){return Ql(e,t,Ur)?-1:0}function Al(e,t){return Ql(e,t,Ur)}function Fl(e,t){return Ql(e,t,Vr)}function Pl(t,r){return 1048576&t.flags?e.every(t.types,(function(e){return Pl(e,r)})):1048576&r.flags?e.some(r.types,(function(e){return Pl(t,e)})):58982400&t.flags?Pl(cs(t)||De,r):r===ct?!!(67633152&t.flags):r===ut?!!(524288&t.flags)&&Wd(t):Ma(t,Oa(r))}function wl(e,t){return Ql(e,t,qr)}function Il(e,t){return wl(e,t)||wl(t,e)}function Ol(e,t,r,n,i,a){return Zl(e,t,Vr,r,n,i,a)}function Ml(e,t,r,n,i,a){return Ll(e,t,Vr,r,n,i,a,void 0)}function Ll(e,t,r,n,i,a,o,s){return!!Ql(e,t,r)||(!n||!Bl(i,e,t,r,a,o,s))&&Zl(e,t,r,n,a,o,s)}function Rl(t){return!!(16777216&t.flags||2097152&t.flags&&e.some(t.types,Rl))}function Bl(t,n,a,o,s,c,u){if(!t||Rl(a))return!1;if(!Zl(n,a,o,void 0)&&function(t,r,n,i,a,o,s){for(var c=xs(r,0),u=xs(r,1),l=0,_=[u,c];l<_.length;l++){var d=_[l];if(e.some(d,(function(e){var t=zs(e);return!(131073&t.flags)&&Zl(t,n,i,void 0)}))){var p=s||{};Ol(r,n,t,a,o,p);var f=p.errors[p.errors.length-1];return e.addRelatedInfo(f,e.createDiagnosticForNode(t,d===u?e.Diagnostics.Did_you_mean_to_use_new_with_this_expression:e.Diagnostics.Did_you_mean_to_call_this_expression)),!0}}return!1}(t,n,a,o,s,c,u))return!0;switch(t.kind){case 274:case 199:return Bl(t.expression,n,a,o,s,c,u);case 208:switch(t.operatorToken.kind){case 62:case 27:return Bl(t.right,n,a,o,s,c,u)}break;case 192:return function(t,r,n,a,o,s){return!(131068&n.flags)&&jl(function(t){var r,n,a,o;return i(this,(function(i){switch(i.label){case 0:if(!e.length(t.properties))return[2];r=0,n=t.properties,i.label=1;case 1:if(!(r1,h=_p(m,S_),v=_p(m,(function(e){return!S_(e)}));if(y){if(h!==Be){var b=Uc(Vf(_,0)),x=function(t,r){var n,a,o,s,c;return i(this,(function(i){switch(i.label){case 0:if(!e.length(t.children))return[2];n=0,a=0,i.label=1;case 1:return au)return 0;t.typeParameters&&t.typeParameters!==r.typeParameters&&(t=Hm(t,r=Xs(r),void 0,c));var l=Bg(t),_=zg(t),d=zg(r);if(_&&d&&l!==u)return 0;var p=r.declaration?r.declaration.kind:0,f=!n&&q&&160!==p&&159!==p&&161!==p,m=-1,g=Ks(t);if(g&&g!==Re){var y=Ks(r);if(y){if(!(x=!f&&c(g,y,!1)||c(y,g,a)))return a&&o(e.Diagnostics.The_this_types_of_each_signature_are_incompatible),0;m&=x}}for(var h=_||d?Math.min(l,u):Math.max(l,u),v=_||d?h-1:-1,b=0;b0||mb(t));if(p&&!function(e,t,r){for(var n=0,i=ts(e);n0&&L(zs(g[0]),r,!1)||y.length>0&&L(zs(y[0]),r,!1)?I(e.Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it,Ii(t),Ii(r)):I(e.Diagnostics.Type_0_has_no_properties_in_common_with_type_1,Ii(t),Ii(r))}return 0}var h=0,v=F(),x=!!s;if(1048576&t.flags)h=i===qr?J(t,r,n&&!(131068&t.flags)):function(e,t,r){for(var n=-1,i=e.types,a=0,o=i;a0;if(S&&b--,524288&t.flags&&524288&r.flags){var T=u;M(t,r,n),u!==T&&(S=!!u)}if(524288&t.flags&&131068&r.flags)!function(t,r){var n=Mi(t.symbol)?Ii(t,t.symbol.valueDeclaration):Ii(t),i=Mi(r.symbol)?Ii(r,r.symbol.valueDeclaration):Ii(r);(ft===t&&Ne===r||mt===t&&Ae===r||gt===t&&Me===r||wc(!1)===t&&Le===r)&&I(e.Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible,i,n)}(t,r);else if(t.symbol&&524288&t.flags&&ct===t)I(e.Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead);else if(l&&2097152&r.flags){var E=r.types,k=Wf(C.IntrinsicAttributes,a),N=Wf(C.IntrinsicClassAttributes,a);if(k!==xe&&N!==xe&&(e.contains(E,k)||e.contains(E,N)))return h}if(!o&&S)return m=[t,r],h;O(o,t,r)}return h}function R(e,t){for(var r=-1,n=0,i=e.types;n0||xs(t,n=1).length>0)return e.find(r.types,(function(e){return xs(e,n).length>0}))}(t,r)||function(t,r){for(var n,i=0,a=0,o=r.types;a=i&&(n=s,i=u)}else E_(c)&&1>=i&&(n=s,i=1)}return n}(t,r)||i[i.length-1],!0);return 0}function j(t,r){if(1048576&r.flags&&2621440&t.flags){var n=ts(t);if(n){var i=zd(n,r);if(i)return e_(r,e.map(i,(function(e){return[function(){return wa(e)},e.escapedName]})),L)}}}function J(e,t,r){var n=e.types;if(1048576&e.flags&&Wc(n,t))return-1;for(var i=n.length,a=0;a25)return 0}for(var c=new Array(n.length),u=e.createUnderscoreEscapedMap(),l=0;l5?I(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more,Ii(r),Ii(n),e.map(f.slice(0,4),(function(e){return Pi(e)})).join(", "),f.length-4):I(e.Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2,Ii(r),Ii(n),e.map(f,(function(e){return Pi(e)})).join(", ")),m&&u&&b++)}return 0}if(Cd(n))for(var y=0,h=W(ts(r),s);y0&&e.every(r.properties,(function(e){return!!(16777216&e.flags)}))}return!!(2097152&t.flags)&&e.every(t.types,t_)}function r_(t,r,n){var i=cc(t,e.map(t.typeParameters,(function(e){return e===r?n:e})));return i.objectFlags|=8192,i}function n_(e){var t=_n(e);return i_(t.typeParameters,t,(function(r,n,i){var a=fc(e,Qu(t.typeParameters,Zu(n,i)));return a.aliasTypeArgumentsContainsMarker=!0,a}))}function i_(t,r,n){void 0===t&&(t=e.emptyArray);var i=r.variances;if(!i){r.variances=e.emptyArray,i=[];for(var a=function(e){var t=!1,a=!1,o=Yt;Yt=function(e){return e?a=!0:t=!0};var s=n(r,e,rt),c=n(r,e,nt),u=(Fl(c,s)?1:0)|(Fl(s,c)?2:0);3===u&&Fl(n(r,e,Xt),s)&&(u=4),Yt=o,(t||a)&&(t&&(u|=8),a&&(u|=16)),i.push(u)},o=0,s=t;o":n+="-"+o.id}return n}function u_(e,t,r,n){if(n===Wr&&e.id>t.id){var i=e;e=t,t=i}var a=r?"&":"";if(s_(e)&&s_(t)){var o=[];return c_(e,o)+","+c_(t,o)+a}return e.id+","+t.id+a}function l_(t,r){if(!(6&e.getCheckFlags(t)))return r(t);for(var n=0,i=t.containingType.types;n=5&&524288&e.flags){var n=e.symbol;if(n)for(var i=0,a=0;a=5)return!0}}if(r>=5&&8388608&e.flags){var o=p_(e);for(i=0,a=0;a=5)return!0}}return!1}function p_(e){for(var t=e;8388608&t.flags;)t=t.objectType;return t}function f_(t,r,n){if(t===r)return-1;var i=24&e.getDeclarationModifierFlagsFromSymbol(t);if(i!==(24&e.getDeclarationModifierFlagsFromSymbol(r)))return 0;if(i){if(Iv(t)!==Iv(r))return 0}else if((16777216&t.flags)!=(16777216&r.flags))return 0;return uy(t)!==uy(r)?0:n(wa(t),wa(r))}function m_(t,r,n,i,a,o){if(t===r)return-1;if(!function(e,t,r){var n=Bg(e),i=Bg(t),a=jg(e),o=jg(t),s=Kg(e),c=Kg(t);return n===i&&a===o&&s===c||!!(r&&a<=o)}(t,r,n))return 0;if(e.length(t.typeParameters)!==e.length(r.typeParameters))return 0;if(r.typeParameters){for(var s=el(t.typeParameters,r.typeParameters),c=0;c-1&&(gn(o,o.name.escapedText,788968,void 0,o.name.escapedText,!0)||o.name.originalKeywordKind&&e.isTypeNodeKind(o.name.originalKeywordKind))){var s="arg"+o.parent.parameters.indexOf(o);return void $r(H,t,e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1,s,e.declarationNameToString(o.name))}a=t.dotDotDotToken?H?e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type:e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage:H?e.Diagnostics.Parameter_0_implicitly_has_an_1_type:e.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;break;case 190:if(a=e.Diagnostics.Binding_element_0_implicitly_has_an_1_type,!H)return;break;case 298:return void Xr(t,e.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);case 243:case 160:case 159:case 162:case 163:case 200:case 201:if(H&&!t.name)return void Xr(t,1===n?e.Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation:e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);a=H?1===n?e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type:e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:e.Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage;break;case 185:return void(H&&Xr(t,e.Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type));default:a=H?e.Diagnostics.Variable_0_implicitly_has_an_1_type:e.Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage}$r(H,t,a,e.declarationNameToString(e.getNameOfDeclaration(t)),i)}}function ad(t,r,n){a&&H&&262144&e.getObjectFlags(r)&&(function t(r){var n=!1;if(262144&e.getObjectFlags(r)){if(1048576&r.flags)if(e.some(r.types,Wl))n=!0;else for(var i=0,a=r.types;ie.target.minLength||!I_(t)&&(!!I_(e)||O_(t)0)for(var D=0,S=r;D1){var r=e.filter(t,kd);if(r.length){var n=Qc(r,2);return e.concatenate(e.filter(t,(function(e){return!kd(e)})),[n])}}return t}(t.candidates),i=function(e){var t=ns(e);return!!t&&fy(16777216&t.flags?as(t):t,4325372)}(t.typeParameter),a=!i&&t.topLevel&&(t.isFixed||!gd(zs(r),t.typeParameter)),o=i?e.sameMap(n,Vu):a?e.sameMap(n,N_):n;return rd(56&t.priority?Qc(o,2):function(t){if(!V)return g_(t);var r=e.filter(t,(function(e){return!(98304&e.flags)}));return r.length?J_(g_(r),98304&L_(t)):Qc(t,2)}(o))}function Fd(t,r){var n=t.inferences[r];if(!n.inferredType){var i=void 0,a=t.signature;if(a){var o=n.candidates?Ad(n,a):void 0;if(n.contraCandidates){var s=Nd(n);i=!o||131072&o.flags||!Al(o,s)?s:o}else if(o)i=o;else if(1&t.flags)i=je;else{var c=ps(n.typeParameter);c&&(i=gl(c,rl(function(t,r){return function(n){return e.findIndex(t.inferences,(function(e){return e.typeParameter===n}))>=r?De:n}}(t,r),t.nonFixingMapper)))}}else i=Dd(n);n.inferredType=i||Pd(!!(2&t.flags));var u=ns(n.typeParameter);if(u){var l=gl(u,t.nonFixingMapper);i&&t.compareTypes(i,Do(l,i))||(n.inferredType=i=l)}}return n.inferredType}function Pd(e){return e?he:De}function wd(e){for(var t=[],r=0;r=0&&n.parameterIndex=n&&c-1){var l=a.filter((function(e){return void 0!==e})),_=c=2||0==(34&r.flags)||e.isSourceFile(r.valueDeclaration)||278===r.valueDeclaration.parent.kind)return;var n=e.getEnclosingBlockScopeContainer(r.valueDeclaration),i=function(t,r){return!!e.findAncestor(t,(function(t){return t===r?"quit":e.isFunctionLike(t)}))}(t.parent,n),a=n,o=!1;for(;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}if(o){if(i){var s=!0;if(e.isForStatement(n)&&e.getAncestor(r.valueDeclaration,242).parent===n){var c=function(t,r){return e.findAncestor(t,(function(e){return e===r?"quit":e===r.initializer||e===r.condition||e===r.incrementor||e===r.statement}))}(t.parent,n);if(c){var u=dn(c);u.flags|=131072;var l=u.capturedBlockScopeBindings||(u.capturedBlockScopeBindings=[]);e.pushIfUnique(l,r),c===n.initializer&&(s=!1)}}s&&(dn(a).flags|=65536)}229===n.kind&&e.getAncestor(r.valueDeclaration,242).parent===n&&function(t,r){var n=t;for(;199===n.parent.kind;)n=n.parent;var i=!1;if(e.isAssignmentTarget(n))i=!0;else if(206===n.parent.kind||207===n.parent.kind){var a=n.parent;i=45===a.operator||46===a.operator}if(!i)return!1;return!!e.findAncestor(n,(function(e){return e===r?"quit":e===r.statement}))}(t,n)&&(dn(r.valueDeclaration).flags|=4194304),dn(r.valueDeclaration).flags|=524288}i&&(dn(r.valueDeclaration).flags|=262144)}(t,r);var o=Jp(wa(i),t),s=e.getAssignmentTargetKind(t);if(s){if(!(3&i.flags||e.isInJSFile(t)&&512&i.flags))return Xr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable,Pi(r)),xe;if(uy(i))return 3&i.flags?Xr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant,Pi(r)):Xr(t,e.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property,Pi(r)),xe}var c=2097152&i.flags;if(3&i.flags){if(1===s)return o}else{if(!c)return o;a=e.find(r.declarations,I)}if(!a)return o;for(var u=155===e.getRootDeclaration(a).kind,l=Mp(a),_=Mp(t),d=_!==l,p=t.parent&&t.parent.parent&&e.isSpreadAssignment(t.parent)&&Zd(t.parent.parent),f=134217728&r.flags;_!==l&&(200===_.kind||201===_.kind||e.isObjectLiteralOrClassExpressionMethod(_))&&(Bp(i)||u&&!Lp(i));)_=Mp(_);var m=u||c||d||p||f||e.isBindingElement(a)||o!==ve&&o!==bt&&(!V||0!=(16387&o.flags)||Md(t)||261===t.parent.kind)||217===t.parent.kind||241===a.kind&&a.exclamationToken||8388608&a.flags,g=Op(t,o,m?u?function(e,t){return V&&155===t.kind&&t.initializer&&32768&R_(e)&&!(32768&R_(zy(t.initializer)))?Hd(e,524288):e}(o,a):o:o===ve||o===bt?Se:z_(o),_,!m);if(Ep(t)||o!==ve&&o!==bt){if(!m&&!(32768&R_(o))&&32768&R_(g))return Xr(t,e.Diagnostics.Variable_0_is_used_before_being_assigned,Pi(r)),o}else if(g===ve||g===bt)return H&&(Xr(e.getNameOfDeclaration(a),e.Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined,Pi(r),Ii(g)),Xr(t,e.Diagnostics.Variable_0_implicitly_has_an_1_type,Pi(r),Ii(g))),Jh(g);return s?k_(g):g}function Vp(e,t){(dn(e).flags|=2,158===t.kind||161===t.kind)?dn(t.parent).flags|=4:dn(t).flags|=4}function qp(t){return e.isSuperCall(t)?t:e.isFunctionLike(t)?void 0:e.forEachChild(t,qp)}function Wp(e){var t=dn(e);return void 0===t.hasSuperCall&&(t.superCall=qp(e.body),t.hasSuperCall=!!t.superCall),t.superCall}function Gp(e){return qa(ro(ri(e)))===ke}function Hp(t,r,n){var i=r.parent;if(e.getClassExtendsHeritageElement(i)&&!Gp(i)){var a=Wp(r);(!a||a.end>t.pos)&&Xr(t,n)}}function Yp(t){var r=e.getThisContainer(t,!0),n=!1;switch(161===r.kind&&Hp(t,r,e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class),201===r.kind&&(r=e.getThisContainer(r,!1),n=!0),r.kind){case 248:Xr(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 247:Xr(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 161:Qp(t,r)&&Xr(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 158:case 157:e.hasModifier(r,32)&&Xr(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);break;case 153:Xr(t,e.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name)}n&&J<2&&Vp(t,r);var i=Xp(t,!0,r);if(Y){var a=wa(re);if(i===a&&n)Xr(t,e.Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this);else if(!i){var o=Xr(t,e.Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);if(!e.isSourceFile(r)){var s=Xp(r);s&&s!==a&&e.addRelatedInfo(o,e.createDiagnosticForNode(r,e.Diagnostics.An_outer_value_of_this_is_shadowed_by_this_container))}}}return i||he}function Xp(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=e.getThisContainer(t,!1));var i=e.isInJSFile(t);if(e.isFunctionLike(n)&&(!af(t)||e.getThisParameter(n))){var a=function(t){if(200===t.kind&&e.isBinaryExpression(t.parent)&&3===e.getAssignmentDeclarationKind(t.parent))return t.parent.left.expression.expression;if(160===t.kind&&192===t.parent.kind&&e.isBinaryExpression(t.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent))return t.parent.parent.left.expression;if(200===t.kind&&279===t.parent.kind&&192===t.parent.parent.kind&&e.isBinaryExpression(t.parent.parent.parent)&&6===e.getAssignmentDeclarationKind(t.parent.parent.parent))return t.parent.parent.parent.left.expression;if(200===t.kind&&e.isPropertyAssignment(t.parent)&&e.isIdentifier(t.parent.name)&&("value"===t.parent.name.escapedText||"get"===t.parent.name.escapedText||"set"===t.parent.name.escapedText)&&e.isObjectLiteralExpression(t.parent.parent)&&e.isCallExpression(t.parent.parent.parent)&&t.parent.parent.parent.arguments[2]===t.parent.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent.parent))return t.parent.parent.parent.arguments[0].expression;if(e.isMethodDeclaration(t)&&e.isIdentifier(t.name)&&("value"===t.name.escapedText||"get"===t.name.escapedText||"set"===t.name.escapedText)&&e.isObjectLiteralExpression(t.parent)&&e.isCallExpression(t.parent.parent)&&t.parent.parent.arguments[2]===t.parent&&9===e.getAssignmentDeclarationKind(t.parent.parent))return t.parent.parent.arguments[0].expression}(n);if(i&&a){var o=zy(a).symbol;if(o&&o.members&&16&o.flags)return Op(t,ro(o).thisType)}else if(i&&(200===n.kind||243===n.kind)&&e.getJSDocClassTag(n)){return Op(t,ro(ti(n.symbol)).thisType)}var s=Ea(n)||tf(n);if(s)return Op(t,s)}if(e.isClassLike(n.parent)){var c,u=ri(n.parent);return Op(t,c=e.hasModifier(n,32)?wa(u):ro(u).thisType)}if(i&&((c=function(t){var r=e.getJSDocType(t);if(r&&298===r.kind){var n=r;if(n.parameters.length>0&&n.parameters[0].name&&"this"===n.parameters[0].name.escapedText)return Yu(n.parameters[0].type)}var i=e.getJSDocThisTag(t);if(i&&i.typeExpression)return Yu(i.typeExpression)}(n))&&c!==xe))return Op(t,c);if(e.isSourceFile(n)){if(n.commonJsModuleIndicator){var l=ri(n);return l&&wa(l)}if(r)return wa(re)}}function Qp(t,r){return!!e.findAncestor(t,(function(t){return e.isFunctionLikeDeclaration(t)?"quit":155===t.kind&&t.parent===r}))}function $p(t){var r=195===t.parent.kind&&t.parent.expression===t,n=e.getSuperContainer(t,!0),i=!1;if(!r)for(;n&&201===n.kind;)n=e.getSuperContainer(n,!0),i=J<2;var a=0;if(!function(t){if(!t)return!1;if(r)return 161===t.kind;if(e.isClassLike(t.parent)||192===t.parent.kind)return e.hasModifier(t,32)?160===t.kind||159===t.kind||162===t.kind||163===t.kind:160===t.kind||159===t.kind||162===t.kind||163===t.kind||158===t.kind||157===t.kind||161===t.kind;return!1}(n)){var o=e.findAncestor(t,(function(e){return e===n?"quit":153===e.kind}));return o&&153===o.kind?Xr(t,e.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name):r?Xr(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):n&&n.parent&&(e.isClassLike(n.parent)||192===n.parent.kind)?Xr(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):Xr(t,e.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),xe}if(r||161!==n.kind||Hp(t,n,e.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class),a=e.hasModifier(n,32)||r?512:256,dn(t).flags|=a,160===n.kind&&e.hasModifier(n,256)&&(e.isSuperProperty(t.parent)&&e.isAssignmentTarget(t.parent)?dn(n).flags|=4096:dn(n).flags|=2048),i&&Vp(t.parent,n),192===n.parent.kind)return J<2?(Xr(t,e.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),xe):he;var s=n.parent;if(!e.getClassExtendsHeritageElement(s))return Xr(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),xe;var c=ro(ri(s)),u=c&&Wa(c)[0];return u?161===n.kind&&Qp(t,n)?(Xr(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),xe):512===a?qa(c):Do(u,c.thisType):xe}function Zp(t){return 4&e.getObjectFlags(t)&&t.target===ht?_c(t)[0]:void 0}function ef(t){return pp(t,(function(t){return 2097152&t.flags?e.forEach(t.types,Zp):Zp(t)}))}function tf(t){if(201!==t.kind){if(Sl(t)){var r=Nf(t);if(r){var n=r.thisParameter;if(n)return wa(n)}}var i=e.isInJSFile(t);if(Y||i){var a=function(e){return 160!==e.kind&&162!==e.kind&&163!==e.kind||192!==e.parent.kind?200===e.kind&&279===e.parent.kind?e.parent.parent:void 0:e.parent}(t);if(a){for(var o=hf(a),s=a,c=o;c;){var u=ef(c);if(u)return gl(u,fd(Df(a)));if(279!==s.parent.kind)break;c=hf(s=s.parent.parent)}return rd(o?U_(o):ky(a))}var l=t.parent;if(208===l.kind&&62===l.operatorToken.kind){var _=l.left;if(193===_.kind||194===_.kind){var d=_.expression;if(i&&e.isIdentifier(d)){var p=e.getSourceFileOfNode(l);if(p.commonJsModuleIndicator&&Od(d)===p.symbol)return}return rd(ky(d))}}}}}function rf(t,r){var n=t.parent;if(Sl(n)){var i=e.getImmediatelyInvokedFunctionExpression(n);if(i&&i.arguments){var a=rg(i),o=n.parameters.indexOf(t);if(t.dotDotDotToken)return Xm(a,o,a.length,he,void 0);var s=dn(i),c=s.resolvedSignature;s.resolvedSignature=$t;var u=o=0)return s}return Mf(r)&&df(t,1)||df(t,0)}}),!0)}function df(e,t){return pp(e,(function(e){return Ss(e,t)}),!0)}function pf(e,t){var r=hf(e.parent,t);if(r){if(!go(e)){var n=_f(r,ri(e).escapedName);if(n)return n}return If(e.name)&&df(r,1)||df(r,0)}}function ff(e,t){return e&&(_f(e,""+t)||ev(1,e,Se,void 0,!1))}function mf(t){var r=t.parent;return e.isJsxAttributeLike(r)?xf(t):e.isJsxElement(r)?function(e,t){var r=hf(e.openingElement.tagName),n=Xf(Hf(e));if(r&&!Qi(r)&&n&&""!==n){var i=Jl(e.children),a=i.indexOf(t),o=_f(r,n);return o&&(1===i.length?o:pp(o,(function(e){return b_(e)?Su(e,Wu(a)):e}),!0))}}(r,t):void 0}function gf(t){if(e.isJsxAttribute(t)){var r=hf(t.parent);if(!r||Qi(r))return;return _f(r,t.name.escapedText)}return xf(t.parent)}function yf(e){switch(e.kind){case 10:case 8:case 9:case 14:case 105:case 90:case 99:case 75:case 145:return!0;case 193:case 199:return yf(e.expression);case 274:return!e.expression||yf(e.expression)}return!1}function hf(t,r){var n=vf(e.isObjectLiteralMethod(t)?function(t,r){if(e.Debug.assert(e.isObjectLiteralMethod(t)),!(16777216&t.flags))return pf(t,r)}(t,r):xf(t,r),t,r);if(n&&!(r&&2&r&&8650752&n.flags)){var i=pp(n,ms,!0);if(1048576&i.flags){if(e.isObjectLiteralExpression(t))return function(t,r){return e_(r,e.map(e.filter(t.properties,(function(e){return!!e.symbol&&279===e.kind&&yf(e.initializer)&&Jd(r,e.symbol.escapedName)})),(function(e){return[function(){return zy(e.initializer)},e.symbol.escapedName]})),Fl,r)}(t,i);if(e.isJsxAttributes(t))return function(t,r){return e_(r,e.map(e.filter(t.properties,(function(e){return!!e.symbol&&271===e.kind&&Jd(r,e.symbol.escapedName)&&(!e.initializer||yf(e.initializer))})),(function(e){return[e.initializer?function(){return zy(e.initializer)}:function(){return Ie},e.symbol.escapedName]})),Fl,r)}(t,i)}return i}}function vf(t,r,n){if(t&&fy(t,63176704)){var i=Df(r);if(i&&e.some(i.inferences,Ry)){if(n&&1&n)return bf(t,i.nonFixingMapper);if(i.returnMapper)return bf(t,i.returnMapper)}}return t}function bf(t,r){return 63176704&t.flags?gl(t,r):1048576&t.flags?Qc(e.map(t.types,(function(e){return bf(e,r)})),0):2097152&t.flags?iu(e.map(t.types,(function(e){return bf(e,r)}))):t}function xf(t,r){if(!(16777216&t.flags)){if(t.contextualType)return t.contextualType;var n=t.parent;switch(n.kind){case 241:case 155:case 158:case 157:case 190:return function(t){var r=t.parent;if(e.hasInitializer(r)&&t===r.initializer){var n=nf(r);if(n)return n;if(e.isBindingPattern(r.name))return ya(r.name,!0,!1)}}(t);case 201:case 234:return function(t){var r=e.getContainingFunction(t);if(r){var n=e.getFunctionFlags(r);if(1&n)return;var i=sf(r);if(i){if(2&n){var a=uh(i);return a&&Qc([a,Hg(a)])}return i}}}(t);case 211:return function(t){var r=e.getContainingFunction(t);if(r){var n=e.getFunctionFlags(r),i=sf(r);if(i)return t.asteriskToken?i:bv(0,i,0!=(2&n))}}(n);case 205:return function(e){var t=xf(e);if(t){var r=dh(t);return r&&Qc([r,Hg(r)])}}(n);case 195:if(95===n.expression.kind)return Ne;case 196:return cf(n,t,r);case 198:case 216:return e.isConstTypeReference(n.type)?void 0:Yu(n.type);case 208:return lf(t,r);case 279:case 280:return pf(n,r);case 281:return hf(n.parent,r);case 191:var i=n;return ff(hf(i,r),e.indexOfNode(i.elements,t));case 209:return function(e,t){var r=e.parent;return e===r.whenTrue||e===r.whenFalse?xf(r,t):void 0}(t,r);case 220:return e.Debug.assert(210===n.parent.kind),function(e,t){if(197===e.parent.kind)return cf(e.parent,t)}(n.parent,t);case 199:var a=e.isInJSFile(n)?e.getJSDocTypeTag(n):void 0;return a?Yu(a.typeExpression.type):xf(n,r);case 274:return mf(n);case 271:case 273:return gf(n);case 266:case 265:return function(t){if(e.isJsxOpeningElement(t)&&t.parent.contextualType)return t.parent.contextualType;return uf(t,0)}(n)}}}function Df(t){var r=e.findAncestor(t,(function(e){return!!e.inferenceContext}));return r&&r.inferenceContext}function Sf(t,r){return 0!==$m(r)?function(e,t){var r=Vg(e,De);r=Tf(t,Hf(t),r);var n=Wf(C.IntrinsicAttributes,t);n!==xe&&(r=Io(n,r));return r}(t,r):function(t,r){var n=Hf(r),i=(o=n,Yf(C.ElementAttributesPropertyNameContainer,o)),a=void 0===i?Vg(t,De):""===i?zs(t):function(e,t){if(e.unionSignatures){for(var r=[],n=0,i=e.unionSignatures;n=2)return cc(o,c=Ms([s,n],o.typeParameters,2,e.isInJSFile(t)));if(e.length(o.aliasTypeArguments)>=2){var c=Ms([s,n],o.aliasTypeArguments,2,e.isInJSFile(t));return fc(o.aliasSymbol,c)}}return n}function Ef(t,r){var n=xs(t,0);if(1===n.length){var i=n[0];if(!function(t,r){for(var n=0;n0&&212===i[a-1].kind,y=a-(g?1:0),h=void 0;if(c&&y>0)return(m=uc(Uc(s,y,g))).pattern=t,m;if(h=wf(s,u,g,a,l))return Pf(h);if(n)return Pf(Uc(s,y,g))}return Pf(jc(s.length?Qc(s,2):V?Je:Te,l))}function Pf(t){if(!(4&e.getObjectFlags(t)))return t;var r=t.literalType;return r||((r=t.literalType=uc(t)).objectFlags|=589824),r}function wf(e,t,r,n,i){if(void 0===n&&(n=e.length),void 0===i&&(i=!1),i||t&&up(t,D_))return Uc(e,n-(r?1:0),r,i)}function If(e){switch(e.kind){case 153:return function(e){return my(Lf(e),296)}(e);case 75:return Mf(e.escapedText);case 8:case 10:return Mf(e.text);default:return!1}}function Of(e){return"Infinity"===e||"-Infinity"===e||"NaN"===e}function Mf(e){return(+e).toString()===e}function Lf(t){var r=dn(t.expression);return r.resolvedType||(r.resolvedType=zy(t.expression),98304&r.resolvedType.flags||!my(r.resolvedType,12716)&&!Fl(r.resolvedType,Ve)?Xr(t,e.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any):Lm(t.expression,r.resolvedType,!0)),r.resolvedType}function Rf(e,t,r,n){for(var i=[],a=0;a0&&(o=Bu(o,F(),t.symbol,f,u),a=[],n=e.createSymbolTable(),g=!1,y=!1),!Kf(S=zy(b.expression)))return Xr(b,e.Diagnostics.Spread_types_may_only_be_created_from_object_types),xe;o=Bu(o,S,t.symbol,f,u),h=v+1;continue}e.Debug.assert(162===b.kind||163===b.kind),Yv(b)}!D||8576&D.flags?n.set(x.escapedName,x):Fl(D,Ve)&&(Fl(D,Ae)?y=!0:g=!0,i&&(m=!0)),a.push(x)}if(c)for(var N=0,A=ts(s);N0&&(o=Bu(o,F(),t.symbol,f,u)),o):F();function F(){var r=g?Rf(t,h,a,0):void 0,o=y?Rf(t,h,a,1):void 0,s=hi(t.symbol,n,e.emptyArray,e.emptyArray,r,o);return s.objectFlags|=524416|f,p&&(s.objectFlags|=16384),m&&(s.objectFlags|=512),i&&(s.pattern=t),s}}function Kf(t){if(63176704&t.flags){var r=cs(t);if(void 0!==r)return Kf(r)}return!!(126615553&t.flags||117632&R_(t)&&Kf(B_(t))||3145728&t.flags&&e.every(t.types,Kf))}function Jf(t){return!e.stringContains(t,"-")}function zf(t){return 75===t.kind&&e.isIntrinsicJsxName(t.escapedText)}function Uf(e,t){return e.initializer?wy(e.initializer,t):Ie}function Vf(e,t){for(var r=[],n=0,i=e.children;n0&&(o=Bu(o,S(),i.symbol,u,!1),a=e.createSymbolTable()),Qi(m=ky(p.expression,r))&&(s=!0),Kf(m)?o=Bu(o,m,i.symbol,u,!1):n=n?iu([n,m]):m}}s||a.size>0&&(o=Bu(o,S(),i.symbol,u,!1));var y=264===t.parent.kind?t.parent:void 0;if(y&&y.openingElement===t&&y.children.length>0){var h=Vf(y,r);if(!s&&l&&""!==l){c&&Xr(i,e.Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten,e.unescapeLeadingUnderscores(l));var v=hf(t.attributes),b=v&&_f(v,l),x=en(33554436,l);x.type=1===h.length?h[0]:wf(h,b,!1)||jc(Qc(h)),x.valueDeclaration=e.createPropertySignature(void 0,e.unescapeLeadingUnderscores(l),void 0,void 0,void 0),x.valueDeclaration.parent=i,x.valueDeclaration.symbol=x;var D=e.createSymbolTable();D.set(l,x),o=Bu(o,hi(i.symbol,D,e.emptyArray,e.emptyArray,void 0,void 0),i.symbol,u,!1)}}return s?he:n&&o!==He?iu([n,o]):n||(o===He?S():o);function S(){u|=Q;var t=hi(i.symbol,a,e.emptyArray,e.emptyArray,void 0,void 0);return t.objectFlags|=524416|u,t}}(t.parent,r)}function Wf(e,t){var r=Hf(t),n=r&&Qn(r),i=n&&fn(n,e,788968);return i?ro(i):xe}function Gf(t){var r=dn(t);if(!r.resolvedSymbol){var n=Wf(C.IntrinsicElements,t);if(n!==xe){if(!e.isIdentifier(t.tagName))return e.Debug.fail();var i=vs(n,t.tagName.escapedText);return i?(r.jsxFlags|=1,r.resolvedSymbol=i):Es(n,0)?(r.jsxFlags|=2,r.resolvedSymbol=n.symbol):(Xr(t,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.idText(t.tagName),"JSX."+C.IntrinsicElements),r.resolvedSymbol=ge)}return H&&Xr(t,e.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,e.unescapeLeadingUnderscores(C.IntrinsicElements)),r.resolvedSymbol=ge}return r.resolvedSymbol}function Hf(e){var t=e&&dn(e);if(t&&t.jsxNamespace)return t.jsxNamespace;if(!t||!1!==t.jsxNamespace){var r=Yr(e),n=gn(e,r,1920,void 0,r,!1);if(n){var i=On(fn(Qn(On(n)),C.JSX,1920));if(i)return t&&(t.jsxNamespace=i),i;t&&(t.jsxNamespace=!1)}}return Ac(C.JSX,1920,void 0)}function Yf(t,r){var n=r&&fn(r.exports,t,788968),i=n&&ro(n),a=i&&ts(i);if(a){if(0===a.length)return"";if(1===a.length)return a[0].escapedName;a.length>1&&Xr(n.declarations[0],e.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property,e.unescapeLeadingUnderscores(t))}}function Xf(e){return Yf(C.ElementChildrenAttributeNameContainer,e)}function Qf(t,r){var n=Wf(C.IntrinsicElements,r);if(n!==xe){var i=t.value,a=vs(n,e.escapeLeadingUnderscores(i));if(a)return wa(a);var o=Es(n,0);return o||void 0}return he}function $f(t){e.Debug.assert(zf(t.tagName));var r=dn(t);if(!r.resolvedJsxElementAttributesType){var n=Gf(t);return 1&r.jsxFlags?r.resolvedJsxElementAttributesType=wa(n):2&r.jsxFlags?r.resolvedJsxElementAttributesType=rc(n,0).type:r.resolvedJsxElementAttributesType=xe}return r.resolvedJsxElementAttributesType}function Zf(e){var t=Wf(C.ElementClass,e);if(t!==xe)return t}function em(e){return Wf(C.Element,e)}function tm(e){var t=em(e);if(t)return Qc([t,Ce])}function rm(t){var r,n=e.isJsxOpeningLikeElement(t);n&&function(t){tx(t,t.typeArguments);for(var r=e.createUnderscoreEscapedMap(),n=0,i=t.attributes.properties;n=0)return _>=jg(n)&&(Kg(n)||_s)return!1;if(o||a>=c)return!0;for(var d=a;d=i&&r.length<=n}function qm(e){return Gm(e,0,!1)}function Wm(e){return Gm(e,0,!1)||Gm(e,1,!1)}function Gm(e,t,r){if(524288&e.flags){var n=Qo(e);if(r||0===n.properties.length&&!n.stringIndexInfo&&!n.numberIndexInfo){if(0===t&&1===n.callSignatures.length&&0===n.constructSignatures.length)return n.callSignatures[0];if(1===t&&1===n.constructSignatures.length&&0===n.callSignatures.length)return n.constructSignatures[0]}}}function Hm(t,r,n,i){var a=cd(t.typeParameters,t,0,i),o=Jg(r),s=n&&(o&&262144&o.flags?n.nonFixingMapper:n.mapper);return od(s?sl(r,s):r,t,(function(e,t){Sd(a.inferences,e,t)})),n||sd(r,t,(function(e,t){Sd(a.inferences,e,t,16)})),Ws(t,wd(a),e.isInJSFile(r.declaration))}function Ym(t,r,n,i,a){if(e.isJsxOpeningLikeElement(t))return function(e,t,r,n){var i=Sf(t,e),a=Cy(e.attributes,i,n,r);return Sd(n.inferences,a,i),wd(n)}(t,r,i,a);if(156!==t.kind){var o=xf(t);if(o){var s=Df(t),c=gl(o,fd(function(t,r){return void 0===r&&(r=0),t&&ud(e.map(t.inferences,pd),t.signature,t.flags|r,t.compareTypes)}(s,1))),u=qm(c),l=u&&u.typeParameters?$s(Gs(u,u.typeParameters)):c,_=zs(r);Sd(a.inferences,l,_,16);var d=cd(r.typeParameters,r,a.flags),p=gl(o,s&&s.returnMapper);Sd(d.inferences,p,_),a.returnMapper=e.some(d.inferences,Ry)?fd(function(t){var r=e.filter(t.inferences,Ry);return r.length?ud(e.map(r,pd),t.signature,t.flags,t.compareTypes):void 0}(d)):void 0}}var f=Ks(r);if(f){var m=eg(t),g=m?zy(m):Re;Sd(a.inferences,g,f)}for(var y=zg(r),h=y?Math.min(Bg(r)-1,n.length):n.length,v=0;v=n-1){var o=t[n-1];if(Km(o))return 219===o.kind?jc(o.type):function(e){return up(e,(function(e){return!(63176705&e.flags||y_(e)||w_(e))}))?jc(Su(e,Ae)):e}(Cy(o.expression,i,a,0))}for(var s=[],c=-1,u=r;u0||e.isJsxOpeningElement(t)&&t.parent.children.length>0?[t.attributes]:e.emptyArray;var i=t.arguments||e.emptyArray,a=i.length;if(a&&Km(i[a-1])&&Jm(i)===a-1){var o=i[a-1],s=pr?zy(o.expression):ky(o.expression);if(w_(s)){var c=_c(s),u=s.target.hasRestElement?c.length-1:-1,l=e.map(c,(function(e,t){return tg(o,e,t===u)}));return e.concatenate(i.slice(0,a-1),l)}}return i}function ng(t,r){switch(t.parent.kind){case 244:case 213:return 1;case 158:return 2;case 160:case 162:case 163:return 0===J||r.parameters.length<=2?2:3;case 155:return 3;default:return e.Debug.fail()}}function ig(t,r){var n,i,a=e.getSourceFileOfNode(t);if(e.isPropertyAccessExpression(t.expression)){var o=e.getErrorSpanForNode(a,t.expression.name);n=o.start,i=r?o.length:t.end-n}else{var s=e.getErrorSpanForNode(a,t.expression);n=s.start,i=r?s.length:t.end-n}return{start:n,length:i,sourceFile:a}}function ag(t,r,n,i,a,o){if(e.isCallExpression(t)){var s=ig(t),c=s.sourceFile,u=s.start,l=s.length;return e.createFileDiagnostic(c,u,l,r,n,i,a,o)}return e.createDiagnosticForNode(t,r,n,i,a,o)}function og(t,r,n){for(var i,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=n.length,l=0,_=r;l<_.length;l++){var d=_[l],p=jg(d),f=Bg(d);ps&&(s=p),u-1;u<=o&&v&&u--;var b=y||v?y&&v?e.Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more:y?e.Diagnostics.Expected_at_least_0_arguments_but_got_1:e.Diagnostics.Expected_0_arguments_but_got_1_or_more:e.Diagnostics.Expected_0_arguments_but_got_1;if(i&&jg(i)>u&&i.declaration){var x=i.declaration.parameters[i.thisParameter?u+1:u];x&&(g=e.createDiagnosticForNode(x,e.isBindingPattern(x.name)?e.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided:e.Diagnostics.An_argument_for_0_was_not_provided,x.name?e.isBindingPattern(x.name)?void 0:e.idText(e.getFirstIdentifier(x.name)):u))}if(au&&S?n.indexOf(S):Math.min(o,n.length-1)))}}else m=e.createNodeArray(n.slice(o));m.pos=e.first(m).pos,m.end=e.last(m).end,m.end===m.pos&&m.end++;var T=e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),m,b,h,u);return g?e.addRelatedInfo(T,g):T}function sg(t,r,n,i,o,s){var c,u=197===t.kind,l=156===t.kind,_=e.isJsxOpeningLikeElement(t),d=!n;l||(c=t.typeArguments,(u||_||101!==t.expression.kind)&&e.forEach(c,Gv));var p=n||[];if(function(t,r,n){var i,a,o,s,c=0,u=-1;e.Debug.assert(!r.length);for(var l=0,_=t;l<_.length;l++){var d=_[l],p=d.declaration&&ri(d.declaration),f=d.declaration&&d.declaration.parent;a&&p!==a?(o=c=r.length,i=f):i&&f===i?o+=1:(i=f,o=c),a=p,L(d)?(s=++u,c++):s=o,r.splice(s,0,n?ko(d):d)}}(r,p,o),!p.length)return d&&jr.add(ag(t,e.Diagnostics.Call_target_does_not_contain_any_signatures)),jm(t);var f,m,g,y,h=rg(t),v=1===p.length&&!p[0].typeParameters,b=l||v||!e.some(h,bl)?0:4,x=!!(16&i)&&195===t.kind&&t.arguments.hasTrailingComma;if(p.length>1&&(y=W(p,Ur,x)),y||(y=W(p,Vr,x)),y)return y;if(d)if(f)if(1===f.length||f.length>3){var D,S=f[f.length-1];f.length>3&&(D=e.chainDiagnosticMessages(D,e.Diagnostics.The_last_overload_gave_the_following_error),D=e.chainDiagnosticMessages(D,e.Diagnostics.No_overload_matches_this_call));var T=Zm(t,h,S,Vr,0,!0,(function(){return D}));if(T)for(var E=0,C=T;E3&&e.addRelatedInfo(k,e.createDiagnosticForNode(S.declaration,e.Diagnostics.The_last_overload_is_declared_here)),jr.add(k)}else e.Debug.fail("No error for last overload signature")}else{for(var N=[],A=0,F=Number.MAX_VALUE,P=0,w=0,I=function(r){var n=Zm(t,h,r,Vr,0,!0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.Overload_0_of_1_2_gave_the_following_error,w+1,p.length,wi(r))}));n?(n.length<=F&&(F=n.length,P=w),A=Math.max(A,n.length),N.push(n)):e.Debug.fail("No error for 3 or fewer overload signatures"),w++},O=0,R=f;O1?N[P]:e.flatten(N);e.Debug.assert(B.length>0,"No errors reported for 3 or fewer overload signatures");var j=e.chainDiagnosticMessages(e.map(B,(function(e){return"string"==typeof e.messageText?e:e.messageText})),e.Diagnostics.No_overload_matches_this_call),K=e.flatMap(B,(function(e){return e.relatedInformation}));if(e.every(B,(function(e){return e.start===B[0].start&&e.length===B[0].length&&e.file===B[0].file}))){var J=B[0],z=J.file,U=J.start,V=J.length;jr.add({file:z,start:U,length:V,code:j.code,category:j.category,messageText:j,relatedInformation:K})}else jr.add(e.createDiagnosticForNodeFromMessageChain(t,j,K))}else if(m)jr.add(og(t,[m],h));else if(g)Qm(g,t.typeArguments,!0,s);else{var q=e.filter(r,(function(e){return Vm(e,c)}));0===q.length?jr.add(function(t,r,n){var i=n.length;if(1===r.length){var a=Os((_=r[0]).typeParameters),o=e.length(_.typeParameters);return e.createDiagnosticForNodeArray(e.getSourceFileOfNode(t),n,e.Diagnostics.Expected_0_type_arguments_but_got_1,ai?c=Math.min(c,d):o0),i||1===r.length||r.some((function(e){return!!e.typeParameters}))?function(t,r,n){var i=function(e,t){for(var r=-1,n=-1,i=0;i=t)return i;o>n&&(n=o,r=i)}return r}(r,void 0===ne?n.length:ne),a=r[i],o=a.typeParameters;if(!o)return a;var s=Rm(t)?t.typeArguments:void 0,c=s?Hs(a,function(e,t,r){var n=e.map(ub);for(;n.length>t.length;)n.pop();for(;n.length=0&&Xr(t.arguments[i],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var a=lm(t.expression);if(a===je)return tr;if((a=ms(a))===xe)return jm(t);if(Qi(a))return t.typeArguments&&Xr(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),Bm(t);var o=xs(a,1);if(o.length){if(!function(t,r){if(!r||!r.declaration)return!0;var n=r.declaration,i=e.getSelectedModifierFlags(n,24);if(!i)return!0;var a=e.getClassLikeDeclarationOfSymbol(n.parent.symbol),o=ro(n.parent.symbol);if(!ab(t,a)){var s=e.getContainingClass(t);if(s&&16&i){var c=ub(s);if(function t(r,n){var i=Wa(n);if(!e.length(i))return!1;var a=i[0];if(2097152&a.flags){for(var o=Lo(a.types),s=0,c=0,u=a.types;c0;if(1048576&t.flags){for(var s=!1,c=0,u=t.types;c0)return e.parameters.length-1+r}}return e.minArgumentCount}function Kg(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]);return!w_(t)||t.target.hasRestElement}return!1}function Jg(e){if(M(e)){var t=wa(e.parameters[e.parameters.length-1]);return w_(t)?function(e){var t=I_(e);return t&&jc(t)}(t):t}}function zg(e){var t=Jg(e);return!t||y_(t)||Qi(t)?void 0:t}function Ug(e){return Vg(e,Be)}function Vg(e,t){return e.parameters.length>0?Mg(e,0):t}function qg(t,r){(t.typeParameters=r.typeParameters,r.thisParameter)&&((!(a=t.thisParameter)||a.valueDeclaration&&!a.valueDeclaration.type)&&(a||(t.thisParameter=X_(r.thisParameter,void 0)),Wg(t.thisParameter,wa(r.thisParameter))));for(var n=t.parameters.length-(M(t)?1:0),i=0;i0&&(n=Qc(l,2)):u=Be;var _=function(t,r){var n=[],i=[],a=0!=(2&e.getFunctionFlags(t));return e.forEachYieldExpression(t.body,(function(t){var o,s=t.expression?zy(t.expression,r):Te;if(e.pushIfUnique(n,$g(t,s,he,a)),t.asteriskToken){var c=iv(s,a?19:17,t.expression);o=c&&c.nextType}else o=xf(t);o&&e.pushIfUnique(i,o)})),{yieldTypes:n,nextTypes:i}}(t,r),d=_.yieldTypes,p=_.nextTypes;i=e.some(d)?Qc(d,2):void 0,a=e.some(p)?iu(p):void 0}else{var f=ry(t,r);if(!f)return 2&o?Yg(t,Be):Be;if(0===f.length)return 2&o?Yg(t,Re):Re;n=Qc(f,2)}if(n||i||a){var m=kf(t);if(m||(i&&ad(t,i,1),n&&ad(t,n),a&&ad(t,a)),n&&E_(n)||i&&E_(i)||a&&E_(a)){var g=m?m===Ls(t)?c?void 0:n:vf(zs(m),t):void 0;c?(i=P_(i,g,0,s),n=P_(n,g,1,s),a=P_(a,g,2,s)):n=function(e,t,r){return e&&E_(e)&&(e=F_(e,t?r?lh(t):t:void 0)),e}(n,g,s)}i&&(i=rd(i)),n&&(n=rd(n)),a&&(a=rd(a))}return c?Qg(i||Be,n||u,a||of(2,t)||De,s):s?Gg(n||u):n||u}function Qg(e,t,r,n){var i=n?cr:ur,a=i.getGlobalGeneratorType(!1);if(e=i.resolveIterationType(e,void 0)||De,t=i.resolveIterationType(t,void 0)||De,r=i.resolveIterationType(r,void 0)||De,a===Qe){var o=i.getGlobalIterableIteratorType(!1),s=o!==Qe?cv(o,i):void 0,c=s?s.returnType:he,u=s?s.nextType:Se;return Fl(t,c)&&Fl(u,r)?o!==Qe?Rc(o,[e]):(i.getGlobalIterableIteratorType(!0),Ge):(i.getGlobalGeneratorType(!0),Ge)}return Rc(a,[e,t,r])}function $g(t,r,n,i){var a=t.expression||t,o=t.asteriskToken?Zh(i?19:17,r,n,a):r;return i?dh(o,a,t.asteriskToken?e.Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:e.Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member):o}function Zg(e,t,r,n){var i=0;if(n){for(var a=t;a1&&t.charCodeAt(r-1)>=48&&t.charCodeAt(r-1)<=57;)r--;for(var n=t.slice(0,r),i=1;;i++){var a=n+i;if(!By(e,a))return a}}function Ky(t,r){var n=e.skipParentheses(t);if(!e.isCallExpression(n)||101===n.expression.kind||e.isRequireCall(n,!0)||Cg(n)){if(e.isAssertionExpression(n)&&!e.isConstTypeReference(n.type))return Yu(n.type)}else{var i=void 0,a=void 0;if(e.isCallChain(n)){var o=H_(a=zy(n.expression),n.expression);i=a!==o,a=gm(o,n.expression)}else i=!1,a=lm(n.expression);var s=qm(a);if(s&&!s.typeParameters)return G_(zs(s),i)}return r?ky(t):zy(t)}function Jy(e){var t=dn(e);if(t.contextFreeType)return t.contextFreeType;var r=e.contextualType;e.contextualType=he;var n=t.contextFreeType=zy(e,4);return e.contextualType=r,n}function zy(t,r,n){var i=l;l=t,x=0;var s=My(t,function(t,r,n){var i=t.kind;if(o)switch(i){case 213:case 200:case 201:o.throwIfCancellationRequested()}switch(i){case 75:return Up(t);case 103:return Yp(t);case 101:return $p(t);case 99:return ke;case 14:case 10:return Uu(Wu(t.text));case 8:return Dx(t),Uu(Wu(+t.text));case 9:return function(t){if(!(e.isLiteralTypeNode(t.parent)||e.isPrefixUnaryExpression(t.parent)&&e.isLiteralTypeNode(t.parent.parent))&&J<99&&vx(t,e.Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ESNext))return!0}(t),Uu(function(t){return Wu({negative:!1,base10Value:e.parsePseudoBigInt(t.text)})}(t));case 105:return Ie;case 90:return Pe;case 210:return function(t){return e.forEach(t.templateSpans,(function(t){fy(zy(t.expression),12288)&&Xr(t.expression,e.Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String)})),Ne}(t);case 13:return yt;case 191:return Ff(t,r,n);case 192:return jf(t,r);case 193:return hm(t);case 152:return vm(t);case 194:return Om(t);case 195:if(95===t.expression.kind)return kg(t);case 196:return Eg(t,r);case 197:return Fg(t);case 199:return function(t,r){var n=e.isInJSFile(t)?e.getJSDocTypeTag(t):void 0;if(n)return Pg(n,n.typeExpression.type,t.expression,r);return zy(t.expression,r)}(t,r);case 213:return function(e){return Pv(e),Yv(e),wa(ri(e))}(t);case 200:case 201:return iy(t,r);case 203:return function(e){return zy(e.expression),zr}(t);case 198:case 216:return function(e){return Pg(e,e.type,e.expression)}(t);case 217:return function(e){return U_(zy(e.expression))}(t);case 218:return wg(t);case 202:return function(t){zy(t.expression);var r=e.skipParentheses(t.expression);if(193!==r.kind&&194!==r.kind)return Xr(r,e.Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference),Me;var n=si(dn(r).resolvedSymbol);return n&&uy(n)&&Xr(r,e.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property),Me}(t);case 204:return function(e){return zy(e.expression),Te}(t);case 205:return function(t){if(a){if(!(32768&t.flags)){var r=e.getSourceFileOfNode(t);if(!gx(r)){var n=e.getSpanOfTokenAtPosition(r,t.pos),i=e.createFileDiagnostic(r,n.start,n.length,e.Diagnostics.await_expression_is_only_allowed_within_an_async_function),o=e.getContainingFunction(t);if(o&&161!==o.kind){e.Debug.assert(0==(2&e.getFunctionFlags(o)),"Enclosing function should never be an async function.");var s=e.createDiagnosticForNode(o,e.Diagnostics.Did_you_mean_to_mark_this_function_as_async);e.addRelatedInfo(i,s)}jr.add(i)}}af(t)&&Xr(t,e.Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer)}var c=zy(t.expression),u=_h(c,t,e.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);return u!==c||u===xe||3&c.flags||Qr(!1,e.createDiagnosticForNode(t,e.Diagnostics.await_has_no_effect_on_the_type_of_this_expression)),u}(t);case 206:return function(t){var r=zy(t.operand);if(r===je)return je;switch(t.operand.kind){case 8:switch(t.operator){case 40:return Uu(Wu(-t.operand.text));case 39:return Uu(Wu(+t.operand.text))}break;case 9:if(40===t.operator)return Uu(Wu({negative:!0,base10Value:e.parsePseudoBigInt(t.operand.text)}))}switch(t.operator){case 39:case 40:case 54:return gm(r,t.operand),fy(r,12288)&&Xr(t.operand,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(t.operator)),39===t.operator?(fy(r,2112)&&Xr(t.operand,e.Diagnostics.Operator_0_cannot_be_applied_to_type_1,e.tokenToString(t.operator),Ii(k_(r))),Ae):py(r);case 53:Yh(t.operand);var n=12582912&Gd(r);return 4194304===n?Pe:8388608===n?Ie:Me;case 45:case 46:return sy(t.operand,gm(r,t.operand),e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&dy(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),py(r)}return xe}(t);case 207:return function(t){var r=zy(t.operand);return r===je?je:(sy(t.operand,gm(r,t.operand),e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type)&&dy(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access),py(r))}(t);case 208:return Sy(t,r);case 209:return function(e,t){return Yh(e.condition),Qc([zy(e.whenTrue,t),zy(e.whenFalse,t)],2)}(t,r);case 212:return function(e,t){return J<2&&Gb(e,K.downlevelIteration?1536:2048),Zh(33,zy(e.expression,t),Se,e.expression)}(t,r);case 214:return Te;case 211:return Ey(t);case 219:return t.type;case 274:return am(t,r);case 264:case 265:return function(e,t){return Yv(e),em(e)||he}(t);case 268:return function(t){return rm(t.openingFragment),2===K.jsx&&(K.jsxFactory||e.getSourceFileOfNode(t).pragmas.has("jsx"))&&Xr(t,K.jsxFactory?e.Diagnostics.JSX_fragment_is_not_supported_when_using_jsxFactory:e.Diagnostics.JSX_fragment_is_not_supported_when_using_an_inline_JSX_factory_pragma),Vf(t),em(t)||he}(t);case 272:return qf(t,r);case 266:e.Debug.fail("Shouldn't ever directly check a JsxOpeningElement")}return xe}(t,r,n),r);return yy(s)&&function(t,r){193===t.parent.kind&&t.parent.expression===t||194===t.parent.kind&&t.parent.expression===t||(75===t.kind||152===t.kind)&&ob(t)||171===t.parent.kind&&t.parent.exprName===t||261===t.parent.kind||Xr(t,e.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);if(K.isolatedModules){e.Debug.assert(!!(128&r.symbol.flags)),8388608&r.symbol.valueDeclaration.flags&&Xr(t,e.Diagnostics.Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided)}}(t,s),l=i,s}function Uy(t){t.expression&&yx(t.expression,e.Diagnostics.Type_expected),Gv(t.constraint),Gv(t.default);var r=to(ri(t));cs(r),function(e){return ds(e)!==et}(r)||Xr(t.default,e.Diagnostics.Type_parameter_0_has_a_circular_default,Ii(r));var n=ns(r),i=ps(r);n&&i&&Ol(i,Do(gl(n,Zu(r,i)),i),t.default,e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1),a&&kv(t.name,e.Diagnostics.Type_parameter_name_cannot_be_0)}function Vy(t){Yb(t),zh(t);var r=e.getContainingFunction(t);e.hasModifier(t,92)&&(161===r.kind&&e.nodeIsPresent(r.body)||Xr(t,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation)),t.questionToken&&e.isBindingPattern(t.name)&&r.body&&Xr(t,e.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),t.name&&e.isIdentifier(t.name)&&("this"===t.name.escapedText||"new"===t.name.escapedText)&&(0!==r.parameters.indexOf(t)&&Xr(t,e.Diagnostics.A_0_parameter_must_be_the_first_parameter,t.name.escapedText),161!==r.kind&&165!==r.kind&&170!==r.kind||Xr(t,e.Diagnostics.A_constructor_cannot_have_a_this_parameter),201===r.kind&&Xr(t,e.Diagnostics.An_arrow_function_cannot_have_a_this_parameter)),!t.dotDotDotToken||e.isBindingPattern(t.name)||Fl(wa(t.symbol),xt)||Xr(t,e.Diagnostics.A_rest_parameter_must_be_of_an_array_type)}function qy(t,r,n){for(var i=0,a=t.elements;i=2||K.noEmit||!e.hasRestParameter(t)||8388608&t.flags||e.nodeIsMissing(t.body))return;e.forEach(t.parameters,(function(t){t.name&&!e.isBindingPattern(t.name)&&t.name.escapedText===ie.escapedName&&Xr(t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)}))}(t);var n=e.getEffectiveReturnTypeNode(t);if(H&&!n)switch(t.kind){case 165:Xr(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 164:Xr(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(n){var i=e.getFunctionFlags(t);if(1==(5&i)){var o=Yu(n);if(o===Re)Xr(n,e.Diagnostics.A_generator_cannot_have_a_void_type_annotation);else{var s=bv(0,o,0!=(2&i))||he;Ol(Qg(s,bv(1,o,0!=(2&i))||s,bv(2,o,0!=(2&i))||De,!!(2&i)),o,n)}}else 2==(3&i)&&function(t,r){var n=Yu(r);if(J>=2){if(n===xe)return;var i=Ic(!0);if(i!==Qe&&!Ia(n,i))return void Xr(r,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type)}else{if(function(t){fh(t&&e.getEntityNameFromTypeNode(t))}(r),n===xe)return;var a=e.getEntityNameFromTypeNode(r);if(void 0===a)return void Xr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,Ii(n));var o=Kn(a,111551,!0),s=o?wa(o):xe;if(s===xe)return void(75===a.kind&&"Promise"===a.escapedText&&Oa(n)===Ic(!1)?Xr(r,e.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option):Xr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a)));var c=(_=!0,At||(At=Fc("PromiseConstructorLike",0,_))||Ge);if(c===Ge)return void Xr(r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value,e.entityNameToString(a));if(!Ol(s,c,r,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value))return;var u=a&&e.getFirstIdentifier(a),l=fn(t.locals,u.escapedText,111551);if(l)return void Xr(l.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,e.idText(u),e.entityNameToString(a))}var _;_h(n,t,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)}(t,n)}166!==t.kind&&298!==t.kind&&Dh(t)}}function Gy(t){for(var r=e.createMap(),n=0,i=t.members;n0&&r.declarations[0]!==t)return}var n=Zs(ri(t));if(n)for(var i=!1,a=!1,o=0,s=n.declarations;o=0)return void(r&&Xr(r,e.Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method));Br.push(t.id);var _=dh(l,r,n,i);if(Br.pop(),!_)return;return a.awaitedTypeOfType=_}var d=Xi(t,"then");if(!(d&&xs(d,0).length>0))return a.awaitedTypeOfType=t;if(r){if(!n)return e.Debug.fail();Xr(r,n,i)}}function ph(t){var r=zs(Dg(t));if(!(1&r.flags)){var n,i,a=yg(t);switch(t.parent.kind){case 244:n=Qc([wa(ri(t.parent)),Re]);break;case 155:n=Re,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 158:n=Re,i=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 160:case 162:case 163:n=Qc([Bc(ub(t.parent)),Re]);break;default:return e.Debug.fail()}Ol(r,n,t,a,(function(){return i}))}}function fh(t){if(t){var r=e.getFirstIdentifier(t),n=2097152|(75===t.kind?788968:1920),i=gn(r,r.escapedText,n,void 0,void 0,!0);i&&2097152&i.flags&&ci(i)&&!Cb(Mn(i))&&Rn(i)}}function mh(t){var r=gh(t);r&&e.isEntityName(r)&&fh(r)}function gh(e){if(e)switch(e.kind){case 178:case 177:return yh(e.types);case 179:return yh([e.trueType,e.falseType]);case 181:return gh(e.type);case 168:return e.typeName}}function yh(t){for(var r,n=0,i=t;n=e.ModuleKind.ES2015||K.noEmit)&&(Lh(t,r,"require")||Lh(t,r,"exports"))&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=Yi(t);288===n.kind&&e.isExternalOrCommonJsModule(n)&&Xr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(r),e.declarationNameToString(r))}}function Kh(t,r){if(!(J>=4||K.noEmit)&&Lh(t,r,"Promise")&&(!e.isModuleDeclaration(t)||1===e.getModuleInstanceState(t))){var n=Yi(t);288===n.kind&&e.isExternalOrCommonJsModule(n)&&2048&n.flags&&Xr(r,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(r),e.declarationNameToString(r))}}function Jh(e){return e===ve?he:e===bt?vt:e}function zh(t){if(vh(t),e.isBindingElement(t)||Gv(t.type),t.name){if(153===t.name.kind&&(Lf(t.name),t.initializer&&ky(t.initializer)),190===t.kind){188===t.parent.kind&&J<99&&Gb(t,4),t.propertyName&&153===t.propertyName.kind&&Lf(t.propertyName);var r=t.parent.parent,n=$i(r),i=t.propertyName||t.name;if(n&&!e.isBindingPattern(i)){var a=ou(i);if(_o(a)){var o=vs(n,yo(a));o&&(Fm(o,void 0,!1),cm(r,!!r.initializer&&101===r.initializer.kind,n,o))}}}if(e.isBindingPattern(t.name)&&(189===t.name.kind&&J<2&&K.downlevelIteration&&Gb(t,512),e.forEach(t.name.elements,Gv)),t.initializer&&155===e.getRootDeclaration(t).kind&&e.nodeIsMissing(e.getContainingFunction(t).body))Xr(t,e.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);else if(e.isBindingPattern(t.name)){var s=t.initializer&&230!==t.parent.parent.kind,c=0===t.name.elements.length;if(s||c){var u=ha(t);if(s){var l=ky(t.initializer);V&&c?ym(l,t):Ml(l,ha(t),t,t.initializer)}c&&(e.isArrayBindingPattern(t.name)?Zh(65,u,Se,t):V&&ym(u,t))}}else{var _=ri(t),d=Jh(wa(_));if(t===_.valueDeclaration){var p=e.getEffectiveInitializer(t);if(p)e.isInJSFile(t)&&e.isObjectLiteralExpression(p)&&(0===p.properties.length||e.isPrototypeAccess(t.name))&&e.hasEntries(_.exports)||230===t.parent.parent.kind||Ml(ky(p),d,t,p,void 0);_.declarations.length>1&&e.some(_.declarations,(function(r){return r!==t&&e.isVariableLike(r)&&!Vh(r,t)}))&&Xr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}else{var f=Jh(ha(t));d===xe||f===xe||El(d,f)||67108864&_.flags||Uh(_.valueDeclaration,d,t,f),t.initializer&&Ml(ky(t.initializer),f,t,t.initializer,void 0),Vh(t,_.valueDeclaration)||Xr(t.name,e.Diagnostics.All_declarations_of_0_must_have_identical_modifiers,e.declarationNameToString(t.name))}158!==t.kind&&157!==t.kind&&(ch(t),241!==t.kind&&190!==t.kind||function(t){if(0==(3&e.getCombinedNodeFlags(t))&&!e.isParameterDeclaration(t)&&(241!==t.kind||t.initializer)){var r=ri(t);if(1&r.flags){if(!e.isIdentifier(t.name))return e.Debug.fail();var n=gn(t,t.name.escapedText,3,void 0,void 0,!1);if(n&&n!==r&&2&n.flags&&3&om(n)){var i=e.getAncestor(n.valueDeclaration,242),a=224===i.parent.kind&&i.parent.parent?i.parent.parent:void 0;if(!(a&&(222===a.kind&&e.isFunctionLike(a.parent)||249===a.kind||248===a.kind||288===a.kind))){var o=Pi(n);Xr(t,e.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,o,o)}}}}}(t),jh(t,t.name),Kh(t,t.name))}}}function Uh(t,r,n,i){var a=e.getNameOfDeclaration(n),o=158===n.kind||157===n.kind?e.Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2:e.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,s=e.declarationNameToString(a),c=Xr(a,o,s,Ii(r),Ii(i));t&&e.addRelatedInfo(c,e.createDiagnosticForNode(t,e.Diagnostics._0_was_also_declared_here,s))}function Vh(t,r){if(155===t.kind&&241===r.kind||241===t.kind&&155===r.kind)return!0;if(e.hasQuestionToken(t)!==e.hasQuestionToken(r))return!1;return e.getSelectedModifierFlags(t,504)===e.getSelectedModifierFlags(r,504)}function qh(t){return function(t){if(230!==t.parent.parent.kind&&231!==t.parent.parent.kind)if(8388608&t.flags)fx(t);else if(!t.initializer){if(e.isBindingPattern(t.name)&&!e.isBindingPattern(t.parent))return vx(t,e.Diagnostics.A_destructuring_declaration_must_have_an_initializer);if(e.isVarConst(t))return vx(t,e.Diagnostics.const_declarations_must_be_initialized)}if(t.exclamationToken&&(224!==t.parent.parent.kind||!t.type||t.initializer||8388608&t.flags))return vx(t.exclamationToken,e.Diagnostics.Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation);K.module===e.ModuleKind.ES2015||K.module===e.ModuleKind.ESNext||K.module===e.ModuleKind.System||K.noEmit||8388608&t.parent.parent.flags||!e.hasModifier(t.parent.parent,1)||function t(r){if(75===r.kind){if("__esModule"===e.idText(r))return vx(r,e.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules)}else for(var n=r.elements,i=0,a=n;i=1&&qh(t.declarations[0])}function $h(e,t){return Zh(t?15:13,lm(e),Se,e)}function Zh(e,t,r,n){return Qi(t)?t:ev(e,t,r,n,!0)||he}function ev(t,r,n,i,a){var o=0!=(2&t);if(r!==Be){var s=J>=2,c=!s&&K.downlevelIteration;if(s||c||o){var u=iv(r,t,s?i:void 0);if(a&&u){var l=8&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0:32&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0:64&t?e.Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0:16&t?e.Diagnostics.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0:void 0;l&&Ol(n,u.nextType,i,l)}if(u||s)return u&&u.yieldType}var _=r,d=!1,p=!1;if(4&t){if(1048576&_.flags){var f=r.types,m=e.filter(f,(function(e){return!(132&e.flags)}));m!==f&&(_=Qc(m,2))}else 132&_.flags&&(_=Be);if((p=_!==r)&&(J<1&&i&&(Xr(i,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),d=!0),131072&_.flags))return Ne}if(!b_(_)){if(i&&!d){var g=tv(t,0,r,void 0),y=4&t&&!p?c?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:g?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators,!1]:[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,!0]:c?[e.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator,!0]:g?[e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators,!1]:[e.Diagnostics.Type_0_is_not_an_array_type,!0],h=y[0];Zr(i,y[1]&&!!uh(_),h,Ii(_))}return p?Ne:void 0}var v=Es(_,1);return p&&v?132&v.flags?Ne:Qc([v,Ne],2):v}_v(i,r,o)}function tv(e,t,r,n){if(!Qi(r)){var i=iv(r,e,n);return i&&i[O(t)]}}function rv(e,t,r){if(void 0===e&&(e=Be),void 0===t&&(t=Be),void 0===r&&(r=De),67359327&e.flags&&180227&t.flags&&180227&r.flags){var n=oc([e,t,r]),i=nr.get(n);return i||(i={yieldType:e,returnType:t,nextType:r},nr.set(n,i)),i}return{yieldType:e,returnType:t,nextType:r}}function nv(t){for(var r,n,i,a=0,o=t;an)return!1;for(var l=0;l1)return yx(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);r=!0}else{if(e.Debug.assert(112===o.token),n)return yx(o,e.Diagnostics.implements_clause_already_seen);n=!0}nx(o)}})(t)||$b(t.typeParameters,r)}(t),vh(t),t.name&&(kv(t.name,e.Diagnostics.Class_name_cannot_be_0),jh(t,t.name),Kh(t,t.name),8388608&t.flags||function(t){1===J&&"Object"===t.escapedText&&z!==e.ModuleKind.ES2015&&z!==e.ModuleKind.ESNext&&Xr(t,e.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0,e.ModuleKind[z])}(t.name)),Nv(e.getEffectiveTypeParameterDeclarations(t)),ch(t);var r=ri(t),n=ro(r),i=Do(n),o=wa(r);Fv(r),function(t){for(var r=e.createUnderscoreEscapedMap(),n=e.createUnderscoreEscapedMap(),i=0,a=t.members;i>s;case 49:return a>>>s;case 47:return a<1&&F(t,!!K.preserveConstEnums||!!K.isolatedModules)){var s=function(t){for(var r=0,n=t.declarations;r1)for(var o=0,s=n;o=224&&r<=240&&t.flowNode&&!Fp(t.flowNode)&&$r(!1===K.allowUnreachableCode,t,e.Diagnostics.Unreachable_code_detected);switch(r){case 154:return Uy(t);case 155:return Vy(t);case 158:case 157:return Yy(t);case 169:case 170:case 164:case 165:case 166:return Wy(t);case 160:case 159:return function(t){dx(t)||ax(t.name),xh(t),e.hasModifier(t,128)&&160===t.kind&&t.body&&Xr(t,e.Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,e.declarationNameToString(t.name))}(t);case 161:return Xy(t);case 162:case 163:return Qy(t);case 168:return rh(t);case 167:return function(t){var r=function(e){switch(e.parent.kind){case 201:case 164:case 243:case 200:case 169:case 160:case 159:var t=e.parent;if(e===t.type)return t}}(t);if(r){var n=Ls(r),i=Js(n);if(i){Gv(t.type);var a=t.parameterName;if(0===i.kind||2===i.kind)Hu(a);else if(i.parameterIndex>=0){if(M(n)&&i.parameterIndex===n.parameters.length-1)Xr(a,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter);else if(i.type){Ol(i.type,wa(n.parameters[i.parameterIndex]),t.type,void 0,(function(){return e.chainDiagnosticMessages(void 0,e.Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type)}))}}else if(a){for(var o=!1,s=0,c=r.parameters;s0),n.length>1&&Xr(n[1],e.Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag);var i=bh(t.class.expression),a=e.getClassExtendsHeritageElement(r);if(a){var o=bh(a.expression);o&&i.escapedText!==o.escapedText&&Xr(i,e.Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause,e.idText(t.tagName),e.idText(i),e.idText(o))}}else Xr(r,e.Diagnostics.JSDoc_0_is_not_attached_to_a_class,e.idText(t.tagName))}(t);case 315:case 308:case 309:return function(t){t.typeExpression||Xr(t.name,e.Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags),t.name&&kv(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),Gv(t.typeExpression)}(t);case 314:return function(e){Gv(e.constraint);for(var t=0,r=e.typeParameters;t-1&&n1){var n=e.isEnumConst(t);e.forEach(r.declarations,(function(t){e.isEnumDeclaration(t)&&e.isEnumConst(t)!==n&&Xr(e.getNameOfDeclaration(t),e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)}))}var i=!1;e.forEach(r.declarations,(function(t){if(247!==t.kind)return!1;var r=t;if(!r.members.length)return!1;var n=r.members[0];n.initializer||(i?Xr(n.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):i=!0)}))}}}(t);case 248:return jv(t);case 253:return function(t){if(!Vv(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(!Yb(t)&&e.hasModifiers(t)&&yx(t,e.Diagnostics.An_import_declaration_cannot_have_modifiers),Jv(t))){var r=t.importClause;if(r)if(r.name&&Uv(r),r.namedBindings)if(255===r.namedBindings.kind)Uv(r.namedBindings);else zn(t,t.moduleSpecifier)&&e.forEach(r.namedBindings.elements,Uv)}}(t);case 252:return function(t){if(!Vv(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(Yb(t),e.isInternalModuleImportEqualsDeclaration(t)||Jv(t)))if(Uv(t),e.hasModifier(t,1)&&Ln(t),263!==t.moduleReference.kind){var r=Mn(ri(t));if(r!==ge){if(111551&r.flags){var n=e.getFirstIdentifier(t.moduleReference);1920&Kn(n,112575).flags||Xr(n,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(n))}788968&r.flags&&kv(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else z>=e.ModuleKind.ES2015&&!(8388608&t.flags)&&vx(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}(t);case 259:return function(t){if(!Vv(t,e.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)&&(!Yb(t)&&e.hasModifiers(t)&&yx(t,e.Diagnostics.An_export_declaration_cannot_have_modifiers),!t.moduleSpecifier||Jv(t)))if(t.exportClause){e.forEach(t.exportClause.elements,qv);var r=249===t.parent.kind&&e.isAmbientModule(t.parent.parent),n=!r&&249===t.parent.kind&&!t.moduleSpecifier&&8388608&t.flags;288===t.parent.kind||r||n||Xr(t,e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace)}else{var i=zn(t,t.moduleSpecifier);i&&Hn(i)&&Xr(t.moduleSpecifier,e.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,Pi(i)),z!==e.ModuleKind.System&&z!==e.ModuleKind.ES2015&&z!==e.ModuleKind.ESNext&&Gb(t,65536)}}(t);case 258:return function(t){if(!Vv(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var r=288===t.parent.kind?t.parent:t.parent.parent;if(248!==r.kind||e.isAmbientModule(r)){if(!Yb(t)&&e.hasModifiers(t)&&yx(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),75===t.expression.kind){var n=t.expression,i=Kn(n,67108863,!0,!0,t);if(i){zp(i,n);var a=2097152&i.flags?Mn(i):i;(a===ge||111551&a.flags)&&ky(t.expression)}e.getEmitDeclarations(K)&&Vi(t.expression,!0)}else ky(t.expression);Wv(r),8388608&t.flags&&!e.isEntityNameExpression(t.expression)&&vx(t.expression,e.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context),!t.isExportEquals||8388608&t.flags||(z>=e.ModuleKind.ES2015?vx(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead):z===e.ModuleKind.System&&vx(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))}else t.isExportEquals?Xr(t,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace):Xr(t,e.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module)}}(t);case 223:case 240:return void xx(t);case 262:(function(e){vh(e)})(t)}}(t),l=r}}function Hv(t){e.isInJSFile(t)||vx(t,e.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments)}function Yv(t){var r=dn(e.getSourceFileOfNode(t));if(!(1&r.flags)){r.deferredNodes=r.deferredNodes||e.createMap();var n=""+N(t);r.deferredNodes.set(n,t)}}function Xv(t){var r=l;switch(l=t,x=0,t.kind){case 200:case 201:case 160:case 159:!function(t){e.Debug.assert(160!==t.kind||e.isObjectLiteralMethod(t));var r=e.getFunctionFlags(t),n=Us(t);if(ny(t,n),t.body)if(e.getEffectiveReturnTypeNode(t)||zs(Ls(t)),222===t.body.kind)Gv(t.body);else{var i=zy(t.body),a=oy(n,r);if(a)if(2==(3&r))Ml(_h(i,t.body,e.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member),a,t.body,t.body);else Ml(i,a,t.body,t.body)}}(t);break;case 162:case 163:Qy(t);break;case 213:!function(t){e.forEach(t.members,Gv),Dh(t)}(t);break;case 265:!function(e){rm(e)}(t);break;case 264:!function(e){rm(e.openingElement),zf(e.closingElement.tagName)?Gf(e.closingElement):zy(e.closingElement.tagName),Vf(e)}(t)}l=r}function Qv(t){e.performance.mark("beforeCheck"),function(t){var r=dn(t);if(!(1&r.flags)){if(e.skipTypeChecking(t,K,n))return;!function(t){!!(8388608&t.flags)&&function(t){for(var r=0,n=t.statements;r0?e.concatenate(o,a):a}return e.forEach(n.getSourceFiles(),Qv),jr.getDiagnostics()}(t)}finally{o=void 0}}function tb(){if(!a)throw new Error("Trying to get diagnostics from a type checker that does not produce them.")}function rb(e){switch(e.kind){case 154:case 244:case 245:case 246:case 247:return!0;default:return!1}}function nb(e){for(;152===e.parent.kind;)e=e.parent;return 168===e.parent.kind}function ib(t,r){for(var n;(t=e.getContainingClass(t))&&!(n=r(t)););return n}function ab(e,t){return!!ib(e,(function(e){return e===t}))}function ob(e){return void 0!==function(e){for(;152===e.parent.kind;)e=e.parent;return 252===e.parent.kind?e.parent.moduleReference===e?e.parent:void 0:258===e.parent.kind&&e.parent.expression===e?e.parent:void 0}(e)}function sb(t){if(e.isDeclarationName(t))return ri(t.parent);if(e.isInJSFile(t)&&193===t.parent.kind&&t.parent===t.parent.parent.left){var r=function(t){switch(e.getAssignmentDeclarationKind(t.parent.parent)){case 1:case 3:return ri(t.parent);case 4:case 2:case 5:return ri(t.parent.parent)}}(t);if(r)return r}if(258===t.parent.kind&&e.isEntityNameExpression(t)){var n=Kn(t,2998271,!0);if(n&&n!==ge)return n}else if(!e.isPropertyAccessExpression(t)&&ob(t)){var i=e.getAncestor(t,252);return e.Debug.assert(void 0!==i),Bn(t,!0)}if(!e.isPropertyAccessExpression(t)){var a=function(t){for(var r=t.parent;e.isQualifiedName(r);)t=r,r=r.parent;if(r&&187===r.kind&&r.qualifier===t)return r}(t);if(a){Yu(a);var o=dn(t).resolvedSymbol;return o===ge?void 0:o}}for(;e.isRightSideOfQualifiedNameOrPropertyAccess(t);)t=t.parent;if(function(e){for(;193===e.parent.kind;)e=e.parent;return 215===e.parent.kind}(t)){var s=0;215===t.parent.kind?(s=788968,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(s|=111551)):s=1920,s|=2097152;var c=e.isEntityNameExpression(t)?Kn(t,s):void 0;if(c)return c}if(310===t.parent.kind)return e.getParameterSymbolFromJSDoc(t.parent);if(154===t.parent.kind&&314===t.parent.parent.kind){e.Debug.assert(!e.isInJSFile(t));var u=e.getTypeParameterFromJsDoc(t.parent);return u&&u.symbol}if(e.isExpressionNode(t)){if(e.nodeIsMissing(t))return;if(75===t.kind){if(e.isJSXTagName(t)&&zf(t)){var l=Gf(t.parent);return l===ge?void 0:l}return Kn(t,111551,!1,!0)}if(193===t.kind||152===t.kind){var _=dn(t);return _.resolvedSymbol?_.resolvedSymbol:(193===t.kind?hm(t):vm(t),_.resolvedSymbol)}}else if(nb(t)){return Kn(t,s=168===t.parent.kind?788968:1920,!1,!0)}return 167===t.parent.kind?Kn(t,1):void 0}function cb(t){if(288===t.kind)return e.isExternalModule(t)?ti(t.symbol):void 0;var r=t.parent,n=r.parent;if(!(16777216&t.flags)){if(w(t)){var i=ri(r);return e.isImportOrExportSpecifier(t.parent)&&t.parent.propertyName===t?Bf(i):i}if(e.isLiteralComputedPropertyDeclarationName(t))return ri(r.parent);if(75===t.kind){if(ob(t))return sb(t);if(190===r.kind&&188===n.kind&&t===r.propertyName){var a=vs(ub(n),t.escapedText);if(a)return a}}switch(t.kind){case 75:case 193:case 152:return sb(t);case 103:var o=e.getThisContainer(t,!1);if(e.isFunctionLike(o)){var s=Ls(o);if(s.thisParameter)return s.thisParameter}if(e.isInExpressionContext(t))return zy(t).symbol;case 182:return Hu(t).symbol;case 101:return zy(t).symbol;case 128:var c=t.parent;return c&&161===c.kind?c.parent.symbol:void 0;case 10:case 14:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(253===t.parent.kind||259===t.parent.kind)&&t.parent.moduleSpecifier===t||e.isInJSFile(t)&&e.isRequireCall(t.parent,!1)||e.isImportCall(t.parent)||e.isLiteralTypeNode(t.parent)&&e.isLiteralImportTypeNode(t.parent.parent)&&t.parent.parent.argument===t.parent)return zn(t,t);if(e.isCallExpression(r)&&e.isBindableObjectDefinePropertyCall(r)&&r.arguments[1]===t)return ri(r);case 8:var u=e.isElementAccessExpression(r)?r.argumentExpression===t?Ky(r.expression):void 0:e.isLiteralTypeNode(r)&&e.isIndexedAccessTypeNode(n)?Yu(n.objectType):void 0;return u&&vs(u,e.escapeLeadingUnderscores(t.text));case 83:case 93:case 38:case 79:return ri(t.parent);case 187:return e.isLiteralImportTypeNode(t)?cb(t.argument.literal):void 0;case 88:return e.isExportAssignment(t.parent)?e.Debug.assertDefined(t.parent.symbol):void 0;default:return}}}function ub(t){if(16777216&t.flags)return xe;var r,n=e.tryGetClassImplementingOrExtendingExpressionWithTypeArguments(t),i=n&&Ha(ri(n.class));if(e.isPartOfTypeNode(t)){var a=Yu(t);return i?Do(a,i.thisType):a}if(e.isExpressionNode(t))return _b(t);if(i&&!n.isImplements){var o=e.firstOrUndefined(Wa(i));return o?Do(o,i.thisType):xe}if(rb(t))return ro(r=ri(t));if(function(e){return 75===e.kind&&rb(e.parent)&&e.parent.name===e}(t))return(r=cb(t))?ro(r):xe;if(e.isDeclaration(t))return wa(r=ri(t));if(w(t))return(r=cb(t))?wa(r):xe;if(e.isBindingPattern(t))return ua(t.parent,!0)||xe;if(ob(t)&&(r=cb(t))){var s=ro(r);return s!==xe?s:wa(r)}return xe}function lb(t){if(e.Debug.assert(192===t.kind||191===t.kind),231===t.parent.kind)return xy(t,$h(t.parent.expression,t.parent.awaitModifier)||xe);if(208===t.parent.kind)return xy(t,Ky(t.parent.right)||xe);if(279===t.parent.kind){var r=e.cast(t.parent.parent,e.isObjectLiteralExpression);return vy(r,lb(r)||xe,e.indexOfNode(r.properties,t.parent))}var n=e.cast(t.parent,e.isArrayLiteralExpression),i=lb(n)||xe,a=Zh(65,i,Se,t.parent)||xe;return by(n,i,n.elements.indexOf(t),a)}function _b(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),Vu(Ky(t))}function db(t){var r=ri(t.parent);return e.hasModifier(t,32)?wa(r):ro(r)}function pb(t){var r=t.name;switch(r.kind){case 75:return Wu(e.idText(r));case 8:case 10:return Wu(r.text);case 153:var n=Lf(r);return my(n,12288)?n:Ne;default:return e.Debug.fail("Unsupported property name.")}}function fb(t){t=ms(t);var r=e.createSymbolTable(ts(t)),n=xs(t,0).length?lt:xs(t,1).length?_t:void 0;return n&&e.forEach(ts(n),(function(e){r.has(e.escapedName)||r.set(e.escapedName,e)})),gi(r)}function mb(t){return e.typeHasCallOrConstructSignatures(t,oe)}function gb(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r)return!(193===r.parent.kind&&r.parent.name===r)&&zb(r)===ie}return!1}function yb(t){var r=zn(t.parent,t);if(!r||e.isShorthandAmbientModuleSymbol(r))return!0;var n=Hn(r),i=_n(r=Wn(r));return void 0===i.exportsSomeValue&&(i.exportsSomeValue=n?!!(111551&r.flags):e.forEachEntry($n(r),(function(e){return(e=On(e))&&!!(111551&e.flags)}))),i.exportsSomeValue}function hb(t,r){var n=e.getParseTreeNode(t,e.isIdentifier);if(n){var i=zb(n,function(t){return e.isModuleOrEnumDeclaration(t.parent)&&t===t.parent.name}(n));if(i){if(1048576&i.flags){var a=ti(i.exportSymbol);if(!r&&944&a.flags&&!(3&a.flags))return;i=a}var o=ni(i);if(o){if(512&o.flags&&288===o.valueDeclaration.kind){var s=o.valueDeclaration;return s!==e.getSourceFileOfNode(n)?void 0:s}return e.findAncestor(n.parent,(function(t){return e.isModuleOrEnumDeclaration(t)&&ri(t)===o}))}}}}function vb(t){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=zb(r);if(In(n,111551))return En(n)}}function bb(t){if(418&t.flags&&!e.isSourceFile(t.valueDeclaration)){var r=_n(t);if(void 0===r.isDeclarationWithCollidingName){var n=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(n)||function(t){return e.isBindingElement(t.valueDeclaration)&&278===e.walkUpBindingElementsAndPatterns(t.valueDeclaration).parent.kind}(t)){var i=dn(t.valueDeclaration);if(gn(n.parent,t.escapedName,111551,void 0,void 0,!1))r.isDeclarationWithCollidingName=!0;else if(262144&i.flags){var a=524288&i.flags,o=e.isIterationStatement(n,!1),s=222===n.kind&&e.isIterationStatement(n.parent,!1);r.isDeclarationWithCollidingName=!(e.isBlockScopedContainerTopLevel(n)||a&&(o||s))}else r.isDeclarationWithCollidingName=!1}}return r.isDeclarationWithCollidingName}return!1}function xb(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=zb(r);if(n&&bb(n))return n.valueDeclaration}}}function Db(t){var r=e.getParseTreeNode(t,e.isDeclaration);if(r){var n=ri(r);if(n)return bb(n)}return!1}function Sb(t){switch(t.kind){case 252:case 254:case 255:case 257:case 261:return Eb(ri(t)||ge);case 259:var r=t.exportClause;return!!r&&e.some(r.elements,Sb);case 258:return!t.expression||75!==t.expression.kind||Eb(ri(t)||ge)}return!1}function Tb(t){var r=e.getParseTreeNode(t,e.isImportEqualsDeclaration);return!(void 0===r||288!==r.parent.kind||!e.isInternalModuleImportEqualsDeclaration(r))&&(Eb(ri(r))&&r.moduleReference&&!e.nodeIsMissing(r.moduleReference))}function Eb(e){var t=Mn(e);return t===ge||!!(111551&t.flags)&&(K.preserveConstEnums||!Cb(t))}function Cb(e){return hy(e)||!!e.constEnumOnlyModule}function kb(t){if(e.nodeIsPresent(t.body)){if(e.isGetAccessor(t)||e.isSetAccessor(t))return!1;var r=js(ri(t));return r.length>1||1===r.length&&r[0].declaration!==t}return!1}function Nb(t){return!(!V||Ps(t)||e.isJSDocParameterTag(t)||!t.initializer||e.hasModifier(t,92))}function Ab(t){return V&&Ps(t)&&!t.initializer&&e.hasModifier(t,92)}function Fb(t){var r=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!r)return!1;var n=ri(r);return!!(n&&16&n.flags)&&!!e.forEachEntry(Qn(n),(function(t){return 111551&t.flags&&t.valueDeclaration&&e.isPropertyAccessExpression(t.valueDeclaration)}))}function Pb(t){var r=e.getParseTreeNode(t,e.isFunctionDeclaration);if(!r)return e.emptyArray;var n=ri(r);return n&&ts(wa(n))||e.emptyArray}function wb(e){return dn(e).flags||0}function Ib(e){return Rv(e.parent),dn(e).enumMemberValue}function Ob(e){switch(e.kind){case 282:case 193:case 194:return!0}return!1}function Mb(t){if(282===t.kind)return Ib(t);var r=dn(t).resolvedSymbol;if(r&&8&r.flags){var n=r.valueDeclaration;if(e.isEnumConst(n.parent))return Ib(n)}}function Lb(e){return!!(524288&e.flags)&&xs(e,0).length>0}function Rb(t,r){var n=e.getParseTreeNode(t,e.isEntityName);if(!n)return e.TypeReferenceSerializationKind.Unknown;if(r&&!(r=e.getParseTreeNode(r)))return e.TypeReferenceSerializationKind.Unknown;var i=Kn(n,111551,!0,!1,r),a=Kn(n,788968,!0,!1,r);if(i&&i===a){var o=Oc(!1);if(o&&i===o)return e.TypeReferenceSerializationKind.Promise;var s=wa(i);if(s&&Ja(s))return e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue}if(!a)return e.TypeReferenceSerializationKind.Unknown;var c=ro(a);return c===xe?e.TypeReferenceSerializationKind.Unknown:3&c.flags?e.TypeReferenceSerializationKind.ObjectType:my(c,245760)?e.TypeReferenceSerializationKind.VoidNullableOrNeverType:my(c,528)?e.TypeReferenceSerializationKind.BooleanType:my(c,296)?e.TypeReferenceSerializationKind.NumberLikeType:my(c,2112)?e.TypeReferenceSerializationKind.BigIntLikeType:my(c,132)?e.TypeReferenceSerializationKind.StringLikeType:w_(c)?e.TypeReferenceSerializationKind.ArrayLikeType:my(c,12288)?e.TypeReferenceSerializationKind.ESSymbolType:Lb(c)?e.TypeReferenceSerializationKind.TypeWithCallSignature:y_(c)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function Bb(t,r,n,i,a){var o=e.getParseTreeNode(t,e.isVariableLikeOrAccessor);if(!o)return e.createToken(124);var s=ri(o),c=!s||133120&s.flags?xe:N_(wa(s));return 8192&c.flags&&c.symbol===s&&(n|=1048576),a&&(c=z_(c)),Z.typeToTypeNode(c,r,1024|n,i)}function jb(t,r,n,i){var a=e.getParseTreeNode(t,e.isFunctionLike);if(!a)return e.createToken(124);var o=Ls(a);return Z.typeToTypeNode(zs(o),r,1024|n,i)}function Kb(t,r,n,i){var a=e.getParseTreeNode(t,e.isExpression);if(!a)return e.createToken(124);var o=rd(_b(a));return Z.typeToTypeNode(o,r,1024|n,i)}function Jb(t){return ee.has(e.escapeLeadingUnderscores(t))}function zb(t,r){var n=dn(t).resolvedSymbol;if(n)return n;var i=t;if(r){var a=t.parent;e.isDeclaration(a)&&t===a.name&&(i=Yi(a))}return gn(i,t.escapedText,3257279,void 0,void 0,!0)}function Ub(t){if(!e.isGeneratedIdentifier(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r){var n=zb(r);if(n)return si(n).valueDeclaration}}}function Vb(t){return!!(e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t))&&qu(wa(ri(t)))}function qb(t,r){return function(t,r,n){return(1024&t.flags?Z.symbolToExpression(t.symbol,111551,r,void 0,n):t===Ie?e.createTrue():t===Pe&&e.createFalse())||e.createLiteral(t.value)}(wa(ri(t)),t,r)}function Wb(t){var r=248===t.kind?e.tryCast(t.name,e.isStringLiteral):e.getExternalModuleName(t),n=Un(r,r,void 0);if(n)return e.getDeclarationOfKind(n,288)}function Gb(t,r){if((s&r)!==r&&K.importHelpers){var n=e.getSourceFileOfNode(t);if(e.isEffectiveExternalModule(n,K)&&!(8388608&t.flags)){var i=function(t,r){u||(u=Vn(t,e.externalHelpersModuleNameText,e.Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found,r)||ge);return u}(n,t);if(i!==ge)for(var a=r&~s,o=1;o<=131072;o<<=1)if(a&o){var c=Hb(o);fn(i.exports,e.escapeLeadingUnderscores(c),111551)||Xr(t,e.Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0,e.externalHelpersModuleNameText,c)}s|=r}}}function Hb(t){switch(t){case 1:return"__extends";case 2:return"__assign";case 4:return"__rest";case 8:return"__decorate";case 16:return"__metadata";case 32:return"__param";case 64:return"__awaiter";case 128:return"__generator";case 256:return"__values";case 512:return"__read";case 1024:return"__spread";case 2048:return"__spreadArrays";case 4096:return"__await";case 8192:return"__asyncGenerator";case 16384:return"__asyncDelegator";case 32768:return"__asyncValues";case 65536:return"__exportStar";case 131072:return"__makeTemplateObject";default:return e.Debug.fail("Unrecognized helper")}}function Yb(t){return function(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t,t.parent,t.parent.parent))return 160!==t.kind||e.nodeIsPresent(t.body)?yx(t,e.Diagnostics.Decorators_are_not_valid_here):yx(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(162===t.kind||163===t.kind){var r=e.getAllAccessorDeclarations(t.parent.members,t);if(r.firstAccessor.decorators&&t===r.secondAccessor)return yx(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}(t)||function(t){var r,n,i,a,o=function(t){return!!t.modifiers&&(function(t){switch(t.kind){case 162:case 163:case 161:case 158:case 157:case 160:case 159:case 166:case 248:case 253:case 252:case 259:case 258:case 200:case 201:case 155:return!1;default:if(249===t.parent.kind||288===t.parent.kind)return!1;switch(t.kind){case 243:return Xb(t,125);case 244:return Xb(t,121);case 245:case 224:case 246:return!0;case 247:return Xb(t,80);default:return e.Debug.fail(),!1}}}(t)?yx(t,e.Diagnostics.Modifiers_cannot_appear_here):void 0)}(t);if(void 0!==o)return o;for(var s=0,c=0,u=t.modifiers;c1||e.modifiers[0].kind!==t}function Qb(t,r){return void 0===r&&(r=e.Diagnostics.Trailing_comma_not_allowed),!(!t||!t.hasTrailingComma)&&hx(t[0],t.end-",".length,",".length,r)}function $b(t,r){if(t&&0===t.length){var n=t.pos-"<".length;return hx(r,n,e.skipTrivia(r.text,t.end)+">".length-n,e.Diagnostics.Type_parameter_list_cannot_be_empty)}return!1}function Zb(r){if(J>=3){var n=r.body&&e.isBlock(r.body)&&e.findUseStrictPrologue(r.body.statements);if(n){var i=(o=r.parameters,e.filter(o,(function(t){return!!t.initializer||e.isBindingPattern(t.name)||e.isRestParameter(t)})));if(e.length(i)){e.forEach(i,(function(t){e.addRelatedInfo(Xr(t,e.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive),e.createDiagnosticForNode(n,e.Diagnostics.use_strict_directive_used_here))}));var a=i.map((function(t,r){return 0===r?e.createDiagnosticForNode(t,e.Diagnostics.Non_simple_parameter_declared_here):e.createDiagnosticForNode(t,e.Diagnostics.and_here)}));return e.addRelatedInfo.apply(void 0,t([Xr(n,e.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)],a)),!0}}}var o;return!1}function ex(t){var r=e.getSourceFileOfNode(t);return Yb(t)||$b(t.typeParameters,r)||function(t){for(var r=!1,n=t.length,i=0;i".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}return!1}(t,r)}function rx(t){return function(t){if(t)for(var r=0,n=t;r1){r=230===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return yx(a.declarations[1],r)}var s=o[0];if(s.initializer){var r=230===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return vx(s.name,r)}if(s.type)return vx(s,r=230===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation)}}return!1}function lx(t){if(t.parameters.length===(162===t.kind?1:2))return e.getThisParameter(t)}function _x(t,r){if(function(t){return e.isDynamicName(t)&&!po(t)}(t))return vx(t,r)}function dx(t){if(ex(t))return!0;if(160===t.kind){if(192===t.parent.kind){if(t.modifiers&&(1!==t.modifiers.length||125!==e.first(t.modifiers).kind))return yx(t,e.Diagnostics.Modifiers_cannot_appear_here);if(sx(t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional))return!0;if(cx(t.exclamationToken,e.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context))return!0;if(void 0===t.body)return hx(t,t.end-1,";".length,e.Diagnostics._0_expected,"{")}if(ox(t))return!0}if(e.isClassLike(t.parent)){if(8388608&t.flags)return _x(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(160===t.kind&&!t.body)return _x(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}else{if(245===t.parent.kind)return _x(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);if(172===t.parent.kind)return _x(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)}}function px(t){return e.isStringOrNumericLiteralLike(t)||206===t.kind&&40===t.operator&&8===t.operand.kind}function fx(t){var r,n=t.initializer;if(n){var i=!(px(n)||function(t){if((e.isPropertyAccessExpression(t)||e.isElementAccessExpression(t)&&px(t.argumentExpression))&&e.isEntityNameExpression(t.expression))return!!(1024&ky(t).flags)}(n)||105===n.kind||90===n.kind||(r=n,9===r.kind||206===r.kind&&40===r.operator&&9===r.operand.kind)),a=e.isDeclarationReadonly(t)||e.isVariableDeclaration(t)&&e.isVarConst(t);if(!a||t.type)return vx(n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts);if(i)return vx(n,e.Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference);if(!a||i)return vx(n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}}function mx(t){var r=t.declarations;return!!Qb(t.declarations)||!t.declarations.length&&hx(t,r.pos,r.end-r.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty)}function gx(e){return e.parseDiagnostics.length>0}function yx(t,r,n,i,a){var o=e.getSourceFileOfNode(t);if(!gx(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return jr.add(e.createFileDiagnostic(o,s.start,s.length,r,n,i,a)),!0}return!1}function hx(t,r,n,i,a,o,s){var c=e.getSourceFileOfNode(t);return!gx(c)&&(jr.add(e.createFileDiagnostic(c,r,n,i,a,o,s)),!0)}function vx(t,r,n,i,a){return!gx(e.getSourceFileOfNode(t))&&(jr.add(e.createDiagnosticForNode(t,r,n,i,a)),!0)}function bx(t){return 245!==t.kind&&246!==t.kind&&253!==t.kind&&252!==t.kind&&259!==t.kind&&258!==t.kind&&251!==t.kind&&!e.hasModifier(t,515)&&yx(t,e.Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier)}function xx(t){if(8388608&t.flags){if(!dn(t).hasReportedStatementInAmbientContext&&(e.isFunctionLike(t.parent)||e.isAccessor(t.parent)))return dn(t).hasReportedStatementInAmbientContext=yx(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(222===t.parent.kind||249===t.parent.kind||288===t.parent.kind){var r=dn(t.parent);if(!r.hasReportedStatementInAmbientContext)return r.hasReportedStatementInAmbientContext=yx(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}return!1}function Dx(t){if(32&t.numericLiteralFlags){var r=void 0;if(J>=1?r=e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0:e.isChildOfNodeWithKind(t,186)?r=e.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0:e.isChildOfNodeWithKind(t,282)&&(r=e.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0),r){var n=e.isPrefixUnaryExpression(t.parent)&&40===t.parent.operator,i=(n?"-":"")+"0o"+t.text;return vx(n?t.parent:t,r,i)}}return function(t){if(16&t.numericLiteralFlags||t.text.length<=15||-1!==t.text.indexOf("."))return;var r=+e.getTextOfNode(t);if(r<=Math.pow(2,53)-1&&r+1>r)return;Qr(!1,e.createDiagnosticForNode(t,e.Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers))}(t),!1}},function(e){e.JSX="JSX",e.IntrinsicElements="IntrinsicElements",e.ElementClass="ElementClass",e.ElementAttributesPropertyNameContainer="ElementAttributesProperty",e.ElementChildrenAttributeNameContainer="ElementChildrenAttribute",e.Element="Element",e.IntrinsicAttributes="IntrinsicAttributes",e.IntrinsicClassAttributes="IntrinsicClassAttributes",e.LibraryManagedAttributes="LibraryManagedAttributes"}(C||(C={})),e.signatureHasRestParameter=M,e.signatureHasLiteralTypes=L,e.signatureIsOptionalCall=R}(s||(s={})),function(e){function t(t){var r=e.createNode(t,-1,-1);return r.flags|=8,r}function r(t,r){return t!==r&&(dr(t,r),or(t,r),e.aggregateTransformFlags(t)),t}function n(t,r){if(t&&t!==e.emptyArray){if(e.isNodeArray(t))return t}else t=[];var n=t;return n.pos=-1,n.end=-1,n.hasTrailingComma=r,n}function i(e){if(void 0===e)return e;var r=t(e.kind);for(var n in r.flags|=e.flags,dr(r,e),e)!r.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(r[n]=e[n]);return r}function a(t,r){if("number"==typeof t)return o(t+"");if("object"===f(t)&&"base10Value"in t)return s(e.pseudoBigIntToString(t)+"n");if("boolean"==typeof t)return t?m():g();if(e.isString(t)){var n=c(t);return r&&(n.singleQuote=!0),n}return function(t){var r=c(e.getTextOfIdentifierOrLiteral(t));return r.textSourceNode=t,r}(t)}function o(e,r){void 0===r&&(r=0);var n=t(8);return n.text=e,n.numericLiteralFlags=r,n}function s(e){var r=t(9);return r.text=e,r}function c(e){var r=t(10);return r.text=e,r}function u(r,i){var a=t(75);return a.escapedText=e.escapeLeadingUnderscores(r),a.originalKeywordKind=r?e.stringToToken(r):0,a.autoGenerateFlags=0,a.autoGenerateId=0,i&&(a.typeArguments=n(i)),a}e.updateNode=r,e.createNodeArray=n,e.getSynthesizedClone=i,e.createLiteral=a,e.createNumericLiteral=o,e.createBigIntLiteral=s,e.createStringLiteral=c,e.createRegularExpressionLiteral=function(e){var r=t(13);return r.text=e,r},e.createIdentifier=u,e.updateIdentifier=function(t,n){return t.typeArguments!==n?r(u(e.idText(t),n),t):t};var l,_=0;function d(e){var t=u(e);return t.autoGenerateFlags=19,t.autoGenerateId=_,_++,t}function p(e){return t(e)}function m(){return t(105)}function g(){return t(90)}function y(e){return p(e)}function h(e,r){var n=t(152);return n.left=e,n.right=tr(r),n}function v(r){var n=t(153);return n.expression=function(t){return e.isCommaSequence(t)?ye(t):t}(r),n}function b(e,r,n){var i=t(154);return i.name=tr(e),i.constraint=r,i.default=n,i}function x(r,n,i,a,o,s,c){var u=t(155);return u.decorators=nr(r),u.modifiers=nr(n),u.dotDotDotToken=i,u.name=tr(a),u.questionToken=o,u.type=s,u.initializer=c?e.parenthesizeExpressionForList(c):void 0,u}function D(r){var n=t(156);return n.expression=e.parenthesizeForAccess(r),n}function S(e,r,n,i,a){var o=t(157);return o.modifiers=nr(e),o.name=tr(r),o.questionToken=n,o.type=i,o.initializer=a,o}function T(e,r,n,i,a,o){var s=t(158);return s.decorators=nr(e),s.modifiers=nr(r),s.name=tr(n),s.questionToken=void 0!==i&&57===i.kind?i:void 0,s.exclamationToken=void 0!==i&&53===i.kind?i:void 0,s.type=a,s.initializer=o,s}function E(e,t,r,n,i){var a=I(159,e,t,r);return a.name=tr(n),a.questionToken=i,a}function C(e,r,i,a,o,s,c,u,l){var _=t(160);return _.decorators=nr(e),_.modifiers=nr(r),_.asteriskToken=i,_.name=tr(a),_.questionToken=o,_.typeParameters=nr(s),_.parameters=n(c),_.type=u,_.body=l,_}function k(e,t,r){return function(e,t,r){return _e(ae(e,tr(t)),void 0,r)}(u(e),t,r)}function N(e,t,r){return!!r&&(e.push(Ut(t,r)),!0)}function A(e,r,i,a){var o=t(161);return o.decorators=nr(e),o.modifiers=nr(r),o.typeParameters=void 0,o.parameters=n(i),o.type=void 0,o.body=a,o}function F(e,r,i,a,o,s){var c=t(162);return c.decorators=nr(e),c.modifiers=nr(r),c.name=tr(i),c.typeParameters=void 0,c.parameters=n(a),c.type=o,c.body=s,c}function P(e,r,i,a,o){var s=t(163);return s.decorators=nr(e),s.modifiers=nr(r),s.name=tr(i),s.typeParameters=void 0,s.parameters=n(a),s.body=o,s}function w(e,r,i,a){var o=t(166);return o.decorators=nr(e),o.modifiers=nr(r),o.parameters=n(i),o.type=a,o}function I(e,r,n,i,a){var o=t(e);return o.typeParameters=nr(r),o.parameters=nr(n),o.type=i,o.typeArguments=nr(a),o}function O(e,t,n,i){return e.typeParameters!==t||e.parameters!==n||e.type!==i?r(I(e.kind,t,n,i),e):e}function M(e,r,n){var i=t(167);return i.assertsModifier=e,i.parameterName=tr(r),i.type=n,i}function L(e,t,n,i){return e.assertsModifier!==t||e.parameterName!==n||e.type!==i?r(M(t,n,i),e):e}function R(r,n){var i=t(168);return i.typeName=tr(r),i.typeArguments=n&&e.parenthesizeTypeParameters(n),i}function B(e){var r=t(171);return r.exprName=e,r}function j(e){var r=t(172);return r.members=n(e),r}function K(r){var n=t(173);return n.elementType=e.parenthesizeArrayTypeMember(r),n}function J(e){var r=t(174);return r.elementTypes=n(e),r}function z(r){var n=t(175);return n.type=e.parenthesizeArrayTypeMember(r),n}function U(e){var r=t(176);return r.type=e,r}function V(r,n){var i=t(r);return i.types=e.parenthesizeElementTypeMembers(n),i}function q(e,t){return e.types!==t?r(V(e.kind,t),e):e}function W(r,n,i,a){var o=t(179);return o.checkType=e.parenthesizeConditionalTypeMember(r),o.extendsType=e.parenthesizeConditionalTypeMember(n),o.trueType=i,o.falseType=a,o}function G(e){var r=t(180);return r.typeParameter=e,r}function H(r,n,i,a){var o=t(187);return o.argument=r,o.qualifier=n,o.typeArguments=e.parenthesizeTypeParameters(i),o.isTypeOf=a,o}function Y(e){var r=t(181);return r.type=e,r}function X(r,n){var i=t(183);return i.operator="number"==typeof r?r:133,i.type=e.parenthesizeElementTypeMember("number"==typeof r?n:r),i}function Q(r,n){var i=t(184);return i.objectType=e.parenthesizeElementTypeMember(r),i.indexType=n,i}function $(e,r,n,i){var a=t(185);return a.readonlyToken=e,a.typeParameter=r,a.questionToken=n,a.type=i,a}function Z(e){var r=t(186);return r.literal=e,r}function ee(e){var r=t(188);return r.elements=n(e),r}function te(e){var r=t(189);return r.elements=n(e),r}function re(e,r,n,i){var a=t(190);return a.dotDotDotToken=e,a.propertyName=tr(r),a.name=tr(n),a.initializer=i,a}function ne(r,i){var a=t(191);return a.elements=e.parenthesizeListElements(n(r)),i&&(a.multiLine=!0),a}function ie(e,r){var i=t(192);return i.properties=n(e),r&&(i.multiLine=!0),i}function ae(r,n){var i=t(193);return i.expression=e.parenthesizeForAccess(r),i.name=tr(n),sr(i,131072),i}function oe(r,n,i){var a=t(193);return a.flags|=32,a.expression=e.parenthesizeForAccess(r),a.questionDotToken=n,a.name=tr(i),sr(a,131072),a}function se(t,n,i,a){return e.Debug.assert(!!(32&t.flags),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),t.expression!==n||t.questionDotToken!==i||t.name!==a?r(sr(oe(n,i,a),e.getEmitFlags(t)),t):t}function ce(r,n){var i=t(194);return i.expression=e.parenthesizeForAccess(r),i.argumentExpression=rr(n),i}function ue(r,n,i){var a=t(194);return a.flags|=32,a.expression=e.parenthesizeForAccess(r),a.questionDotToken=n,a.argumentExpression=rr(i),a}function le(t,n,i,a){return e.Debug.assert(!!(32&t.flags),"Cannot update an ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),t.expression!==n||t.questionDotToken!==i||t.argumentExpression!==a?r(ue(n,i,a),t):t}function _e(r,i,a){var o=t(195);return o.expression=e.parenthesizeForAccess(r),o.typeArguments=nr(i),o.arguments=e.parenthesizeListElements(n(a)),o}function de(r,i,a,o){var s=t(195);return s.flags|=32,s.expression=e.parenthesizeForAccess(r),s.questionDotToken=i,s.typeArguments=nr(a),s.arguments=e.parenthesizeListElements(n(o)),s}function pe(t,n,i,a,o){return e.Debug.assert(!!(32&t.flags),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),t.expression!==n||t.questionDotToken!==i||t.typeArguments!==a||t.arguments!==o?r(de(n,i,a,o),t):t}function fe(r,i,a){var o=t(196);return o.expression=e.parenthesizeForNew(r),o.typeArguments=nr(i),o.arguments=a?e.parenthesizeListElements(n(a)):void 0,o}function me(r,n,i){var a=t(197);return a.tag=e.parenthesizeForAccess(r),i?(a.typeArguments=nr(n),a.template=i):(a.typeArguments=void 0,a.template=n),a}function ge(r,n){var i=t(198);return i.type=r,i.expression=e.parenthesizePrefixOperand(n),i}function ye(e){var r=t(199);return r.expression=e,r}function he(e,r,i,a,o,s,c){var u=t(200);return u.modifiers=nr(e),u.asteriskToken=r,u.name=tr(i),u.typeParameters=nr(a),u.parameters=n(o),u.type=s,u.body=c,u}function ve(r,i,a,o,s,c){var u=t(201);return u.modifiers=nr(r),u.typeParameters=nr(i),u.parameters=n(a),u.type=o,u.equalsGreaterThanToken=s||p(38),u.body=e.parenthesizeConciseBody(c),u}function be(r){var n=t(202);return n.expression=e.parenthesizePrefixOperand(r),n}function xe(r){var n=t(203);return n.expression=e.parenthesizePrefixOperand(r),n}function De(r){var n=t(204);return n.expression=e.parenthesizePrefixOperand(r),n}function Se(r){var n=t(205);return n.expression=e.parenthesizePrefixOperand(r),n}function Te(r,n){var i=t(206);return i.operator=r,i.operand=e.parenthesizePrefixOperand(n),i}function Ee(r,n){var i=t(207);return i.operand=e.parenthesizePostfixOperand(r),i.operator=n,i}function Ce(r,n,i){var a,o=t(208),s="number"==typeof(a=n)?p(a):a,c=s.kind;return o.left=e.parenthesizeBinaryOperand(c,r,!0,void 0),o.operatorToken=s,o.right=e.parenthesizeBinaryOperand(c,i,!1,o.left),o}function ke(r,n,i,a,o){var s=t(209);return s.condition=e.parenthesizeForConditionalHead(r),s.questionToken=o?n:p(57),s.whenTrue=e.parenthesizeSubexpressionOfConditionalExpression(o?i:n),s.colonToken=o?a:p(58),s.whenFalse=e.parenthesizeSubexpressionOfConditionalExpression(o||i),s}function Ne(e,r){var i=t(210);return i.head=e,i.templateSpans=n(r),i}e.createTempVariable=function(e,t){var r=u("");return r.autoGenerateFlags=1,r.autoGenerateId=_,_++,e&&e(r),t&&(r.autoGenerateFlags|=8),r},e.createLoopVariable=function(){var e=u("");return e.autoGenerateFlags=2,e.autoGenerateId=_,_++,e},e.createUniqueName=function(e){var t=u(e);return t.autoGenerateFlags=3,t.autoGenerateId=_,_++,t},e.createOptimisticUniqueName=d,e.createFileLevelUniqueName=function(e){var t=d(e);return t.autoGenerateFlags|=32,t},e.getGeneratedNameForNode=function(t,r){var n=u(t&&e.isIdentifier(t)?e.idText(t):"");return n.autoGenerateFlags=4|r,n.autoGenerateId=_,n.original=t,_++,n},e.createToken=p,e.createSuper=function(){return t(101)},e.createThis=function(){return t(103)},e.createNull=function(){return t(99)},e.createTrue=m,e.createFalse=g,e.createModifier=y,e.createModifiersFromModifierFlags=function(e){var t=[];return 1&e&&t.push(y(88)),2&e&&t.push(y(129)),512&e&&t.push(y(83)),2048&e&&t.push(y(80)),4&e&&t.push(y(118)),8&e&&t.push(y(116)),16&e&&t.push(y(117)),128&e&&t.push(y(121)),32&e&&t.push(y(119)),64&e&&t.push(y(137)),256&e&&t.push(y(125)),t},e.createQualifiedName=h,e.updateQualifiedName=function(e,t,n){return e.left!==t||e.right!==n?r(h(t,n),e):e},e.createComputedPropertyName=v,e.updateComputedPropertyName=function(e,t){return e.expression!==t?r(v(t),e):e},e.createTypeParameterDeclaration=b,e.updateTypeParameterDeclaration=function(e,t,n,i){return e.name!==t||e.constraint!==n||e.default!==i?r(b(t,n,i),e):e},e.createParameter=x,e.updateParameter=function(e,t,n,i,a,o,s,c){return e.decorators!==t||e.modifiers!==n||e.dotDotDotToken!==i||e.name!==a||e.questionToken!==o||e.type!==s||e.initializer!==c?r(x(t,n,i,a,o,s,c),e):e},e.createDecorator=D,e.updateDecorator=function(e,t){return e.expression!==t?r(D(t),e):e},e.createPropertySignature=S,e.updatePropertySignature=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.questionToken!==i||e.type!==a||e.initializer!==o?r(S(t,n,i,a,o),e):e},e.createProperty=T,e.updateProperty=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.questionToken!==(void 0!==a&&57===a.kind?a:void 0)||e.exclamationToken!==(void 0!==a&&53===a.kind?a:void 0)||e.type!==o||e.initializer!==s?r(T(t,n,i,a,o,s),e):e},e.createMethodSignature=E,e.updateMethodSignature=function(e,t,n,i,a,o){return e.typeParameters!==t||e.parameters!==n||e.type!==i||e.name!==a||e.questionToken!==o?r(E(t,n,i,a,o),e):e},e.createMethod=C,e.createObjectDefinePropertyCall=function(e,t,r){return k("Object","defineProperty",[e,rr(t),r])},e.createPropertyDescriptor=function(t,r){var n=[];N(n,"enumerable",rr(t.enumerable)),N(n,"configurable",rr(t.configurable));var i=N(n,"writable",rr(t.writable));i=N(n,"value",t.value)||i;var a=N(n,"get",t.get);return a=N(n,"set",t.set)||a,e.Debug.assert(!(i&&a),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ie(n,!r)},e.updateMethod=function(e,t,n,i,a,o,s,c,u,l){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.questionToken!==o||e.typeParameters!==s||e.parameters!==c||e.type!==u||e.body!==l?r(C(t,n,i,a,o,s,c,u,l),e):e},e.createConstructor=A,e.updateConstructor=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.parameters!==i||e.body!==a?r(A(t,n,i,a),e):e},e.createGetAccessor=F,e.updateGetAccessor=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.type!==o||e.body!==s?r(F(t,n,i,a,o,s),e):e},e.createSetAccessor=P,e.updateSetAccessor=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.parameters!==a||e.body!==o?r(P(t,n,i,a,o),e):e},e.createCallSignature=function(e,t,r){return I(164,e,t,r)},e.updateCallSignature=function(e,t,r,n){return O(e,t,r,n)},e.createConstructSignature=function(e,t,r){return I(165,e,t,r)},e.updateConstructSignature=function(e,t,r,n){return O(e,t,r,n)},e.createIndexSignature=w,e.updateIndexSignature=function(e,t,n,i,a){return e.parameters!==i||e.type!==a||e.decorators!==t||e.modifiers!==n?r(w(t,n,i,a),e):e},e.createSignatureDeclaration=I,e.createKeywordTypeNode=function(e){return t(e)},e.createTypePredicateNode=function(e,t){return M(void 0,e,t)},e.createTypePredicateNodeWithModifier=M,e.updateTypePredicateNode=function(e,t,r){return L(e,e.assertsModifier,t,r)},e.updateTypePredicateNodeWithModifier=L,e.createTypeReferenceNode=R,e.updateTypeReferenceNode=function(e,t,n){return e.typeName!==t||e.typeArguments!==n?r(R(t,n),e):e},e.createFunctionTypeNode=function(e,t,r){return I(169,e,t,r)},e.updateFunctionTypeNode=function(e,t,r,n){return O(e,t,r,n)},e.createConstructorTypeNode=function(e,t,r){return I(170,e,t,r)},e.updateConstructorTypeNode=function(e,t,r,n){return O(e,t,r,n)},e.createTypeQueryNode=B,e.updateTypeQueryNode=function(e,t){return e.exprName!==t?r(B(t),e):e},e.createTypeLiteralNode=j,e.updateTypeLiteralNode=function(e,t){return e.members!==t?r(j(t),e):e},e.createArrayTypeNode=K,e.updateArrayTypeNode=function(e,t){return e.elementType!==t?r(K(t),e):e},e.createTupleTypeNode=J,e.updateTupleTypeNode=function(e,t){return e.elementTypes!==t?r(J(t),e):e},e.createOptionalTypeNode=z,e.updateOptionalTypeNode=function(e,t){return e.type!==t?r(z(t),e):e},e.createRestTypeNode=U,e.updateRestTypeNode=function(e,t){return e.type!==t?r(U(t),e):e},e.createUnionTypeNode=function(e){return V(177,e)},e.updateUnionTypeNode=function(e,t){return q(e,t)},e.createIntersectionTypeNode=function(e){return V(178,e)},e.updateIntersectionTypeNode=function(e,t){return q(e,t)},e.createUnionOrIntersectionTypeNode=V,e.createConditionalTypeNode=W,e.updateConditionalTypeNode=function(e,t,n,i,a){return e.checkType!==t||e.extendsType!==n||e.trueType!==i||e.falseType!==a?r(W(t,n,i,a),e):e},e.createInferTypeNode=G,e.updateInferTypeNode=function(e,t){return e.typeParameter!==t?r(G(t),e):e},e.createImportTypeNode=H,e.updateImportTypeNode=function(e,t,n,i,a){return e.argument!==t||e.qualifier!==n||e.typeArguments!==i||e.isTypeOf!==a?r(H(t,n,i,a),e):e},e.createParenthesizedType=Y,e.updateParenthesizedType=function(e,t){return e.type!==t?r(Y(t),e):e},e.createThisTypeNode=function(){return t(182)},e.createTypeOperatorNode=X,e.updateTypeOperatorNode=function(e,t){return e.type!==t?r(X(e.operator,t),e):e},e.createIndexedAccessTypeNode=Q,e.updateIndexedAccessTypeNode=function(e,t,n){return e.objectType!==t||e.indexType!==n?r(Q(t,n),e):e},e.createMappedTypeNode=$,e.updateMappedTypeNode=function(e,t,n,i,a){return e.readonlyToken!==t||e.typeParameter!==n||e.questionToken!==i||e.type!==a?r($(t,n,i,a),e):e},e.createLiteralTypeNode=Z,e.updateLiteralTypeNode=function(e,t){return e.literal!==t?r(Z(t),e):e},e.createObjectBindingPattern=ee,e.updateObjectBindingPattern=function(e,t){return e.elements!==t?r(ee(t),e):e},e.createArrayBindingPattern=te,e.updateArrayBindingPattern=function(e,t){return e.elements!==t?r(te(t),e):e},e.createBindingElement=re,e.updateBindingElement=function(e,t,n,i,a){return e.propertyName!==n||e.dotDotDotToken!==t||e.name!==i||e.initializer!==a?r(re(t,n,i,a),e):e},e.createArrayLiteral=ne,e.updateArrayLiteral=function(e,t){return e.elements!==t?r(ne(t,e.multiLine),e):e},e.createObjectLiteral=ie,e.updateObjectLiteral=function(e,t){return e.properties!==t?r(ie(t,e.multiLine),e):e},e.createPropertyAccess=ae,e.updatePropertyAccess=function(t,n,i){return e.isOptionalChain(t)?se(t,n,t.questionDotToken,i):t.expression!==n||t.name!==i?r(sr(ae(n,i),e.getEmitFlags(t)),t):t},e.createPropertyAccessChain=oe,e.updatePropertyAccessChain=se,e.createElementAccess=ce,e.updateElementAccess=function(t,n,i){return e.isOptionalChain(t)?le(t,n,t.questionDotToken,i):t.expression!==n||t.argumentExpression!==i?r(ce(n,i),t):t},e.createElementAccessChain=ue,e.updateElementAccessChain=le,e.createCall=_e,e.updateCall=function(t,n,i,a){return e.isOptionalChain(t)?pe(t,n,t.questionDotToken,i,a):t.expression!==n||t.typeArguments!==i||t.arguments!==a?r(_e(n,i,a),t):t},e.createCallChain=de,e.updateCallChain=pe,e.createNew=fe,e.updateNew=function(e,t,n,i){return e.expression!==t||e.typeArguments!==n||e.arguments!==i?r(fe(t,n,i),e):e},e.createTaggedTemplate=me,e.updateTaggedTemplate=function(e,t,n,i){return e.tag!==t||(i?e.typeArguments!==n||e.template!==i:void 0!==e.typeArguments||e.template!==n)?r(me(t,n,i),e):e},e.createTypeAssertion=ge,e.updateTypeAssertion=function(e,t,n){return e.type!==t||e.expression!==n?r(ge(t,n),e):e},e.createParen=ye,e.updateParen=function(e,t){return e.expression!==t?r(ye(t),e):e},e.createFunctionExpression=he,e.updateFunctionExpression=function(e,t,n,i,a,o,s,c){return e.name!==i||e.modifiers!==t||e.asteriskToken!==n||e.typeParameters!==a||e.parameters!==o||e.type!==s||e.body!==c?r(he(t,n,i,a,o,s,c),e):e},e.createArrowFunction=ve,e.updateArrowFunction=function(e,t,n,i,a,o,s){return e.modifiers!==t||e.typeParameters!==n||e.parameters!==i||e.type!==a||e.equalsGreaterThanToken!==o||e.body!==s?r(ve(t,n,i,a,o,s),e):e},e.createDelete=be,e.updateDelete=function(e,t){return e.expression!==t?r(be(t),e):e},e.createTypeOf=xe,e.updateTypeOf=function(e,t){return e.expression!==t?r(xe(t),e):e},e.createVoid=De,e.updateVoid=function(e,t){return e.expression!==t?r(De(t),e):e},e.createAwait=Se,e.updateAwait=function(e,t){return e.expression!==t?r(Se(t),e):e},e.createPrefix=Te,e.updatePrefix=function(e,t){return e.operand!==t?r(Te(e.operator,t),e):e},e.createPostfix=Ee,e.updatePostfix=function(e,t){return e.operand!==t?r(Ee(t,e.operator),e):e},e.createBinary=Ce,e.updateBinary=function(e,t,n,i){return e.left!==t||e.right!==n?r(Ce(t,i||e.operatorToken,n),e):e},e.createConditional=ke,e.updateConditional=function(e,t,n,i,a,o){return e.condition!==t||e.questionToken!==n||e.whenTrue!==i||e.colonToken!==a||e.whenFalse!==o?r(ke(t,n,i,a,o),e):e},e.createTemplateExpression=Ne,e.updateTemplateExpression=function(e,t,n){return e.head!==t||e.templateSpans!==n?r(Ne(t,n),e):e};var Ae,Fe,Pe={};function we(r,n,i){var a=t(r);if(a.text=n,void 0===i||n===i)a.rawText=i;else{var o=function(t,r){switch(l||(l=e.createScanner(99,!1,0)),t){case 14:l.setText("`"+r+"`");break;case 15:l.setText("`"+r+"${");break;case 16:l.setText("}"+r+"${");break;case 17:l.setText("}"+r+"`")}var n,i=l.scan();if(23===i&&(i=l.reScanTemplateToken()),l.isUnterminated())return l.setText(void 0),Pe;switch(i){case 14:case 15:case 16:case 17:n=l.getTokenValue()}return 1!==l.scan()?(l.setText(void 0),Pe):(l.setText(void 0),n)}(r,i);if("object"===f(o))return e.Debug.fail("Invalid raw text");e.Debug.assert(n===o,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."),a.rawText=i}return a}function Ie(e,r){var n=t(211);return n.asteriskToken=e&&41===e.kind?e:void 0,n.expression=e&&41!==e.kind?e:r,n}function Oe(r){var n=t(212);return n.expression=e.parenthesizeExpressionForList(r),n}function Me(e,r,i,a,o){var s=t(213);return s.decorators=void 0,s.modifiers=nr(e),s.name=tr(r),s.typeParameters=nr(i),s.heritageClauses=nr(a),s.members=n(o),s}function Le(r,n){var i=t(215);return i.expression=e.parenthesizeForAccess(n),i.typeArguments=nr(r),i}function Re(e,r){var n=t(216);return n.expression=e,n.type=r,n}function Be(r){var n=t(217);return n.expression=e.parenthesizeForAccess(r),n}function je(e,r){var n=t(218);return n.keywordToken=e,n.name=r,n}function Ke(e,r){var n=t(220);return n.expression=e,n.literal=r,n}function Je(e,r){var i=t(222);return i.statements=n(e),r&&(i.multiLine=r),i}function ze(r,n){var i=t(224);return i.decorators=void 0,i.modifiers=nr(r),i.declarationList=e.isArray(n)?st(n):n,i}function Ue(){return t(223)}function Ve(r){var n=t(225);return n.expression=e.parenthesizeExpressionForExpressionStatement(r),n}function qe(e,t){return e.expression!==t?r(Ve(t),e):e}function We(e,r,n){var i=t(226);return i.expression=e,i.thenStatement=ir(r),i.elseStatement=ir(n),i}function Ge(e,r){var n=t(227);return n.statement=ir(e),n.expression=r,n}function He(e,r){var n=t(228);return n.expression=e,n.statement=ir(r),n}function Ye(e,r,n,i){var a=t(229);return a.initializer=e,a.condition=r,a.incrementor=n,a.statement=ir(i),a}function Xe(e,r,n){var i=t(230);return i.initializer=e,i.expression=r,i.statement=ir(n),i}function Qe(r,n,i,a){var o=t(231);return o.awaitModifier=r,o.initializer=n,o.expression=e.isCommaSequence(i)?ye(i):i,o.statement=ir(a),o}function $e(e){var r=t(232);return r.label=tr(e),r}function Ze(e){var r=t(233);return r.label=tr(e),r}function et(e){var r=t(234);return r.expression=e,r}function tt(e,r){var n=t(235);return n.expression=e,n.statement=ir(r),n}function rt(r,n){var i=t(236);return i.expression=e.parenthesizeExpressionForList(r),i.caseBlock=n,i}function nt(e,r){var n=t(237);return n.label=tr(e),n.statement=ir(r),n}function it(e){var r=t(238);return r.expression=e,r}function at(e,r,n){var i=t(239);return i.tryBlock=e,i.catchClause=r,i.finallyBlock=n,i}function ot(r,n,i){var a=t(241);return a.name=tr(r),a.type=n,a.initializer=void 0!==i?e.parenthesizeExpressionForList(i):void 0,a}function st(e,r){void 0===r&&(r=0);var i=t(242);return i.flags|=3&r,i.declarations=n(e),i}function ct(e,r,i,a,o,s,c,u){var l=t(243);return l.decorators=nr(e),l.modifiers=nr(r),l.asteriskToken=i,l.name=tr(a),l.typeParameters=nr(o),l.parameters=n(s),l.type=c,l.body=u,l}function ut(e,r,i,a,o,s){var c=t(244);return c.decorators=nr(e),c.modifiers=nr(r),c.name=tr(i),c.typeParameters=nr(a),c.heritageClauses=nr(o),c.members=n(s),c}function lt(e,r,i,a,o,s){var c=t(245);return c.decorators=nr(e),c.modifiers=nr(r),c.name=tr(i),c.typeParameters=nr(a),c.heritageClauses=nr(o),c.members=n(s),c}function _t(e,r,n,i,a){var o=t(246);return o.decorators=nr(e),o.modifiers=nr(r),o.name=tr(n),o.typeParameters=nr(i),o.type=a,o}function dt(e,r,i,a){var o=t(247);return o.decorators=nr(e),o.modifiers=nr(r),o.name=tr(i),o.members=n(a),o}function pt(e,r,n,i,a){void 0===a&&(a=0);var o=t(248);return o.flags|=1044&a,o.decorators=nr(e),o.modifiers=nr(r),o.name=n,o.body=i,o}function ft(e){var r=t(249);return r.statements=n(e),r}function mt(e){var r=t(250);return r.clauses=n(e),r}function gt(e){var r=t(251);return r.name=tr(e),r}function yt(e,r,n,i){var a=t(252);return a.decorators=nr(e),a.modifiers=nr(r),a.name=tr(n),a.moduleReference=i,a}function ht(e,r,n,i){var a=t(253);return a.decorators=nr(e),a.modifiers=nr(r),a.importClause=n,a.moduleSpecifier=i,a}function vt(e,r){var n=t(254);return n.name=e,n.namedBindings=r,n}function bt(e){var r=t(255);return r.name=e,r}function xt(e){var r=t(256);return r.elements=n(e),r}function Dt(e,r){var n=t(257);return n.propertyName=e,n.name=r,n}function St(r,n,i,a){var o=t(258);return o.decorators=nr(r),o.modifiers=nr(n),o.isExportEquals=i,o.expression=i?e.parenthesizeBinaryOperand(62,a,!1,void 0):e.parenthesizeDefaultExpression(a),o}function Tt(e,r,n,i){var a=t(259);return a.decorators=nr(e),a.modifiers=nr(r),a.exportClause=n,a.moduleSpecifier=i,a}function Et(e){var r=t(260);return r.elements=n(e),r}function Ct(e,r){var n=t(261);return n.propertyName=tr(e),n.name=tr(r),n}function kt(e){var r=t(263);return r.expression=e,r}function Nt(e,r){var n=t(e);return n.tagName=u(r),n}function At(e,r,i){var a=t(264);return a.openingElement=e,a.children=n(r),a.closingElement=i,a}function Ft(e,r,n){var i=t(265);return i.tagName=e,i.typeArguments=nr(r),i.attributes=n,i}function Pt(e,r,n){var i=t(266);return i.tagName=e,i.typeArguments=nr(r),i.attributes=n,i}function wt(e){var r=t(267);return r.tagName=e,r}function It(e,r,i){var a=t(268);return a.openingFragment=e,a.children=n(r),a.closingFragment=i,a}function Ot(e,r){var n=t(11);return n.text=e,n.containsOnlyTriviaWhiteSpaces=!!r,n}function Mt(e,r){var n=t(271);return n.name=e,n.initializer=r,n}function Lt(e){var r=t(272);return r.properties=n(e),r}function Rt(e){var r=t(273);return r.expression=e,r}function Bt(e,r){var n=t(274);return n.dotDotDotToken=e,n.expression=r,n}function jt(r,i){var a=t(275);return a.expression=e.parenthesizeExpressionForList(r),a.statements=n(i),a}function Kt(e){var r=t(276);return r.statements=n(e),r}function Jt(e,r){var i=t(277);return i.token=e,i.types=n(r),i}function zt(r,n){var i=t(278);return i.variableDeclaration=e.isString(r)?ot(r):r,i.block=n,i}function Ut(r,n){var i=t(279);return i.name=tr(r),i.questionToken=void 0,i.initializer=e.parenthesizeExpressionForList(n),i}function Vt(r,n){var i=t(280);return i.name=tr(r),i.objectAssignmentInitializer=void 0!==n?e.parenthesizeExpressionForList(n):void 0,i}function qt(r){var n=t(281);return n.expression=e.parenthesizeExpressionForList(r),n}function Wt(r,n){var i=t(282);return i.name=tr(r),i.initializer=n&&e.parenthesizeExpressionForList(n),i}function Gt(e,r){var n=t(319);return n.expression=e,n.original=r,or(n,r),n}function Ht(t){if(e.nodeIsSynthesized(t)&&!e.isParseTreeNode(t)&&!t.original&&!t.emitNode&&!t.id){if(320===t.kind)return t.elements;if(e.isBinaryExpression(t)&&27===t.operatorToken.kind)return[t.left,t.right]}return t}function Yt(r){var i=t(320);return i.elements=n(e.sameFlatMap(r,Ht)),i}function Xt(e,r){var n=t(323);return n.expression=e,n.thisArg=r,n}function Qt(t,r){void 0===r&&(r=e.emptyArray);var n=e.createNode(289);return n.prepends=r,n.sourceFiles=t,n}function $t(){return Ae||(Ae=e.arrayToMap([e.valuesHelper,e.readHelper,e.spreadHelper,e.spreadArraysHelper,e.restHelper,e.decorateHelper,e.metadataHelper,e.paramHelper,e.awaiterHelper,e.assignHelper,e.awaitHelper,e.asyncGeneratorHelper,e.asyncDelegator,e.asyncValues,e.extendsHelper,e.templateObjectHelper,e.generatorHelper,e.importStarHelper,e.importDefaultHelper],(function(e){return e.name})))}function Zt(t,r){var n=e.createNode(function(t){switch(t){case"prologue":return 283;case"prepend":return 284;case"internal":return 286;case"text":return 285;case"emitHelpers":case"no-default-lib":case"reference":case"type":case"lib":return e.Debug.fail("BundleFileSectionKind: "+t+" not yet mapped to SyntaxKind");default:return e.Debug.assertNever(t)}}(t.kind),t.pos,t.end);return n.parent=r,n.data=t.data,n}function er(t,r){var n=e.createNode(287,t.pos,t.end);return n.parent=r,n.data=t.data,n.section=t,n}function tr(t){return e.isString(t)?u(t):t}function rr(e){return"string"==typeof e?c(e):"number"==typeof e?o(""+e):"boolean"==typeof e?e?m():g():e}function nr(e){return e?n(e):void 0}function ir(t){return t&&e.isNotEmittedStatement(t)?or(dr(Ue(),t),t):t}function ar(t){if(!t.emitNode){if(e.isParseTreeNode(t)){if(288===t.kind)return t.emitNode={annotatedNodes:[t]};ar(e.getSourceFileOfNode(e.getParseTreeNode(e.getSourceFileOfNode(t)))).annotatedNodes.push(t)}t.emitNode={}}return t.emitNode}function or(e,t){return t&&(e.pos=t.pos,e.end=t.end),e}function sr(e,t){return ar(e).flags=t,e}function cr(e){var t=e.emitNode;return t&&t.leadingComments}function ur(e,t){return ar(e).leadingComments=t,e}function lr(e){var t=e.emitNode;return t&&t.trailingComments}function _r(e,t){return ar(e).trailingComments=t,e}function dr(t,r){if(t.original=r,r){var n=r.emitNode;n&&(t.emitNode=function(t,r){var n=t.flags,i=t.leadingComments,a=t.trailingComments,o=t.commentRange,s=t.sourceMapRange,c=t.tokenSourceMapRanges,u=t.constantValue,l=t.helpers,_=t.startsOnNewLine;r||(r={});i&&(r.leadingComments=e.addRange(i.slice(),r.leadingComments));a&&(r.trailingComments=e.addRange(a.slice(),r.trailingComments));n&&(r.flags=n);o&&(r.commentRange=o);s&&(r.sourceMapRange=s);c&&(r.tokenSourceMapRanges=function(e,t){t||(t=[]);for(var r in e)t[r]=e[r];return t}(c,r.tokenSourceMapRanges));void 0!==u&&(r.constantValue=u);l&&(r.helpers=e.addRange(r.helpers,l));void 0!==_&&(r.startsOnNewLine=_);return r}(n,t.emitNode))}return t}e.createTemplateHead=function(e,t){var r=we(15,e,t);return r.text=e,r},e.createTemplateMiddle=function(e,t){var r=we(16,e,t);return r.text=e,r},e.createTemplateTail=function(e,t){var r=we(17,e,t);return r.text=e,r},e.createNoSubstitutionTemplateLiteral=function(e,t){return we(14,e,t)},e.createYield=Ie,e.updateYield=function(e,t,n){return e.expression!==n||e.asteriskToken!==t?r(Ie(t,n),e):e},e.createSpread=Oe,e.updateSpread=function(e,t){return e.expression!==t?r(Oe(t),e):e},e.createClassExpression=Me,e.updateClassExpression=function(e,t,n,i,a,o){return e.modifiers!==t||e.name!==n||e.typeParameters!==i||e.heritageClauses!==a||e.members!==o?r(Me(t,n,i,a,o),e):e},e.createOmittedExpression=function(){return t(214)},e.createExpressionWithTypeArguments=Le,e.updateExpressionWithTypeArguments=function(e,t,n){return e.typeArguments!==t||e.expression!==n?r(Le(t,n),e):e},e.createAsExpression=Re,e.updateAsExpression=function(e,t,n){return e.expression!==t||e.type!==n?r(Re(t,n),e):e},e.createNonNullExpression=Be,e.updateNonNullExpression=function(e,t){return e.expression!==t?r(Be(t),e):e},e.createMetaProperty=je,e.updateMetaProperty=function(e,t){return e.name!==t?r(je(e.keywordToken,t),e):e},e.createTemplateSpan=Ke,e.updateTemplateSpan=function(e,t,n){return e.expression!==t||e.literal!==n?r(Ke(t,n),e):e},e.createSemicolonClassElement=function(){return t(221)},e.createBlock=Je,e.updateBlock=function(e,t){return e.statements!==t?r(Je(t,e.multiLine),e):e},e.createVariableStatement=ze,e.updateVariableStatement=function(e,t,n){return e.modifiers!==t||e.declarationList!==n?r(ze(t,n),e):e},e.createEmptyStatement=Ue,e.createExpressionStatement=Ve,e.updateExpressionStatement=qe,e.createStatement=Ve,e.updateStatement=qe,e.createIf=We,e.updateIf=function(e,t,n,i){return e.expression!==t||e.thenStatement!==n||e.elseStatement!==i?r(We(t,n,i),e):e},e.createDo=Ge,e.updateDo=function(e,t,n){return e.statement!==t||e.expression!==n?r(Ge(t,n),e):e},e.createWhile=He,e.updateWhile=function(e,t,n){return e.expression!==t||e.statement!==n?r(He(t,n),e):e},e.createFor=Ye,e.updateFor=function(e,t,n,i,a){return e.initializer!==t||e.condition!==n||e.incrementor!==i||e.statement!==a?r(Ye(t,n,i,a),e):e},e.createForIn=Xe,e.updateForIn=function(e,t,n,i){return e.initializer!==t||e.expression!==n||e.statement!==i?r(Xe(t,n,i),e):e},e.createForOf=Qe,e.updateForOf=function(e,t,n,i,a){return e.awaitModifier!==t||e.initializer!==n||e.expression!==i||e.statement!==a?r(Qe(t,n,i,a),e):e},e.createContinue=$e,e.updateContinue=function(e,t){return e.label!==t?r($e(t),e):e},e.createBreak=Ze,e.updateBreak=function(e,t){return e.label!==t?r(Ze(t),e):e},e.createReturn=et,e.updateReturn=function(e,t){return e.expression!==t?r(et(t),e):e},e.createWith=tt,e.updateWith=function(e,t,n){return e.expression!==t||e.statement!==n?r(tt(t,n),e):e},e.createSwitch=rt,e.updateSwitch=function(e,t,n){return e.expression!==t||e.caseBlock!==n?r(rt(t,n),e):e},e.createLabel=nt,e.updateLabel=function(e,t,n){return e.label!==t||e.statement!==n?r(nt(t,n),e):e},e.createThrow=it,e.updateThrow=function(e,t){return e.expression!==t?r(it(t),e):e},e.createTry=at,e.updateTry=function(e,t,n,i){return e.tryBlock!==t||e.catchClause!==n||e.finallyBlock!==i?r(at(t,n,i),e):e},e.createDebuggerStatement=function(){return t(240)},e.createVariableDeclaration=ot,e.updateVariableDeclaration=function(e,t,n,i){return e.name!==t||e.type!==n||e.initializer!==i?r(ot(t,n,i),e):e},e.createVariableDeclarationList=st,e.updateVariableDeclarationList=function(e,t){return e.declarations!==t?r(st(t,e.flags),e):e},e.createFunctionDeclaration=ct,e.updateFunctionDeclaration=function(e,t,n,i,a,o,s,c,u){return e.decorators!==t||e.modifiers!==n||e.asteriskToken!==i||e.name!==a||e.typeParameters!==o||e.parameters!==s||e.type!==c||e.body!==u?r(ct(t,n,i,a,o,s,c,u),e):e},e.createClassDeclaration=ut,e.updateClassDeclaration=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.heritageClauses!==o||e.members!==s?r(ut(t,n,i,a,o,s),e):e},e.createInterfaceDeclaration=lt,e.updateInterfaceDeclaration=function(e,t,n,i,a,o,s){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.heritageClauses!==o||e.members!==s?r(lt(t,n,i,a,o,s),e):e},e.createTypeAliasDeclaration=_t,e.updateTypeAliasDeclaration=function(e,t,n,i,a,o){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.typeParameters!==a||e.type!==o?r(_t(t,n,i,a,o),e):e},e.createEnumDeclaration=dt,e.updateEnumDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.members!==a?r(dt(t,n,i,a),e):e},e.createModuleDeclaration=pt,e.updateModuleDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.body!==a?r(pt(t,n,i,a,e.flags),e):e},e.createModuleBlock=ft,e.updateModuleBlock=function(e,t){return e.statements!==t?r(ft(t),e):e},e.createCaseBlock=mt,e.updateCaseBlock=function(e,t){return e.clauses!==t?r(mt(t),e):e},e.createNamespaceExportDeclaration=gt,e.updateNamespaceExportDeclaration=function(e,t){return e.name!==t?r(gt(t),e):e},e.createImportEqualsDeclaration=yt,e.updateImportEqualsDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.name!==i||e.moduleReference!==a?r(yt(t,n,i,a),e):e},e.createImportDeclaration=ht,e.updateImportDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.importClause!==i||e.moduleSpecifier!==a?r(ht(t,n,i,a),e):e},e.createImportClause=vt,e.updateImportClause=function(e,t,n){return e.name!==t||e.namedBindings!==n?r(vt(t,n),e):e},e.createNamespaceImport=bt,e.updateNamespaceImport=function(e,t){return e.name!==t?r(bt(t),e):e},e.createNamedImports=xt,e.updateNamedImports=function(e,t){return e.elements!==t?r(xt(t),e):e},e.createImportSpecifier=Dt,e.updateImportSpecifier=function(e,t,n){return e.propertyName!==t||e.name!==n?r(Dt(t,n),e):e},e.createExportAssignment=St,e.updateExportAssignment=function(e,t,n,i){return e.decorators!==t||e.modifiers!==n||e.expression!==i?r(St(t,n,e.isExportEquals,i),e):e},e.createExportDeclaration=Tt,e.updateExportDeclaration=function(e,t,n,i,a){return e.decorators!==t||e.modifiers!==n||e.exportClause!==i||e.moduleSpecifier!==a?r(Tt(t,n,i,a),e):e},e.createEmptyExports=function(){return Tt(void 0,void 0,Et([]),void 0)},e.createNamedExports=Et,e.updateNamedExports=function(e,t){return e.elements!==t?r(Et(t),e):e},e.createExportSpecifier=Ct,e.updateExportSpecifier=function(e,t,n){return e.propertyName!==t||e.name!==n?r(Ct(t,n),e):e},e.createExternalModuleReference=kt,e.updateExternalModuleReference=function(e,t){return e.expression!==t?r(kt(t),e):e},e.createJSDocTypeExpression=function(e){var r=t(292);return r.type=e,r},e.createJSDocTypeTag=function(e,t){var r=Nt(313,"type");return r.typeExpression=e,r.comment=t,r},e.createJSDocReturnTag=function(e,t){var r=Nt(311,"returns");return r.typeExpression=e,r.comment=t,r},e.createJSDocThisTag=function(e){var t=Nt(312,"this");return t.typeExpression=e,t},e.createJSDocParamTag=function(e,t,r,n){var i=Nt(310,"param");return i.typeExpression=r,i.name=e,i.isBracketed=t,i.comment=n,i},e.createJSDocComment=function(e,r){var n=t(301);return n.comment=e,n.tags=r,n},e.createJsxElement=At,e.updateJsxElement=function(e,t,n,i){return e.openingElement!==t||e.children!==n||e.closingElement!==i?r(At(t,n,i),e):e},e.createJsxSelfClosingElement=Ft,e.updateJsxSelfClosingElement=function(e,t,n,i){return e.tagName!==t||e.typeArguments!==n||e.attributes!==i?r(Ft(t,n,i),e):e},e.createJsxOpeningElement=Pt,e.updateJsxOpeningElement=function(e,t,n,i){return e.tagName!==t||e.typeArguments!==n||e.attributes!==i?r(Pt(t,n,i),e):e},e.createJsxClosingElement=wt,e.updateJsxClosingElement=function(e,t){return e.tagName!==t?r(wt(t),e):e},e.createJsxFragment=It,e.createJsxText=Ot,e.updateJsxText=function(e,t,n){return e.text!==t||e.containsOnlyTriviaWhiteSpaces!==n?r(Ot(t,n),e):e},e.createJsxOpeningFragment=function(){return t(269)},e.createJsxJsxClosingFragment=function(){return t(270)},e.updateJsxFragment=function(e,t,n,i){return e.openingFragment!==t||e.children!==n||e.closingFragment!==i?r(It(t,n,i),e):e},e.createJsxAttribute=Mt,e.updateJsxAttribute=function(e,t,n){return e.name!==t||e.initializer!==n?r(Mt(t,n),e):e},e.createJsxAttributes=Lt,e.updateJsxAttributes=function(e,t){return e.properties!==t?r(Lt(t),e):e},e.createJsxSpreadAttribute=Rt,e.updateJsxSpreadAttribute=function(e,t){return e.expression!==t?r(Rt(t),e):e},e.createJsxExpression=Bt,e.updateJsxExpression=function(e,t){return e.expression!==t?r(Bt(e.dotDotDotToken,t),e):e},e.createCaseClause=jt,e.updateCaseClause=function(e,t,n){return e.expression!==t||e.statements!==n?r(jt(t,n),e):e},e.createDefaultClause=Kt,e.updateDefaultClause=function(e,t){return e.statements!==t?r(Kt(t),e):e},e.createHeritageClause=Jt,e.updateHeritageClause=function(e,t){return e.types!==t?r(Jt(e.token,t),e):e},e.createCatchClause=zt,e.updateCatchClause=function(e,t,n){return e.variableDeclaration!==t||e.block!==n?r(zt(t,n),e):e},e.createPropertyAssignment=Ut,e.updatePropertyAssignment=function(e,t,n){return e.name!==t||e.initializer!==n?r(Ut(t,n),e):e},e.createShorthandPropertyAssignment=Vt,e.updateShorthandPropertyAssignment=function(e,t,n){return e.name!==t||e.objectAssignmentInitializer!==n?r(Vt(t,n),e):e},e.createSpreadAssignment=qt,e.updateSpreadAssignment=function(e,t){return e.expression!==t?r(qt(t),e):e},e.createEnumMember=Wt,e.updateEnumMember=function(e,t,n){return e.name!==t||e.initializer!==n?r(Wt(t,n),e):e},e.updateSourceFileNode=function(e,i,a,o,s,c,u){if(e.statements!==i||void 0!==a&&e.isDeclarationFile!==a||void 0!==o&&e.referencedFiles!==o||void 0!==s&&e.typeReferenceDirectives!==s||void 0!==u&&e.libReferenceDirectives!==u||void 0!==c&&e.hasNoDefaultLib!==c){var l=t(288);return l.flags|=e.flags,l.statements=n(i),l.endOfFileToken=e.endOfFileToken,l.fileName=e.fileName,l.path=e.path,l.text=e.text,l.isDeclarationFile=void 0===a?e.isDeclarationFile:a,l.referencedFiles=void 0===o?e.referencedFiles:o,l.typeReferenceDirectives=void 0===s?e.typeReferenceDirectives:s,l.hasNoDefaultLib=void 0===c?e.hasNoDefaultLib:c,l.libReferenceDirectives=void 0===u?e.libReferenceDirectives:u,void 0!==e.amdDependencies&&(l.amdDependencies=e.amdDependencies),void 0!==e.moduleName&&(l.moduleName=e.moduleName),void 0!==e.languageVariant&&(l.languageVariant=e.languageVariant),void 0!==e.renamedDependencies&&(l.renamedDependencies=e.renamedDependencies),void 0!==e.languageVersion&&(l.languageVersion=e.languageVersion),void 0!==e.scriptKind&&(l.scriptKind=e.scriptKind),void 0!==e.externalModuleIndicator&&(l.externalModuleIndicator=e.externalModuleIndicator),void 0!==e.commonJsModuleIndicator&&(l.commonJsModuleIndicator=e.commonJsModuleIndicator),void 0!==e.identifiers&&(l.identifiers=e.identifiers),void 0!==e.nodeCount&&(l.nodeCount=e.nodeCount),void 0!==e.identifierCount&&(l.identifierCount=e.identifierCount),void 0!==e.symbolCount&&(l.symbolCount=e.symbolCount),void 0!==e.parseDiagnostics&&(l.parseDiagnostics=e.parseDiagnostics),void 0!==e.bindDiagnostics&&(l.bindDiagnostics=e.bindDiagnostics),void 0!==e.bindSuggestionDiagnostics&&(l.bindSuggestionDiagnostics=e.bindSuggestionDiagnostics),void 0!==e.lineMap&&(l.lineMap=e.lineMap),void 0!==e.classifiableNames&&(l.classifiableNames=e.classifiableNames),void 0!==e.resolvedModules&&(l.resolvedModules=e.resolvedModules),void 0!==e.resolvedTypeReferenceDirectiveNames&&(l.resolvedTypeReferenceDirectiveNames=e.resolvedTypeReferenceDirectiveNames),void 0!==e.imports&&(l.imports=e.imports),void 0!==e.moduleAugmentations&&(l.moduleAugmentations=e.moduleAugmentations),void 0!==e.pragmas&&(l.pragmas=e.pragmas),void 0!==e.localJsxFactory&&(l.localJsxFactory=e.localJsxFactory),void 0!==e.localJsxNamespace&&(l.localJsxNamespace=e.localJsxNamespace),r(l,e)}return e},e.getMutableClone=function(e){var t=i(e);return t.pos=e.pos,t.end=e.end,t.parent=e.parent,t},e.createNotEmittedStatement=function(e){var r=t(318);return r.original=e,or(r,e),r},e.createEndOfDeclarationMarker=function(e){var r=t(322);return r.emitNode={},r.original=e,r},e.createMergeDeclarationMarker=function(e){var r=t(321);return r.emitNode={},r.original=e,r},e.createPartiallyEmittedExpression=Gt,e.updatePartiallyEmittedExpression=function(e,t){return e.expression!==t?r(Gt(t,e.original),e):e},e.createCommaList=Yt,e.updateCommaList=function(e,t){return e.elements!==t?r(Yt(t),e):e},e.createSyntheticReferenceExpression=Xt,e.updateSyntheticReferenceExpression=function(e,t,n){return e.expression!==t||e.thisArg!==n?r(Xt(t,n),e):e},e.createBundle=Qt,e.createUnparsedSourceFile=function(t,r,n){var i,a,o=function(){var t=e.createNode(290);return t.prologues=e.emptyArray,t.referencedFiles=e.emptyArray,t.libReferenceDirectives=e.emptyArray,t.getLineAndCharacterOfPosition=function(r){return e.getLineAndCharacterOfPosition(t,r)},t}();if(e.isString(t))o.fileName="",o.text=t,o.sourceMapPath=r,o.sourceMapText=n;else if(e.Debug.assert("js"===r||"dts"===r),o.fileName=("js"===r?t.javascriptPath:t.declarationPath)||"",o.sourceMapPath="js"===r?t.javascriptMapPath:t.declarationMapPath,Object.defineProperties(o,{text:{get:function(){return"js"===r?t.javascriptText:t.declarationText}},sourceMapText:{get:function(){return"js"===r?t.javascriptMapText:t.declarationMapText}}}),t.buildInfo&&t.buildInfo.bundle&&(o.oldFileOfCurrentEmit=t.oldFileOfCurrentEmit,e.Debug.assert(void 0===n||"boolean"==typeof n),i=n,a="js"===r?t.buildInfo.bundle.js:t.buildInfo.bundle.dts,o.oldFileOfCurrentEmit))return function(t,r){var n,i;e.Debug.assert(!!t.oldFileOfCurrentEmit);for(var a=0,o=r.sections;a0&&(a[c-s]=u)}s>0&&(a.length-=s)}},e.compareEmitHelpers=function(t,r){return t===r?0:t.priority===r.priority?0:void 0===t.priority?1:void 0===r.priority?-1:e.compareValues(t.priority,r.priority)},e.setOriginalNode=dr}(s||(s={})),function(e){function r(t,r,n){if(e.isComputedPropertyName(r))return e.setTextRange(e.createElementAccess(t,r.expression),n);var i=e.setTextRange(e.isIdentifier(r)?e.createPropertyAccess(t,r):e.createElementAccess(t,r),r);return e.getOrCreateEmitNode(i).flags|=64,i}function n(t,r){var n=e.createIdentifier(t||"React");return n.flags&=-9,n.parent=e.getParseTreeNode(r),n}function i(t,r,i){return t?function t(r,i){if(e.isQualifiedName(r)){var a=t(r.left,i),o=e.createIdentifier(e.idText(r.right));return o.escapedText=r.right.escapedText,e.createPropertyAccess(a,o)}return n(e.idText(r),i)}(t,i):e.createPropertyAccess(n(r,i),"createElement")}function a(t){return e.setEmitFlags(e.createIdentifier(t),4098)}function o(t,r){var n=e.skipParentheses(t);switch(n.kind){case 75:return r;case 103:case 8:case 9:case 10:return!1;case 191:return 0!==n.elements.length;case 192:return n.properties.length>0;default:return!0}}function s(t){return e.isIdentifier(t)?e.createLiteral(t):e.isComputedPropertyName(t)?e.getMutableClone(t.expression):e.getMutableClone(t)}function c(e,t,r){return u(e,t,r,8192)}function u(t,r,n,i){void 0===i&&(i=0);var a=e.getNameOfDeclaration(t);if(a&&e.isIdentifier(a)&&!e.isGeneratedIdentifier(a)){var o=e.getMutableClone(a);return i|=e.getEmitFlags(a),n||(i|=48),r||(i|=1536),i&&e.setEmitFlags(o,i),o}return e.getGeneratedNameForNode(t)}function l(t,r,n,i){var a=e.createPropertyAccess(t,e.nodeIsSynthesized(r)?r:e.getSynthesizedClone(r));e.setTextRange(a,r);var o=0;return i||(o|=48),n||(o|=1536),o&&e.setEmitFlags(a,o),a}function _(t){return e.isStringLiteral(t.expression)&&"use strict"===t.expression.text}function d(t,r,n){e.Debug.assert(0===t.length,"Prologue directives should be at the first statement in the target statements array");for(var i=!1,a=0,o=r.length;ae.getOperatorPrecedence(208,27)?t:e.setTextRange(e.createParen(t),t)}function h(t){return 179===t.kind?e.createParenthesizedType(t):t}function v(t){switch(t.kind){case 177:case 178:case 169:case 170:return e.createParenthesizedType(t)}return h(t)}function b(e,t){for(;;){switch(e.kind){case 207:e=e.operand;continue;case 208:e=e.left;continue;case 209:e=e.condition;continue;case 197:e=e.tag;continue;case 195:if(t)return e;case 216:case 194:case 193:case 217:case 319:e=e.expression;continue}return e}}function x(e){return 208===e.kind&&27===e.operatorToken.kind||320===e.kind}function D(e,t){switch(void 0===t&&(t=7),e.kind){case 199:return 0!=(1&t);case 198:case 216:case 217:return 0!=(2&t);case 319:return 0!=(4&t)}return!1}function S(t,r){var n;void 0===r&&(r=7);do{n=t,1&r&&(t=e.skipParentheses(t)),2&r&&(t=T(t)),4&r&&(t=e.skipPartiallyEmittedExpressions(t))}while(n!==t);return t}function T(t){for(;e.isAssertionExpression(t)||217===t.kind;)t=t.expression;return t}function E(t,r,n){return void 0===n&&(n=7),t&&D(t,n)&&!function(t){return 199===t.kind&&e.nodeIsSynthesized(t)&&e.nodeIsSynthesized(e.getSourceMapRange(t))&&e.nodeIsSynthesized(e.getCommentRange(t))&&!e.some(e.getSyntheticLeadingComments(t))&&!e.some(e.getSyntheticTrailingComments(t))}(t)?function(t,r){switch(t.kind){case 199:return e.updateParen(t,r);case 198:return e.updateTypeAssertion(t,t.type,r);case 216:return e.updateAsExpression(t,r,t.type);case 217:return e.updateNonNullExpression(t,r);case 319:return e.updatePartiallyEmittedExpression(t,r)}}(t,E(t.expression,r)):r}function C(t){return e.setStartsOnNewLine(t,!0)}function k(t){var r=e.getOriginalNode(t,e.isSourceFile),n=r&&r.emitNode;return n&&n.externalHelpersModuleName}function N(t,r,n,i){if(r.importHelpers&&e.isEffectiveExternalModule(t,r)){var a=k(t);if(a)return a;var o=e.getEmitModuleKind(r),s=(n||r.esModuleInterop&&i)&&o!==e.ModuleKind.System&&o!==e.ModuleKind.ES2015&&o!==e.ModuleKind.ESNext;if(!s){var c=e.getEmitHelpers(t);if(c)for(var u=0,l=c;u0)if(a||u.push(e.createNull()),o.length>1)for(var l=0,_=o;l<_.length;l++){var d=_[l];C(d),u.push(d)}else u.push(o[0]);return e.setTextRange(e.createCall(i(t,r,s),void 0,u),c)},e.createExpressionForJsxFragment=function(t,r,a,o,s){var c=[e.createPropertyAccess(n(r,o),"Fragment")];if(c.push(e.createNull()),a&&a.length>0)if(a.length>1)for(var u=0,l=a;u= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");\n };'},e.createValuesHelper=function(t,r,n){return t.requestEmitHelper(e.valuesHelper),e.setTextRange(e.createCall(a("__values"),void 0,[r]),n)},e.readHelper={name:"typescript:read",importName:"__read",scoped:!1,text:'\n var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === "function" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i["return"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n };'},e.createReadHelper=function(t,r,n,i){return t.requestEmitHelper(e.readHelper),e.setTextRange(e.createCall(a("__read"),void 0,void 0!==n?[r,e.createLiteral(n)]:[r]),i)},e.spreadHelper={name:"typescript:spread",importName:"__spread",scoped:!1,text:"\n var __spread = (this && this.__spread) || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n };"},e.createSpreadHelper=function(t,r,n){return t.requestEmitHelper(e.readHelper),t.requestEmitHelper(e.spreadHelper),e.setTextRange(e.createCall(a("__spread"),void 0,r),n)},e.spreadArraysHelper={name:"typescript:spreadArrays",importName:"__spreadArrays",scoped:!1,text:"\n var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n };"},e.createSpreadArraysHelper=function(t,r,n){return t.requestEmitHelper(e.spreadArraysHelper),e.setTextRange(e.createCall(a("__spreadArrays"),void 0,r),n)},e.createForOfBindingStatement=function(t,r){if(e.isVariableDeclarationList(t)){var n=e.first(t.declarations),i=e.updateVariableDeclaration(n,n.name,void 0,r);return e.setTextRange(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[i])),t)}var a=e.setTextRange(e.createAssignment(t,r),t);return e.setTextRange(e.createStatement(a),t)},e.insertLeadingStatement=function(r,n){return e.isBlock(r)?e.updateBlock(r,e.setTextRange(e.createNodeArray(t([n],r.statements)),r.statements)):e.createBlock(e.createNodeArray([r,n]),!0)},e.restoreEnclosingLabel=function t(r,n,i){if(!n)return r;var a=e.updateLabel(n,n.label,237===n.statement.kind?t(r,n.statement):r);return i&&i(n),a},e.createCallBinding=function(t,r,n,i){void 0===i&&(i=!1);var a,s,c=S(t,7);if(e.isSuperProperty(c))a=e.createThis(),s=c;else if(101===c.kind)a=e.createThis(),s=n<2?e.setTextRange(e.createIdentifier("_super"),c):c;else if(4096&e.getEmitFlags(c))a=e.createVoidZero(),s=g(c);else switch(c.kind){case 193:o(c.expression,i)?(a=e.createTempVariable(r),s=e.createPropertyAccess(e.setTextRange(e.createAssignment(a,c.expression),c.expression),c.name),e.setTextRange(s,c)):(a=c.expression,s=c);break;case 194:o(c.expression,i)?(a=e.createTempVariable(r),s=e.createElementAccess(e.setTextRange(e.createAssignment(a,c.expression),c.expression),c.argumentExpression),e.setTextRange(s,c)):(a=c.expression,s=c);break;default:a=e.createVoidZero(),s=g(t)}return{target:s,thisArg:a}},e.inlineExpressions=function(t){return t.length>10?e.createCommaList(t):e.reduceLeft(t,e.createComma)},e.createExpressionFromEntityName=function t(r){if(e.isQualifiedName(r)){var n=t(r.left),i=e.getMutableClone(r.right);return e.setTextRange(e.createPropertyAccess(n,i),r)}return e.getMutableClone(r)},e.createExpressionForPropertyName=s,e.createExpressionForObjectLiteralElementLike=function(t,n,i){switch(n.kind){case 162:case 163:return function(t,r,n,i){var a=e.getAllAccessorDeclarations(t,r),o=a.firstAccessor,c=a.getAccessor,u=a.setAccessor;if(r===o){var l=[];if(c){var _=e.createFunctionExpression(c.modifiers,void 0,void 0,void 0,c.parameters,void 0,c.body);e.setTextRange(_,c),e.setOriginalNode(_,c);var d=e.createPropertyAssignment("get",_);l.push(d)}if(u){var p=e.createFunctionExpression(u.modifiers,void 0,void 0,void 0,u.parameters,void 0,u.body);e.setTextRange(p,u),e.setOriginalNode(p,u);var f=e.createPropertyAssignment("set",p);l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue())),l.push(e.createPropertyAssignment("configurable",e.createTrue()));var m=e.setTextRange(e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[n,s(r.name),e.createObjectLiteral(l,i)]),o);return e.aggregateTransformFlags(m)}return}(t.properties,n,i,!!t.multiLine);case 279:return function(t,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(r(n,t.name,t.name),t.initializer),t),t))}(n,i);case 280:return function(t,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(r(n,t.name,t.name),e.getSynthesizedClone(t.name)),t),t))}(n,i);case 160:return function(t,n){return e.aggregateTransformFlags(e.setOriginalNode(e.setTextRange(e.createAssignment(r(n,t.name,t.name),e.setOriginalNode(e.setTextRange(e.createFunctionExpression(t.modifiers,t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t))}(n,i)}},e.getInternalName=function(e,t,r){return u(e,t,r,49152)},e.isInternalName=function(t){return 0!=(32768&e.getEmitFlags(t))},e.getLocalName=function(e,t,r){return u(e,t,r,16384)},e.isLocalName=function(t){return 0!=(16384&e.getEmitFlags(t))},e.getExportName=c,e.isExportName=function(t){return 0!=(8192&e.getEmitFlags(t))},e.getDeclarationName=function(e,t,r){return u(e,t,r)},e.getExternalModuleOrNamespaceExportName=function(t,r,n,i){return t&&e.hasModifier(r,1)?l(t,u(r),n,i):c(r,n,i)},e.getNamespaceMemberName=l,e.convertToFunctionBody=function(t,r){return e.isBlock(t)?t:e.setTextRange(e.createBlock([e.setTextRange(e.createReturn(t),t)],r),t)},e.convertFunctionDeclarationToExpression=function(t){if(!t.body)return e.Debug.fail();var r=e.createFunctionExpression(t.modifiers,t.asteriskToken,t.name,t.typeParameters,t.parameters,t.type,t.body);return e.setOriginalNode(r,t),e.setTextRange(r,t),e.getStartsOnNewLine(t)&&e.setStartsOnNewLine(r,!0),e.aggregateTransformFlags(r),r},e.addPrologue=function(e,t,r,n){return p(e,t,d(e,t,r),n)},e.addStandardPrologue=d,e.addCustomPrologue=p,e.findUseStrictPrologue=f,e.startsWithUseStrict=function(t){var r=e.firstOrUndefined(t);return void 0!==r&&e.isPrologueDirective(r)&&_(r)},e.ensureUseStrict=function(r){return f(r)?r:e.setTextRange(e.createNodeArray(t([C(e.createStatement(e.createLiteral("use strict")))],r)),r)},e.parenthesizeBinaryOperand=function(t,r,n,i){return 199===e.skipPartiallyEmittedExpressions(r).kind?r:function(t,r,n,i){var a=e.getOperatorPrecedence(208,t),o=e.getOperatorAssociativity(208,t),s=e.skipPartiallyEmittedExpressions(r);if(!n&&201===r.kind&&a>3)return!0;var c=e.getExpressionPrecedence(s);switch(e.compareValues(c,a)){case-1:return!(!n&&1===o&&211===r.kind);case 1:return!1;case 0:if(n)return 1===o;if(e.isBinaryExpression(s)&&s.operatorToken.kind===t){if(function(e){return 41===e||51===e||50===e||52===e}(t))return!1;if(39===t){var u=i?m(i):0;if(e.isLiteralKind(u)&&u===m(s))return!1}}return 0===e.getExpressionAssociativity(s)}}(t,r,n,i)?e.createParen(r):r},e.parenthesizeForConditionalHead=function(t){var r=e.getOperatorPrecedence(209,57),n=e.skipPartiallyEmittedExpressions(t),i=e.getExpressionPrecedence(n);return 1!==e.compareValues(i,r)?e.createParen(t):t},e.parenthesizeSubexpressionOfConditionalExpression=function(t){return x(e.skipPartiallyEmittedExpressions(t))?e.createParen(t):t},e.parenthesizeDefaultExpression=function(t){var r=e.skipPartiallyEmittedExpressions(t),n=x(r);if(!n)switch(b(r,!1).kind){case 213:case 200:n=!0}return n?e.createParen(t):t},e.parenthesizeForNew=function(t){var r=b(t,!0);switch(r.kind){case 195:return e.createParen(t);case 196:return r.arguments?t:e.createParen(t)}return g(t)},e.parenthesizeForAccess=g,e.parenthesizePostfixOperand=function(t){return e.isLeftHandSideExpression(t)?t:e.setTextRange(e.createParen(t),t)},e.parenthesizePrefixOperand=function(t){return e.isUnaryExpression(t)?t:e.setTextRange(e.createParen(t),t)},e.parenthesizeListElements=function(t){for(var r,n=0;n=e.ModuleKind.ES2015&&c<=e.ModuleKind.ESNext){var u=e.getEmitHelpers(t);if(u){for(var l=[],_=0,d=u;_s-i)&&(a=s-i),(i>0||a0&&d<=151||182===d)return s;switch(d){case 75:return e.updateIdentifier(s,l(s.typeArguments,c,t));case 152:return e.updateQualifiedName(s,r(s.left,c,e.isEntityName),r(s.right,c,e.isIdentifier));case 153:return e.updateComputedPropertyName(s,r(s.expression,c,e.isExpression));case 154:return e.updateTypeParameterDeclaration(s,r(s.name,c,e.isIdentifier),r(s.constraint,c,e.isTypeNode),r(s.default,c,e.isTypeNode));case 155:return e.updateParameter(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.dotDotDotToken,_,e.isToken),r(s.name,c,e.isBindingName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 156:return e.updateDecorator(s,r(s.expression,c,e.isExpression));case 157:return e.updatePropertySignature(s,l(s.modifiers,c,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 158:return e.updateProperty(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),r(s.questionToken||s.exclamationToken,_,e.isToken),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 159:return e.updateMethodSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken));case 160:return e.updateMethod(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isPropertyName),r(s.questionToken,_,e.isToken),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 161:return e.updateConstructor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),a(s.parameters,c,u,l),o(s.body,c,u));case 162:return e.updateGetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 163:return e.updateSetAccessor(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isPropertyName),a(s.parameters,c,u,l),o(s.body,c,u));case 164:return e.updateCallSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 165:return e.updateConstructSignature(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 166:return e.updateIndexSignature(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 167:return e.updateTypePredicateNodeWithModifier(s,r(s.assertsModifier,c),r(s.parameterName,c),r(s.type,c,e.isTypeNode));case 168:return e.updateTypeReferenceNode(s,r(s.typeName,c,e.isEntityName),l(s.typeArguments,c,e.isTypeNode));case 169:return e.updateFunctionTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 170:return e.updateConstructorTypeNode(s,l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.parameters,c,e.isParameterDeclaration),r(s.type,c,e.isTypeNode));case 171:return e.updateTypeQueryNode(s,r(s.exprName,c,e.isEntityName));case 172:return e.updateTypeLiteralNode(s,l(s.members,c,e.isTypeElement));case 173:return e.updateArrayTypeNode(s,r(s.elementType,c,e.isTypeNode));case 174:return e.updateTupleTypeNode(s,l(s.elementTypes,c,e.isTypeNode));case 175:return e.updateOptionalTypeNode(s,r(s.type,c,e.isTypeNode));case 176:return e.updateRestTypeNode(s,r(s.type,c,e.isTypeNode));case 177:return e.updateUnionTypeNode(s,l(s.types,c,e.isTypeNode));case 178:return e.updateIntersectionTypeNode(s,l(s.types,c,e.isTypeNode));case 179:return e.updateConditionalTypeNode(s,r(s.checkType,c,e.isTypeNode),r(s.extendsType,c,e.isTypeNode),r(s.trueType,c,e.isTypeNode),r(s.falseType,c,e.isTypeNode));case 180:return e.updateInferTypeNode(s,r(s.typeParameter,c,e.isTypeParameterDeclaration));case 187:return e.updateImportTypeNode(s,r(s.argument,c,e.isTypeNode),r(s.qualifier,c,e.isEntityName),n(s.typeArguments,c,e.isTypeNode),s.isTypeOf);case 181:return e.updateParenthesizedType(s,r(s.type,c,e.isTypeNode));case 183:return e.updateTypeOperatorNode(s,r(s.type,c,e.isTypeNode));case 184:return e.updateIndexedAccessTypeNode(s,r(s.objectType,c,e.isTypeNode),r(s.indexType,c,e.isTypeNode));case 185:return e.updateMappedTypeNode(s,r(s.readonlyToken,_,e.isToken),r(s.typeParameter,c,e.isTypeParameterDeclaration),r(s.questionToken,_,e.isToken),r(s.type,c,e.isTypeNode));case 186:return e.updateLiteralTypeNode(s,r(s.literal,c,e.isExpression));case 188:return e.updateObjectBindingPattern(s,l(s.elements,c,e.isBindingElement));case 189:return e.updateArrayBindingPattern(s,l(s.elements,c,e.isArrayBindingElement));case 190:return e.updateBindingElement(s,r(s.dotDotDotToken,_,e.isToken),r(s.propertyName,c,e.isPropertyName),r(s.name,c,e.isBindingName),r(s.initializer,c,e.isExpression));case 191:return e.updateArrayLiteral(s,l(s.elements,c,e.isExpression));case 192:return e.updateObjectLiteral(s,l(s.properties,c,e.isObjectLiteralElementLike));case 193:return 32&s.flags?e.updatePropertyAccessChain(s,r(s.expression,c,e.isExpression),r(s.questionDotToken,c,e.isToken),r(s.name,c,e.isIdentifier)):e.updatePropertyAccess(s,r(s.expression,c,e.isExpression),r(s.name,c,e.isIdentifier));case 194:return 32&s.flags?e.updateElementAccessChain(s,r(s.expression,c,e.isExpression),r(s.questionDotToken,c,e.isToken),r(s.argumentExpression,c,e.isExpression)):e.updateElementAccess(s,r(s.expression,c,e.isExpression),r(s.argumentExpression,c,e.isExpression));case 195:return 32&s.flags?e.updateCallChain(s,r(s.expression,c,e.isExpression),r(s.questionDotToken,c,e.isToken),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression)):e.updateCall(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 196:return e.updateNew(s,r(s.expression,c,e.isExpression),l(s.typeArguments,c,e.isTypeNode),l(s.arguments,c,e.isExpression));case 197:return e.updateTaggedTemplate(s,r(s.tag,c,e.isExpression),n(s.typeArguments,c,e.isExpression),r(s.template,c,e.isTemplateLiteral));case 198:return e.updateTypeAssertion(s,r(s.type,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 199:return e.updateParen(s,r(s.expression,c,e.isExpression));case 200:return e.updateFunctionExpression(s,l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 201:return e.updateArrowFunction(s,l(s.modifiers,c,e.isModifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),r(s.equalsGreaterThanToken,c,e.isToken),o(s.body,c,u));case 202:return e.updateDelete(s,r(s.expression,c,e.isExpression));case 203:return e.updateTypeOf(s,r(s.expression,c,e.isExpression));case 204:return e.updateVoid(s,r(s.expression,c,e.isExpression));case 205:return e.updateAwait(s,r(s.expression,c,e.isExpression));case 206:return e.updatePrefix(s,r(s.operand,c,e.isExpression));case 207:return e.updatePostfix(s,r(s.operand,c,e.isExpression));case 208:return e.updateBinary(s,r(s.left,c,e.isExpression),r(s.right,c,e.isExpression),r(s.operatorToken,c,e.isToken));case 209:return e.updateConditional(s,r(s.condition,c,e.isExpression),r(s.questionToken,c,e.isToken),r(s.whenTrue,c,e.isExpression),r(s.colonToken,c,e.isToken),r(s.whenFalse,c,e.isExpression));case 210:return e.updateTemplateExpression(s,r(s.head,c,e.isTemplateHead),l(s.templateSpans,c,e.isTemplateSpan));case 211:return e.updateYield(s,r(s.asteriskToken,_,e.isToken),r(s.expression,c,e.isExpression));case 212:return e.updateSpread(s,r(s.expression,c,e.isExpression));case 213:return e.updateClassExpression(s,l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 215:return e.updateExpressionWithTypeArguments(s,l(s.typeArguments,c,e.isTypeNode),r(s.expression,c,e.isExpression));case 216:return e.updateAsExpression(s,r(s.expression,c,e.isExpression),r(s.type,c,e.isTypeNode));case 217:return e.updateNonNullExpression(s,r(s.expression,c,e.isExpression));case 218:return e.updateMetaProperty(s,r(s.name,c,e.isIdentifier));case 220:return e.updateTemplateSpan(s,r(s.expression,c,e.isExpression),r(s.literal,c,e.isTemplateMiddleOrTemplateTail));case 222:return e.updateBlock(s,l(s.statements,c,e.isStatement));case 224:return e.updateVariableStatement(s,l(s.modifiers,c,e.isModifier),r(s.declarationList,c,e.isVariableDeclarationList));case 225:return e.updateExpressionStatement(s,r(s.expression,c,e.isExpression));case 226:return e.updateIf(s,r(s.expression,c,e.isExpression),r(s.thenStatement,c,e.isStatement,e.liftToBlock),r(s.elseStatement,c,e.isStatement,e.liftToBlock));case 227:return e.updateDo(s,r(s.statement,c,e.isStatement,e.liftToBlock),r(s.expression,c,e.isExpression));case 228:return e.updateWhile(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 229:return e.updateFor(s,r(s.initializer,c,e.isForInitializer),r(s.condition,c,e.isExpression),r(s.incrementor,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 230:return e.updateForIn(s,r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 231:return e.updateForOf(s,r(s.awaitModifier,c,e.isToken),r(s.initializer,c,e.isForInitializer),r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 232:return e.updateContinue(s,r(s.label,c,e.isIdentifier));case 233:return e.updateBreak(s,r(s.label,c,e.isIdentifier));case 234:return e.updateReturn(s,r(s.expression,c,e.isExpression));case 235:return e.updateWith(s,r(s.expression,c,e.isExpression),r(s.statement,c,e.isStatement,e.liftToBlock));case 236:return e.updateSwitch(s,r(s.expression,c,e.isExpression),r(s.caseBlock,c,e.isCaseBlock));case 237:return e.updateLabel(s,r(s.label,c,e.isIdentifier),r(s.statement,c,e.isStatement,e.liftToBlock));case 238:return e.updateThrow(s,r(s.expression,c,e.isExpression));case 239:return e.updateTry(s,r(s.tryBlock,c,e.isBlock),r(s.catchClause,c,e.isCatchClause),r(s.finallyBlock,c,e.isBlock));case 241:return e.updateVariableDeclaration(s,r(s.name,c,e.isBindingName),r(s.type,c,e.isTypeNode),r(s.initializer,c,e.isExpression));case 242:return e.updateVariableDeclarationList(s,l(s.declarations,c,e.isVariableDeclaration));case 243:return e.updateFunctionDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.asteriskToken,_,e.isToken),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),a(s.parameters,c,u,l),r(s.type,c,e.isTypeNode),o(s.body,c,u));case 244:return e.updateClassDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isClassElement));case 245:return e.updateInterfaceDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),l(s.heritageClauses,c,e.isHeritageClause),l(s.members,c,e.isTypeElement));case 246:return e.updateTypeAliasDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.typeParameters,c,e.isTypeParameterDeclaration),r(s.type,c,e.isTypeNode));case 247:return e.updateEnumDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),l(s.members,c,e.isEnumMember));case 248:return e.updateModuleDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.body,c,e.isModuleBody));case 249:return e.updateModuleBlock(s,l(s.statements,c,e.isStatement));case 250:return e.updateCaseBlock(s,l(s.clauses,c,e.isCaseOrDefaultClause));case 251:return e.updateNamespaceExportDeclaration(s,r(s.name,c,e.isIdentifier));case 252:return e.updateImportEqualsDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.name,c,e.isIdentifier),r(s.moduleReference,c,e.isModuleReference));case 253:return e.updateImportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.importClause,c,e.isImportClause),r(s.moduleSpecifier,c,e.isExpression));case 254:return e.updateImportClause(s,r(s.name,c,e.isIdentifier),r(s.namedBindings,c,e.isNamedImportBindings));case 255:return e.updateNamespaceImport(s,r(s.name,c,e.isIdentifier));case 256:return e.updateNamedImports(s,l(s.elements,c,e.isImportSpecifier));case 257:return e.updateImportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 258:return e.updateExportAssignment(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.expression,c,e.isExpression));case 259:return e.updateExportDeclaration(s,l(s.decorators,c,e.isDecorator),l(s.modifiers,c,e.isModifier),r(s.exportClause,c,e.isNamedExports),r(s.moduleSpecifier,c,e.isExpression));case 260:return e.updateNamedExports(s,l(s.elements,c,e.isExportSpecifier));case 261:return e.updateExportSpecifier(s,r(s.propertyName,c,e.isIdentifier),r(s.name,c,e.isIdentifier));case 263:return e.updateExternalModuleReference(s,r(s.expression,c,e.isExpression));case 264:return e.updateJsxElement(s,r(s.openingElement,c,e.isJsxOpeningElement),l(s.children,c,e.isJsxChild),r(s.closingElement,c,e.isJsxClosingElement));case 265:return e.updateJsxSelfClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 266:return e.updateJsxOpeningElement(s,r(s.tagName,c,e.isJsxTagNameExpression),l(s.typeArguments,c,e.isTypeNode),r(s.attributes,c,e.isJsxAttributes));case 267:return e.updateJsxClosingElement(s,r(s.tagName,c,e.isJsxTagNameExpression));case 268:return e.updateJsxFragment(s,r(s.openingFragment,c,e.isJsxOpeningFragment),l(s.children,c,e.isJsxChild),r(s.closingFragment,c,e.isJsxClosingFragment));case 271:return e.updateJsxAttribute(s,r(s.name,c,e.isIdentifier),r(s.initializer,c,e.isStringLiteralOrJsxExpression));case 272:return e.updateJsxAttributes(s,l(s.properties,c,e.isJsxAttributeLike));case 273:return e.updateJsxSpreadAttribute(s,r(s.expression,c,e.isExpression));case 274:return e.updateJsxExpression(s,r(s.expression,c,e.isExpression));case 275:return e.updateCaseClause(s,r(s.expression,c,e.isExpression),l(s.statements,c,e.isStatement));case 276:return e.updateDefaultClause(s,l(s.statements,c,e.isStatement));case 277:return e.updateHeritageClause(s,l(s.types,c,e.isExpressionWithTypeArguments));case 278:return e.updateCatchClause(s,r(s.variableDeclaration,c,e.isVariableDeclaration),r(s.block,c,e.isBlock));case 279:return e.updatePropertyAssignment(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 280:return e.updateShorthandPropertyAssignment(s,r(s.name,c,e.isIdentifier),r(s.objectAssignmentInitializer,c,e.isExpression));case 281:return e.updateSpreadAssignment(s,r(s.expression,c,e.isExpression));case 282:return e.updateEnumMember(s,r(s.name,c,e.isPropertyName),r(s.initializer,c,e.isExpression));case 288:return e.updateSourceFileNode(s,i(s.statements,c,u));case 319:return e.updatePartiallyEmittedExpression(s,r(s.expression,c,e.isExpression));case 320:return e.updateCommaList(s,l(s.elements,c,e.isExpression));default:return s}}}}(s||(s={})),function(e){function t(e,t,r){return e?t(r,e):r}function r(e,t,r){return e?t(r,e):r}function n(n,i,a,o){if(void 0===n)return i;var s=o?r:e.reduceLeft,c=o||a,u=n.kind;if(u>0&&u<=151)return i;if(u>=167&&u<=186)return i;var l=i;switch(n.kind){case 221:case 223:case 214:case 240:case 318:break;case 152:l=t(n.left,a,l),l=t(n.right,a,l);break;case 153:l=t(n.expression,a,l);break;case 155:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 156:l=t(n.expression,a,l);break;case 157:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.questionToken,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 158:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 160:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 161:l=s(n.modifiers,c,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 162:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 163:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.parameters,c,l),l=t(n.body,a,l);break;case 188:case 189:l=s(n.elements,c,l);break;case 190:l=t(n.propertyName,a,l),l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 191:l=s(n.elements,c,l);break;case 192:l=s(n.properties,c,l);break;case 193:l=t(n.expression,a,l),l=t(n.name,a,l);break;case 194:l=t(n.expression,a,l),l=t(n.argumentExpression,a,l);break;case 195:case 196:l=t(n.expression,a,l),l=s(n.typeArguments,c,l),l=s(n.arguments,c,l);break;case 197:l=t(n.tag,a,l),l=s(n.typeArguments,c,l),l=t(n.template,a,l);break;case 198:l=t(n.type,a,l),l=t(n.expression,a,l);break;case 200:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 201:l=s(n.modifiers,c,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 199:case 202:case 203:case 204:case 205:case 211:case 212:case 217:l=t(n.expression,a,l);break;case 206:case 207:l=t(n.operand,a,l);break;case 208:l=t(n.left,a,l),l=t(n.right,a,l);break;case 209:l=t(n.condition,a,l),l=t(n.whenTrue,a,l),l=t(n.whenFalse,a,l);break;case 210:l=t(n.head,a,l),l=s(n.templateSpans,c,l);break;case 213:l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 215:l=t(n.expression,a,l),l=s(n.typeArguments,c,l);break;case 216:l=t(n.expression,a,l),l=t(n.type,a,l);break;case 220:l=t(n.expression,a,l),l=t(n.literal,a,l);break;case 222:l=s(n.statements,c,l);break;case 224:l=s(n.modifiers,c,l),l=t(n.declarationList,a,l);break;case 225:l=t(n.expression,a,l);break;case 226:l=t(n.expression,a,l),l=t(n.thenStatement,a,l),l=t(n.elseStatement,a,l);break;case 227:l=t(n.statement,a,l),l=t(n.expression,a,l);break;case 228:case 235:l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 229:l=t(n.initializer,a,l),l=t(n.condition,a,l),l=t(n.incrementor,a,l),l=t(n.statement,a,l);break;case 230:case 231:l=t(n.initializer,a,l),l=t(n.expression,a,l),l=t(n.statement,a,l);break;case 234:case 238:l=t(n.expression,a,l);break;case 236:l=t(n.expression,a,l),l=t(n.caseBlock,a,l);break;case 237:l=t(n.label,a,l),l=t(n.statement,a,l);break;case 239:l=t(n.tryBlock,a,l),l=t(n.catchClause,a,l),l=t(n.finallyBlock,a,l);break;case 241:l=t(n.name,a,l),l=t(n.type,a,l),l=t(n.initializer,a,l);break;case 242:l=s(n.declarations,c,l);break;case 243:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.parameters,c,l),l=t(n.type,a,l),l=t(n.body,a,l);break;case 244:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.typeParameters,c,l),l=s(n.heritageClauses,c,l),l=s(n.members,c,l);break;case 247:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=s(n.members,c,l);break;case 248:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.body,a,l);break;case 249:l=s(n.statements,c,l);break;case 250:l=s(n.clauses,c,l);break;case 252:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.name,a,l),l=t(n.moduleReference,a,l);break;case 253:l=s(n.decorators,c,l),l=s(n.modifiers,c,l),l=t(n.importClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 254:l=t(n.name,a,l),l=t(n.namedBindings,a,l);break;case 255:l=t(n.name,a,l);break;case 256:case 260:l=s(n.elements,c,l);break;case 257:case 261:l=t(n.propertyName,a,l),l=t(n.name,a,l);break;case 258:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.expression,a,l);break;case 259:l=e.reduceLeft(n.decorators,a,l),l=e.reduceLeft(n.modifiers,a,l),l=t(n.exportClause,a,l),l=t(n.moduleSpecifier,a,l);break;case 263:l=t(n.expression,a,l);break;case 264:l=t(n.openingElement,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingElement,a,l);break;case 268:l=t(n.openingFragment,a,l),l=e.reduceLeft(n.children,a,l),l=t(n.closingFragment,a,l);break;case 265:case 266:l=t(n.tagName,a,l),l=s(n.typeArguments,a,l),l=t(n.attributes,a,l);break;case 272:l=s(n.properties,c,l);break;case 267:l=t(n.tagName,a,l);break;case 271:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 273:case 274:l=t(n.expression,a,l);break;case 275:l=t(n.expression,a,l);case 276:l=s(n.statements,c,l);break;case 277:l=s(n.types,c,l);break;case 278:l=t(n.variableDeclaration,a,l),l=t(n.block,a,l);break;case 279:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 280:l=t(n.name,a,l),l=t(n.objectAssignmentInitializer,a,l);break;case 281:l=t(n.expression,a,l);break;case 282:l=t(n.name,a,l),l=t(n.initializer,a,l);break;case 288:l=s(n.statements,c,l);break;case 319:l=t(n.expression,a,l);break;case 320:l=s(n.elements,c,l)}return l}function i(t){if(void 0===t)return 0;if(536870912&t.transformFlags)return t.transformFlags&~e.getTransformFlagsSubtreeExclusions(t.kind);var r=function(t){if(e.hasModifier(t,2)||e.isTypeNode(t)&&215!==t.kind)return 0;return n(t,0,a,o)}(t);return e.computeTransformFlagsForNode(t,r)}function a(e,t){return e|i(t)}function o(e,t){return e|function(e){if(void 0===e)return 0;for(var t=0,r=0,n=0,a=e;n=E,"generatedLine cannot backtrack"),e.Debug.assert(r>=0,"generatedCharacter cannot be negative"),_();for(var c,u=[],l=a(n.mappings),p=l.next();!p.done;p=l.next()){var f=p.value;if(s&&(f.generatedLine>s.line||f.generatedLine===s.line&&f.generatedCharacter>s.character))break;if(!o||!(f.generatedLine=E,"generatedLine cannot backtrack"),e.Debug.assert(r>=0,"generatedCharacter cannot be negative"),e.Debug.assert(void 0===n||n>=0,"sourceIndex cannot be negative"),e.Debug.assert(void 0===i||i>=0,"sourceLine cannot be negative"),e.Debug.assert(void 0===a||a>=0,"sourceCharacter cannot be negative"),_(),(function(e,t){return!P||E!==e||C!==t}(t,r)||function(e,t,r){return void 0!==e&&void 0!==t&&void 0!==r&&k===e&&(N>t||N===t&&A>r)}(n,i,a))&&(B(),E=t,C=r,w=!1,I=!1,P=!0),void 0!==n&&void 0!==i&&void 0!==a&&(k=n,N=i,A=a,w=!0,void 0!==o&&(F=o,I=!0)),d()}function B(){if(P&&(!T||h!==E||v!==C||b!==k||x!==N||D!==A||S!==F)){if(_(),h=e.length)return d("Error in decoding base64VLQFormatDecode, past the mapping string"),-1;var o=(t=e.charCodeAt(n))>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:43===t?62:47===t?63:-1;if(-1===o)return d("Invalid character in VLQ"),-1;r=0!=(32&o),a|=(31&o)<>=1:a=-(a>>=1),a}}function o(e){return void 0!==e.sourceIndex&&void 0!==e.sourceLine&&void 0!==e.sourceCharacter}function s(t){t<0?t=1+(-t<<1):t<<=1;var r,n="";do{var i=31&t;(t>>=5)>0&&(i|=32),n+=String.fromCharCode((r=i)>=0&&r<26?65+r:r>=26&&r<52?97+r-26:r>=52&&r<62?48+r-52:62===r?43:63===r?47:e.Debug.fail(r+": not a base64 value"))}while(t>0);return n}function c(e){return void 0!==e.sourceIndex&&void 0!==e.sourcePosition}function u(e,t){return e.generatedPosition===t.generatedPosition&&e.sourceIndex===t.sourceIndex&&e.sourcePosition===t.sourcePosition}function l(t,r){return e.Debug.assert(t.sourceIndex===r.sourceIndex),e.compareValues(t.sourcePosition,r.sourcePosition)}function _(t,r){return e.compareValues(t.generatedPosition,r.generatedPosition)}function d(e){return e.sourcePosition}function p(e){return e.generatedPosition}e.getLineInfo=function(e,t){return{getLineCount:function(){return t.length},getLineText:function(r){return e.substring(t[r],t[r+1])}}},e.tryGetSourceMappingURL=function(e){for(var n=e.getLineCount()-1;n>=0;n--){var i=e.getLineText(n),a=t.exec(i);if(a)return a[1];if(!i.match(r))break}},e.isRawSourceMap=i,e.tryParseRawSourceMap=function(e){try{var t=JSON.parse(e);if(i(t))return t}catch(e){}},e.decodeMappings=a,e.sameMapping=function(e,t){return e===t||e.generatedLine===t.generatedLine&&e.generatedCharacter===t.generatedCharacter&&e.sourceIndex===t.sourceIndex&&e.sourceLine===t.sourceLine&&e.sourceCharacter===t.sourceCharacter&&e.nameIndex===t.nameIndex},e.isSourceMapping=o,e.createDocumentPositionMapper=function(t,r,n){var i,s,f,m=e.getDirectoryPath(n),g=r.sourceRoot?e.getNormalizedAbsolutePath(r.sourceRoot,m):m,y=e.getNormalizedAbsolutePath(r.file,m),h=t.getSourceFileLike(y),v=r.sources.map((function(t){return e.getNormalizedAbsolutePath(t,g)})),b=e.createMapFromEntries(v.map((function(e,r){return[t.getCanonicalFileName(e),r]})));return{getSourcePosition:function(t){var r=T();if(!e.some(r))return t;var n=e.binarySearchKey(r,t.pos,p,e.compareValues);n<0&&(n=~n);var i=r[n];if(void 0===i||!c(i))return t;return{fileName:v[i.sourceIndex],pos:i.sourcePosition}},getGeneratedPosition:function(r){var n=b.get(t.getCanonicalFileName(r.fileName));if(void 0===n)return r;var i=S(n);if(!e.some(i))return r;var a=e.binarySearchKey(i,r.pos,d,e.compareValues);a<0&&(a=~a);var o=i[a];if(void 0===o||o.sourceIndex!==n)return r;return{fileName:y,pos:o.generatedPosition}}};function x(n){var i,a,s=void 0!==h?e.getPositionOfLineAndCharacter(h,n.generatedLine,n.generatedCharacter,!0):-1;if(o(n)){var c=t.getSourceFileLike(v[n.sourceIndex]);i=r.sources[n.sourceIndex],a=void 0!==c?e.getPositionOfLineAndCharacter(c,n.sourceLine,n.sourceCharacter,!0):-1}return{generatedPosition:s,source:i,sourceIndex:n.sourceIndex,sourcePosition:a,nameIndex:n.nameIndex}}function D(){if(void 0===i){var n=a(r.mappings),o=e.arrayFrom(n,x);void 0!==n.error?(t.log&&t.log("Encountered error while decoding sourcemap: "+n.error),i=e.emptyArray):i=o}return i}function S(t){if(void 0===f){for(var r=[],n=0,i=D();n0&&i!==n.elements.length||!!(n.elements.length-i)&&e.isDefaultImport(t)}function i(t){return!n(t)&&(e.isDefaultImport(t)||!!t.importClause&&e.isNamedImports(t.importClause.namedBindings)&&function(t){return!!t&&(!!e.isNamedImports(t)&&e.some(t.elements,r))}(t.importClause.namedBindings))}function a(t,r,n){if(e.isBindingPattern(t.name))for(var i=0,o=t.name.elements;i=1)||12288&g.transformFlags||12288&e.getTargetOfBindingOrAssignmentElement(g).transformFlags||e.isComputedPropertyName(y)){u&&(t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o),u=void 0);var h=n(t,s,y);e.isComputedPropertyName(y)&&(l=e.append(l,h.argumentExpression)),r(t,g,h,g)}else u=e.append(u,g)}}u&&t.emitBindingOrAssignment(t.createObjectBindingOrAssignmentPattern(u),s,c,o)}(t,a,l,o,s):e.isArrayBindingOrAssignmentPattern(l)?function(t,n,a,o,s){var c,u,l=e.getElementsOfBindingOrAssignmentPattern(a),_=l.length;if(t.level<1&&t.downlevelIteration)o=i(t,e.createReadHelper(t.context,o,_>0&&e.getRestIndicatorOfBindingOrAssignmentElement(l[_-1])?void 0:_,s),!1,s);else if(1!==_&&(t.level<1||0===_)||e.every(l,e.isOmittedExpression)){var d=!e.isDeclarationBindingElement(n)||0!==_;o=i(t,o,d,s)}for(var p=0;p<_;p++){var f=l[p];if(t.level>=1)if(8192&f.transformFlags){var m=e.createTempVariable(void 0);t.hoistTempVariables&&t.context.hoistVariableDeclaration(m),u=e.append(u,[m,f]),c=e.append(c,t.createArrayBindingOrAssignmentElement(m))}else c=e.append(c,f);else{if(e.isOmittedExpression(f))continue;if(e.getRestIndicatorOfBindingOrAssignmentElement(f)){if(p===_-1){g=e.createArraySlice(o,p);r(t,f,g,f)}}else{var g=e.createElementAccess(o,p);r(t,f,g,f)}}}c&&t.emitBindingOrAssignment(t.createArrayBindingOrAssignmentPattern(c),o,s,a);if(u)for(var y=0,h=u;y0)return!0;var r=e.getFirstConstructorWithBody(t);if(r)return e.forEach(r.parameters,j);return!1})(t)&&(n|=2);e.childIsDecorated(t)&&(n|=4);Ee(t)?n|=8:!function(t){return Ce(t)&&e.hasModifier(t,512)}(t)?ke(t)&&(n|=16):n|=32;D<=1&&7&n&&(n|=128);return n}(i,a);128&s&&t.startLexicalEnvironment();var c=i.name||(5&s?e.getGeneratedNameForNode(i):void 0),u=2&s?function(r,n){var i=e.moveRangePastDecorators(r),a=function(r){if(16777216&v.getNodeCheckFlags(r)){0==(1&d)&&(d|=1,t.enableSubstitution(75),p=[]);var n=e.createUniqueName(r.name&&!e.isGeneratedIdentifier(r.name)?e.idText(r.name):"default");return p[e.getOriginalNodeId(r)]=n,h(n),n}}(r),o=e.getLocalName(r,!1,!0),s=e.visitNodes(r.heritageClauses,N,e.isHeritageClause),c=z(r),u=e.createClassExpression(void 0,n,void 0,s,c);e.aggregateTransformFlags(u),e.setOriginalNode(u,r),e.setTextRange(u,i);var l=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(o,void 0,a?e.createAssignment(a,u):u)],1));return e.setOriginalNode(l,r),e.setTextRange(l,i),e.setCommentRange(l,r),l}(i,c):function(t,r,n){var i=128&n?void 0:e.visitNodes(t.modifiers,L,e.isModifier),a=e.createClassDeclaration(void 0,i,r,void 0,e.visitNodes(t.heritageClauses,N,e.isHeritageClause),z(t)),o=e.getEmitFlags(t);1&n&&(o|=32);return e.aggregateTransformFlags(a),e.setTextRange(a,t),e.setOriginalNode(a,t),e.setEmitFlags(a,o),a}(i,c,s),l=[u];if(H(l,i,!1),H(l,i,!0),function(r,i){var a=function(r){var i=function(t){var r=t.decorators,n=q(e.getFirstConstructorWithBody(t));if(!r&&!n)return;return{decorators:r,parameters:n}}(r),a=G(r,r,i);if(!a)return;var o=p&&p[e.getOriginalNodeId(r)],s=e.getLocalName(r,!1,!0),c=n(t,a,s),u=e.createAssignment(s,o?e.createAssignment(o,c):c);return e.setEmitFlags(u,1536),e.setSourceMapRange(u,e.moveRangePastDecorators(r)),u}(i);a&&r.push(e.setOriginalNode(e.createExpressionStatement(a),i))}(l,i),128&s){var _=e.createTokenRange(e.skipTrivia(r.text,i.members.end),19),f=e.getInternalName(i),m=e.createPartiallyEmittedExpression(f);m.end=_.end,e.setEmitFlags(m,1536);var g=e.createReturn(m);g.pos=_.pos,e.setEmitFlags(g,1920),l.push(g),e.insertStatementsAfterStandardPrologue(l,t.endLexicalEnvironment());var y=e.createImmediatelyInvokedArrowFunction(l);e.setEmitFlags(y,33554432);var b=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getLocalName(i,!1,!1),void 0,y)]));e.setOriginalNode(b,i),e.setCommentRange(b,i),e.setSourceMapRange(b,e.moveRangePastDecorators(i)),e.startOnNewLine(b),l=[b]}8&s?Ae(l,i):(128&s||2&s)&&(32&s?l.push(e.createExportDefault(e.getLocalName(i,!1,!0))):16&s&&l.push(e.createExternalModuleExport(e.getLocalName(i,!1,!0))));l.length>1&&(l.push(e.createEndOfDeclarationMarker(i)),e.setEmitFlags(u,4194304|e.getEmitFlags(u)));return e.singleOrMany(l)}(i);case 213:return function(r){if(!J(r))return e.visitEachChild(r,N,t);var n=e.createClassExpression(void 0,r.name,void 0,e.visitNodes(r.heritageClauses,N,e.isHeritageClause),z(r));return e.aggregateTransformFlags(n),e.setOriginalNode(n,r),e.setTextRange(n,r),n}(i);case 277:return function(r){if(112===r.token)return;return e.visitEachChild(r,N,t)}(i);case 215:return function(t){return e.updateExpressionWithTypeArguments(t,void 0,e.visitNode(t.expression,N,e.isLeftHandSideExpression))}(i);case 160:return function(r){if(!se(r))return;var n=e.updateMethod(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),r.asteriskToken,oe(r),void 0,void 0,e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t));n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r)));return n}(i);case 162:return function(r){if(!_e(r))return;var n=e.updateGetAccessor(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),oe(r),e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t)||e.createBlock([]));n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r)));return n}(i);case 163:return function(r){if(!_e(r))return;var n=e.updateSetAccessor(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),oe(r),e.visitParameterList(r.parameters,N,t),e.visitFunctionBody(r.body,N,t)||e.createBlock([]));n!==r&&(e.setCommentRange(n,r),e.setSourceMapRange(n,e.moveRangePastDecorators(r)));return n}(i);case 243:return function(r){if(!se(r))return e.createNotEmittedStatement(r);var n=e.updateFunctionDeclaration(r,void 0,e.visitNodes(r.modifiers,L,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t)||e.createBlock([]));if(Ee(r)){var i=[n];return Ae(i,r),i}return n}(i);case 200:return function(r){if(!se(r))return e.createOmittedExpression();return e.updateFunctionExpression(r,e.visitNodes(r.modifiers,L,e.isModifier),r.asteriskToken,r.name,void 0,e.visitParameterList(r.parameters,N,t),void 0,e.visitFunctionBody(r.body,N,t)||e.createBlock([]))}(i);case 201:return function(r){return e.updateArrowFunction(r,e.visitNodes(r.modifiers,L,e.isModifier),void 0,e.visitParameterList(r.parameters,N,t),void 0,r.equalsGreaterThanToken,e.visitFunctionBody(r.body,N,t))}(i);case 155:return function(t){if(e.parameterIsThisKeyword(t))return;var r=e.updateParameter(t,void 0,void 0,t.dotDotDotToken,e.visitNode(t.name,N,e.isBindingName),void 0,void 0,e.visitNode(t.initializer,N,e.isExpression));r!==t&&(e.setCommentRange(r,t),e.setTextRange(r,e.moveRangePastModifiers(t)),e.setSourceMapRange(r,e.moveRangePastModifiers(t)),e.setEmitFlags(r.name,32));return r}(i);case 199:return function(n){var i=e.skipOuterExpressions(n.expression,-3);if(e.isAssertionExpression(i)){var a=e.visitNode(n.expression,N,e.isExpression);return e.length(e.getLeadingCommentRangesOfNode(a,r))?e.updateParen(n,a):e.createPartiallyEmittedExpression(a,n)}return e.visitEachChild(n,N,t)}(i);case 198:case 216:return function(t){var r=e.visitNode(t.expression,N,e.isExpression);return e.createPartiallyEmittedExpression(r,t)}(i);case 195:return function(t){return e.updateCall(t,e.visitNode(t.expression,N,e.isExpression),void 0,e.visitNodes(t.arguments,N,e.isExpression))}(i);case 196:return function(t){return e.updateNew(t,e.visitNode(t.expression,N,e.isExpression),void 0,e.visitNodes(t.arguments,N,e.isExpression))}(i);case 197:return function(t){return e.updateTaggedTemplate(t,e.visitNode(t.tag,N,e.isExpression),void 0,e.visitNode(t.template,N,e.isExpression))}(i);case 217:return function(t){var r=e.visitNode(t.expression,N,e.isLeftHandSideExpression);return e.createPartiallyEmittedExpression(r,t)}(i);case 247:return function(t){if(!function(t){return!e.isEnumConst(t)||b.preserveConstEnums||b.isolatedModules}(t))return e.createNotEmittedStatement(t);var n=[],i=2,a=ye(n,t);a&&(S===e.ModuleKind.System&&c===r||(i|=512));var o=we(t),u=Ie(t),l=e.hasModifier(t,1)?e.getExternalModuleOrNamespaceExportName(s,t,!1,!0):e.getLocalName(t,!1,!0),_=e.createLogicalOr(l,e.createAssignment(l,e.createObjectLiteral()));if(fe(t)){var d=e.getLocalName(t,!1,!0);_=e.createAssignment(d,_)}var p=e.createExpressionStatement(e.createCall(e.createFunctionExpression(void 0,void 0,void 0,void 0,[e.createParameter(void 0,void 0,void 0,o)],void 0,function(t,r){var n=s;s=r;var i=[];m();var a=e.map(t.members,pe);return e.insertStatementsAfterStandardPrologue(i,y()),e.addRange(i,a),s=n,e.createBlock(e.setTextRange(e.createNodeArray(i),t.members),!0)}(t,u)),void 0,[_]));e.setOriginalNode(p,t),a&&(e.setSyntheticLeadingComments(p,void 0),e.setSyntheticTrailingComments(p,void 0));return e.setTextRange(p,t),e.addEmitFlags(p,i),n.push(p),n.push(e.createEndOfDeclarationMarker(t)),n}(i);case 224:return function(r){if(Ee(r)){var n=e.getInitializedVariables(r.declarationList);if(0===n.length)return;return e.setTextRange(e.createExpressionStatement(e.inlineExpressions(e.map(n,de))),r)}return e.visitEachChild(r,N,t)}(i);case 241:return function(t){return e.updateVariableDeclaration(t,e.visitNode(t.name,N,e.isBindingName),void 0,e.visitNode(t.initializer,N,e.isExpression))}(i);case 248:return he(i);case 252:return Te(i);default:return e.visitEachChild(i,N,t)}}function B(r){var n=e.getStrictOptionValue(b,"alwaysStrict")&&!(e.isExternalModule(r)&&S>=e.ModuleKind.ES2015)&&!e.isJsonSourceFile(r);return e.updateSourceFileNode(r,e.visitLexicalEnvironment(r.statements,F,t,0,n))}function j(e){return void 0!==e.decorators&&e.decorators.length>0}function K(e){return!!(1024&e.transformFlags)}function J(t){return e.some(t.decorators)||e.some(t.typeParameters)||e.some(t.heritageClauses,K)||e.some(t.members,K)}function z(t){var r=[],n=e.getFirstConstructorWithBody(t),i=n&&e.filter(n.parameters,(function(t){return e.isParameterPropertyDeclaration(t,n)}));if(i)for(var a=0,o=i;a0&&e.parameterIsThisKeyword(n[0]),a=i?1:0,o=i?n.length-1:n.length,s=0;s0?158===i.kind?e.createVoidZero():e.createNull():void 0,u=n(t,a,o,s,c,e.moveRangePastDecorators(i));return e.setEmitFlags(u,1536),u}}function X(t){return e.visitNode(t.expression,N,e.isExpression)}function Q(r,n){var i;if(r){i=[];for(var o=0,s=r;o= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n };'},e.metadataHelper={name:"typescript:metadata",importName:"__metadata",scoped:!1,priority:3,text:'\n var __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);\n };'},e.paramHelper={name:"typescript:param",importName:"__param",scoped:!1,priority:4,text:"\n var __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n };"}}(s||(s={})),function(e){var r;!function(e){e[e.ClassAliases=1]="ClassAliases"}(r||(r={})),e.transformClassFields=function(r){var n,i,a,o,s=r.hoistVariableDeclaration,c=r.endLexicalEnvironment,u=r.resumeLexicalEnvironment,l=r.getEmitResolver(),_=r.onSubstituteNode;return r.onSubstituteNode=function(t,r){if(r=_(t,r),1===t)return function(t){switch(t.kind){case 75:return function(t){return function(t){if(1&n&&33554432&l.getNodeCheckFlags(t)){var r=l.getReferencedValueDeclaration(t);if(r){var a=i[r.id];if(a){var o=e.getSynthesizedClone(a);return e.setSourceMapRange(o,t),e.setCommentRange(o,t),o}}}return}(t)||t}(t)}return t}(r);return r},e.chainBundle((function(t){var n=r.getCompilerOptions();if(t.isDeclarationFile||n.useDefineForClassFields&&99===n.target)return t;var i=e.visitEachChild(t,d,r);return e.addEmitHelpers(i,r.readEmitHelpers()),i}));function d(c){if(!(1048576&c.transformFlags))return c;switch(c.kind){case 213:return function(t){if(!e.forEach(t.members,e.isPropertyDeclaration))return e.visitEachChild(t,d,r);var c=a;a=void 0;var u=e.isClassDeclaration(e.getOriginalNode(t)),_=e.getProperties(t,!0,!0),p=e.getEffectiveBaseTypeNode(t),y=!(!p||99===e.skipOuterExpressions(p.expression).kind),h=e.updateClassExpression(t,t.modifiers,t.name,void 0,e.visitNodes(t.heritageClauses,d,e.isHeritageClause),f(t,y));if(e.some(_)||e.some(a)){if(u)return e.Debug.assertDefined(o,"Decorated classes transformed by TypeScript are expected to be within a variable declaration."),o&&a&&e.some(a)&&o.push(e.createExpressionStatement(e.inlineExpressions(a))),a=c,o&&e.some(_)&&m(o,_,e.getInternalName(t)),h;var v=[],b=16777216&l.getNodeCheckFlags(t),x=e.createTempVariable(s,!!b);if(b){0==(1&n)&&(n|=1,r.enableSubstitution(75),i=[]);var D=e.getSynthesizedClone(x);D.autoGenerateFlags&=-9,i[e.getOriginalNodeId(t)]=D}return e.setEmitFlags(h,65536|e.getEmitFlags(h)),v.push(e.startOnNewLine(e.createAssignment(x,h))),e.addRange(v,e.map(a,e.startOnNewLine)),e.addRange(v,function(t,r){for(var n=[],i=0,a=t;i0&&(e.addRange(s,e.visitNodes(n.body.statements,d,e.isStatement,o,l)),o+=l)}m(s,a,e.createThis()),n&&e.addRange(s,e.visitNodes(n.body.statements,d,e.isStatement,o));return s=e.mergeLexicalEnvironment(s,c()),e.setTextRange(e.createBlock(e.setTextRange(e.createNodeArray(s),n?n.body.statements:t.members),!0),n?n.body:void 0)}(t,i,n);if(!o)return;return e.startOnNewLine(e.setOriginalNode(e.setTextRange(e.createConstructor(void 0,void 0,a,o),i||t),i))}(t,n);return a&&i.push(a),e.addRange(i,e.visitNodes(t.members,p,e.isClassElement)),e.setTextRange(e.createNodeArray(i),t.members)}function m(t,r,n){for(var i=0,a=r;i=2&&6144&p.getNodeCheckFlags(t);if(P&&(0==(1&a)&&(a|=1,r.enableSubstitution(195),r.enableSubstitution(193),r.enableSubstitution(194),r.enableEmitNotification(244),r.enableEmitNotification(160),r.enableEmitNotification(162),r.enableEmitNotification(163),r.enableEmitNotification(161),r.enableEmitNotification(224)),e.hasEntries(s))){var w=n(p,t,s);y[e.getNodeId(w)]=!0,e.insertStatementsAfterStandardPrologue(A,[w])}var I=e.createBlock(A,!0);e.setTextRange(I,t.body),P&&c&&(4096&p.getNodeCheckFlags(t)?e.addEmitHelper(I,e.advancedAsyncSuperHelper):2048&p.getNodeCheckFlags(t)&&e.addEmitHelper(I,e.asyncSuperHelper)),S=I}return o=v,g||(s=T,c=E),S}function O(t,r){return e.isBlock(t)?e.updateBlock(t,e.visitNodes(t.statements,S,e.isStatement,r)):e.convertToFunctionBody(e.visitNode(t,S,e.isConciseBody))}function M(t){return 101===t.expression.kind?e.setTextRange(e.createPropertyAccess(e.createFileLevelUniqueName("_super"),t.name),t):t}function L(t){return 101===t.expression.kind?(r=t.argumentExpression,n=t,4096&g?e.setTextRange(e.createPropertyAccess(e.createCall(e.createFileLevelUniqueName("_superIndex"),void 0,[r]),"value"),n):e.setTextRange(e.createCall(e.createFileLevelUniqueName("_superIndex"),void 0,[r]),n)):t;var r,n}},e.createSuperAccessVariableStatement=n,e.awaiterHelper={name:"typescript:awaiter",importName:"__awaiter",scoped:!1,priority:5,text:'\n var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n };'},e.asyncSuperHelper={name:"typescript:async-super",scoped:!0,text:e.helperString(a(["\n const "," = name => super[name];"],["\n const "," = name => super[name];"]),"_superIndex")},e.advancedAsyncSuperHelper={name:"typescript:advanced-async-super",scoped:!0,text:e.helperString(a(["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"],["\n const "," = (function (geti, seti) {\n const cache = Object.create(null);\n return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\n })(name => super[name], (name, value) => super[name] = value);"]),"_superIndex")}}(s||(s={})),function(e){var r;function n(t,r){return t.getCompilerOptions().target>=2?e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"assign"),void 0,r):(t.requestEmitHelper(e.assignHelper),e.createCall(e.getUnscopedHelperName("__assign"),void 0,r))}function i(t,r){return t.requestEmitHelper(e.awaitHelper),e.createCall(e.getUnscopedHelperName("__await"),void 0,[r])}function a(t,r,n){return t.requestEmitHelper(e.asyncValues),e.setTextRange(e.createCall(e.getUnscopedHelperName("__asyncValues"),void 0,[r]),n)}!function(e){e[e.AsyncMethodsWithSuper=1]="AsyncMethodsWithSuper"}(r||(r={})),e.transformES2018=function(r){var o=r.resumeLexicalEnvironment,s=r.endLexicalEnvironment,c=r.hoistVariableDeclaration,u=r.getEmitResolver(),l=r.getCompilerOptions(),_=e.getEmitScriptTarget(l),d=r.onEmitNode;r.onEmitNode=function(t,r,n){if(1&f&&function(e){var t=e.kind;return 244===t||161===t||160===t||162===t||163===t}(r)){var i=6144&u.getNodeCheckFlags(r);if(i!==b){var a=b;return b=i,d(t,r,n),void(b=a)}}else if(f&&x[e.getNodeId(r)]){a=b;return b=0,d(t,r,n),void(b=a)}d(t,r,n)};var p=r.onSubstituteNode;r.onSubstituteNode=function(r,n){if(n=p(r,n),1===r&&b)return function(r){switch(r.kind){case 193:return K(r);case 194:return J(r);case 195:return function(r){var n=r.expression;if(e.isSuperProperty(n)){var i=e.isPropertyAccessExpression(n)?K(n):J(n);return e.createCall(e.createPropertyAccess(i,"call"),void 0,t([e.createThis()],r.arguments))}return r}(r)}return r}(n);return n};var f,m,g,y,h,v=!1,b=0,x=[];return e.chainBundle((function(t){if(t.isDeclarationFile)return t;v=!1,g=e.isEffectiveStrictModeSourceFile(t,l);var n=e.visitEachChild(t,D,r);return e.addEmitHelpers(n,r.readEmitHelpers()),n}));function D(e){return k(e,!1)}function S(e){return k(e,!0)}function T(e){if(125!==e.kind)return e}function E(e,t){if(g){g=!1;var r=e(t);return g=!0,r}return e(t)}function C(t){return e.visitEachChild(t,D,r)}function k(o,s){if(0==(16&o.transformFlags))return o;switch(o.kind){case 205:return function(t){if(2&m&&1&m)return e.setOriginalNode(e.setTextRange(e.createYield(i(r,e.visitNode(t.expression,D,e.isExpression))),t),t);return e.visitEachChild(t,D,r)}(o);case 211:return function(t){if(2&m&&1&m){if(t.asteriskToken){var n=e.visitNode(t.expression,D,e.isExpression);return e.setOriginalNode(e.setTextRange(e.createYield(i(r,e.updateYield(t,t.asteriskToken,function(t,r,n){return t.requestEmitHelper(e.awaitHelper),t.requestEmitHelper(e.asyncDelegator),e.setTextRange(e.createCall(e.getUnscopedHelperName("__asyncDelegator"),void 0,[r]),n)}(r,a(r,n,n),n)))),t),t)}return e.setOriginalNode(e.setTextRange(e.createYield(F(t.expression?e.visitNode(t.expression,D,e.isExpression):e.createVoidZero())),t),t)}return e.visitEachChild(t,D,r)}(o);case 234:return function(t){if(2&m&&1&m)return e.updateReturn(t,F(t.expression?e.visitNode(t.expression,D,e.isExpression):e.createVoidZero()));return e.visitEachChild(t,D,r)}(o);case 237:return function(t){if(2&m){var n=e.unwrapInnermostStatementOfLabel(t);return 231===n.kind&&n.awaitModifier?A(n,t):e.restoreEnclosingLabel(e.visitEachChild(n,D,r),t)}return e.visitEachChild(t,D,r)}(o);case 192:return function(t){if(8192&t.transformFlags){var i=function(t){for(var r,n=[],i=0,a=t;i1){for(var o=1;o=2&&6144&u.getNodeCheckFlags(t);if(d){0==(1&f)&&(f|=1,r.enableSubstitution(195),r.enableSubstitution(193),r.enableSubstitution(194),r.enableEmitNotification(244),r.enableEmitNotification(160),r.enableEmitNotification(162),r.enableEmitNotification(163),r.enableEmitNotification(161),r.enableEmitNotification(224));var p=e.createSuperAccessVariableStatement(u,t,y);x[e.getNodeId(p)]=!0,e.insertStatementsAfterStandardPrologue(n,[p])}n.push(l),e.insertStatementsAfterStandardPrologue(n,s());var m=e.updateBlock(t.body,n);return d&&h&&(4096&u.getNodeCheckFlags(t)?e.addEmitHelper(m,e.advancedAsyncSuperHelper):2048&u.getNodeCheckFlags(t)&&e.addEmitHelper(m,e.asyncSuperHelper)),y=a,h=c,m}function B(t){o();var r=0,n=[],i=e.visitNode(t.body,D,e.isConciseBody);e.isBlock(i)&&(r=e.addPrologue(n,i.statements,!1,D)),e.addRange(n,j(void 0,t));var a=s();if(r>0||e.some(n)||e.some(a)){var c=e.convertToFunctionBody(i,!0);return e.insertStatementsAfterStandardPrologue(n,a),e.addRange(n,c.statements.slice(r)),e.updateBlock(c,e.setTextRange(e.createNodeArray(n),c.statements))}return i}function j(t,n){for(var i=0,a=n.parameters;i 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume("next", value); }\n function reject(value) { resume("throw", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n };'},e.asyncDelegator={name:"typescript:asyncDelegator",importName:"__asyncDelegator",scoped:!1,text:'\n var __asyncDelegator = (this && this.__asyncDelegator) || function (o) {\n var i, p;\n return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }\n };'},e.asyncValues={name:"typescript:asyncValues",importName:"__asyncValues",scoped:!1,text:'\n var __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n };'}}(s||(s={})),function(e){e.transformES2019=function(t){return e.chainBundle((function(n){if(n.isDeclarationFile)return n;return e.visitEachChild(n,r,t)}));function r(n){if(0==(8&n.transformFlags))return n;switch(n.kind){case 278:return function(n){if(!n.variableDeclaration)return e.updateCatchClause(n,e.createVariableDeclaration(e.createTempVariable(void 0)),e.visitNode(n.block,r,e.isBlock));return e.visitEachChild(n,r,t)}(n);default:return e.visitEachChild(n,r,t)}}}}(s||(s={})),function(e){e.transformESNext=function(t){var r=t.hoistVariableDeclaration;return e.chainBundle((function(r){if(r.isDeclarationFile)return r;return e.visitEachChild(r,n,t)}));function n(i){if(0==(4&i.transformFlags))return i;switch(i.kind){case 193:case 194:case 195:if(32&i.flags){var o=a(i,!1);return e.Debug.assertNotNode(o,e.isSyntheticReference),o}return e.visitEachChild(i,n,t);case 208:return 60===i.operatorToken.kind?function(t){var i=[],a=e.visitNode(t.left,n,e.isExpression);if(!e.isIdentifier(a)){var o=e.createTempVariable(r);i.push(e.createAssignment(o,a)),a=o}return i.push(e.createParen(e.createConditional(function(t){return e.createBinary(e.createBinary(t,e.createToken(37),e.createNull()),e.createToken(55),e.createBinary(t,e.createToken(37),e.createVoidZero()))}(a),a,e.visitNode(t.right,n,e.isExpression)))),e.inlineExpressions(i)}(i):e.visitEachChild(i,n,t);default:return e.visitEachChild(i,n,t)}}function i(o,s){switch(o.kind){case 199:return function(t,r){var n=i(t.expression,r);return e.isSyntheticReference(n)?e.createSyntheticReferenceExpression(e.updateParen(t,n.expression),n.thisArg):e.updateParen(t,n)}(o,s);case 193:return function(t,i){if(e.isOptionalChain(t))return a(t,i);var o,s=e.visitNode(t.expression,n,e.isExpression);return e.Debug.assertNotNode(s,e.isSyntheticReference),i&&(o=e.createTempVariable(r),s=e.createParen(e.createAssignment(o,s))),s=e.updatePropertyAccess(t,s,e.visitNode(t.name,n,e.isIdentifier)),o?e.createSyntheticReferenceExpression(s,o):s}(o,s);case 194:return function(t,i){if(e.isOptionalChain(t))return a(t,i);var o,s=e.visitNode(t.expression,n,e.isExpression);return e.Debug.assertNotNode(s,e.isSyntheticReference),i&&(o=e.createTempVariable(r),s=e.createParen(e.createAssignment(o,s))),s=e.updateElementAccess(t,s,e.visitNode(t.argumentExpression,n,e.isExpression)),o?e.createSyntheticReferenceExpression(s,o):s}(o,s);case 195:return function(r,i){return e.isOptionalChain(r)?a(r,i):e.visitEachChild(r,n,t)}(o,s);default:return e.visitNode(o,n,e.isExpression)}}function a(t,a){for(var o,s=function(t){for(var r=[t];!t.questionDotToken&&!e.isTaggedTemplateExpression(t);)t=e.cast(t.expression,e.isOptionalChain),r.unshift(t);return{expression:t.expression,chain:r}}(t),c=s.expression,u=s.chain,l=i(c,e.isCallChain(u[0])),_=e.createTempVariable(r),d=e.isSyntheticReference(l)?l.thisArg:void 0,p=e.isSyntheticReference(l)?l.expression:l,f=_,m=0;m=t.end)return!1;var i=e.getEnclosingBlockScopeContainer(t);for(;n;){if(n===i||n===t)return!1;if(e.isClassElement(n)&&n.parent===t)return!0;n=n.parent}return!1}(r,t)))return e.setTextRange(e.getGeneratedNameForNode(e.getNameOfDeclaration(r)),t)}return t}(t);case 103:return function(t){if(1&c&&16&a)return e.setTextRange(e.createFileLevelUniqueName("_this"),t);return t}(t)}return t}(r);if(e.isIdentifier(r))return function(t){if(2&c&&!e.isInternalName(t)){var r=e.getParseTreeNode(t,e.isIdentifier);if(r&&function(e){switch(e.parent.kind){case 190:case 244:case 247:case 241:return e.parent.name===e&&f.isDeclarationWithCollidingName(e.parent)}return!1}(r))return e.setTextRange(e.getGeneratedNameForNode(r),t)}return t}(r);return r},e.chainBundle((function(t){if(t.isDeclarationFile)return t;n=t,i=t.text;var s=function(t){var r=y(8064,64),n=[],i=[];u();var a=e.addStandardPrologue(n,t.statements,!1);a=e.addCustomPrologue(n,t.statements,a,b),e.addRange(i,e.visitNodes(t.statements,b,e.isStatement,a)),o&&i.push(e.createVariableStatement(void 0,e.createVariableDeclarationList(o)));return e.mergeLexicalEnvironment(n,_()),P(n,t),h(r,0,0),e.updateSourceFileNode(t,e.setTextRange(e.createNodeArray(e.concatenate(n,i)),t.statements))}(t);return e.addEmitHelpers(s,r.readEmitHelpers()),n=void 0,i=void 0,o=void 0,a=0,s}));function y(e,t){var r=a;return a=16383&(a&~e|t),r}function h(e,t,r){a=-16384&(a&~t|r)|e}function v(e){return 0!=(8192&a)&&234===e.kind&&!e.expression}function b(i){return function(t){return 0!=(128&t.transformFlags)||void 0!==s||8192&a&&(e.isStatement(t)||222===t.kind)||e.isIterationStatement(t,!1)&&ie(t)||0!=(33554432&e.getEmitFlags(t))}(i)?function(i){switch(i.kind){case 119:return;case 244:return function(t){var r=e.createVariableDeclaration(e.getLocalName(t,!0),void 0,S(t));e.setOriginalNode(r,t);var n=[],i=e.createVariableStatement(void 0,e.createVariableDeclarationList([r]));if(e.setOriginalNode(i,t),e.setTextRange(i,t),e.startOnNewLine(i),n.push(i),e.hasModifier(t,1)){var a=e.hasModifier(t,512)?e.createExportDefault(e.getLocalName(t)):e.createExternalModuleExport(e.getLocalName(t));e.setOriginalNode(a,i),n.push(a)}var o=e.getEmitFlags(t);0==(4194304&o)&&(n.push(e.createEndOfDeclarationMarker(t)),e.setEmitFlags(i,4194304|o));return e.singleOrMany(n)}(i);case 213:return function(e){return S(e)}(i);case 155:return function(t){return t.dotDotDotToken?void 0:e.isBindingPattern(t.name)?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,e.getGeneratedNameForNode(t),void 0,void 0,void 0),t),t):t.initializer?e.setOriginalNode(e.setTextRange(e.createParameter(void 0,void 0,void 0,t.name,void 0,void 0,void 0),t),t):t}(i);case 243:return function(t){var n=s;s=void 0;var i=y(16286,65),o=e.visitParameterList(t.parameters,b,r),c=j(t),u=16384&a?e.getLocalName(t):t.name;return h(i,49152,0),s=n,e.updateFunctionDeclaration(t,void 0,e.visitNodes(t.modifiers,b,e.isModifier),t.asteriskToken,u,void 0,o,void 0,c)}(i);case 201:return function(t){2048&t.transformFlags&&(a|=32768);var n=s;s=void 0;var i=y(15232,66),o=e.createFunctionExpression(void 0,void 0,void 0,void 0,e.visitParameterList(t.parameters,b,r),void 0,j(t));e.setTextRange(o,t),e.setOriginalNode(o,t),e.setEmitFlags(o,8),32768&a&&Ne();return h(i,0,0),s=n,o}(i);case 200:return function(t){var n=262144&e.getEmitFlags(t)?y(16278,69):y(16286,65),i=s;s=void 0;var o=e.visitParameterList(t.parameters,b,r),c=j(t),u=16384&a?e.getLocalName(t):t.name;return h(n,49152,0),s=i,e.updateFunctionExpression(t,void 0,t.asteriskToken,u,void 0,o,void 0,c)}(i);case 241:return U(i);case 75:return function(t){if(!s)return t;if(e.isGeneratedIdentifier(t))return t;if("arguments"!==t.escapedText||!f.isArgumentsLocalBinding(t))return t;return s.argumentsName||(s.argumentsName=e.createUniqueName("arguments"))}(i);case 242:return function(t){if(3&t.flags||65536&t.transformFlags){3&t.flags&&ke();var n=e.flatMap(t.declarations,1&t.flags?z:U),i=e.createVariableDeclarationList(n);return e.setOriginalNode(i,t),e.setTextRange(i,t),e.setCommentRange(i,t),65536&t.transformFlags&&(e.isBindingPattern(t.declarations[0].name)||e.isBindingPattern(e.last(t.declarations).name))&&e.setSourceMapRange(i,function(t){for(var r=-1,n=-1,i=0,a=t;i0?(e.insertStatementAfterCustomPrologue(t,e.setEmitFlags(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(n,b,r,0,e.getGeneratedNameForNode(n)))),1048576)),!0):!!a&&(e.insertStatementAfterCustomPrologue(t,e.setEmitFlags(e.createExpressionStatement(e.createAssignment(e.getGeneratedNameForNode(n),e.visitNode(a,b,e.isExpression))),1048576)),!0)}function A(t,r,n,i){i=e.visitNode(i,b,e.isExpression);var a=e.createIf(e.createTypeCheck(e.getSynthesizedClone(n),"undefined"),e.setEmitFlags(e.setTextRange(e.createBlock([e.createExpressionStatement(e.setEmitFlags(e.setTextRange(e.createAssignment(e.setEmitFlags(e.getMutableClone(n),48),e.setEmitFlags(i,1584|e.getEmitFlags(i))),r),1536))]),r),1953));e.startOnNewLine(a),e.setTextRange(a,r),e.setEmitFlags(a,1050528),e.insertStatementAfterCustomPrologue(t,a)}function F(t,n,i){var a=[],o=e.lastOrUndefined(n.parameters);if(!function(e,t){return!(!e||!e.dotDotDotToken||t)}(o,i))return!1;var s=75===o.name.kind?e.getMutableClone(o.name):e.createTempVariable(void 0);e.setEmitFlags(s,48);var c=75===o.name.kind?e.getSynthesizedClone(o.name):s,u=n.parameters.length-1,l=e.createLoopVariable();a.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(s,void 0,e.createArrayLiteral([]))])),o),1048576));var _=e.createFor(e.setTextRange(e.createVariableDeclarationList([e.createVariableDeclaration(l,void 0,e.createLiteral(u))]),o),e.setTextRange(e.createLessThan(l,e.createPropertyAccess(e.createIdentifier("arguments"),"length")),o),e.setTextRange(e.createPostfixIncrement(l),o),e.createBlock([e.startOnNewLine(e.setTextRange(e.createExpressionStatement(e.createAssignment(e.createElementAccess(c,0===u?l:e.createSubtract(l,e.createLiteral(u))),e.createElementAccess(e.createIdentifier("arguments"),l))),o))]));return e.setEmitFlags(_,1048576),e.startOnNewLine(_),a.push(_),75!==o.name.kind&&a.push(e.setEmitFlags(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList(e.flattenDestructuringBinding(o,b,r,0,c))),o),1048576)),e.insertStatementsAfterCustomPrologue(t,a),!0}function P(t,r){return!!(32768&a&&201!==r.kind)&&(w(t,r,e.createThis()),!0)}function w(t,r,n){Ne();var i=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_this"),void 0,n)]));e.setEmitFlags(i,1050112),e.setSourceMapRange(i,r),e.insertStatementAfterCustomPrologue(t,i)}function I(t,r,n){if(16384&a){var i=void 0;switch(r.kind){case 201:return t;case 160:case 162:case 163:i=e.createVoidZero();break;case 161:i=e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor");break;case 243:case 200:i=e.createConditional(e.createLogicalAnd(e.setEmitFlags(e.createThis(),4),e.createBinary(e.setEmitFlags(e.createThis(),4),97,e.getLocalName(r))),e.createPropertyAccess(e.setEmitFlags(e.createThis(),4),"constructor"),e.createVoidZero());break;default:return e.Debug.failBadSyntaxKind(r)}var o=e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.createFileLevelUniqueName("_newTarget"),void 0,i)]));e.setEmitFlags(o,1050112),n&&(t=t.slice()),e.insertStatementAfterCustomPrologue(t,o)}return t}function O(t){return e.setTextRange(e.createEmptyStatement(),t)}function M(t,n,i){var a,o=e.getCommentRange(n),s=e.getSourceMapRange(n),c=B(n,n,void 0,i);if(r.getCompilerOptions().useDefineForClassFields){var u=e.visitNode(n.name,b,e.isPropertyName),l=e.isComputedPropertyName(u)?u.expression:e.isIdentifier(u)?e.createStringLiteral(e.unescapeLeadingUnderscores(u.escapedText)):u;a=e.createObjectDefinePropertyCall(t,l,e.createPropertyDescriptor({value:c,enumerable:!1,writable:!0,configurable:!0}))}else{var _=e.createMemberAccessForPropertyName(t,e.visitNode(n.name,b,e.isPropertyName),n.name);a=e.createAssignment(_,c)}e.setEmitFlags(c,1536),e.setSourceMapRange(c,s);var d=e.setTextRange(e.createExpressionStatement(a),n);return e.setOriginalNode(d,n),e.setCommentRange(d,o),e.setEmitFlags(d,48),d}function L(t,r,n){var i=e.createExpressionStatement(R(t,r,n,!1));return e.setEmitFlags(i,1536),e.setSourceMapRange(i,e.getSourceMapRange(r.firstAccessor)),i}function R(t,r,n,i){var a=r.firstAccessor,o=r.getAccessor,s=r.setAccessor,c=e.getMutableClone(t);e.setEmitFlags(c,1568),e.setSourceMapRange(c,a.name);var u=e.createExpressionForPropertyName(e.visitNode(a.name,b,e.isPropertyName));e.setEmitFlags(u,1552),e.setSourceMapRange(u,a.name);var l=[];if(o){var _=B(o,void 0,void 0,n);e.setSourceMapRange(_,e.getSourceMapRange(o)),e.setEmitFlags(_,512);var d=e.createPropertyAssignment("get",_);e.setCommentRange(d,e.getCommentRange(o)),l.push(d)}if(s){var p=B(s,void 0,void 0,n);e.setSourceMapRange(p,e.getSourceMapRange(s)),e.setEmitFlags(p,512);var f=e.createPropertyAssignment("set",p);e.setCommentRange(f,e.getCommentRange(s)),l.push(f)}l.push(e.createPropertyAssignment("enumerable",e.createTrue()),e.createPropertyAssignment("configurable",e.createTrue()));var m=e.createCall(e.createPropertyAccess(e.createIdentifier("Object"),"defineProperty"),void 0,[c,u,e.createObjectLiteral(l,!0)]);return i&&e.startOnNewLine(m),m}function B(t,n,i,o){var c=s;s=void 0;var u=o&&e.isClassLike(o)&&!e.hasModifier(t,32)?y(16286,73):y(16286,65),l=e.visitParameterList(t.parameters,b,r),_=j(t);return 16384&a&&!i&&(243===t.kind||200===t.kind)&&(i=e.getGeneratedNameForNode(t)),h(u,49152,0),s=c,e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,t.asteriskToken,i,void 0,l,void 0,_),n),t)}function j(t){var r,i,a,o=!1,s=!1,c=[],u=[],d=t.body;if(l(),e.isBlock(d)&&(a=e.addStandardPrologue(c,d.statements,!1)),o=k(u,t)||o,o=F(u,t,!1)||o,e.isBlock(d))a=e.addCustomPrologue(u,d.statements,a,b),r=d.statements,e.addRange(u,e.visitNodes(d.statements,b,e.isStatement,a)),!o&&d.multiLine&&(o=!0);else{e.Debug.assert(201===t.kind),r=e.moveRangeEnd(d,-1);var p=t.equalsGreaterThanToken;e.nodeIsSynthesized(p)||e.nodeIsSynthesized(d)||(e.rangeEndIsOnSameLineAsRangeStart(p,d,n)?s=!0:o=!0);var f=e.visitNode(d,b,e.isExpression),m=e.createReturn(f);e.setTextRange(m,d),e.moveSyntheticComments(m,d),e.setEmitFlags(m,1440),u.push(m),i=d}if(e.mergeLexicalEnvironment(c,_()),I(c,t,!1),P(c,t),e.some(c)&&(o=!0),u.unshift.apply(u,c),e.isBlock(d)&&e.arrayIsEqualTo(u,d.statements))return d;var g=e.createBlock(e.setTextRange(e.createNodeArray(u),r),o);return e.setTextRange(g,t.body),!o&&s&&e.setEmitFlags(g,1),i&&e.setTokenSourceMapRange(g,19,i),e.setOriginalNode(g,t.body),g}function K(t,n){if(!n)switch(t.expression.kind){case 199:return e.updateParen(t,K(t.expression,!1));case 208:return e.updateParen(t,J(t.expression,!1))}return e.visitEachChild(t,b,r)}function J(t,n){return e.isDestructuringAssignment(t)?e.flattenDestructuringAssignment(t,b,r,0,n):e.visitEachChild(t,b,r)}function z(t){var n=t.name;if(e.isBindingPattern(n))return U(t);if(!t.initializer&&function(e){var t=f.getNodeCheckFlags(e),r=262144&t,n=524288&t;return!(0!=(64&a)||r&&n&&0!=(512&a))&&0==(4096&a)&&(!f.isDeclarationWithCollidingName(e)||n&&!r&&0==(6144&a))}(t)){var i=e.getMutableClone(t);return i.initializer=e.createVoidZero(),i}return e.visitEachChild(t,b,r)}function U(t){var n,i=y(32,0);return n=e.isBindingPattern(t.name)?e.flattenDestructuringBinding(t,b,r,0,void 0,0!=(32&i)):e.visitEachChild(t,b,r),h(i,0,0),n}function V(t){s.labels.set(e.idText(t.label),!0)}function q(t){s.labels.set(e.idText(t.label),!1)}function W(t,n,i,o,c){var l=y(t,n),d=function(t,n,i,o){if(!ie(t)){var c=void 0;s&&(c=s.allowedNonLabeledJumps,s.allowedNonLabeledJumps=6);var l=o?o(t,n,void 0,i):e.restoreEnclosingLabel(e.visitEachChild(t,b,r),n,s&&q);return s&&(s.allowedNonLabeledJumps=c),l}var d=function(t){var r;switch(t.kind){case 229:case 230:case 231:var n=t.initializer;n&&242===n.kind&&(r=n)}var i=[],a=[];if(r&&3&e.getCombinedNodeFlags(r))for(var o=re(t),c=0,u=r.declarations;c=76&&r<=111)return e.setTextRange(e.createLiteral(t),t)}}}(s||(s={})),function(e){var r,n,i,a,o;!function(e){e[e.Nop=0]="Nop",e[e.Statement=1]="Statement",e[e.Assign=2]="Assign",e[e.Break=3]="Break",e[e.BreakWhenTrue=4]="BreakWhenTrue",e[e.BreakWhenFalse=5]="BreakWhenFalse",e[e.Yield=6]="Yield",e[e.YieldStar=7]="YieldStar",e[e.Return=8]="Return",e[e.Throw=9]="Throw",e[e.Endfinally=10]="Endfinally"}(r||(r={})),function(e){e[e.Open=0]="Open",e[e.Close=1]="Close"}(n||(n={})),function(e){e[e.Exception=0]="Exception",e[e.With=1]="With",e[e.Switch=2]="Switch",e[e.Loop=3]="Loop",e[e.Labeled=4]="Labeled"}(i||(i={})),function(e){e[e.Try=0]="Try",e[e.Catch=1]="Catch",e[e.Finally=2]="Finally",e[e.Done=3]="Done"}(a||(a={})),function(e){e[e.Next=0]="Next",e[e.Throw=1]="Throw",e[e.Return=2]="Return",e[e.Break=3]="Break",e[e.Yield=4]="Yield",e[e.YieldStar=5]="YieldStar",e[e.Catch=6]="Catch",e[e.Endfinally=7]="Endfinally"}(o||(o={})),e.transformGenerators=function(r){var n,i,a,o,s,c,u,l,_,d,p=r.resumeLexicalEnvironment,f=r.endLexicalEnvironment,m=r.hoistFunctionDeclaration,g=r.hoistVariableDeclaration,y=r.getCompilerOptions(),h=e.getEmitScriptTarget(y),v=r.getEmitResolver(),b=r.onSubstituteNode;r.onSubstituteNode=function(t,r){if(r=b(t,r),1===t)return function(t){if(e.isIdentifier(t))return function(t){if(!e.isGeneratedIdentifier(t)&&n&&n.has(e.idText(t))){var r=e.getOriginalNode(t);if(e.isIdentifier(r)&&r.parent){var a=v.getReferencedValueDeclaration(r);if(a){var o=i[e.getOriginalNodeId(a)];if(o){var s=e.getMutableClone(o);return e.setSourceMapRange(s,t),e.setCommentRange(s,t),s}}}}return t}(t);return t}(r);return r};var x,D,S,T,E,C,k,N,A,F,P,w,I=1,O=0,M=0;return e.chainBundle((function(t){if(t.isDeclarationFile||0==(256&t.transformFlags))return t;var n=e.visitEachChild(t,L,r);return e.addEmitHelpers(n,r.readEmitHelpers()),n}));function L(t){var n=t.transformFlags;return o?function(t){switch(t.kind){case 227:case 228:return function(t){return o?(ne(),t=e.visitEachChild(t,L,r),ae(),t):e.visitEachChild(t,L,r)}(t);case 236:return function(t){o&&Z({kind:2,isScript:!0,breakLabel:-1});t=e.visitEachChild(t,L,r),o&&oe();return t}(t);case 237:return function(t){o&&Z({kind:4,isScript:!0,labelText:e.idText(t.label),breakLabel:-1});t=e.visitEachChild(t,L,r),o&&se();return t}(t);default:return R(t)}}(t):a?R(t):e.isFunctionLikeDeclaration(t)&&t.asteriskToken?function(t){switch(t.kind){case 243:return B(t);case 200:return j(t);default:return e.Debug.failBadSyntaxKind(t)}}(t):256&n?e.visitEachChild(t,L,r):t}function R(t){switch(t.kind){case 243:return B(t);case 200:return j(t);case 162:case 163:return function(t){var n=a,i=o;return a=!1,o=!1,t=e.visitEachChild(t,L,r),a=n,o=i,t}(t);case 224:return function(t){if(131072&t.transformFlags)return void q(t.declarationList);if(1048576&e.getEmitFlags(t))return t;for(var r=0,n=t.declarationList.declarations;r0?e.inlineExpressions(e.map(c,W)):void 0,e.visitNode(t.condition,L,e.isExpression),e.visitNode(t.incrementor,L,e.isExpression),e.visitNode(t.statement,L,e.isStatement,e.liftToBlock))}else t=e.visitEachChild(t,L,r);o&&ae();return t}(t);case 230:return function(t){o&&ne();var n=t.initializer;if(e.isVariableDeclarationList(n)){for(var i=0,a=n.declarations;i0)return ge(n,t)}return e.visitEachChild(t,L,r)}(t);case 232:return function(t){if(o){var n=pe(t.label&&e.idText(t.label));if(n>0)return ge(n,t)}return e.visitEachChild(t,L,r)}(t);case 234:return function(t){return r=e.visitNode(t.expression,L,e.isExpression),n=t,e.setTextRange(e.createReturn(e.createArrayLiteral(r?[me(2),r]:[me(2)])),n);var r,n}(t);default:return 131072&t.transformFlags?function(t){switch(t.kind){case 208:return function(t){var n=e.getExpressionAssociativity(t);switch(n){case 0:return function(t){if(G(t.right)){if(e.isLogicalOperator(t.operatorToken.kind))return function(t){var r=Q(),n=X();ve(n,e.visitNode(t.left,L,e.isExpression),t.left),55===t.operatorToken.kind?De(r,n,t.left):xe(r,n,t.left);return ve(n,e.visitNode(t.right,L,e.isExpression),t.right),$(r),n}(t);if(27===t.operatorToken.kind)return function(t){var r=[];return n(t.left),n(t.right),e.inlineExpressions(r);function n(t){e.isBinaryExpression(t)&&27===t.operatorToken.kind?(n(t.left),n(t.right)):(G(t)&&r.length>0&&(Se(1,[e.createExpressionStatement(e.inlineExpressions(r))]),r=[]),r.push(e.visitNode(t,L,e.isExpression)))}}(t);var n=e.getMutableClone(t);return n.left=Y(e.visitNode(t.left,L,e.isExpression)),n.right=e.visitNode(t.right,L,e.isExpression),n}return e.visitEachChild(t,L,r)}(t);case 1:return function(t){var n=t.left,i=t.right;if(G(i)){var a=void 0;switch(n.kind){case 193:a=e.updatePropertyAccess(n,Y(e.visitNode(n.expression,L,e.isLeftHandSideExpression)),n.name);break;case 194:a=e.updateElementAccess(n,Y(e.visitNode(n.expression,L,e.isLeftHandSideExpression)),Y(e.visitNode(n.argumentExpression,L,e.isExpression)));break;default:a=e.visitNode(n,L,e.isExpression)}var o=t.operatorToken.kind;return(s=o)>=63&&s<=74?e.setTextRange(e.createAssignment(a,e.setTextRange(e.createBinary(Y(a),function(e){switch(e){case 63:return 39;case 64:return 40;case 65:return 41;case 66:return 42;case 67:return 43;case 68:return 44;case 69:return 47;case 70:return 48;case 71:return 49;case 72:return 50;case 73:return 51;case 74:return 52}}(o),e.visitNode(i,L,e.isExpression)),t)),t):e.updateBinary(t,a,e.visitNode(i,L,e.isExpression))}var s;return e.visitEachChild(t,L,r)}(t);default:return e.Debug.assertNever(n)}}(t);case 209:return function(t){if(G(t.whenTrue)||G(t.whenFalse)){var n=Q(),i=Q(),a=X();return De(n,e.visitNode(t.condition,L,e.isExpression),t.condition),ve(a,e.visitNode(t.whenTrue,L,e.isExpression),t.whenTrue),be(i),$(n),ve(a,e.visitNode(t.whenFalse,L,e.isExpression),t.whenFalse),$(i),a}return e.visitEachChild(t,L,r)}(t);case 211:return function(t){var n=Q(),i=e.visitNode(t.expression,L,e.isExpression);if(t.asteriskToken){!function(e,t){Se(7,[e],t)}(0==(8388608&e.getEmitFlags(t.expression))?e.createValuesHelper(r,i,t):i,t)}else!function(e,t){Se(6,[e],t)}(i,t);return $(n),function(t){return e.setTextRange(e.createCall(e.createPropertyAccess(T,"sent"),void 0,[]),t)}(t)}(t);case 191:return function(e){return J(e.elements,void 0,void 0,e.multiLine)}(t);case 192:return function(t){var r=t.properties,n=t.multiLine,i=H(r),a=X();ve(a,e.createObjectLiteral(e.visitNodes(r,L,e.isObjectLiteralElementLike,0,i),n));var o=e.reduceLeft(r,(function(r,i){G(i)&&r.length>0&&(he(e.createExpressionStatement(e.inlineExpressions(r))),r=[]);var o=e.createExpressionForObjectLiteralElementLike(t,i,a),s=e.visitNode(o,L,e.isExpression);s&&(n&&e.startOnNewLine(s),r.push(s));return r}),[],i);return o.push(n?e.startOnNewLine(e.getMutableClone(a)):a),e.inlineExpressions(o)}(t);case 194:return function(t){if(G(t.argumentExpression)){var n=e.getMutableClone(t);return n.expression=Y(e.visitNode(t.expression,L,e.isLeftHandSideExpression)),n.argumentExpression=e.visitNode(t.argumentExpression,L,e.isExpression),n}return e.visitEachChild(t,L,r)}(t);case 195:return function(t){if(!e.isImportCall(t)&&e.forEach(t.arguments,G)){var n=e.createCallBinding(t.expression,g,h,!0),i=n.target,a=n.thisArg;return e.setOriginalNode(e.createFunctionApply(Y(e.visitNode(i,L,e.isLeftHandSideExpression)),a,J(t.arguments),t),t)}return e.visitEachChild(t,L,r)}(t);case 196:return function(t){if(e.forEach(t.arguments,G)){var n=e.createCallBinding(e.createPropertyAccess(t.expression,"bind"),g),i=n.target,a=n.thisArg;return e.setOriginalNode(e.setTextRange(e.createNew(e.createFunctionApply(Y(e.visitNode(i,L,e.isExpression)),a,J(t.arguments,e.createVoidZero())),void 0,[]),t),t)}return e.visitEachChild(t,L,r)}(t);default:return e.visitEachChild(t,L,r)}}(t):262400&t.transformFlags?e.visitEachChild(t,L,r):t}}function B(t){if(t.asteriskToken)t=e.setOriginalNode(e.setTextRange(e.createFunctionDeclaration(void 0,t.modifiers,void 0,t.name,void 0,e.visitParameterList(t.parameters,L,r),void 0,K(t.body)),t),t);else{var n=a,i=o;a=!1,o=!1,t=e.visitEachChild(t,L,r),a=n,o=i}return a?void m(t):t}function j(t){if(t.asteriskToken)t=e.setOriginalNode(e.setTextRange(e.createFunctionExpression(void 0,void 0,t.name,void 0,e.visitParameterList(t.parameters,L,r),void 0,K(t.body)),t),t);else{var n=a,i=o;a=!1,o=!1,t=e.visitEachChild(t,L,r),a=n,o=i}return t}function K(t){var r=[],n=a,i=o,m=s,g=c,y=u,h=l,v=_,b=d,E=I,C=x,k=D,N=S,A=T;a=!0,o=!1,s=void 0,c=void 0,u=void 0,l=void 0,_=void 0,d=void 0,I=1,x=void 0,D=void 0,S=void 0,T=e.createTempVariable(void 0),p();var F=e.addPrologue(r,t.statements,!1,L);z(t.statements,F);var P=Te();return e.insertStatementsAfterStandardPrologue(r,f()),r.push(e.createReturn(P)),a=n,o=i,s=m,c=g,u=y,l=h,_=v,d=b,I=E,x=C,D=k,S=N,T=A,e.setTextRange(e.createBlock(r,t.multiLine),t)}function J(r,n,i,a){var o,s=H(r);if(s>0){o=X();var c=e.visitNodes(r,L,e.isExpression,0,s);ve(o,e.createArrayLiteral(n?t([n],c):c)),n=void 0}var u=e.reduceLeft(r,(function(r,i){if(G(i)&&r.length>0){var s=void 0!==o;o||(o=X()),ve(o,s?e.createArrayConcat(o,[e.createArrayLiteral(r,a)]):e.createArrayLiteral(n?t([n],r):r,a)),n=void 0,r=[]}return r.push(e.visitNode(i,L,e.isExpression)),r}),[],s);return o?e.createArrayConcat(o,[e.createArrayLiteral(u,a)]):e.setTextRange(e.createArrayLiteral(n?t([n],u):u,a),i)}function z(e,t){void 0===t&&(t=0);for(var r=e.length,n=t;n0?be(r,t):he(t)}(t);case 233:return function(t){var r=de(t.label?e.idText(t.label):void 0);r>0?be(r,t):he(t)}(t);case 234:return function(t){r=e.visitNode(t.expression,L,e.isExpression),n=t,Se(8,[r],n);var r,n}(t);case 235:return function(t){G(t)?(r=Y(e.visitNode(t.expression,L,e.isExpression)),n=Q(),i=Q(),$(n),Z({kind:1,expression:r,startLabel:n,endLabel:i}),U(t.statement),e.Debug.assert(1===re()),$(ee().endLabel)):he(e.visitNode(t,L,e.isStatement));var r,n,i}(t);case 236:return function(t){if(G(t.caseBlock)){for(var r=t.caseBlock,n=r.clauses.length,i=(Z({kind:2,isScript:!1,breakLabel:p=Q()}),p),a=Y(e.visitNode(t.expression,L,e.isExpression)),o=[],s=-1,c=0;c0)break;_.push(e.createCaseClause(e.visitNode(u.expression,L,e.isExpression),[ge(o[c],u.expression)]))}else d++}_.length&&(he(e.createSwitch(a,e.createCaseBlock(_))),l+=_.length,_=[]),d>0&&(l+=d,d=0)}be(s>=0?o[s]:i);for(c=0;c0)break;u.push(W(i))}u.length&&(he(e.createExpressionStatement(e.inlineExpressions(u))),c+=u.length,u=[])}}function W(t){return e.setSourceMapRange(e.createAssignment(e.setSourceMapRange(e.getSynthesizedClone(t.name),t.name),e.visitNode(t.initializer,L,e.isExpression)),t)}function G(e){return!!e&&0!=(131072&e.transformFlags)}function H(e){for(var t=e.length,r=0;r=0;r--){var n=l[r];if(!ue(n))break;if(n.labelText===e)return!0}return!1}function de(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(ue(r=l[t])&&r.labelText===e)return r.breakLabel;if(ce(r)&&_e(e,t-1))return r.breakLabel}else for(t=l.length-1;t>=0;t--){var r;if(ce(r=l[t]))return r.breakLabel}return 0}function pe(e){if(l)if(e)for(var t=l.length-1;t>=0;t--){if(le(r=l[t])&&_e(e,t-1))return r.continueLabel}else for(t=l.length-1;t>=0;t--){var r;if(le(r=l[t]))return r.continueLabel}return 0}function fe(t){if(void 0!==t&&t>0){void 0===d&&(d=[]);var r=e.createLiteral(-1);return void 0===d[t]?d[t]=[r]:d[t].push(r),r}return e.createOmittedExpression()}function me(t){var r=e.createLiteral(t);return e.addSyntheticTrailingComment(r,3,function(e){switch(e){case 2:return"return";case 3:return"break";case 4:return"yield";case 5:return"yield*";case 7:return"endfinally";default:return}}(t)),r}function ge(t,r){return e.Debug.assertLessThan(0,t,"Invalid label"),e.setTextRange(e.createReturn(e.createArrayLiteral([me(3),fe(t)])),r)}function ye(){Se(0)}function he(e){e?Se(1,[e]):ye()}function ve(e,t,r){Se(2,[e,t],r)}function be(e,t){Se(3,[e],t)}function xe(e,t,r){Se(4,[e,t],r)}function De(e,t,r){Se(5,[e,t],r)}function Se(e,t,r){void 0===x&&(x=[],D=[],S=[]),void 0===_&&$(Q());var n=x.length;x[n]=e,D[n]=t,S[n]=r}function Te(){O=0,M=0,E=void 0,C=!1,k=!1,N=void 0,A=void 0,F=void 0,P=void 0,w=void 0;var t=function(){if(x){for(var t=0;t0)),524288))}function Ee(e){(function(e){if(!k)return!0;if(!_||!d)return!1;for(var t=0;t<_.length;t++)if(_[t]===e&&d[t])return!0;return!1})(e)&&(ke(e),w=void 0,Fe(void 0,void 0)),A&&N&&Ce(!1),function(){if(void 0!==d&&void 0!==E)for(var e=0;e=0;r--){var n=w[r];A=[e.createWith(n.expression,e.createBlock(A))]}if(P){var i=P.startLabel,a=P.catchLabel,o=P.finallyLabel,s=P.endLabel;A.unshift(e.createExpressionStatement(e.createCall(e.createPropertyAccess(e.createPropertyAccess(T,"trys"),"push"),void 0,[e.createArrayLiteral([fe(i),fe(a),fe(o),fe(s)])]))),P=void 0}t&&A.push(e.createExpressionStatement(e.createAssignment(e.createPropertyAccess(T,"label"),e.createLiteral(M+1))))}N.push(e.createCaseClause(e.createLiteral(M),A||[])),A=void 0}function ke(e){if(_)for(var t=0;t<_.length;t++)_[t]===e&&(A&&(Ce(!C),C=!1,k=!1,M++),void 0===E&&(E=[]),void 0===E[M]?E[M]=[t]:E[M].push(t))}function Ne(t){if(ke(t),function(e){if(s)for(;O 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n };'}}(s||(s={})),function(e){e.transformModule=function(i){var a=i.startLexicalEnvironment,o=i.endLexicalEnvironment,s=i.hoistVariableDeclaration,c=i.getCompilerOptions(),u=i.getEmitResolver(),l=i.getEmitHost(),_=e.getEmitScriptTarget(c),d=e.getEmitModuleKind(c),p=i.onSubstituteNode,f=i.onEmitNode;i.onSubstituteNode=function(t,r){if((r=p(t,r)).id&&y[r.id])return r;if(1===t)return function(t){switch(t.kind){case 75:return H(t);case 208:return function(t){if(e.isAssignmentOperator(t.operatorToken.kind)&&e.isIdentifier(t.left)&&!e.isGeneratedIdentifier(t.left)&&!e.isLocalName(t.left)&&!e.isDeclarationNameOfEnumOrNamespace(t.left)){var r=Y(t.left);if(r){for(var n=t,i=0,a=r;i=2?2:0)),t),t))}else n&&e.isDefaultImport(t)&&(r=e.append(r,e.createVariableStatement(void 0,e.createVariableDeclarationList([e.setOriginalNode(e.setTextRange(e.createVariableDeclaration(e.getSynthesizedClone(n.name),void 0,e.getGeneratedNameForNode(t)),t),t)],_>=2?2:0))));if(R(t)){var a=e.getOriginalNodeId(t);b[a]=B(b[a],t)}else r=B(r,t);return e.singleOrMany(r)}(t);case 252:return function(t){var r;e.Debug.assert(e.isExternalModuleImportEqualsDeclaration(t),"import= for internal module references should be handled in an earlier transformer."),d!==e.ModuleKind.AMD?r=e.hasModifier(t,1)?e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(W(t.name,O(t))),t),t)):e.append(r,e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedClone(t.name),void 0,O(t))],_>=2?2:0)),t),t)):e.hasModifier(t,1)&&(r=e.append(r,e.setOriginalNode(e.setTextRange(e.createExpressionStatement(W(e.getExportName(t),e.getLocalName(t))),t),t)));if(R(t)){var n=e.getOriginalNodeId(t);b[n]=j(b[n],t)}else r=j(r,t);return e.singleOrMany(r)}(t);case 259:return function(t){if(!t.moduleSpecifier)return;var r=e.getGeneratedNameForNode(t);if(t.exportClause){var n=[];d!==e.ModuleKind.AMD&&n.push(e.setOriginalNode(e.setTextRange(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,O(t))])),t),t));for(var a=0,o=t.exportClause.elements;a(e.isExportName(r)?1:0);return!1}(t.left))return e.flattenDestructuringAssignment(t,F,i,0,!1,M);return e.visitEachChild(t,F,i)}(t):e.visitEachChild(t,F,i):t}function P(t,r){var n,a=e.createUniqueName("resolve"),o=e.createUniqueName("reject"),s=[e.createParameter(void 0,void 0,void 0,a),e.createParameter(void 0,void 0,void 0,o)],u=e.createBlock([e.createExpressionStatement(e.createCall(e.createIdentifier("require"),void 0,[e.createArrayLiteral([t||e.createOmittedExpression()]),a,o]))]);_>=2?n=e.createArrowFunction(void 0,void 0,s,void 0,void 0,u):(n=e.createFunctionExpression(void 0,void 0,void 0,void 0,s,void 0,u),r&&e.setEmitFlags(n,8));var l=e.createNew(e.createIdentifier("Promise"),void 0,[n]);return c.esModuleInterop?(i.requestEmitHelper(e.importStarHelper),e.createCall(e.createPropertyAccess(l,e.createIdentifier("then")),void 0,[e.getUnscopedHelperName("__importStar")])):l}function w(t,r){var n,a=e.createCall(e.createPropertyAccess(e.createIdentifier("Promise"),"resolve"),void 0,[]),o=e.createCall(e.createIdentifier("require"),void 0,t?[t]:[]);return c.esModuleInterop&&(i.requestEmitHelper(e.importStarHelper),o=e.createCall(e.getUnscopedHelperName("__importStar"),void 0,[o])),_>=2?n=e.createArrowFunction(void 0,void 0,[],void 0,void 0,o):(n=e.createFunctionExpression(void 0,void 0,void 0,void 0,[],void 0,e.createBlock([e.createReturn(o)])),r&&e.setEmitFlags(n,8)),e.createCall(e.createPropertyAccess(a,"then"),void 0,[n])}function I(t,r){return!c.esModuleInterop||67108864&e.getEmitFlags(t)?r:e.getImportNeedsImportStarHelper(t)?(i.requestEmitHelper(e.importStarHelper),e.createCall(e.getUnscopedHelperName("__importStar"),void 0,[r])):e.getImportNeedsImportDefaultHelper(t)?(i.requestEmitHelper(e.importDefaultHelper),e.createCall(e.getUnscopedHelperName("__importDefault"),void 0,[r])):r}function O(t){var r=e.getExternalModuleNameLiteral(t,m,l,u,c),n=[];return r&&n.push(r),e.createCall(e.createIdentifier("require"),void 0,n)}function M(t,r,n){var i=Y(t);if(i){for(var a=e.isExportName(t)?r:e.createAssignment(t,r),o=0,s=i;o0?i.parent.parameters[a-1]:void 0,s=r.text,c=o?e.concatenate(e.getTrailingCommentRanges(s,e.skipTrivia(s,o.end+1,!1,!0)),e.getLeadingCommentRanges(s,t.pos)):e.getTrailingCommentRanges(s,e.skipTrivia(s,t.pos,!1,!0));return c&&c.length&&n(e.last(c),r)}var u=i&&e.getLeadingCommentRangesOfNode(i,r);return!!e.forEach(u,(function(e){return n(e,r)}))}e.getDeclarationDiagnostics=function(t,r,n){var i=t.getCompilerOptions();return e.transformNodes(r,t,i,n?[n]:t.getSourceFiles(),[o],!1).diagnostics},e.isInternalDeclaration=i;var a=531469;function o(n){var o,u,l,_,d,p,f,m,g,y,h,v=function(){return e.Debug.fail("Diagnostic emitted without context")},b=v,x=!0,D=!1,S=!1,T=!1,E=!1,C=n.getEmitHost(),k={trackSymbol:function(e,t,r){if(262144&e.flags)return;I(N.isSymbolAccessible(e,t,r,!0)),w(N.getTypeReferenceDirectivesForSymbol(e,r))},reportInaccessibleThisError:function(){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(f),"this"))},reportInaccessibleUniqueSymbolError:function(){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,e.declarationNameToString(f),"unique symbol"))},reportPrivateInBaseOfClassExpression:function(t){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected,t))},reportLikelyUnsafeImportRequiredError:function(t){f&&n.addDiagnostic(e.createDiagnosticForNode(f,e.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary,e.declarationNameToString(f),t))},moduleResolverHost:C,trackReferencedAmbientModule:function(t,r){var n=N.getTypeReferenceDirectivesForSymbol(r,67108863);if(e.length(n))return w(n);var i=e.getSourceFileOfNode(t);g.set(""+e.getOriginalNodeId(i),i)},trackExternalModuleSymbolOfImportTypeNode:function(e){D||(p||(p=[])).push(e)}},N=n.getEmitResolver(),A=n.getCompilerOptions(),F=A.noResolve,P=A.stripInternal;return function(i){if(288===i.kind&&i.isDeclarationFile)return i;if(289===i.kind){D=!0,g=e.createMap(),y=e.createMap();var a=!1,s=e.createBundle(e.map(i.sourceFiles,(function(t){if(!t.isDeclarationFile){if(a=a||t.hasNoDefaultLib,m=t,o=t,l=void 0,d=!1,_=e.createMap(),b=v,T=!1,E=!1,M(t,g),L(t,y),e.isExternalOrCommonJsModule(t)||e.isJsonSourceFile(t)){S=!1,x=!1;var r=e.isSourceFileJS(t)?e.createNodeArray(O(t,!0)):e.visitNodes(t.statements,$);return e.updateSourceFileNode(t,[e.createModuleDeclaration([],[e.createModifier(129)],e.createLiteral(e.getResolvedExternalModuleName(n.getEmitHost(),t)),e.createModuleBlock(e.setTextRange(e.createNodeArray(X(r)),t.statements)))],!0,[],[],!1,[])}x=!0;var i=e.isSourceFileJS(t)?e.createNodeArray(O(t)):e.visitNodes(t.statements,$);return e.updateSourceFileNode(t,X(i),!0,[],[],!1,[])}})),e.mapDefined(i.prepends,(function(t){if(291===t.kind){var r=e.createUnparsedSourceFile(t,"dts",P);return a=a||!!r.hasNoDefaultLib,M(r,g),w(r.typeReferenceDirectives),L(r,y),r}return t})));s.syntheticFileReferences=[],s.syntheticTypeReferences=K(),s.syntheticLibReferences=j(),s.hasNoDefaultLib=a;var c=e.getDirectoryPath(e.normalizeSlashes(e.getOutputPathsFor(i,C,!0).declarationFilePath)),f=z(s.syntheticFileReferences,c);return g.forEach(f),s}x=!0,T=!1,E=!1,o=i,m=i,b=v,D=!1,S=!1,d=!1,l=void 0,_=e.createMap(),u=void 0,g=M(m,e.createMap()),y=L(m,e.createMap());var k,N=[],F=e.getDirectoryPath(e.normalizeSlashes(e.getOutputPathsFor(i,C,!0).declarationFilePath)),I=z(N,F);if(e.isSourceFileJS(m))k=e.createNodeArray(O(i)),g.forEach(I),h=e.filter(k,e.isAnyImportSyntax);else{var R=e.visitNodes(i.statements,$);k=e.setTextRange(e.createNodeArray(X(R)),i.statements),g.forEach(I),h=e.filter(k,e.isAnyImportSyntax),e.isExternalModule(i)&&(!S||T&&!E)&&(k=e.setTextRange(e.createNodeArray(t(k,[e.createEmptyExports()])),k))}var B=e.updateSourceFileNode(i,k,!0,N,K(),i.hasNoDefaultLib,j());return B.exportedModulesFromDeclarationEmit=p,B;function j(){return e.map(e.arrayFrom(y.keys()),(function(e){return{fileName:e,pos:-1,end:-1}}))}function K(){return u?e.mapDefined(e.arrayFrom(u.keys()),J):[]}function J(t){if(h)for(var r=0,n=h;r0?e.parameters[0].type:void 0}e.transformDeclarations=o}(s||(s={})),function(e){var r,n;function i(t,r,n){if(n)return e.emptyArray;var i=t.jsx,a=e.getEmitScriptTarget(t),o=e.getEmitModuleKind(t),c=[];return e.addRange(c,r&&e.map(r.before,s)),c.push(e.transformTypeScript),c.push(e.transformClassFields),2===i&&c.push(e.transformJsx),a<99&&c.push(e.transformESNext),a<6&&c.push(e.transformES2019),a<5&&c.push(e.transformES2018),a<4&&c.push(e.transformES2017),a<3&&c.push(e.transformES2016),a<2&&(c.push(e.transformES2015),c.push(e.transformGenerators)),c.push(function(t){switch(t){case e.ModuleKind.ESNext:case e.ModuleKind.ES2015:return e.transformES2015Module;case e.ModuleKind.System:return e.transformSystemModule;default:return e.transformModule}}(o)),a<1&&c.push(e.transformES5),e.addRange(c,r&&e.map(r.after,s)),c}function a(t){var r=[];return r.push(e.transformDeclarations),e.addRange(r,t&&e.map(t.afterDeclarations,c)),r}function o(t,r){return function(n){var i=t(n);return"function"==typeof i?r(i):function(t){return function(r){return e.isBundle(r)?t.transformBundle(r):t.transformSourceFile(r)}}(i)}}function s(t){return o(t,e.chainBundle)}function c(t){return o(t,e.identity)}function u(e,t){return t}function l(e,t,r){r(e,t)}!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initialized=1]="Initialized",e[e.Completed=2]="Completed",e[e.Disposed=3]="Disposed"}(r||(r={})),function(e){e[e.Substitution=1]="Substitution",e[e.EmitNotifications=2]="EmitNotifications"}(n||(n={})),e.noTransformers={scriptTransformers:e.emptyArray,declarationTransformers:e.emptyArray},e.getTransformers=function(e,t,r){return{scriptTransformers:i(e,t,r),declarationTransformers:a(t)}},e.noEmitSubstitution=u,e.noEmitNotification=l,e.transformNodes=function(r,n,i,a,o,s){for(var c,_,d,p=new Array(324),f=[],m=[],g=0,y=!1,h=u,v=l,b=0,x=[],D={getCompilerOptions:function(){return i},getEmitResolver:function(){return r},getEmitHost:function(){return n},startLexicalEnvironment:function(){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!y,"Lexical environment is suspended."),f[g]=c,m[g]=_,g++,c=void 0,_=void 0},suspendLexicalEnvironment:function(){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!y,"Lexical environment is already suspended."),y=!0},resumeLexicalEnvironment:function(){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(y,"Lexical environment is not suspended."),y=!1},endLexicalEnvironment:function(){var r;if(e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),e.Debug.assert(!y,"Lexical environment is suspended."),(c||_)&&(_&&(r=t(_)),c)){var n=e.createVariableStatement(void 0,e.createVariableDeclarationList(c));e.setEmitFlags(n,1048576),r?r.push(n):r=[n]}c=f[--g],_=m[g],0===g&&(f=[],m=[]);return r},hoistVariableDeclaration:function(t){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed.");var r=e.setEmitFlags(e.createVariableDeclaration(t),64);c?c.push(r):c=[r]},hoistFunctionDeclaration:function(t){e.Debug.assert(b>0,"Cannot modify the lexical environment during initialization."),e.Debug.assert(b<2,"Cannot modify the lexical environment after transformation has completed."),_?_.push(t):_=[t]},requestEmitHelper:function(t){e.Debug.assert(b>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed."),e.Debug.assert(!t.scoped,"Cannot request a scoped emit helper."),d=e.append(d,t)},readEmitHelpers:function(){e.Debug.assert(b>0,"Cannot modify the transformation context during initialization."),e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed.");var t=d;return d=void 0,t},enableSubstitution:function(t){e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed."),p[t]|=1},enableEmitNotification:function(t){e.Debug.assert(b<2,"Cannot modify the transformation context after transformation has completed."),p[t]|=2},isSubstitutionEnabled:A,isEmitNotificationEnabled:F,get onSubstituteNode(){return h},set onSubstituteNode(t){e.Debug.assert(b<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),h=t},get onEmitNode(){return v},set onEmitNode(t){e.Debug.assert(b<1,"Cannot modify transformation hooks after initialization has completed."),e.Debug.assert(void 0!==t,"Value must not be 'undefined'"),v=t},addDiagnostic:function(e){x.push(e)}},S=0,T=a;S"],e[8192]=["[","]"],e}(),a={pos:-1,end:-1};function o(t,r,n,i,a,o){void 0===i&&(i=!1);var c=e.isArray(n)?n:e.getSourceFilesToEmit(t,n),l=t.getCompilerOptions();if(l.outFile||l.out){var _=t.getPrependNodes();if(c.length||_.length){var d=e.createBundle(c,_);if(m=r(u(d,t,i),d))return m}}else{if(!a)for(var p=0,f=c;p"),kt(),me(e.type),Yt(e)}(r);case 298:return function(e){St("function"),ft(e,e.parameters),xt(":"),me(e.type)}(r);case 170:return function(e){Ht(e),St("new"),kt(),pt(e,e.typeParameters),ft(e,e.parameters),kt(),xt("=>"),kt(),me(e.type),Yt(e)}(r);case 171:return function(e){St("typeof"),kt(),me(e.exprName)}(r);case 172:return function(t){xt("{");var r=1&e.getEmitFlags(t)?768:32897;gt(t,t.members,524288|r),xt("}")}(r);case 173:return function(e){me(e.elementType),xt("["),xt("]")}(r);case 174:return function(e){xt("["),gt(e,e.elementTypes,528),xt("]")}(r);case 175:return function(e){me(e.type),xt("?")}(r);case 177:return function(e){gt(e,e.types,516)}(r);case 178:return function(e){gt(e,e.types,520)}(r);case 179:return function(e){me(e.checkType),kt(),St("extends"),kt(),me(e.extendsType),kt(),xt("?"),kt(),me(e.trueType),kt(),xt(":"),kt(),me(e.falseType)}(r);case 180:return function(e){St("infer"),kt(),me(e.typeParameter)}(r);case 181:return function(e){xt("("),me(e.type),xt(")")}(r);case 215:return function(e){ye(e.expression),dt(e,e.typeArguments)}(r);case 182:return void St("this");case 183:return function(e){Ot(e.operator,St),kt(),me(e.type)}(r);case 184:return function(e){me(e.objectType),xt("["),me(e.indexType),xt("]")}(r);case 185:return function(t){var r=e.getEmitFlags(t);xt("{"),1&r?kt():(At(),Ft());t.readonlyToken&&(me(t.readonlyToken),137!==t.readonlyToken.kind&&St("readonly"),kt());xt("["),he(3,t.typeParameter),xt("]"),t.questionToken&&(me(t.questionToken),57!==t.questionToken.kind&&xt("?"));xt(":"),kt(),me(t.type),Dt(),1&r?kt():(At(),Pt());xt("}")}(r);case 186:return function(e){ye(e.literal)}(r);case 187:return function(e){e.isTypeOf&&(St("typeof"),kt());St("import"),xt("("),me(e.argument),xt(")"),e.qualifier&&(xt("."),me(e.qualifier));dt(e,e.typeArguments)}(r);case 293:return void xt("*");case 294:return void xt("?");case 295:return function(e){xt("?"),me(e.type)}(r);case 296:return function(e){xt("!"),me(e.type)}(r);case 297:return function(e){me(e.type),xt("=")}(r);case 176:case 299:return function(e){xt("..."),me(e.type)}(r);case 188:return function(e){xt("{"),gt(e,e.elements,525136),xt("}")}(r);case 189:return function(e){xt("["),gt(e,e.elements,524880),xt("]")}(r);case 190:return function(e){me(e.dotDotDotToken),e.propertyName&&(me(e.propertyName),xt(":"),kt());me(e.name),st(e.initializer,e.name.end,e)}(r);case 220:return function(e){ye(e.expression),me(e.literal)}(r);case 221:return void Dt();case 222:return function(e){Fe(e,!e.multiLine&&Vt(e))}(r);case 224:return function(e){at(e,e.modifiers),me(e.declarationList),Dt()}(r);case 223:return Pe(!1);case 225:return function(t){ye(t.expression),(!e.isJsonSourceFile(n)||e.nodeIsSynthesized(t.expression))&&Dt()}(r);case 226:return function(e){var t=Oe(94,e.pos,St,e);kt(),Oe(20,t,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.thenStatement),e.elseStatement&&(Mt(e),Oe(86,e.thenStatement.end,St,e),226===e.elseStatement.kind?(kt(),me(e.elseStatement)):lt(e,e.elseStatement))}(r);case 227:return function(t){Oe(85,t.pos,St,t),lt(t,t.statement),e.isBlock(t.statement)?kt():Mt(t);we(t,t.statement.end),Dt()}(r);case 228:return function(e){we(e,e.pos),lt(e,e.statement)}(r);case 229:return function(e){var t=Oe(92,e.pos,St,e);kt();var r=Oe(20,t,xt,e);Ie(e.initializer),r=Oe(26,e.initializer?e.initializer.end:r,xt,e),ut(e.condition),r=Oe(26,e.condition?e.condition.end:r,xt,e),ut(e.incrementor),Oe(21,e.incrementor?e.incrementor.end:r,xt,e),lt(e,e.statement)}(r);case 230:return function(e){var t=Oe(92,e.pos,St,e);kt(),Oe(20,t,xt,e),Ie(e.initializer),kt(),Oe(96,e.initializer.end,St,e),kt(),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.statement)}(r);case 231:return function(e){var t=Oe(92,e.pos,St,e);kt(),function(e){e&&(me(e),kt())}(e.awaitModifier),Oe(20,t,xt,e),Ie(e.initializer),kt(),Oe(151,e.initializer.end,St,e),kt(),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.statement)}(r);case 232:return function(e){Oe(81,e.pos,St,e),ct(e.label),Dt()}(r);case 233:return function(e){Oe(76,e.pos,St,e),ct(e.label),Dt()}(r);case 234:return function(e){Oe(100,e.pos,St,e),ut(e.expression),Dt()}(r);case 235:return function(e){var t=Oe(111,e.pos,St,e);kt(),Oe(20,t,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e),lt(e,e.statement)}(r);case 236:return function(e){var t=Oe(102,e.pos,St,e);kt(),Oe(20,t,xt,e),ye(e.expression),Oe(21,e.expression.end,xt,e),kt(),me(e.caseBlock)}(r);case 237:return function(e){me(e.label),Oe(58,e.label.end,xt,e),kt(),me(e.statement)}(r);case 238:return function(e){Oe(104,e.pos,St,e),ut(e.expression),Dt()}(r);case 239:return function(e){Oe(106,e.pos,St,e),kt(),me(e.tryBlock),e.catchClause&&(Mt(e),me(e.catchClause));e.finallyBlock&&(Mt(e),Oe(91,(e.catchClause||e.tryBlock).end,St,e),kt(),me(e.finallyBlock))}(r);case 240:return function(e){wt(82,e.pos,St),Dt()}(r);case 241:return function(e){me(e.name),ot(e.type),st(e.initializer,e.type?e.type.end:e.name.end,e)}(r);case 242:return function(t){St(e.isLet(t)?"let":e.isVarConst(t)?"const":"var"),kt(),gt(t,t.declarations,528)}(r);case 243:return function(e){Me(e)}(r);case 244:return function(e){ze(e)}(r);case 245:return function(e){_t(e,e.decorators),at(e,e.modifiers),St("interface"),kt(),me(e.name),pt(e,e.typeParameters),gt(e,e.heritageClauses,512),kt(),xt("{"),gt(e,e.members,129),xt("}")}(r);case 246:return function(e){_t(e,e.decorators),at(e,e.modifiers),St("type"),kt(),me(e.name),pt(e,e.typeParameters),kt(),xt("="),kt(),me(e.type),Dt()}(r);case 247:return function(e){at(e,e.modifiers),St("enum"),kt(),me(e.name),kt(),xt("{"),gt(e,e.members,145),xt("}")}(r);case 248:return function(e){at(e,e.modifiers),1024&~e.flags&&(St(16&e.flags?"namespace":"module"),kt());me(e.name);var t=e.body;if(!t)return Dt();for(;248===t.kind;)xt("."),me(t.name),t=t.body;kt(),me(t)}(r);case 249:return function(t){Ht(t),e.forEach(t.statements,Qt),Fe(t,Vt(t)),Yt(t)}(r);case 250:return function(e){Oe(18,e.pos,xt,e),gt(e,e.clauses,129),Oe(19,e.clauses.end,xt,e,!0)}(r);case 251:return function(e){var t=Oe(88,e.pos,St,e);kt(),t=Oe(122,t,St,e),kt(),t=Oe(135,t,St,e),kt(),me(e.name),Dt()}(r);case 252:return function(e){at(e,e.modifiers),Oe(95,e.modifiers?e.modifiers.end:e.pos,St,e),kt(),me(e.name),kt(),Oe(62,e.name.end,xt,e),kt(),function(e){75===e.kind?ye(e):me(e)}(e.moduleReference),Dt()}(r);case 253:return function(e){at(e,e.modifiers),Oe(95,e.modifiers?e.modifiers.end:e.pos,St,e),kt(),e.importClause&&(me(e.importClause),kt(),Oe(148,e.importClause.end,St,e),kt());ye(e.moduleSpecifier),Dt()}(r);case 254:return function(e){me(e.name),e.name&&e.namedBindings&&(Oe(27,e.name.end,xt,e),kt());me(e.namedBindings)}(r);case 255:return function(e){var t=Oe(41,e.pos,xt,e);kt(),Oe(122,t,St,e),kt(),me(e.name)}(r);case 256:return function(e){Ue(e)}(r);case 257:return function(e){Ve(e)}(r);case 258:return function(e){var t=Oe(88,e.pos,St,e);kt(),e.isExportEquals?Oe(62,t,Tt,e):Oe(83,t,St,e);kt(),ye(e.expression),Dt()}(r);case 259:return function(e){var t=Oe(88,e.pos,St,e);kt(),e.exportClause?me(e.exportClause):t=Oe(41,t,xt,e);if(e.moduleSpecifier){kt(),Oe(148,e.exportClause?e.exportClause.end:t,St,e),kt(),ye(e.moduleSpecifier)}Dt()}(r);case 260:return function(e){Ue(e)}(r);case 261:return function(e){Ve(e)}(r);case 262:return;case 263:return function(e){St("require"),xt("("),ye(e.expression),xt(")")}(r);case 11:return function(e){p.writeLiteral(e.text)}(r);case 266:case 269:return function(t){xt("<"),e.isJsxOpeningElement(t)&&(qe(t.tagName),dt(t,t.typeArguments),t.attributes.properties&&t.attributes.properties.length>0&&kt(),me(t.attributes));xt(">")}(r);case 267:case 270:return function(t){xt("")}(r);case 271:return function(e){me(e.name),function(e,t,r,n){r&&(t(e),n(r))}("=",xt,e.initializer,me)}(r);case 272:return function(e){gt(e,e.properties,262656)}(r);case 273:return function(e){xt("{..."),ye(e.expression),xt("}")}(r);case 274:return function(e){e.expression&&(xt("{"),me(e.dotDotDotToken),ye(e.expression),xt("}"))}(r);case 275:return function(e){Oe(77,e.pos,St,e),kt(),ye(e.expression),We(e,e.statements,e.expression.end)}(r);case 276:return function(e){var t=Oe(83,e.pos,St,e);We(e,e.statements,t)}(r);case 277:return function(e){kt(),Ot(e.token,St),kt(),gt(e,e.types,528)}(r);case 278:return function(e){var t=Oe(78,e.pos,St,e);kt(),e.variableDeclaration&&(Oe(20,t,xt,e),me(e.variableDeclaration),Oe(21,e.variableDeclaration.end,xt,e),kt());me(e.block)}(r);case 279:return function(t){me(t.name),xt(":"),kt();var r=t.initializer;if(hr&&0==(512&e.getEmitFlags(r))){hr(e.getCommentRange(r).pos)}ye(r)}(r);case 280:return function(e){me(e.name),e.objectAssignmentInitializer&&(kt(),xt("="),kt(),ye(e.objectAssignmentInitializer))}(r);case 281:return function(e){e.expression&&(Oe(25,e.pos,xt,e),ye(e.expression))}(r);case 282:return function(e){me(e.name),st(e.initializer,e.name.end,e)}(r);case 310:case 316:return function(e){Ye(e.tagName),Qe(e.typeExpression),kt(),e.isBracketed&&xt("[");me(e.name),e.isBracketed&&xt("]");Xe(e.comment)}(r);case 311:case 313:case 312:case 309:return Ye((i=r).tagName),Qe(i.typeExpression),void Xe(i.comment);case 305:return function(e){Ye(e.tagName),kt(),xt("{"),me(e.class),xt("}"),Xe(e.comment)}(r);case 314:return function(e){Ye(e.tagName),Qe(e.constraint),kt(),gt(e,e.typeParameters,528),Xe(e.comment)}(r);case 315:return function(e){Ye(e.tagName),e.typeExpression&&(292===e.typeExpression.kind?Qe(e.typeExpression):(kt(),xt("{"),M("Object"),e.typeExpression.isArrayType&&(xt("["),xt("]")),xt("}")));e.fullName&&(kt(),me(e.fullName));Xe(e.comment),e.typeExpression&&302===e.typeExpression.kind&&Ge(e.typeExpression)}(r);case 308:return function(e){Ye(e.tagName),e.name&&(kt(),me(e.name));Xe(e.comment),He(e.typeExpression)}(r);case 303:return He(r);case 302:return Ge(r);case 307:case 304:return function(e){Ye(e.tagName),Xe(e.comment)}(r);case 301:return function(e){if(M("/**"),e.comment)for(var t=e.comment.split(/\r\n?|\n/g),r=0,n=t;r=1&&!e.isJsonSourceFile(n)?64:0;gt(t,t.properties,526226|a|i),r&&Pt()}(r);case 193:return function(t){var r=e.cast(ye(t.expression),e.isExpression),n=e.getDotOrQuestionDotToken(t),i=Ut(t,t.expression,n),a=Ut(t,n,t.name);Rt(i,!1),28===n.kind||!function(t){if(t=e.skipPartiallyEmittedExpressions(t),e.isNumericLiteral(t)){var r=Gt(t,!0);return!t.numericLiteralFlags&&!e.stringContains(r,e.tokenToString(24))}if(e.isAccessExpression(t)){var n=e.getConstantValue(t);return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n}}(r)||p.hasTrailingComment()||p.hasTrailingWhitespace()||xt(".");Oe(n.kind,t.expression.end,xt,t),Rt(a,!1),me(t.name),Bt(i,a)}(r);case 194:return function(e){ye(e.expression),me(e.questionDotToken),Oe(22,e.expression.end,xt,e),ye(e.argumentExpression),Oe(23,e.argumentExpression.end,xt,e)}(r);case 195:return function(e){ye(e.expression),me(e.questionDotToken),dt(e,e.typeArguments),yt(e,e.arguments,2576)}(r);case 196:return function(e){Oe(98,e.pos,St,e),kt(),ye(e.expression),dt(e,e.typeArguments),yt(e,e.arguments,18960)}(r);case 197:return function(e){ye(e.tag),dt(e,e.typeArguments),kt(),ye(e.template)}(r);case 198:return function(e){xt("<"),me(e.type),xt(">"),ye(e.expression)}(r);case 199:return function(e){var t=Oe(20,e.pos,xt,e);ye(e.expression),Oe(21,e.expression?e.expression.end:t,xt,e)}(r);case 200:return function(e){Zt(e.name),Me(e)}(r);case 201:return function(e){_t(e,e.decorators),at(e,e.modifiers),Re(e,Ae)}(r);case 202:return function(e){Oe(84,e.pos,St,e),kt(),ye(e.expression)}(r);case 203:return function(e){Oe(107,e.pos,St,e),kt(),ye(e.expression)}(r);case 204:return function(e){Oe(109,e.pos,St,e),kt(),ye(e.expression)}(r);case 205:return function(e){Oe(126,e.pos,St,e),kt(),ye(e.expression)}(r);case 206:return function(e){Ot(e.operator,Tt),function(e){var t=e.operand;return 206===t.kind&&(39===e.operator&&(39===t.operator||45===t.operator)||40===e.operator&&(40===t.operator||46===t.operator))}(e)&&kt();ye(e.operand)}(r);case 207:return function(e){ye(e.operand),Ot(e.operator,Tt)}(r);case 208:return function(e){var t=27!==e.operatorToken.kind,r=Ut(e,e.left,e.operatorToken),n=Ut(e,e.operatorToken,e.right);ye(e.left),Rt(r,t),gr(e.operatorToken.pos),It(e.operatorToken,96===e.operatorToken.kind?St:Tt),hr(e.operatorToken.end,!0),Rt(n,!0),ye(e.right),Bt(r,n)}(r);case 209:return function(e){var t=Ut(e,e.condition,e.questionToken),r=Ut(e,e.questionToken,e.whenTrue),n=Ut(e,e.whenTrue,e.colonToken),i=Ut(e,e.colonToken,e.whenFalse);ye(e.condition),Rt(t,!0),me(e.questionToken),Rt(r,!0),ye(e.whenTrue),Bt(t,r),Rt(n,!0),me(e.colonToken),Rt(i,!0),ye(e.whenFalse),Bt(n,i)}(r);case 210:return function(e){me(e.head),gt(e,e.templateSpans,262144)}(r);case 211:return function(e){Oe(120,e.pos,St,e),me(e.asteriskToken),ut(e.expression)}(r);case 212:return function(e){Oe(25,e.pos,xt,e),ye(e.expression)}(r);case 213:return function(e){Zt(e.name),ze(e)}(r);case 214:return;case 216:return function(e){ye(e.expression),e.type&&(kt(),St("as"),kt(),me(e.type))}(r);case 217:return function(e){ye(e.expression),Tt("!")}(r);case 218:return function(e){wt(e.keywordToken,e.pos,xt),xt("."),me(e.name)}(r);case 264:return function(e){me(e.openingElement),gt(e,e.children,262144),me(e.closingElement)}(r);case 265:return function(e){xt("<"),qe(e.tagName),dt(e,e.typeArguments),kt(),me(e.attributes),xt("/>")}(r);case 268:return function(e){me(e.openingFragment),gt(e,e.children,262144),me(e.closingFragment)}(r);case 319:return function(e){ye(e.expression)}(r);case 320:return function(e){yt(e,e.elements,528)}(r)}}function Se(t,r){e.Debug.assert(b===r||x===r),be(1,r)(t,x=C(t,r)),e.Debug.assert(b===r||x===r)}function Te(r){var i=!1,a=289===r.kind?r:void 0;if(!a||I!==e.ModuleKind.None){for(var o=a?a.prepends.length:0,s=a?a.sourceFiles.length+o:1,c=0;c'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"no-default-lib"}),At()}if(n&&n.moduleName&&(Ct('/// '),At()),n&&n.amdDependencies)for(var o=0,s=n.amdDependencies;o'):Ct('/// '),At()}for(var u=0,l=t;u'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"reference",data:_.fileName}),At()}for(var d=0,f=r;d'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"type",data:_.fileName}),At()}for(var m=0,g=i;m'),L&&L.sections.push({pos:a,end:p.getTextPos(),kind:"lib",data:_.fileName}),At()}}function Ze(t){var r=t.statements;Ht(t),e.forEach(t.statements,Qt),Te(t);var n=e.findIndex(r,(function(t){return!e.isPrologueDirective(t)}));!function(e){e.isDeclarationFile&&$e(e.hasNoDefaultLib,e.referencedFiles,e.typeReferenceDirectives,e.libReferenceDirectives)}(t),gt(t,r,1,-1===n?r.length:n),Yt(t)}function et(t,r,n,i){for(var a=!!r,o=0;o=n.length||0===s;if(u&&32768&a)return k&&k(n),void(N&&N(n));if(15360&a&&(xt(function(e){return i[15360&e][0]}(a)),u&&!c&&hr(n.pos,!0)),k&&k(n),u)1&a?At():256&a&&!(524288&a)&&kt();else{var l=0==(262144&a),_=l;jt(r,n,a)?(At(),_=!1):256&a&&kt(),128&a&&Ft();for(var d=void 0,p=void 0,f=!1,m=0;m=0&&Cr(u,i);i=a(r,n,i),c&&(i=c.end);0==(256&s)&&i>=0&&Cr(u,i);return i}(i,t,n,r,Ot)}function It(t,r){A&&A(t),r(e.tokenToString(t.kind)),F&&F(t)}function Ot(t,r,n){var i=e.tokenToString(t);return r(i),n<0?n:n+i.length}function Mt(t){1&e.getEmitFlags(t)?kt():At()}function Lt(t){for(var r=t.split(/\r\n?|\n/g),n=e.guessIndentation(r),i=0,a=r;i0||o>0)&&a!==o&&(c||dr(a,s),(!c||a>=0&&0!=(512&n))&&(U=a),(!u||o>=0&&0!=(1024&n))&&(V=o,242===r.kind&&(q=o))),e.forEach(e.getSyntheticLeadingComments(r),cr),X();var p=be(2,r);2048&n?(G=!0,p(t,r),G=!1):p(t,r),Y(),e.forEach(e.getSyntheticTrailingComments(r),ur),(a>0||o>0)&&a!==o&&(U=l,V=_,q=d,!u&&s&&function(e){xr(e,yr)}(o)),X(),e.Debug.assert(b===r||x===r)}function cr(e){2===e.kind&&p.writeLine(),lr(e),e.hasTrailingNewLine||2===e.kind?p.writeLine():p.writeSpace(" ")}function ur(e){p.isAtStartOfLine()||p.writeSpace(" "),lr(e),e.hasTrailingNewLine&&p.writeLine()}function lr(t){var r=function(e){return 3===e.kind?"/*"+e.text+"*/":"//"+e.text}(t),n=3===t.kind?e.computeLineStarts(r):void 0;e.writeCommentRange(r,n,p,0,r.length,w)}function _r(t,r,i){Y();var a=r.pos,o=r.end,s=e.getEmitFlags(t),c=G||o<0||0!=(1024&s);a<0||0!=(512&s)||function(t){var r=e.emitDetachedComments(n.text,fe(),p,Dr,t,w,G);r&&(v?v.push(r):v=[r])}(r),X(),2048&s&&!G?(G=!0,i(t),G=!1):i(t),Y(),c||(dr(r.end,!0),W&&!p.isAtStartOfLine()&&p.writeLine()),X()}function dr(e,t){W=!1,t?br(e,mr):0===e&&br(e,pr)}function pr(t,r,i,a,o){(function(t,r){return e.isRecognizedTripleSlashComment(n.text,t,r)})(t,r)&&mr(t,r,i,a,o)}function fr(r,n){return!t.onlyPrintJsDocStyle||(e.isJSDocLikeText(r,n)||e.isPinnedComment(r,n))}function mr(t,r,i,a,o){fr(n.text,t)&&(W||(e.emitNewLineBeforeLeadingCommentOfPosition(fe(),p,o,t),W=!0),Er(t),e.writeCommentRange(n.text,fe(),p,t,r,w),Er(r),a?p.writeLine():3===i&&p.writeSpace(" "))}function gr(e){G||-1===e||dr(e,!0)}function yr(t,r,i,a){fr(n.text,t)&&(p.isAtStartOfLine()||p.writeSpace(" "),Er(t),e.writeCommentRange(n.text,fe(),p,t,r,w),Er(r),a&&p.writeLine())}function hr(e,t){G||(Y(),xr(e,t?yr:vr),X())}function vr(t,r,i,a){Er(t),e.writeCommentRange(n.text,fe(),p,t,r,w),Er(r),a?p.writeLine():p.writeSpace(" ")}function br(t,r){!n||-1!==U&&t===U||(function(t){return void 0!==v&&e.last(v).nodePos===t}(t)?function(t){var r=e.last(v).detachedCommentEndPos;v.length-1?v.pop():v=void 0;e.forEachLeadingCommentRange(n.text,r,t,r)}(r):e.forEachLeadingCommentRange(n.text,t,r,t))}function xr(t,r){n&&(-1===V||t!==V&&t!==q)&&e.forEachTrailingCommentRange(n.text,t,r)}function Dr(t,r,i,a,o,s){fr(n.text,a)&&(Er(a),e.writeCommentRange(t,r,i,a,o,s),Er(o))}function Sr(t,r){e.Debug.assert(b===r||x===r);var n=be(3,r);if(e.isUnparsedSource(r)||e.isUnparsedPrepend(r))n(t,r);else if(e.isUnparsedNode(r)){var i=function(t){return void 0===t.parsedSourceMap&&void 0!==t.sourceMapText&&(t.parsedSourceMap=e.tryParseRawSourceMap(t.sourceMapText)||!1),t.parsedSourceMap||void 0}(r.parent);i&&g&&g.appendSourceMap(p.getLine(),p.getColumn(),i,r.parent.sourceMapPath,r.parent.getLineAndCharacterOfPosition(r.pos),r.parent.getLineAndCharacterOfPosition(r.end)),n(t,r)}else{var a=e.getSourceMapRange(r),o=a.pos,s=a.end,c=a.source,u=void 0===c?y:c,l=e.getEmitFlags(r);318!==r.kind&&0==(16&l)&&o>=0&&Cr(u,Tr(u,o)),64&l?(J=!0,n(t,r),J=!1):n(t,r),318!==r.kind&&0==(32&l)&&s>=0&&Cr(u,s)}e.Debug.assert(b===r||x===r)}function Tr(t,r){return t.skipTrivia?t.skipTrivia(r):e.skipTrivia(t.text,r)}function Er(t){if(!(J||e.positionIsSynthesized(t)||Nr(y))){var r=e.getLineAndCharacterOfPosition(y,t),n=r.line,i=r.character;g.addMapping(p.getLine(),p.getColumn(),z,n,i,void 0)}}function Cr(e,t){if(e!==y){var r=y;kr(e),Er(t),kr(r)}else Er(t)}function kr(e){J||(y=e,Nr(e)||(z=g.addSource(e.fileName),t.inlineSources&&g.setSourceContent(z,e.text)))}function Nr(t){return e.fileExtensionIs(t.fileName,".json")}}e.isBuildInfoFile=function(t){return e.fileExtensionIs(t,".tsbuildinfo")},e.forEachEmittedFile=o,e.getTsBuildInfoEmitOutputFilePath=s,e.getOutputPathsForBundle=c,e.getOutputPathsFor=u,e.getOutputExtension=_,e.getOutputDeclarationFileName=p,e.getAllProjectOutputs=function(e,t){var r=m(),n=r.addOutput,i=r.getOutputs;if(e.options.outFile||e.options.out)g(e,n);else{for(var a=0,o=e.fileNames;ae.getRootLength(t)&&!function(e){return!!a.has(e)||!!n.directoryExists(e)&&(a.set(e,!0),!0)}(t)&&(s(e.getDirectoryPath(t)),_.createDirectory?_.createDirectory(t):n.createDirectory(t))}function c(){return e.getDirectoryPath(e.normalizePath(n.getExecutingFilePath()))}var u=e.getNewLineCharacter(t,(function(){return n.newLine})),l=n.realpath&&function(e){return n.realpath(e)},_={getSourceFile:function(t,n,i){var a;try{e.performance.mark("beforeIORead"),a=_.readFile(t),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){i&&i(e.message),a=""}return void 0!==a?e.createSourceFile(t,a,n,r):void 0},getDefaultLibLocation:c,getDefaultLibFileName:function(t){return e.combinePaths(c(),e.getDefaultLibFileName(t))},writeFile:function(r,a,o,c){try{e.performance.mark("beforeIOWrite"),s(e.getDirectoryPath(e.normalizePath(r))),e.isWatchSet(t)&&n.createHash&&n.getModifiedTime?function(t,r,a){i||(i=e.createMap());var o=n.createHash(r),s=n.getModifiedTime(t);if(s){var c=i.get(t);if(c&&c.byteOrderMark===a&&c.hash===o&&c.mtime.getTime()===s.getTime())return}n.writeFile(t,r,a);var u=n.getModifiedTime(t)||e.missingFileModifiedTime;i.set(t,{hash:o,byteOrderMark:a,mtime:u})}(r,a,o):n.writeFile(r,a,o),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){c&&c(e.message)}},getCurrentDirectory:e.memoize((function(){return n.getCurrentDirectory()})),useCaseSensitiveFileNames:function(){return n.useCaseSensitiveFileNames},getCanonicalFileName:o,getNewLine:function(){return u},fileExists:function(e){return n.fileExists(e)},readFile:function(e){return n.readFile(e)},trace:function(e){return n.write(e+u)},directoryExists:function(e){return n.directoryExists(e)},getEnvironmentVariable:function(e){return n.getEnvironmentVariable?n.getEnvironmentVariable(e):""},getDirectories:function(e){return n.getDirectories(e)},realpath:l,readDirectory:function(e,t,r,i,a){return n.readDirectory(e,t,r,i,a)},createDirectory:function(e){return n.createDirectory(e)},createHash:e.maybeBind(n,n.createHash)};return _}function u(t,r){var n=e.diagnosticCategoryName(t)+" TS"+t.code+": "+D(t.messageText,r.getNewLine())+r.getNewLine();if(t.file){var i=e.getLineAndCharacterOfPosition(t.file,t.start),a=i.line,o=i.character,s=t.file.fileName;return e.convertToRelativePath(s,r.getCurrentDirectory(),(function(e){return r.getCanonicalFileName(e)}))+"("+(a+1)+","+(o+1)+"): "+n}return n}e.findConfigFile=function(t,r,n){return void 0===n&&(n="tsconfig.json"),e.forEachAncestorDirectory(t,(function(t){var i=e.combinePaths(t,n);return r(i)?i:void 0}))},e.resolveTripleslashReference=a,e.computeCommonSourceDirectoryOfFilenames=o,e.createCompilerHost=s,e.createCompilerHostWorker=c,e.changeCompilerHostLikeToUseCache=function(t,r,n){var i=t.readFile,a=t.fileExists,o=t.directoryExists,s=t.createDirectory,c=t.writeFile,u=e.createMap(),l=e.createMap(),_=e.createMap(),d=e.createMap(),p=function(e,r){var n=i.call(t,r);return u.set(e,void 0!==n&&n),n};t.readFile=function(n){var a=r(n),o=u.get(a);return void 0!==o?!1!==o?o:void 0:e.fileExtensionIs(n,".json")||e.isBuildInfoFile(n)?p(a,n):i.call(t,n)};var f=n?function(t,i,a,o){var s=r(t),c=d.get(s);if(c)return c;var u=n(t,i,a,o);return u&&(e.isDeclarationFileName(t)||e.fileExtensionIs(t,".json"))&&d.set(s,u),u}:void 0;return t.fileExists=function(e){var n=r(e),i=l.get(n);if(void 0!==i)return i;var o=a.call(t,e);return l.set(n,!!o),o},c&&(t.writeFile=function(e,n,i,a,o){var s=r(e);l.delete(s);var _=u.get(s);if(void 0!==_&&_!==n)u.delete(s),d.delete(s);else if(f){var p=d.get(s);p&&p.text!==n&&d.delete(s)}c.call(t,e,n,i,a,o)}),o&&s&&(t.directoryExists=function(e){var n=r(e),i=_.get(n);if(void 0!==i)return i;var a=o.call(t,e);return _.set(n,!!a),a},t.createDirectory=function(e){var n=r(e);_.delete(n),s.call(t,e)}),{originalReadFile:i,originalFileExists:a,originalDirectoryExists:o,originalCreateDirectory:s,originalWriteFile:c,getSourceFileWithCache:f,readFileWithCache:function(e){var t=r(e),n=u.get(t);return void 0!==n?!1!==n?n:void 0:p(t,e)}}},e.getPreEmitDiagnostics=function(r,n,i){var a=t(r.getConfigFileParsingDiagnostics(),r.getOptionsDiagnostics(i),r.getSyntacticDiagnostics(n,i),r.getGlobalDiagnostics(i),r.getSemanticDiagnostics(n,i));return e.getEmitDeclarations(r.getCompilerOptions())&&e.addRange(a,r.getDeclarationDiagnostics(n,i)),e.sortAndDeduplicateDiagnostics(a)},e.formatDiagnostics=function(e,t){for(var r="",n=0,i=e;n=4,x=(m+1+"").length;b&&(x=Math.max(p.length,x));for(var D="",S=c;S<=m;S++){D+=o.getNewLine(),b&&c+10||u.length>0)return{diagnostics:e.concatenate(l,u),sourceMaps:void 0,emittedFiles:void 0,emitSkipped:!0}}}var _=Ge().getEmitResolver(F.outFile||F.out?void 0:n,a);e.performance.mark("beforeEmit");var d=e.emitFiles(_,Ve(i),n,e.getTransformers(F,s,o),o,!1,c);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),d}(Be,r,n,i,a,o,s)}))},getCurrentDirectory:function(){return Z},getNodeCount:function(){return Ge().getNodeCount()},getIdentifierCount:function(){return Ge().getIdentifierCount()},getSymbolCount:function(){return Ge().getSymbolCount()},getTypeCount:function(){return Ge().getTypeCount()},getRelationCacheSizes:function(){return Ge().getRelationCacheSizes()},getFileProcessingDiagnostics:function(){return B},getResolvedTypeReferenceDirectives:function(){return R},isSourceFileFromExternalLibrary:We,isSourceFileDefaultLibrary:function(t){if(t.hasNoDefaultLib)return!0;if(!F.noLib)return!1;var r=G.useCaseSensitiveFileNames()?e.equateStringsCaseSensitive:e.equateStringsCaseInsensitive;return F.lib?e.some(F.lib,(function(n){return r(t.fileName,e.combinePaths(Q,n))})):r(t.fileName,X())},dropDiagnosticsProducingTypeChecker:function(){h=void 0},getSourceFileFromReference:function(e,t){return dt(a(t.fileName,e.fileName),(function(e){return me.get(Ke(e))||void 0}))},getLibFileFromReference:function(t){var r=t.fileName.toLocaleLowerCase(),n=e.libMap.get(r);if(n)return Xe(e.combinePaths(Q,n))},sourceFileToPackageName:pe,redirectTargetsMap:fe,isEmittedFile:function(t){if(F.noEmit)return!1;var r=Ke(t);if(Qe(r))return!1;var n=F.outFile||F.out;if(n)return Gt(r,n)||Gt(r,e.removeFileExtension(n)+".d.ts");if(F.declarationDir&&e.containsPath(F.declarationDir,r,Z,!G.useCaseSensitiveFileNames()))return!0;if(F.outDir)return e.containsPath(F.outDir,r,Z,!G.useCaseSensitiveFileNames());if(e.fileExtensionIsOneOf(r,e.supportedJSExtensions)||e.fileExtensionIs(r,".d.ts")){var i=e.removeFileExtension(r);return!!Qe(i+".ts")||!!Qe(i+".tsx")}return!1},getConfigFileParsingDiagnostics:function(){return P||e.emptyArray},getResolvedModuleWithFailedLookupLocationsFromCache:function(t,r){return V&&e.resolveModuleNameFromCache(t,r,V)},getProjectReferences:function(){return w},getResolvedProjectReferences:function(){return se},getProjectReferenceRedirect:ht,getResolvedProjectReferenceToRedirect:xt,getResolvedProjectReferenceByPath:Ct,forEachResolvedProjectReference:Dt,isSourceOfProjectReferenceRedirect:Tt,emitBuildInfo:function(t){e.Debug.assert(!F.out&&!F.outFile),e.performance.mark("beforeEmit");var r=e.emitFiles(e.notImplementedResolver,Ve(t),void 0,e.noTransformers,!1,!0);return e.performance.mark("afterEmit"),e.performance.measure("Emit","beforeEmit","afterEmit"),r},getProbableSymlinks:Ht};return function(){F.strictPropertyInitialization&&!e.getStrictOptionValue(F,"strictNullChecks")&&Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"strictPropertyInitialization","strictNullChecks");F.isolatedModules&&(F.out&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"out","isolatedModules"),F.outFile&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"outFile","isolatedModules"));F.inlineSourceMap&&(F.sourceMap&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"sourceMap","inlineSourceMap"),F.mapRoot&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"mapRoot","inlineSourceMap"));F.paths&&void 0===F.baseUrl&&Kt(e.Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option,"paths");F.composite&&(!1===F.declaration&&Kt(e.Diagnostics.Composite_projects_may_not_disable_declaration_emit,"declaration"),!1===F.incremental&&Kt(e.Diagnostics.Composite_projects_may_not_disable_incremental_compilation,"declaration"));F.tsBuildInfoFile?e.isIncrementalCompilation(F)||Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"tsBuildInfoFile","incremental","composite"):!F.incremental||F.outFile||F.out||F.configFilePath||$.add(e.createCompilerDiagnostic(e.Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));if(function(){var t=F.noEmit||F.suppressOutputPathCheck?void 0:e.getTsBuildInfoEmitOutputFilePath(F);Et(w,se,(function(r,n,i){var a=(i?i.commandLine.projectReferences:w)[n],o=i&&i.sourceFile;if(r){var s=r.commandLine.options;if(!s.composite)(i?i.commandLine.fileNames:A).length&&zt(o,n,e.Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true,a.path);if(a.prepend){var c=s.outFile||s.out;c?G.fileExists(c)||zt(o,n,e.Diagnostics.Output_file_0_from_project_1_does_not_exist,c,a.path):zt(o,n,e.Diagnostics.Cannot_prepend_project_0_because_it_does_not_have_outFile_set,a.path)}!i&&t&&t===e.getTsBuildInfoEmitOutputFilePath(s)&&(zt(o,n,e.Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1,t,a.path),re.set(Ke(t),!0))}else zt(o,n,e.Diagnostics.File_0_not_found,a.path)}))}(),F.composite)for(var t=e.arrayToSet(A,Ke),r=0,n=m;r1}))&&Kt(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files,"outDir")}F.useDefineForClassFields&&0===l&&Kt(e.Diagnostics.Option_0_cannot_be_specified_when_option_target_is_ES3,"useDefineForClassFields");F.checkJs&&!F.allowJs&&$.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"checkJs","allowJs"));F.emitDeclarationOnly&&(e.getEmitDeclarations(F)||Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2,"emitDeclarationOnly","declaration","composite"),F.noEmit&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"emitDeclarationOnly","noEmit"));F.emitDecoratorMetadata&&!F.experimentalDecorators&&Kt(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,"emitDecoratorMetadata","experimentalDecorators");F.jsxFactory?(F.reactNamespace&&Kt(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,"reactNamespace","jsxFactory"),e.parseIsolatedEntityName(F.jsxFactory,l)||Jt("jsxFactory",e.Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name,F.jsxFactory)):F.reactNamespace&&!e.isIdentifierText(F.reactNamespace,l)&&Jt("reactNamespace",e.Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier,F.reactNamespace);if(!F.noEmit&&!F.suppressOutputPathCheck){var h=Ve(),v=e.createMap();e.forEachEmittedFile(h,(function(e){F.emitDeclarationOnly||b(e.jsFilePath,v),b(e.declarationFilePath,v)}))}function b(t,r){if(t){var n=Ke(t);if(me.has(n)){var i=void 0;F.configFilePath||(i=e.chainDiagnosticMessages(void 0,e.Diagnostics.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig)),i=e.chainDiagnosticMessages(i,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file,t),Wt(t,e.createCompilerDiagnosticFromMessageChain(i))}var a=G.useCaseSensitiveFileNames()?n:n.toLocaleLowerCase();r.has(a)?Wt(t,e.createCompilerDiagnostic(e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files,t)):r.set(a,!0)}}}(),e.performance.mark("afterProgram"),e.performance.measure("Program","beforeProgram","afterProgram"),Be;function je(t){if(e.containsPath(Q,t.fileName,!1)){var r=e.getBaseFileName(t.fileName);if("lib.d.ts"===r||"lib.es6.d.ts"===r)return 0;var n=e.removeSuffix(e.removePrefix(r,"lib."),".d.ts"),i=e.libs.indexOf(n);if(-1!==i)return i+1}return e.libs.length+2}function Ke(t){return e.toPath(t,Z,wt)}function Je(t){return e.sourceFileMayBeEmitted(t,F,We,xt)&&!Tt(t.fileName)}function ze(){if(void 0===y){var t=e.filter(m,(function(e){return Je(e)}));F.rootDir&&Ot(t,F.rootDir)?y=e.getNormalizedAbsolutePath(F.rootDir,Z):F.composite&&F.configFilePath?Ot(t,y=e.getDirectoryPath(e.normalizeSlashes(F.configFilePath))):(r=t,y=o(e.mapDefined(r,(function(e){return e.isDeclarationFile?void 0:e.fileName})),Z,wt)),y&&y[y.length-1]!==e.directorySeparator&&(y+=e.directorySeparator)}var r;return y}function Ue(t,r,n){if(0===_e&&!n.ambientModuleNames.length)return q(t,r,void 0,xt(n.originalFileName));var i,a,o,s=I&&I.getSourceFile(r);if(s!==n&&n.resolvedModules){for(var c=[],u=0,l=t;u0;){var s=r.text.slice(a[o-1],a[o]),c=i.exec(s);if(!c)return!0;if(c[3])return!1;o--}return!0}function it(e,t){return ot(e,t,L,at)}function at(t,r){return et((function(){var n=Ge().getEmitResolver(t,r);return e.getDeclarationDiagnostics(Ve(e.noop),n,t)}))}function ot(t,r,n,i){var a=t?n.perFile&&n.perFile.get(t.path):n.allDiagnostics;if(a)return a;var o=i(t,r)||e.emptyArray;return t?(n.perFile||(n.perFile=e.createMap()),n.perFile.set(t.path,o)):n.allDiagnostics=o,o}function st(e,t){return e.isDeclarationFile?[]:it(e,t)}function ct(t,r,n){pt(e.normalizePath(t),r,n,void 0)}function ut(e,t){return e.fileName===t.fileName}function lt(e,t){return 75===e.kind?75===t.kind&&e.escapedText===t.escapedText:10===t.kind&&e.text===t.text}function _t(t){if(!t.imports){var r,n,i,a=e.isSourceFileJS(t),o=e.isExternalModule(t);if(F.importHelpers&&(F.isolatedModules||o)&&!t.isDeclarationFile){var s=e.createLiteral(e.externalHelpersModuleNameText),c=e.createImportDeclaration(void 0,void 0,void 0,s);e.addEmitFlags(c,67108864),s.parent=c,c.parent=t,r=[s]}for(var u=0,l=t.statements;u0),Object.defineProperties(o,{id:{get:function(){return this.redirectInfo.redirectTarget.id},set:function(e){this.redirectInfo.redirectTarget.id=e}},symbol:{get:function(){return this.redirectInfo.redirectTarget.symbol},set:function(e){this.redirectInfo.redirectTarget.symbol=e}}}),o}(x,v,t,r,Ke(t),_);return fe.add(x.path,t),yt(D,r,l),pe.set(r,o.name),p.push(D),D}v&&(de.set(b,v),pe.set(r,o.name))}if(yt(v,r,l),v){if(z.set(r,K>0),v.path=r,v.resolvedPath=Ke(t),v.originalFileName=_,G.useCaseSensitiveFileNames()){var S=r.toLowerCase(),T=ge.get(S);T?ft(t,T.fileName,a):ge.set(S,v)}Y=Y||v.hasNoDefaultLib&&!i,F.noResolve||(kt(v,n),Nt(v)),F.noLib||Ft(v),It(v),n?d.push(v):p.push(v)}return gt(v,a),v}function gt(t,r){r&&t&&(x||(x=e.createMultiMap())).add(t.path,{kind:r.kind,index:r.index,file:r.file.path})}function yt(e,t,r){r?(me.set(r,e),me.set(t,e||!1)):me.set(t,e)}function ht(e){var t=vt(e);return t&&bt(t,e)}function vt(t){if(se&&se.length&&!e.fileExtensionIs(t,".d.ts"))return xt(t)}function bt(t,r){var n=t.commandLine.options.outFile||t.commandLine.options.out;return n?e.changeExtension(n,".d.ts"):e.getOutputDeclarationFileName(r,t.commandLine,!G.useCaseSensitiveFileNames())}function xt(t){void 0===ue&&(ue=e.createMap(),Dt((function(e,t){e&&Ke(F.configFilePath)!==t&&e.commandLine.fileNames.forEach((function(e){return ue.set(Ke(e),t)}))})));var r=ue.get(Ke(t));return r&&Ct(r)}function Dt(e){return Et(w,se,(function(t,r,n){var i=Ke(C((n?n.commandLine.projectReferences:w)[r]));return e(t,i)}))}function St(t){if(e.isDeclarationFileName(t))return void 0===le&&(le=e.createMap(),Dt((function(t){if(t){var r=t.commandLine.options.outFile||t.commandLine.options.out;if(r){var n=e.changeExtension(r,".d.ts");le.set(Ke(n),!0)}else e.forEach(t.commandLine.fileNames,(function(r){if(!e.fileExtensionIs(r,".d.ts")){var n=e.getOutputDeclarationFileName(r,t.commandLine,G.useCaseSensitiveFileNames());le.set(Ke(n),r)}}))}}))),le.get(Ke(t))}function Tt(e){return ye&&!!xt(e)}function Et(t,r,n,i){var a;return function t(r,n,i,o,s){if(s){var c=s(r,i);if(c)return c}return e.forEach(n,(function(r,n){if(!e.contains(a,r)){var c=o(r,n,i);if(c)return c;if(r)return(a||(a=[])).push(r),t(r.commandLine.projectReferences,r.references,r,o,s)}}))}(t,r,void 0,n,i)}function Ct(e){if(ce)return ce.get(e)||void 0}function kt(t,r){e.forEach(t.referencedFiles,(function(n,i){pt(a(n.fileName,t.originalFileName),r,!1,void 0,{kind:e.RefFileKind.ReferenceFile,index:i,file:t,pos:n.pos,end:n.end})}))}function Nt(t){var r=e.map(t.typeReferenceDirectives,(function(e){return e.fileName.toLocaleLowerCase()}));if(r)for(var n=W(r,t.originalFileName,xt(t.originalFileName)),i=0;ij,_=u&&!k(F,a)&&!F.noResolve&&ir&&($.add(e.createDiagnosticForNodeInSourceFile(F.configFile,p.elements[r],n,i,a,o)),s=!1)}}s&&$.add(e.createCompilerDiagnostic(n,i,a,o))}function Bt(t,r,n,i){for(var a=!0,o=0,s=jt();or?$.add(e.createDiagnosticForNodeInSourceFile(t||F.configFile,o.elements[r],n,i,a)):$.add(e.createCompilerDiagnostic(n,i,a))}function Ut(t,r,n,i,a,o,s){var c=Vt();(!c||!qt(c,t,r,n,i,a,o,s))&&$.add(e.createCompilerDiagnostic(i,a,o,s))}function Vt(){if(void 0===U){U=null;var t=e.getTsConfigObjectLiteralExpression(F.configFile);if(t)for(var r=0,n=e.getPropertyAssignment(t,"compilerOptions");r0)for(var s=t.getTypeChecker(),c=0,u=r.imports;c0)for(var d=0,p=r.referencedFiles;d1&&D(x)}return o;function D(t){for(var n=0,i=t.declarations;n1?p.outputFiles[1]:void 0:p.outputFiles.length>0?p.outputFiles[0]:void 0;f?(e.Debug.assert(e.fileExtensionIs(f.name,".d.ts"),"File extension for signature expected to be dts",(function(){return"Found: "+e.getAnyExtensionFromPath(f.name)+" for "+f.name+":: All output files: "+JSON.stringify(p.outputFiles.map((function(e){return e.name})))})),l=s(f.text),c&&l!==_&&function(t,r,i){if(!r)return void i.set(t.path,!1);var a;r.forEach((function(t){var r;(r=n(t))&&(a||(a=e.createMap()),a.set(r,!0))})),i.set(t.path,a||!1)}(i,p.exportedModulesFromDeclarationEmit,c)):l=_}return a.set(i.path,l),!_||l!==_}function l(t,r){if(!t.allFileNames){var n=r.getSourceFiles();t.allFileNames=n===e.emptyArray?e.emptyArray:n.map((function(e){return e.fileName}))}return t.allFileNames}function _(t,r){return e.arrayFrom(e.mapDefinedIterator(t.referencedMap.entries(),(function(e){var t=e[0];return e[1].has(r)?t:void 0})))}function d(t){return function(t){return e.some(t.moduleAugmentations,(function(t){return e.isGlobalScopeAugmentation(t.parent)}))}(t)||!e.isExternalModule(t)&&!function(t){for(var r=0,n=t.statements;r0;){var m=f.pop();if(!l.has(m)){var g=r.getSourceFileByPath(m);l.set(m,g),g&&u(t,r,g,i,a,o,s)&&f.push.apply(f,_(t,g.resolvedPath))}}return e.arrayFrom(e.mapDefinedIterator(l.values(),(function(e){return e})))}t.canReuseOldState=s,t.create=function(t,r,n){for(var i=e.createMap(),a=t.getCompilerOptions().module!==e.ModuleKind.None?e.createMap():void 0,c=a?e.createMap():void 0,u=e.createMap(),l=s(a,n),_=0,d=t.getSourceFiles();_0;){var o=a.pop();if(!i.has(o))if(i.set(o,!0),n(t,o)&&u(t,o)){var s=e.Debug.assertDefined(t.program).getSourceFileByPath(o);a.push.apply(a,e.BuilderState.getReferencedByPaths(t,s.resolvedPath))}}}e.Debug.assert(!!t.currentAffectedFilesExportedModulesMap);var c=e.createMap();if(e.forEachEntry(t.currentAffectedFilesExportedModulesMap,(function(e,i){return e&&e.has(r.path)&&l(t,i,c,n)})))return;e.forEachEntry(t.exportedModulesMap,(function(e,i){return!t.currentAffectedFilesExportedModulesMap.has(i)&&e.has(r.path)&&l(t,i,c,n)}))}(t,r,(function(t,r){return function(t,r,n,i){if(c(t,r),!t.changedFilesSet.has(r)){var a=e.Debug.assertDefined(t.program),o=a.getSourceFileByPath(r);o&&(e.BuilderState.updateShapeSignature(t,a,o,e.Debug.assertDefined(t.currentAffectedFilesSignatures),n,i,t.currentAffectedFilesExportedModulesMap),e.getEmitDeclarations(t.compilerOptions)&&v(t,r,0))}return!1}(t,r,n,i)}));else if(!t.cleanedDiagnosticsOfLibFiles){t.cleanedDiagnosticsOfLibFiles=!0;var a=e.Debug.assertDefined(t.program),o=a.getCompilerOptions();e.forEach(a.getSourceFiles(),(function(r){return a.isSourceFileDefaultLibrary(r)&&!e.skipTypeChecking(r,o,a)&&c(t,r.path)}))}}function c(e,t){return!e.semanticDiagnosticsFromOldState||(e.semanticDiagnosticsFromOldState.delete(t),e.semanticDiagnosticsPerFile.delete(t),!e.semanticDiagnosticsFromOldState.size)}function u(t,r){return e.Debug.assertDefined(t.currentAffectedFilesSignatures).get(r)!==e.Debug.assertDefined(t.fileInfos.get(r)).signature}function l(t,r,n,i){return e.forEachEntry(t.referencedMap,(function(a,o){return a.has(r)&&function t(r,n,i,a){if(!e.addToSeen(i,n))return!1;if(a(r,n))return!0;e.Debug.assert(!!r.currentAffectedFilesExportedModulesMap);if(e.forEachEntry(r.currentAffectedFilesExportedModulesMap,(function(e,o){return e&&e.has(n)&&t(r,o,i,a)})))return!0;if(e.forEachEntry(r.exportedModulesMap,(function(e,o){return!r.currentAffectedFilesExportedModulesMap.has(o)&&e.has(n)&&t(r,o,i,a)})))return!0;return!!e.forEachEntry(r.referencedMap,(function(e,t){return e.has(n)&&!i.has(t)&&a(r,t)}))}(t,o,n,i)}))}function _(t,r,n,i,a){a?t.emittedBuildInfo=!0:r===t.program?(t.changedFilesSet.clear(),t.programEmitComplete=!0):(t.seenAffectedFiles.set(r.path,!0),void 0!==n&&(t.seenEmittedFiles||(t.seenEmittedFiles=e.createMap())).set(r.path,n),i?t.affectedFilesPendingEmitIndex++:t.affectedFilesIndex++)}function d(e,t,r){return _(e,r),{result:t,affected:r}}function p(e,t,r,n,i,a){return _(e,r,n,i,a),{result:t,affected:r}}function f(t,r,n){var i=r.path;if(t.semanticDiagnosticsPerFile){var a=t.semanticDiagnosticsPerFile.get(i);if(a)return a}var o=e.Debug.assertDefined(t.program).getSemanticDiagnostics(r,n);return t.semanticDiagnosticsPerFile&&t.semanticDiagnosticsPerFile.set(i,o),o}function m(t,r){var n={},i=e.getOptionNameMap().optionNameMap;for(var a in t)e.hasProperty(t,a)&&(n[a]=g(i.get(a.toLowerCase()),t[a],r));return n.configFilePath&&(n.configFilePath=r(n.configFilePath)),n}function g(e,t,r){if(e)if("list"===e.type){var n=t;if(e.element.isFilePath&&n.length)return n.map(r)}else if(e.isFilePath)return r(t);return t}function y(t,r){return e.Debug.assert(!!t.length),t.map((function(t){var n=h(t,r);n.reportsUnnecessary=t.reportsUnnecessary,n.source=t.source;var i=t.relatedInformation;return n.relatedInformation=i?i.length?i.map((function(e){return h(e,r)})):e.emptyArray:void 0,n}))}function h(e,t){var n=e.file;return r(r({},e),{file:n?t(n.path):void 0})}function v(t,r,n){t.affectedFilesPendingEmit||(t.affectedFilesPendingEmit=[]),t.affectedFilesPendingEmitKind||(t.affectedFilesPendingEmitKind=e.createMap());var i=t.affectedFilesPendingEmitKind.get(r);t.affectedFilesPendingEmit.push(r),t.affectedFilesPendingEmitKind.set(r,i||n),void 0===t.affectedFilesPendingEmitIndex&&(t.affectedFilesPendingEmitIndex=0)}function b(t,r){if(t){var n=e.createMap();for(var i in t)e.hasProperty(t,i)&&n.set(r(i),e.arrayToSet(t[i],r));return n}}function x(t,r){return{getState:e.notImplemented,backupState:e.noop,restoreState:e.noop,getProgram:n,getProgramOrUndefined:function(){return t.program},releaseProgram:function(){return t.program=void 0},getCompilerOptions:function(){return t.compilerOptions},getSourceFile:function(e){return n().getSourceFile(e)},getSourceFiles:function(){return n().getSourceFiles()},getOptionsDiagnostics:function(e){return n().getOptionsDiagnostics(e)},getGlobalDiagnostics:function(e){return n().getGlobalDiagnostics(e)},getConfigFileParsingDiagnostics:function(){return r},getSyntacticDiagnostics:function(e,t){return n().getSyntacticDiagnostics(e,t)},getDeclarationDiagnostics:function(e,t){return n().getDeclarationDiagnostics(e,t)},getSemanticDiagnostics:function(e,t){return n().getSemanticDiagnostics(e,t)},emit:function(e,t,r,i,a){return n().emit(e,t,r,i,a)},getAllDependencies:e.notImplemented,getCurrentDirectory:function(){return n().getCurrentDirectory()}};function n(){return e.Debug.assertDefined(t.program)}}!function(e){e[e.DtsOnly=0]="DtsOnly",e[e.Full=1]="Full"}(e.BuilderFileEmit||(e.BuilderFileEmit={})),function(e){e[e.SemanticDiagnosticsBuilderProgram=0]="SemanticDiagnosticsBuilderProgram",e[e.EmitAndSemanticDiagnosticsBuilderProgram=1]="EmitAndSemanticDiagnosticsBuilderProgram"}(t=e.BuilderProgramKind||(e.BuilderProgramKind={})),e.getBuilderCreationParameters=function(t,r,n,i,a,o){var s,c,u;return void 0===t?(e.Debug.assert(void 0===r),s=n,u=i,e.Debug.assert(!!u),c=u.getProgram()):e.isArray(t)?(u=i,c=e.createProgram({rootNames:t,options:r,host:n,oldProgram:u&&u.getProgramOrUndefined(),configFileParsingDiagnostics:a,projectReferences:o}),s=n):(c=t,s=r,u=n,a=i),{host:s,newProgram:c,oldProgram:u,configFileParsingDiagnostics:a||e.emptyArray}},e.createBuilderProgram=function(r,i){var s=i.newProgram,c=i.host,u=i.oldProgram,l=i.configFileParsingDiagnostics,g=u&&u.getState();if(g&&s===g.program&&l===s.getConfigFileParsingDiagnostics())return s=void 0,g=void 0,u;var h,b=e.createGetCanonicalFileName(c.useCaseSensitiveFileNames()),D=c.createHash||e.generateDjb2Hash,S=n(s,b,g);s.getProgramBuildInfo=function(){return function(t,r){if(!t.compilerOptions.outFile&&!t.compilerOptions.out){var n=e.Debug.assertDefined(t.program).getCurrentDirectory(),i=e.getDirectoryPath(e.getNormalizedAbsolutePath(e.getTsBuildInfoEmitOutputFilePath(t.compilerOptions),n)),a={};t.fileInfos.forEach((function(e,r){var n=t.currentAffectedFilesSignatures&&t.currentAffectedFilesSignatures.get(r);a[l(r)]=void 0===n?e:{version:e.version,signature:n}}));var o={fileInfos:a,options:m(t.compilerOptions,(function(t){return l(e.getNormalizedAbsolutePath(t,n))}))};if(t.referencedMap){var s={};t.referencedMap.forEach((function(t,r){s[l(r)]=e.arrayFrom(t.keys(),l)})),o.referencedMap=s}if(t.exportedModulesMap){var c={};t.exportedModulesMap.forEach((function(r,n){var i=t.currentAffectedFilesExportedModulesMap&&t.currentAffectedFilesExportedModulesMap.get(n);void 0===i?c[l(n)]=e.arrayFrom(r.keys(),l):i&&(c[l(n)]=e.arrayFrom(i.keys(),l))})),o.exportedModulesMap=c}if(t.semanticDiagnosticsPerFile){var u=[];t.semanticDiagnosticsPerFile.forEach((function(e,r){return u.push(e.length?[l(r),t.hasReusableDiagnostic?e:y(e,l)]:l(r))})),o.semanticDiagnosticsPerFile=u}return o}function l(t){return e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(i,t,r))}}(S,b)},s=void 0,u=void 0,g=void 0;var T=x(S,l);return T.getState=function(){return S},T.backupState=function(){e.Debug.assert(void 0===h),h=function(t){var r=e.BuilderState.clone(t);return r.semanticDiagnosticsPerFile=e.cloneMapOrUndefined(t.semanticDiagnosticsPerFile),r.changedFilesSet=e.cloneMap(t.changedFilesSet),r.affectedFiles=t.affectedFiles,r.affectedFilesIndex=t.affectedFilesIndex,r.currentChangedFilePath=t.currentChangedFilePath,r.currentAffectedFilesSignatures=e.cloneMapOrUndefined(t.currentAffectedFilesSignatures),r.currentAffectedFilesExportedModulesMap=e.cloneMapOrUndefined(t.currentAffectedFilesExportedModulesMap),r.seenAffectedFiles=e.cloneMapOrUndefined(t.seenAffectedFiles),r.cleanedDiagnosticsOfLibFiles=t.cleanedDiagnosticsOfLibFiles,r.semanticDiagnosticsFromOldState=e.cloneMapOrUndefined(t.semanticDiagnosticsFromOldState),r.program=t.program,r.compilerOptions=t.compilerOptions,r.affectedFilesPendingEmit=t.affectedFilesPendingEmit&&t.affectedFilesPendingEmit.slice(),r.affectedFilesPendingEmitKind=e.cloneMapOrUndefined(t.affectedFilesPendingEmitKind),r.affectedFilesPendingEmitIndex=t.affectedFilesPendingEmitIndex,r.seenEmittedFiles=e.cloneMapOrUndefined(t.seenEmittedFiles),r.programEmitComplete=t.programEmitComplete,r}(S)},T.restoreState=function(){S=e.Debug.assertDefined(h),h=void 0},T.getAllDependencies=function(t){return e.BuilderState.getAllDependencies(S,e.Debug.assertDefined(S.program),t)},T.getSemanticDiagnostics=function(t,r){a(S,t);var n,i=e.Debug.assertDefined(S.program).getCompilerOptions();if(i.outFile||i.out)return e.Debug.assert(!S.semanticDiagnosticsPerFile),e.Debug.assertDefined(S.program).getSemanticDiagnostics(t,r);if(t)return f(S,t,r);for(;C(r););for(var o=0,s=e.Debug.assertDefined(S.program).getSourceFiles();o1||47!==t.charCodeAt(0);if(a&&0!==t.search(/[a-zA-Z]:/)&&0===i.search(/[a-zA-z]\$\//)){if(-1===(n=t.indexOf(e.directorySeparator,n+1)))return!1;i=t.substring(r+i.length,n+1)}if(a&&0!==i.search(/users\//i))return!0;for(var o=n+1,s=2;s>0;s--)if(0===(o=t.indexOf(e.directorySeparator,o)+1))return!1;return!0}e.isPathIgnored=t,e.canWatchDirectory=r,e.maxNumberOfFilesToIterateForInvalidation=256,e.createResolutionCache=function(n,i,a){var o,s,c,u=!1,l=e.createMultiMap(),_=e.memoize((function(){return n.getCurrentDirectory()})),d=n.getCachedDirectoryStructureHost(),p=e.createMap(),f=e.createCacheWithRedirects(),m=e.createCacheWithRedirects(),g=e.createModuleResolutionCacheWithMaps(f,m,_(),n.getCanonicalFileName),y=e.createMap(),h=e.createCacheWithRedirects(),v=[".ts",".tsx",".js",".jsx",".json"],b=e.createMap(),x=e.createMap(),D=i&&e.removeTrailingDirectorySeparator(e.getNormalizedAbsolutePath(i,_())),S=D&&n.toPath(D),T=e.createMap();return{startRecordingFilesWithChangedResolutions:function(){o=[]},finishRecordingFilesWithChangedResolutions:function(){var e=o;return o=void 0,e},startCachingPerDirectoryResolution:A,finishCachingPerDirectoryResolution:function(){u=!1,c=void 0,A(),x.forEach((function(e,t){0===e.refCount&&(x.delete(t),e.watcher.close())}))},resolveModuleNames:function(t,r,n,i){return P(t,r,i,p,f,F,E,(function(t){return!t.resolvedModule||!e.resolutionExtensionIsTSOrJson(t.resolvedModule.extension)}),n,a)},getResolvedModuleWithFailedLookupLocationsFromCache:function(e,t){var r=p.get(n.toPath(t));return r&&r.get(e)},resolveTypeReferenceDirectives:function(t,r,n){return P(t,r,n,y,h,e.resolveTypeReferenceDirective,C,(function(e){return void 0===e.resolvedTypeReferenceDirective}),void 0,!1)},removeResolutionsFromProjectReferenceRedirects:function(t){if(!e.fileExtensionIs(t,".json"))return;var r=n.getCurrentProgram();if(!r)return;var i=r.getResolvedProjectReferenceByPath(t);if(!i)return;i.commandLine.fileNames.forEach((function(e){return W(n.toPath(e))}))},removeResolutionsOfFile:W,invalidateResolutionOfFile:function(e){W(e),H((function(t,r){var i=r(t);return!!i&&n.toPath(i.resolvedFileName)===e}))},setFilesWithInvalidatedNonRelativeUnresolvedImports:function(t){e.Debug.assert(c===t||void 0===c),c=t},createHasInvalidatedResolution:function(t){if(u||t)return s=void 0,e.returnTrue;var r=s;return s=void 0,function(e){return!!r&&r.has(e)||N(e)}},updateTypeRootsWatch:function(){var t=n.getCompilationSettings();if(t.types)return void X();var r=e.getEffectiveTypeRoots(t,{directoryExists:$,getCurrentDirectory:_});r?e.mutateMap(T,e.arrayToMap(r,(function(e){return n.toPath(e)})),{createNewValue:Q,onDeleteValue:e.closeFileWatcher}):X()},closeTypeRootsWatch:X,clear:function(){e.clearMap(x,e.closeFileWatcherOf),b.clear(),l.clear(),X(),p.clear(),y.clear(),u=!1,A()}};function E(e){return e.resolvedModule}function C(e){return e.resolvedTypeReferenceDirective}function k(t,r){return!(void 0===t||r.length<=t.length)&&(e.startsWith(r,t)&&r[t.length]===e.directorySeparator)}function N(e){if(!c)return!1;var t=c.get(e);return!!t&&!!t.length}function A(){f.clear(),m.clear(),h.clear(),l.forEach(K),l.clear()}function F(t,r,i,a,o){var s=e.resolveModuleName(t,r,i,a,g,o);if(!n.getGlobalCache)return s;var c=n.getGlobalCache();if(!(void 0===c||e.isExternalModuleNameRelative(t)||s.resolvedModule&&e.extensionIsTS(s.resolvedModule.extension))){var u=e.loadModuleFromGlobalCache(e.Debug.assertDefined(n.globalCacheResolutionModuleName)(t),n.projectName,i,a,c),l=u.resolvedModule,_=u.failedLookupLocations;if(l)return{resolvedModule:l,failedLookupLocations:e.addRange(s.failedLookupLocations,_)}}return s}function P(t,r,i,a,s,c,l,_,d,p){var f=n.toPath(r),m=a.get(f)||a.set(f,e.createMap()).get(f),g=e.getDirectoryPath(f),y=s.getOrCreateMapOfCacheRedirects(i),h=y.get(g);h||(h=e.createMap(),y.set(g,h));for(var v=[],b=n.getCompilationSettings(),x=p&&N(f),D=n.getCurrentProgram(),S=D&&D.getResolvedProjectReferenceToRedirect(r),T=S?!i||i.sourceFile.path!==S.sourceFile.path:!!i,E=e.createMap(),C=0,k=t;C1),b.set(s,l-1))),u===S?r=!0:U(u)}}r&&U(S)}}function U(e){x.get(e).refCount--}function V(e,t,r){return n.watchDirectoryOfFailedLookupLocation(e,(function(e){var r=n.toPath(e);d&&d.addOrDeleteFileOrDirectory(e,r),!u&&Y(r,t===r)&&n.onInvalidatedResolution()}),r?0:1)}function q(e,t){var r=e.get(t);r&&(r.forEach(z),e.delete(t))}function W(e){q(p,e),q(y,e)}function G(t,r,i){var a=e.createMap();t.forEach((function(t,o){var c=e.getDirectoryPath(o),u=a.get(c);u||(u=e.createMap(),a.set(c,u)),t.forEach((function(t,a){u.has(a)||(u.set(a,!0),!t.isInvalidated&&r(t,i)&&(t.isInvalidated=!0,(s||(s=e.createMap())).set(o,!0),o.endsWith(e.inferredTypesContainingFile)&&n.onChangedAutomaticTypeDirectiveNames()))}))}))}function H(t){var r;(r=n.maxNumberOfFilesToIterateForInvalidation||e.maxNumberOfFilesToIterateForInvalidation,p.size>r||y.size>r)?u=!0:(G(p,t,E),G(y,t,C))}function Y(r,i){var a;if(i)a=function(e){return k(r,n.toPath(e))};else{if(t(r))return!1;if(n.fileIsOpen(r))return!1;var o=e.getDirectoryPath(r);if(I(r)||w(r)||I(o)||w(o))a=function(t){return n.toPath(t)===r||e.startsWith(n.toPath(t),r)};else{if(!L(r)&&!b.has(r))return!1;if(e.isEmittedFileOfProgram(n.getCurrentProgram(),r))return!1;a=function(e){return n.toPath(e)===r}}}var c=s&&s.size;return H((function(t){return e.some(t.failedLookupLocations,a)})),u||s&&s.size!==c}function X(){e.clearMap(T,e.closeFileWatcher)}function Q(e,t){return n.watchTypeRootsDirectory(t,(function(r){var i=n.toPath(r);d&&d.addOrDeleteFileOrDirectory(r,i),n.onChangedAutomaticTypeDirectiveNames();var a=function(e,t){if(!u){if(k(S,t))return S;var r=M(e,t);return r&&x.has(r.dirPath)?r.dirPath:void 0}}(t,e);a&&Y(i,a===i)&&n.onInvalidatedResolution()}),1)}function $(t){var i=e.getDirectoryPath(e.getDirectoryPath(t)),a=n.toPath(i);return a===S||r(a)}}}(s||(s={})),function(e){!function(r){var n,i;function a(t,r,n){var i=t.importModuleSpecifierPreference,a=t.importModuleSpecifierEnding;return{relativePreference:"relative"===i?0:"non-relative"===i?1:2,ending:function(){switch(a){case"minimal":return 0;case"index":return 1;case"js":return 2;default:return function(t){var r=t.imports;return e.firstDefined(r,(function(t){var r=t.text;return e.pathIsRelative(r)?e.hasJSOrJsonFileExtension(r):void 0}))||!1}(n)?2:e.getEmitModuleResolutionKind(r)!==e.ModuleResolutionKind.NodeJs?1:0}}()}}function o(t,r,n,i,a,o,u){var l=s(r,i),_=d(a,r,n,l.getCanonicalFileName,i,o);return e.firstDefined(_,(function(e){return f(e,l,i,t)}))||c(n,l,t,u)}function s(t,r){return{getCanonicalFileName:e.createGetCanonicalFileName(!r.useCaseSensitiveFileNames||r.useCaseSensitiveFileNames()),sourceDirectory:e.getDirectoryPath(t)}}function c(t,r,n,i){var a=r.getCanonicalFileName,o=r.sourceDirectory,s=i.ending,c=i.relativePreference,l=n.baseUrl,_=n.paths,d=n.rootDirs,f=d&&function(t,r,n,i,a,o){var s=m(r,t,i);if(void 0===s)return;var c=m(n,t,i),u=void 0!==c?e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(c,s,i)):s;return e.getEmitModuleResolutionKind(o)===e.ModuleResolutionKind.NodeJs?g(u,a,o):e.removeFileExtension(u)}(d,t,o,a,s,n)||g(e.ensurePathIsNonModuleName(e.getRelativePathFromDirectory(o,t,a)),s,n);if(!l||0===c)return f;var v=y(t,l,a);if(!v)return f;var b=g(v,s,n),x=_&&p(e.removeFileExtension(v),b,_),D=void 0===x?b:x;return 1===c?D:(2!==c&&e.Debug.assertNever(c),h(D)||u(f)1&&r.sort(_),y.push.apply(y,r))},v=e.getDirectoryPath(e.toPath(n,l,a));0!==g.size;v=e.getDirectoryPath(v))h(v);return y}function p(t,r,n){for(var i in n)for(var a=0,o=n[i];a=l.length+_.length&&e.startsWith(r,l)&&e.endsWith(r,_)||!_&&r===e.removeTrailingDirectorySeparator(l)){var d=r.substr(l.length,r.length-_.length);return i.replace("*",d)}}else if(c===r||c===t)return i}}function f(t,r,n,i,a){var o=r.getCanonicalFileName,s=r.sourceDirectory;if(n.fileExists&&n.readFile){var c=function(t){var r,n,i=0,a=0,o=0;!function(e){e[e.BeforeNodeModules=0]="BeforeNodeModules",e[e.NodeModules=1]="NodeModules",e[e.Scope=2]="Scope",e[e.PackageContent=3]="PackageContent"}(n||(n={}));var s=0,c=0,u=0;for(;c>=0;)switch(s=c,c=t.indexOf("/",s+1),u){case 0:t.indexOf(e.nodeModulesPathPart,s)===s&&(i=s,a=c,u=1);break;case 1:case 2:1===u&&"@"===t.charAt(s+1)?u=2:(o=c,u=3);break;case 3:u=t.indexOf(e.nodeModulesPathPart,s)===s?1:3}return r=s,u>1?{topLevelNodeModulesIndex:i,topLevelPackageNameIndex:a,packageRootIndex:o,fileNameIndex:r}:void 0}(t);if(c){var u,l=t.substring(0,c.packageRootIndex);if(!a){var _=e.combinePaths(l,"package.json"),d=(u=n.fileExists(_)?JSON.parse(n.readFile(_)):void 0)&&u.typesVersions?e.getPackageJsonTypesVersionsPaths(u.typesVersions):void 0;if(d){var f=t.slice(c.packageRootIndex+1),m=p(e.removeFileExtension(f),g(f,0,i),d.paths);void 0!==m&&(t=e.combinePaths(t.slice(0,c.packageRootIndex),m))}}var y=a?t:function(t){if(u){var r=u.typings||u.types||u.main;if(r){var i=e.toPath(r,l,o);if(e.removeFileExtension(i)===e.removeFileExtension(o(t)))return l}}var a=e.removeFileExtension(t);if("/index"===o(a.substring(c.fileNameIndex))&&!function(t,r){if(!t.fileExists)return;for(var n=e.getSupportedExtensions({allowJs:!0},[{extension:"node",isMixedContent:!1},{extension:"json",isMixedContent:!1,scriptKind:6}]),i=0,a=n;i0?e.ExitStatus.DiagnosticsPresent_OutputsSkipped:d.length>0?e.ExitStatus.DiagnosticsPresent_OutputsGenerated:e.ExitStatus.Success}function p(t,r){return void 0===t&&(t=e.sys),{onWatchStatusChange:r||o(t),watchFile:e.maybeBind(t,t.watchFile)||function(){return e.noopFileWatcher},watchDirectory:e.maybeBind(t,t.watchDirectory)||function(){return e.noopFileWatcher},setTimeout:e.maybeBind(t,t.setTimeout)||e.noop,clearTimeout:e.maybeBind(t,t.clearTimeout)||e.noop}}function f(t,r){var n=e.memoize((function(){return e.getDirectoryPath(e.normalizePath(t.getExecutingFilePath()))}));return{useCaseSensitiveFileNames:function(){return t.useCaseSensitiveFileNames},getNewLine:function(){return t.newLine},getCurrentDirectory:e.memoize((function(){return t.getCurrentDirectory()})),getDefaultLibLocation:n,getDefaultLibFileName:function(t){return e.combinePaths(n(),e.getDefaultLibFileName(t))},fileExists:function(e){return t.fileExists(e)},readFile:function(e,r){return t.readFile(e,r)},directoryExists:function(e){return t.directoryExists(e)},getDirectories:function(e){return t.getDirectories(e)},readDirectory:function(e,r,n,i,a){return t.readDirectory(e,r,n,i,a)},realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable),trace:function(e){return t.write(e+t.newLine)},createDirectory:function(e){return t.createDirectory(e)},writeFile:function(e,r,n){return t.writeFile(e,r,n)},onCachedDirectoryStructureHostCreate:function(e){return e||t},createHash:e.maybeBind(t,t.createHash),createProgram:r||e.createEmitAndSemanticDiagnosticsBuilderProgram}}function m(t,r,n,i){void 0===t&&(t=e.sys);var a=function(e){return t.write(e+t.newLine)},o=f(t,r);return e.copyProperties(o,p(t,i)),o.afterProgramCreate=function(r){var i=r.getCompilerOptions(),s=e.getNewLineCharacter(i,(function(){return t.newLine}));_(r,n,a,(function(t){return o.onWatchStatusChange(e.createCompilerDiagnostic(c(t),t),s,i,t)}))},o}function g(t,r,n){r(n),t.exit(e.ExitStatus.DiagnosticsPresent_OutputsSkipped)}e.createDiagnosticReporter=n,e.screenStartingMessageCodes=[e.Diagnostics.Starting_compilation_in_watch_mode.code,e.Diagnostics.File_change_detected_Starting_incremental_compilation.code],e.getLocaleTimeString=a,e.createWatchStatusReporter=o,e.parseConfigFileWithSystem=function(t,r,n,i){var a=n;a.onUnRecoverableConfigFileDiagnostic=function(e){return g(n,i,e)};var o=e.getParsedCommandLineOfConfigFile(t,r,a);return a.onUnRecoverableConfigFileDiagnostic=void 0,o},e.getErrorCountForSummary=s,e.getWatchErrorSummaryDiagnosticMessage=c,e.getErrorSummaryText=u,e.listFiles=l,e.emitFilesAndReportErrors=_,e.emitFilesAndReportErrorsAndGetExitStatus=d,e.noopFileWatcher={close:e.noop},e.createWatchHost=p,function(e){e.ConfigFile="Config file",e.SourceFile="Source file",e.MissingFile="Missing file",e.WildcardDirectory="Wild card directory",e.FailedLookupLocations="Failed Lookup Locations",e.TypeRoots="Type roots"}(e.WatchType||(e.WatchType={})),e.createWatchFactory=function(t,r){var n=t.trace?r.extendedDiagnostics?e.WatchLogLevel.Verbose:r.diagnostics?e.WatchLogLevel.TriggerOnly:e.WatchLogLevel.None:e.WatchLogLevel.None,i=n!==e.WatchLogLevel.None?function(e){return t.trace(e)}:e.noop,a=e.getWatchFactory(n,i);return a.writeLog=i,a},e.createCompilerHostFromProgramHost=function(t,r,n){void 0===n&&(n=t);var i=t.useCaseSensitiveFileNames(),a=e.memoize((function(){return t.getNewLine()}));return{getSourceFile:function(n,i,a){var o;try{e.performance.mark("beforeIORead"),o=t.readFile(n,r().charset),e.performance.mark("afterIORead"),e.performance.measure("I/O Read","beforeIORead","afterIORead")}catch(e){a&&a(e.message),o=""}return void 0!==o?e.createSourceFile(n,o,i):void 0},getDefaultLibLocation:e.maybeBind(t,t.getDefaultLibLocation),getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:function(r,n,i,a){try{e.performance.mark("beforeIOWrite"),function r(n){if(n.length>e.getRootLength(n)&&!t.directoryExists(n)){var i=e.getDirectoryPath(n);r(i),t.createDirectory&&t.createDirectory(n)}}(e.getDirectoryPath(e.normalizePath(r))),t.writeFile(r,n,i),e.performance.mark("afterIOWrite"),e.performance.measure("I/O Write","beforeIOWrite","afterIOWrite")}catch(e){a&&a(e.message)}},getCurrentDirectory:e.memoize((function(){return t.getCurrentDirectory()})),useCaseSensitiveFileNames:function(){return i},getCanonicalFileName:e.createGetCanonicalFileName(i),getNewLine:function(){return e.getNewLineCharacter(r(),a)},fileExists:function(e){return t.fileExists(e)},readFile:function(e){return t.readFile(e)},trace:e.maybeBind(t,t.trace),directoryExists:e.maybeBind(n,n.directoryExists),getDirectories:e.maybeBind(n,n.getDirectories),realpath:e.maybeBind(t,t.realpath),getEnvironmentVariable:e.maybeBind(t,t.getEnvironmentVariable)||function(){return""},createHash:e.maybeBind(t,t.createHash),readDirectory:e.maybeBind(t,t.readDirectory)}},e.setGetSourceFileAsHashVersioned=function(r,n){var i=r.getSourceFile,a=n.createHash||e.generateDjb2Hash;r.getSourceFile=function(){for(var e=[],o=0;oe?t:e}function u(t){return e.fileExtensionIs(t,".d.ts")}function l(e){return!!e&&!!e.buildOrder}function _(e){return l(e)?e.buildOrder:e}function d(t,r){return function(n){var i=r?"["+e.formatColorAndReset(e.getLocaleTimeString(t),e.ForegroundColorEscapeSequences.Grey)+"] ":e.getLocaleTimeString(t)+" - ";i+=""+e.flattenDiagnosticMessageText(n.messageText,t.newLine)+(t.newLine+t.newLine),t.write(i)}}function p(t,r,n,i){var a=e.createProgramHost(t,r);return a.getModifiedTime=t.getModifiedTime?function(e){return t.getModifiedTime(e)}:e.returnUndefined,a.setModifiedTime=t.setModifiedTime?function(e,r){return t.setModifiedTime(e,r)}:e.noop,a.deleteFile=t.deleteFile?function(e){return t.deleteFile(e)}:e.noop,a.reportDiagnostic=n||e.createDiagnosticReporter(t),a.reportSolutionBuilderStatus=i||d(t),a}function f(t,r,n,i){var a,s,c=r,u=r,l=c.getCurrentDirectory(),_=e.createGetCanonicalFileName(c.useCaseSensitiveFileNames()),d=(a=i,s={},e.commonOptionsWithBuild.forEach((function(t){e.hasProperty(a,t.name)&&(s[t.name]=a[t.name])})),s),p=e.createCompilerHostFromProgramHost(c,(function(){return S.projectCompilerOptions}));e.setGetSourceFileAsHashVersioned(p,c),p.getParsedCommandLine=function(e){return h(S,e,g(S,e))},p.resolveModuleNames=e.maybeBind(c,c.resolveModuleNames),p.resolveTypeReferenceDirectives=e.maybeBind(c,c.resolveTypeReferenceDirectives);var f=p.resolveModuleNames?void 0:e.createModuleResolutionCache(l,_);if(!p.resolveModuleNames){var m=function(t,r,n){return e.resolveModuleName(t,r,S.projectCompilerOptions,p,f,n).resolvedModule};p.resolveModuleNames=function(t,r,n,i){return e.loadWithLocalCache(e.Debug.assertEachDefined(t),r,i,m)}}var y=e.createWatchFactory(u,i),v=y.watchFile,b=y.watchFilePath,x=y.watchDirectory,D=y.writeLog,S={host:c,hostWithWatch:u,currentDirectory:l,getCanonicalFileName:_,parseConfigFileHost:e.parseConfigHostFromCompilerHostLike(c),writeFileName:c.trace?function(e){return c.trace(e)}:void 0,options:i,baseCompilerOptions:d,rootNames:n,resolvedConfigFilePaths:e.createMap(),configFileCache:o(),projectStatus:o(),buildInfoChecked:o(),extendedConfigCache:e.createMap(),builderPrograms:o(),diagnostics:o(),projectPendingBuild:o(),projectErrorsReported:o(),compilerHost:p,moduleResolutionCache:f,buildOrder:void 0,readFileWithCache:function(e){return c.readFile(e)},projectCompilerOptions:d,cache:void 0,allProjectBuildPending:!0,needsSummary:!0,watchAllProjectsPending:t,currentInvalidatedProject:void 0,watch:t,allWatchedWildcardDirectories:o(),allWatchedInputFiles:o(),allWatchedConfigFiles:o(),timerToBuildInvalidatedProject:void 0,reportFileChangeDetected:!1,watchFile:v,watchFilePath:b,watchDirectory:x,writeLog:D};return S}function m(t,r){return e.toPath(r,t.currentDirectory,t.getCanonicalFileName)}function g(e,t){var r=e.resolvedConfigFilePaths,n=r.get(t);if(void 0!==n)return n;var i=m(e,t);return r.set(t,i),i}function y(e){return!!e.options}function h(t,r,n){var i,a=t.configFileCache,o=a.get(n);if(o)return y(o)?o:void 0;var s,c=t.parseConfigFileHost,u=t.baseCompilerOptions,l=t.extendedConfigCache,_=t.host;return _.getParsedCommandLine?(s=_.getParsedCommandLine(r))||(i=e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,r)):(c.onUnRecoverableConfigFileDiagnostic=function(e){return i=e},s=e.getParsedCommandLineOfConfigFile(r,u,c,l),c.onUnRecoverableConfigFileDiagnostic=e.noop),a.set(n,s||i),s}function v(t,r){return e.resolveConfigFileProjectName(e.resolvePath(t.currentDirectory,r))}function b(t,r){for(var n,i,a=e.createMap(),o=e.createMap(),s=[],c=0,u=r;c0);var o={sourceFile:n.options.configFile,commandLine:n};i.directoryToModuleNameMap.setOwnMap(i.directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(o)),i.moduleNameToDirectoryMap.setOwnMap(i.moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(o))}i.directoryToModuleNameMap.setOwnOptions(n.options),i.moduleNameToDirectoryMap.setOwnOptions(n.options)}(s,l,p),b=t.createProgram(p.fileNames,p.options,n,function(t,r,n){var i=t.options,a=t.builderPrograms,o=t.compilerHost;if(i.force)return;var s=a.get(r);return s||e.readBuilderProgram(n.options,o)}(s,_,p),p.errors,p.projectReferences),S++}function A(e,t,r){e.length?(x=M(s,_,b,e,t,r),S=y.QueueReferencingProjects):S++}function P(n){e.Debug.assertDefined(b),A(t(b.getConfigFileParsingDiagnostics(),b.getOptionsDiagnostics(n),b.getGlobalDiagnostics(n),b.getSyntacticDiagnostics(void 0,n)),r.SyntaxErrors,"Syntactic")}function w(t){A(e.Debug.assertDefined(b).getSemanticDiagnostics(void 0,t),r.TypeErrors,"Semantic")}function L(t,n,a){var o;e.Debug.assertDefined(b),e.Debug.assert(S===y.Emit),b.backupState();var l=[],d=e.emitFilesAndReportErrors(b,(function(e){return(o||(o=[])).push(e)}),void 0,void 0,(function(e,t,r){return l.push({name:e,text:t,writeByteOrderMark:r})}),n,!1,a).emitResult;if(o)return b.restoreState(),x=M(s,_,b,o,r.DeclarationEmitErrors,"Declaration file"),S=y.QueueReferencingProjects,{emitSkipped:!0,diagnostics:d.diagnostics};var f=s.host,g=s.compilerHost,h=r.DeclarationOutputUnchanged,v=i,D=!1,T=e.createDiagnosticCollection(),E=e.createMap();return l.forEach((function(n){var i,a=n.name,o=n.text,l=n.writeByteOrderMark;!D&&u(a)&&(f.fileExists(a)&&s.readFileWithCache(a)===o?i=f.getModifiedTime(a):(h&=~r.DeclarationOutputUnchanged,D=!0)),E.set(m(s,a),a),e.writeFile(t?{writeFile:t}:g,T,a,o,l),void 0!==i&&(v=c(i,v))})),R(T,E,v,D,l.length?l[0].name:e.getFirstProjectOutput(p,!f.useCaseSensitiveFileNames()),h),d}function R(t,n,i,o,c,u){var l=t.getDiagnostics();if(l.length)return x=M(s,_,b,l,r.EmitErrors,"Emit"),S=y.QueueReferencingProjects,l;s.writeFileName&&(n.forEach((function(e){return I(s,p,e)})),b&&e.listFiles(b,s.writeFileName));var d=B(s,p,i,e.Diagnostics.Updating_unchanged_output_timestamps_of_project_0,n);return s.diagnostics.delete(_),s.projectStatus.set(_,{type:e.UpToDateStatusType.UpToDate,newestDeclarationFileContentChangedTime:o?a:d,oldestOutputFileName:c}),b&&O(s,_,b),s.projectCompilerOptions=s.baseCompilerOptions,S=y.QueueReferencingProjects,x=u,l}function j(t,a){if(e.Debug.assert(o===n.UpdateBundle),s.options.dry)return Z(s,e.Diagnostics.A_non_dry_build_would_update_output_of_project_0,l),x=r.Success,void(S=y.QueueReferencingProjects);s.options.verbose&&Z(s,e.Diagnostics.Updating_output_of_project_0,l);var c=s.compilerHost;s.projectCompilerOptions=p.options;var u=e.emitUsingBuildInfo(p,c,(function(e){var t=v(s,e.path);return h(s,t,g(s,t))}),a);if(e.isString(u))return Z(s,e.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1,l,$(s,u)),S=y.BuildInvalidatedProjectOfBundle,D=F(n.Build,s,l,_,d,p,f);e.Debug.assert(!!u.length);var b=e.createDiagnosticCollection(),T=e.createMap();return u.forEach((function(r){var n=r.name,i=r.text,a=r.writeByteOrderMark;T.set(m(s,n),n),e.writeFile(t?{writeFile:t}:c,b,n,i,a)})),{emitSkipped:!1,diagnostics:R(b,T,i,!1,u[0].name,r.DeclarationOutputUnchanged)}}function J(t,r,n,i){for(;S<=t&&Sa)}}}function P(t,r,n){var i=t.options;return!(r.type===e.UpToDateStatusType.OutOfDateWithPrepend&&!i.force)||(0===n.fileNames.length||!!n.errors.length||!e.isIncrementalCompilation(n.options))}function w(t,r,i){if(t.projectPendingBuild.size&&!l(r)){if(t.currentInvalidatedProject)return e.arrayIsEqualTo(t.currentInvalidatedProject.buildOrder,r)?t.currentInvalidatedProject:void 0;for(var a=t.options,o=t.projectPendingBuild,s=0;ss&&(o=p,s=f)}if(!r.fileNames.length&&!e.canJsonReportNoInutFiles(r.raw))return{type:e.UpToDateStatusType.ContainerOnly};for(var m,y=e.getAllProjectOutputs(r,!l.useCaseSensitiveFileNames()),v="(none)",b=a,x="(none)",D=i,S=i,T=!1,E=0,C=y;ED&&(D=N,x=k),u(k))S=c(S,l.getModifiedTime(k)||e.missingFileModifiedTime)}var A,F=!1,P=!1;if(r.projectReferences){t.projectStatus.set(n,{type:e.UpToDateStatusType.ComputingUpstream});for(var w=0,I=r.projectReferences;w=0},t.findArgument=function(t){var r=e.sys.args.indexOf(t);return r>=0&&ri)return 2;if(46===t.charCodeAt(0))return 3;if(95===t.charCodeAt(0))return 4;if(r){var n=/^@([^/]+)\/([^/]+)$/.exec(t);if(n){var a=e(n[1],!1);if(0!==a)return{name:n[1],isScopeName:!0,result:a};var o=e(n[2],!1);return 0!==o?{name:n[2],isScopeName:!1,result:o}:0}}if(encodeURIComponent(t)!==t)return 5;return 0}(e,!0)},t.renderPackageNameValidationFailure=function(e,t){return"object"===f(e)?a(t,e.result,e.name,e.isScopeName):a(t,e,t,!1)}}(e.JsTyping||(e.JsTyping={}))}(s||(s={})),function(e){var t,r;function n(e){return{indentSize:4,tabSize:4,newLineCharacter:e||"\n",convertTabsToSpaces:!0,indentStyle:t.Smart,insertSpaceAfterConstructor:!1,insertSpaceAfterCommaDelimiter:!0,insertSpaceAfterSemicolonInForStatements:!0,insertSpaceBeforeAndAfterBinaryOperators:!0,insertSpaceAfterKeywordsInControlFlowStatements:!0,insertSpaceAfterFunctionKeywordForAnonymousFunctions:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces:!0,insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces:!1,insertSpaceBeforeFunctionParenthesis:!1,placeOpenBraceOnNewLineForFunctions:!1,placeOpenBraceOnNewLineForControlBlocks:!1,semicolons:r.Ignore}}!function(e){var t=function(){function e(e){this.text=e}return e.prototype.getText=function(e,t){return 0===e&&t===this.text.length?this.text:this.text.substring(e,t)},e.prototype.getLength=function(){return this.text.length},e.prototype.getChangeRange=function(){},e}();e.fromString=function(e){return new t(e)}}(e.ScriptSnapshot||(e.ScriptSnapshot={})),function(e){e[e.Dependencies=1]="Dependencies",e[e.DevDependencies=2]="DevDependencies",e[e.PeerDependencies=4]="PeerDependencies",e[e.OptionalDependencies=8]="OptionalDependencies",e[e.All=15]="All"}(e.PackageJsonDependencyGroup||(e.PackageJsonDependencyGroup={})),e.emptyOptions={},function(e){e.none="none",e.definition="definition",e.reference="reference",e.writtenReference="writtenReference"}(e.HighlightSpanKind||(e.HighlightSpanKind={})),function(e){e[e.None=0]="None",e[e.Block=1]="Block",e[e.Smart=2]="Smart"}(t=e.IndentStyle||(e.IndentStyle={})),function(e){e.Ignore="ignore",e.Insert="insert",e.Remove="remove"}(r=e.SemicolonPreference||(e.SemicolonPreference={})),e.getDefaultFormatCodeSettings=n,e.testFormatSettings=n("\n"),function(e){e[e.aliasName=0]="aliasName",e[e.className=1]="className",e[e.enumName=2]="enumName",e[e.fieldName=3]="fieldName",e[e.interfaceName=4]="interfaceName",e[e.keyword=5]="keyword",e[e.lineBreak=6]="lineBreak",e[e.numericLiteral=7]="numericLiteral",e[e.stringLiteral=8]="stringLiteral",e[e.localName=9]="localName",e[e.methodName=10]="methodName",e[e.moduleName=11]="moduleName",e[e.operator=12]="operator",e[e.parameterName=13]="parameterName",e[e.propertyName=14]="propertyName",e[e.punctuation=15]="punctuation",e[e.space=16]="space",e[e.text=17]="text",e[e.typeParameterName=18]="typeParameterName",e[e.enumMemberName=19]="enumMemberName",e[e.functionName=20]="functionName",e[e.regularExpressionLiteral=21]="regularExpressionLiteral"}(e.SymbolDisplayPartKind||(e.SymbolDisplayPartKind={})),function(e){e.Comment="comment",e.Region="region",e.Code="code",e.Imports="imports"}(e.OutliningSpanKind||(e.OutliningSpanKind={})),function(e){e[e.JavaScript=0]="JavaScript",e[e.SourceMap=1]="SourceMap",e[e.Declaration=2]="Declaration"}(e.OutputFileType||(e.OutputFileType={})),function(e){e[e.None=0]="None",e[e.InMultiLineCommentTrivia=1]="InMultiLineCommentTrivia",e[e.InSingleQuoteStringLiteral=2]="InSingleQuoteStringLiteral",e[e.InDoubleQuoteStringLiteral=3]="InDoubleQuoteStringLiteral",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]="InTemplateHeadOrNoSubstitutionTemplate",e[e.InTemplateMiddleOrTail=5]="InTemplateMiddleOrTail",e[e.InTemplateSubstitutionPosition=6]="InTemplateSubstitutionPosition"}(e.EndOfLineState||(e.EndOfLineState={})),function(e){e[e.Punctuation=0]="Punctuation",e[e.Keyword=1]="Keyword",e[e.Operator=2]="Operator",e[e.Comment=3]="Comment",e[e.Whitespace=4]="Whitespace",e[e.Identifier=5]="Identifier",e[e.NumberLiteral=6]="NumberLiteral",e[e.BigIntLiteral=7]="BigIntLiteral",e[e.StringLiteral=8]="StringLiteral",e[e.RegExpLiteral=9]="RegExpLiteral"}(e.TokenClass||(e.TokenClass={})),function(e){e.unknown="",e.warning="warning",e.keyword="keyword",e.scriptElement="script",e.moduleElement="module",e.classElement="class",e.localClassElement="local class",e.interfaceElement="interface",e.typeElement="type",e.enumElement="enum",e.enumMemberElement="enum member",e.variableElement="var",e.localVariableElement="local var",e.functionElement="function",e.localFunctionElement="local function",e.memberFunctionElement="method",e.memberGetAccessorElement="getter",e.memberSetAccessorElement="setter",e.memberVariableElement="property",e.constructorImplementationElement="constructor",e.callSignatureElement="call",e.indexSignatureElement="index",e.constructSignatureElement="construct",e.parameterElement="parameter",e.typeParameterElement="type parameter",e.primitiveType="primitive type",e.label="label",e.alias="alias",e.constElement="const",e.letElement="let",e.directory="directory",e.externalModuleName="external module name",e.jsxAttribute="JSX attribute",e.string="string"}(e.ScriptElementKind||(e.ScriptElementKind={})),function(e){e.none="",e.publicMemberModifier="public",e.privateMemberModifier="private",e.protectedMemberModifier="protected",e.exportedModifier="export",e.ambientModifier="declare",e.staticModifier="static",e.abstractModifier="abstract",e.optionalModifier="optional",e.dtsModifier=".d.ts",e.tsModifier=".ts",e.tsxModifier=".tsx",e.jsModifier=".js",e.jsxModifier=".jsx",e.jsonModifier=".json"}(e.ScriptElementKindModifier||(e.ScriptElementKindModifier={})),function(e){e.comment="comment",e.identifier="identifier",e.keyword="keyword",e.numericLiteral="number",e.bigintLiteral="bigint",e.operator="operator",e.stringLiteral="string",e.whiteSpace="whitespace",e.text="text",e.punctuation="punctuation",e.className="class name",e.enumName="enum name",e.interfaceName="interface name",e.moduleName="module name",e.typeParameterName="type parameter name",e.typeAliasName="type alias name",e.parameterName="parameter name",e.docCommentTagName="doc comment tag name",e.jsxOpenTagName="jsx open tag name",e.jsxCloseTagName="jsx close tag name",e.jsxSelfClosingTagName="jsx self closing tag name",e.jsxAttribute="jsx attribute",e.jsxText="jsx text",e.jsxAttributeStringLiteralValue="jsx attribute string literal value"}(e.ClassificationTypeNames||(e.ClassificationTypeNames={})),function(e){e[e.comment=1]="comment",e[e.identifier=2]="identifier",e[e.keyword=3]="keyword",e[e.numericLiteral=4]="numericLiteral",e[e.operator=5]="operator",e[e.stringLiteral=6]="stringLiteral",e[e.regularExpressionLiteral=7]="regularExpressionLiteral",e[e.whiteSpace=8]="whiteSpace",e[e.text=9]="text",e[e.punctuation=10]="punctuation",e[e.className=11]="className",e[e.enumName=12]="enumName",e[e.interfaceName=13]="interfaceName",e[e.moduleName=14]="moduleName",e[e.typeParameterName=15]="typeParameterName",e[e.typeAliasName=16]="typeAliasName",e[e.parameterName=17]="parameterName",e[e.docCommentTagName=18]="docCommentTagName",e[e.jsxOpenTagName=19]="jsxOpenTagName",e[e.jsxCloseTagName=20]="jsxCloseTagName",e[e.jsxSelfClosingTagName=21]="jsxSelfClosingTagName",e[e.jsxAttribute=22]="jsxAttribute",e[e.jsxText=23]="jsxText",e[e.jsxAttributeStringLiteralValue=24]="jsxAttributeStringLiteralValue",e[e.bigintLiteral=25]="bigintLiteral"}(e.ClassificationType||(e.ClassificationType={}))}(s||(s={})),function(e){function t(t){switch(t.kind){case 241:return e.isInJSFile(t)&&e.getJSDocEnumTag(t)?7:1;case 155:case 190:case 158:case 157:case 279:case 280:case 160:case 159:case 161:case 162:case 163:case 243:case 200:case 201:case 278:case 271:return 1;case 154:case 245:case 246:case 172:return 2;case 315:return void 0===t.name?3:2;case 282:case 244:return 3;case 248:return e.isAmbientModule(t)?5:1===e.getModuleInstanceState(t)?5:4;case 247:case 256:case 257:case 252:case 253:case 258:case 259:return 7;case 288:return 5}return 7}function r(t){for(;152===t.parent.kind;)t=t.parent;return e.isInternalModuleImportEqualsDeclaration(t.parent)&&t.parent.moduleReference===t}function n(e,t){var r=i(e);return!!r&&!!r.parent&&t(r.parent)&&r.parent.expression===r}function i(e){return s(e)?e.parent:e}function a(t){return 75===t.kind&&e.isBreakOrContinueStatement(t.parent)&&t.parent.label===t}function o(t){return 75===t.kind&&e.isLabeledStatement(t.parent)&&t.parent.label===t}function s(e){return e&&e.parent&&193===e.parent.kind&&e.parent.name===e}e.scanner=e.createScanner(99,!0),function(e){e[e.None=0]="None",e[e.Value=1]="Value",e[e.Type=2]="Type",e[e.Namespace=4]="Namespace",e[e.All=7]="All"}(e.SemanticMeaning||(e.SemanticMeaning={})),e.getMeaningFromDeclaration=t,e.getMeaningFromLocation=function(n){return 288===n.kind?1:258===n.parent.kind||263===n.parent.kind?7:r(n)?function(t){var r=152===t.kind?t:e.isQualifiedName(t.parent)&&t.parent.right===t?t.parent:void 0;return r&&252===r.parent.kind?7:4}(n):e.isDeclarationName(n)?t(n.parent):function(t){e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent);switch(t.kind){case 103:return!e.isExpressionNode(t);case 182:return!0}switch(t.parent.kind){case 168:return!0;case 187:return!t.parent.isTypeOf;case 215:return!e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)}return!1}(n)?2:function(e){return function(e){var t=e,r=!0;if(152===t.parent.kind){for(;t.parent&&152===t.parent.kind;)t=t.parent;r=t.right===e}return 168===t.parent.kind&&!r}(e)||function(e){var t=e,r=!0;if(193===t.parent.kind){for(;t.parent&&193===t.parent.kind;)t=t.parent;r=t.name===e}if(!r&&215===t.parent.kind&&277===t.parent.parent.kind){var n=t.parent.parent.parent;return 244===n.kind&&112===t.parent.parent.token||245===n.kind&&89===t.parent.parent.token}return!1}(e)}(n)?4:e.isTypeParameterDeclaration(n.parent)?(e.Debug.assert(e.isJSDocTemplateTag(n.parent.parent)),2):e.isLiteralTypeNode(n.parent)?3:1},e.isInRightSideOfInternalImportEqualsDeclaration=r,e.isCallExpressionTarget=function(t){return n(t,e.isCallExpression)},e.isNewExpressionTarget=function(t){return n(t,e.isNewExpression)},e.isCallOrNewExpressionTarget=function(t){return n(t,e.isCallOrNewExpression)},e.climbPastPropertyAccess=i,e.getTargetLabel=function(e,t){for(;e;){if(237===e.kind&&e.label.escapedText===t)return e.label;e=e.parent}},e.hasPropertyAccessExpressionWithName=function(t,r){return!!e.isPropertyAccessExpression(t.expression)&&t.expression.name.text===r},e.isJumpStatementTarget=a,e.isLabelOfLabeledStatement=o,e.isLabelName=function(e){return o(e)||a(e)},e.isTagName=function(t){return e.isJSDocTag(t.parent)&&t.parent.tagName===t},e.isRightSideOfQualifiedName=function(e){return 152===e.parent.kind&&e.parent.right===e},e.isRightSideOfPropertyAccess=s,e.isNameOfModuleDeclaration=function(e){return 248===e.parent.kind&&e.parent.name===e},e.isNameOfFunctionDeclaration=function(t){return 75===t.kind&&e.isFunctionLike(t.parent)&&t.parent.name===t},e.isLiteralNameOfPropertyDeclarationOrIndexAccess=function(t){switch(t.parent.kind){case 158:case 157:case 279:case 282:case 160:case 159:case 162:case 163:case 248:return e.getNameOfDeclaration(t.parent)===t;case 194:return t.parent.argumentExpression===t;case 153:return!0;case 186:return 184===t.parent.parent.kind;default:return!1}},e.isExpressionOfExternalModuleImportEqualsDeclaration=function(t){return e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t},e.getContainerNode=function(t){for(e.isJSDocTypeAlias(t)&&(t=t.parent.parent);;){if(!(t=t.parent))return;switch(t.kind){case 288:case 160:case 159:case 243:case 200:case 162:case 163:case 244:case 245:case 247:case 248:return t}}},e.getNodeKind=function t(r){switch(r.kind){case 288:return e.isExternalModule(r)?"module":"script";case 248:return"module";case 244:case 213:return"class";case 245:return"interface";case 246:case 308:case 315:return"type";case 247:return"enum";case 241:return s(r);case 190:return s(e.getRootDeclaration(r));case 201:case 243:case 200:return"function";case 162:return"getter";case 163:return"setter";case 160:case 159:return"method";case 279:var n=r.initializer;return e.isFunctionLike(n)?"method":"property";case 158:case 157:case 280:case 281:return"property";case 166:return"index";case 165:return"construct";case 164:return"call";case 161:return"constructor";case 154:return"type parameter";case 282:return"enum member";case 155:return e.hasModifier(r,92)?"property":"parameter";case 252:case 257:case 261:case 255:return"alias";case 208:var i=e.getAssignmentDeclarationKind(r),a=r.right;switch(i){case 7:case 8:case 9:case 0:return"";case 1:case 2:var o=t(a);return""===o?"const":o;case 3:return e.isFunctionExpression(a)?"method":"property";case 4:return"property";case 5:return e.isFunctionExpression(a)?"method":"property";case 6:return"local class";default:return e.assertType(i),""}case 75:return e.isImportClause(r.parent)?"alias":"";default:return""}function s(t){return e.isVarConst(t)?"const":e.isLet(t)?"let":"var"}},e.isThis=function(t){switch(t.kind){case 103:return!0;case 75:return e.identifierIsThisKeyword(t)&&155===t.parent.kind;default:return!1}};var c=/^\/\/\/\s*=r.end}function d(e,t,r,n){return Math.max(e,r)t)break;var u=c.getEnd();if(t=t||!F(u,r)||T(u)){var l=S(s,c,r);return l&&D(l,r)}return a(u)}}e.Debug.assert(void 0!==n||288===o.kind||1===o.kind||e.isJSDocCommentContainingNode(o));var _=S(s,s.length,r);return _&&D(_,r)}(n||r);return e.Debug.assert(!(a&&T(a))),a}function x(t){return e.isToken(t)&&!T(t)}function D(e,t){if(x(e))return e;var r=e.getChildren(t),n=S(r,r.length,t);return n&&D(n,t)}function S(t,r,n){for(var i=r-1;i>=0;i--){if(T(t[i]))e.Debug.assert(i>0,"`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`");else if(F(t[i],n))return t[i]}}function T(t){return e.isJsxText(t)&&t.containsOnlyTriviaWhiteSpaces}function E(e,t,r){for(var n=e.kind,i=0;;){var a=b(e.getFullStart(),r);if(!a)return;if((e=a).kind===t){if(0===i)return e;i--}else e.kind===n&&i++}}function C(e,t,r){return t?e.getNonNullableType():r?e.getNonOptionalType():e}function k(t,r,n){var i=n.getTypeAtLocation(t);return e.isOptionalChain(t.parent)&&(i=C(i,!!t.parent.questionDotToken,!0)),(e.isNewExpression(t.parent)?i.getConstructSignatures():i.getCallSignatures()).filter((function(e){return!!e.typeParameters&&e.typeParameters.length>=r}))}function N(t,r){for(var n=t,i=0,a=0;n;){switch(n.kind){case 29:if((n=b(n.getFullStart(),r))&&28===n.kind&&(n=b(n.getFullStart(),r)),!n||!e.isIdentifier(n))return;if(!i)return e.isDeclarationName(n)?void 0:{called:n,nTypeArguments:a};i--;break;case 49:i=3;break;case 48:i=2;break;case 31:i++;break;case 19:if(!(n=E(n,18,r)))return;break;case 21:if(!(n=E(n,20,r)))return;break;case 23:if(!(n=E(n,22,r)))return;break;case 27:a++;break;case 38:case 75:case 10:case 8:case 9:case 105:case 90:case 107:case 89:case 133:case 24:case 51:case 57:case 58:break;default:if(e.isTypeNode(n))break;return}n=b(n.getFullStart(),r)}}function A(t,r,n){return e.formatting.getRangeOfEnclosingComment(t,r,void 0,n)}function F(e,t){return 1===e.kind?!!e.jsDoc:0!==e.getWidth(t)}function P(e,t,r){var n=A(e,t,void 0);return!!n&&r===c.test(e.text.substring(n.pos,n.end))}function w(e,t){return{span:e,newText:t}}function I(e){return!!e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames()}function O(t,r,n,i){return e.createImportDeclaration(void 0,void 0,t||r?e.createImportClause(t,r&&r.length?e.createNamedImports(r):void 0):void 0,"string"==typeof n?M(n,i):n)}function M(t,r){return e.createLiteral(t,0===r)}function L(t,r){return e.isStringDoubleQuoted(t,r)?1:0}function R(t){return"default"!==t.escapedName?t.escapedName:e.firstDefined(t.declarations,(function(t){var r=e.getNameOfDeclaration(t);return r&&75===r.kind?r.escapedText:void 0}))}function B(t,r,n,i){var a=e.createMap();return function t(o){if(!(96&o.flags&&e.addToSeen(a,e.getSymbolId(o))))return;return e.firstDefined(o.declarations,(function(a){return e.firstDefined(e.getAllSuperTypeNodes(a),(function(a){var o=n.getTypeAtLocation(a),s=o&&o.symbol&&n.getPropertyOfType(o,r);return o&&s&&(e.firstDefined(n.getRootSymbols(s),i)||t(o.symbol))}))}))}(t)}function j(t,r,n){return e.textSpanContainsPosition(t,r.getStart(n))&&r.getEnd()<=e.textSpanEnd(t)}function K(e,t){return!!e&&!!t&&e.start===t.start&&e.length===t.length}e.getLineStartPositionForPosition=function(t,r){return e.getLineStarts(r)[r.getLineAndCharacterOfPosition(t).line]},e.rangeContainsRange=u,e.rangeContainsRangeExclusive=function(e,t){return l(e,t.pos)&&l(e,t.end)},e.rangeContainsPosition=function(e,t){return e.pos<=t&&t<=e.end},e.rangeContainsPositionExclusive=l,e.startEndContainsRange=_,e.rangeContainsStartEnd=function(e,t,r){return e.pos<=t&&e.end>=r},e.rangeOverlapsWithStartEnd=function(e,t,r){return d(e.pos,e.end,t,r)},e.nodeOverlapsWithStartEnd=function(e,t,r,n){return d(e.getStart(t),e.end,r,n)},e.startEndOverlapsWithStartEnd=d,e.positionBelongsToNode=function(t,r,n){return e.Debug.assert(t.pos<=r),rn.getStart(t)&&rt.end||e.pos===t.end)&&F(e,n)?r(e):void 0}))}(r)},e.findPrecedingToken=b,e.isInString=function(t,r,n){if(void 0===n&&(n=b(r,t)),n&&e.isStringTextContainingNode(n)){var i=n.getStart(t),a=n.getEnd();if(in.getStart(t)},e.isInJSXText=function(t,r){var n=h(t,r);return!!e.isJsxText(n)||(!(18!==n.kind||!e.isJsxExpression(n.parent)||!e.isJsxElement(n.parent.parent))||!(29!==n.kind||!e.isJsxOpeningLikeElement(n.parent)||!e.isJsxElement(n.parent.parent)))},e.findPrecedingMatchingToken=E,e.removeOptionality=C,e.isPossiblyTypeArgumentPosition=function t(r,n,i){var a=N(r,n);return void 0!==a&&(e.isPartOfTypeNode(a.called)||0!==k(a.called,a.nTypeArguments,i).length||t(a.called,n,i))},e.getPossibleGenericSignatures=k,e.getPossibleTypeArgumentsInfo=N,e.isInComment=A,e.hasDocComment=function(t,r){var n=h(t,r);return!!e.findAncestor(n,e.isJSDoc)},e.getNodeModifiers=function(t){var r=e.isDeclaration(t)?e.getCombinedModifierFlags(t):0,n=[];return 8&r&&n.push("private"),16&r&&n.push("protected"),4&r&&n.push("public"),32&r&&n.push("static"),128&r&&n.push("abstract"),1&r&&n.push("export"),8388608&t.flags&&n.push("declare"),n.length>0?n.join(","):""},e.getTypeArgumentOrTypeParameterList=function(t){return 168===t.kind||195===t.kind?t.typeArguments:e.isFunctionLike(t)||244===t.kind||245===t.kind?t.typeParameters:void 0},e.isComment=function(e){return 2===e||3===e},e.isStringOrRegularExpressionOrTemplateLiteral=function(t){return!(10!==t&&13!==t&&!e.isTemplateLiteralKind(t))},e.isPunctuation=function(e){return 18<=e&&e<=74},e.isInsideTemplateLiteral=function(t,r,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart(n)=2||!!e.noEmit},e.hostUsesCaseSensitiveFileNames=I,e.hostGetCanonicalFileName=function(t){return e.createGetCanonicalFileName(I(t))},e.makeImportIfNecessary=function(e,t,r,n){return e||t&&t.length?O(e,t,r,n):void 0},e.makeImport=O,e.makeStringLiteral=M,function(e){e[e.Single=0]="Single",e[e.Double=1]="Double"}(e.QuotePreference||(e.QuotePreference={})),e.quotePreferenceFromString=L,e.getQuotePreference=function(t,r){if(r.quotePreference&&"auto"!==r.quotePreference)return"single"===r.quotePreference?0:1;var n=t.imports&&e.find(t.imports,e.isStringLiteral);return n?L(n,t):1},e.getQuoteFromPreference=function(t){switch(t){case 0:return"'";case 1:return'"';default:return e.Debug.assertNever(t)}},e.symbolNameNoDefault=function(t){var r=R(t);return void 0===r?void 0:e.unescapeLeadingUnderscores(r)},e.symbolEscapedNameNoDefault=R,e.isObjectBindingElementWithoutPropertyName=function(t){return e.isBindingElement(t)&&e.isObjectBindingPattern(t.parent)&&e.isIdentifier(t.name)&&!t.propertyName},e.getPropertySymbolFromBindingElement=function(e,t){var r=e.getTypeAtLocation(t.parent);return r&&e.getPropertyOfType(r,t.name.text)},e.getPropertySymbolsFromBaseTypes=B,e.isMemberSymbolInBaseType=function(e,t){return B(e.parent,e.name,t,(function(e){return!0}))||!1},e.getParentNodeInSpan=function(t,r,n){if(t)for(;t.parent;){if(e.isSourceFile(t.parent)||!j(n,t.parent,r))return t;t=t.parent}},e.findModifier=function(t,r){return t.modifiers&&e.find(t.modifiers,(function(e){return e.kind===r}))},e.insertImport=function(t,r,n){var i=e.findLast(r.statements,e.isAnyImportSyntax);i?t.insertNodeAfter(r,i,n):t.insertNodeAtTopOfFile(r,n,!0)},e.textSpansEqual=K,e.documentSpansEqual=function(e,t){return e.fileName===t.fileName&&K(e.textSpan,t.textSpan)},e.forEachUnique=function(e,t){if(e)for(var r=0;r0&&155===e.declarations[0].kind}e.isFirstDeclarationOfSymbolParameter=t;var n=function(){var t,r,n,o,s=10*e.defaultMaximumTruncationLength;d();var c=function(t){return _(t,e.SymbolDisplayPartKind.text)};return{displayParts:function(){var r=t.length&&t[t.length-1].text;return o>s&&r&&"..."!==r&&(e.isWhiteSpaceLike(r.charCodeAt(r.length-1))||t.push(a(" ",e.SymbolDisplayPartKind.space)),t.push(a("...",e.SymbolDisplayPartKind.punctuation))),t},writeKeyword:function(t){return _(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return _(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeTrailingSemicolon:function(t){return _(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return _(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return _(t,e.SymbolDisplayPartKind.parameterName)},writeProperty:function(t){return _(t,e.SymbolDisplayPartKind.propertyName)},writeLiteral:function(t){return _(t,e.SymbolDisplayPartKind.stringLiteral)},writeSymbol:function(e,r){if(o>s)return;l(),o+=e.length,t.push(i(e,r))},writeLine:function(){if(o>s)return;o+=1,t.push(u()),r=!0},write:c,writeComment:c,getText:function(){return""},getTextPos:function(){return 0},getColumn:function(){return 0},getLine:function(){return 0},isAtStartOfLine:function(){return!1},hasTrailingWhitespace:function(){return!1},hasTrailingComment:function(){return!1},rawWrite:e.notImplemented,getIndent:function(){return n},increaseIndent:function(){n++},decreaseIndent:function(){n--},clear:d,trackSymbol:e.noop,reportInaccessibleThisError:e.noop,reportInaccessibleUniqueSymbolError:e.noop,reportPrivateInBaseOfClassExpression:e.noop};function l(){if(!(o>s)&&r){var i=e.getIndentString(n);i&&(o+=i.length,t.push(a(i,e.SymbolDisplayPartKind.space))),r=!1}}function _(e,r){o>s||(l(),o+=e.length,t.push(a(e,r)))}function d(){t=[],r=!0,n=0,o=0}}();function i(r,n){return a(r,function(r){var n=r.flags;if(3&n)return t(r)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName;if(4&n)return e.SymbolDisplayPartKind.propertyName;if(32768&n)return e.SymbolDisplayPartKind.propertyName;if(65536&n)return e.SymbolDisplayPartKind.propertyName;if(8&n)return e.SymbolDisplayPartKind.enumMemberName;if(16&n)return e.SymbolDisplayPartKind.functionName;if(32&n)return e.SymbolDisplayPartKind.className;if(64&n)return e.SymbolDisplayPartKind.interfaceName;if(384&n)return e.SymbolDisplayPartKind.enumName;if(1536&n)return e.SymbolDisplayPartKind.moduleName;if(8192&n)return e.SymbolDisplayPartKind.methodName;if(262144&n)return e.SymbolDisplayPartKind.typeParameterName;if(524288&n)return e.SymbolDisplayPartKind.aliasName;if(2097152&n)return e.SymbolDisplayPartKind.aliasName;return e.SymbolDisplayPartKind.text}(n))}function a(t,r){return{text:t,kind:e.SymbolDisplayPartKind[r]}}function o(t){return a(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function s(t){return a(t,e.SymbolDisplayPartKind.text)}e.symbolPart=i,e.displayPart=a,e.spacePart=function(){return a(" ",e.SymbolDisplayPartKind.space)},e.keywordPart=o,e.punctuationPart=function(t){return a(e.tokenToString(t),e.SymbolDisplayPartKind.punctuation)},e.operatorPart=function(t){return a(e.tokenToString(t),e.SymbolDisplayPartKind.operator)},e.textOrKeywordPart=function(t){var r=e.stringToToken(t);return void 0===r?s(t):o(r)},e.textPart=s;var c="\r\n";function u(){return a("\n",e.SymbolDisplayPartKind.lineBreak)}function l(e){try{return e(n),n.displayParts()}finally{n.clear()}}function _(t,r){return e.ensureScriptKind(t,r&&r.getScriptKind&&r.getScriptKind(t))}function d(e){return 0!=(33554432&e.flags)}function p(e){return 0!=(2097152&e.flags)}function f(e,t){void 0===t&&(t=!0);var r=e&&g(e);return r&&!t&&y(r),r}function m(t,r,n,i,a){var o;if(void 0===r&&(r=!0),n&&i&&e.isBindingElement(t)&&e.isIdentifier(t.name)&&e.isObjectBindingPattern(t.parent))(c=(s=i.getSymbolAtLocation(t.name))&&n.get(String(e.getSymbolId(s))))&&c.text!==(t.name||t.propertyName).getText()&&(o=e.createBindingElement(t.dotDotDotToken,t.propertyName||t.name,c,t.initializer));else if(n&&i&&e.isIdentifier(t)){var s,c;(c=(s=i.getSymbolAtLocation(t))&&n.get(String(e.getSymbolId(s))))&&(o=e.createIdentifier(c.text))}return o||(o=g(t,n,i,a)),o&&!r&&y(o),a&&o&&a(t,o),o}function g(t,r,n,i){var a=r||n||i?e.visitEachChild(t,(function(e){return m(e,!0,r,n,i)}),e.nullTransformationContext):e.visitEachChild(t,f,e.nullTransformationContext);if(a===t){var o=e.getSynthesizedClone(t);return e.isStringLiteral(o)?o.textSourceNode=t:e.isNumericLiteral(o)&&(o.numericLiteralFlags=t.numericLiteralFlags),e.setTextRange(o,t)}return a.parent=void 0,a}function y(e){h(e),v(e)}function h(e){b(e,512,x)}function v(t){b(t,1024,e.getLastChild)}function b(t,r,n){e.addEmitFlags(t,r);var i=n(t);i&&b(i,r,n)}function x(e){return e.forEachChild((function(e){return e}))}function D(e,t,r,n,i){return function(a,o,s,c){3===s?(a+=2,o-=2):a+=2,i(e,r||s,t.text.slice(a,o),void 0!==n?n:c)}}function S(t,r){if(e.startsWith(t,r))return 0;var n=t.indexOf(" "+r);return-1===n&&(n=t.indexOf("."+r)),-1===n&&(n=t.indexOf('"'+r)),-1===n?-1:n+1}function T(e){switch(e){case 36:case 34:case 37:case 35:return!0;default:return!1}}function E(e,t){return t.getTypeAtLocation(e.parent.parent.expression)}function C(e){return 164===e||165===e||166===e||157===e||159===e}function k(e){return 243===e||161===e||160===e||162===e||163===e}function N(e){return 248===e}function A(e){return 224===e||225===e||227===e||232===e||233===e||234===e||238===e||240===e||158===e||246===e||253===e||252===e||259===e||251===e||258===e}function F(e,t){return w(e,e.fileExists,t)}function P(e){try{return e()}catch(e){return}}function w(e,t){for(var r=[],n=2;n-1&&e.isWhiteSpaceSingleLine(t.charCodeAt(r));)r-=1;return r+1},e.getSynthesizedDeepClone=f,e.getSynthesizedDeepCloneWithRenames=m,e.getSynthesizedDeepClones=function(t,r){return void 0===r&&(r=!0),t&&e.createNodeArray(t.map((function(e){return f(e,r)})),t.hasTrailingComma)},e.suppressLeadingAndTrailingTrivia=y,e.suppressLeadingTrivia=h,e.suppressTrailingTrivia=v,e.getUniqueName=function(t,r){for(var n=t,i=1;!e.isFileLevelUniqueName(r,n);i++)n=t+"_"+i;return n},e.getRenameLocation=function(t,r,n,i){for(var a=0,o=-1,s=0,c=t;s=0),o},e.copyLeadingComments=function(t,r,n,i,a){e.forEachLeadingCommentRange(n.text,t.pos,D(r,n,i,a,e.addSyntheticLeadingComment))},e.copyTrailingComments=function(t,r,n,i,a){e.forEachTrailingCommentRange(n.text,t.end,D(r,n,i,a,e.addSyntheticTrailingComment))},e.copyTrailingAsLeadingComments=function(t,r,n,i,a){e.forEachTrailingCommentRange(n.text,t.pos,D(r,n,i,a,e.addSyntheticLeadingComment))},e.getContextualTypeFromParent=function(e,t){var r=e.parent;switch(r.kind){case 196:return t.getContextualType(r);case 208:var n=r,i=n.left,a=n.operatorToken,o=n.right;return T(a.kind)?t.getTypeAtLocation(e===o?i:o):t.getContextualType(e);case 275:return r.expression===e?E(r,t):void 0;default:return t.getContextualType(e)}},e.quote=function(t,r){if(/^\d+$/.test(t))return t;var n=r.quotePreference||"auto",i=JSON.stringify(t);switch(n){case"auto":case"double":return i;case"single":return"'"+e.stripQuotes(i).replace("'","\\'").replace('\\"','"')+"'";default:return e.Debug.assertNever(n)}},e.isEqualityOperatorKind=T,e.isStringLiteralOrTemplate=function(e){switch(e.kind){case 10:case 14:case 210:case 197:return!0;default:return!1}},e.hasIndexSignature=function(e){return!!e.getStringIndexType()||!!e.getNumberIndexType()},e.getSwitchedType=E,e.getTypeNodeIfAccessible=function(e,t,r,n){var i=r.getTypeChecker(),a=!0,o=function(){a=!1},s=i.typeToTypeNode(e,t,void 0,{trackSymbol:function(e,t,r){a=a&&0===i.isSymbolAccessible(e,t,r,!1).accessibility},reportInaccessibleThisError:o,reportPrivateInBaseOfClassExpression:o,reportInaccessibleUniqueSymbolError:o,moduleResolverHost:{readFile:n.readFile,fileExists:n.fileExists,directoryExists:n.directoryExists,getSourceFiles:r.getSourceFiles,getCurrentDirectory:r.getCurrentDirectory,getCommonSourceDirectory:r.getCommonSourceDirectory}});return a?s:void 0},e.syntaxRequiresTrailingCommaOrSemicolonOrASI=C,e.syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI=k,e.syntaxRequiresTrailingModuleBlockOrSemicolonOrASI=N,e.syntaxRequiresTrailingSemicolonOrASI=A,e.syntaxMayBeASICandidate=e.or(C,k,N,A),e.isASICandidate=function(t,r){var n=t.getLastToken(r);if(n&&26===n.kind)return!1;if(C(t.kind)){if(n&&27===n.kind)return!1}else if(N(t.kind)){if((i=e.last(t.getChildren(r)))&&e.isModuleBlock(i))return!1}else if(k(t.kind)){var i;if((i=e.last(t.getChildren(r)))&&e.isFunctionBlock(i))return!1}else if(!A(t.kind))return!1;if(227===t.kind)return!0;var a=e.findAncestor(t,(function(e){return!e.parent})),o=e.findNextToken(t,a,r);return!o||19===o.kind||r.getLineAndCharacterOfPosition(t.getEnd()).line!==r.getLineAndCharacterOfPosition(o.getStart(r)).line},e.probablyUsesSemicolons=function(t){var r=0,n=0;return e.forEachChild(t,(function i(a){if(A(a.kind)){var o=a.getLastToken(t);o&&26===o.kind?r++:n++}return r+n>=5||e.forEachChild(a,i)})),0===r&&n<=1||r/n>.2},e.tryGetDirectories=function(e,t){return w(e,e.getDirectories,t)||[]},e.tryReadDirectory=function(t,r,n,i,a){return w(t,t.readDirectory,r,n,i,a)||e.emptyArray},e.tryFileExists=F,e.tryDirectoryExists=function(t,r){return P((function(){return e.directoryProbablyExists(r,t)}))||!1},e.tryAndIgnoreErrors=P,e.tryIOAndConsumeErrors=w,e.findPackageJsons=function(t,r,n){var i=[];return e.forEachAncestorDirectory(t,(function(t){if(t===n)return!0;var a=e.combinePaths(t,"package.json");F(r,a)&&i.push(a)})),i},e.findPackageJson=function(t,r){var n;return e.forEachAncestorDirectory(t,(function(t){return"node_modules"===t||(!!(n=e.findConfigFile(t,(function(e){return F(r,e)}),"package.json"))||void 0)})),n},e.getPackageJsonsVisibleToFile=function(t,r){if(!r.fileExists)return[];var n=[];return e.forEachAncestorDirectory(e.getDirectoryPath(t),(function(t){var i=e.combinePaths(t,"package.json");if(r.fileExists(i)){var a=I(i,r);a&&n.push(a)}})),n},e.createPackageJsonInfo=I,e.consumesNodeCoreModules=function(t){return e.some(t.imports,(function(t){var r=t.text;return e.JsTyping.nodeCoreModules.has(r)}))},e.isInsideNodeModules=function(t){return e.contains(e.getPathComponents(t),"node_modules")}}(s||(s={})),function(e){e.createClassifier=function(){var o=e.createScanner(99,!1);function s(i,s,c){var u=0,l=0,_=[],d=function(t){switch(t){case 3:return{prefix:'"\\\n'};case 2:return{prefix:"'\\\n"};case 1:return{prefix:"/*\n"};case 4:return{prefix:"`\n"};case 5:return{prefix:"}\n",pushTemplate:!0};case 6:return{prefix:"",pushTemplate:!0};case 0:return{prefix:""};default:return e.Debug.assertNever(t)}}(s),p=d.prefix,f=d.pushTemplate;i=p+i;var m=p.length;f&&_.push(15),o.setText(i);var g=0,y=[],h=0;do{u=o.scan(),e.isTrivia(u)||(x(),l=u);var v=o.getTextPos();if(n(o.getTokenPos(),v,m,a(u),y),v>=i.length){var b=r(o,u,e.lastOrUndefined(_));void 0!==b&&(g=b)}}while(1!==u);function x(){switch(u){case 43:case 67:t[l]||13!==o.reScanSlashToken()||(u=13);break;case 29:75===l&&h++;break;case 31:h>0&&h--;break;case 124:case 142:case 139:case 127:case 143:h>0&&!c&&(u=75);break;case 15:_.push(u);break;case 18:_.length>0&&_.push(u);break;case 19:if(_.length>0){var r=e.lastOrUndefined(_);15===r?17===(u=o.reScanTemplateToken())?_.pop():e.Debug.assertEqual(u,16,"Should have been a template middle."):(e.Debug.assertEqual(r,18,"Should have been an open brace"),_.pop())}break;default:if(!e.isKeyword(u))break;24===l?u=75:e.isKeyword(l)&&e.isKeyword(u)&&!function(t,r){if(!e.isAccessibilityModifier(t))return!0;switch(r){case 130:case 141:case 128:case 119:return!0;default:return!1}}(l,u)&&(u=75)}}return{endOfLineState:g,spans:y}}return{getClassificationsForLine:function(t,r,n){return function(t,r){for(var n=[],a=t.spans,o=0,s=0;s=0){var _=c-o;_>0&&n.push({length:_,classification:e.TokenClass.Whitespace})}n.push({length:u,classification:i(l)}),o=c+u}var d=r.length-o;d>0&&n.push({length:d,classification:e.TokenClass.Whitespace});return{entries:n,finalLexState:t.endOfLineState}}(s(t,r,n),t)},getEncodedLexicalClassifications:s}};var t=e.arrayToNumericMap([75,10,8,9,13,103,45,46,21,23,19,105,90],(function(e){return e}),(function(){return!0}));function r(t,r,n){switch(r){case 10:if(!t.isUnterminated())return;for(var i=t.getTokenText(),a=i.length-1,o=0;92===i.charCodeAt(a-o);)o++;if(0==(1&o))return;return 34===i.charCodeAt(0)?3:2;case 3:return t.isUnterminated()?1:void 0;default:if(e.isTemplateLiteralKind(r)){if(!t.isUnterminated())return;switch(r){case 17:return 5;case 14:return 4;default:return e.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #"+r)}}return 15===n?6:void 0}}function n(e,t,r,n,i){if(8!==n){0===e&&r>0&&(e+=r);var a=t-e;a>0&&i.push(e-r,a,n)}}function i(t){switch(t){case 1:return e.TokenClass.Comment;case 3:return e.TokenClass.Keyword;case 4:return e.TokenClass.NumberLiteral;case 25:return e.TokenClass.BigIntLiteral;case 5:return e.TokenClass.Operator;case 6:return e.TokenClass.StringLiteral;case 8:return e.TokenClass.Whitespace;case 10:return e.TokenClass.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:return e.TokenClass.Identifier;default:return}}function a(t){if(e.isKeyword(t))return 3;if(function(e){switch(e){case 41:case 43:case 44:case 39:case 40:case 47:case 48:case 49:case 29:case 31:case 32:case 33:case 97:case 96:case 122:case 34:case 35:case 36:case 37:case 50:case 52:case 51:case 55:case 56:case 73:case 72:case 74:case 69:case 70:case 71:case 63:case 64:case 65:case 67:case 68:case 62:case 27:case 60:return!0;default:return!1}}(t)||function(e){switch(e){case 39:case 40:case 54:case 53:case 45:case 46:return!0;default:return!1}}(t))return 5;if(t>=18&&t<=74)return 10;switch(t){case 8:return 4;case 9:return 25;case 10:return 6;case 13:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 75:default:return e.isTemplateLiteralKind(t)?6:2}}function o(e,t){switch(t){case 248:case 244:case 245:case 243:e.throwIfCancellationRequested()}}function s(t,r,n,i,a){var s=[];return n.forEachChild((function c(u){if(u&&e.textSpanIntersectsWith(a,u.pos,u.getFullWidth())){if(o(r,u.kind),e.isIdentifier(u)&&!e.nodeIsMissing(u)&&i.has(u.escapedText)){var l=t.getSymbolAtLocation(u),_=l&&function t(r,n,i){var a=r.getFlags();return 0==(2885600&a)?void 0:32&a?11:384&a?12:524288&a?16:1536&a?4&n||1&n&&function(t){return e.some(t.declarations,(function(t){return e.isModuleDeclaration(t)&&1===e.getModuleInstanceState(t)}))}(r)?14:void 0:2097152&a?t(i.getAliasedSymbol(r),n,i):2&n?64&a?13:262144&a?15:void 0:void 0}(l,e.getMeaningFromLocation(u),t);_&&function(t,r,n){var i=r-t;e.Debug.assert(i>0,"Classification had non-positive length of "+i),s.push(t),s.push(i),s.push(n)}(u.getStart(n),u.getEnd(),_)}u.forEachChild(c)}})),{spans:s,endOfLineState:0}}function c(e){switch(e){case 1:return"comment";case 2:return"identifier";case 3:return"keyword";case 4:return"number";case 25:return"bigint";case 5:return"operator";case 6:return"string";case 8:return"whitespace";case 9:return"text";case 10:return"punctuation";case 11:return"class name";case 12:return"enum name";case 13:return"interface name";case 14:return"module name";case 15:return"type parameter name";case 16:return"type alias name";case 17:return"parameter name";case 18:return"doc comment tag name";case 19:return"jsx open tag name";case 20:return"jsx close tag name";case 21:return"jsx self closing tag name";case 22:return"jsx attribute";case 23:return"jsx text";case 24:return"jsx attribute string literal value";default:return}}function u(t){e.Debug.assert(t.spans.length%3==0);for(var r=t.spans,n=[],i=0;i])*)(\/>)?)?/im.exec(a);if(!o)return!1;if(!(o[3]&&o[3]in e.commentPragmas))return!1;var s=t;d(s,o[1].length),l(s+=o[1].length,o[2].length,10),l(s+=o[2].length,o[3].length,21),s+=o[3].length;var c=o[4],u=s;for(;;){var _=i.exec(c);if(!_)break;var p=s+_.index;p>u&&(d(u,p-u),u=p),l(u,_[1].length,22),u+=_[1].length,_[2].length&&(d(u,_[2].length),u+=_[2].length),l(u,_[3].length,5),u+=_[3].length,_[4].length&&(d(u,_[4].length),u+=_[4].length),l(u,_[5].length,24),u+=_[5].length}(s+=o[4].length)>u&&d(u,s-u);o[5]&&(l(s,o[5].length,10),s+=o[5].length);var f=t+n;s=0),a>0){var o=n||y(t.kind,t);o&&l(i,a,o)}return!0}function y(t,r){if(e.isKeyword(t))return 3;if((29===t||31===t)&&r&&e.getTypeArgumentOrTypeParameterList(r.parent))return 10;if(e.isPunctuation(t)){if(r){var n=r.parent;if(62===t&&(241===n.kind||158===n.kind||155===n.kind||271===n.kind))return 5;if(208===n.kind||206===n.kind||207===n.kind||209===n.kind)return 5}return 10}if(8===t)return 4;if(9===t)return 25;if(10===t)return r&&271===r.parent.kind?24:6;if(13===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(11===t)return 23;if(75===t){if(r)switch(r.parent.kind){case 244:return r.parent.name===r?11:void 0;case 154:return r.parent.name===r?15:void 0;case 245:return r.parent.name===r?13:void 0;case 247:return r.parent.name===r?12:void 0;case 248:return r.parent.name===r?14:void 0;case 155:return r.parent.name===r?e.isThisIdentifier(r)?3:17:void 0}return 2}}function h(n){if(n&&e.decodedTextSpanIntersectsWith(i,a,n.pos,n.getFullWidth())){o(t,n.kind);for(var s=0,c=n.getChildren(r);sa.parameters.length)){var o=r.getParameterType(a,t.argumentIndex);return n=n||!!(4&o.flags),u(o,i)}})),isNewIdentifier:n}}(y,i):h()}case 253:case 259:case 263:return{kind:0,paths:p(t,r,a,o,i)};default:return h()}function h(){return{kind:2,types:u(e.getContextualTypeFromParent(r,i)),isNewIdentifier:!1}}}function c(t){return t&&{kind:1,symbols:t.getApparentProperties(),hasIndexSignature:e.hasIndexSignature(t)}}function u(t,r){return void 0===r&&(r=e.createMap()),t?(t=e.skipConstraint(t)).isUnion()?e.flatMap(t.types,(function(e){return u(e,r)})):!t.isStringLiteral()||1024&t.flags||!e.addToSeen(r,t.value)?e.emptyArray:[t]:e.emptyArray}function l(e,t,r){return{name:e,kind:t,extension:r}}function _(e){return l(e,"directory",void 0)}function d(t,r,n){var i=function(t,r){var n=Math.max(t.lastIndexOf(e.directorySeparator),t.lastIndexOf("\\")),i=-1!==n?n+1:0,a=t.length-i;return 0===a||e.isIdentifierText(t.substr(i,a),99)?void 0:e.createTextSpan(r+i,a)}(t,r);return n.map((function(e){return{name:e.name,kind:e.kind,extension:e.extension,span:i}}))}function p(r,n,i,a,o){return d(n.text,n.getStart(r)+1,function(r,n,i,a,o){var s=e.normalizeSlashes(n.text),c=r.path,u=e.getDirectoryPath(c);return function(e){if(e&&e.length>=2&&46===e.charCodeAt(0)){var t=e.length>=3&&46===e.charCodeAt(1)?2:1,r=e.charCodeAt(t);return 47===r||92===r}return!1}(s)||!i.baseUrl&&(e.isRootedDiskPath(s)||e.isUrl(s))?function(r,n,i,a,o){var s=m(i);return i.rootDirs?function(r,n,i,a,o,s,c){var u=o.project||s.getCurrentDirectory(),l=!(s.useCaseSensitiveFileNames&&s.useCaseSensitiveFileNames()),_=function(r,n,i,a){r=r.map((function(t){return e.normalizePath(e.isRootedDiskPath(t)?t:e.combinePaths(n,t))}));var o=e.firstDefined(r,(function(t){return e.containsPath(t,i,n,a)?i.substr(t.length):void 0}));return e.deduplicate(t(r.map((function(t){return e.combinePaths(t,o)})),[i]),e.equateStringsCaseSensitive,e.compareStringsCaseSensitive)}(r,u,i,l);return e.flatMap(_,(function(e){return y(n,e,a,s,c)}))}(i.rootDirs,r,n,s,i,a,o):y(r,n,s,a,o)}(s,u,i,a,c):function(t,r,n,i,a){var o=n.baseUrl,s=n.paths,c=[],u=m(n);if(o){var _=n.project||i.getCurrentDirectory(),d=e.normalizePath(e.combinePaths(_,o));y(t,d,u,i,void 0,c),s&&h(c,t,d,u.extensions,s,i)}for(var p=v(t),f=0,g=function(t,r,n){var i=n.getAmbientModules().map((function(t){return e.stripQuotes(t.name)})).filter((function(r){return e.startsWith(r,t)}));if(void 0!==r){var a=e.ensureTrailingDirectorySeparator(r);return i.map((function(t){return e.removePrefix(t,a)}))}return i}(t,p,a);f=e.pos&&r<=e.end}));if(!s)return;var c=t.text.slice(s.pos,r),u=D.exec(c);if(!u)return;var l=u[1],_=u[2],p=u[3],f=e.getDirectoryPath(t.path),g="path"===_?y(p,f,m(n,!0),i,t.path):"types"===_?x(i,n,f,v(p),m(n)):e.Debug.fail();return d(p,s.pos+l.length,g)}(t,n,c,u);return p&&i(p)}if(e.isInString(t,n,a))return a&&e.isStringLiteralLike(a)?function(t,n,a,o,s){if(void 0===t)return;switch(t.kind){case 0:return i(t.paths);case 1:var c=[];return r.getCompletionEntriesFromSymbols(t.symbols,c,n,n,a,99,o,4,s),{isGlobalCompletion:!1,isMemberCompletion:!0,isNewIdentifierLocation:t.hasIndexSignature,entries:c};case 2:c=t.types.map((function(e){return{name:e.value,kindModifiers:"",kind:"string",sortText:"0"}}));return{isGlobalCompletion:!1,isMemberCompletion:!1,isNewIdentifierLocation:t.isNewIdentifier,entries:c};default:return e.Debug.assertNever(t)}}(s(t,a,n,o,c,u),t,o,l,_):void 0},n.getStringLiteralCompletionDetails=function(t,n,i,o,c,u,l,_){if(o&&e.isStringLiteralLike(o)){var d=s(n,o,i,c,u,l);return d&&function(t,n,i,o,s,c){switch(i.kind){case 0:return(u=e.find(i.paths,(function(e){return e.name===t})))&&r.createCompletionDetails(t,a(u.extension),u.kind,[e.textPart(t)]);case 1:var u;return(u=e.find(i.symbols,(function(e){return e.name===t})))&&r.createCompletionDetailsForSymbol(u,s,o,n,c);case 2:return e.find(i.types,(function(e){return e.value===t}))?r.createCompletionDetails(t,"","type",[e.textPart(t)]):void 0;default:return e.Debug.assertNever(i)}}(t,o,d,n,c,_)}},function(e){e[e.Paths=0]="Paths",e[e.Properties=1]="Properties",e[e.Types=2]="Types"}(o||(o={}));var D=/^(\/\/\/\s*"),kind:"class",kindModifiers:void 0,sortText:r.LocationPriority}]}}var N=[];if(c(t,i)){var F=h(l,N,m,t,n,i.target,a,_,s,g,D,x,b,T);!function(t,n,i,a,o){e.getNameTable(t).forEach((function(t,s){if(t!==n){var c=e.unescapeLeadingUnderscores(s);e.addToSeen(i,c)&&e.isIdentifierText(c,a)&&o.push({name:c,kind:"warning",kindModifiers:"",sortText:r.JavascriptIdentifiers})}}))}(t,m.pos,F,i.target,N)}else{if(!(f||l&&0!==l.length||0!==y))return;h(l,N,m,t,n,i.target,a,_,s,g,D,x,b,T)}if(0!==y)for(var P=e.arrayToSet(N,(function(e){return e.name})),w=0,I=function(t,r){if(!r)return A(t);var n=t+7+1;return k[n]||(k[n]=A(t).filter((function(t){return!function(e){switch(e){case 121:case 124:case 150:case 127:case 129:case 87:case 149:case 112:case 131:case 113:case 132:case 133:case 134:case 135:case 136:case 139:case 140:case 116:case 117:case 118:case 137:case 142:case 143:case 144:case 146:case 147:return!0;default:return!1}}(e.stringToToken(t.name))})))}(y,!S&&e.isSourceFileJS(t));w=t.pos;case 24:return 189===n;case 58:return 190===n;case 22:return 189===n;case 20:return 278===n||ae(n);case 18:return 247===n;case 29:return 244===n||213===n||245===n||246===n||e.isFunctionLikeKind(n);case 119:return 158===n&&!e.isClassLike(r.parent);case 25:return 155===n||!!r.parent&&189===r.parent.kind;case 118:case 116:case 117:return 155===n&&!e.isConstructorDeclaration(r.parent);case 122:return 257===n||261===n||255===n;case 130:case 141:return!L(t);case 79:case 87:case 113:case 93:case 108:case 95:case 114:case 80:case 120:case 144:return!0;case 41:return e.isFunctionLike(t.parent)&&!e.isMethodDeclaration(t.parent)}if(P(I(t))&&L(t))return!1;if(ie(t)&&(!e.isIdentifier(t)||e.isParameterPropertyModifier(I(t))||ue(t)))return!1;switch(I(t)){case 121:case 79:case 80:case 129:case 87:case 93:case 113:case 114:case 116:case 117:case 118:case 119:case 108:case 120:return!0;case 125:return e.isPropertyDeclaration(t.parent)}return e.isDeclarationName(t)&&!e.isJsxAttribute(t.parent)&&!(e.isClassLike(t.parent)&&(t!==h||o>h.end))}(t)||function(e){if(8===e.kind){var t=e.getFullText();return"."===t.charAt(t.length-1)}return!1}(t)||function(e){if(11===e.kind)return!0;if(31===e.kind&&e.parent){if(266===e.parent.kind)return!0;if(267===e.parent.kind||265===e.parent.kind)return!!e.parent.parent&&264===e.parent.parent.kind}return!1}(t);return n("getCompletionsAtPosition: isCompletionListBlocker: "+(e.timestamp()-r)),i}(v))return void n("Returning an empty list because completion was requested in an invalid position.");var B=v.parent;if(24===v.kind||28===v.kind)switch(E=24===v.kind,C=28===v.kind,B.kind){case 193:if((S=(D=B).expression).end===v.pos&&e.isCallExpression(S)&&S.getChildCount(i)&&21!==e.last(S.getChildren(i)).kind)return;break;case 152:S=B.left;break;case 248:S=B.name;break;case 187:case 218:S=B;break;default:return}else if(1===i.languageVariant){if(B&&193===B.kind&&(v=B,B=B.parent),d.parent===w)switch(d.kind){case 31:264!==d.parent.kind&&266!==d.parent.kind||(w=d);break;case 43:265===d.parent.kind&&(w=d)}switch(B.kind){case 267:43===v.kind&&(N=!0,w=v);break;case 208:if(!R(B))break;case 265:case 264:case 266:29===v.kind&&(k=!0,w=v);break;case 271:switch(h.kind){case 62:A=!0;break;case 75:B!==h.parent&&!B.initializer&&e.findChildOfKind(B,62,i)&&(A=h)}}}}var j=e.timestamp(),K=5,J=!1,z=0,U=[],V=[],q=[],W=u.getImportSuggestionsCache&&u.getImportSuggestionsCache();if(E||C)!function(){K=2;var t=e.isLiteralImportTypeNode(S),r=f||t&&!S.isTypeOf||e.isPartOfTypeNode(S.parent)||e.isPossiblyTypeArgumentPosition(v,i,l),n=e.isInRightSideOfInternalImportEqualsDeclaration(S);if(e.isEntityName(S)||t){var a=e.isModuleDeclaration(S.parent);a&&(J=!0);var o=l.getSymbolAtLocation(S);if(o&&1920&(o=e.skipAlias(o,l)).flags){for(var c=e.Debug.assertEachDefined(l.getExportsOfModule(o),"getExportsOfModule() should all be defined"),u=function(e){return l.isValidPropertyAccess(t?S:S.parent,e.name)},_=function(e){return ne(e)},d=a?function(e){return!!(1920&e.flags)&&!e.declarations.every((function(e){return e.parent===S.parent}))}:n?function(e){return _(e)||u(e)}:r?_:u,p=0,m=c;p0&&(U=function(t,r){if(0===r.length)return t;for(var n=e.createMap(),i=e.createUnderscoreEscapedMap(),a=0,o=r;a=0&&!u(r,n[i],110);i--);return e.forEach(a(t.statement),(function(e){s(t,e)&&u(r,e.getFirstToken(),76,81)})),r}function _(e){var t=c(e);if(t)switch(t.kind){case 229:case 230:case 231:case 227:case 228:return l(t);case 236:return d(t)}}function d(t){var r=[];return u(r,t.getFirstToken(),102),e.forEach(t.caseBlock.clauses,(function(n){u(r,n.getFirstToken(),77,83),e.forEach(a(n),(function(e){s(t,e)&&u(r,e.getFirstToken(),76)}))})),r}function p(t,r){var n=[];(u(n,t.getFirstToken(),106),t.catchClause&&u(n,t.catchClause.getFirstToken(),78),t.finallyBlock)&&u(n,e.findChildOfKind(t,91,r),91);return n}function f(t,r){var n=function(t){for(var r=t;r.parent;){var n=r.parent;if(e.isFunctionBlock(n)||288===n.kind)return n;if(e.isTryStatement(n)&&n.tryBlock===r&&n.catchClause)return r;r=n}}(t);if(n){var a=[];return e.forEach(i(n),(function(t){a.push(e.findChildOfKind(t,104,r))})),e.isFunctionBlock(n)&&e.forEachReturnStatement(n,(function(t){a.push(e.findChildOfKind(t,100,r))})),a}}function m(t,r){var n=e.getContainingFunction(t);if(n){var a=[];return e.forEachReturnStatement(e.cast(n.body,e.isBlock),(function(t){a.push(e.findChildOfKind(t,100,r))})),e.forEach(i(n.body),(function(t){a.push(e.findChildOfKind(t,104,r))})),a}}function g(t){var r=e.getContainingFunction(t);if(r){var n=[];return r.modifiers&&r.modifiers.forEach((function(e){u(n,e,125)})),e.forEachChild(r,(function(t){y(t,(function(t){e.isAwaitExpression(t)&&u(n,t.getFirstToken(),126)}))})),n}}function y(t,r){r(t),e.isFunctionLike(t)||e.isClassLike(t)||e.isInterfaceDeclaration(t)||e.isModuleDeclaration(t)||e.isTypeAliasDeclaration(t)||e.isTypeNode(t)||e.forEachChild(t,(function(e){return y(e,r)}))}r.getDocumentHighlights=function(r,i,a,o,s){var c=e.getTouchingPropertyName(a,o);if(c.parent&&(e.isJsxOpeningElement(c.parent)&&c.parent.tagName===c||e.isJsxClosingElement(c.parent))){var h=c.parent.parent,v=[h.openingElement,h.closingElement].map((function(e){return n(e.tagName,a)}));return[{fileName:a.fileName,highlightSpans:v}]}return function(t,r,n,i,a){var o=e.arrayToSet(a,(function(e){return e.fileName})),s=e.FindAllReferences.getReferenceEntriesForNode(t,r,n,a,i,void 0,o);if(!s)return;var c=e.arrayToMultiMap(s.map(e.FindAllReferences.toHighlightSpan),(function(e){return e.fileName}),(function(e){return e.span}));return e.arrayFrom(c.entries(),(function(t){var r=t[0],i=t[1];if(!o.has(r)){e.Debug.assert(n.redirectTargetsMap.has(r));var s=n.getSourceFile(r);r=e.find(a,(function(e){return!!e.redirectInfo&&e.redirectInfo.redirectTarget===s})).fileName,e.Debug.assert(o.has(r))}return{fileName:r,highlightSpans:i}}))}(o,c,r,i,s)||function(r,i){var a=function(r,i){switch(r.kind){case 94:case 86:return e.isIfStatement(r.parent)?function(t,r){for(var i=function(t,r){var n=[];for(;e.isIfStatement(t.parent)&&t.parent.elseStatement===t;)t=t.parent;for(;;){var i=t.getChildren(r);u(n,i[0],94);for(var a=i.length-1;a>=0&&!u(n,i[a],86);a--);if(!t.elseStatement||!e.isIfStatement(t.elseStatement))break;t=t.elseStatement}return n}(t,r),a=[],o=0;o=s.end;_--)if(!e.isWhiteSpaceSingleLine(r.text.charCodeAt(_))){l=!1;break}if(l){a.push({fileName:r.fileName,textSpan:e.createTextSpanFromBounds(s.getStart(),c.end),kind:"reference"}),o++;continue}}a.push(n(i[o],r))}return a}(r.parent,i):void 0;case 100:return c(r.parent,e.isReturnStatement,m);case 104:return c(r.parent,e.isThrowStatement,f);case 106:case 78:case 91:return c(78===r.kind?r.parent.parent:r.parent,e.isTryStatement,p);case 102:return c(r.parent,e.isSwitchStatement,d);case 77:case 83:return c(r.parent.parent.parent,e.isSwitchStatement,d);case 76:case 81:return c(r.parent,e.isBreakOrContinueStatement,_);case 92:case 110:case 85:return c(r.parent,(function(t){return e.isIterationStatement(t,!0)}),l);case 128:return s(e.isConstructorDeclaration,[128]);case 130:case 141:return s(e.isAccessor,[130,141]);case 126:return c(r.parent,e.isAwaitExpression,g);case 125:return h(g(r));case 120:return h(function(t){var r=e.getContainingFunction(t);if(!r)return;var n=[];return e.forEachChild(r,(function(t){y(t,(function(t){e.isYieldExpression(t)&&u(n,t.getFirstToken(),120)}))})),n}(r));default:return e.isModifierKind(r.kind)&&(e.isDeclaration(r.parent)||e.isVariableStatement(r.parent))?h((a=r.kind,o=r.parent,e.mapDefined(function(r,n){var i=r.parent;switch(i.kind){case 249:case 288:case 222:case 275:case 276:return 128&n&&e.isClassDeclaration(r)?t(r.members,[r]):i.statements;case 161:case 160:case 243:return t(i.parameters,e.isClassLike(i.parent)?i.parent.members:[]);case 244:case 213:case 245:case 172:var a=i.members;if(92&n){var o=e.find(i.members,e.isConstructorDeclaration);if(o)return t(a,o.parameters)}else if(128&n)return t(a,[i]);return a;default:e.Debug.assertNever(i,"Invalid container kind.")}}(o,e.modifierToFlag(a)),(function(t){return e.findModifier(t,a)})))):void 0}var a,o;function s(t,n){return c(r.parent,t,(function(r){return e.mapDefined(r.symbol.declarations,(function(r){return t(r)?e.find(r.getChildren(i),(function(t){return e.contains(n,t.kind)})):void 0}))}))}function c(e,t,r){return t(e)?h(r(e,i)):void 0}function h(e){return e&&e.map((function(e){return n(e,i)}))}}(r,i);return a&&[{fileName:i.fileName,highlightSpans:a}]}(c,a)}}(e.DocumentHighlights||(e.DocumentHighlights={}))}(s||(s={})),function(e){function t(t,n,i){void 0===n&&(n="");var a=e.createMap(),o=e.createGetCanonicalFileName(!!t);function s(e,t,r,n,i,a,o){return u(e,t,r,n,i,a,!0,o)}function c(e,t,r,n,i,a,o){return u(e,t,r,n,i,a,!1,o)}function u(t,r,n,o,s,c,u,l){var _=e.getOrUpdate(a,o,e.createMap),d=_.get(r),p=6===l?100:n.target||1;!d&&i&&((f=i.getDocument(o,r))&&(e.Debug.assert(u),d={sourceFile:f,languageServiceRefCount:0},_.set(r,d)));if(d)d.sourceFile.version!==c&&(d.sourceFile=e.updateLanguageServiceSourceFile(d.sourceFile,s,c,s.getChangeRange(d.sourceFile.scriptSnapshot)),i&&i.setDocument(o,r,d.sourceFile)),u&&d.languageServiceRefCount++;else{var f=e.createLanguageServiceSourceFile(t,s,p,c,!1,l);i&&i.setDocument(o,r,f),d={sourceFile:f,languageServiceRefCount:1},_.set(r,d)}return e.Debug.assert(0!==d.languageServiceRefCount),d.sourceFile}function l(t,r){var n=e.Debug.assertDefined(a.get(r)),i=n.get(t);i.languageServiceRefCount--,e.Debug.assert(i.languageServiceRefCount>=0),0===i.languageServiceRefCount&&n.delete(t)}return{acquireDocument:function(t,i,a,c,u){return s(t,e.toPath(t,n,o),i,r(i),a,c,u)},acquireDocumentWithKey:s,updateDocument:function(t,i,a,s,u){return c(t,e.toPath(t,n,o),i,r(i),a,s,u)},updateDocumentWithKey:c,releaseDocument:function(t,i){return l(e.toPath(t,n,o),r(i))},releaseDocumentWithKey:l,getLanguageServiceRefCounts:function(t){return e.arrayFrom(a.entries(),(function(e){var r=e[0],n=e[1].get(t);return[r,n&&n.languageServiceRefCount]}))},reportStats:function(){var t=e.arrayFrom(a.keys()).filter((function(e){return e&&"_"===e.charAt(0)})).map((function(e){var t=a.get(e),r=[];return t.forEach((function(e,t){r.push({name:t,refCount:e.languageServiceRefCount})})),r.sort((function(e,t){return t.refCount-e.refCount})),{bucket:e,sourceFiles:r}}));return JSON.stringify(t,void 0,2)},getKeyForCompilationSettings:r}}function r(t){return e.sourceFileAffectingCompilerOptions.map((function(r){return e.getCompilerOptionValue(t,r)})).join("|")}e.createDocumentRegistry=function(e,r){return t(e,r)},e.createDocumentRegistryInternal=t}(s||(s={})),function(e){!function(t){function n(t,r){return e.forEach(288===t.kind?t.statements:t.body.statements,(function(t){return r(t)||c(t)&&e.forEach(t.body&&t.body.statements,r)}))}function i(t,r){if(t.externalModuleIndicator||void 0!==t.imports)for(var i=0,a=t.imports;i=0&&!(c>n.end);){var u=c+s;0!==c&&e.isIdentifierPart(a.charCodeAt(c-1),99)||u!==o&&e.isIdentifierPart(a.charCodeAt(u),99)||i.push(c),c=a.indexOf(r,c+s+1)}return i}function b(r,n){var i=r.getSourceFile(),a=n.text,o=e.mapDefined(h(i,a,r),(function(r){return r===n||e.isJumpStatementTarget(r)&&e.getTargetLabel(r,a)===n?t.nodeEntry(r):void 0}));return[{definition:{type:1,node:n},references:o}]}function x(e,t,r,n){return void 0===n&&(n=!0),r.cancellationToken.throwIfCancellationRequested(),D(e,e,t,r,n)}function D(e,t,r,n,i){if(n.markSearchedSymbols(t,r.allSearchSymbols))for(var a=0,o=v(t,r.text,e);a0;o--){D(t,i=n[o])}return[n.length-1,n[0]]}function D(e,t){var r=h(e,t);m(a,r),u.push(a),l.push(o),a=r}function S(){a.children&&(C(a.children,a),F(a.children)),a=u.pop(),o=l.pop()}function T(e,t,r){D(e,r),E(t),S()}function E(t){var r;if(n.throwIfCancellationRequested(),t&&!e.isToken(t))switch(t.kind){case 161:var i=t;T(i,i.body);for(var a=0,s=i.parameters;a0&&(D(K,M),e.forEachChild(K.right,E),S()):e.isFunctionExpression(K.right)||e.isArrowFunction(K.right)?T(t,K.right,M):(D(K,M),T(t,K.right,w.name),S()),void b(O);case 7:case 9:var L=t,R=(M=7===P?L.arguments[0]:L.arguments[0].expression,L.arguments[1]),j=x(t,M);O=j[0];return D(t,j[1]),D(t,e.setTextRange(e.createIdentifier(R.text),R)),E(t.arguments[2]),S(),S(),void b(O);case 5:var K,J=(w=(K=t).left).expression;if(e.isIdentifier(J)&&"prototype"!==e.getElementOrPropertyAccessName(w)&&o&&o.has(J.text))return void(e.isFunctionExpression(K.right)||e.isArrowFunction(K.right)?T(t,K.right,J):e.isBindableStaticAccessExpression(w)&&(D(K,J),T(K.left,K.right,e.getNameOrArgument(w)),S()));break;case 4:case 0:case 8:break;default:e.Debug.assertNever(P)}default:e.hasJSDocNodes(t)&&e.forEach(t.jsDoc,(function(t){e.forEach(t.tags,(function(t){e.isJSDocTypeAlias(t)&&y(t)}))})),e.forEachChild(t,E)}}function C(t,r){var n=e.createMap();e.filterMutate(t,(function(t,i){var a=t.name||e.getNameOfDeclaration(t.node),o=a&&p(a);if(!o)return!0;var s=n.get(o);if(!s)return n.set(o,t),!0;if(s instanceof Array){for(var c=0,u=s;c0)return z(n)}switch(t.kind){case 288:var i=t;return e.isExternalModule(i)?'"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(i.fileName))))+'"':"";case 201:case 243:case 200:case 244:case 213:return 512&e.getModifierFlags(t)?"default":J(t);case 161:return"constructor";case 165:return"new()";case 164:return"()";case 166:return"[]";default:return""}}function O(t){return{text:I(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:K(t.node),spans:L(t),nameSpan:t.name&&j(t.name),childItems:e.map(t.children,O)}}function M(t){return{text:I(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:K(t.node),spans:L(t),childItems:e.map(t.children,(function(t){return{text:I(t.node,t.name),kind:e.getNodeKind(t.node),kindModifiers:e.getNodeModifiers(t.node),spans:L(t),childItems:_,indent:0,bolded:!1,grayed:!1}}))||_,indent:t.indent,bolded:!1,grayed:!1}}function L(e){var t=[j(e.node)];if(e.additionalNodes)for(var r=0,n=e.additionalNodes;r0)return z(e.declarationNameToString(t.name));if(e.isVariableDeclaration(r))return z(e.declarationNameToString(r.name));if(e.isBinaryExpression(r)&&62===r.operatorToken.kind)return p(r.left).replace(s,"");if(e.isPropertyAssignment(r))return p(r.name);if(512&e.getModifierFlags(t))return"default";if(e.isClassLike(t))return"";if(e.isCallExpression(r)){var n=function t(r){if(e.isIdentifier(r))return r.text;if(e.isPropertyAccessExpression(r)){var n=t(r.expression),i=r.name.text;return void 0===n?i:n+"."+i}return}(r.expression);if(void 0!==n)return(n=z(n)).length>c?n+" callback":n+"("+z(e.mapDefined(r.arguments,(function(t){return e.isStringLiteralLike(t)?t.getText(i):void 0})).join(", "))+") callback"}return""}function z(e){return(e=e.length>c?e.substring(0,c)+"...":e).replace(/\\?(\r?\n|\r|\u2028|\u2029)/g,"")}}(e.NavigationBar||(e.NavigationBar={}))}(s||(s={})),function(e){!function(t){function r(t,r){var n=e.isStringLiteral(r)&&r.text;return e.isString(n)&&e.some(t.moduleAugmentations,(function(t){return e.isStringLiteral(t)&&t.text===n}))}function n(t){return void 0!==t&&e.isStringLiteralLike(t)?t.text:void 0}function i(t){if(0===t.length)return t;var r=function(t){for(var r,n=[],i=[],a=[],o=0,s=t;o0?i[0]:c[0],x=0===v.length?d?void 0:e.createNamedImports(e.emptyArray):0===c.length?e.createNamedImports(v):e.updateNamedImports(c[0].importClause.namedBindings,v);return l.push(o(b,d,x)),l}function a(t){if(0===t.length)return t;var r=function(e){for(var t,r=[],n=0,i=e;n...")}(t);case 268:return function(t){var n=e.createTextSpanFromBounds(t.openingFragment.getStart(r),t.closingFragment.getEnd());return s(n,"code",n,!1,"<>...")}(t);case 265:case 266:return function(e){if(0===e.properties.length)return;return a(e.getStart(r),e.getEnd(),"code")}(t.attributes)}function i(t,r){return void 0===r&&(r=18),c(t,!1,!e.isArrayLiteralExpression(t.parent)&&!e.isCallExpression(t.parent),r)}function c(n,i,a,s,c){void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===s&&(s=18),void 0===c&&(c=18===s?19:23);var u=e.findChildOfKind(t,s,r),l=e.findChildOfKind(t,c,r);return u&&l&&o(u,l,n,r,i,a)}}(u,t);l&&n.push(l),c--,e.isIfStatement(u)&&u.elseStatement&&e.isIfStatement(u.elseStatement)?(f(u.expression),f(u.thenStatement),c++,f(u.elseStatement),c--):u.forEachChild(f),c++}}}(t,r,c),function(t,r){for(var i=[],a=t.getLineStarts(),o=0,c=a;o1&&o.push(a(c,u,"comment"))}}function a(t,r,n){return s(e.createTextSpanFromBounds(t,r),n)}function o(t,r,n,i,a,o){return void 0===a&&(a=!1),void 0===o&&(o=!0),s(e.createTextSpanFromBounds(o?t.getFullStart():t.getStart(i),r.getEnd()),"code",e.createTextSpanFromNode(n,i),a)}function s(e,t,r,n,i){return void 0===r&&(r=e),void 0===n&&(n=!1),void 0===i&&(i="..."),{textSpan:e,kind:t,hintSpan:r,bannerText:i,autoCollapse:n}}}(e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(s||(s={})),function(e){var t;function r(e,t){return{kind:e,isCaseSensitive:t}}function n(e,t){var r=t.get(e);return r||t.set(e,r=v(e)),r}function i(i,a,o){var s=function(e,t){for(var r=e.length-t.length,n=function(r){if(C(t,(function(t,n){return d(e.charCodeAt(n+r))===t})))return{value:r}},i=0;i<=r;i++){var a=n(i);if("object"===f(a))return a.value}return-1}(i,a.textLowerCase);if(0===s)return r(a.text.length===i.length?t.exact:t.prefix,e.startsWith(i,a.text));if(a.isLowerCase){if(-1===s)return;for(var _=0,p=n(i,o);_0)return r(t.substring,!0);if(a.characterSpans.length>0){var g=n(i,o),y=!!u(i,g,a,!1)||!u(i,g,a,!0)&&void 0;if(void 0!==y)return r(t.camelCase,y)}}}function a(e,t,r){if(C(t.totalTextChunk.text,(function(e){return 32!==e&&42!==e}))){var n=i(e,t.totalTextChunk,r);if(n)return n}for(var a,s=0,c=t.subWordTextChunks;s=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,99))return!1;var r=String.fromCharCode(t);return r===r.toUpperCase()}function _(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,99))return!1;var r=String.fromCharCode(t);return r===r.toLowerCase()}function d(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function p(e){return e>=48&&e<=57}function m(e){return l(e)||_(e)||p(e)||95===e||36===e}function g(e){for(var t=[],r=0,n=0,i=0;i0&&(t.push(y(e.substr(r,n))),n=0)}return n>0&&t.push(y(e.substr(r,n))),t}function y(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:h(e)}}function h(e){return b(e,!1)}function v(e){return b(e,!0)}function b(t,r){for(var n=[],i=0,a=1;at.length)return;for(var c=n.length-2,u=t.length-1;c>=0;c-=1,u-=1)s=o(s,a(t[u],n[c],i));return s}(t,i,n,r)},getMatchForLastSegmentOfPattern:function(t){return a(t,e.last(n),r)},patternContainsDots:n.length>1}},e.breakIntoCharacterSpans=h,e.breakIntoWordSpans=v}(s||(s={})),function(e){e.preProcessFile=function(t,r,n){void 0===r&&(r=!0),void 0===n&&(n=!1);var i,a,o,s={languageVersion:1,pragmas:void 0,checkJsDirective:void 0,referencedFiles:[],typeReferenceDirectives:[],libReferenceDirectives:[],amdDependencies:[],hasNoDefaultLib:void 0,moduleName:void 0},c=[],u=0,l=!1;function _(){return a=o,18===(o=e.scanner.scan())?u++:19===o&&u--,o}function d(){var t=e.scanner.getTokenValue(),r=e.scanner.getTokenPos();return{fileName:t,pos:r,end:r+t.length}}function p(){c.push(d()),f()}function f(){0===u&&(l=!0)}function m(){var t=e.scanner.getToken();return 129===t&&(134===(t=_())&&10===(t=_())&&(i||(i=[]),i.push({ref:d(),depth:u})),!0)}function g(){if(24===a)return!1;var t=e.scanner.getToken();if(95===t){if(20===(t=_())){if(10===(t=_()))return p(),!0}else{if(10===t)return p(),!0;if(75===t||e.isKeyword(t))if(148===(t=_())){if(10===(t=_()))return p(),!0}else if(62===t){if(h(!0))return!0}else{if(27!==t)return!0;t=_()}if(18===t){for(t=_();19!==t&&1!==t;)t=_();19===t&&148===(t=_())&&10===(t=_())&&p()}else 41===t&&122===(t=_())&&(75===(t=_())||e.isKeyword(t))&&148===(t=_())&&10===(t=_())&&p()}return!0}return!1}function y(){var t=e.scanner.getToken();if(88===t){if(f(),18===(t=_())){for(t=_();19!==t&&1!==t;)t=_();19===t&&148===(t=_())&&10===(t=_())&&p()}else if(41===t)148===(t=_())&&10===(t=_())&&p();else if(95===t&&(75===(t=_())||e.isKeyword(t))&&62===(t=_())&&h(!0))return!0;return!0}return!1}function h(t){var r=t?_():e.scanner.getToken();return 138===r&&(20===(r=_())&&10===(r=_())&&p(),!0)}function v(){var t=e.scanner.getToken();if(75===t&&"define"===e.scanner.getTokenValue()){if(20!==(t=_()))return!0;if(10===(t=_())){if(27!==(t=_()))return!0;t=_()}if(22!==t)return!0;for(t=_();23!==t&&1!==t;)10===t&&p(),t=_();return!0}return!1}if(r&&function(){for(e.scanner.setText(t),_();1!==e.scanner.getToken();)m()||g()||y()||n&&(h(!1)||v())||_();e.scanner.setText(void 0)}(),e.processCommentPragmas(s,t),e.processPragmasIntoFields(s,e.noop),l){if(i)for(var b=0,x=i;bt)break e;if(n(i,t,f)){if(e.isBlock(f)||e.isTemplateSpan(f)||e.isTemplateHead(f)||e.isTemplateTail(f)||p&&e.isTemplateHead(p)||e.isVariableDeclarationList(f)&&e.isVariableStatement(l)||e.isSyntaxList(f)&&e.isVariableDeclarationList(l)||e.isVariableDeclaration(f)&&e.isSyntaxList(l)&&1===_.length){l=f;break}if(e.isTemplateSpan(l)&&m&&e.isTemplateMiddleOrTemplateTail(m))b(f.getFullStart()-"${".length,m.getStart()+"}".length);var g=e.isSyntaxList(f)&&(s=void 0,18===(s=(o=p)&&o.kind)||22===s||20===s||266===s)&&u(m)&&!e.positionsAreOnSameLine(p.getStart(),m.getStart(),i),y=e.hasJSDocNodes(f)&&f.jsDoc[0].getStart(),h=g?p.getEnd():f.getStart(),v=g?m.getStart():f.getEnd();e.isNumber(y)&&b(y,v),b(h,v),(e.isStringLiteral(f)||e.isTemplateLiteral(f))&&b(h+1,v-1),l=f;break}if(d===_.length-1)break e}}return c;function b(n,i){if(n!==i){var a=e.createTextSpanFromBounds(n,i);(!c||!e.textSpansEqual(a,c.textSpan)&&e.textSpanIntersectsWithPosition(a,t))&&(c=r({textSpan:a},c&&{parent:c}))}}};var i=e.or(e.isImportDeclaration,e.isImportEqualsDeclaration);function a(t){if(e.isSourceFile(t))return o(t.getChildAt(0).getChildren(),i);if(e.isMappedTypeNode(t)){var r=t.getChildren(),n=r[0],a=r.slice(1),u=e.Debug.assertDefined(a.pop());e.Debug.assertEqual(n.kind,18),e.Debug.assertEqual(u.kind,19);var l=o(a,(function(e){return e===t.readonlyToken||137===e.kind||e===t.questionToken||57===e.kind}));return[n,c(s(o(l,(function(e){var t=e.kind;return 22===t||154===t||23===t})),(function(e){return 58===e.kind}))),u]}if(e.isPropertySignature(t))return s(a=o(t.getChildren(),(function(r){return r===t.name||e.contains(t.modifiers,r)})),(function(e){return 58===e.kind}));if(e.isParameter(t)){var _=o(t.getChildren(),(function(e){return e===t.dotDotDotToken||e===t.name}));return s(o(_,(function(e){return e===_[0]||e===t.questionToken})),(function(e){return 62===e.kind}))}return e.isBindingElement(t)?s(t.getChildren(),(function(e){return 62===e.kind})):t.getChildren()}function o(e,t){for(var r,n=[],i=0,a=e;i0&&27===e.last(r).kind&&n++;return n}(i);return 0!==a&&e.Debug.assertLessThan(a,o),{list:i,argumentIndex:a,argumentCount:o,argumentsSpan:function(t,r){var n=t.getFullStart(),i=e.skipTrivia(r.text,t.getEnd(),!1);return e.createTextSpan(n,i-n)}(i,r)}}}function s(t,r,n){var i=t.parent;if(e.isCallOrNewExpression(i)){var a=i,s=o(t,n);if(!s)return;var c=s.list,u=s.argumentIndex,l=s.argumentCount,d=s.argumentsSpan;return{isTypeParameterList:!!i.typeArguments&&i.typeArguments.pos===c.pos,invocation:{kind:0,node:a},argumentsSpan:d,argumentIndex:u,argumentCount:l}}if(e.isNoSubstitutionTemplateLiteral(t)&&e.isTaggedTemplateExpression(i))return e.isInsideTemplateLiteral(t,r,n)?_(i,0,n):void 0;if(e.isTemplateHead(t)&&197===i.parent.kind){var p=i,f=p.parent;return e.Debug.assert(210===p.kind),_(f,u=e.isInsideTemplateLiteral(t,r,n)?0:1,n)}if(e.isTemplateSpan(i)&&e.isTaggedTemplateExpression(i.parent.parent)){var m=i;f=i.parent.parent;if(e.isTemplateTail(t)&&!e.isInsideTemplateLiteral(t,r,n))return;return _(f,u=function(t,r,n,i){if(e.Debug.assert(n>=r.getStart(),"Assumed 'position' could not occur before node."),e.isTemplateLiteralToken(r))return e.isInsideTemplateLiteral(r,n,i)?0:t+2;return t+1}(m.parent.templateSpans.indexOf(m),t,r,n),n)}if(e.isJsxOpeningLikeElement(i)){var g=i.attributes.pos,y=e.skipTrivia(n.text,i.attributes.end,!1);return{isTypeParameterList:!1,invocation:{kind:0,node:i},argumentsSpan:e.createTextSpan(g,y-g),argumentIndex:0,argumentCount:1}}var h=e.getPossibleTypeArgumentsInfo(t,n);if(h){var v=h.called,b=h.nTypeArguments;return{isTypeParameterList:!0,invocation:a={kind:1,called:v},argumentsSpan:d=e.createTextSpanFromBounds(v.getStart(n),t.end),argumentIndex:b,argumentCount:b+1}}}function c(t){return e.isBinaryExpression(t.left)?c(t.left)+1:2}function u(t){return"__type"===t.name&&e.firstDefined(t.declarations,(function(t){return e.isFunctionTypeNode(t)?t.parent.symbol:void 0}))||t}function l(e,t){for(var r=0,n=0,i=e.getChildren();n=0&&i.length>a+1),i[a+1]}function m(t){return 0===t.kind?e.getInvokedExpression(t.node):t.called}function g(e){return 0===e.kind?e.node:1===e.kind?e.called:e.node}!function(e){e[e.Call=0]="Call",e[e.TypeArgs=1]="TypeArgs",e[e.Contextual=2]="Contextual"}(n||(n={})),r.getSignatureHelpItems=function(t,r,n,i,l){var _=t.getTypeChecker(),d=e.findTokenOnLeftOfPosition(r,n);if(d){var p=!!i&&"characterTyped"===i.kind;if(!p||!e.isInString(r,n,d)&&!e.isInComment(r,n)){var y=!!i&&"invoked"===i.kind,b=function(t,r,n,i,a){for(var l=function(t){e.Debug.assert(e.rangeContainsRange(t.parent,t),"Not a subspan",(function(){return"Child: "+e.Debug.formatSyntaxKind(t.kind)+", parent: "+e.Debug.formatSyntaxKind(t.parent.kind)}));var a=function(t,r,n,i){return function(t,r,n,i){var a=function(t,r,n){if(20!==t.kind&&27!==t.kind)return;var i=t.parent;switch(i.kind){case 199:case 160:case 200:case 201:var a=o(t,r);if(!a)return;var s=a.argumentIndex,u=a.argumentCount,l=a.argumentsSpan,_=e.isMethodDeclaration(i)?n.getContextualTypeForObjectLiteralElement(i):n.getContextualType(i);return _&&{contextualType:_,argumentIndex:s,argumentCount:u,argumentsSpan:l};case 208:var d=function t(r){return e.isBinaryExpression(r.parent)?t(r.parent):r}(i),p=n.getContextualType(d),f=20===t.kind?0:c(i)-1,m=c(d);return p&&{contextualType:p,argumentIndex:f,argumentCount:m,argumentsSpan:e.createTextSpanFromNode(i)};default:return}}(t,n,i);if(!a)return;var s=a.contextualType,l=a.argumentIndex,_=a.argumentCount,d=a.argumentsSpan,p=s.getCallSignatures();return 1!==p.length?void 0:{isTypeParameterList:!1,invocation:{kind:2,signature:e.first(p),node:t,symbol:u(s.symbol)},argumentsSpan:d,argumentIndex:l,argumentCount:_}}(t,0,n,i)||s(t,r,n)}(t,r,n,i);if(a)return{value:a}},_=t;!e.isSourceFile(_)&&(a||!e.isBlock(_));_=_.parent){var d=l(_);if("object"===f(d))return d.value}return}(d,n,r,_,y);if(b){l.throwIfCancellationRequested();var x=function(t,r,n,i,o){var s=t.invocation,c=t.argumentCount;switch(s.kind){case 0:if(o&&!function(t,r,n){if(!e.isCallOrNewExpression(r))return!1;var i=r.getChildren(n);switch(t.kind){case 20:return e.contains(i,t);case 27:var o=e.findContainingList(t);return!!o&&e.contains(i,o);case 29:return a(t,n,r.expression);default:return!1}}(i,s.node,n))return;var u=[],l=r.getResolvedSignatureForSignatureHelp(s.node,u,c);return 0===u.length?void 0:{kind:0,candidates:u,resolvedSignature:l};case 1:var _=s.called;if(o&&!a(i,n,e.isIdentifier(_)?_.parent:_))return;if(0!==(u=e.getPossibleGenericSignatures(_,c,r)).length)return{kind:0,candidates:u,resolvedSignature:e.first(u)};var d=r.getSymbolAtLocation(_);return d&&{kind:1,symbol:d};case 2:return{kind:0,candidates:[s.signature],resolvedSignature:s.signature};default:return e.Debug.assertNever(s)}}(b,_,r,d,p);return l.throwIfCancellationRequested(),x?_.runWithCancellationToken(l,(function(e){return 0===x.kind?h(x.candidates,x.resolvedSignature,b,r,e):function(e,t,r,n){var i=t.argumentCount,a=t.argumentsSpan,o=t.invocation,s=t.argumentIndex,c=n.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e);return c?{items:[v(e,c,n,g(o),r)],applicableSpan:a,selectedItemIndex:0,argumentIndex:s,argumentCount:i}:void 0}(x.symbol,b,r,e)})):e.isSourceFileJS(r)?function(t,r,n){if(2===t.invocation.kind)return;var i=m(t.invocation),a=e.isIdentifier(i)?i.text:e.isPropertyAccessExpression(i)?i.name.text:void 0,o=r.getTypeChecker();return void 0===a?void 0:e.firstDefined(r.getSourceFiles(),(function(r){return e.firstDefined(r.getNamedDeclarations().get(a),(function(e){var i=e.symbol&&o.getTypeOfSymbolAtLocation(e.symbol,e),a=i&&i.getCallSignatures();if(a&&a.length)return o.runWithCancellationToken(n,(function(e){return h(a,a[0],t,r,e)}))}))}))}(b,t,l):void 0}}}},function(e){e[e.Candidate=0]="Candidate",e[e.Type=1]="Type"}(i||(i={})),r.getArgumentInfoForCompletions=function(e,t,r){var n=s(e,t,r);return!n||n.isTypeParameterList||0!==n.invocation.kind?void 0:{invocation:n.invocation.node,argumentCount:n.argumentCount,argumentIndex:n.argumentIndex}};var y=70246400;function h(r,n,i,a,o){var s=i.isTypeParameterList,c=i.argumentCount,u=i.argumentsSpan,l=i.invocation,_=i.argumentIndex,d=g(l),p=2===l.kind?l.symbol:o.getSymbolAtLocation(m(l)),f=p?e.symbolToDisplayParts(o,p,void 0,void 0):e.emptyArray,y=r.map((function(r){return function(r,n,i,a,o,s){var c=(i?x:D)(r,a,o,s),u=c.isVariadic,l=c.parameters,_=c.prefix,d=c.suffix,p=t(n,_),f=t(d,function(t,r,n){return e.mapToDisplayParts((function(e){e.writePunctuation(":"),e.writeSpace(" ");var i=n.getTypePredicateOfSignature(t);i?n.writeTypePredicate(i,r,void 0,e):n.writeType(n.getReturnTypeOfSignature(t),r,void 0,e)}))}(r,o,a)),m=r.getDocumentationComment(a),g=r.getJsDocTags();return{isVariadic:u,prefixDisplayParts:p,suffixDisplayParts:f,separatorDisplayParts:b,parameters:l,documentation:m,tags:g}}(r,f,s,o,d,a)}));0!==_&&e.Debug.assertLessThan(_,c);var h=r.indexOf(n);return e.Debug.assert(-1!==h),{items:y,applicableSpan:u,selectedItemIndex:h,argumentIndex:_,argumentCount:c}}function v(r,n,i,a,o){var s=e.symbolToDisplayParts(i,r),c=e.createPrinter({removeComments:!0}),u=n.map((function(e){return S(e,i,a,o,c)})),l=r.getDocumentationComment(i),_=r.getJsDocTags();return{isVariadic:!1,prefixDisplayParts:t(s,[e.punctuationPart(29)]),suffixDisplayParts:[e.punctuationPart(31)],separatorDisplayParts:b,parameters:u,documentation:l,tags:_}}var b=[e.punctuationPart(27),e.spacePart()];function x(r,n,i,a){var o=(r.target||r).typeParameters,s=e.createPrinter({removeComments:!0}),c=(o||e.emptyArray).map((function(e){return S(e,n,i,a,s)})),u=e.mapToDisplayParts((function(o){var c=r.thisParameter?[n.symbolToParameterDeclaration(r.thisParameter,i,y)]:[],u=e.createNodeArray(t(c,n.getExpandedParameters(r).map((function(e){return n.symbolToParameterDeclaration(e,i,y)}))));s.writeList(2576,u,a,o)}));return{isVariadic:!1,parameters:c,prefix:[e.punctuationPart(29)],suffix:t([e.punctuationPart(31)],u)}}function D(r,n,i,a){var o=n.hasEffectiveRestParameter(r),s=e.createPrinter({removeComments:!0}),c=e.mapToDisplayParts((function(t){if(r.typeParameters&&r.typeParameters.length){var o=e.createNodeArray(r.typeParameters.map((function(e){return n.typeParameterToDeclaration(e,i)})));s.writeList(53776,o,a,t)}}));return{isVariadic:o,parameters:n.getExpandedParameters(r).map((function(t){return function(t,r,n,i,a){var o=e.mapToDisplayParts((function(e){var o=r.symbolToParameterDeclaration(t,n,y);a.writeNode(4,o,i,e)})),s=r.isOptionalParameter(t.valueDeclaration);return{name:t.name,documentation:t.getDocumentationComment(r),displayParts:o,isOptional:s}}(t,n,i,a,s)})),prefix:t(c,[e.punctuationPart(20)]),suffix:[e.punctuationPart(21)]}}function S(t,r,n,i,a){var o=e.mapToDisplayParts((function(e){var o=r.typeParameterToDeclaration(t,n);a.writeNode(4,o,i,e)}));return{name:t.symbol.name,documentation:t.symbol.getDocumentationComment(r),displayParts:o,isOptional:!1}}}(e.SignatureHelp||(e.SignatureHelp={}))}(s||(s={})),function(e){var t=/^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+\/=]+)$)?/;function r(t,r,n){var i=e.tryParseRawSourceMap(r);if(i&&i.sources&&i.file&&i.mappings)return e.createDocumentPositionMapper(t,i,n)}e.getSourceMapper=function(t){var r=e.createGetCanonicalFileName(t.useCaseSensitiveFileNames()),n=t.getCurrentDirectory(),i=e.createMap(),a=e.createMap();return{tryGetSourcePosition:function t(r){if(!e.isDeclarationFileName(r.fileName))return;var n=c(r.fileName);if(!n)return;var i=s(r.fileName).getSourcePosition(r);return i&&i!==r?t(i)||i:void 0},tryGetGeneratedPosition:function(i){if(e.isDeclarationFileName(i.fileName))return;var a=c(i.fileName);if(!a)return;var o=t.getProgram();if(o.isSourceOfProjectReferenceRedirect(a.fileName))return;var u=o.getCompilerOptions(),l=u.outFile||u.out,_=l?e.removeFileExtension(l)+".d.ts":e.getDeclarationEmitOutputFilePathWorker(i.fileName,o.getCompilerOptions(),n,o.getCommonSourceDirectory(),r);if(void 0===_)return;var d=s(_,i.fileName).getGeneratedPosition(i);return d===i?void 0:d},toLineColumnOffset:function(e,t){return l(e).getLineAndCharacterOfPosition(t)},clearCache:function(){i.clear(),a.clear()}};function o(t){return e.toPath(t,n,r)}function s(n,i){var s,c=o(n),u=a.get(c);if(u)return u;if(t.getDocumentPositionMapper)s=t.getDocumentPositionMapper(n,i);else if(t.readFile){var _=l(n);s=_&&e.getDocumentPositionMapper({getSourceFileLike:l,getCanonicalFileName:r,log:function(e){return t.log(e)}},n,e.getLineInfo(_.text,e.getLineStarts(_)),(function(e){return!t.fileExists||t.fileExists(e)?t.readFile(e):void 0}))}return a.set(c,s||e.identitySourceMapConsumer),s||e.identitySourceMapConsumer}function c(e){var r=t.getProgram();if(r){var n=o(e),i=r.getSourceFileByPath(n);return i&&i.resolvedPath===n?i:void 0}}function u(r){var n=o(r),a=i.get(n);if(void 0!==a)return a||void 0;if(t.readFile&&(!t.fileExists||t.fileExists(n))){var s=t.readFile(n),c=!!s&&function(t,r){return{text:t,lineMap:r,getLineAndCharacterOfPosition:function(t){return e.computeLineAndCharacterOfPosition(e.getLineStarts(this),t)}}}(s);return i.set(n,c),c||void 0}i.set(n,!1)}function l(e){return t.getSourceFileLike?t.getSourceFileLike(e):c(e)||u(e)}},e.getDocumentPositionMapper=function(n,i,a,o){var s=e.tryGetSourceMappingURL(a);if(s){var c=t.exec(s);if(c){if(c[1]){var u=c[1];return r(n,e.base64decode(e.sys,u),i)}s=void 0}}var l=[];s&&l.push(s),l.push(i+".map");for(var _=s&&e.getNormalizedAbsolutePath(s,e.getDirectoryPath(i)),d=0,p=l;d0&&u.push(e.createDiagnosticForNode(e.isVariableDeclaration(a.parent)?a.parent.name:a,e.Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration))}else{if(e.isVariableStatement(a)&&a.parent===i&&2&a.declarationList.flags&&1===a.declarationList.declarations.length){var p=a.declarationList.declarations[0].initializer;p&&e.isRequireCall(p,!0)&&u.push(e.createDiagnosticForNode(p,e.Diagnostics.require_call_may_be_converted_to_an_import))}e.codefix.parameterShouldGetTypeFromJSDoc(a)&&u.push(e.createDiagnosticForNode(a.name||a,e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types))}e.isFunctionLikeDeclaration(a)&&function(r,i,a){(function(t,r){return!e.isAsyncFunction(t)&&t.body&&e.isBlock(t.body)&&(i=t.body,!!e.forEachReturnStatement(i,n))&&function(e,t){var r=t.getTypeAtLocation(e),n=t.getSignaturesOfType(r,0),i=n.length?t.getReturnTypeOfSignature(n[0]):void 0;return!!i&&!!t.getPromisedTypeOfPromise(i)}(t,r);var i})(r,i)&&!t.has(s(r))&&a.push(e.createDiagnosticForNode(!r.name&&e.isVariableDeclaration(r.parent)&&e.isIdentifier(r.parent.name)?r.parent.name:r,e.Diagnostics.This_may_be_converted_to_an_async_function))}(a,l,u);a.forEachChild(r)}(i),e.getAllowSyntheticDefaultImports(a.getCompilerOptions()))for(var d=0,p=i.imports;d0?e.getNodeModifiers(t.declarations[0]):"",n=t&&16777216&t.flags?"optional":"";return r&&n?r+","+n:r||n},t.getSymbolDisplayPartsDocumentationAndSymbolKind=function t(i,a,o,s,c,u,l){void 0===u&&(u=e.getMeaningFromLocation(c));var _,d,p,f,m,g,y=[],h=e.getCombinedLocalAndExportSymbolFlags(a),v=1&u?n(i,a,c):"",b=!1,x=103===c.kind&&e.isInExpressionContext(c);if(103===c.kind&&!x)return{displayParts:[e.keywordPart(103)],documentation:[],symbolKind:"primitive type",tags:void 0};if(""!==v||32&h||2097152&h){"getter"!==v&&"setter"!==v||(v="property");var D=void 0;if(p=x?i.getTypeAtLocation(c):i.getTypeOfSymbolAtLocation(a.exportSymbol||a,c),c.parent&&193===c.parent.kind){var S=c.parent.name;(S===c||S&&0===S.getFullWidth())&&(c=c.parent)}var T=void 0;if(e.isCallOrNewExpression(c)?T=c:e.isCallExpressionTarget(c)||e.isNewExpressionTarget(c)?T=c.parent:c.parent&&e.isJsxOpeningLikeElement(c.parent)&&e.isFunctionLike(a.valueDeclaration)&&(T=c.parent),T){D=i.getResolvedSignature(T);var E=196===T.kind||e.isCallExpression(T)&&101===T.expression.kind,C=E?p.getConstructSignatures():p.getCallSignatures();if(e.contains(C,D.target)||e.contains(C,D)||(D=C.length?C[0]:void 0),D){switch(E&&32&h?(v="constructor",G(p.symbol,v)):2097152&h?(H(v="alias"),y.push(e.spacePart()),E&&(y.push(e.keywordPart(98)),y.push(e.spacePart())),W(a)):G(a,v),v){case"JSX attribute":case"property":case"var":case"const":case"let":case"parameter":case"local var":y.push(e.punctuationPart(58)),y.push(e.spacePart()),16&e.getObjectFlags(p)||!p.symbol||(e.addRange(y,e.symbolToDisplayParts(i,p.symbol,s,void 0,5)),y.push(e.lineBreakPart())),E&&(y.push(e.keywordPart(98)),y.push(e.spacePart())),Y(D,C,262144);break;default:Y(D,C)}b=!0}}else if(e.isNameOfFunctionDeclaration(c)&&!(98304&h)||128===c.kind&&161===c.parent.kind){var k=c.parent;if(a.declarations&&e.find(a.declarations,(function(e){return e===(128===c.kind?k.parent:k)}))){C=161===k.kind?p.getNonNullableType().getConstructSignatures():p.getNonNullableType().getCallSignatures();D=i.isImplementationOfOverload(k)?C[0]:i.getSignatureFromDeclaration(k),161===k.kind?(v="constructor",G(p.symbol,v)):G(164!==k.kind||2048&p.symbol.flags||4096&p.symbol.flags?a:p.symbol,v),Y(D,C),b=!0}}}if(32&h&&!b&&!x&&(V(),e.getDeclarationOfKind(a,213)?H("local class"):y.push(e.keywordPart(79)),y.push(e.spacePart()),W(a),X(a,o)),64&h&&2&u&&(U(),y.push(e.keywordPart(113)),y.push(e.spacePart()),W(a),X(a,o)),524288&h&&2&u&&(U(),y.push(e.keywordPart(144)),y.push(e.spacePart()),W(a),X(a,o),y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),e.addRange(y,e.typeToDisplayParts(i,i.getDeclaredTypeOfSymbol(a),s,8388608))),384&h&&(U(),e.some(a.declarations,(function(t){return e.isEnumDeclaration(t)&&e.isEnumConst(t)}))&&(y.push(e.keywordPart(80)),y.push(e.spacePart())),y.push(e.keywordPart(87)),y.push(e.spacePart()),W(a)),1536&h&&!x){U();var N=(K=e.getDeclarationOfKind(a,248))&&K.name&&75===K.name.kind;y.push(e.keywordPart(N?135:134)),y.push(e.spacePart()),W(a)}if(262144&h&&2&u)if(U(),y.push(e.punctuationPart(20)),y.push(e.textPart("type parameter")),y.push(e.punctuationPart(21)),y.push(e.spacePart()),W(a),a.parent)q(),W(a.parent,s),X(a.parent,s);else{var A=e.getDeclarationOfKind(a,154);if(void 0===A)return e.Debug.fail();if(K=A.parent)if(e.isFunctionLikeKind(K.kind)){q();D=i.getSignatureFromDeclaration(K);165===K.kind?(y.push(e.keywordPart(98)),y.push(e.spacePart())):164!==K.kind&&K.name&&W(K.symbol),e.addRange(y,e.signatureToDisplayParts(i,D,o,32))}else 246===K.kind&&(q(),y.push(e.keywordPart(144)),y.push(e.spacePart()),W(K.symbol),X(K.symbol,o))}if(8&h&&(v="enum member",G(a,"enum member"),282===(K=a.declarations[0]).kind)){var F=i.getConstantValue(K);void 0!==F&&(y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),y.push(e.displayPart(e.getTextOfConstantValue(F),"number"==typeof F?e.SymbolDisplayPartKind.numericLiteral:e.SymbolDisplayPartKind.stringLiteral)))}if(2097152&h){if(U(),!b){var P=i.getAliasedSymbol(a);if(P!==a&&P.declarations&&P.declarations.length>0){var w=P.declarations[0],I=e.getNameOfDeclaration(w);if(I){var O=e.isModuleWithStringLiteralName(w)&&e.hasModifier(w,2),M="default"!==a.name&&!O,L=t(i,P,e.getSourceFileOfNode(w),w,I,u,M?a:P);y.push.apply(y,L.displayParts),y.push(e.lineBreakPart()),m=L.documentation,g=L.tags}}}switch(a.declarations[0].kind){case 251:y.push(e.keywordPart(88)),y.push(e.spacePart()),y.push(e.keywordPart(135));break;case 258:y.push(e.keywordPart(88)),y.push(e.spacePart()),y.push(e.keywordPart(a.declarations[0].isExportEquals?62:83));break;case 261:y.push(e.keywordPart(88));break;default:y.push(e.keywordPart(95))}y.push(e.spacePart()),W(a),e.forEach(a.declarations,(function(t){if(252===t.kind){var r=t;if(e.isExternalModuleImportEqualsDeclaration(r))y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),y.push(e.keywordPart(138)),y.push(e.punctuationPart(20)),y.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportEqualsDeclarationExpression(r)),e.SymbolDisplayPartKind.stringLiteral)),y.push(e.punctuationPart(21));else{var n=i.getSymbolAtLocation(r.moduleReference);n&&(y.push(e.spacePart()),y.push(e.operatorPart(62)),y.push(e.spacePart()),W(n,s))}return!0}}))}if(!b)if(""!==v){if(p)if(x?(U(),y.push(e.keywordPart(103))):G(a,v),"property"===v||"JSX attribute"===v||3&h||"local var"===v||x)if(y.push(e.punctuationPart(58)),y.push(e.spacePart()),p.symbol&&262144&p.symbol.flags){var R=e.mapToDisplayParts((function(t){var r=i.typeParameterToDeclaration(p,s);z().writeNode(4,r,e.getSourceFileOfNode(e.getParseTreeNode(s)),t)}));e.addRange(y,R)}else e.addRange(y,e.typeToDisplayParts(i,p,s));else if(16&h||8192&h||16384&h||131072&h||98304&h||"method"===v){(C=p.getNonNullableType().getCallSignatures()).length&&Y(C[0],C)}}else v=r(i,a,c);if(!_&&(_=a.getDocumentationComment(i),d=a.getJsDocTags(),0===_.length&&4&h&&a.parent&&e.forEach(a.parent.declarations,(function(e){return 288===e.kind}))))for(var B=0,j=a.declarations;B0))break}}return 0===_.length&&m&&(_=m),0===d.length&&g&&(d=g),{displayParts:y,documentation:_,symbolKind:v,tags:0===d.length?void 0:d};function z(){return f||(f=e.createPrinter({removeComments:!0})),f}function U(){y.length&&y.push(e.lineBreakPart()),V()}function V(){l&&(H("alias"),y.push(e.spacePart()))}function q(){y.push(e.spacePart()),y.push(e.keywordPart(96)),y.push(e.spacePart())}function W(t,r){l&&t===a&&(t=l);var n=e.symbolToDisplayParts(i,t,r||o,void 0,7);e.addRange(y,n),16777216&a.flags&&y.push(e.punctuationPart(57))}function G(t,r){U(),r&&(H(r),t&&!e.some(t.declarations,(function(t){return e.isArrowFunction(t)||(e.isFunctionExpression(t)||e.isClassExpression(t))&&!t.name}))&&(y.push(e.spacePart()),W(t)))}function H(t){switch(t){case"var":case"function":case"let":case"const":case"constructor":return void y.push(e.textOrKeywordPart(t));default:return y.push(e.punctuationPart(20)),y.push(e.textOrKeywordPart(t)),void y.push(e.punctuationPart(21))}}function Y(t,r,n){void 0===n&&(n=0),e.addRange(y,e.signatureToDisplayParts(i,t,s,32|n)),r.length>1&&(y.push(e.spacePart()),y.push(e.punctuationPart(20)),y.push(e.operatorPart(39)),y.push(e.displayPart((r.length-1).toString(),e.SymbolDisplayPartKind.numericLiteral)),y.push(e.spacePart()),y.push(e.textPart(2===r.length?"overload":"overloads")),y.push(e.punctuationPart(21)));var a=t.getDocumentationComment(i);_=0===a.length?void 0:a,d=t.getJsDocTags()}function X(t,r){var n=e.mapToDisplayParts((function(n){var a=i.symbolToTypeParameterDeclarations(t,r);z().writeList(53776,a,e.getSourceFileOfNode(e.getParseTreeNode(r)),n)}));e.addRange(y,n)}}}(e.SymbolDisplay||(e.SymbolDisplay={}))}(s||(s={})),function(e){function t(t,r){var i=[],a=r.compilerOptions?n(r.compilerOptions,i):{},o=e.getDefaultCompilerOptions();for(var s in o)e.hasProperty(o,s)&&void 0===a[s]&&(a[s]=o[s]);for(var c=0,u=e.transpileOptionValueCompilerOptions;c>=s;return r}(f,p),0,n),a[u]=(d=1+((l=f)>>(_=p)&c),e.Debug.assert((d&c)===d,"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."),l&~(c<<_)|d<<_)}!function(e){e[e.StopRulesSpecific=0]="StopRulesSpecific",e[e.StopRulesAny=1*s]="StopRulesAny",e[e.ContextRulesSpecific=2*s]="ContextRulesSpecific",e[e.ContextRulesAny=3*s]="ContextRulesAny",e[e.NoContextRulesSpecific=4*s]="NoContextRulesSpecific",e[e.NoContextRulesAny=5*s]="NoContextRulesAny"}(o||(o={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(t){var r,n,i,a,o;function s(t,r,n){var i=e.findPrecedingToken(t,n);return i&&i.kind===r&&t===i.getEnd()?i:void 0}function c(e){for(var t=e;t&&t.parent&&t.parent.end===e.end&&!u(t.parent,t);)t=t.parent;return t}function u(t,r){switch(t.kind){case 244:case 245:return e.rangeContainsRange(t.members,r);case 248:var n=t.body;return!!n&&249===n.kind&&e.rangeContainsRange(n.statements,r);case 288:case 222:case 249:return e.rangeContainsRange(t.statements,r);case 278:return e.rangeContainsRange(t.block.statements,r)}return!1}function l(t,r,n,i){return t?_({pos:e.getLineStartPositionForPosition(t.getStart(r),r),end:t.end},r,n,i):[]}function _(r,n,i,a){var o=function(t,r){return function n(i){var a=e.forEachChild(i,(function(n){return e.startEndContainsRange(n.getStart(r),n.end,t)&&n}));if(a){var o=n(a);if(o)return o}return i}(r)}(r,n);return t.getFormattingScanner(n.text,n.languageVariant,function(t,r,n){var i=t.getStart(n);if(i===r.pos&&t.end===r.end)return i;var a=e.findPrecedingToken(r.pos,n);return a?a.end>=r.pos?t.pos:a.end:t.pos}(o,r,n),r.end,(function(s){return d(r,o,t.SmartIndenter.getIndentationForNode(o,r,n,i.options),function(e,r,n){for(var i,a=-1;e;){var o=n.getLineAndCharacterOfPosition(e.getStart(n)).line;if(-1!==a&&o!==a)break;if(t.SmartIndenter.shouldIndentChildNode(r,e,i,n))return r.indentSize;a=o,i=e,e=e.parent}return 0}(o,i.options,n),s,i,a,function(t,r){if(!t.length)return a;var n=t.filter((function(t){return e.rangeOverlapsWithStartEnd(r,t.start,t.start+t.length)})).sort((function(e,t){return e.start-t.start}));if(!n.length)return a;var i=0;return function(t){for(;;){if(i>=n.length)return!1;var r=n[i];if(t.end<=r.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,r.start,r.start+r.length))return!0;i++}};function a(){return!1}}(n.parseDiagnostics,r),n)}))}function d(r,n,i,a,o,s,c,u,l){var _,d,f,m,g=s.options,y=s.getRules,h=new t.FormattingContext(l,c,g),v=-1,b=[];if(o.advance(),o.isOnToken()){var x=l.getLineAndCharacterOfPosition(n.getStart(l)).line,D=x;n.decorators&&(D=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(n,l)).line),function n(i,a,s,c,p,y){if(!e.rangeOverlapsWithStartEnd(r,i.getStart(l),i.getEnd()))return;var h=T(i,s,p,y);var b=a;e.forEachChild(i,(function(e){S(e,-1,i,h,s,c,!1)}),(function(r){!function(r,n,a,s){e.Debug.assert(e.isNodeArray(r));var c=function(e,t){switch(e.kind){case 161:case 243:case 200:case 160:case 159:case 201:if(e.typeParameters===t)return 29;if(e.parameters===t)return 20;break;case 195:case 196:if(e.typeArguments===t)return 29;if(e.arguments===t)return 20;break;case 168:if(e.typeArguments===t)return 29;break;case 172:return 18}return 0}(n,r),u=s,_=a;if(0!==c)for(;o.isOnToken();){if((b=o.readTokenInfo(n)).token.end>r.pos)break;if(b.token.kind===c){_=l.getLineAndCharacterOfPosition(b.token.pos).line,P(b,n,s,n);var d=void 0;if(-1!==v)d=v;else{var p=e.getLineStartPositionForPosition(b.token.pos,l);d=t.SmartIndenter.findFirstNonWhitespaceColumn(p,b.token.pos,l,g)}u=T(n,a,d,g.indentSize)}else P(b,n,s,n)}for(var f=-1,m=0;mi.end)break;P(x,i,h,i)}if(!i.parent&&o.isOnEOF()){var D=o.readEOFTokenRange();D.end<=i.end&&_&&N(D,l.getLineAndCharacterOfPosition(D.pos).line,i,_,f,d,a,h)}function S(a,s,c,u,_,d,p,f){var y=a.getStart(l),h=l.getLineAndCharacterOfPosition(y).line,x=h;a.decorators&&(x=l.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(a,l)).line);var D=-1;if(p&&e.rangeContainsRange(r,c)&&-1!==(D=function(r,n,i,a,o){if(e.rangeOverlapsWithStartEnd(a,r,n)||e.rangeContainsStartEnd(a,r,n)){if(-1!==o)return o}else{var s=l.getLineAndCharacterOfPosition(r).line,c=e.getLineStartPositionForPosition(r,l),u=t.SmartIndenter.findFirstNonWhitespaceColumn(c,r,l,g);if(s!==i||r===u){var _=t.SmartIndenter.getBaseIndentation(g);return _>u?_:u}}return-1}(y,a.end,_,r,s))&&(s=D),!e.rangeOverlapsWithStartEnd(r,a.pos,a.end))return a.endy)break;P(S,i,u,i)}if(!o.isOnToken())return s;if(e.isToken(a)&&11!==a.kind){var S=o.readTokenInfo(a);return e.Debug.assert(S.token.end===a.end,"Token end is child end"),P(S,i,u,a),s}var T=156===a.kind?h:d,E=function(e,r,n,i,a,o){var s=t.SmartIndenter.shouldIndentChildNode(g,e)?g.indentSize:0;return o===r?{indentation:r===m?v:a.getIndentation(),delta:Math.min(g.indentSize,a.getDelta(e)+s)}:-1===n?20===e.kind&&r===m?{indentation:v,delta:a.getDelta(e)}:t.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(i,e,r,l)?{indentation:a.getIndentation(),delta:s}:t.SmartIndenter.argumentStartsOnSameLineAsPreviousArgument(i,e,r,l)?{indentation:a.getIndentation(),delta:s}:{indentation:a.getIndentation()+a.getDelta(e),delta:s}:{indentation:n,delta:s}}(a,h,D,i,u,T);(n(a,b,h,x,E.indentation,E.delta),11===a.kind)&&F({pos:a.getStart(),end:a.getEnd()},E.indentation,!0,!1);return b=i,f&&191===c.kind&&-1===s&&(s=E.indentation),s}function P(t,n,i,a,s){e.Debug.assert(e.rangeContainsRange(n,t.token));var c=o.lastTrailingTriviaWasNewLine(),d=!1;t.leadingTrivia&&C(t.leadingTrivia,n,b,i);var p=0,f=e.rangeContainsRange(r,t.token),g=l.getLineAndCharacterOfPosition(t.token.pos);if(f){var y=u(t.token),h=_;if(p=k(t.token,g,n,b,i),!y)if(0===p){var x=h&&l.getLineAndCharacterOfPosition(h.end).line;d=c&&g.line!==x}else d=1===p}if(t.trailingTrivia&&C(t.trailingTrivia,n,b,i),d){var D=f&&!u(t.token)?i.getIndentationForToken(g.line,t.token.kind,a,!!s):-1,S=!0;if(t.leadingTrivia){var T=i.getIndentationForComment(t.token.kind,D,a);S=E(t.leadingTrivia,T,S,(function(e){return A(e.pos,T,!1)}))}-1!==D&&S&&(A(t.token.pos,D,1===p),m=g.line,v=D)}o.advance(),b=n}}(n,n,x,D,i,a)}if(!o.isOnToken()){var S=o.getCurrentLeadingTrivia();S&&(E(S,i,!1,(function(e){return k(e,l.getLineAndCharacterOfPosition(e.pos),n,n,void 0)})),function(){var e=_?_.end:r.pos,t=l.getLineAndCharacterOfPosition(e).line,n=l.getLineAndCharacterOfPosition(r.end).line;P(t,n+1,_)}())}return b;function T(r,n,i,a){return{getIndentationForComment:function(e,t,r){switch(e){case 19:case 23:case 21:return i+o(r)}return-1!==t?t:i},getIndentationForToken:function(t,a,s,c){return!c&&function(t,i,a){switch(i){case 18:case 19:case 21:case 86:case 110:case 59:return!1;case 43:case 31:switch(a.kind){case 266:case 267:case 265:return!1}break;case 22:case 23:if(185!==a.kind)return!1}return n!==t&&!(r.decorators&&i===function(t){if(t.modifiers&&t.modifiers.length)return t.modifiers[0].kind;switch(t.kind){case 244:return 79;case 245:return 113;case 243:return 93;case 247:return 247;case 162:return 130;case 163:return 141;case 160:if(t.asteriskToken)return 41;case 158:case 155:var r=e.getNameOfDeclaration(t);if(r)return r.kind}}(r))}(t,a,s)?i+o(s):i},getIndentation:function(){return i},getDelta:o,recomputeIndentation:function(e){r.parent&&t.SmartIndenter.shouldIndentChildNode(g,r.parent,r,l)&&(i+=e?g.indentSize:-g.indentSize,a=t.SmartIndenter.shouldIndentChildNode(g,r)?g.indentSize:0)}};function o(e){return t.SmartIndenter.nodeWillIndentChild(g,r,e,l,!0)?a:0}}function E(t,n,i,a){for(var o=0,s=t;o0){var S=p(D,g);O(b,x.character,S)}else I(b,x.character)}}}}else i||A(r.pos,n,!1)}function P(t,r,n){for(var i=t;io)){var s=w(a,o);-1!==s&&(e.Debug.assert(s===a||!e.isWhiteSpaceSingleLine(l.text.charCodeAt(s-1))),I(s,o+1-s))}}}function w(t,r){for(var n=r;n>=t&&e.isWhiteSpaceSingleLine(l.text.charCodeAt(n));)n--;return n!==r?n+1:-1}function I(t,r){r&&b.push(e.createTextChangeFromStartLength(t,r,""))}function O(t,r,n){(r||n)&&b.push(e.createTextChangeFromStartLength(t,r,n))}}function p(t,r){if((!i||i.tabSize!==r.tabSize||i.indentSize!==r.indentSize)&&(i={tabSize:r.tabSize,indentSize:r.indentSize},a=o=void 0),r.convertTabsToSpaces){var n=void 0,s=Math.floor(t/r.indentSize),c=t%r.indentSize;return o||(o=[]),void 0===o[s]?(n=e.repeatString(" ",r.indentSize*s),o[s]=n):n=o[s],c?n+e.repeatString(" ",c):n}var u=Math.floor(t/r.tabSize),l=t-u*r.tabSize,_=void 0;return a||(a=[]),void 0===a[u]?a[u]=_=e.repeatString("\t",u):_=a[u],l?_+e.repeatString(" ",l):_}t.createTextRangeWithKind=function(t,r,n){var i={pos:t,end:r,kind:n};return e.Debug.isDebugging&&Object.defineProperty(i,"__debugKind",{get:function(){return e.Debug.formatSyntaxKind(n)}}),i},function(e){e[e.Unknown=-1]="Unknown"}(r||(r={})),t.formatOnEnter=function(t,r,n){var i=r.getLineAndCharacterOfPosition(t).line;if(0===i)return[];for(var a=e.getEndLinePosition(i,r);e.isWhiteSpaceSingleLine(r.text.charCodeAt(a));)a--;return e.isLineBreak(r.text.charCodeAt(a))&&a--,_({pos:e.getStartPositionOfLine(i-1,r),end:a+1},r,n,2)},t.formatOnSemicolon=function(e,t,r){return l(c(s(e,26,t)),t,r,3)},t.formatOnOpeningCurly=function(t,r,n){var i=s(t,18,r);if(!i)return[];var a=c(i.parent);return _({pos:e.getLineStartPositionForPosition(a.getStart(r),r),end:t},r,n,4)},t.formatOnClosingCurly=function(e,t,r){return l(c(s(e,19,t)),t,r,5)},t.formatDocument=function(e,t){return _({pos:0,end:e.text.length},e,t,0)},t.formatSelection=function(t,r,n,i){return _({pos:e.getLineStartPositionForPosition(t,n),end:r},n,i,1)},t.formatNodeGivenIndentation=function(e,r,n,i,a,o){var s={pos:0,end:r.text.length};return t.getFormattingScanner(r.text,n,s.pos,s.end,(function(t){return d(s,e,i,a,t,o,1,(function(e){return!1}),r)}))},function(e){e[e.None=0]="None",e[e.LineAdded=1]="LineAdded",e[e.LineRemoved=2]="LineRemoved"}(n||(n={})),t.getRangeOfEnclosingComment=function(t,r,n,i){void 0===i&&(i=e.getTokenAtPosition(t,r));var a=e.findAncestor(i,e.isJSDoc);if(a&&(i=a.parent),!(i.getStart(t)<=r&&rr.end}var m=s(l,e,i),y=m.line===t.line||d(l,e,t.line,i);if(p){var h=g(e,i,u,!y);if(-1!==h)return h+n;if(-1!==(h=c(e,l,t,y,i,u)))return h+n}D(u,l,e,i,o)&&!y&&(n+=u.indentSize);var v=_(l,e,t.line,i);l=(e=l).parent,t=v?i.getLineAndCharacterOfPosition(e.getStart(i)):m}return n+a(u)}function s(e,t,r){var n=p(t,r),i=n?n.pos:e.getStart(r);return r.getLineAndCharacterOfPosition(i)}function c(t,r,n,i,a,o){return(e.isDeclaration(t)||e.isStatementButNotDeclaration(t))&&(288===r.kind||!i)?h(n,a,o):-1}function u(t,r,n,i){var a=e.findNextToken(t,r,i);return a?18===a.kind?1:19===a.kind&&n===l(a,i).line?2:0:0}function l(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function _(t,r,n,i){if(!e.isCallExpression(t)||!e.contains(t.arguments,r))return!1;var a=t.expression.getEnd();return e.getLineAndCharacterOfPosition(i,a).line===n}function d(t,r,n,i){if(226===t.kind&&t.elseStatement===r){var a=e.findChildOfKind(t,86,i);return e.Debug.assert(void 0!==a),l(a,i).line===n}return!1}function p(e,t){return e.parent&&f(e.getStart(t),e.getEnd(),e.parent,t)}function f(t,r,n,i){switch(n.kind){case 168:return a(n.typeArguments);case 192:return a(n.properties);case 191:return a(n.elements);case 172:return a(n.members);case 243:case 200:case 201:case 160:case 159:case 164:case 161:case 170:case 165:return a(n.typeParameters)||a(n.parameters);case 244:case 213:case 245:case 246:case 314:return a(n.typeParameters);case 196:case 195:return a(n.typeArguments)||a(n.arguments);case 242:return a(n.declarations);case 256:case 260:return a(n.elements);case 188:case 189:return a(n.elements)}function a(a){return a&&e.rangeContainsStartEnd(function(e,t,r){for(var n=e.getChildren(r),i=1;i=0&&r=0;o--)if(27!==t[o].kind){if(n.getLineAndCharacterOfPosition(t[o].end).line!==a.line)return h(a,n,i);a=l(t[o],n)}return-1}function h(e,t,r){var n=t.getPositionOfLineAndCharacter(e.line,0);return b(n,n+e.character,t,r)}function v(t,r,n,i){for(var a=0,o=0,s=t;sn.text.length)return a(i);if(i.indentStyle===e.IndentStyle.None)return 0;var c=e.findPrecedingToken(r,n,void 0,!0),_=t.getRangeOfEnclosingComment(n,r,c||null);if(_&&3===_.kind)return function(t,r,n,i){var a=e.getLineAndCharacterOfPosition(t,r).line-1,o=e.getLineAndCharacterOfPosition(t,i.pos).line;if(e.Debug.assert(o>=0),a<=o)return b(e.getStartPositionOfLine(o,t),r,t,n);var s=e.getStartPositionOfLine(a,t),c=v(s,r,t,n),u=c.column,l=c.character;if(0===u)return u;return 42===t.text.charCodeAt(s+l)?u-1:u}(n,r,i,_);if(!c)return a(i);if(e.isStringOrRegularExpressionOrTemplateLiteral(c.kind)&&c.getStart(n)<=r&&r0;){var a=t.text.charCodeAt(i);if(!e.isWhiteSpaceLike(a))break;i--}return b(e.getLineStartPositionForPosition(i,t),i,t,n)}(n,r,i);if(27===c.kind&&208!==c.parent.kind){var p=function(t,r,n){var i=e.findListItemInfo(t);return i&&i.listItemIndex>0?y(i.list.getChildren(),i.listItemIndex-1,r,n):-1}(c,n,i);if(-1!==p)return p}var h=function(e,t,r){return t&&f(e,e,t,r)}(r,c.parent,n);return h&&!e.rangeContainsRange(h,c)?m(h,n,i)+i.indentSize:function(t,r,n,i,s,c){var _,d=n;for(;d;){if(e.positionBelongsToNode(d,r,t)&&D(c,d,_,t,!0)){var p=l(d,t),f=u(n,d,i,t),m=0!==f?s&&2===f?c.indentSize:0:i!==p.line?c.indentSize:0;return o(d,p,void 0,m,t,!0,c)}var y=g(d,t,c,!0);if(-1!==y)return y;_=d,d=d.parent}return a(c)}(n,r,c,d,s,i)},r.getIndentationForNode=function(e,t,r,n){var i=r.getLineAndCharacterOfPosition(e.getStart(r));return o(e,i,t,0,r,!1,n)},r.getBaseIndentation=a,function(e){e[e.Unknown=0]="Unknown",e[e.OpenBrace=1]="OpenBrace",e[e.CloseBrace=2]="CloseBrace"}(i||(i={})),r.isArgumentAndStartLineOverlapsExpressionBeingCalled=_,r.childStartsOnTheSameLineWithElseInIfStatement=d,r.argumentStartsOnSameLineAsPreviousArgument=function(t,r,n,i){if(e.isCallOrNewExpression(t)){if(!t.arguments)return!1;var a=e.find(t.arguments,(function(e){return e.pos===r.pos}));if(!a)return!1;var o=t.arguments.indexOf(a);if(0===o)return!1;var s=t.arguments[o-1];if(n===e.getLineAndCharacterOfPosition(i,s.getEnd()).line)return!0}return!1},r.getContainingList=p,r.findFirstNonWhitespaceCharacterAndColumn=v,r.findFirstNonWhitespaceColumn=b,r.nodeWillIndentChild=x,r.shouldIndentChildNode=D}(t.SmartIndenter||(t.SmartIndenter={}))}(e.formatting||(e.formatting={}))}(s||(s={})),function(e){!function(n){function i(t){var r=t.__pos;return e.Debug.assert("number"==typeof r),r}function a(t,r){e.Debug.assert("number"==typeof r),t.__pos=r}function o(t){var r=t.__end;return e.Debug.assert("number"==typeof r),r}function s(t,r){e.Debug.assert("number"==typeof r),t.__end=r}var c,u;function l(t,r){return e.skipTrivia(t,r,!1,!0)}!function(e){e[e.Exclude=0]="Exclude",e[e.IncludeAll=1]="IncludeAll"}(c=n.LeadingTriviaOption||(n.LeadingTriviaOption={})),function(e){e[e.Exclude=0]="Exclude",e[e.Include=1]="Include"}(u=n.TrailingTriviaOption||(n.TrailingTriviaOption={}));var _,d={leadingTriviaOption:c.Exclude,trailingTriviaOption:u.Exclude};function p(e,t,r,n){return{pos:f(e,t,n),end:m(e,r,n)}}function f(t,r,n){var i=n.leadingTriviaOption;if(i===c.Exclude)return r.getStart(t);var a=r.getFullStart(),o=r.getStart(t);if(a===o)return o;var s=e.getLineStartPositionForPosition(a,t);if(e.getLineStartPositionForPosition(o,t)===s)return i===c.IncludeAll?a:o;var u=a>0?1:0,_=e.getStartPositionOfLine(e.getLineOfLocalPosition(t,s)+u,t);return _=l(t.text,_),e.getStartPositionOfLine(e.getLineOfLocalPosition(t,_),t)}function m(t,r,n){var i=r.end,a=n.trailingTriviaOption;if(a===u.Exclude||e.isExpression(r)&&a!==u.Include)return i;var o=e.skipTrivia(t.text,i,!0);return o===i||a!==u.Include&&!e.isLineBreak(t.text.charCodeAt(o-1))?i:o}function g(e,t){return!!t&&!!e.parent&&(27===t.kind||26===t.kind&&192===e.parent.kind)}!function(e){e[e.Remove=0]="Remove",e[e.ReplaceWithSingleNode=1]="ReplaceWithSingleNode",e[e.ReplaceWithMultipleNodes=2]="ReplaceWithMultipleNodes",e[e.Text=3]="Text"}(_||(_={})),n.isThisTypeAnnotatable=function(t){return e.isFunctionExpression(t)||e.isFunctionDeclaration(t)};var y,h,v=function(){function n(t,r){this.newLineCharacter=t,this.formatContext=r,this.changes=[],this.newFiles=[],this.classesWithNodesInsertedAtStart=e.createMap(),this.deletedNodes=[]}return n.fromContext=function(t){return new n(e.getNewLineOrDefaultFromHost(t.host,t.formatContext.options),t.formatContext)},n.with=function(e,t){var r=n.fromContext(e);return t(r),r.getChanges()},n.prototype.pushRaw=function(t,r){e.Debug.assertEqual(t.fileName,r.fileName);for(var n=0,i=r.textChanges;n"})},n.prototype.getOptionsForInsertNodeBefore=function(t,r){return e.isStatement(t)||e.isClassElement(t)?{suffix:r?this.newLineCharacter+this.newLineCharacter:this.newLineCharacter}:e.isVariableDeclaration(t)?{suffix:", "}:e.isParameter(t)?{}:e.isStringLiteral(t)&&e.isImportDeclaration(t.parent)||e.isNamedImports(t)?{suffix:", "}:e.Debug.failBadSyntaxKind(t)},n.prototype.insertNodeAtConstructorStart=function(r,n,i){var a=e.firstOrUndefined(n.body.statements);a&&n.body.multiLine?this.insertNodeBefore(r,a,i):this.replaceConstructorBody(r,n,t([i],n.body.statements))},n.prototype.insertNodeAtConstructorEnd=function(r,n,i){var a=e.lastOrUndefined(n.body.statements);a&&n.body.multiLine?this.insertNodeAfter(r,a,i):this.replaceConstructorBody(r,n,t(n.body.statements,[i]))},n.prototype.replaceConstructorBody=function(t,r,n){this.replaceNode(t,r.body,e.createBlock(n,!0))},n.prototype.insertNodeAtEndOfScope=function(t,r,n){var i=f(t,r.getLastToken(),{});this.insertNodeAt(t,i,n,{prefix:e.isLineBreak(t.text.charCodeAt(r.getLastToken().pos))?this.newLineCharacter:this.newLineCharacter+this.newLineCharacter,suffix:this.newLineCharacter})},n.prototype.insertNodeAtClassStart=function(e,t,r){this.insertNodeAtStartWorker(e,t,r)},n.prototype.insertNodeAtObjectStart=function(e,t,r){this.insertNodeAtStartWorker(e,t,r)},n.prototype.insertNodeAtStartWorker=function(t,n,i){var a=n.getStart(t),o=e.formatting.SmartIndenter.findFirstNonWhitespaceColumn(e.getLineStartPositionForPosition(a,t),a,t,this.formatContext.options)+this.formatContext.options.indentSize;this.insertNodeAt(t,D(n).pos,i,r({indentation:o},this.getInsertNodeAtStartPrefixSuffix(t,n)))},n.prototype.getInsertNodeAtStartPrefixSuffix=function(r,n){var i=e.isObjectLiteralExpression(n)?",":"";if(0===D(n).length){if(e.addToSeen(this.classesWithNodesInsertedAtStart,e.getNodeId(n),{node:n,sourceFile:r})){var a=e.positionsAreOnSameLine.apply(void 0,t(x(n,r),[r]));return{prefix:this.newLineCharacter,suffix:i+(a?this.newLineCharacter:"")}}return{prefix:"",suffix:i+this.newLineCharacter}}return{prefix:this.newLineCharacter,suffix:i}},n.prototype.insertNodeAfterComma=function(e,t,r){var n=this.insertNodeAfterWorker(e,this.nextCommaToken(e,t)||t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},n.prototype.insertNodeAfter=function(e,t,r){var n=this.insertNodeAfterWorker(e,t,r);this.insertNodeAt(e,n,r,this.getInsertNodeAfterOptions(e,t))},n.prototype.insertNodeAtEndOfList=function(e,t,r){this.insertNodeAt(e,t.end,r,{prefix:", "})},n.prototype.insertNodesAfter=function(t,r,n){var i=this.insertNodeAfterWorker(t,r,e.first(n));this.insertNodesAt(t,i,n,this.getInsertNodeAfterOptions(t,r))},n.prototype.insertNodeAfterWorker=function(t,r,n){var i,a;return i=r,a=n,((e.isPropertySignature(i)||e.isPropertyDeclaration(i))&&e.isClassOrTypeElement(a)&&153===a.name.kind||e.isStatementButNotDeclaration(i)&&e.isStatementButNotDeclaration(a))&&59!==t.text.charCodeAt(r.end-1)&&this.replaceRange(t,e.createRange(r.end),e.createToken(26)),m(t,r,{})},n.prototype.getInsertNodeAfterOptions=function(t,n){var i=this.getInsertNodeAfterOptionsWorker(n);return r(r({},i),{prefix:n.end===t.end&&e.isStatement(n)?i.prefix?"\n"+i.prefix:"\n":i.prefix})},n.prototype.getInsertNodeAfterOptionsWorker=function(t){switch(t.kind){case 244:case 248:return{prefix:this.newLineCharacter,suffix:this.newLineCharacter};case 241:case 10:case 75:return{prefix:", "};case 279:return{suffix:","+this.newLineCharacter};case 88:return{prefix:" "};case 155:return{};default:return e.Debug.assert(e.isStatement(t)||e.isClassOrTypeElement(t)),{suffix:this.newLineCharacter}}},n.prototype.insertName=function(t,r,n){if(e.Debug.assert(!r.name),201===r.kind){var i=e.findChildOfKind(r,38,t),a=e.findChildOfKind(r,20,t);a?(this.insertNodesAt(t,a.getStart(t),[e.createToken(93),e.createIdentifier(n)],{joiner:" "}),k(this,t,i)):(this.insertText(t,e.first(r.parameters).getStart(t),"function "+n+"("),this.replaceRange(t,i,e.createToken(21))),222!==r.body.kind&&(this.insertNodesAt(t,r.body.getStart(t),[e.createToken(18),e.createToken(100)],{joiner:" ",suffix:" "}),this.insertNodesAt(t,r.body.end,[e.createToken(26),e.createToken(19)],{joiner:" "}))}else{var o=e.findChildOfKind(r,200===r.kind?93:79,t).end;this.insertNodeAt(t,o,e.createIdentifier(n),{prefix:" "})}},n.prototype.insertExportModifier=function(e,t){this.insertText(e,t.getStart(e),"export ")},n.prototype.insertNodeInListAfter=function(t,r,n,i){if(void 0===i&&(i=e.formatting.SmartIndenter.getContainingList(r,t)),i){var a=e.indexOfNode(i,r);if(!(a<0)){var o=r.getEnd();if(a!==i.length-1){var s=e.getTokenAtPosition(t,r.end);if(s&&g(r,s)){var c=e.getLineAndCharacterOfPosition(t,l(t.text,i[a+1].getFullStart())),u=e.getLineAndCharacterOfPosition(t,s.end),_=void 0,d=void 0;u.line===c.line?(d=s.end,_=function(e){for(var t="",r=0;r=0;n--){var i=r[n],a=i.span,o=i.newText;t=""+t.substring(0,a.start)+o+t.substring(e.textSpanEnd(a))}return t}function T(t){var r=e.visitEachChild(t,T,e.nullTransformationContext,E,T),n=e.nodeIsSynthesized(r)?r:Object.create(r);return n.pos=i(t),n.end=o(t),n}function E(t,r,n,a,s){var c=e.visitNodes(t,r,n,a,s);if(!c)return c;var u=c===t?e.createNodeArray(c.slice(0)):c;return u.pos=i(t),u.end=o(t),u}function C(t,r){return!(e.isInComment(t,r)||e.isInString(t,r)||e.isInTemplateString(t,r)||e.isInJSXText(t,r))}function k(e,t,r,n){void 0===n&&(n={leadingTriviaOption:c.IncludeAll});var i=f(t,r,n),a=m(t,r,n);e.deleteRange(t,{pos:i,end:a})}function N(t,r,n,i){var a=e.Debug.assertDefined(e.formatting.SmartIndenter.getContainingList(i,n)),o=e.indexOfNode(a,i);e.Debug.assert(-1!==o),1!==a.length?(e.Debug.assert(!r.has(i),"Deleting a node twice"),r.add(i),t.deleteRange(n,{pos:b(n,i),end:o===a.length-1?m(n,i,{}):b(n,a[o+1])})):k(t,n,i)}n.ChangeTracker=v,n.getNewFileText=function(e,t,r,n){return y.newFileChangesWorker(void 0,t,e,r,n)},function(t){function n(t,r,n,a,o){var s=n.map((function(e){return i(e,t,a).text})).join(a),c=e.createSourceFile("any file name",s,99,!0,r);return S(s,e.formatting.formatDocument(c,o))+a}function i(t,r,n){var i=function(t){var r=0,n=e.createTextWriter(t);function i(t,i){if(i||!function(t){return e.skipTrivia(t,0)===t.length}(t)){r=n.getTextPos();for(var a=0;e.isWhiteSpaceLike(t.charCodeAt(t.length-a-1));)a++;r-=a}}return{onEmitNode:function(e,t,n){t&&a(t,r),n(e,t),t&&s(t,r)},onBeforeEmitNodeArray:function(e){e&&a(e,r)},onAfterEmitNodeArray:function(e){e&&s(e,r)},onBeforeEmitToken:function(e){e&&a(e,r)},onAfterEmitToken:function(e){e&&s(e,r)},write:function(e){n.write(e),i(e,!1)},writeComment:function(e){n.writeComment(e)},writeKeyword:function(e){n.writeKeyword(e),i(e,!1)},writeOperator:function(e){n.writeOperator(e),i(e,!1)},writePunctuation:function(e){n.writePunctuation(e),i(e,!1)},writeTrailingSemicolon:function(e){n.writeTrailingSemicolon(e),i(e,!1)},writeParameter:function(e){n.writeParameter(e),i(e,!1)},writeProperty:function(e){n.writeProperty(e),i(e,!1)},writeSpace:function(e){n.writeSpace(e),i(e,!1)},writeStringLiteral:function(e){n.writeStringLiteral(e),i(e,!1)},writeSymbol:function(e,t){n.writeSymbol(e,t),i(e,!1)},writeLine:function(){n.writeLine()},increaseIndent:function(){n.increaseIndent()},decreaseIndent:function(){n.decreaseIndent()},getText:function(){return n.getText()},rawWrite:function(e){n.rawWrite(e),i(e,!1)},writeLiteral:function(e){n.writeLiteral(e),i(e,!0)},getTextPos:function(){return n.getTextPos()},getLine:function(){return n.getLine()},getColumn:function(){return n.getColumn()},getIndent:function(){return n.getIndent()},isAtStartOfLine:function(){return n.isAtStartOfLine()},hasTrailingComment:function(){return n.hasTrailingComment()},hasTrailingWhitespace:function(){return n.hasTrailingWhitespace()},clear:function(){n.clear(),r=0}}}(n),o="\n"===n?1:0;return e.createPrinter({newLine:o,neverAsciiEscape:!0},i).writeNode(4,t,r,i),{text:i.getText(),node:T(t)}}t.getTextChangesFromChanges=function(t,n,a,o){return e.group(t,(function(e){return e.sourceFile.path})).map((function(t){for(var s=t[0].sourceFile,c=e.stableSort(t,(function(e,t){return e.range.pos-t.range.pos||e.range.end-t.range.end})),u=function(t){e.Debug.assert(c[t].range.end<=c[t+1].range.pos,"Changes overlap",(function(){return JSON.stringify(c[t].range)+" and "+JSON.stringify(c[t+1].range)}))},l=0;le.textSpanEnd(n)?"quit":e.isExpression(r)&&e.textSpansEqual(n,e.createTextSpanFromNode(r,t))}));return s&&function(t,r,n,i,a){var o=a.getDiagnosticsProducingTypeChecker().getDiagnostics(t,i);return e.some(o,(function(t){var i=t.start,a=t.length,o=t.relatedInformation,s=t.code;return e.isNumber(i)&&e.isNumber(a)&&e.textSpansEqual({start:i,length:a},n)&&s===r&&!!o&&e.some(o,(function(t){return t.code===e.Diagnostics.Did_you_forget_to_use_await.code}))}))}(t,r,n,i,a)&&l(s)?s:void 0}function l(t){return 32768&t.kind||!!e.findAncestor(t,(function(t){return t.parent&&e.isArrowFunction(t.parent)&&t.parent.body===t||e.isBlock(t)&&(243===t.parent.kind||200===t.parent.kind||201===t.parent.kind||160===t.parent.kind)}))}function _(t,r,n,o,s,c){if(e.isBinaryExpression(s))for(var u=0,l=[s.left,s.right];u0)return[t.createCodeFixAction(r,a,e.Diagnostics.Add_const_to_unresolved_variable,r,e.Diagnostics.Add_const_to_all_unresolved_variables)]},fixIds:[r],getAllCodeActions:function(r){var a=new e.NodeSet;return t.codeFixAll(r,n,(function(e,t){return i(e,t.file,t.start,r.program,a)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addMissingDeclareProperty",n=[e.Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code];function i(t,r,n,i){var a=e.getTokenAtPosition(r,n);if(e.isIdentifier(a)){var o=a.parent;158!==o.kind||i&&!i.tryAdd(o)||t.insertModifierBefore(r,129,o)}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));if(a.length>0)return[t.createCodeFixAction(r,a,e.Diagnostics.Prefix_with_declare,r,e.Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)]},fixIds:[r],getAllCodeActions:function(r){var a=new e.NodeSet;return t.codeFixAll(r,n,(function(e,t){return i(e,t.file,t.start,a)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addMissingInvocationForDecorator",n=[e.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n),a=e.findAncestor(i,e.isDecorator);e.Debug.assert(!!a,"Expected position to be owned by a decorator.");var o=e.createCall(a.expression,void 0,void 0);t.replaceNode(r,a.expression,o)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Call_decorator_expression,r,e.Diagnostics.Add_to_all_uncalled_decorators)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="addNameToNamelessParameter",n=[e.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];function i(t,r,n){var i=e.getTokenAtPosition(r,n);if(!e.isIdentifier(i))return e.Debug.fail("add-name-to-nameless-parameter operates on identifiers, but got a "+e.Debug.formatSyntaxKind(i.kind));var a=i.parent;if(!e.isParameter(a))return e.Debug.fail("Tried to add a parameter name to a non-parameter: "+e.Debug.formatSyntaxKind(i.kind));var o=a.parent.parameters.indexOf(a);e.Debug.assert(!a.type,"Tried to add a parameter name to a parameter that already had one."),e.Debug.assert(o>-1,"Parameter not found in parent parameter list.");var s=e.createParameter(void 0,a.modifiers,a.dotDotDotToken,"arg"+o,a.questionToken,e.createTypeReferenceNode(i,void 0),a.initializer);t.replaceNode(r,i,s)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span.start)}));return[t.createCodeFixAction(r,a,e.Diagnostics.Add_parameter_name,r,e.Diagnostics.Add_names_to_all_parameters_without_names)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t.start)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="annotateWithTypeFromJSDoc",n=[e.Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.tryCast(e.isParameter(n.parent)?n.parent.parent:n.parent,a)}function a(t){return function(t){return e.isFunctionLikeDeclaration(t)||241===t.kind||157===t.kind||158===t.kind}(t)&&o(t)}function o(t){return e.isFunctionLikeDeclaration(t)?t.parameters.some(o)||!t.type&&!!e.getJSDocReturnType(t):!t.type&&!!e.getJSDocType(t)}function s(t,r,n){if(e.isFunctionLikeDeclaration(n)&&(e.getJSDocReturnType(n)||n.parameters.some((function(t){return!!e.getJSDocType(t)})))){if(!n.typeParameters){var i=e.getJSDocTypeParameterDeclarations(n);i.length&&t.insertTypeParameters(r,n,i)}var a=e.isArrowFunction(n)&&!e.findChildOfKind(n,20,r);a&&t.insertNodeBefore(r,e.first(n.parameters),e.createToken(20));for(var o=0,s=n.parameters;o0)return C;var k=m(o.checker.getTypeAtLocation(t),o.checker).getReturnType(),N=e.getSynthesizedDeepClone(h),A=o.checker.getPromisedTypeOfPromise(k)?e.createAwait(N):N;if(c)return[e.createReturn(A)];var F=p(r,A,o);return r&&r.types.push(k),F;default:a=!1}return e.emptyArray}function m(t,r){var n=r.getSignaturesOfType(t,0);return e.lastOrUndefined(n)}function g(t,r,n){for(var i=[],a=0,o=r;a0)return}else e.isFunctionLike(a)||e.forEachChild(a,r)}))}return i}function y(t,r){var n,i=0,a=[];e.isFunctionLikeDeclaration(t)?t.parameters.length>0&&(n=function t(r){if(e.isIdentifier(r))return o(r);var n=e.flatMap(r.elements,(function(r){return e.isOmittedExpression(r)?[]:[t(r.name)]}));return function(t,r,n){void 0===r&&(r=e.emptyArray);void 0===n&&(n=[]);return{kind:1,bindingPattern:t,elements:r,types:n}}(r,n)}(t.parameters[0].name)):e.isIdentifier(t)&&(n=o(t));if(n&&!("identifier"in n&&"undefined"===n.identifier.text))return n;function o(t){var n=function(e){return e.symbol?e.symbol:r.checker.getSymbolAtLocation(e)}(function(e){return e.original?e.original:e}(t));return n&&r.synthNamesMap.get(e.getSymbolId(n).toString())||b(t,a,i)}}function h(t){return!t||(x(t)?!t.identifier.text:e.every(t.elements,h))}function v(e){return x(e)?e.identifier:e.bindingPattern}function b(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=0),{kind:0,identifier:e,types:t,numberOfAssignmentsOriginal:r}}function x(e){return 0===e.kind}t.registerCodeFix({errorCodes:i,getCodeActions:function(r){a=!0;var i=e.textChanges.ChangeTracker.with(r,(function(e){return o(e,r.sourceFile,r.span.start,r.program.getTypeChecker(),r)}));return a?[t.createCodeFixAction(n,i,e.Diagnostics.Convert_to_async_function,n,e.Diagnostics.Convert_all_to_async_functions)]:[]},fixIds:[n],getAllCodeActions:function(e){return t.codeFixAll(e,i,(function(t,r){return o(t,r.file,r.start,e.program.getTypeChecker(),e)}))}}),function(e){e[e.Identifier=0]="Identifier",e[e.BindingPattern=1]="BindingPattern"}(r||(r={}))}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){function r(t,r,n,i){for(var a=0,o=t.imports;a1?[[a(n),o(n)],!0]:[[o(n)],!0]:[[a(n)],!1]}(l.arguments[0],r):void 0;return _?(i.replaceNodeWithNodes(t,n.parent,_[0]),_[1]):(i.replaceRangeWithText(t,e.createRange(c.getStart(t),l.pos),"export default"),!0)}i.delete(t,n.parent)}else e.isExportsOrModuleExportsOrAlias(t,c.expression)&&function(t,r,n,i){var a=r.left.name.text,o=i.get(a);if(void 0!==o){var s=[d(void 0,o,r.right),p([e.createExportSpecifier(o,a)])];n.replaceNodeWithNodes(t,r.parent,s)}else!function(t,r,n){var i=t.left,a=t.right,o=t.parent,s=i.name.text;if(!(e.isFunctionExpression(a)||e.isArrowFunction(a)||e.isClassExpression(a))||a.name&&a.name.text!==s)n.replaceNodeRangeWithNodes(r,i.expression,e.findChildOfKind(i,24,r),[e.createToken(88),e.createToken(80)],{joiner:" ",suffix:" "});else{n.replaceRange(r,{pos:i.getStart(r),end:a.getStart(r)},e.createToken(88),{suffix:" "}),a.name||n.insertName(r,a,s);var c=e.findChildOfKind(o,26,r);c&&n.delete(r,c)}}(r,t,n)}(t,n,i,s);var f,m;return!1}(r,i,h,c,g)}default:return!1}}function a(e){return p(void 0,e)}function o(t){return p([e.createExportSpecifier(void 0,"default")],t)}function s(e,t){for(;t.original.has(e)||t.additional.has(e);)e="_"+e;return t.additional.set(e,!0),e}function c(t){var r=e.createMultiMap();return function t(r,n){e.isIdentifier(r)&&function(e){var t=e.parent;switch(t.kind){case 193:return t.name!==e;case 190:case 257:return t.propertyName!==e;default:return!0}}(r)&&n(r);r.forEachChild((function(e){return t(e,n)}))}(t,(function(e){return r.add(e.text,e)})),r}function u(t,r,n){return e.createFunctionDeclaration(e.getSynthesizedDeepClones(n.decorators),e.concatenate(r,e.getSynthesizedDeepClones(n.modifiers)),e.getSynthesizedDeepClone(n.asteriskToken),t,e.getSynthesizedDeepClones(n.typeParameters),e.getSynthesizedDeepClones(n.parameters),e.getSynthesizedDeepClone(n.type),e.convertToFunctionBody(e.getSynthesizedDeepClone(n.body)))}function l(t,r,n,i){return"default"===r?e.makeImport(e.createIdentifier(t),void 0,n,i):e.makeImport(void 0,[_(r,t)],n,i)}function _(t,r){return e.createImportSpecifier(void 0!==t&&t!==r?e.createIdentifier(t):void 0,e.createIdentifier(r))}function d(t,r,n){return e.createVariableStatement(t,e.createVariableDeclarationList([e.createVariableDeclaration(r,void 0,n)],2))}function p(t,r){return e.createExportDeclaration(void 0,void 0,t&&e.createNamedExports(t),void 0===r?void 0:e.createLiteral(r))}t.registerCodeFix({errorCodes:[e.Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module.code],getCodeActions:function(a){var o=a.sourceFile,u=a.program,l=a.preferences,_=e.textChanges.ChangeTracker.with(a,(function(t){if(function(t,r,a,o,u){var l={original:c(t),additional:e.createMap()},_=function(t,r,i){var a=e.createMap();return n(t,(function(t){var n=t.name,o=n.text,c=n.originalKeywordKind;!a.has(o)&&(void 0!==c&&e.isNonContextualKeyword(c)||r.resolveName(t.name.text,t,111551,!0))&&a.set(o,s("_"+o,i))})),a}(t,r,l);!function(t,r,i){n(t,(function(n,a){if(!a){var o=n.name.text;i.replaceNode(t,n,e.createIdentifier(r.get(o)||o))}}))}(t,_,a);for(var d=!1,p=0,f=t.statements;p=e.ModuleKind.ES2015)return 1;if(e.isInJSFile(t))return e.isExternalModule(t)?1:4;for(var i=0,a=t.statements;i0&&(!e.isIdentifier(n.name)||e.FindAllReferences.Core.isSymbolReferencedInFile(n.name,i,r))?n.modifiers.forEach((function(e){t.deleteModifier(r,e)})):(t.delete(r,n),function(t,r,n,i,a){e.FindAllReferences.Core.eachSignatureCall(n.parent,i,a,(function(e){var i=n.parent.parameters.indexOf(n);e.arguments.length>i&&t.delete(r,e.arguments[i])}))}(t,r,n,a,i)))}t.registerCodeFix({errorCodes:o,getCodeActions:function(i){var o=i.errorCode,m=i.sourceFile,g=i.program,y=g.getTypeChecker(),h=g.getSourceFiles(),v=e.getTokenAtPosition(m,i.span.start);if(e.isJSDocTemplateTag(v))return[c(e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,v)})),e.Diagnostics.Remove_template_tag)];if(29===v.kind)return[c(T=e.textChanges.ChangeTracker.with(i,(function(e){return u(e,m,v)})),e.Diagnostics.Remove_type_parameters)];var b=l(v);if(b)return[c(T=e.textChanges.ChangeTracker.with(i,(function(e){return e.delete(m,b)})),[e.Diagnostics.Remove_import_from_0,e.showModuleSpecifier(b)])];var x=e.textChanges.ChangeTracker.with(i,(function(e){return _(v,e,m,y,h,!1)}));if(x.length)return[c(x,e.Diagnostics.Remove_destructuring)];var D=e.textChanges.ChangeTracker.with(i,(function(e){return d(m,v,e)}));if(D.length)return[c(D,e.Diagnostics.Remove_variable_statement)];var S=[];if(131===v.kind){var T=e.textChanges.ChangeTracker.with(i,(function(e){return s(e,m,v)})),E=e.cast(v.parent,e.isInferTypeNode).typeParameter.name.text;S.push(t.createCodeFixAction(r,T,[e.Diagnostics.Replace_infer_0_with_unknown,E],a,e.Diagnostics.Replace_all_unused_infer_with_unknown))}else{var C=e.textChanges.ChangeTracker.with(i,(function(e){return f(m,v,e,y,h,!1)}));if(C.length){E=e.isComputedPropertyName(v.parent)?v.parent:v;S.push(c(C,[e.Diagnostics.Remove_declaration_for_Colon_0,E.getText(m)]))}}var k=e.textChanges.ChangeTracker.with(i,(function(e){return p(e,o,m,v)}));return k.length&&S.push(t.createCodeFixAction(r,k,[e.Diagnostics.Prefix_0_with_an_underscore,v.getText(m)],n,e.Diagnostics.Prefix_all_unused_declarations_with_where_possible)),S},fixIds:[n,i,a],getAllCodeActions:function(r){var c=r.sourceFile,m=r.program,g=m.getTypeChecker(),y=m.getSourceFiles();return t.codeFixAll(r,o,(function(t,o){var m=e.getTokenAtPosition(c,o.start);switch(r.fixId){case n:p(t,o.code,c,m);break;case i:if(131===m.kind)break;var h=l(m);h?t.delete(c,h):e.isJSDocTemplateTag(m)?t.delete(c,m):29===m.kind?u(t,c,m):_(m,t,c,g,y,!0)||d(c,m,t)||f(c,m,t,g,y,!0);break;case a:131===m.kind&&s(t,c,m);break;default:e.Debug.fail(JSON.stringify(r.fixId))}}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixUnreachableCode",n=[e.Diagnostics.Unreachable_code_detected.code];function i(t,r,n,i){var a=e.getTokenAtPosition(r,n),o=e.findAncestor(a,e.isStatement);e.Debug.assert(o.getStart(r)===a.getStart(r),"token and statement should start at the same point");var s=(e.isBlock(o.parent)?o.parent:o).parent;if(!e.isBlock(o.parent)||o===e.first(o.parent.statements))switch(s.kind){case 226:if(s.elseStatement){if(e.isBlock(o.parent))break;return void t.replaceNode(r,o,e.createBlock(e.emptyArray))}case 228:case 229:return void t.delete(r,s)}if(e.isBlock(o.parent)){var c=n+i,u=e.Debug.assertDefined(function(e,t){for(var r,n=0,i=e;nC.length)A(l.getSignatureFromDeclaration(u[u.length-1]),f,d,o(s));else e.Debug.assert(u.length===C.length,"Declarations and signatures should match count"),c(function(t,r,n,i,s){for(var c=t[0],u=t[0].minArgumentCount,l=!1,_=0,d=t;_=c.parameters.length&&(!e.signatureHasRestParameter(p)||e.signatureHasRestParameter(c))&&(c=p)}var f=c.parameters.length-(e.signatureHasRestParameter(c)?1:0),m=c.parameters.map((function(e){return e.name})),g=a(f,m,void 0,u,!1);if(l){var y=e.createArrayTypeNode(e.createKeywordTypeNode(124)),h=e.createParameter(void 0,void 0,e.createToken(25),m[f]||"rest",f>=u?e.createToken(57):void 0,y,void 0);g.push(h)}return function(t,r,n,i,a,s,c){return e.createMethod(void 0,t,void 0,r,n?e.createToken(57):void 0,i,a,s,o(c))}(i,r,n,void 0,g,void 0,s)}(C,d,g,f,s))}}function A(t,a,o,s){var u=function(t,r,i,a,o,s,c){var u=t.program.getTypeChecker().signatureToSignatureDeclaration(r,160,i,257,n(t));if(!u)return;return u.decorators=void 0,u.modifiers=a,u.name=o,u.questionToken=s?e.createToken(57):void 0,u.body=c,u}(i,t,r,a,o,g,s);u&&c(u)}}function a(t,r,n,i,a){for(var o=[],s=0;s=i?e.createToken(57):void 0,a?void 0:n&&n[s]||e.createKeywordTypeNode(124),void 0);o.push(c)}return o}function o(t){return e.createBlock([e.createThrow(e.createNew(e.createIdentifier("Error"),void 0,[e.createLiteral("Method not implemented.","single"===t.quotePreference)]))],!0)}function s(t,r){return e.createPropertyAssignment(e.createStringLiteral(t),r)}function c(t,r){return e.find(t.properties,(function(t){return e.isPropertyAssignment(t)&&!!t.name&&e.isStringLiteral(t.name)&&t.name.text===r}))}t.createMissingMemberNodes=function(e,t,r,n,a){for(var o=e.symbol.members,s=0,c=t;s0)return[t.createCodeFixAction(r,a,e.Diagnostics.Convert_to_a_bigint_numeric_literal,r,e.Diagnostics.Convert_all_to_bigint_numeric_literals)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixAddModuleReferTypeMissingTypeof",n=[e.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];function i(t,r){var n=e.getTokenAtPosition(t,r);return e.Debug.assert(95===n.kind,"This token should be an ImportKeyword"),e.Debug.assert(187===n.parent.kind,"Token parent should be an ImportType"),n.parent}function a(t,r,n){var i=e.updateImportTypeNode(n,n.argument,n.qualifier,n.typeArguments,!0);t.replaceNode(r,n,i)}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var o=n.sourceFile,s=n.span,c=i(o,s.start),u=e.textChanges.ChangeTracker.with(n,(function(e){return a(e,o,c)}));return[t.createCodeFixAction(r,u,e.Diagnostics.Add_missing_typeof,r,e.Diagnostics.Add_missing_typeof)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(t,r){return a(t,e.sourceFile,i(r.file,r.start))}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(r){var n="fixConvertToMappedObjectType",i=[e.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead.code];function a(t,r){var n=e.getTokenAtPosition(t,r),i=e.cast(n.parent.parent,e.isIndexSignatureDeclaration);if(!e.isClassDeclaration(i.parent))return{indexSignature:i,container:e.isInterfaceDeclaration(i.parent)?i.parent:e.cast(i.parent.parent,e.isTypeAliasDeclaration)}}function o(r,n,i){var a=i.indexSignature,o=i.container,s=(e.isInterfaceDeclaration(o)?o.members:o.type.members).filter((function(t){return!e.isIndexSignatureDeclaration(t)})),c=e.first(a.parameters),u=e.createTypeParameterDeclaration(e.cast(c.name,e.isIdentifier),c.type),l=e.createMappedTypeNode(e.hasReadonlyModifier(a)?e.createModifier(137):void 0,u,a.questionToken,a.type),_=e.createIntersectionTypeNode(t(e.getAllSuperTypeNodes(o),[l],s.length?[e.createTypeLiteralNode(s)]:e.emptyArray));r.replaceNode(n,o,function(t,r){return e.createTypeAliasDeclaration(t.decorators,t.modifiers,t.name,t.typeParameters,r)}(o,_))}r.registerCodeFix({errorCodes:i,getCodeActions:function(t){var i=t.sourceFile,s=t.span,c=a(i,s.start);if(c){var u=e.textChanges.ChangeTracker.with(t,(function(e){return o(e,i,c)})),l=e.idText(c.container.name);return[r.createCodeFixAction(n,u,[e.Diagnostics.Convert_0_to_mapped_object_type,l],n,[e.Diagnostics.Convert_0_to_mapped_object_type,l])]}},fixIds:[n],getAllCodeActions:function(e){return r.codeFixAll(e,i,(function(e,t){var r=a(t.file,t.start);r&&o(e,t.file,r)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="removeUnnecessaryAwait",n=[e.Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code];function i(t,r,n){var i=e.tryCast(e.getTokenAtPosition(r,n.start),(function(e){return 126===e.kind})),a=i&&e.tryCast(i.parent,e.isAwaitExpression);if(a){var o=a;if(e.isParenthesizedExpression(a.parent)){var s=e.getLeftmostExpression(a.expression,!1);if(e.isIdentifier(s)){var c=e.findPrecedingToken(a.parent.pos,r);c&&98!==c.kind&&(o=a.parent)}}t.replaceNode(r,o,a.expression)}}t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var a=e.textChanges.ChangeTracker.with(n,(function(e){return i(e,n.sourceFile,n.span)}));if(a.length>0)return[t.createCodeFixAction(r,a,e.Diagnostics.Remove_unnecessary_await,r,e.Diagnostics.Remove_all_unnecessary_uses_of_await)]},fixIds:[r],getAllCodeActions:function(e){return t.codeFixAll(e,n,(function(e,t){return i(e,t.file,t)}))}})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){var r="fixConvertConstToLet",n=[e.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];t.registerCodeFix({errorCodes:n,getCodeActions:function(n){var i=n.sourceFile,a=n.span,o=n.program,s=function(t,r,n){var i=e.getTokenAtPosition(t,r),a=n.getTypeChecker().getSymbolAtLocation(i);if(a)return a.valueDeclaration.parent.parent}(i,a.start,o),c=e.textChanges.ChangeTracker.with(n,(function(e){return function(e,t,r){if(!r)return;var n=r.getStart();e.replaceRangeWithText(t,{pos:n,end:n+5},"let")}(e,i,s)}));return[t.createCodeFixAction(r,c,e.Diagnostics.Convert_const_to_let,r,e.Diagnostics.Convert_const_to_let)]},fixIds:[r]})}(e.codefix||(e.codefix={}))}(s||(s={})),function(e){!function(t){function r(t){var r=t.file,n=e.getRefactorContextSpan(t),i=e.getTokenAtPosition(r,n.start),a=e.getParentNodeInSpan(i,r,n);if(a&&(e.isSourceFile(a.parent)||e.isModuleBlock(a.parent)&&e.isAmbientModule(a.parent.parent))){var o=e.isSourceFile(a.parent)?a.parent.symbol:a.parent.parent.symbol,s=e.getModifierFlags(a),c=!!(512&s);if(1&s&&(c||!o.exports.has("default")))switch(a.kind){case 243:case 244:case 245:case 247:case 246:case 248:var u=a;return u.name&&e.isIdentifier(u.name)?{exportNode:u,exportName:u.name,wasDefault:c,exportingModuleSymbol:o}:void 0;case 224:var l=a;if(!(2&l.declarationList.flags)||1!==l.declarationList.declarations.length)return;var _=e.first(l.declarationList.declarations);if(!_.initializer)return;return e.Debug.assert(!c,"Can't have a default flag here"),e.isIdentifier(_.name)?{exportNode:l,exportName:_.name,wasDefault:c,exportingModuleSymbol:o}:void 0;default:return}}}function n(t,r){return e.createImportSpecifier(t===r?void 0:e.createIdentifier(t),e.createIdentifier(r))}t.registerRefactor("Convert export",{getAvailableActions:function(t){var n=r(t);if(!n)return e.emptyArray;var i=n.wasDefault?e.Diagnostics.Convert_default_export_to_named_export.message:e.Diagnostics.Convert_named_export_to_default_export.message;return[{name:"Convert export",description:i,actions:[{name:n.wasDefault?"Convert default export to named export":"Convert named export to default export",description:i}]}]},getEditsForAction:function(t,i){return e.Debug.assert("Convert default export to named export"===i||"Convert named export to default export"===i,"Unexpected action name"),{edits:e.textChanges.ChangeTracker.with(t,(function(i){return a=t.file,o=t.program,s=e.Debug.assertDefined(r(t),"context must have info"),c=i,u=t.cancellationToken,function(t,r,n,i){var a=r.wasDefault,o=r.exportNode,s=r.exportName;if(a)n.delete(t,e.Debug.assertDefined(e.findModifier(o,83),"Should find a default keyword in modifier list"));else{var c=e.Debug.assertDefined(e.findModifier(o,88),"Should find an export keyword in modifier list");switch(o.kind){case 243:case 244:case 245:n.insertNodeAfter(t,c,e.createToken(83));break;case 224:if(!e.FindAllReferences.Core.isSymbolReferencedInFile(s,i,t)){n.replaceNode(t,o,e.createExportDefault(e.Debug.assertDefined(e.first(o.declarationList.declarations).initializer,"Initializer was previously known to be present")));break}case 247:case 246:case 248:n.deleteModifier(t,c),n.insertNodeAfter(t,o,e.createExportDefault(e.createIdentifier(s.text)));break;default:e.Debug.assertNever(o,"Unexpected exportNode kind "+o.kind)}}}(a,s,c,o.getTypeChecker()),void function(t,r,i,a){var o=r.wasDefault,s=r.exportName,c=r.exportingModuleSymbol,u=t.getTypeChecker(),l=e.Debug.assertDefined(u.getSymbolAtLocation(s),"Export name should resolve to a symbol");e.FindAllReferences.Core.eachExportReference(t.getSourceFiles(),u,a,l,c,s.text,o,(function(t){var r=t.getSourceFile();o?function(t,r,i,a){var o=r.parent;switch(o.kind){case 193:i.replaceNode(t,r,e.createIdentifier(a));break;case 257:case 261:var s=o;i.replaceNode(t,s,n(a,s.name.text));break;case 254:var c=o;e.Debug.assert(c.name===r,"Import clause name should match provided ref"),s=n(a,r.text);var u=c.namedBindings;if(u)if(255===u.kind){i.deleteRange(t,{pos:r.getStart(t),end:u.getStart(t)});var l=e.isStringLiteral(c.parent.moduleSpecifier)?e.quotePreferenceFromString(c.parent.moduleSpecifier,t):1,_=e.makeImport(void 0,[n(a,r.text)],c.parent.moduleSpecifier,l);i.insertNodeAfter(t,c.parent,_)}else i.delete(t,r),i.insertNodeAtEndOfList(t,u.elements,s);else i.replaceNode(t,r,e.createNamedImports([s]));break;default:e.Debug.failBadSyntaxKind(o)}}(r,t,i,s.text):function(t,r,n){var i=r.parent;switch(i.kind){case 193:n.replaceNode(t,r,e.createIdentifier("default"));break;case 257:var a=e.createIdentifier(i.name.text);1===i.parent.elements.length?n.replaceNode(t,i.parent,a):(n.delete(t,i),n.insertNodeBefore(t,i.parent,a));break;case 261:n.replaceNode(t,i,function(t,r){return e.createExportSpecifier(t===r?void 0:e.createIdentifier(t),e.createIdentifier(r))}("default",i.name.text));break;default:e.Debug.assertNever(i,"Unexpected parent kind "+i.kind)}}(r,t,i)}))}(o,s,c,u);var a,o,s,c,u})),renameFilename:void 0,renameLocation:void 0}}})}(e.refactor||(e.refactor={}))}(s||(s={})),function(e){!function(t){function r(t){var r=t.file,n=e.getRefactorContextSpan(t),i=e.getTokenAtPosition(r,n.start),a=e.getParentNodeInSpan(i,r,n);if(a&&e.isImportDeclaration(a)){var o=a.importClause;return o&&o.namedBindings}}function n(t,r,n){return e.createImportDeclaration(void 0,void 0,e.createImportClause(r,n&&n.length?e.createNamedImports(n):void 0),t.moduleSpecifier)}t.registerRefactor("Convert import",{getAvailableActions:function(t){var n=r(t);if(!n)return e.emptyArray;var i=255===n.kind?e.Diagnostics.Convert_namespace_import_to_named_imports.message:e.Diagnostics.Convert_named_imports_to_namespace_import.message;return[{name:"Convert import",description:i,actions:[{name:255===n.kind?"Convert namespace import to named imports":"Convert named imports to namespace import",description:i}]}]},getEditsForAction:function(t,i){return e.Debug.assert("Convert namespace import to named imports"===i||"Convert named imports to namespace import"===i,"Unexpected action name"),{edits:e.textChanges.ChangeTracker.with(t,(function(i){return a=t.file,o=t.program,s=i,c=e.Debug.assertDefined(r(t),"Context must provide an import to convert"),u=o.getTypeChecker(),void(255===c.kind?function(t,r,i,a,o){var s=!1,c=[],u=e.createMap();e.FindAllReferences.Core.eachSymbolReferenceInFile(a.name,r,t,(function(t){if(e.isPropertyAccessExpression(t.parent)){var n=e.cast(t.parent,e.isPropertyAccessExpression),i=n.name.text;r.resolveName(i,t,67108863,!0)&&u.set(i,!0),e.Debug.assert(n.expression===t,"Parent expression should match id"),c.push(n)}else s=!0}));for(var l=e.createMap(),_=0,d=c;_0;if(e.isBlock(t)&&!s&&0===i.size)return{body:e.createBlock(t.statements,!0),returnValueProperty:void 0};var c=!1,u=e.createNodeArray(e.isBlock(t)?t.statements.slice(0):[e.isStatement(t)?t:e.createReturn(t)]);if(s||i.size){var l=e.visitNodes(u,(function t(a){if(!c&&234===a.kind&&s){var u=g(r,n);return a.expression&&(o||(o="__return"),u.unshift(e.createPropertyAssignment(o,e.visitNode(a.expression,t)))),1===u.length?e.createReturn(u[0].name):e.createReturn(e.createObjectLiteral(u))}var l=c;c=c||e.isFunctionLikeDeclaration(a)||e.isClassLike(a);var _=i.get(e.getNodeId(a).toString()),d=_?e.getSynthesizedDeepClone(_):e.visitEachChild(a,t,e.nullTransformationContext);return c=l,d})).slice();if(s&&!a&&e.isStatement(t)){var _=g(r,n);1===_.length?l.push(e.createReturn(_[0].name)):l.push(e.createReturn(e.createObjectLiteral(_)))}return{body:e.createBlock(l,!0),returnValueProperty:o}}return{body:e.createBlock(u,!0),returnValueProperty:void 0}}(t,a,u,d,!!(o.facts&i.HasReturn)),F=A.body,P=A.returnValueProperty;if(e.suppressLeadingAndTrailingTrivia(F),e.isClassLike(r)){var w=b?[]:[e.createToken(116)];o.facts&i.InStaticRegion&&w.push(e.createToken(119)),o.facts&i.IsAsyncFunction&&w.push(e.createToken(125)),N=e.createMethod(void 0,w.length?w:void 0,o.facts&i.IsGenerator?e.createToken(41):void 0,x,void 0,E,D,c,F)}else N=e.createFunctionDeclaration(void 0,o.facts&i.IsAsyncFunction?[e.createToken(125)]:void 0,o.facts&i.IsGenerator?e.createToken(41):void 0,x,E,D,c,F);var I=e.textChanges.ChangeTracker.fromContext(s),O=function(t,r){return e.find(function(t){if(e.isFunctionLikeDeclaration(t)){var r=t.body;if(e.isBlock(r))return r.statements}else{if(e.isModuleBlock(t)||e.isSourceFile(t))return t.statements;if(e.isClassLike(t))return t.members;e.assertType(t)}return e.emptyArray}(r),(function(r){return r.pos>=t&&e.isFunctionLikeDeclaration(r)&&!e.isConstructorDeclaration(r)}))}((y(o.range)?e.last(o.range):o.range).end,r);O?I.insertNodeBefore(s.file,O,N,!0):I.insertNodeAtEndOfScope(s.file,r,N);var M=[],L=function(t,r,n){var a=e.createIdentifier(n);if(e.isClassLike(t)){var o=r.facts&i.InStaticRegion?e.createIdentifier(t.name.text):e.createThis();return e.createPropertyAccess(o,a)}return a}(r,o,v),R=e.createCall(L,C,S);o.facts&i.IsGenerator&&(R=e.createYield(e.createToken(41),R));o.facts&i.IsAsyncFunction&&(R=e.createAwait(R));if(a.length&&!u)if(e.Debug.assert(!P,"Expected no returnValueProperty"),e.Debug.assert(!(o.facts&i.HasReturn),"Expected RangeFacts.HasReturn flag to be unset"),1===a.length){var B=a[0];M.push(e.createVariableStatement(void 0,e.createVariableDeclarationList([e.createVariableDeclaration(e.getSynthesizedDeepClone(B.name),e.getSynthesizedDeepClone(B.type),R)],B.parent.flags)))}else{for(var j=[],K=[],J=a[0].parent.flags,z=!1,U=0,V=a;U0,"Found no members");for(var a=!0,o=0,s=i;ot)return n||i[0];if(a&&!e.isPropertyDeclaration(c)){if(void 0!==n)return c;a=!1}n=c}return void 0===n?e.Debug.fail():n}(t.pos,r);g.insertNodeBefore(o.file,x,v,!0),g.replaceNode(o.file,t,b)}else{var D=e.createVariableDeclaration(_,f,m),S=function(t,r){var n;for(;void 0!==t&&t!==r;){if(e.isVariableDeclaration(t)&&t.initializer===n&&e.isVariableDeclarationList(t.parent)&&t.parent.declarations.length>1)return t;n=t,t=t.parent}}(t,r);if(S){g.insertNodeBefore(o.file,S,D);b=e.createIdentifier(_);g.replaceNode(o.file,t,b)}else if(225===t.parent.kind&&r===e.findAncestor(t,d)){var T=e.createVariableStatement(void 0,e.createVariableDeclarationList([D],2));g.replaceNode(o.file,t.parent,T)}else{T=e.createVariableStatement(void 0,e.createVariableDeclarationList([D],2));if(0===(x=function(t,r){var n;e.Debug.assert(!e.isClassLike(r));for(var i=t;i!==r;i=i.parent)d(i)&&(n=i);for(i=(n||t).parent;;i=i.parent){if(h(i)){for(var a=void 0,o=0,s=i.statements;ot.pos)break;a=c}return!a&&e.isCaseClause(i)?(e.Debug.assert(e.isSwitchStatement(i.parent.parent),"Grandparent isn't a switch statement"),i.parent.parent):e.Debug.assertDefined(a,"prevStatement failed to get set")}e.Debug.assert(i!==r,"Didn't encounter a block-like before encountering scope")}}(t,r)).pos?g.insertNodeAtTopOfFile(o.file,T,!1):g.insertNodeBefore(o.file,x,T,!1),225===t.parent.kind)g.delete(o.file,t.parent);else{b=e.createIdentifier(_);g.replaceNode(o.file,t,b)}}}var E=g.getChanges(),C=t.getSourceFile().fileName,k=e.getRenameLocation(E,C,_,!0);return{renameFilename:C,renameLocation:k,edits:E}}(e.isExpression(c)?c:c.statements[0].expression,o[n],u[n],t.facts,r)}(n,t,o)}e.Debug.fail("Unrecognized action name")}function l(t,r){var a=r.length;if(0===a)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractEmpty)]};var o=e.getParentNodeInSpan(e.getTokenAtPosition(t,r.start),t,r),s=e.getParentNodeInSpan(e.findTokenOnLeftOfPosition(t,e.textSpanEnd(r)),t,r),c=[],u=i.None;if(!o||!s)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o.parent!==s.parent)return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};if(o!==s){if(!h(o.parent))return{errors:[e.createFileDiagnostic(t,r.start,a,n.cannotExtractRange)]};for(var l=[],d=0,p=o.parent.statements;d=r.start+r.length)return(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractSuper)),!0}else u|=i.UsesThis}if(e.isFunctionLikeDeclaration(a)||e.isClassLike(a)){switch(a.kind){case 243:case 244:e.isSourceFile(a.parent)&&void 0===a.parent.externalModuleIndicator&&(o||(o=[])).push(e.createDiagnosticForNode(a,n.functionWillNotBeVisibleInTheNewScope))}return!1}var p=_;switch(a.kind){case 226:case 239:_=0;break;case 222:a.parent&&239===a.parent.kind&&a.parent.finallyBlock===a&&(_=4);break;case 275:_|=1;break;default:e.isIterationStatement(a,!1)&&(_|=3)}switch(a.kind){case 182:case 103:u|=i.UsesThis;break;case 237:var f=a.label;(l||(l=[])).push(f.escapedText),e.forEachChild(a,t),l.pop();break;case 233:case 232:(f=a.label)?e.contains(l,f.escapedText)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)):_&(233===a.kind?1:2)||(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalBreakOrContinueStatements));break;case 205:u|=i.IsAsyncFunction;break;case 211:u|=i.IsGenerator;break;case 234:4&_?u|=i.HasReturn:(o||(o=[])).push(e.createDiagnosticForNode(a,n.cannotExtractRangeContainingConditionalReturnStatement));break;default:e.forEachChild(a,t)}_=p}(t),o}}function _(t){return e.isStatement(t)?[t]:e.isExpressionNode(t)?e.isExpressionStatement(t.parent)?[t.parent]:t:void 0}function d(t){return e.isFunctionLikeDeclaration(t)||e.isSourceFile(t)||e.isModuleBlock(t)||e.isClassLike(t)}function p(t,r){var a=r.file,o=function(t){var r=y(t.range)?e.first(t.range):t.range;if(t.facts&i.UsesThis){var n=e.getContainingClass(r);if(n){var a=e.findAncestor(r,e.isFunctionLikeDeclaration);return a?[a,n]:[n]}}for(var o=[];;)if(155===(r=r.parent).kind&&(r=e.findAncestor(r,(function(t){return e.isFunctionLikeDeclaration(t)})).parent),d(r)&&(o.push(r),288===r.kind))return o}(t);return{scopes:o,readsAndWrites:function(t,r,a,o,s,c){var u,l,_=e.createMap(),d=[],p=[],f=[],m=[],g=[],h=e.createMap(),v=[],b=y(t.range)?1===t.range.length&&e.isExpressionStatement(t.range[0])?t.range[0].expression:void 0:t.range;if(void 0===b){var x=t.range,D=e.first(x).getStart(),S=e.last(x).end;l=e.createFileDiagnostic(o,D,S-D,n.expressionExpected)}else 147456&s.getTypeAtLocation(b).flags&&(l=e.createDiagnosticForNode(b,n.uselessConstantType));for(var T=0,E=r;T=u)return g;if(N.set(g,u),y){for(var h=0,v=d;h0){for(var w=e.createMap(),I=0,O=F;void 0!==O&&I=0)return;var i=e.isIdentifier(n)?U(n):s.getSymbolAtLocation(n);if(i){var a=e.find(g,(function(e){return e.symbol===i}));if(a)if(e.isVariableDeclaration(a)){var o=a.symbol.id.toString();h.has(o)||(v.push(a),h.set(o,!0))}else u=u||a}e.forEachChild(n,r)}))}for(var K=function(r){var i=d[r];if(r>0&&(i.usages.size>0||i.typeParameterUsages.size>0)){var a=y(t.range)?t.range[0]:t.range;m[r].push(e.createDiagnosticForNode(a,n.cannotAccessVariablesFromNestedScopes))}var o,s=!1;if(d[r].usages.forEach((function(t){2===t.usage&&(s=!0,106500&t.symbol.flags&&t.symbol.valueDeclaration&&e.hasModifier(t.symbol.valueDeclaration,64)&&(o=t.symbol.valueDeclaration))})),e.Debug.assert(y(t.range)||0===v.length,"No variable declarations expected if something was extracted"),s&&!y(t.range)){var c=e.createDiagnosticForNode(t.range,n.cannotWriteInExpression);f[r].push(c),m[r].push(c)}else if(o&&r>0){c=e.createDiagnosticForNode(o,n.cannotExtractReadonlyPropertyInitializerOutsideConstructor);f[r].push(c),m[r].push(c)}else if(u){c=e.createDiagnosticForNode(u,n.cannotExtractExportedEntity);f[r].push(c),m[r].push(c)}},J=0;Jn.pos}));if(-1!==a){var o=i[a];if(e.isNamedDeclaration(o)&&o.name&&e.rangeContainsRange(o.name,n))return{toMove:[i[a]],afterLast:i[a+1]};if(!(n.pos>o.getStart(r))){var s=e.findIndex(i,(function(e){return e.end>n.end}),a);if(-1===s||!(0===s||i[s].getStart(r)=a&&e.every(t,(function(t){return function(t,r){if(e.isRestParameter(t)){var n=r.getTypeAtLocation(t);if(!r.isArrayType(n)&&!r.isTupleType(n))return!1}return!t.modifiers&&!t.decorators&&e.isIdentifier(t.name)}(t,r)}))}(t.parameters,r))return!1;switch(t.kind){case 243:return p(t)&&d(t,r);case 160:return d(t,r);case 161:return e.isClassDeclaration(t.parent)?p(t.parent)&&d(t,r):f(t.parent.parent)&&d(t,r);case 200:case 201:return f(t.parent)}return!1}(o,n)&&e.rangeContainsRange(o,i))||o.body&&e.rangeContainsRange(o.body,i)?void 0:o}function d(e,t){return!!e.body&&!t.isImplementationOfOverload(e)}function p(t){return!!t.name||!!e.findModifier(t,83)}function f(t){return e.isVariableDeclaration(t)&&e.isVarConst(t)&&e.isIdentifier(t.name)&&!t.type}function m(t){return t.length>0&&e.isThis(t[0].name)}function g(t){return m(t)&&(t=e.createNodeArray(t.slice(1),t.hasTrailingComma)),t}function y(t,r){var n=g(t.parameters),i=e.isRestParameter(e.last(n)),a=i?r.slice(0,n.length-1):r,o=e.map(a,(function(t,r){var i=function(t,r){return e.isIdentifier(r)&&e.getTextOfIdentifierOrLiteral(r)===t?e.createShorthandPropertyAssignment(t):e.createPropertyAssignment(t,r)}(v(n[r]),t);return e.suppressLeadingAndTrailingTrivia(i.name),e.isPropertyAssignment(i)&&e.suppressLeadingAndTrailingTrivia(i.initializer),h(t,i),i}));if(i&&r.length>=n.length){var s=r.slice(n.length-1),c=e.createPropertyAssignment(v(e.last(n)),e.createArrayLiteral(s));o.push(c)}return e.createObjectLiteral(o,!1)}function h(t,r){var n=t.getSourceFile();!function(e,t){for(var r=e.getFullStart(),n=e.getStart(),i=r;i316}));return n.kind<152?n:n.getFirstToken(t)}},t.prototype.getLastToken=function(t){this.assertHasRealPosition();var r=this.getChildren(t),n=e.lastOrUndefined(r);if(n)return n.kind<152?n:n.getLastToken(t)},t.prototype.forEachChild=function(t,r){return e.forEachChild(this,t,r)},t}();function a(t,r,i,a){for(e.scanner.setTextPos(r);r=n.length&&(t=this.getEnd()),t||(t=n[r+1]-1);var i=this.getFullText();return"\n"===i[t]&&"\r"===i[t-1]?t-1:t},r.prototype.getNamedDeclarations=function(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations},r.prototype.computeNamedDeclarations=function(){var t=e.createMultiMap();return this.forEachChild((function i(a){switch(a.kind){case 243:case 200:case 160:case 159:var o=a,s=n(o);if(s){var c=function(e){var r=t.get(e);r||t.set(e,r=[]);return r}(s),u=e.lastOrUndefined(c);u&&o.parent===u.parent&&o.symbol===u.symbol?o.body&&!u.body&&(c[c.length-1]=o):c.push(o)}e.forEachChild(a,i);break;case 244:case 213:case 245:case 246:case 247:case 248:case 252:case 261:case 257:case 254:case 255:case 162:case 163:case 172:r(a),e.forEachChild(a,i);break;case 155:if(!e.hasModifier(a,92))break;case 241:case 190:var l=a;if(e.isBindingPattern(l.name)){e.forEachChild(l.name,i);break}l.initializer&&i(l.initializer);case 282:case 158:case 157:r(a);break;case 259:a.exportClause&&e.forEach(a.exportClause.elements,i);break;case 253:var _=a.importClause;_&&(_.name&&r(_.name),_.namedBindings&&(255===_.namedBindings.kind?r(_.namedBindings):e.forEach(_.namedBindings.elements,i)));break;case 208:0!==e.getAssignmentDeclarationKind(a)&&r(a);default:e.forEachChild(a,i)}})),t;function r(e){var r=n(e);r&&t.add(r,e)}function n(t){var r=e.getNonAssignedNameOfDeclaration(t);return r&&(e.isComputedPropertyName(r)&&e.isPropertyAccessExpression(r.expression)?r.expression.name.text:e.isPropertyName(r)?e.getNameFromPropertyName(r):void 0)}},r}(i),g=function(){function t(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r}return t.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},t}();function y(t){var r=!0;for(var n in t)if(e.hasProperty(t,n)&&!h(n)){r=!1;break}if(r)return t;var i={};for(var n in t){if(e.hasProperty(t,n))i[h(n)?n:n.charAt(0).toLowerCase()+n.substr(1)]=t[n]}return i}function h(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function v(){return{target:1,jsx:1}}e.toEditorSettings=y,e.displayPartsToString=function(t){return t?e.map(t,(function(e){return e.text})).join(""):""},e.getDefaultCompilerOptions=v,e.getSupportedCodeFixes=function(){return e.codefix.getSupportedErrorCodes()};var b=function(){function t(t,r){this.host=t,this.currentDirectory=t.getCurrentDirectory(),this.fileNameToEntry=e.createMap();for(var n=0,i=t.getScriptFileNames();n=this.throttleWaitMilliseconds&&(this.lastCancellationCheckTime=t,this.hostCancellationToken.isCancellationRequested())},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}();function k(t){var r=function(t){switch(t.kind){case 10:case 14:case 8:if(153===t.parent.kind)return e.isObjectLiteralElement(t.parent.parent)?t.parent.parent:void 0;case 75:return!e.isObjectLiteralElement(t.parent)||192!==t.parent.parent.kind&&272!==t.parent.parent.kind||t.parent.name!==t?void 0:t.parent}return}(t);return r&&(e.isObjectLiteralExpression(r.parent)||e.isJsxAttributes(r.parent))?r:void 0}function N(t,r,n,i){var a=e.getNameFromPropertyName(t.name);if(!a)return e.emptyArray;if(!n.isUnion())return(o=n.getProperty(a))?[o]:e.emptyArray;var o,s=e.mapDefined(n.types,(function(n){return e.isObjectLiteralExpression(t.parent)&&r.isTypeInvalidDueToUnionDiscriminant(n,t.parent)?void 0:n.getProperty(a)}));if(i&&(0===s.length||s.length===n.types.length)&&(o=n.getProperty(a)))return[o];return 0===s.length?e.mapDefined(n.types,(function(e){return e.getProperty(a)})):s}e.ThrottledCancellationToken=C,e.createLanguageService=function(n,i,a){var o;void 0===i&&(i=e.createDocumentRegistry(n.useCaseSensitiveFileNames&&n.useCaseSensitiveFileNames(),n.getCurrentDirectory())),void 0===a&&(a=!1);var s,c,u=new x(n),l=0,_=new E(n.getCancellationToken&&n.getCancellationToken()),d=n.getCurrentDirectory();function p(e){n.log&&n.log(e)}!e.localizedDiagnosticMessages&&n.getLocalizedDiagnosticMessages&&(e.localizedDiagnosticMessages=n.getLocalizedDiagnosticMessages());var f=e.hostUsesCaseSensitiveFileNames(n),m=e.createGetCanonicalFileName(f),g=e.getSourceMapper({useCaseSensitiveFileNames:function(){return f},getCurrentDirectory:function(){return d},getProgram:D,fileExists:e.maybeBind(n,n.fileExists),readFile:e.maybeBind(n,n.readFile),getDocumentPositionMapper:e.maybeBind(n,n.getDocumentPositionMapper),getSourceFileLike:e.maybeBind(n,n.getSourceFileLike),log:p});function h(e){var t=s.getSourceFile(e);if(!t){var r=new Error("Could not find source file: '"+e+"'.");throw r.ProgramFiles=s.getSourceFiles().map((function(e){return e.fileName})),r}return t}function v(){if(e.Debug.assert(!a),n.getProjectVersion){var t=n.getProjectVersion();if(t){if(c===t&&!n.hasChangedAutomaticTypeDirectiveNames)return;c=t}}var r=n.getTypeRootsVersion?n.getTypeRootsVersion():0;l!==r&&(p("TypeRoots version has changed; provide new program"),s=void 0,l=r);var o=new b(n,m),u=o.getRootFileNames(),y=n.hasInvalidatedResolution||e.returnFalse,h=o.getProjectReferences();if(!e.isProgramUptoDate(s,u,o.compilationSettings(),(function(e){return o.getVersion(e)}),T,y,!!n.hasChangedAutomaticTypeDirectiveNames,h)){var v=o.compilationSettings(),x={getSourceFile:function(t,r,n,i){return E(t,e.toPath(t,d,m),r,n,i)},getSourceFileByPath:E,getCancellationToken:function(){return _},getCanonicalFileName:m,useCaseSensitiveFileNames:function(){return f},getNewLine:function(){return e.getNewLineCharacter(v,(function(){return e.getNewLineOrDefaultFromHost(n)}))},getDefaultLibFileName:function(e){return n.getDefaultLibFileName(e)},writeFile:e.noop,getCurrentDirectory:function(){return d},fileExists:T,readFile:function(t){var r=e.toPath(t,d,m),i=o&&o.getEntryByPath(r);if(i)return e.isString(i)?void 0:e.getSnapshotText(i.scriptSnapshot);return n.readFile&&n.readFile(t)},realpath:n.realpath&&function(e){return n.realpath(e)},directoryExists:function(t){return e.directoryProbablyExists(t,n)},getDirectories:function(e){return n.getDirectories?n.getDirectories(e):[]},readDirectory:function(t,r,i,a,o){return e.Debug.assertDefined(n.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),n.readDirectory(t,r,i,a,o)},onReleaseOldSourceFile:function(e,t){var r=i.getKeyForCompilationSettings(t);i.releaseDocumentWithKey(e.resolvedPath,r)},hasInvalidatedResolution:y,hasChangedAutomaticTypeDirectiveNames:n.hasChangedAutomaticTypeDirectiveNames};n.trace&&(x.trace=function(e){return n.trace(e)}),n.resolveModuleNames&&(x.resolveModuleNames=function(){for(var e=[],t=0;t0&&!function(t){return e.stringContains(t,"/node_modules/")}(n.fileName))for(var s=function(){var t="("+/(?:^(?:\s|\*)*)/.source+"|"+/(?:\/\/+\s*)/.source+"|"+/(?:\/\*+\s*)/.source+")",n="(?:"+e.map(r,(function(e){return"("+e.text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")"})).join("|")+")";return new RegExp(t+"("+n+/(?:.*?)/.source+")"+/(?:$|\*\/)/.source,"gim")}(),c=void 0;c=s.exec(a);){_.throwIfCancellationRequested();e.Debug.assert(c.length===r.length+3);var u=c[1],l=c.index+u.length;if(e.isInComment(n,l)){for(var d=void 0,p=0;p=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57)){var f=c[2];o.push({descriptor:d,message:f,position:l})}}}return o},getBraceMatchingAtPosition:function(t,r){var n=u.getCurrentSourceFile(t),i=e.getTouchingToken(n,r),a=i.getStart(n)===r?A.get(i.kind.toString()):void 0,o=a&&e.findChildOfKind(i.parent,a,n);return o?[e.createTextSpanFromNode(i,n),e.createTextSpanFromNode(o,n)].sort((function(e,t){return e.start-t.start})):e.emptyArray},getIndentationAtPosition:function(t,r,n){var i=e.timestamp(),a=y(n),o=u.getCurrentSourceFile(t);p("getIndentationAtPosition: getCurrentSourceFile: "+(e.timestamp()-i)),i=e.timestamp();var s=e.formatting.SmartIndenter.getIndentation(r,o,a);return p("getIndentationAtPosition: computeIndentation : "+(e.timestamp()-i)),s},getFormattingEditsForRange:function(t,r,n,i){var a=u.getCurrentSourceFile(t);return e.formatting.formatSelection(r,n,a,e.formatting.getFormatContext(y(i)))},getFormattingEditsForDocument:function(t,r){return e.formatting.formatDocument(u.getCurrentSourceFile(t),e.formatting.getFormatContext(y(r)))},getFormattingEditsAfterKeystroke:function(t,r,n,i){var a=u.getCurrentSourceFile(t),o=e.formatting.getFormatContext(y(i));if(!e.isInComment(a,r))switch(n){case"{":return e.formatting.formatOnOpeningCurly(r,a,o);case"}":return e.formatting.formatOnClosingCurly(r,a,o);case";":return e.formatting.formatOnSemicolon(r,a,o);case"\n":return e.formatting.formatOnEnter(r,a,o)}return[]},getDocCommentTemplateAtPosition:function(t,r){return e.JsDoc.getDocCommentTemplateAtPosition(e.getNewLineOrDefaultFromHost(n),u.getCurrentSourceFile(t),r)},isValidBraceCompletionAtPosition:function(t,r,n){if(60===n)return!1;var i=u.getCurrentSourceFile(t);if(e.isInString(i,r))return!1;if(e.isInsideJsxElementOrAttribute(i,r))return 123===n;if(e.isInTemplateString(i,r))return!1;switch(n){case 39:case 34:case 96:return!e.isInComment(i,r)}return!0},getJsxClosingTagAtPosition:function(t,r){var n=u.getCurrentSourceFile(t),i=e.findPrecedingToken(r,n);if(i){var a=31===i.kind&&e.isJsxOpeningElement(i.parent)?i.parent.parent:e.isJsxText(i)?i.parent:void 0;return a&&function t(r){var n=r.openingElement,i=r.closingElement,a=r.parent;return!e.tagNamesAreEquivalent(n.tagName,i.tagName)||e.isJsxElement(a)&&e.tagNamesAreEquivalent(n.tagName,a.openingElement.tagName)&&t(a)}(a)?{newText:""}:void 0}},getSpanOfEnclosingComment:function(t,r,n){var i=u.getCurrentSourceFile(t),a=e.formatting.getRangeOfEnclosingComment(i,r);return!a||n&&3!==a.kind?void 0:e.createTextSpanFromRange(a)},getCodeFixesAtPosition:function(t,r,i,a,o,c){void 0===c&&(c=e.emptyOptions),v();var u=h(t),l=e.createTextSpanFromBounds(r,i),d=e.formatting.getFormatContext(o);return e.flatMap(e.deduplicate(a,e.equateValues,e.compareValues),(function(t){return _.throwIfCancellationRequested(),e.codefix.getFixes({errorCode:t,sourceFile:u,span:l,program:s,host:n,cancellationToken:_,formatContext:d,preferences:c})}))},getCombinedCodeFix:function(t,r,i,a){void 0===a&&(a=e.emptyOptions),v(),e.Debug.assert("file"===t.type);var o=h(t.fileName),c=e.formatting.getFormatContext(i);return e.codefix.getAllFixes({fixId:r,sourceFile:o,program:s,host:n,cancellationToken:_,formatContext:c,preferences:a})},applyCodeActionCommand:function(t,r){var n="string"==typeof t?r:t;return e.isArray(n)?Promise.all(n.map((function(e){return F(e)}))):F(n)},organizeImports:function(t,r,i){void 0===i&&(i=e.emptyOptions),v(),e.Debug.assert("file"===t.type);var a=h(t.fileName),o=e.formatting.getFormatContext(r);return e.OrganizeImports.organizeImports(a,o,n,s,i)},getEditsForFileRename:function(t,r,i,a){return void 0===a&&(a=e.emptyOptions),e.getEditsForFileRename(D(),t,r,n,e.formatting.getFormatContext(i),a,g)},getEmitOutput:function(t,r,i){v();var a=h(t),o=n.getCustomTransformers&&n.getCustomTransformers();return e.getFileEmitOutput(s,a,!!r,_,o,i)},getNonBoundSourceFile:function(e){return u.getCurrentSourceFile(e)},getProgram:D,getApplicableRefactors:function(t,r,n){void 0===n&&(n=e.emptyOptions),v();var i=h(t);return e.refactor.getApplicableRefactors(P(i,r,n))},getEditsForRefactor:function(t,r,n,i,a,o){void 0===o&&(o=e.emptyOptions),v();var s=h(t);return e.refactor.getEditsForRefactor(P(s,n,o,r),i,a)},toLineColumnOffset:g.toLineColumnOffset,getSourceMapper:function(){return g}}},e.getNameTable=function(t){return t.nameTable||function(t){var r=t.nameTable=e.createUnderscoreEscapedMap();t.forEachChild((function t(n){if(e.isIdentifier(n)&&!e.isTagName(n)&&n.escapedText||e.isStringOrNumericLiteralLike(n)&&function(t){return e.isDeclarationName(t)||263===t.parent.kind||function(e){return e&&e.parent&&194===e.parent.kind&&e.parent.argumentExpression===e}(t)||e.isLiteralComputedPropertyDeclarationName(t)}(n)){var i=e.getEscapedTextOfIdentifierOrLiteral(n);r.set(i,void 0===r.get(i)?n.pos:-1)}if(e.forEachChild(n,t),e.hasJSDocNodes(n))for(var a=0,o=n.jsDoc;ai){var a=e.findPrecedingToken(n.pos,t);if(!a||t.getLineAndCharacterOfPosition(a.getEnd()).line!==i)return;n=a}if(!(8388608&n.flags))return _(n)}function o(r,n){var i=r.decorators?e.skipTrivia(t.text,r.decorators.end):r.getStart(t);return e.createTextSpanFromBounds(i,(n||r).getEnd())}function s(r,n){return o(r,e.findNextToken(n,n.parent,t))}function c(e,r){return e&&i===t.getLineAndCharacterOfPosition(e.getStart(t)).line?_(e):_(r)}function u(r){return _(e.findPrecedingToken(r.pos,t))}function l(r){return _(e.findNextToken(r,r.parent,t))}function _(r){if(r){var n=r.parent;switch(r.kind){case 224:return h(r.declarationList.declarations[0]);case 241:case 158:case 157:return h(r);case 155:return function t(r){if(e.isBindingPattern(r.name))return D(r.name);if(function(t){return!!t.initializer||void 0!==t.dotDotDotToken||e.hasModifier(t,12)}(r))return o(r);var n=r.parent,i=n.parameters.indexOf(r);return e.Debug.assert(-1!==i),0!==i?t(n.parameters[i-1]):_(n.body)}(r);case 243:case 160:case 159:case 162:case 163:case 161:case 200:case 201:return function(e){if(!e.body)return;if(v(e))return o(e);return _(e.body)}(r);case 222:if(e.isFunctionBlock(r))return function(e){var t=e.statements.length?e.statements[0]:e.getLastToken();if(v(e.parent))return c(e.parent,t);return _(t)}(r);case 249:return b(r);case 278:return b(r.block);case 225:return o(r.expression);case 234:return o(r.getChildAt(0),r.expression);case 228:return s(r,r.expression);case 227:return _(r.statement);case 240:return o(r.getChildAt(0));case 226:return s(r,r.expression);case 237:return _(r.statement);case 233:case 232:return o(r.getChildAt(0),r.label);case 229:return function(e){if(e.initializer)return x(e);if(e.condition)return o(e.condition);if(e.incrementor)return o(e.incrementor)}(r);case 230:return s(r,r.expression);case 231:return x(r);case 236:return s(r,r.expression);case 275:case 276:return _(r.statements[0]);case 239:return b(r.tryBlock);case 238:case 258:return o(r,r.expression);case 252:return o(r,r.moduleReference);case 253:case 259:return o(r,r.moduleSpecifier);case 248:if(1!==e.getModuleInstanceState(r))return;case 244:case 247:case 282:case 190:return o(r);case 235:return _(r.statement);case 156:return g=n.decorators,e.createTextSpanFromBounds(e.skipTrivia(t.text,g.pos),g.end);case 188:case 189:return D(r);case 245:case 246:return;case 26:case 1:return c(e.findPrecedingToken(r.pos,t));case 27:return u(r);case 18:return function(r){switch(r.parent.kind){case 247:var n=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),n.members.length?n.members[0]:n.getLastToken(t));case 244:var i=r.parent;return c(e.findPrecedingToken(r.pos,t,r.parent),i.members.length?i.members[0]:i.getLastToken(t));case 250:return c(r.parent.parent,r.parent.clauses[0])}return _(r.parent)}(r);case 19:return function(t){switch(t.parent.kind){case 249:if(1!==e.getModuleInstanceState(t.parent.parent))return;case 247:case 244:return o(t);case 222:if(e.isFunctionBlock(t.parent))return o(t);case 278:return _(e.lastOrUndefined(t.parent.statements));case 250:var r=t.parent,n=e.lastOrUndefined(r.clauses);return n?_(e.lastOrUndefined(n.statements)):void 0;case 188:var i=t.parent;return _(e.lastOrUndefined(i.elements)||i);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var a=t.parent;return o(e.lastOrUndefined(a.properties)||a)}return _(t.parent)}}(r);case 23:return function(t){switch(t.parent.kind){case 189:var r=t.parent;return o(e.lastOrUndefined(r.elements)||r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var n=t.parent;return o(e.lastOrUndefined(n.elements)||n)}return _(t.parent)}}(r);case 20:return function(e){if(227===e.parent.kind||195===e.parent.kind||196===e.parent.kind)return u(e);if(199===e.parent.kind)return l(e);return _(e.parent)}(r);case 21:return function(e){switch(e.parent.kind){case 200:case 243:case 201:case 160:case 159:case 162:case 163:case 161:case 228:case 227:case 229:case 231:case 195:case 196:case 199:return u(e);default:return _(e.parent)}}(r);case 58:return function(t){if(e.isFunctionLike(t.parent)||279===t.parent.kind||155===t.parent.kind)return u(t);return _(t.parent)}(r);case 31:case 29:return function(e){if(198===e.parent.kind)return l(e);return _(e.parent)}(r);case 110:return function(e){if(227===e.parent.kind)return s(e,e.parent.expression);return _(e.parent)}(r);case 86:case 78:case 91:return l(r);case 151:return function(e){if(231===e.parent.kind)return l(e);return _(e.parent)}(r);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(r))return S(r);if((75===r.kind||212===r.kind||279===r.kind||280===r.kind)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(n))return o(r);if(208===r.kind){var i=r,a=i.left,d=i.operatorToken;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a))return S(a);if(62===d.kind&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent))return o(r);if(27===d.kind)return _(a)}if(e.isExpressionNode(r))switch(n.kind){case 227:return u(r);case 156:return _(r.parent);case 229:case 231:return o(r);case 208:if(27===r.parent.operatorToken.kind)return o(r);break;case 201:if(r.parent.body===r)return o(r)}switch(r.parent.kind){case 279:if(r.parent.name===r&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(r.parent.parent))return _(r.parent.initializer);break;case 198:if(r.parent.type===r)return l(r.parent.type);break;case 241:case 155:var p=r.parent,f=p.initializer,m=p.type;if(f===r||m===r||e.isAssignmentOperator(r.kind))return u(r);break;case 208:a=r.parent.left;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(a)&&r!==a)return u(r);break;default:if(e.isFunctionLike(r.parent)&&r.parent.type===r)return u(r)}return _(r.parent)}}var g;function y(r){return e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]===r?o(e.findPrecedingToken(r.pos,t,r.parent),r):o(r)}function h(r){if(230===r.parent.parent.kind)return _(r.parent.parent);var n=r.parent;return e.isBindingPattern(r.name)?D(r.name):r.initializer||e.hasModifier(r,1)||231===n.parent.kind?y(r):e.isVariableDeclarationList(r.parent)&&r.parent.declarations[0]!==r?_(e.findPrecedingToken(r.pos,t,r.parent)):void 0}function v(t){return e.hasModifier(t,1)||244===t.parent.kind&&161!==t.kind}function b(r){switch(r.parent.kind){case 248:if(1!==e.getModuleInstanceState(r.parent))return;case 228:case 226:case 230:return c(r.parent,r.statements[0]);case 229:case 231:return c(e.findPrecedingToken(r.pos,t,r.parent),r.statements[0])}return _(r.statements[0])}function x(e){if(242!==e.initializer.kind)return _(e.initializer);var t=e.initializer;return t.declarations.length>0?_(t.declarations[0]):void 0}function D(t){var r=e.forEach(t.elements,(function(e){return 214!==e.kind?e:void 0}));return r?_(r):190===t.parent.kind?o(t.parent):y(t.parent)}function S(t){e.Debug.assert(189!==t.kind&&188!==t.kind);var r=191===t.kind?t.elements:t.properties,n=e.forEach(r,(function(e){return 214!==e.kind?e:void 0}));return n?_(n):o(208===t.parent.kind?t.parent:t)}}}}(e.BreakpointResolver||(e.BreakpointResolver={}))}(s||(s={})),function(e){e.transform=function(t,r,n){var i=[];n=e.fixupCompilerOptions(n,i);var a=e.isArray(t)?t:[t],o=e.transformNodes(void 0,void 0,n,a,r,!0);return o.diagnostics=e.concatenate(o.diagnostics,i),o}}(s||(s={}));var s,c,u=function(){return this}();!function(r){function n(e,t){e&&e.log("*INTERNAL ERROR* - Exception in typescript services: "+t.message)}var i=function(){function e(e){this.scriptSnapshotShim=e}return e.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},e.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},e.prototype.getChangeRange=function(e){var t=e,n=this.scriptSnapshotShim.getChangeRange(t.scriptSnapshotShim);if(null===n)return null;var i=JSON.parse(n);return r.createTextChangeRange(r.createTextSpan(i.span.start,i.span.length),i.newLength)},e.prototype.dispose=function(){"dispose"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},e}(),a=function(){function e(e){var t=this;this.shimHost=e,this.loggingEnabled=!1,this.tracingEnabled=!1,"getModuleResolutionsForFile"in this.shimHost&&(this.resolveModuleNames=function(e,n){var i=JSON.parse(t.shimHost.getModuleResolutionsForFile(n));return r.map(e,(function(e){var t=r.getProperty(i,e);return t?{resolvedFileName:t,extension:r.extensionFromPath(t),isExternalLibraryImport:!1}:void 0}))}),"directoryExists"in this.shimHost&&(this.directoryExists=function(e){return t.shimHost.directoryExists(e)}),"getTypeReferenceDirectiveResolutionsForFile"in this.shimHost&&(this.resolveTypeReferenceDirectives=function(e,n){var i=JSON.parse(t.shimHost.getTypeReferenceDirectiveResolutionsForFile(n));return r.map(e,(function(e){return r.getProperty(i,e)}))})}return e.prototype.log=function(e){this.loggingEnabled&&this.shimHost.log(e)},e.prototype.trace=function(e){this.tracingEnabled&&this.shimHost.trace(e)},e.prototype.error=function(e){this.shimHost.error(e)},e.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},e.prototype.getTypeRootsVersion=function(){return this.shimHost.getTypeRootsVersion?this.shimHost.getTypeRootsVersion():0},e.prototype.useCaseSensitiveFileNames=function(){return!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames()},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null===e||""===e)throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings");var t=JSON.parse(e);return t.allowNonTsExtensions=!0,t},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){var t=this.shimHost.getScriptSnapshot(e);return t&&new i(t)},e.prototype.getScriptKind=function(e){return"getScriptKind"in this.shimHost?this.shimHost.getScriptKind(e):0},e.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},e.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null===e||""===e)return null;try{return JSON.parse(e)}catch(e){return this.log(e.description||"diagnosticMessages.generated.json has invalid JSON format"),null}},e.prototype.getCancellationToken=function(){var e=this.shimHost.getCancellationToken();return new r.ThrottledCancellationToken(e)},e.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e.prototype.getDefaultLibFileName=function(e){return this.shimHost.getDefaultLibFileName(JSON.stringify(e))},e.prototype.readDirectory=function(e,t,n,i,a){var o=r.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(t),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.readFile=function(e,t){return this.shimHost.readFile(e,t)},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e}();r.LanguageServiceShimHostAdapter=a;var s=function(){function e(e){var t=this;this.shimHost=e,this.useCaseSensitiveFileNames=!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames(),"directoryExists"in this.shimHost?this.directoryExists=function(e){return t.shimHost.directoryExists(e)}:this.directoryExists=void 0,"realpath"in this.shimHost?this.realpath=function(e){return t.shimHost.realpath(e)}:this.realpath=void 0}return e.prototype.readDirectory=function(e,t,n,i,a){var o=r.getFileMatcherPatterns(e,n,i,this.shimHost.useCaseSensitiveFileNames(),this.shimHost.getCurrentDirectory());return JSON.parse(this.shimHost.readDirectory(e,JSON.stringify(t),JSON.stringify(o.basePaths),o.excludePattern,o.includeFilePattern,o.includeDirectoryPattern,a))},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e.prototype.readFile=function(e){return this.shimHost.readFile(e)},e.prototype.getDirectories=function(e){return JSON.parse(this.shimHost.getDirectories(e))},e}();function c(e,t,r,n){return l(e,t,!0,r,n)}function l(e,t,i,a,o){try{var s=function(e,t,n,i){var a;i&&(e.log(t),a=r.timestamp());var o=n();if(i){var s=r.timestamp();if(e.log(t+" completed in "+(s-a)+" msec"),r.isString(o)){var c=o;c.length>128&&(c=c.substring(0,128)+"..."),e.log(" result.length="+c.length+", result='"+JSON.stringify(c)+"'")}}return o}(e,t,a,o);return i?JSON.stringify({result:s}):s}catch(i){return i instanceof r.OperationCanceledException?JSON.stringify({canceled:!0}):(n(e,i),i.description=t,JSON.stringify({error:i}))}}r.CoreServicesShimHostAdapter=s;var _=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(e){this.factory.unregisterShim(this)},e}();function d(e,t){return e.map((function(e){return function(e,t){return{message:r.flattenDiagnosticMessageText(e.messageText,t),start:e.start,length:e.length,category:r.diagnosticCategoryName(e),code:e.code,reportsUnnecessary:e.reportsUnnecessary}}(e,t)}))}r.realizeDiagnostics=d;var p=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.host=r,i.languageService=n,i.logPerformance=!1,i.logger=i.host,i}return o(t,e),t.prototype.forwardJSONCall=function(e,t){return c(this.logger,e,t,this.logPerformance)},t.prototype.dispose=function(t){this.logger.log("dispose()"),this.languageService.dispose(),this.languageService=null,u&&u.CollectGarbage&&(u.CollectGarbage(),this.logger.log("CollectGarbage()")),this.logger=null,e.prototype.dispose.call(this,t)},t.prototype.refresh=function(e){this.forwardJSONCall("refresh("+e+")",(function(){return null}))},t.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall("cleanupSemanticCache()",(function(){return e.languageService.cleanupSemanticCache(),null}))},t.prototype.realizeDiagnostics=function(e){return d(e,r.getNewLineOrDefaultFromHost(this.host))},t.prototype.getSyntacticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getSyntacticClassifications('"+e+"', "+t+", "+n+")",(function(){return i.languageService.getSyntacticClassifications(e,r.createTextSpan(t,n))}))},t.prototype.getSemanticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getSemanticClassifications('"+e+"', "+t+", "+n+")",(function(){return i.languageService.getSemanticClassifications(e,r.createTextSpan(t,n))}))},t.prototype.getEncodedSyntacticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getEncodedSyntacticClassifications('"+e+"', "+t+", "+n+")",(function(){return f(i.languageService.getEncodedSyntacticClassifications(e,r.createTextSpan(t,n)))}))},t.prototype.getEncodedSemanticClassifications=function(e,t,n){var i=this;return this.forwardJSONCall("getEncodedSemanticClassifications('"+e+"', "+t+", "+n+")",(function(){return f(i.languageService.getEncodedSemanticClassifications(e,r.createTextSpan(t,n)))}))},t.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSyntacticDiagnostics('"+e+"')",(function(){var r=t.languageService.getSyntacticDiagnostics(e);return t.realizeDiagnostics(r)}))},t.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSemanticDiagnostics('"+e+"')",(function(){var r=t.languageService.getSemanticDiagnostics(e);return t.realizeDiagnostics(r)}))},t.prototype.getSuggestionDiagnostics=function(e){var t=this;return this.forwardJSONCall("getSuggestionDiagnostics('"+e+"')",(function(){return t.realizeDiagnostics(t.languageService.getSuggestionDiagnostics(e))}))},t.prototype.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall("getCompilerOptionsDiagnostics()",(function(){var t=e.languageService.getCompilerOptionsDiagnostics();return e.realizeDiagnostics(t)}))},t.prototype.getQuickInfoAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getQuickInfoAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getQuickInfoAtPosition(e,t)}))},t.prototype.getNameOrDottedNameSpan=function(e,t,r){var n=this;return this.forwardJSONCall("getNameOrDottedNameSpan('"+e+"', "+t+", "+r+")",(function(){return n.languageService.getNameOrDottedNameSpan(e,t,r)}))},t.prototype.getBreakpointStatementAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBreakpointStatementAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getBreakpointStatementAtPosition(e,t)}))},t.prototype.getSignatureHelpItems=function(e,t,r){var n=this;return this.forwardJSONCall("getSignatureHelpItems('"+e+"', "+t+")",(function(){return n.languageService.getSignatureHelpItems(e,t,r)}))},t.prototype.getDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getDefinitionAtPosition(e,t)}))},t.prototype.getDefinitionAndBoundSpan=function(e,t){var r=this;return this.forwardJSONCall("getDefinitionAndBoundSpan('"+e+"', "+t+")",(function(){return r.languageService.getDefinitionAndBoundSpan(e,t)}))},t.prototype.getTypeDefinitionAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getTypeDefinitionAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getTypeDefinitionAtPosition(e,t)}))},t.prototype.getImplementationAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getImplementationAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getImplementationAtPosition(e,t)}))},t.prototype.getRenameInfo=function(e,t,r){var n=this;return this.forwardJSONCall("getRenameInfo('"+e+"', "+t+")",(function(){return n.languageService.getRenameInfo(e,t,r)}))},t.prototype.getSmartSelectionRange=function(e,t){var r=this;return this.forwardJSONCall("getSmartSelectionRange('"+e+"', "+t+")",(function(){return r.languageService.getSmartSelectionRange(e,t)}))},t.prototype.findRenameLocations=function(e,t,r,n,i){var a=this;return this.forwardJSONCall("findRenameLocations('"+e+"', "+t+", "+r+", "+n+", "+i+")",(function(){return a.languageService.findRenameLocations(e,t,r,n,i)}))},t.prototype.getBraceMatchingAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getBraceMatchingAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getBraceMatchingAtPosition(e,t)}))},t.prototype.isValidBraceCompletionAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("isValidBraceCompletionAtPosition('"+e+"', "+t+", "+r+")",(function(){return n.languageService.isValidBraceCompletionAtPosition(e,t,r)}))},t.prototype.getSpanOfEnclosingComment=function(e,t,r){var n=this;return this.forwardJSONCall("getSpanOfEnclosingComment('"+e+"', "+t+")",(function(){return n.languageService.getSpanOfEnclosingComment(e,t,r)}))},t.prototype.getIndentationAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getIndentationAtPosition('"+e+"', "+t+")",(function(){var i=JSON.parse(r);return n.languageService.getIndentationAtPosition(e,t,i)}))},t.prototype.getReferencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getReferencesAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getReferencesAtPosition(e,t)}))},t.prototype.findReferences=function(e,t){var r=this;return this.forwardJSONCall("findReferences('"+e+"', "+t+")",(function(){return r.languageService.findReferences(e,t)}))},t.prototype.getOccurrencesAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getOccurrencesAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getOccurrencesAtPosition(e,t)}))},t.prototype.getDocumentHighlights=function(e,t,n){var i=this;return this.forwardJSONCall("getDocumentHighlights('"+e+"', "+t+")",(function(){var a=i.languageService.getDocumentHighlights(e,t,JSON.parse(n)),o=r.normalizeSlashes(e).toLowerCase();return r.filter(a,(function(e){return r.normalizeSlashes(e.fileName).toLowerCase()===o}))}))},t.prototype.getCompletionsAtPosition=function(e,t,r){var n=this;return this.forwardJSONCall("getCompletionsAtPosition('"+e+"', "+t+", "+r+")",(function(){return n.languageService.getCompletionsAtPosition(e,t,r)}))},t.prototype.getCompletionEntryDetails=function(e,t,r,n,i,a){var o=this;return this.forwardJSONCall("getCompletionEntryDetails('"+e+"', "+t+", '"+r+"')",(function(){var s=void 0===n?void 0:JSON.parse(n);return o.languageService.getCompletionEntryDetails(e,t,r,s,i,a)}))},t.prototype.getFormattingEditsForRange=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsForRange('"+e+"', "+t+", "+r+")",(function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsForRange(e,t,r,a)}))},t.prototype.getFormattingEditsForDocument=function(e,t){var r=this;return this.forwardJSONCall("getFormattingEditsForDocument('"+e+"')",(function(){var n=JSON.parse(t);return r.languageService.getFormattingEditsForDocument(e,n)}))},t.prototype.getFormattingEditsAfterKeystroke=function(e,t,r,n){var i=this;return this.forwardJSONCall("getFormattingEditsAfterKeystroke('"+e+"', "+t+", '"+r+"')",(function(){var a=JSON.parse(n);return i.languageService.getFormattingEditsAfterKeystroke(e,t,r,a)}))},t.prototype.getDocCommentTemplateAtPosition=function(e,t){var r=this;return this.forwardJSONCall("getDocCommentTemplateAtPosition('"+e+"', "+t+")",(function(){return r.languageService.getDocCommentTemplateAtPosition(e,t)}))},t.prototype.getNavigateToItems=function(e,t,r){var n=this;return this.forwardJSONCall("getNavigateToItems('"+e+"', "+t+", "+r+")",(function(){return n.languageService.getNavigateToItems(e,t,r)}))},t.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall("getNavigationBarItems('"+e+"')",(function(){return t.languageService.getNavigationBarItems(e)}))},t.prototype.getNavigationTree=function(e){var t=this;return this.forwardJSONCall("getNavigationTree('"+e+"')",(function(){return t.languageService.getNavigationTree(e)}))},t.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall("getOutliningSpans('"+e+"')",(function(){return t.languageService.getOutliningSpans(e)}))},t.prototype.getTodoComments=function(e,t){var r=this;return this.forwardJSONCall("getTodoComments('"+e+"')",(function(){return r.languageService.getTodoComments(e,JSON.parse(t))}))},t.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall("getEmitOutput('"+e+"')",(function(){return t.languageService.getEmitOutput(e)}))},t.prototype.getEmitOutputObject=function(e){var t=this;return l(this.logger,"getEmitOutput('"+e+"')",!1,(function(){return t.languageService.getEmitOutput(e)}),this.logPerformance)},t}(_);function f(e){return{spans:e.spans.join(","),endOfLineState:e.endOfLineState}}var m=function(e){function t(t,n){var i=e.call(this,t)||this;return i.logger=n,i.logPerformance=!1,i.classifier=r.createClassifier(),i}return o(t,e),t.prototype.getEncodedLexicalClassifications=function(e,t,r){var n=this;return void 0===r&&(r=!1),c(this.logger,"getEncodedLexicalClassifications",(function(){return f(n.classifier.getEncodedLexicalClassifications(e,t,r))}),this.logPerformance)},t.prototype.getClassificationsForLine=function(e,t,r){void 0===r&&(r=!1);for(var n=this.classifier.getClassificationsForLine(e,t,r),i="",a=0,o=n.entries;a=e.length)return t&&(t[s]=e),r(null,e);Or.lastIndex=n;var c=Or.exec(e);return o=i,i+=c[0],a=o+c[1],n=Or.lastIndex,u[a]||t&&t[a]===a?xe(_):t&&Object.prototype.hasOwnProperty.call(t,a)?f(t[a]):hr.lstat(a,d)}function d(e,n){if(e)return r(e);if(!n.isSymbolicLink())return u[a]=!0,t&&(t[a]=a),xe(_);if(!Pr){var i=n.dev.toString(32)+":"+n.ino.toString(32);if(c.hasOwnProperty(i))return p(null,c[i],a)}hr.stat(a,(function(e){if(e)return r(e);hr.readlink(a,(function(e,t){Pr||(c[i]=t),p(e,t)}))}))}function p(e,n,i){if(e)return r(e);var a=yr.resolve(o,n);t&&(t[i]=a),f(a)}function f(t){e=yr.resolve(t,e.slice(n)),l()}l()}},Rr=Ur;Ur.realpath=Ur,Ur.sync=Vr,Ur.realpathSync=Vr,Ur.monkeypatch=function(){hr.realpath=Ur,hr.realpathSync=Vr},Ur.unmonkeypatch=function(){hr.realpath=Br,hr.realpathSync=jr};var Br=hr.realpath,jr=hr.realpathSync,Kr=Oe.version,Jr=/^v[0-5]\./.test(Kr);function zr(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function Ur(e,t,r){if(Jr)return Br(e,t,r);"function"==typeof t&&(r=t,t=null),Br(e,t,(function(n,i){zr(n)?Lr.realpath(e,t,r):r(n,i)}))}function Vr(e,t){if(Jr)return jr(e,t);try{return jr(e,t)}catch(r){if(zr(r))return Lr.realpathSync(e,t);throw r}}var qr=function(e,t){for(var r=[],n=0;n=0&&u>0){for(n=[],a=r.length;l>=0&&!s;)l==c?(n.push(l),c=r.indexOf(e,l+1)):1==n.length?s=[n.pop(),u]:((i=n.pop())=0?c:u;n.length&&(s=[a,o])}return s}Hr.range=Xr;var Qr=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var n=[];var i=Gr("{","}",t);if(!i||/\$$/.test(i.pre))return[t];var a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body);var o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body);var s=a||o;var c=i.body.indexOf(",")>=0;if(!s&&!c)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+en+i.post,e(t)):[t];var u;if(s)u=i.body.split(/\.\./);else{if(1===(u=function e(t){if(!t)return[""];var r=[];var n=Gr("{","}",t);if(!n)return t.split(",");var i=n.pre;var a=n.body;var o=n.post;var s=i.split(",");s[s.length-1]+="{"+a+"}";var c=e(o);o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c));r.push.apply(r,s);return r}(i.body)).length)if(1===(u=e(u[0],!1).map(on)).length)return(_=i.post.length?e(i.post,!1):[""]).map((function(e){return i.pre+u[0]+e}))}var l=i.pre;var _=i.post.length?e(i.post,!1):[""];var d;if(s){var p=nn(u[0]),f=nn(u[1]),m=Math.max(u[0].length,u[1].length),g=3==u.length?Math.abs(nn(u[2])):1,y=cn;f0){var D=new Array(x+1).join("0");b=v<0?"-"+D+b.slice(1):D+b}}d.push(b)}}else d=qr(u,(function(t){return e(t,!1)}));for(var S=0;S=t}var ln=xn;xn.Minimatch=Dn;var _n={sep:"/"};try{_n=yr}catch(e){}var dn=xn.GLOBSTAR=Dn.GLOBSTAR={},pn={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},fn="[^/]",mn=fn+"*?",gn="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",yn="(?:(?!(?:\\/|^)\\.).)*?",hn=function(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}("().*{}+?[]^$\\!");var vn=/\/+/;function bn(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 xn(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 Dn(t,r).match(e))}function Dn(e,t){if(!(this instanceof Dn))return new Dn(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==_n.sep&&(e=e.split(_n.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 Sn(e,t){if(t||(t=this instanceof Dn?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:Qr(e)}xn.filter=function(e,t){return t=t||{},function(r,n,i){return xn(r,e,t)}},xn.defaults=function(e){if(!e||!Object.keys(e).length)return xn;var t=xn,r=function(r,n,i){return t.minimatch(r,n,bn(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,bn(e,n))},r},Dn.defaults=function(e){return e&&Object.keys(e).length?xn.defaults(e).Minimatch:Dn},Dn.prototype.debug=function(){},Dn.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);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(vn)})),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},Dn.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,a=e.length;i65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return dn;if(""===e)return"";var n,i="",a=!!r.nocase,o=!1,s=[],c=[],u=!1,l=-1,_=-1,d="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",p=this;function f(){if(n){switch(n){case"*":i+=mn,a=!0;break;case"?":i+=fn,a=!0;break;default:i+="\\"+n}p.debug("clearStateChar %j %j",n,i),n=!1}}for(var m,g=0,y=e.length;g-1;T--){var E=c[T],C=i.slice(0,E.reStart),k=i.slice(E.reStart,E.reEnd-8),N=i.slice(E.reEnd-8,E.reEnd),A=i.slice(E.reEnd);N+=A;var F=C.split("(").length-1,P=A;for(g=0;g=0&&!(n=e[i]);i--);for(i=0;i>> no match, partial?",e,_,t,d),_!==o))}if("string"==typeof u?(c=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,c)):(c=l.match(u),this.debug("pattern match",u,l,c)),!c)return!1}if(i===o&&a===s)return!0;if(i===o)return r;if(a===s)return i===o-1&&""===e[i];throw new Error("wtf?")};var En=Object.freeze({__proto__:null,default:{}}),Cn=a((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),kn=o(En),Nn=a((function(e){try{var t=kn;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=Cn}})),An=Object.freeze({__proto__:null,EventEmitter:function e(){m(this,e)}});function Fn(){}Fn.ok=function(){},Fn.strictEqual=function(){};var Pn=Object.freeze({__proto__:null,default:Fn});function wn(e){return"/"===e.charAt(0)}function In(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)}var On="win32"===Oe.platform?In:wn,Mn=wn,Ln=In;On.posix=Mn,On.win32=Ln;var Rn=Yn,Bn=Hn,jn=function(e,t,r){r||(r={});if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=!1!==r.strict,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0);e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(Xn))}(e,r),e.changedCwd=!1;var n=Oe.cwd();Wn(r,"cwd")?(e.cwd=yr.resolve(r.cwd),e.changedCwd=e.cwd!==n):e.cwd=n;e.root=r.root||yr.resolve(e.cwd,"/"),e.root=yr.resolve(e.root),"win32"===Oe.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=On(e.cwd)?e.cwd:Qn(e,e.cwd),"win32"===Oe.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,e.minimatch=new Gn(t,r),e.options=e.minimatch.options},Kn=Wn,Jn=Qn,zn=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;nthis.maxLength)return!1;if(!this.stat&&ni(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[t];if(!i){var a;try{a=hr.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(a&&a.isSymbolicLink())try{i=hr.statSync(t)}catch(e){i=a}else i=a}this.statCache[t]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||n,(!r||"FILE"!==n)&&n},si.prototype._mark=function(e){return Zn.mark(this,e)},si.prototype._makeAbs=function(e){return Zn.makeAbs(this,e)};var ci=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");Object.keys(t).forEach((function(e){n[e]=t[e]}));return n;function n(){for(var e=new Array(arguments.length),r=0;rn?(r.splice(0,n),xe((function(){t.apply(null,i)}))):delete pi[e]}}))}(e))}));function mi(e){for(var t=e.length,r=[],n=0;n1)return!0;for(var i=0;ithis.maxLength)return t();if(!this.stat&&vi(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return t(null,i);if(n&&"FILE"===i)return t()}var a=this.statCache[r];if(void 0!==a){if(!1===a)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?t():t(null,o,a)}var s=this,c=fi("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return hr.stat(r,(function(n,a){n?s._stat2(e,r,null,i,t):s._stat2(e,r,n,a,t)}));s._stat2(e,r,n,i,t)}));c&&hr.lstat(r,c)},Ti.prototype._stat2=function(e,t,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,i();var a="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,a&&"FILE"===o?i():i(null,o,n)}; -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ -var Ei={"{":"}","(":")","[":"]"},Ci=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,ki=/\\(.)|(^!|[*?{}()[\]]|\(\?)/,Ni=function(e,t){if("string"!=typeof e||""===e)return!1;if(function(e){if("string"!=typeof e||""===e)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}(e))return!0;var r,n=Ci;for(t&&!1===t.strict&&(n=ki);r=n.exec(e);){if(r[2])return!0;var i=r.index+r[0].length,a=r[1],o=a?Ei[a]:null;if(a&&o){var s=e.indexOf(o,i);-1!==s&&(i=s+1)}e=e.slice(i)}return!1},Ai=1/0,Fi="[object Symbol]",Pi=/&(?:amp|lt|gt|quot|#39|#96);/g,wi=RegExp(Pi.source),Ii="object"==f(n)&&n&&n.Object===Object&&n,Oi="object"==("undefined"==typeof self?"undefined":f(self))&&self&&self.Object===Object&&self,Mi=Ii||Oi||Function("return this")(); -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */var Li,Ri=(Li={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},function(e){return null==Li?void 0:Li[e]}),Bi=Object.prototype.toString,ji=Mi.Symbol,Ki=ji?ji.prototype:void 0,Ji=Ki?Ki.toString:void 0;function zi(e){if("string"==typeof e)return e;if(function(e){return"symbol"==f(e)||function(e){return!!e&&"object"==f(e)}(e)&&Bi.call(e)==Fi}(e))return Ji?Ji.call(e):"";var t=e+"";return"0"==t&&1/e==-Ai?"-0":t}var Ui=function(e){var t;return(e=null==(t=e)?"":zi(t))&&wi.test(e)?e.replace(Pi,Ri):e},Vi=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}));i(Vi);var qi=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.ArrayExpression="ArrayExpression",e.ArrayPattern="ArrayPattern",e.ArrowFunctionExpression="ArrowFunctionExpression",e.AssignmentExpression="AssignmentExpression",e.AssignmentPattern="AssignmentPattern",e.AwaitExpression="AwaitExpression",e.BigIntLiteral="BigIntLiteral",e.BinaryExpression="BinaryExpression",e.BlockStatement="BlockStatement",e.BreakStatement="BreakStatement",e.CallExpression="CallExpression",e.CatchClause="CatchClause",e.ClassBody="ClassBody",e.ClassDeclaration="ClassDeclaration",e.ClassExpression="ClassExpression",e.ClassProperty="ClassProperty",e.ConditionalExpression="ConditionalExpression",e.ContinueStatement="ContinueStatement",e.DebuggerStatement="DebuggerStatement",e.Decorator="Decorator",e.DoWhileStatement="DoWhileStatement",e.EmptyStatement="EmptyStatement",e.ExportAllDeclaration="ExportAllDeclaration",e.ExportDefaultDeclaration="ExportDefaultDeclaration",e.ExportNamedDeclaration="ExportNamedDeclaration",e.ExportSpecifier="ExportSpecifier",e.ExpressionStatement="ExpressionStatement",e.ForInStatement="ForInStatement",e.ForOfStatement="ForOfStatement",e.ForStatement="ForStatement",e.FunctionDeclaration="FunctionDeclaration",e.FunctionExpression="FunctionExpression",e.Identifier="Identifier",e.IfStatement="IfStatement",e.Import="Import",e.ImportDeclaration="ImportDeclaration",e.ImportDefaultSpecifier="ImportDefaultSpecifier",e.ImportNamespaceSpecifier="ImportNamespaceSpecifier",e.ImportSpecifier="ImportSpecifier",e.JSXAttribute="JSXAttribute",e.JSXClosingElement="JSXClosingElement",e.JSXClosingFragment="JSXClosingFragment",e.JSXElement="JSXElement",e.JSXEmptyExpression="JSXEmptyExpression",e.JSXExpressionContainer="JSXExpressionContainer",e.JSXFragment="JSXFragment",e.JSXIdentifier="JSXIdentifier",e.JSXMemberExpression="JSXMemberExpression",e.JSXOpeningElement="JSXOpeningElement",e.JSXOpeningFragment="JSXOpeningFragment",e.JSXSpreadAttribute="JSXSpreadAttribute",e.JSXSpreadChild="JSXSpreadChild",e.JSXText="JSXText",e.LabeledStatement="LabeledStatement",e.Literal="Literal",e.LogicalExpression="LogicalExpression",e.MemberExpression="MemberExpression",e.MetaProperty="MetaProperty",e.MethodDefinition="MethodDefinition",e.NewExpression="NewExpression",e.ObjectExpression="ObjectExpression",e.ObjectPattern="ObjectPattern",e.OptionalCallExpression="OptionalCallExpression",e.OptionalMemberExpression="OptionalMemberExpression",e.Program="Program",e.Property="Property",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.Super="Super",e.SwitchCase="SwitchCase",e.SwitchStatement="SwitchStatement",e.TaggedTemplateExpression="TaggedTemplateExpression",e.TemplateElement="TemplateElement",e.TemplateLiteral="TemplateLiteral",e.ThisExpression="ThisExpression",e.ThrowStatement="ThrowStatement",e.TryStatement="TryStatement",e.UnaryExpression="UnaryExpression",e.UpdateExpression="UpdateExpression",e.VariableDeclaration="VariableDeclaration",e.VariableDeclarator="VariableDeclarator",e.WhileStatement="WhileStatement",e.WithStatement="WithStatement",e.YieldExpression="YieldExpression",e.TSAbstractClassProperty="TSAbstractClassProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAnyKeyword="TSAnyKeyword",e.TSArrayType="TSArrayType",e.TSAsExpression="TSAsExpression",e.TSAsyncKeyword="TSAsyncKeyword",e.TSBooleanKeyword="TSBooleanKeyword",e.TSBigIntKeyword="TSBigIntKeyword",e.TSConditionalType="TSConditionalType",e.TSConstructorType="TSConstructorType",e.TSCallSignatureDeclaration="TSCallSignatureDeclaration",e.TSClassImplements="TSClassImplements",e.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",e.TSDeclareKeyword="TSDeclareKeyword",e.TSDeclareFunction="TSDeclareFunction",e.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",e.TSEnumDeclaration="TSEnumDeclaration",e.TSEnumMember="TSEnumMember",e.TSExportAssignment="TSExportAssignment",e.TSExportKeyword="TSExportKeyword",e.TSExternalModuleReference="TSExternalModuleReference",e.TSImportType="TSImportType",e.TSInferType="TSInferType",e.TSLiteralType="TSLiteralType",e.TSIndexedAccessType="TSIndexedAccessType",e.TSIndexSignature="TSIndexSignature",e.TSInterfaceBody="TSInterfaceBody",e.TSInterfaceDeclaration="TSInterfaceDeclaration",e.TSInterfaceHeritage="TSInterfaceHeritage",e.TSImportEqualsDeclaration="TSImportEqualsDeclaration",e.TSFunctionType="TSFunctionType",e.TSMethodSignature="TSMethodSignature",e.TSModuleBlock="TSModuleBlock",e.TSModuleDeclaration="TSModuleDeclaration",e.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",e.TSNonNullExpression="TSNonNullExpression",e.TSNeverKeyword="TSNeverKeyword",e.TSNullKeyword="TSNullKeyword",e.TSNumberKeyword="TSNumberKeyword",e.TSMappedType="TSMappedType",e.TSObjectKeyword="TSObjectKeyword",e.TSParameterProperty="TSParameterProperty",e.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSStaticKeyword="TSStaticKeyword",e.TSStringKeyword="TSStringKeyword",e.TSSymbolKeyword="TSSymbolKeyword",e.TSThisType="TSThisType",e.TSTypeAnnotation="TSTypeAnnotation",e.TSTypeAliasDeclaration="TSTypeAliasDeclaration",e.TSTypeAssertion="TSTypeAssertion",e.TSTypeLiteral="TSTypeLiteral",e.TSTypeOperator="TSTypeOperator",e.TSTypeParameter="TSTypeParameter",e.TSTypeParameterDeclaration="TSTypeParameterDeclaration",e.TSTypeParameterInstantiation="TSTypeParameterInstantiation",e.TSTypePredicate="TSTypePredicate",e.TSTypeReference="TSTypeReference",e.TSTypeQuery="TSTypeQuery",e.TSIntersectionType="TSIntersectionType",e.TSTupleType="TSTupleType",e.TSOptionalType="TSOptionalType",e.TSParenthesizedType="TSParenthesizedType",e.TSUnionType="TSUnionType",e.TSUndefinedKeyword="TSUndefinedKeyword",e.TSUnknownKeyword="TSUnknownKeyword",e.TSVoidKeyword="TSVoidKeyword"}(t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})),function(e){e.Boolean="Boolean",e.Identifier="Identifier",e.JSXIdentifier="JSXIdentifier",e.JSXText="JSXText",e.Keyword="Keyword",e.Null="Null",e.Numeric="Numeric",e.Punctuator="Punctuator",e.RegularExpression="RegularExpression",e.String="String",e.Template="Template",e.Block="Block",e.Line="Line"}(t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={}))}));i(qi);qi.AST_NODE_TYPES,qi.AST_TOKEN_TYPES;var Wi=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Vi);t.TSESTree=i,function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(qi)}));i(Wi);Wi.TSESTree;var Gi=a((function(e,t){var r,i=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},a=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var o=i(Ui),s=a(Fr),c=s.SyntaxKind,u=[c.EqualsToken,c.PlusEqualsToken,c.MinusEqualsToken,c.AsteriskEqualsToken,c.AsteriskAsteriskEqualsToken,c.SlashEqualsToken,c.PercentEqualsToken,c.LessThanLessThanEqualsToken,c.GreaterThanGreaterThanEqualsToken,c.GreaterThanGreaterThanGreaterThanEqualsToken,c.AmpersandEqualsToken,c.BarEqualsToken,c.CaretEqualsToken],l=[c.BarBarToken,c.AmpersandAmpersandToken,c.QuestionQuestionToken],_=(h(r={},c.OpenBraceToken,"{"),h(r,c.CloseBraceToken,"}"),h(r,c.OpenParenToken,"("),h(r,c.CloseParenToken,")"),h(r,c.OpenBracketToken,"["),h(r,c.CloseBracketToken,"]"),h(r,c.DotToken,"."),h(r,c.DotDotDotToken,"..."),h(r,c.SemicolonToken,","),h(r,c.CommaToken,","),h(r,c.LessThanToken,"<"),h(r,c.GreaterThanToken,">"),h(r,c.LessThanEqualsToken,"<="),h(r,c.GreaterThanEqualsToken,">="),h(r,c.EqualsEqualsToken,"=="),h(r,c.ExclamationEqualsToken,"!="),h(r,c.EqualsEqualsEqualsToken,"==="),h(r,c.InstanceOfKeyword,"instanceof"),h(r,c.ExclamationEqualsEqualsToken,"!=="),h(r,c.EqualsGreaterThanToken,"=>"),h(r,c.PlusToken,"+"),h(r,c.MinusToken,"-"),h(r,c.AsteriskToken,"*"),h(r,c.AsteriskAsteriskToken,"**"),h(r,c.SlashToken,"/"),h(r,c.PercentToken,"%"),h(r,c.PlusPlusToken,"++"),h(r,c.MinusMinusToken,"--"),h(r,c.LessThanLessThanToken,"<<"),h(r,c.LessThanSlashToken,">"),h(r,c.GreaterThanGreaterThanGreaterThanToken,">>>"),h(r,c.AmpersandToken,"&"),h(r,c.BarToken,"|"),h(r,c.CaretToken,"^"),h(r,c.ExclamationToken,"!"),h(r,c.TildeToken,"~"),h(r,c.AmpersandAmpersandToken,"&&"),h(r,c.BarBarToken,"||"),h(r,c.QuestionToken,"?"),h(r,c.ColonToken,":"),h(r,c.EqualsToken,"="),h(r,c.PlusEqualsToken,"+="),h(r,c.MinusEqualsToken,"-="),h(r,c.AsteriskEqualsToken,"*="),h(r,c.AsteriskAsteriskEqualsToken,"**="),h(r,c.SlashEqualsToken,"/="),h(r,c.PercentEqualsToken,"%="),h(r,c.LessThanLessThanEqualsToken,"<<="),h(r,c.GreaterThanGreaterThanEqualsToken,">>="),h(r,c.GreaterThanGreaterThanGreaterThanEqualsToken,">>>="),h(r,c.AmpersandEqualsToken,"&="),h(r,c.BarEqualsToken,"|="),h(r,c.CaretEqualsToken,"^="),h(r,c.AtToken,"@"),h(r,c.InKeyword,"in"),h(r,c.UniqueKeyword,"unique"),h(r,c.KeyOfKeyword,"keyof"),h(r,c.NewKeyword,"new"),h(r,c.ImportKeyword,"import"),h(r,c.ReadonlyKeyword,"readonly"),h(r,c.QuestionQuestionToken,"??"),h(r,c.QuestionDotToken,"?."),r);function d(e){return-1!==u.indexOf(e.kind)}function p(e){return-1!==l.indexOf(e.kind)}function f(e){return e.kind===c.SingleLineCommentTrivia||e.kind===c.MultiLineCommentTrivia}function m(e){return e.kind===c.JSDocComment}function g(e,t){var r=t.getLineAndCharacterOfPosition(e);return{line:r.line+1,column:r.character}}function y(e,t,r){return{start:g(e,r),end:g(t,r)}}function v(e){return e.kind>=c.FirstToken&&e.kind<=c.LastToken}function b(e){return e.kind>=c.JsxElement&&e.kind<=c.JsxAttribute}function x(e,t){for(;e;){if(t(e))return e;e=e.parent}}function D(e){return!!x(e,b)}function S(e){if(e.originalKeywordKind)switch(e.originalKeywordKind){case c.NullKeyword:return Wi.AST_TOKEN_TYPES.Null;case c.GetKeyword:case c.SetKeyword:case c.TypeKeyword:case c.ModuleKeyword:case c.AsyncKeyword:case c.IsKeyword:return Wi.AST_TOKEN_TYPES.Identifier;default:return Wi.AST_TOKEN_TYPES.Keyword}if(e.kind>=c.FirstKeyword&&e.kind<=c.LastFutureReservedWord)return e.kind===c.FalseKeyword||e.kind===c.TrueKeyword?Wi.AST_TOKEN_TYPES.Boolean:Wi.AST_TOKEN_TYPES.Keyword;if(e.kind>=c.FirstPunctuation&&e.kind<=c.LastBinaryOperator)return Wi.AST_TOKEN_TYPES.Punctuator;if(e.kind>=c.NoSubstitutionTemplateLiteral&&e.kind<=c.TemplateTail)return Wi.AST_TOKEN_TYPES.Template;switch(e.kind){case c.NumericLiteral:return Wi.AST_TOKEN_TYPES.Numeric;case c.JsxText:return Wi.AST_TOKEN_TYPES.JSXText;case c.StringLiteral:return!e.parent||e.parent.kind!==c.JsxAttribute&&e.parent.kind!==c.JsxElement?Wi.AST_TOKEN_TYPES.String:Wi.AST_TOKEN_TYPES.JSXText;case c.RegularExpressionLiteral:return Wi.AST_TOKEN_TYPES.RegularExpression;case c.Identifier:case c.ConstructorKeyword:case c.GetKeyword:case c.SetKeyword:}if(e.parent&&e.kind===c.Identifier){if(b(e.parent))return Wi.AST_TOKEN_TYPES.JSXIdentifier;if(e.parent.kind===c.PropertyAccessExpression&&D(e))return Wi.AST_TOKEN_TYPES.JSXIdentifier}return Wi.AST_TOKEN_TYPES.Identifier}function T(e,t){var r=e.kind===c.JsxText?e.getFullStart():e.getStart(t),n=e.getEnd(),i=t.text.slice(r,n),a={type:S(e),value:i,range:[r,n],loc:y(r,n,t)};return"RegularExpression"===a.type&&(a.regex={pattern:i.slice(1,i.lastIndexOf("/")),flags:i.slice(i.lastIndexOf("/")+1)}),a}function E(e,t){return e.kind===c.EndOfFileToken?!!e.jsDoc:0!==e.getWidth(t)}function C(e,t){if(void 0!==e)for(var r=0;re.end||n.pos===e.end)&&E(n,r)?t(n):void 0}))}(t)},t.findFirstMatchingAncestor=x,t.hasJSXAncestor=D,t.unescapeStringLiteralText=function(e){return o.default(e)},t.isComputedProperty=function(e){return e.kind===c.ComputedPropertyName},t.isOptional=function(e){return!!e.questionToken&&e.questionToken.kind===c.QuestionToken},t.getTokenType=S,t.convertToken=T,t.convertTokens=function(e){var t=[];return function r(n){if(!f(n)&&!m(n))if(v(n)&&n.kind!==c.EndOfFileToken){var i=T(n,e);i&&t.push(i)}else n.getChildren(e).forEach(r)}(e),t},t.createError=function(e,t,r){var n=e.getLineAndCharacterOfPosition(t);return{index:t,lineNumber:n.line+1,column:n.character,message:r}},t.nodeHasTokens=E,t.firstDefined=C}));i(Gi);Gi.isAssignmentOperator,Gi.isLogicalOperator,Gi.getTextForTokenKind,Gi.isESTreeClassMember,Gi.hasModifier,Gi.getLastModifier,Gi.isComma,Gi.isComment,Gi.isJSDocComment,Gi.getBinaryExpressionType,Gi.getLineAndCharacterFor,Gi.getLocFor,Gi.canContainDirective,Gi.getRange,Gi.isToken,Gi.isJSXToken,Gi.getDeclarationKind,Gi.getTSNodeAccessibility,Gi.findNextToken,Gi.findFirstMatchingAncestor,Gi.hasJSXAncestor,Gi.unescapeStringLiteralText,Gi.isComputedProperty,Gi.isOptional,Gi.getTokenType,Gi.convertToken,Gi.convertTokens,Gi.createError,Gi.nodeHasTokens,Gi.firstDefined;var Hi=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Fr),a=i.SyntaxKind;t.convertError=function(e){return Gi.createError(e.file,e.start,e.message||e.messageText)};var o=function(){function e(t,r){m(this,e),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.inTypeMode=!1,this.ast=t,this.options=Object.assign({},r)}return y(e,[{key:"getASTMaps",value:function(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}},{key:"convertProgram",value:function(){return this.converter(this.ast)}},{key:"converter",value:function(e,t,r,n){if(!e)return null;var i=this.inTypeMode,a=this.allowPattern;void 0!==r&&(this.inTypeMode=r),void 0!==n&&(this.allowPattern=n);var o=this.convertNode(e,t||e.parent);return this.registerTSNodeInNodeMap(e,o),this.inTypeMode=i,this.allowPattern=a,o}},{key:"fixExports",value:function(e,t){if(e.modifiers&&e.modifiers[0].kind===a.ExportKeyword){this.registerTSNodeInNodeMap(e,t);var r=e.modifiers[0],n=e.modifiers[1],i=n&&n.kind===a.DefaultKeyword,o=i?Gi.findNextToken(n,this.ast,this.ast):Gi.findNextToken(r,this.ast,this.ast);return t.range[0]=o.getStart(this.ast),t.loc=Gi.getLocFor(t.range[0],t.range[1],this.ast),i?this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:t,range:[r.getStart(this.ast),t.range[1]]}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportNamedDeclaration,declaration:t,specifiers:[],source:null,range:[r.getStart(this.ast),t.range[1]]})}return t}},{key:"registerTSNodeInNodeMap",value:function(e,t){t&&this.options.shouldPreserveNodeMaps&&(this.tsNodeToESTreeNodeMap.has(e)||this.tsNodeToESTreeNodeMap.set(e,t))}},{key:"convertPattern",value:function(e,t){return this.converter(e,t,this.inTypeMode,!0)}},{key:"convertChild",value:function(e,t){return this.converter(e,t,this.inTypeMode,!1)}},{key:"convertType",value:function(e,t){return this.converter(e,t,!0,!1)}},{key:"createNode",value:function(e,t){var r=t;return r.range||(r.range=Gi.getRange(e,this.ast)),r.loc||(r.loc=Gi.getLocFor(r.range[0],r.range[1],this.ast)),r&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(r,e),r}},{key:"convertTypeAnnotation",value:function(e,t){var r=t.kind===a.FunctionType||t.kind===a.ConstructorType?2:1,n=e.getFullStart()-r,i=Gi.getLocFor(n,e.end,this.ast);return{type:Wi.AST_NODE_TYPES.TSTypeAnnotation,loc:i,range:[n,e.end],typeAnnotation:this.convertType(e)}}},{key:"convertBodyExpressions",value:function(e,t){var r=this,n=Gi.canContainDirective(t);return e.map((function(e){var t=r.convertChild(e);if(n){if(t&&t.expression&&i.isExpressionStatement(e)&&i.isStringLiteral(e.expression)){var a=t.expression.raw;return t.directive=a.slice(1,-1),t}n=!1}return t})).filter((function(e){return e}))}},{key:"convertTypeArgumentsToTypeParameters",value:function(e){var t=this,r=Gi.findNextToken(e,this.ast,this.ast);return{type:Wi.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[e.pos-1,r.end],loc:Gi.getLocFor(e.pos-1,r.end,this.ast),params:e.map((function(e){return t.convertType(e)}))}}},{key:"convertTSTypeParametersToTypeParametersDeclaration",value:function(e){var t=this,r=Gi.findNextToken(e,this.ast,this.ast);return{type:Wi.AST_NODE_TYPES.TSTypeParameterDeclaration,range:[e.pos-1,r.end],loc:Gi.getLocFor(e.pos-1,r.end,this.ast),params:e.map((function(e){return t.convertType(e)}))}}},{key:"convertParameters",value:function(e){var t=this;return e&&e.length?e.map((function(e){var r=t.convertChild(e);return e.decorators&&e.decorators.length&&(r.decorators=e.decorators.map((function(e){return t.convertChild(e)}))),r})):[]}},{key:"deeplyCopy",value:function(e){var t=this,r="TS".concat(a[e.kind]);if(this.options.errorOnUnknownASTType&&!Wi.AST_NODE_TYPES[r])throw new Error('Unknown AST_NODE_TYPE: "'.concat(r,'"'));var n=this.createNode(e,{type:r});return Object.keys(e).filter((function(e){return!/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc)$/.test(e)})).forEach((function(r){"type"===r?n.typeAnnotation=e.type?t.convertTypeAnnotation(e.type,e):null:"typeArguments"===r?n.typeParameters=e.typeArguments?t.convertTypeArgumentsToTypeParameters(e.typeArguments):null:"typeParameters"===r?n.typeParameters=e.typeParameters?t.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters):null:"decorators"===r?e.decorators&&e.decorators.length&&(n.decorators=e.decorators.map((function(e){return t.convertChild(e)}))):Array.isArray(e[r])?n[r]=e[r].map((function(e){return t.convertChild(e)})):e[r]&&"object"===f(e[r])&&e[r].kind?n[r]=t.convertChild(e[r]):n[r]=e[r]})),n}},{key:"convertJSXTagName",value:function(e,t){var r;switch(e.kind){case a.PropertyAccessExpression:r=this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(e.expression,t),property:this.convertJSXTagName(e.name,t)});break;case a.ThisKeyword:r=this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXIdentifier,name:"this"});break;case a.Identifier:default:r=this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXIdentifier,name:e.text})}return this.registerTSNodeInNodeMap(e,r),r}},{key:"applyModifiersToResult",value:function(e,t){var r=this;if(t&&t.length){for(var n={},i=0;ie.range[1]&&(e.range[1]=t[1],e.loc.end=Gi.getLineAndCharacterFor(e.range[1],this.ast))}},{key:"convertNode",value:function(e,t){var r=this;switch(e.kind){case a.SourceFile:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(e.statements,e),sourceType:e.externalModuleIndicator?"module":"script",range:[e.getStart(this.ast),e.endOfFileToken.end]});case a.Block:return this.createNode(e,{type:Wi.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(e.statements,e)});case a.Identifier:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Identifier,name:e.text});case a.WithStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.WithStatement,object:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ReturnStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(e.expression)});case a.LabeledStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(e.label),body:this.convertChild(e.statement)});case a.ContinueStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(e.label)});case a.BreakStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.BreakStatement,label:this.convertChild(e.label)});case a.IfStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.IfStatement,test:this.convertChild(e.expression),consequent:this.convertChild(e.thenStatement),alternate:this.convertChild(e.elseStatement)});case a.SwitchStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(e.expression),cases:e.caseBlock.clauses.map((function(e){return r.convertChild(e)}))});case a.CaseClause:case a.DefaultClause:return this.createNode(e,{type:Wi.AST_NODE_TYPES.SwitchCase,test:e.kind===a.CaseClause?this.convertChild(e.expression):null,consequent:e.statements.map((function(e){return r.convertChild(e)}))});case a.ThrowStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(e.expression)});case a.TryStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TryStatement,block:this.convertChild(e.tryBlock),handler:this.convertChild(e.catchClause),finalizer:this.convertChild(e.finallyBlock)});case a.CatchClause:return this.createNode(e,{type:Wi.AST_NODE_TYPES.CatchClause,param:e.variableDeclaration?this.convertChild(e.variableDeclaration.name):null,body:this.convertChild(e.block)});case a.WhileStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.WhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.DoStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ForStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ForStatement,init:this.convertChild(e.initializer),test:this.convertChild(e.condition),update:this.convertChild(e.incrementor),body:this.convertChild(e.statement)});case a.ForInStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement)});case a.ForOfStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(e.initializer),right:this.convertChild(e.expression),body:this.convertChild(e.statement),await:Boolean(e.awaitModifier&&e.awaitModifier.kind===a.AwaitKeyword)});case a.FunctionDeclaration:var n=Gi.hasModifier(a.DeclareKeyword,e),o=this.createNode(e,{type:n||!e.body?Wi.AST_NODE_TYPES.TSDeclareFunction:Wi.AST_NODE_TYPES.FunctionDeclaration,id:this.convertChild(e.name),generator:!!e.asteriskToken,expression:!1,async:Gi.hasModifier(a.AsyncKeyword,e),params:this.convertParameters(e.parameters),body:this.convertChild(e.body)||void 0});return e.type&&(o.returnType=this.convertTypeAnnotation(e.type,e)),n&&(o.declare=!0),e.typeParameters&&(o.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),e.decorators&&(o.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),this.fixExports(e,o);case a.VariableDeclaration:var s=this.createNode(e,{type:Wi.AST_NODE_TYPES.VariableDeclarator,id:this.convertPattern(e.name),init:this.convertChild(e.initializer)});return e.exclamationToken&&(s.definite=!0),e.type&&(s.id.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(s.id,s.id.typeAnnotation.range)),s;case a.VariableStatement:var c=this.createNode(e,{type:Wi.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarationList.declarations.map((function(e){return r.convertChild(e)})),kind:Gi.getDeclarationKind(e.declarationList)});return e.decorators&&(c.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),Gi.hasModifier(a.DeclareKeyword,e)&&(c.declare=!0),this.fixExports(e,c);case a.VariableDeclarationList:return this.createNode(e,{type:Wi.AST_NODE_TYPES.VariableDeclaration,declarations:e.declarations.map((function(e){return r.convertChild(e)})),kind:Gi.getDeclarationKind(e)});case a.ExpressionStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ExpressionStatement,expression:this.convertChild(e.expression)});case a.ThisKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ThisExpression});case a.ArrayLiteralExpression:return this.allowPattern?this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map((function(e){return r.convertPattern(e)}))}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrayExpression,elements:e.elements.map((function(e){return r.convertChild(e)}))});case a.ObjectLiteralExpression:return this.allowPattern?this.createNode(e,{type:Wi.AST_NODE_TYPES.ObjectPattern,properties:e.properties.map((function(e){return r.convertPattern(e)}))}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ObjectExpression,properties:e.properties.map((function(e){return r.convertChild(e)}))});case a.PropertyAssignment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.converter(e.initializer,e,this.inTypeMode,this.allowPattern),computed:Gi.isComputedProperty(e.name),method:!1,shorthand:!1,kind:"init"});case a.ShorthandPropertyAssignment:return e.objectAssignmentInitializer?this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.name),right:this.convertChild(e.objectAssignmentInitializer)}),computed:!1,method:!1,shorthand:!0,kind:"init"}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:this.convertChild(e.name),computed:!1,method:!1,shorthand:!0,kind:"init"});case a.ComputedPropertyName:return this.convertChild(e.expression);case a.PropertyDeclaration:var u=Gi.hasModifier(a.AbstractKeyword,e),l=this.createNode(e,{type:u?Wi.AST_NODE_TYPES.TSAbstractClassProperty:Wi.AST_NODE_TYPES.ClassProperty,key:this.convertChild(e.name),value:this.convertChild(e.initializer),computed:Gi.isComputedProperty(e.name),static:Gi.hasModifier(a.StaticKeyword,e),readonly:Gi.hasModifier(a.ReadonlyKeyword,e)||void 0,declare:Gi.hasModifier(a.DeclareKeyword,e)});e.type&&(l.typeAnnotation=this.convertTypeAnnotation(e.type,e)),e.decorators&&(l.decorators=e.decorators.map((function(e){return r.convertChild(e)})));var _=Gi.getTSNodeAccessibility(e);return _&&(l.accessibility=_),e.name.kind!==a.Identifier&&e.name.kind!==a.ComputedPropertyName||!e.questionToken||(l.optional=!0),e.exclamationToken&&(l.definite=!0),l.key.type===Wi.AST_NODE_TYPES.Literal&&e.questionToken&&(l.optional=!0),l;case a.GetAccessor:case a.SetAccessor:case a.MethodDeclaration:var d,p=this.createNode(e,{type:Wi.AST_NODE_TYPES.FunctionExpression,id:null,generator:!!e.asteriskToken,expression:!1,async:Gi.hasModifier(a.AsyncKeyword,e),body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end],params:[]});if(e.type&&(p.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(p.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(p,p.typeParameters.range)),t.kind===a.ObjectLiteralExpression)p.params=e.parameters.map((function(e){return r.convertChild(e)})),d=this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.name),value:p,computed:Gi.isComputedProperty(e.name),method:e.kind===a.MethodDeclaration,shorthand:!1,kind:"init"});else{p.params=this.convertParameters(e.parameters);var f=Gi.hasModifier(a.AbstractKeyword,e)?Wi.AST_NODE_TYPES.TSAbstractMethodDefinition:Wi.AST_NODE_TYPES.MethodDefinition;d=this.createNode(e,{type:f,key:this.convertChild(e.name),value:p,computed:Gi.isComputedProperty(e.name),static:Gi.hasModifier(a.StaticKeyword,e),kind:"method"}),e.decorators&&(d.decorators=e.decorators.map((function(e){return r.convertChild(e)})));var m=Gi.getTSNodeAccessibility(e);m&&(d.accessibility=m)}return d.key.type===Wi.AST_NODE_TYPES.Identifier&&e.questionToken&&(d.key.optional=!0),e.kind===a.GetAccessor?d.kind="get":e.kind===a.SetAccessor?d.kind="set":d.static||e.name.kind!==a.StringLiteral||"constructor"!==e.name.text||d.type===Wi.AST_NODE_TYPES.Property||(d.kind="constructor"),d;case a.Constructor:var g=Gi.getLastModifier(e),y=g&&Gi.findNextToken(g,e,this.ast)||e.getFirstToken(),h=this.createNode(e,{type:Wi.AST_NODE_TYPES.FunctionExpression,id:null,params:this.convertParameters(e.parameters),generator:!1,expression:!1,async:!1,body:this.convertChild(e.body),range:[e.parameters.pos-1,e.end]});e.typeParameters&&(h.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters),this.fixParentLocation(h,h.typeParameters.range)),e.type&&(h.returnType=this.convertTypeAnnotation(e.type,e));var v=this.createNode(e,{type:Wi.AST_NODE_TYPES.Identifier,name:"constructor",range:[y.getStart(this.ast),y.end]}),b=Gi.hasModifier(a.StaticKeyword,e),x=this.createNode(e,{type:Gi.hasModifier(a.AbstractKeyword,e)?Wi.AST_NODE_TYPES.TSAbstractMethodDefinition:Wi.AST_NODE_TYPES.MethodDefinition,key:v,value:h,computed:!1,static:b,kind:b?"method":"constructor"}),D=Gi.getTSNodeAccessibility(e);return D&&(x.accessibility=D),x;case a.FunctionExpression:var S=this.createNode(e,{type:Wi.AST_NODE_TYPES.FunctionExpression,id:this.convertChild(e.name),generator:!!e.asteriskToken,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:Gi.hasModifier(a.AsyncKeyword,e),expression:!1});return e.type&&(S.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(S.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),S;case a.SuperKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Super});case a.ArrayBindingPattern:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrayPattern,elements:e.elements.map((function(e){return r.convertPattern(e)}))});case a.OmittedExpression:return null;case a.ObjectBindingPattern:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ObjectPattern,properties:e.elements.map((function(e){return r.convertPattern(e)}))});case a.BindingElement:if(t.kind===a.ArrayBindingPattern){var T=this.convertChild(e.name,t);return e.initializer?this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:T,right:this.convertChild(e.initializer)}):e.dotDotDotToken?this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:T}):T}var E;return E=e.dotDotDotToken?this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.propertyName||e.name)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Property,key:this.convertChild(e.propertyName||e.name),value:this.convertChild(e.name),computed:Boolean(e.propertyName&&e.propertyName.kind===a.ComputedPropertyName),method:!1,shorthand:!e.propertyName,kind:"init"}),e.initializer&&(E.value=this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:this.convertChild(e.name),right:this.convertChild(e.initializer),range:[e.name.getStart(this.ast),e.initializer.end]})),E;case a.ArrowFunction:var C=this.createNode(e,{type:Wi.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(e.parameters),body:this.convertChild(e.body),async:Gi.hasModifier(a.AsyncKeyword,e),expression:e.body.kind!==a.Block});return e.type&&(C.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(C.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),C;case a.YieldExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.YieldExpression,delegate:!!e.asteriskToken,argument:this.convertChild(e.expression)});case a.AwaitExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(e.expression)});case a.NoSubstitutionTemplateLiteral:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-1),cooked:e.text},tail:!0})],expressions:[]});case a.TemplateExpression:var k=this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(e.head)],expressions:[]});return e.templateSpans.forEach((function(e){k.expressions.push(r.convertChild(e.expression)),k.quasis.push(r.convertChild(e.literal))})),k;case a.TaggedTemplateExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TaggedTemplateExpression,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,tag:this.convertChild(e.tag),quasi:this.convertChild(e.template)});case a.TemplateHead:case a.TemplateMiddle:case a.TemplateTail:var N=e.kind===a.TemplateTail;return this.createNode(e,{type:Wi.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(e.getStart(this.ast)+1,e.end-(N?1:2)),cooked:e.text},tail:N});case a.SpreadAssignment:case a.SpreadElement:return this.allowPattern?this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:this.convertPattern(e.expression)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(e.expression)});case a.Parameter:var A,F;return e.dotDotDotToken?A=F=this.createNode(e,{type:Wi.AST_NODE_TYPES.RestElement,argument:this.convertChild(e.name)}):e.initializer?(A=this.convertChild(e.name),F=this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:A,right:this.convertChild(e.initializer)}),e.modifiers&&(F.range[0]=A.range[0],F.loc=Gi.getLocFor(F.range[0],F.range[1],this.ast))):A=F=this.convertChild(e.name,t),e.type&&(A.typeAnnotation=this.convertTypeAnnotation(e.type,e),this.fixParentLocation(A,A.typeAnnotation.range)),e.questionToken&&(e.questionToken.end>A.range[1]&&(A.range[1]=e.questionToken.end,A.loc.end=Gi.getLineAndCharacterFor(A.range[1],this.ast)),A.optional=!0),e.modifiers?this.createNode(e,{type:Wi.AST_NODE_TYPES.TSParameterProperty,accessibility:Gi.getTSNodeAccessibility(e)||void 0,readonly:Gi.hasModifier(a.ReadonlyKeyword,e)||void 0,static:Gi.hasModifier(a.StaticKeyword,e)||void 0,export:Gi.hasModifier(a.ExportKeyword,e)||void 0,parameter:F}):F;case a.ClassDeclaration:case a.ClassExpression:var P=e.heritageClauses||[],w=e.kind===a.ClassDeclaration?Wi.AST_NODE_TYPES.ClassDeclaration:Wi.AST_NODE_TYPES.ClassExpression,I=P.find((function(e){return e.token===a.ExtendsKeyword})),O=P.find((function(e){return e.token===a.ImplementsKeyword})),M=this.createNode(e,{type:w,id:this.convertChild(e.name),body:this.createNode(e,{type:Wi.AST_NODE_TYPES.ClassBody,body:[],range:[e.members.pos-1,e.end]}),superClass:I&&I.types[0]?this.convertChild(I.types[0].expression):null});if(I){if(I.types.length>1)throw Gi.createError(this.ast,I.types[1].pos,"Classes can only extend a single class.");I.types[0]&&I.types[0].typeArguments&&(M.superTypeParameters=this.convertTypeArgumentsToTypeParameters(I.types[0].typeArguments))}e.typeParameters&&(M.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),O&&(M.implements=O.types.map((function(e){return r.convertChild(e)}))),Gi.hasModifier(a.AbstractKeyword,e)&&(M.abstract=!0),Gi.hasModifier(a.DeclareKeyword,e)&&(M.declare=!0),e.decorators&&(M.decorators=e.decorators.map((function(e){return r.convertChild(e)})));var L=e.members.filter(Gi.isESTreeClassMember);return L.length&&(M.body.body=L.map((function(e){return r.convertChild(e)}))),this.fixExports(e,M);case a.ModuleBlock:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(e.statements,e)});case a.ImportDeclaration:var R=this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:[]});if(e.importClause&&(e.importClause.name&&R.specifiers.push(this.convertChild(e.importClause)),e.importClause.namedBindings))switch(e.importClause.namedBindings.kind){case a.NamespaceImport:R.specifiers.push(this.convertChild(e.importClause.namedBindings));break;case a.NamedImports:R.specifiers=R.specifiers.concat(e.importClause.namedBindings.elements.map((function(e){return r.convertChild(e)})))}return R;case a.NamespaceImport:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(e.name)});case a.ImportSpecifier:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(e.name),imported:this.convertChild(e.propertyName||e.name)});case a.ImportClause:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ImportDefaultSpecifier,local:this.convertChild(e.name),range:[e.getStart(this.ast),e.name.end]});case a.ExportDeclaration:return e.exportClause?this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(e.moduleSpecifier),specifiers:e.exportClause.elements.map((function(e){return r.convertChild(e)})),declaration:null}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(e.moduleSpecifier)});case a.ExportSpecifier:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(e.propertyName||e.name),exported:this.convertChild(e.name)});case a.ExportAssignment:return e.isExportEquals?this.createNode(e,{type:Wi.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(e.expression)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(e.expression)});case a.PrefixUnaryExpression:case a.PostfixUnaryExpression:var B=Gi.getTextForTokenKind(e.operator)||"";return/^(?:\+\+|--)$/.test(B)?this.createNode(e,{type:Wi.AST_NODE_TYPES.UpdateExpression,operator:B,prefix:e.kind===a.PrefixUnaryExpression,argument:this.convertChild(e.operand)}):this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:B,prefix:e.kind===a.PrefixUnaryExpression,argument:this.convertChild(e.operand)});case a.DeleteExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(e.expression)});case a.VoidExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(e.expression)});case a.TypeOfExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(e.expression)});case a.TypeOperator:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeOperator,operator:Gi.getTextForTokenKind(e.operator),typeAnnotation:this.convertChild(e.type)});case a.BinaryExpression:if(Gi.isComma(e.operatorToken)){var j=this.createNode(e,{type:Wi.AST_NODE_TYPES.SequenceExpression,expressions:[]}),K=this.convertChild(e.left);return K.type===Wi.AST_NODE_TYPES.SequenceExpression&&e.left.kind!==a.ParenthesizedExpression?j.expressions=j.expressions.concat(K.expressions):j.expressions.push(K),j.expressions.push(this.convertChild(e.right)),j}var J=Gi.getBinaryExpressionType(e.operatorToken);return this.allowPattern&&J===Wi.AST_NODE_TYPES.AssignmentExpression?this.createNode(e,{type:Wi.AST_NODE_TYPES.AssignmentPattern,left:this.convertPattern(e.left,e),right:this.convertChild(e.right)}):this.createNode(e,{type:J,operator:Gi.getTextForTokenKind(e.operatorToken.kind),left:this.converter(e.left,e,this.inTypeMode,J===Wi.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(e.right)});case a.PropertyAccessExpression:var z=this.convertChild(e.expression),U=this.convertChild(e.name),V=void 0!==e.questionDotToken,q=(z.type===Wi.AST_NODE_TYPES.OptionalMemberExpression||z.type===Wi.AST_NODE_TYPES.OptionalCallExpression)&&e.expression.kind!==i.SyntaxKind.ParenthesizedExpression;return V||q?this.createNode(e,{type:Wi.AST_NODE_TYPES.OptionalMemberExpression,object:z,property:U,computed:!1,optional:V}):this.createNode(e,{type:Wi.AST_NODE_TYPES.MemberExpression,object:z,property:U,computed:!1,optional:!1});case a.ElementAccessExpression:var W=this.convertChild(e.expression),G=this.convertChild(e.argumentExpression),H=void 0!==e.questionDotToken,Y=(W.type===Wi.AST_NODE_TYPES.OptionalMemberExpression||W.type===Wi.AST_NODE_TYPES.OptionalCallExpression)&&e.expression.kind!==i.SyntaxKind.ParenthesizedExpression;return H||Y?this.createNode(e,{type:Wi.AST_NODE_TYPES.OptionalMemberExpression,object:W,property:G,computed:!0,optional:H}):this.createNode(e,{type:Wi.AST_NODE_TYPES.MemberExpression,object:W,property:G,computed:!0,optional:!1});case a.CallExpression:var X,Q=this.convertChild(e.expression),$=e.arguments.map((function(e){return r.convertChild(e)})),Z=void 0!==e.questionDotToken,ee=(Q.type===Wi.AST_NODE_TYPES.OptionalMemberExpression||Q.type===Wi.AST_NODE_TYPES.OptionalCallExpression)&&e.expression.kind!==i.SyntaxKind.ParenthesizedExpression;return X=Z||ee?this.createNode(e,{type:Wi.AST_NODE_TYPES.OptionalCallExpression,callee:Q,arguments:$,optional:Z}):this.createNode(e,{type:Wi.AST_NODE_TYPES.CallExpression,callee:Q,arguments:$,optional:!1}),e.typeArguments&&(X.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),X;case a.NewExpression:var te=this.createNode(e,{type:Wi.AST_NODE_TYPES.NewExpression,callee:this.convertChild(e.expression),arguments:e.arguments?e.arguments.map((function(e){return r.convertChild(e)})):[]});return e.typeArguments&&(te.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),te;case a.ConditionalExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(e.condition),consequent:this.convertChild(e.whenTrue),alternate:this.convertChild(e.whenFalse)});case a.MetaProperty:return this.createNode(e,{type:Wi.AST_NODE_TYPES.MetaProperty,meta:this.createNode(e.getFirstToken(),{type:Wi.AST_NODE_TYPES.Identifier,name:Gi.getTextForTokenKind(e.keywordToken)}),property:this.convertChild(e.name)});case a.Decorator:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Decorator,expression:this.convertChild(e.expression)});case a.StringLiteral:var re=this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,raw:"",value:""});return re.raw=this.ast.text.slice(re.range[0],re.range[1]),t.name&&t.name===e?re.value=e.text:re.value=Gi.unescapeStringLiteralText(e.text),re;case a.NumericLiteral:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:Number(e.text),raw:e.getText()});case a.BigIntLiteral:var ne=this.createNode(e,{type:Wi.AST_NODE_TYPES.BigIntLiteral,raw:"",value:""});return ne.raw=this.ast.text.slice(ne.range[0],ne.range[1]),ne.value=ne.raw.slice(0,-1),ne;case a.RegularExpressionLiteral:var ie=e.text.slice(1,e.text.lastIndexOf("/")),ae=e.text.slice(e.text.lastIndexOf("/")+1),oe=null;try{oe=new RegExp(ie,ae)}catch(e){oe=null}return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:oe,raw:e.text,regex:{pattern:ie,flags:ae}});case a.TrueKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case a.FalseKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case a.NullKeyword:return this.inTypeMode?this.createNode(e,{type:Wi.AST_NODE_TYPES.TSNullKeyword}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:null,raw:"null"});case a.ImportKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.Import});case a.EmptyStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.EmptyStatement});case a.DebuggerStatement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.DebuggerStatement});case a.JsxElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(e.openingElement),closingElement:this.convertChild(e.closingElement),children:e.children.map((function(e){return r.convertChild(e)}))});case a.JsxFragment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(e.openingFragment),closingFragment:this.convertChild(e.closingFragment),children:e.children.map((function(e){return r.convertChild(e)}))});case a.JsxSelfClosingElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,selfClosing:!0,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map((function(e){return r.convertChild(e)})),range:Gi.getRange(e,this.ast)}),closingElement:null,children:[]});case a.JsxOpeningElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXOpeningElement,typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0,selfClosing:!1,name:this.convertJSXTagName(e.tagName,e),attributes:e.attributes.properties.map((function(e){return r.convertChild(e)}))});case a.JsxClosingElement:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(e.tagName,e)});case a.JsxOpeningFragment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXOpeningFragment});case a.JsxClosingFragment:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXClosingFragment});case a.JsxExpression:var se=e.expression?this.convertChild(e.expression):this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXEmptyExpression,range:[e.getStart(this.ast)+1,e.getEnd()-1]});return e.dotDotDotToken?this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXSpreadChild,expression:se}):this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXExpressionContainer,expression:se});case a.JsxAttribute:var ce=this.convertChild(e.name);return ce.type=Wi.AST_NODE_TYPES.JSXIdentifier,this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXAttribute,name:ce,value:this.convertChild(e.initializer)});case a.JsxText:var ue=e.getFullStart(),le=e.getEnd();return this.options.useJSXTextNode?this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXText,value:this.ast.text.slice(ue,le),raw:this.ast.text.slice(ue,le),range:[ue,le]}):this.createNode(e,{type:Wi.AST_NODE_TYPES.Literal,value:this.ast.text.slice(ue,le),raw:this.ast.text.slice(ue,le),range:[ue,le]});case a.JsxSpreadAttribute:return this.createNode(e,{type:Wi.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(e.expression)});case a.QualifiedName:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(e.left),right:this.convertChild(e.right)});case a.TypeReference:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeReference,typeName:this.convertType(e.typeName),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):void 0});case a.TypeParameter:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeParameter,name:this.convertType(e.name),constraint:e.constraint?this.convertType(e.constraint):void 0,default:e.default?this.convertType(e.default):void 0});case a.ThisType:case a.AnyKeyword:case a.BigIntKeyword:case a.BooleanKeyword:case a.NeverKeyword:case a.NumberKeyword:case a.ObjectKeyword:case a.StringKeyword:case a.SymbolKeyword:case a.UnknownKeyword:case a.VoidKeyword:case a.UndefinedKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES["TS".concat(a[e.kind])]});case a.NonNullExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(e.expression)});case a.TypeLiteral:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeLiteral,members:e.members.map((function(e){return r.convertChild(e)}))});case a.ArrayType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSArrayType,elementType:this.convertType(e.elementType)});case a.IndexedAccessType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertType(e.objectType),indexType:this.convertType(e.indexType)});case a.ConditionalType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSConditionalType,checkType:this.convertType(e.checkType),extendsType:this.convertType(e.extendsType),trueType:this.convertType(e.trueType),falseType:this.convertType(e.falseType)});case a.TypeQuery:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertType(e.exprName)});case a.MappedType:var _e=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSMappedType,typeParameter:this.convertType(e.typeParameter)});return e.readonlyToken&&(e.readonlyToken.kind===a.ReadonlyKeyword?_e.readonly=!0:_e.readonly=Gi.getTextForTokenKind(e.readonlyToken.kind)),e.questionToken&&(e.questionToken.kind===a.QuestionToken?_e.optional=!0:_e.optional=Gi.getTextForTokenKind(e.questionToken.kind)),e.type&&(_e.typeAnnotation=this.convertType(e.type)),_e;case a.ParenthesizedExpression:return this.convertChild(e.expression,t);case a.TypeAliasDeclaration:var de=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeAliasDeclaration,id:this.convertChild(e.name),typeAnnotation:this.convertType(e.type)});return Gi.hasModifier(a.DeclareKeyword,e)&&(de.declare=!0),e.typeParameters&&(de.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),this.fixExports(e,de);case a.MethodSignature:var pe=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSMethodSignature,computed:Gi.isComputedProperty(e.name),key:this.convertChild(e.name),params:this.convertParameters(e.parameters)});Gi.isOptional(e)&&(pe.optional=!0),e.type&&(pe.returnType=this.convertTypeAnnotation(e.type,e)),Gi.hasModifier(a.ReadonlyKeyword,e)&&(pe.readonly=!0),e.typeParameters&&(pe.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters));var fe=Gi.getTSNodeAccessibility(e);return fe&&(pe.accessibility=fe),Gi.hasModifier(a.ExportKeyword,e)&&(pe.export=!0),Gi.hasModifier(a.StaticKeyword,e)&&(pe.static=!0),pe;case a.PropertySignature:var me=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSPropertySignature,optional:Gi.isOptional(e)||void 0,computed:Gi.isComputedProperty(e.name),key:this.convertChild(e.name),typeAnnotation:e.type?this.convertTypeAnnotation(e.type,e):void 0,initializer:this.convertChild(e.initializer)||void 0,readonly:Gi.hasModifier(a.ReadonlyKeyword,e)||void 0,static:Gi.hasModifier(a.StaticKeyword,e)||void 0,export:Gi.hasModifier(a.ExportKeyword,e)||void 0}),ge=Gi.getTSNodeAccessibility(e);return ge&&(me.accessibility=ge),me;case a.IndexSignature:var ye=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSIndexSignature,parameters:e.parameters.map((function(e){return r.convertChild(e)}))});e.type&&(ye.typeAnnotation=this.convertTypeAnnotation(e.type,e)),Gi.hasModifier(a.ReadonlyKeyword,e)&&(ye.readonly=!0);var he=Gi.getTSNodeAccessibility(e);return he&&(ye.accessibility=he),Gi.hasModifier(a.ExportKeyword,e)&&(ye.export=!0),Gi.hasModifier(a.StaticKeyword,e)&&(ye.static=!0),ye;case a.ConstructorType:case a.FunctionType:case a.ConstructSignature:case a.CallSignature:var ve;switch(e.kind){case a.ConstructSignature:ve=Wi.AST_NODE_TYPES.TSConstructSignatureDeclaration;break;case a.CallSignature:ve=Wi.AST_NODE_TYPES.TSCallSignatureDeclaration;break;case a.FunctionType:ve=Wi.AST_NODE_TYPES.TSFunctionType;break;case a.ConstructorType:default:ve=Wi.AST_NODE_TYPES.TSConstructorType}var be=this.createNode(e,{type:ve,params:this.convertParameters(e.parameters)});return e.type&&(be.returnType=this.convertTypeAnnotation(e.type,e)),e.typeParameters&&(be.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),be;case a.ExpressionWithTypeArguments:var xe=this.createNode(e,{type:t&&t.kind===a.InterfaceDeclaration?Wi.AST_NODE_TYPES.TSInterfaceHeritage:Wi.AST_NODE_TYPES.TSClassImplements,expression:this.convertChild(e.expression)});return e.typeArguments&&(xe.typeParameters=this.convertTypeArgumentsToTypeParameters(e.typeArguments)),xe;case a.InterfaceDeclaration:var De=e.heritageClauses||[],Se=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(e,{type:Wi.AST_NODE_TYPES.TSInterfaceBody,body:e.members.map((function(e){return r.convertChild(e)})),range:[e.members.pos-1,e.end]}),id:this.convertChild(e.name)});if(e.typeParameters&&(Se.typeParameters=this.convertTSTypeParametersToTypeParametersDeclaration(e.typeParameters)),De.length>0){var Te=[],Ee=[],Ce=!0,ke=!1,Ne=void 0;try{for(var Ae,Fe=De[Symbol.iterator]();!(Ce=(Ae=Fe.next()).done);Ce=!0){var Pe=Ae.value;if(Pe.token===a.ExtendsKeyword){var we=!0,Ie=!1,Oe=void 0;try{for(var Me,Le=Pe.types[Symbol.iterator]();!(we=(Me=Le.next()).done);we=!0){var Re=Me.value;Te.push(this.convertChild(Re,e))}}catch(e){Ie=!0,Oe=e}finally{try{we||null==Le.return||Le.return()}finally{if(Ie)throw Oe}}}else if(Pe.token===a.ImplementsKeyword){var Be=!0,je=!1,Ke=void 0;try{for(var Je,ze=Pe.types[Symbol.iterator]();!(Be=(Je=ze.next()).done);Be=!0){var Ue=Je.value;Ee.push(this.convertChild(Ue,e))}}catch(e){je=!0,Ke=e}finally{try{Be||null==ze.return||ze.return()}finally{if(je)throw Ke}}}}}catch(e){ke=!0,Ne=e}finally{try{Ce||null==Fe.return||Fe.return()}finally{if(ke)throw Ne}}Te.length&&(Se.extends=Te),Ee.length&&(Se.implements=Ee)}return e.decorators&&(Se.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),Gi.hasModifier(a.AbstractKeyword,e)&&(Se.abstract=!0),Gi.hasModifier(a.DeclareKeyword,e)&&(Se.declare=!0),this.fixExports(e,Se);case a.TypePredicate:var Ve=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypePredicate,asserts:void 0!==e.assertsModifier,parameterName:this.convertChild(e.parameterName),typeAnnotation:null});return e.type&&(Ve.typeAnnotation=this.convertTypeAnnotation(e.type,e),Ve.typeAnnotation.loc=Ve.typeAnnotation.typeAnnotation.loc,Ve.typeAnnotation.range=Ve.typeAnnotation.typeAnnotation.range),Ve;case a.ImportType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSImportType,isTypeOf:!!e.isTypeOf,parameter:this.convertChild(e.argument),qualifier:this.convertChild(e.qualifier),typeParameters:e.typeArguments?this.convertTypeArgumentsToTypeParameters(e.typeArguments):null});case a.EnumDeclaration:var qe=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSEnumDeclaration,id:this.convertChild(e.name),members:e.members.map((function(e){return r.convertChild(e)}))});return this.applyModifiersToResult(qe,e.modifiers),e.decorators&&(qe.decorators=e.decorators.map((function(e){return r.convertChild(e)}))),this.fixExports(e,qe);case a.EnumMember:var We=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSEnumMember,id:this.convertChild(e.name)});return e.initializer&&(We.initializer=this.convertChild(e.initializer)),We;case a.ModuleDeclaration:var Ge=this.createNode(e,{type:Wi.AST_NODE_TYPES.TSModuleDeclaration,id:this.convertChild(e.name)});return e.body&&(Ge.body=this.convertChild(e.body)),this.applyModifiersToResult(Ge,e.modifiers),e.flags&i.NodeFlags.GlobalAugmentation&&(Ge.global=!0),this.fixExports(e,Ge);case a.OptionalType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertType(e.type)});case a.ParenthesizedType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSParenthesizedType,typeAnnotation:this.convertType(e.type)});case a.TupleType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTupleType,elementTypes:e.elementTypes.map((function(e){return r.convertType(e)}))});case a.UnionType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSUnionType,types:e.types.map((function(e){return r.convertType(e)}))});case a.IntersectionType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSIntersectionType,types:e.types.map((function(e){return r.convertType(e)}))});case a.RestType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertType(e.type)});case a.AsExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(e.expression),typeAnnotation:this.convertType(e.type)});case a.InferType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSInferType,typeParameter:this.convertType(e.typeParameter)});case a.LiteralType:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSLiteralType,literal:this.convertType(e.literal)});case a.TypeAssertionExpression:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertType(e.type),expression:this.convertChild(e.expression)});case a.ImportEqualsDeclaration:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(e.name),moduleReference:this.convertChild(e.moduleReference),isExport:Gi.hasModifier(a.ExportKeyword,e)});case a.ExternalModuleReference:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(e.expression)});case a.NamespaceExportDeclaration:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(e.name)});case a.AbstractKeyword:return this.createNode(e,{type:Wi.AST_NODE_TYPES.TSAbstractKeyword});default:return this.deeplyCopy(e)}}}]),e}();t.Converter=o}));i(Hi);Hi.convertError,Hi.Converter;var Yi=function(e,t){return(Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var Xi=function(){return(Xi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function $i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}function Zi(e){return this instanceof Zi?(this.v=e,this):new Zi(e)}var ea=Object.freeze({__proto__:null,__extends:function(e,t){function r(){this.constructor=e}Yi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},get __assign(){return Xi},__rest:function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,r,o):i(t,r))||o);return a>3&&o&&Object.defineProperty(t,r,o),o},__param:function(e,t){return function(r,n){t(r,n,e)}},__metadata:function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},__awaiter:function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(o,s)}c((n=n.apply(e,t||[])).next())}))},__generator:function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof Zi?Promise.resolve(r.value.v).then(c,u):l(a[0][2],r)}catch(e){l(a[0][3],e)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},__asyncDelegator:function(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:Zi(e[n](t)),done:"return"===n}:i?i(t):t}:i}},__asyncValues:function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Qi(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}},__makeTemplateObject:function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__importStar:function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t},__importDefault:function(e){return e&&e.__esModule?e:{default:e}}}),ta=a((function(e,t){function r(e){return e.kind===Fr.SyntaxKind.ModuleDeclaration}function n(e){return e.kind===Fr.SyntaxKind.PropertyAccessExpression}function i(e){return e.kind===Fr.SyntaxKind.QualifiedName}Object.defineProperty(t,"__esModule",{value:!0}),t.isAccessorDeclaration=function(e){return e.kind===Fr.SyntaxKind.GetAccessor||e.kind===Fr.SyntaxKind.SetAccessor},t.isArrayBindingPattern=function(e){return e.kind===Fr.SyntaxKind.ArrayBindingPattern},t.isArrayLiteralExpression=function(e){return e.kind===Fr.SyntaxKind.ArrayLiteralExpression},t.isArrayTypeNode=function(e){return e.kind===Fr.SyntaxKind.ArrayType},t.isArrowFunction=function(e){return e.kind===Fr.SyntaxKind.ArrowFunction},t.isAsExpression=function(e){return e.kind===Fr.SyntaxKind.AsExpression},t.isAssertionExpression=function(e){return e.kind===Fr.SyntaxKind.AsExpression||e.kind===Fr.SyntaxKind.TypeAssertionExpression},t.isAwaitExpression=function(e){return e.kind===Fr.SyntaxKind.AwaitExpression},t.isBinaryExpression=function(e){return e.kind===Fr.SyntaxKind.BinaryExpression},t.isBindingElement=function(e){return e.kind===Fr.SyntaxKind.BindingElement},t.isBindingPattern=function(e){return e.kind===Fr.SyntaxKind.ArrayBindingPattern||e.kind===Fr.SyntaxKind.ObjectBindingPattern},t.isBlock=function(e){return e.kind===Fr.SyntaxKind.Block},t.isBlockLike=function(e){return void 0!==e.statements},t.isBooleanLiteral=function(e){return e.kind===Fr.SyntaxKind.TrueKeyword||e.kind===Fr.SyntaxKind.FalseKeyword},t.isBreakOrContinueStatement=function(e){return e.kind===Fr.SyntaxKind.BreakStatement||e.kind===Fr.SyntaxKind.ContinueStatement},t.isBreakStatement=function(e){return e.kind===Fr.SyntaxKind.BreakStatement},t.isCallExpression=function(e){return e.kind===Fr.SyntaxKind.CallExpression},t.isCallLikeExpression=function(e){switch(e.kind){case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.Decorator:case Fr.SyntaxKind.JsxOpeningElement:case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.NewExpression:case Fr.SyntaxKind.TaggedTemplateExpression:return!0;default:return!1}},t.isCallSignatureDeclaration=function(e){return e.kind===Fr.SyntaxKind.CallSignature},t.isCaseBlock=function(e){return e.kind===Fr.SyntaxKind.CaseBlock},t.isCaseClause=function(e){return e.kind===Fr.SyntaxKind.CaseClause},t.isCaseOrDefaultClause=function(e){return e.kind===Fr.SyntaxKind.CaseClause||e.kind===Fr.SyntaxKind.DefaultClause},t.isCatchClause=function(e){return e.kind===Fr.SyntaxKind.CatchClause},t.isClassDeclaration=function(e){return e.kind===Fr.SyntaxKind.ClassDeclaration},t.isClassExpression=function(e){return e.kind===Fr.SyntaxKind.ClassExpression},t.isClassLikeDeclaration=function(e){return e.kind===Fr.SyntaxKind.ClassDeclaration||e.kind===Fr.SyntaxKind.ClassExpression},t.isCommaListExpression=function(e){return e.kind===Fr.SyntaxKind.CommaListExpression},t.isConditionalExpression=function(e){return e.kind===Fr.SyntaxKind.ConditionalExpression},t.isConditionalTypeNode=function(e){return e.kind===Fr.SyntaxKind.ConditionalType},t.isConstructorDeclaration=function(e){return e.kind===Fr.SyntaxKind.Constructor},t.isConstructorTypeNode=function(e){return e.kind===Fr.SyntaxKind.ConstructorType},t.isConstructSignatureDeclaration=function(e){return e.kind===Fr.SyntaxKind.ConstructSignature},t.isContinueStatement=function(e){return e.kind===Fr.SyntaxKind.ContinueStatement},t.isComputedPropertyName=function(e){return e.kind===Fr.SyntaxKind.ComputedPropertyName},t.isDebuggerStatement=function(e){return e.kind===Fr.SyntaxKind.DebuggerStatement},t.isDecorator=function(e){return e.kind===Fr.SyntaxKind.Decorator},t.isDefaultClause=function(e){return e.kind===Fr.SyntaxKind.DefaultClause},t.isDeleteExpression=function(e){return e.kind===Fr.SyntaxKind.DeleteExpression},t.isDoStatement=function(e){return e.kind===Fr.SyntaxKind.DoStatement},t.isElementAccessExpression=function(e){return e.kind===Fr.SyntaxKind.ElementAccessExpression},t.isEmptyStatement=function(e){return e.kind===Fr.SyntaxKind.EmptyStatement},t.isEntityName=function(e){return e.kind===Fr.SyntaxKind.Identifier||i(e)},t.isEntityNameExpression=function e(t){return t.kind===Fr.SyntaxKind.Identifier||n(t)&&e(t.expression)},t.isEnumDeclaration=function(e){return e.kind===Fr.SyntaxKind.EnumDeclaration},t.isEnumMember=function(e){return e.kind===Fr.SyntaxKind.EnumMember},t.isExportAssignment=function(e){return e.kind===Fr.SyntaxKind.ExportAssignment},t.isExportDeclaration=function(e){return e.kind===Fr.SyntaxKind.ExportDeclaration},t.isExportSpecifier=function(e){return e.kind===Fr.SyntaxKind.ExportSpecifier},t.isExpression=function(e){switch(e.kind){case Fr.SyntaxKind.ArrayLiteralExpression:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.AsExpression:case Fr.SyntaxKind.AwaitExpression:case Fr.SyntaxKind.BinaryExpression:case Fr.SyntaxKind.CallExpression:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.CommaListExpression:case Fr.SyntaxKind.ConditionalExpression:case Fr.SyntaxKind.DeleteExpression:case Fr.SyntaxKind.ElementAccessExpression:case Fr.SyntaxKind.FalseKeyword:case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.Identifier:case Fr.SyntaxKind.JsxElement:case Fr.SyntaxKind.JsxFragment:case Fr.SyntaxKind.JsxExpression:case Fr.SyntaxKind.JsxOpeningElement:case Fr.SyntaxKind.JsxOpeningFragment:case Fr.SyntaxKind.JsxSelfClosingElement:case Fr.SyntaxKind.MetaProperty:case Fr.SyntaxKind.NewExpression:case Fr.SyntaxKind.NonNullExpression:case Fr.SyntaxKind.NoSubstitutionTemplateLiteral:case Fr.SyntaxKind.NullKeyword:case Fr.SyntaxKind.NumericLiteral:case Fr.SyntaxKind.ObjectLiteralExpression:case Fr.SyntaxKind.OmittedExpression:case Fr.SyntaxKind.ParenthesizedExpression:case Fr.SyntaxKind.PostfixUnaryExpression:case Fr.SyntaxKind.PrefixUnaryExpression:case Fr.SyntaxKind.PropertyAccessExpression:case Fr.SyntaxKind.RegularExpressionLiteral:case Fr.SyntaxKind.SpreadElement:case Fr.SyntaxKind.StringLiteral:case Fr.SyntaxKind.SuperKeyword:case Fr.SyntaxKind.TaggedTemplateExpression:case Fr.SyntaxKind.TemplateExpression:case Fr.SyntaxKind.ThisKeyword:case Fr.SyntaxKind.TrueKeyword:case Fr.SyntaxKind.TypeAssertionExpression:case Fr.SyntaxKind.TypeOfExpression:case Fr.SyntaxKind.VoidExpression:case Fr.SyntaxKind.YieldExpression:return!0;default:return!1}},t.isExpressionStatement=function(e){return e.kind===Fr.SyntaxKind.ExpressionStatement},t.isExpressionWithTypeArguments=function(e){return e.kind===Fr.SyntaxKind.ExpressionWithTypeArguments},t.isExternalModuleReference=function(e){return e.kind===Fr.SyntaxKind.ExternalModuleReference},t.isForInStatement=function(e){return e.kind===Fr.SyntaxKind.ForInStatement},t.isForInOrOfStatement=function(e){return e.kind===Fr.SyntaxKind.ForOfStatement||e.kind===Fr.SyntaxKind.ForInStatement},t.isForOfStatement=function(e){return e.kind===Fr.SyntaxKind.ForOfStatement},t.isForStatement=function(e){return e.kind===Fr.SyntaxKind.ForStatement},t.isFunctionDeclaration=function(e){return e.kind===Fr.SyntaxKind.FunctionDeclaration},t.isFunctionExpression=function(e){return e.kind===Fr.SyntaxKind.FunctionExpression},t.isFunctionTypeNode=function(e){return e.kind===Fr.SyntaxKind.FunctionType},t.isGetAccessorDeclaration=function(e){return e.kind===Fr.SyntaxKind.GetAccessor},t.isIdentifier=function(e){return e.kind===Fr.SyntaxKind.Identifier},t.isIfStatement=function(e){return e.kind===Fr.SyntaxKind.IfStatement},t.isImportClause=function(e){return e.kind===Fr.SyntaxKind.ImportClause},t.isImportDeclaration=function(e){return e.kind===Fr.SyntaxKind.ImportDeclaration},t.isImportEqualsDeclaration=function(e){return e.kind===Fr.SyntaxKind.ImportEqualsDeclaration},t.isImportSpecifier=function(e){return e.kind===Fr.SyntaxKind.ImportSpecifier},t.isIndexedAccessTypeNode=function(e){return e.kind===Fr.SyntaxKind.IndexedAccessType},t.isIndexSignatureDeclaration=function(e){return e.kind===Fr.SyntaxKind.IndexSignature},t.isInferTypeNode=function(e){return e.kind===Fr.SyntaxKind.InferType},t.isInterfaceDeclaration=function(e){return e.kind===Fr.SyntaxKind.InterfaceDeclaration},t.isIntersectionTypeNode=function(e){return e.kind===Fr.SyntaxKind.IntersectionType},t.isIterationStatement=function(e){switch(e.kind){case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.ForInStatement:case Fr.SyntaxKind.WhileStatement:case Fr.SyntaxKind.DoStatement:return!0;default:return!1}},t.isJsDoc=function(e){return e.kind===Fr.SyntaxKind.JSDocComment},t.isJsxAttribute=function(e){return e.kind===Fr.SyntaxKind.JsxAttribute},t.isJsxAttributeLike=function(e){return e.kind===Fr.SyntaxKind.JsxAttribute||e.kind===Fr.SyntaxKind.JsxSpreadAttribute},t.isJsxAttributes=function(e){return e.kind===Fr.SyntaxKind.JsxAttributes},t.isJsxClosingElement=function(e){return e.kind===Fr.SyntaxKind.JsxClosingElement},t.isJsxClosingFragment=function(e){return e.kind===Fr.SyntaxKind.JsxClosingFragment},t.isJsxElement=function(e){return e.kind===Fr.SyntaxKind.JsxElement},t.isJsxExpression=function(e){return e.kind===Fr.SyntaxKind.JsxExpression},t.isJsxFragment=function(e){return e.kind===Fr.SyntaxKind.JsxFragment},t.isJsxOpeningElement=function(e){return e.kind===Fr.SyntaxKind.JsxOpeningElement},t.isJsxOpeningFragment=function(e){return e.kind===Fr.SyntaxKind.JsxOpeningFragment},t.isJsxOpeningLikeElement=function(e){return e.kind===Fr.SyntaxKind.JsxOpeningElement||e.kind===Fr.SyntaxKind.JsxSelfClosingElement},t.isJsxSelfClosingElement=function(e){return e.kind===Fr.SyntaxKind.JsxSelfClosingElement},t.isJsxSpreadAttribute=function(e){return e.kind===Fr.SyntaxKind.JsxSpreadAttribute},t.isJsxText=function(e){return e.kind===Fr.SyntaxKind.JsxText},t.isLabeledStatement=function(e){return e.kind===Fr.SyntaxKind.LabeledStatement},t.isLiteralExpression=function(e){return e.kind>=Fr.SyntaxKind.FirstLiteralToken&&e.kind<=Fr.SyntaxKind.LastLiteralToken},t.isLiteralTypeNode=function(e){return e.kind===Fr.SyntaxKind.LiteralType},t.isMappedTypeNode=function(e){return e.kind===Fr.SyntaxKind.MappedType},t.isMetaProperty=function(e){return e.kind===Fr.SyntaxKind.MetaProperty},t.isMethodDeclaration=function(e){return e.kind===Fr.SyntaxKind.MethodDeclaration},t.isMethodSignature=function(e){return e.kind===Fr.SyntaxKind.MethodSignature},t.isModuleBlock=function(e){return e.kind===Fr.SyntaxKind.ModuleBlock},t.isModuleDeclaration=r,t.isNamedExports=function(e){return e.kind===Fr.SyntaxKind.NamedExports},t.isNamedImports=function(e){return e.kind===Fr.SyntaxKind.NamedImports},t.isNamespaceDeclaration=function e(t){return r(t)&&t.name.kind===Fr.SyntaxKind.Identifier&&void 0!==t.body&&(t.body.kind===Fr.SyntaxKind.ModuleBlock||e(t.body))},t.isNamespaceImport=function(e){return e.kind===Fr.SyntaxKind.NamespaceImport},t.isNamespaceExportDeclaration=function(e){return e.kind===Fr.SyntaxKind.NamespaceExportDeclaration},t.isNewExpression=function(e){return e.kind===Fr.SyntaxKind.NewExpression},t.isNonNullExpression=function(e){return e.kind===Fr.SyntaxKind.NonNullExpression},t.isNoSubstitutionTemplateLiteral=function(e){return e.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral},t.isNullLiteral=function(e){return e.kind===Fr.SyntaxKind.NullKeyword},t.isNumericLiteral=function(e){return e.kind===Fr.SyntaxKind.NumericLiteral},t.isNumericOrStringLikeLiteral=function(e){switch(e.kind){case Fr.SyntaxKind.StringLiteral:case Fr.SyntaxKind.NumericLiteral:case Fr.SyntaxKind.NoSubstitutionTemplateLiteral:return!0;default:return!1}},t.isObjectBindingPattern=function(e){return e.kind===Fr.SyntaxKind.ObjectBindingPattern},t.isObjectLiteralExpression=function(e){return e.kind===Fr.SyntaxKind.ObjectLiteralExpression},t.isOmittedExpression=function(e){return e.kind===Fr.SyntaxKind.OmittedExpression},t.isParameterDeclaration=function(e){return e.kind===Fr.SyntaxKind.Parameter},t.isParenthesizedExpression=function(e){return e.kind===Fr.SyntaxKind.ParenthesizedExpression},t.isParenthesizedTypeNode=function(e){return e.kind===Fr.SyntaxKind.ParenthesizedType},t.isPostfixUnaryExpression=function(e){return e.kind===Fr.SyntaxKind.PostfixUnaryExpression},t.isPrefixUnaryExpression=function(e){return e.kind===Fr.SyntaxKind.PrefixUnaryExpression},t.isPropertyAccessExpression=n,t.isPropertyAssignment=function(e){return e.kind===Fr.SyntaxKind.PropertyAssignment},t.isPropertyDeclaration=function(e){return e.kind===Fr.SyntaxKind.PropertyDeclaration},t.isPropertySignature=function(e){return e.kind===Fr.SyntaxKind.PropertySignature},t.isQualifiedName=i,t.isRegularExpressionLiteral=function(e){return e.kind===Fr.SyntaxKind.RegularExpressionLiteral},t.isReturnStatement=function(e){return e.kind===Fr.SyntaxKind.ReturnStatement},t.isSetAccessorDeclaration=function(e){return e.kind===Fr.SyntaxKind.SetAccessor},t.isShorthandPropertyAssignment=function(e){return e.kind===Fr.SyntaxKind.ShorthandPropertyAssignment},t.isSignatureDeclaration=function(e){return void 0!==e.parameters},t.isSourceFile=function(e){return e.kind===Fr.SyntaxKind.SourceFile},t.isSpreadAssignment=function(e){return e.kind===Fr.SyntaxKind.SpreadAssignment},t.isSpreadElement=function(e){return e.kind===Fr.SyntaxKind.SpreadElement},t.isStringLiteral=function(e){return e.kind===Fr.SyntaxKind.StringLiteral},t.isSwitchStatement=function(e){return e.kind===Fr.SyntaxKind.SwitchStatement},t.isSyntaxList=function(e){return e.kind===Fr.SyntaxKind.SyntaxList},t.isTaggedTemplateExpression=function(e){return e.kind===Fr.SyntaxKind.TaggedTemplateExpression},t.isTemplateExpression=function(e){return e.kind===Fr.SyntaxKind.TemplateExpression},t.isTemplateLiteral=function(e){return e.kind===Fr.SyntaxKind.TemplateExpression||e.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral},t.isTextualLiteral=function(e){return e.kind===Fr.SyntaxKind.StringLiteral||e.kind===Fr.SyntaxKind.NoSubstitutionTemplateLiteral},t.isThrowStatement=function(e){return e.kind===Fr.SyntaxKind.ThrowStatement},t.isTryStatement=function(e){return e.kind===Fr.SyntaxKind.TryStatement},t.isTupleTypeNode=function(e){return e.kind===Fr.SyntaxKind.TupleType},t.isTypeAliasDeclaration=function(e){return e.kind===Fr.SyntaxKind.TypeAliasDeclaration},t.isTypeAssertion=function(e){return e.kind===Fr.SyntaxKind.TypeAssertionExpression},t.isTypeLiteralNode=function(e){return e.kind===Fr.SyntaxKind.TypeLiteral},t.isTypeOfExpression=function(e){return e.kind===Fr.SyntaxKind.TypeOfExpression},t.isTypeOperatorNode=function(e){return e.kind===Fr.SyntaxKind.TypeOperator},t.isTypeParameterDeclaration=function(e){return e.kind===Fr.SyntaxKind.TypeParameter},t.isTypePredicateNode=function(e){return e.kind===Fr.SyntaxKind.TypePredicate},t.isTypeReferenceNode=function(e){return e.kind===Fr.SyntaxKind.TypeReference},t.isTypeQueryNode=function(e){return e.kind===Fr.SyntaxKind.TypeQuery},t.isUnionTypeNode=function(e){return e.kind===Fr.SyntaxKind.UnionType},t.isVariableDeclaration=function(e){return e.kind===Fr.SyntaxKind.VariableDeclaration},t.isVariableStatement=function(e){return e.kind===Fr.SyntaxKind.VariableStatement},t.isVariableDeclarationList=function(e){return e.kind===Fr.SyntaxKind.VariableDeclarationList},t.isVoidExpression=function(e){return e.kind===Fr.SyntaxKind.VoidExpression},t.isWhileStatement=function(e){return e.kind===Fr.SyntaxKind.WhileStatement},t.isWithStatement=function(e){return e.kind===Fr.SyntaxKind.WithStatement}}));i(ta);ta.isAccessorDeclaration,ta.isArrayBindingPattern,ta.isArrayLiteralExpression,ta.isArrayTypeNode,ta.isArrowFunction,ta.isAsExpression,ta.isAssertionExpression,ta.isAwaitExpression,ta.isBinaryExpression,ta.isBindingElement,ta.isBindingPattern,ta.isBlock,ta.isBlockLike,ta.isBooleanLiteral,ta.isBreakOrContinueStatement,ta.isBreakStatement,ta.isCallExpression,ta.isCallLikeExpression,ta.isCallSignatureDeclaration,ta.isCaseBlock,ta.isCaseClause,ta.isCaseOrDefaultClause,ta.isCatchClause,ta.isClassDeclaration,ta.isClassExpression,ta.isClassLikeDeclaration,ta.isCommaListExpression,ta.isConditionalExpression,ta.isConditionalTypeNode,ta.isConstructorDeclaration,ta.isConstructorTypeNode,ta.isConstructSignatureDeclaration,ta.isContinueStatement,ta.isComputedPropertyName,ta.isDebuggerStatement,ta.isDecorator,ta.isDefaultClause,ta.isDeleteExpression,ta.isDoStatement,ta.isElementAccessExpression,ta.isEmptyStatement,ta.isEntityName,ta.isEntityNameExpression,ta.isEnumDeclaration,ta.isEnumMember,ta.isExportAssignment,ta.isExportDeclaration,ta.isExportSpecifier,ta.isExpression,ta.isExpressionStatement,ta.isExpressionWithTypeArguments,ta.isExternalModuleReference,ta.isForInStatement,ta.isForInOrOfStatement,ta.isForOfStatement,ta.isForStatement,ta.isFunctionDeclaration,ta.isFunctionExpression,ta.isFunctionTypeNode,ta.isGetAccessorDeclaration,ta.isIdentifier,ta.isIfStatement,ta.isImportClause,ta.isImportDeclaration,ta.isImportEqualsDeclaration,ta.isImportSpecifier,ta.isIndexedAccessTypeNode,ta.isIndexSignatureDeclaration,ta.isInferTypeNode,ta.isInterfaceDeclaration,ta.isIntersectionTypeNode,ta.isIterationStatement,ta.isJsDoc,ta.isJsxAttribute,ta.isJsxAttributeLike,ta.isJsxAttributes,ta.isJsxClosingElement,ta.isJsxClosingFragment,ta.isJsxElement,ta.isJsxExpression,ta.isJsxFragment,ta.isJsxOpeningElement,ta.isJsxOpeningFragment,ta.isJsxOpeningLikeElement,ta.isJsxSelfClosingElement,ta.isJsxSpreadAttribute,ta.isJsxText,ta.isLabeledStatement,ta.isLiteralExpression,ta.isLiteralTypeNode,ta.isMappedTypeNode,ta.isMetaProperty,ta.isMethodDeclaration,ta.isMethodSignature,ta.isModuleBlock,ta.isModuleDeclaration,ta.isNamedExports,ta.isNamedImports,ta.isNamespaceDeclaration,ta.isNamespaceImport,ta.isNamespaceExportDeclaration,ta.isNewExpression,ta.isNonNullExpression,ta.isNoSubstitutionTemplateLiteral,ta.isNullLiteral,ta.isNumericLiteral,ta.isNumericOrStringLikeLiteral,ta.isObjectBindingPattern,ta.isObjectLiteralExpression,ta.isOmittedExpression,ta.isParameterDeclaration,ta.isParenthesizedExpression,ta.isParenthesizedTypeNode,ta.isPostfixUnaryExpression,ta.isPrefixUnaryExpression,ta.isPropertyAccessExpression,ta.isPropertyAssignment,ta.isPropertyDeclaration,ta.isPropertySignature,ta.isQualifiedName,ta.isRegularExpressionLiteral,ta.isReturnStatement,ta.isSetAccessorDeclaration,ta.isShorthandPropertyAssignment,ta.isSignatureDeclaration,ta.isSourceFile,ta.isSpreadAssignment,ta.isSpreadElement,ta.isStringLiteral,ta.isSwitchStatement,ta.isSyntaxList,ta.isTaggedTemplateExpression,ta.isTemplateExpression,ta.isTemplateLiteral,ta.isTextualLiteral,ta.isThrowStatement,ta.isTryStatement,ta.isTupleTypeNode,ta.isTypeAliasDeclaration,ta.isTypeAssertion,ta.isTypeLiteralNode,ta.isTypeOfExpression,ta.isTypeOperatorNode,ta.isTypeParameterDeclaration,ta.isTypePredicateNode,ta.isTypeReferenceNode,ta.isTypeQueryNode,ta.isUnionTypeNode,ta.isVariableDeclaration,ta.isVariableStatement,ta.isVariableDeclarationList,ta.isVoidExpression,ta.isWhileStatement,ta.isWithStatement;var ra=o(ea),na=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ta,t),t.isImportTypeNode=function(e){return e.kind===Fr.SyntaxKind.ImportType}}));i(na);na.isImportTypeNode;var ia=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(na,t),t.isOptionalTypeNode=function(e){return e.kind===Fr.SyntaxKind.OptionalType},t.isRestTypeNode=function(e){return e.kind===Fr.SyntaxKind.RestType},t.isSyntheticExpression=function(e){return e.kind===Fr.SyntaxKind.SyntheticExpression}}));i(ia);ia.isOptionalTypeNode,ia.isRestTypeNode,ia.isSyntheticExpression;var aa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ia,t),t.isBigIntLiteral=function(e){return e.kind===Fr.SyntaxKind.BigIntLiteral}}));i(aa);aa.isBigIntLiteral;var oa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(aa,t)}));i(oa);var sa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isConditionalType=function(e){return 0!=(e.flags&Fr.TypeFlags.Conditional)},t.isEnumType=function(e){return 0!=(e.flags&Fr.TypeFlags.Enum)},t.isGenericType=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)&&0!=(e.objectFlags&Fr.ObjectFlags.ClassOrInterface)&&0!=(e.objectFlags&Fr.ObjectFlags.Reference)},t.isIndexedAccessType=function(e){return 0!=(e.flags&Fr.TypeFlags.IndexedAccess)},t.isIndexedAccessype=function(e){return 0!=(e.flags&Fr.TypeFlags.Index)},t.isInstantiableType=function(e){return 0!=(e.flags&Fr.TypeFlags.Instantiable)},t.isInterfaceType=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)&&0!=(e.objectFlags&Fr.ObjectFlags.ClassOrInterface)},t.isIntersectionType=function(e){return 0!=(e.flags&Fr.TypeFlags.Intersection)},t.isLiteralType=function(e){return 0!=(e.flags&(Fr.TypeFlags.StringOrNumberLiteral|Fr.TypeFlags.BigIntLiteral))},t.isObjectType=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)},t.isSubstitutionType=function(e){return 0!=(e.flags&Fr.TypeFlags.Substitution)},t.isTypeParameter=function(e){return 0!=(e.flags&Fr.TypeFlags.TypeParameter)},t.isTypeReference=function(e){return 0!=(e.flags&Fr.TypeFlags.Object)&&0!=(e.objectFlags&Fr.ObjectFlags.Reference)},t.isTypeVariable=function(e){return 0!=(e.flags&Fr.TypeFlags.TypeVariable)},t.isUnionOrIntersectionType=function(e){return 0!=(e.flags&Fr.TypeFlags.UnionOrIntersection)},t.isUnionType=function(e){return 0!=(e.flags&Fr.TypeFlags.Union)},t.isUniqueESSymbolType=function(e){return 0!=(e.flags&Fr.TypeFlags.UniqueESSymbol)}}));i(sa);sa.isConditionalType,sa.isEnumType,sa.isGenericType,sa.isIndexedAccessType,sa.isIndexedAccessype,sa.isInstantiableType,sa.isInterfaceType,sa.isIntersectionType,sa.isLiteralType,sa.isObjectType,sa.isSubstitutionType,sa.isTypeParameter,sa.isTypeReference,sa.isTypeVariable,sa.isUnionOrIntersectionType,sa.isUnionType,sa.isUniqueESSymbolType;var ca=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(sa,t)}));i(ca);var ua=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ca,t);var r=ca;function n(e){return 0!==(e.flags&Fr.TypeFlags.Object&&e.objectFlags&Fr.ObjectFlags.Tuple)}t.isTupleType=n,t.isTupleTypeReference=function(e){return r.isTypeReference(e)&&n(e.target)}}));i(ua);ua.isTupleType,ua.isTupleTypeReference;var la=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ua,t)}));i(la);var _a=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(la,t)}));i(_a);var da=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(oa,t),ra.__exportStar(_a,t)}));i(da);var pa=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(aa,t),ra.__exportStar(la,t)}));i(pa);var fa=a((function(e,t){function r(e,t){if(!n(t,Fr.TypeFlags.Undefined))return t;var r=n(t,Fr.TypeFlags.Null);return t=e.getNonNullableType(t),r?e.getNullableType(t,Fr.TypeFlags.Null):t}function n(e,t){var r=!0,n=!1,i=void 0;try{for(var o,s=a(e)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if(ma.isTypeFlagSet(c,t))return!0}}catch(e){n=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw i}}return!1}function i(e,t,r){var n;return r|=Fr.TypeFlags.Any,function t(i){if(_a.isTypeParameter(i)&&void 0!==i.symbol&&void 0!==i.symbol.declarations){if(void 0===n)n=new Set([i]);else{if(n.has(i))return!1;n.add(i)}var a=i.symbol.declarations[0];return void 0===a.constraint||t(e.getTypeFromTypeNode(a.constraint))}return _a.isUnionType(i)?i.types.every(t):_a.isIntersectionType(i)?i.types.some(t):ma.isTypeFlagSet(i,r)}(t)}function a(e){return _a.isUnionType(e)?e.types:[e]}function o(e,t,r){return t(e)?e.types.some(r):r(e)}function s(e,t,r){var n=e.getApparentType(e.getTypeOfSymbolAtLocation(t,r));if(t.valueDeclaration.dotDotDotToken&&void 0===(n=n.getNumberIndexType()))return!1;var i=!0,o=!1,s=void 0;try{for(var c,u=a(n)[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){if(0!==c.value.getCallSignatures().length)return!0}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return!1}function c(e,t){return ma.isTypeFlagSet(e,Fr.TypeFlags.BooleanLiteral)&&e.intrinsicName===(t?"true":"false")}function u(e,t){return t.startsWith("__")?e.getProperties().find((function(e){return e.escapedName===t})):e.getProperty(t)}function l(e,t,r){var n=!1,i=!1,o=!0,s=!1,c=void 0;try{for(var l,d=a(e)[Symbol.iterator]();!(o=(l=d.next()).done);o=!0){var p=l.value;if(void 0===u(p,t)){var f=(ma.isNumericPropertyName(t)?r.getIndexInfoOfType(p,Fr.IndexKind.Number):void 0)||r.getIndexInfoOfType(p,Fr.IndexKind.String);if(void 0!==f&&f.isReadonly){if(n)return!0;i=!0}}else{if(i||_(p,t,r))return!0;n=!0}}}catch(e){s=!0,c=e}finally{try{o||null==d.return||d.return()}finally{if(s)throw c}}return!1}function _(e,t,r){return o(e,_a.isIntersectionType,(function(e){var n=u(e,t);if(void 0===n)return!1;if(n.flags&Fr.SymbolFlags.Transient){if(/^(?:[1-9]\d*|0)$/.test(t)&&_a.isTupleTypeReference(e))return e.target.readonly;switch(function(e,t,r){if(!_a.isObjectType(e)||!ma.isObjectFlagSet(e,Fr.ObjectFlags.Mapped))return;var n=e.symbol.declarations[0];return void 0===n.readonlyToken||/^__@[^@]+$/.test(t)?l(e.modifiersType,t,r):n.readonlyToken.kind!==Fr.SyntaxKind.MinusToken}(e,t,r)){case!0:return!0;case!1:return!1}}return ma.isSymbolFlagSet(n,Fr.SymbolFlags.ValueModule)||d(n,r)}))}function d(e,t){return(e.flags&Fr.SymbolFlags.Accessor)===Fr.SymbolFlags.GetAccessor||void 0!==e.declarations&&e.declarations.some((function(e){return ma.isModifierFlagSet(e,Fr.ModifierFlags.Readonly)||oa.isVariableDeclaration(e)&&ma.isNodeFlagSet(e.parent,Fr.NodeFlags.Const)||oa.isCallExpression(e)&&ma.isReadonlyAssignmentDeclaration(e,t)||oa.isEnumMember(e)||(oa.isPropertyAssignment(e)||oa.isShorthandPropertyAssignment(e))&&ma.isInConstContext(e.parent)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyObjectType=function e(t){if(_a.isObjectType(t)&&t.objectFlags&Fr.ObjectFlags.Anonymous&&0===t.getProperties().length&&0===t.getCallSignatures().length&&0===t.getConstructSignatures().length&&void 0===t.getStringIndexType()&&void 0===t.getNumberIndexType()){var r=t.getBaseTypes();return void 0===r||r.every(e)}return!1},t.removeOptionalityFromType=r,t.isTypeAssignableToNumber=function(e,t){return i(e,t,Fr.TypeFlags.NumberLike)},t.isTypeAssignableToString=function(e,t){return i(e,t,Fr.TypeFlags.StringLike)},t.getCallSignaturesOfType=function e(t){if(_a.isUnionType(t)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t.types[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;r.push.apply(r,E(e(c)))}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}if(_a.isIntersectionType(t)){var u,l=!0,_=!1,d=void 0;try{for(var p,f=t.types[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var m=e(p.value);if(0!==m.length){if(void 0!==u)return[];u=m}}}catch(e){_=!0,d=e}finally{try{l||null==f.return||f.return()}finally{if(_)throw d}}return void 0===u?[]:u}return t.getCallSignatures()},t.unionTypeParts=a,t.intersectionTypeParts=function(e){return _a.isIntersectionType(e)?e.types:[e]},t.someTypePart=o,t.isThenableType=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getTypeAtLocation(t),n=!0,i=!1,o=void 0;try{for(var c,u=a(e.getApparentType(r))[Symbol.iterator]();!(n=(c=u.next()).done);n=!0){var l=c.value.getProperty("then");if(void 0!==l){var _=e.getTypeOfSymbolAtLocation(l,t),d=!0,p=!1,f=void 0;try{for(var m,g=a(_)[Symbol.iterator]();!(d=(m=g.next()).done);d=!0){var y=m.value,h=!0,v=!1,b=void 0;try{for(var x,D=y.getCallSignatures()[Symbol.iterator]();!(h=(x=D.next()).done);h=!0){var S=x.value;if(0!==S.parameters.length&&s(e,S.parameters[0],t))return!0}}catch(e){v=!0,b=e}finally{try{h||null==D.return||D.return()}finally{if(v)throw b}}}}catch(e){p=!0,f=e}finally{try{d||null==g.return||g.return()}finally{if(p)throw f}}}}}catch(e){i=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw o}}return!1},t.isFalsyType=function(e){return!!(e.flags&(Fr.TypeFlags.Undefined|Fr.TypeFlags.Null|Fr.TypeFlags.Void))||(_a.isLiteralType(e)?!e.value:c(e,!1))},t.isBooleanLiteralType=c,t.getPropertyOfType=u,t.isPropertyReadonlyInType=l,t.symbolHasReadonlyDeclaration=d,t.getPropertyNameFromType=function(e){if(e.flags&(Fr.TypeFlags.StringLiteral|Fr.TypeFlags.NumberLiteral)){var t=String(e.value);return{displayName:t,symbolName:Fr.escapeLeadingUnderscores(t)}}if(_a.isUniqueESSymbolType(e))return{displayName:"[".concat(e.symbol?e.symbol.name:e.escapedName.replace(/^__@|@\d+$/g,""),"]"),symbolName:e.escapedName}},t.getConstructorTypeOfClassLikeDeclaration=function(e,t){return t.getDeclaredTypeOfSymbol(void 0!==e.name?t.getSymbolAtLocation(e.name):t.getTypeAtLocation(e).symbol)},t.getInstanceTypeOfClassLikeDeclaration=function(e,t){return e.kind===Fr.SyntaxKind.ClassDeclaration?t.getTypeAtLocation(e):t.getTypeOfSymbolAtLocation(t.getTypeAtLocation(e).getProperty("prototype"),e)},t.getIteratorYieldResultFromIteratorResult=function(e,t,n){return _a.isUnionType(e)&&e.types.find((function(e){var i=e.getProperty("done");return void 0!==i&&c(r(n,n.getTypeOfSymbolAtLocation(i,t)),!1)}))||e}}));i(fa);fa.isEmptyObjectType,fa.removeOptionalityFromType,fa.isTypeAssignableToNumber,fa.isTypeAssignableToString,fa.getCallSignaturesOfType,fa.unionTypeParts,fa.intersectionTypeParts,fa.someTypePart,fa.isThenableType,fa.isFalsyType,fa.isBooleanLiteralType,fa.getPropertyOfType,fa.isPropertyReadonlyInType,fa.symbolHasReadonlyDeclaration,fa.getPropertyNameFromType,fa.getConstructorTypeOfClassLikeDeclaration,fa.getInstanceTypeOfClassLikeDeclaration,fa.getIteratorYieldResultFromIteratorResult;var ma=a((function(e,t){function r(e){return e>=Fr.SyntaxKind.FirstToken&&e<=Fr.SyntaxKind.LastToken}function n(e){return e>=Fr.SyntaxKind.FirstAssignment&&e<=Fr.SyntaxKind.LastAssignment}function i(e){if(void 0===e)return!1;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=e.end))return r(e.kind)?e:(void 0===n&&(n=e.getSourceFile()),s(e,t,n,!0===i))}function s(e,t,n,i){e:for(;;){var a=!0,o=!1,s=void 0;try{for(var c,u=e.getChildren(n)[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var l=c.value;if(l.end>t&&(i||l.kind!==Fr.SyntaxKind.JSDocComment)){if(r(l.kind))return l;e=l;continue e}}}catch(e){o=!0,s=e}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return}}function c(e,t){var r=o(arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,t,e);if(!(void 0===r||r.kind===Fr.SyntaxKind.JsxText||t>=r.end-(Fr.tokenToString(r.kind)||"").length)){var n=0===r.pos?(Fr.getShebang(e.text)||"").length:r.pos;return 0!==n&&Fr.forEachTrailingCommentRange(e.text,n,u,t)||Fr.forEachLeadingCommentRange(e.text,n,u,t)}}function u(e,t,r,n,i){return i>=e&&i2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile();return function e(i){return r(i.kind)?t(i):i.kind!==Fr.SyntaxKind.JSDocComment?i.getChildren(n).forEach(e):void 0}(e)}function b(e){return e.kind===Fr.SyntaxKind.JsxElement||e.kind===Fr.SyntaxKind.JsxFragment}function x(e,t){return void 0===d?d=Fr.createScanner(t,!1,void 0,e):(d.setScriptTarget(t),d.setText(e)),d.scan(),d}function D(e){return e>=65536?2:1}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest;if(0===e.length)return!1;var r=e.codePointAt(0);if(!Fr.isIdentifierStart(r,t))return!1;for(var n=D(r);n=Fr.SyntaxKind.FirstNode},t.isAssignmentKind=n,t.isTypeNodeKind=function(e){return e>=Fr.SyntaxKind.FirstTypeNode&&e<=Fr.SyntaxKind.LastTypeNode},t.isJsDocKind=function(e){return e>=Fr.SyntaxKind.FirstJSDocNode&&e<=Fr.SyntaxKind.LastJSDocNode},t.isKeywordKind=function(e){return e>=Fr.SyntaxKind.FirstKeyword&&e<=Fr.SyntaxKind.LastKeyword},t.isThisParameter=function(e){return e.name.kind===Fr.SyntaxKind.Identifier&&e.name.originalKeywordKind===Fr.SyntaxKind.ThisKeyword},t.getModifier=function(e,t){if(void 0!==e.modifiers){var r=!0,n=!1,i=void 0;try{for(var a,o=e.modifiers[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s.kind===t)return s}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},t.hasModifier=i,t.isParameterProperty=function(e){return i(e.modifiers,Fr.SyntaxKind.PublicKeyword,Fr.SyntaxKind.ProtectedKeyword,Fr.SyntaxKind.PrivateKeyword,Fr.SyntaxKind.ReadonlyKeyword)},t.hasAccessModifier=function(e){return i(e.modifiers,Fr.SyntaxKind.PublicKeyword,Fr.SyntaxKind.ProtectedKeyword,Fr.SyntaxKind.PrivateKeyword)},t.isNodeFlagSet=a,t.isTypeFlagSet=a,t.isSymbolFlagSet=a,t.isObjectFlagSet=function(e,t){return 0!=(e.objectFlags&t)},t.isModifierFlagSet=function(e,t){return 0!=(Fr.getCombinedModifierFlags(e)&t)},t.getPreviousStatement=function(e){var t=e.parent;if(oa.isBlockLike(t)){var r=t.statements.indexOf(e);if(r>0)return t.statements[r-1]}},t.getNextStatement=function(e){var t=e.parent;if(oa.isBlockLike(t)){var r=t.statements.indexOf(e);if(r=0;--a){var o=i[a];if(o.pos1&&void 0!==arguments[1]?arguments[1]:e.getSourceFile();if(e.kind!==Fr.SyntaxKind.SourceFile&&e.kind!==Fr.SyntaxKind.EndOfFileToken){var r=e.end;for(e=e.parent;e.end===r;){if(void 0===e.parent)return e.endOfFileToken;e=e.parent}return s(e,r,t,!1)}},t.getTokenAtPosition=o,t.getCommentAtPosition=c,t.isPositionInComment=function(e,t,r){return void 0!==c(e,t,r)},t.commentText=function(e,t){return e.substring(t.pos+2,t.kind===Fr.SyntaxKind.SingleLineCommentTrivia?t.end:t.end-2)},t.getWrappedNodeAtPosition=function(e,t){if(!(e.node.pos>t||e.node.end<=t))e:for(;;){var r=!0,n=!1,i=void 0;try{for(var a,o=e.children[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s.node.pos>t)return e;if(s.node.end>t){e=s;continue e}}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return e}},t.getPropertyName=l,t.forEachDestructuringIdentifier=_,t.forEachDeclaredVariable=function(e,t){var r=!0,n=!1,i=void 0;try{for(var a,o=e.declarations[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value,c=void 0;if(c=s.name.kind===Fr.SyntaxKind.Identifier?t(s):_(s.name,t))return c}}catch(e){n=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}},function(e){e[e.Var=0]="Var",e[e.Let=1]="Let",e[e.Const=2]="Const"}(t.VariableDeclarationKind||(t.VariableDeclarationKind={})),t.getVariableDeclarationKind=function(e){return e.flags&Fr.NodeFlags.Let?1:e.flags&Fr.NodeFlags.Const?2:0},t.isBlockScopedVariableDeclarationList=p,t.isBlockScopedVariableDeclaration=function(e){var t=e.parent;return t.kind===Fr.SyntaxKind.CatchClause||p(t)},t.isBlockScopedDeclarationStatement=function(e){switch(e.kind){case Fr.SyntaxKind.VariableStatement:return p(e.declarationList);case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.EnumDeclaration:case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:return!0;default:return!1}},t.isInSingleStatementContext=function(e){switch(e.parent.kind){case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.ForInStatement:case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.WhileStatement:case Fr.SyntaxKind.DoStatement:case Fr.SyntaxKind.IfStatement:case Fr.SyntaxKind.WithStatement:case Fr.SyntaxKind.LabeledStatement:return!0;default:return!1}},function(e){e[e.None=0]="None",e[e.Function=1]="Function",e[e.Block=2]="Block",e[e.Type=4]="Type",e[e.ConditionalType=8]="ConditionalType"}(t.ScopeBoundary||(t.ScopeBoundary={})),function(e){e[e.Function=1]="Function",e[e.Block=3]="Block",e[e.Type=7]="Type",e[e.InferType=8]="InferType"}(t.ScopeBoundarySelector||(t.ScopeBoundarySelector={})),t.isScopeBoundary=function(e){return g(e)||h(e)||f(e)},t.isTypeScopeBoundary=f,t.isFunctionScopeBoundary=g,t.isBlockScopeBoundary=h,t.hasOwnThisReference=function(e){switch(e.kind){case Fr.SyntaxKind.ClassDeclaration:case Fr.SyntaxKind.ClassExpression:case Fr.SyntaxKind.FunctionExpression:return!0;case Fr.SyntaxKind.FunctionDeclaration:return void 0!==e.body;case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:return e.parent.kind===Fr.SyntaxKind.ObjectLiteralExpression;default:return!1}},t.isFunctionWithBody=function(e){switch(e.kind){case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.Constructor:return void 0!==e.body;case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.ArrowFunction:return!0;default:return!1}},t.forEachToken=v,t.forEachTokenWithTrivia=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile(),n=r.text,i=Fr.createScanner(r.languageVersion,!1,r.languageVariant,n);return v(e,(function(e){var a=e.kind===Fr.SyntaxKind.JsxText||e.pos===e.end?e.pos:e.getStart(r);if(a!==e.pos){i.setTextPos(e.pos);for(var o=i.scan(),s=i.getTokenPos();s2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile(),n=r.text,i=r.languageVariant!==Fr.LanguageVariant.JSX;return v(e,(function(e){if(e.pos!==e.end)return e.kind!==Fr.SyntaxKind.JsxText&&Fr.forEachLeadingCommentRange(n,0===e.pos?(Fr.getShebang(n)||"").length:e.pos,a),i||function(e){switch(e.kind){case Fr.SyntaxKind.CloseBraceToken:return e.parent.kind!==Fr.SyntaxKind.JsxExpression||!b(e.parent.parent);case Fr.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case Fr.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case Fr.SyntaxKind.JsxOpeningFragment:return!1;case Fr.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!b(e.parent.parent);case Fr.SyntaxKind.JsxClosingElement:case Fr.SyntaxKind.JsxClosingFragment:return!b(e.parent.parent.parent)}}return!0}(e)?Fr.forEachTrailingCommentRange(n,e.end,a):void 0}),r);function a(e,r,i){t(n,{pos:e,end:r,kind:i})}},t.getLineRanges=function(e){for(var t=e.getLineStarts(),r=[],n=t.length,i=e.text,a=0,o=1;oa&&Fr.isLineBreak(i.charCodeAt(c-1));--c);r.push({pos:a,end:s,contentLength:c-a}),a=s}return r.push({pos:a,end:e.end,contentLength:e.end-a}),r},t.getLineBreakStyle=function(e){var t=e.getLineStarts();return 1===t.length||t[1]<2||"\r"!==e.text[t[1]-2]?"\n":"\r\n"},t.isValidIdentifier=function(e){var t=x(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest);return t.isIdentifier()&&t.getTextPos()===e.length&&0===t.getTokenPos()},t.isValidPropertyAccess=S,t.isValidPropertyName=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest;if(S(e,t))return!0;var r=x(e,t);return r.getTextPos()===e.length&&r.getToken()===Fr.SyntaxKind.NumericLiteral&&r.getTokenValue()===e},t.isValidNumericLiteral=function(e){var t=x(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest);return t.getToken()===Fr.SyntaxKind.NumericLiteral&&t.getTextPos()===e.length&&0===t.getTokenPos()},t.isValidJsxIdentifier=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fr.ScriptTarget.Latest;if(0===e.length)return!1;var r=e.codePointAt(0);if(!Fr.isIdentifierStart(r,t))return!1;for(var n=D(r);n2&&void 0!==arguments[2]?arguments[2]:e.getSourceFile();if(N(e)&&e.kind!==Fr.SyntaxKind.EndOfFileToken){var n=A(e,r);if(0!==n.length||!t)return n}return F(e,r,t)},function(e){e[e.ImportDeclaration=1]="ImportDeclaration",e[e.ImportEquals=2]="ImportEquals",e[e.ExportFrom=4]="ExportFrom",e[e.DynamicImport=8]="DynamicImport",e[e.Require=16]="Require",e[e.ImportType=32]="ImportType",e[e.All=63]="All",e[e.AllImports=59]="AllImports",e[e.AllStaticImports=3]="AllStaticImports",e[e.AllImportExpressions=24]="AllImportExpressions",e[e.AllRequireLike=18]="AllRequireLike",e[e.AllNestedImports=56]="AllNestedImports",e[e.AllTopLevelImports=7]="AllTopLevelImports"}(t.ImportKind||(t.ImportKind={})),t.findImports=function(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=P(e,t)[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;switch(c.kind){case Fr.SyntaxKind.ImportDeclaration:u(c.moduleSpecifier);break;case Fr.SyntaxKind.ImportEqualsDeclaration:u(c.moduleReference.expression);break;case Fr.SyntaxKind.ExportDeclaration:u(c.moduleSpecifier);break;case Fr.SyntaxKind.CallExpression:u(c.arguments[0]);break;case Fr.SyntaxKind.ImportType:oa.isLiteralTypeNode(c.argument)&&u(c.argument.literal);break;default:throw new Error("unexpected node")}}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r;function u(e){oa.isTextualLiteral(e)&&r.push(e)}},t.findImportLikeNodes=P;var w=function(){function e(t,r){m(this,e),this._sourceFile=t,this._options=r,this._result=[]}return y(e,[{key:"find",value:function(){return this._sourceFile.isDeclarationFile&&(this._options&=-25),7&this._options&&this._findImports(this._sourceFile.statements),56&this._options&&this._findNestedImports(),this._result}},{key:"_findImports",value:function(e){var t=!0,r=!1,n=void 0;try{for(var i,a=e[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;oa.isImportDeclaration(o)?1&this._options&&this._result.push(o):oa.isImportEqualsDeclaration(o)?2&this._options&&o.moduleReference.kind===Fr.SyntaxKind.ExternalModuleReference&&this._result.push(o):oa.isExportDeclaration(o)?void 0!==o.moduleSpecifier&&4&this._options&&this._result.push(o):oa.isModuleDeclaration(o)&&this._findImportsInModule(o)}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}}},{key:"_findImportsInModule",value:function(e){if(void 0!==e.body)return e.body.kind===Fr.SyntaxKind.ModuleDeclaration?this._findImportsInModule(e.body):void this._findImports(e.body.statements)}},{key:"_findNestedImports",value:function(){var e;e=16==(56&this._options)?/\brequire\s*[1&&void 0!==arguments[1]?arguments[1]:this._variables,r=t.get(e.location.text);return void 0!==r&&0!=(r.domain&e.domain)&&(r.uses.push(e),!0)}},{key:"_addUseToParent",value:function(e){}}]),e}(),a=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,r)))._exportAll=e,n._exports=void 0,n._innerScope=new o(D(n),1),n}return v(t,e),y(t,[{key:"addVariable",value:function(e,r,n,i,a){return 8&a?T(b(t.prototype),"addVariable",this).call(this,e,r,n,i,a):this._innerScope.addVariable(e,r,n,i,a)}},{key:"addUse",value:function(e,r){return r===this._innerScope?T(b(t.prototype),"addUse",this).call(this,e):this._innerScope.addUse(e)}},{key:"markExported",value:function(e){void 0===this._exports?this._exports=[e.text]:this._exports.push(e.text)}},{key:"end",value:function(e){var r=this;return this._innerScope.end((function(t,n){return t.exported=t.exported||r._exportAll||void 0!==r._exports&&r._exports.includes(n.text),t.inGlobalScope=r._global,e(t,n,r)})),T(b(t.prototype),"end",this).call(this,(function(t,n,i){return t.exported=t.exported||i===r&&void 0!==r._exports&&r._exports.includes(n.text),e(t,n,i)}))}},{key:"getDestinationScope",value:function(){return this}}]),t}(i),o=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,!1)))._parent=e,n._boundary=r,n}return v(t,e),y(t,[{key:"_addUseToParent",value:function(e){return this._parent.addUse(e,this)}},{key:"getDestinationScope",value:function(e){return this._boundary&e?this:this._parent.getDestinationScope(e)}}]),t}(i),s=function(e){function t(e){return m(this,t),S(this,b(t).call(this,e,1))}return v(t,e),y(t,[{key:"end",value:function(){this._applyUses()}}]),t}(o),c=function(e){function t(e){var r;return m(this,t),(r=S(this,b(t).call(this,e,8)))._state=0,r}return v(t,e),y(t,[{key:"updateState",value:function(e){this._state=e}},{key:"addUse",value:function(e){if(2!==this._state)return this._parent.addUse(e,this);this._uses.push(e)}}]),t}(o),u=function(e){function t(e){return m(this,t),S(this,b(t).call(this,e,1))}return v(t,e),y(t,[{key:"beginBody",value:function(){this._applyUses()}}]),t}(o),l=function(e){function t(e,r,n){var i;return m(this,t),(i=S(this,b(t).call(this,n,1)))._name=e,i._domain=r,i}return v(t,e),y(t,[{key:"end",value:function(e){return this._innerScope.end(e),e({declarations:[this._name],domain:this._domain,exported:!1,uses:this._uses,inGlobalScope:!1},this._name,this)}},{key:"addUse",value:function(e,t){return t!==this._innerScope?this._innerScope.addUse(e):e.domain&this._domain&&e.location.text===this._name.text?void this._uses.push(e):this._parent.addUse(e,this)}},{key:"getFunctionScope",value:function(){return this._innerScope}},{key:"getDestinationScope",value:function(){return this._innerScope}}]),t}(o),_=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,e,4,r)))._innerScope=new u(D(n)),n}return v(t,e),y(t,[{key:"beginBody",value:function(){return this._innerScope.beginBody()}}]),t}(l),d=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,e,6,r)))._innerScope=new o(D(n),1),n}return v(t,e),t}(l),p=function(e){function t(e,r){var n;return m(this,t),(n=S(this,b(t).call(this,r,2)))._functionScope=e,n}return v(t,e),y(t,[{key:"getFunctionScope",value:function(){return this._functionScope}}]),t}(o);function f(e){return{declaration:e,exported:!0,domain:n(e)}}var g=function(e){function t(e,r,n){var i;return m(this,t),(i=S(this,b(t).call(this,n,1)))._ambient=e,i._hasExport=r,i._innerScope=new o(D(i),1),i._exports=void 0,i}return v(t,e),y(t,[{key:"finish",value:function(e){return T(b(t.prototype),"end",this).call(this,e)}},{key:"end",value:function(e){var t=this;this._innerScope.end((function(r,n,i){if(i!==t._innerScope||!r.exported&&(!t._ambient||void 0!==t._exports&&!t._exports.has(n.text)))return e(r,n,i);var a=t._variables.get(n.text);if(void 0===a)t._variables.set(n.text,{declarations:r.declarations.map(f),domain:r.domain,uses:E(r.uses)});else{var o=!0,s=!1,c=void 0;try{e:for(var u,l=r.declarations[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var _=u.value,d=!0,p=!1,m=void 0;try{for(var g,y=a.declarations[Symbol.iterator]();!(d=(g=y.next()).done);d=!0){if(g.value.declaration===_)continue e}}catch(e){p=!0,m=e}finally{try{d||null==y.return||y.return()}finally{if(p)throw m}}a.declarations.push(f(_))}}catch(e){s=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw c}}a.domain|=r.domain;var h=!0,v=!1,b=void 0;try{for(var x,D=r.uses[Symbol.iterator]();!(h=(x=D.next()).done);h=!0){var S=x.value;a.uses.includes(S)||a.uses.push(S)}}catch(e){v=!0,b=e}finally{try{h||null==D.return||D.return()}finally{if(v)throw b}}}})),this._applyUses(),this._innerScope=new o(this,1)}},{key:"createOrReuseNamespaceScope",value:function(e,r,n,i){return r||this._ambient&&!this._hasExport?T(b(t.prototype),"createOrReuseNamespaceScope",this).call(this,e,r,n||this._ambient,i):this._innerScope.createOrReuseNamespaceScope(e,r,n||this._ambient,i)}},{key:"createOrReuseEnumScope",value:function(e,r){return r||this._ambient&&!this._hasExport?T(b(t.prototype),"createOrReuseEnumScope",this).call(this,e,r):this._innerScope.createOrReuseEnumScope(e,r)}},{key:"addUse",value:function(e,t){if(t!==this._innerScope)return this._innerScope.addUse(e);this._uses.push(e)}},{key:"refresh",value:function(e,t){this._ambient=e,this._hasExport=t}},{key:"markExported",value:function(e,t){void 0===this._exports&&(this._exports=new Set),this._exports.add(e.text)}},{key:"getDestinationScope",value:function(){return this._innerScope}}]),t}(o);var h=function(){function e(){m(this,e),this._result=new Map}return y(e,[{key:"getUsage",value:function(e){var t=this,n=function(e,r){t._result.set(r,e)},i=Fr.isExternalModule(e);this._scope=new a(e.isDeclarationFile&&i&&!C(e),!i);var s=function e(i){if(ma.isBlockScopeBoundary(i))return c(i,new p(t._scope.getFunctionScope(),t._scope),u);switch(i.kind){case Fr.SyntaxKind.ClassExpression:return c(i,void 0!==i.name?new d(i.name,t._scope):new o(t._scope,1));case Fr.SyntaxKind.ClassDeclaration:return t._handleDeclaration(i,!0,6),c(i,new o(t._scope,1));case Fr.SyntaxKind.InterfaceDeclaration:case Fr.SyntaxKind.TypeAliasDeclaration:return t._handleDeclaration(i,!0,2),c(i,new o(t._scope,4));case Fr.SyntaxKind.EnumDeclaration:return t._handleDeclaration(i,!0,7),c(i,t._scope.createOrReuseEnumScope(i.name.text,ma.hasModifier(i.modifiers,Fr.SyntaxKind.ExportKeyword)));case Fr.SyntaxKind.ModuleDeclaration:return t._handleModule(i,c);case Fr.SyntaxKind.MappedType:return c(i,new o(t._scope,4));case Fr.SyntaxKind.FunctionExpression:case Fr.SyntaxKind.ArrowFunction:case Fr.SyntaxKind.Constructor:case Fr.SyntaxKind.MethodDeclaration:case Fr.SyntaxKind.FunctionDeclaration:case Fr.SyntaxKind.GetAccessor:case Fr.SyntaxKind.SetAccessor:case Fr.SyntaxKind.MethodSignature:case Fr.SyntaxKind.CallSignature:case Fr.SyntaxKind.ConstructSignature:case Fr.SyntaxKind.ConstructorType:case Fr.SyntaxKind.FunctionType:return t._handleFunctionLikeDeclaration(i,e,n);case Fr.SyntaxKind.ConditionalType:return t._handleConditionalType(i,e,n);case Fr.SyntaxKind.VariableDeclarationList:t._handleVariableDeclaration(i);break;case Fr.SyntaxKind.Parameter:i.parent.kind===Fr.SyntaxKind.IndexSignature||i.name.kind===Fr.SyntaxKind.Identifier&&i.name.originalKeywordKind===Fr.SyntaxKind.ThisKeyword||t._handleBindingName(i.name,!1,!1);break;case Fr.SyntaxKind.EnumMember:t._scope.addVariable(ma.getPropertyName(i.name),i.name,1,!0,4);break;case Fr.SyntaxKind.ImportClause:case Fr.SyntaxKind.ImportSpecifier:case Fr.SyntaxKind.NamespaceImport:case Fr.SyntaxKind.ImportEqualsDeclaration:t._handleDeclaration(i,!1,15);break;case Fr.SyntaxKind.TypeParameter:t._scope.addVariable(i.name.text,i.name,i.parent.kind===Fr.SyntaxKind.InferType?8:7,!1,2);break;case Fr.SyntaxKind.ExportSpecifier:return void 0!==i.propertyName?t._scope.markExported(i.propertyName,i.name):t._scope.markExported(i.name);case Fr.SyntaxKind.ExportAssignment:if(i.expression.kind===Fr.SyntaxKind.Identifier)return t._scope.markExported(i.expression);break;case Fr.SyntaxKind.Identifier:var a=r(i);return void(void 0!==a&&t._scope.addUse({domain:a,location:i}))}return Fr.forEachChild(i,e)},c=function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l,a=t._scope;t._scope=r,i(e),t._scope.end(n),t._scope=a},u=function(e){return e.kind===Fr.SyntaxKind.CatchClause&&void 0!==e.variableDeclaration&&t._handleBindingName(e.variableDeclaration.name,!0,!1),Fr.forEachChild(e,s)};return Fr.forEachChild(e,s),this._scope.end(n),this._result;function l(e){return Fr.forEachChild(e,s)}}},{key:"_handleConditionalType",value:function(e,t,r){var n=this._scope,i=this._scope=new c(n);t(e.checkType),i.updateState(1),t(e.extendsType),i.updateState(2),t(e.trueType),i.updateState(3),t(e.falseType),i.end(r),this._scope=n}},{key:"_handleFunctionLikeDeclaration",value:function(e,t,r){void 0!==e.decorators&&e.decorators.forEach(t);var n=this._scope;e.kind===Fr.SyntaxKind.FunctionDeclaration&&this._handleDeclaration(e,!1,4);var i=this._scope=e.kind===Fr.SyntaxKind.FunctionExpression&&void 0!==e.name?new _(e.name,n):new u(n);void 0!==e.name&&t(e.name),void 0!==e.typeParameters&&e.typeParameters.forEach(t),e.parameters.forEach(t),void 0!==e.type&&t(e.type),void 0!==e.body&&(i.beginBody(),t(e.body)),i.end(r),this._scope=n}},{key:"_handleModule",value:function(e,t){if(e.flags&Fr.NodeFlags.GlobalAugmentation)return t(e,this._scope.createOrReuseNamespaceScope("-global",!1,!0,!1));if(e.name.kind===Fr.SyntaxKind.Identifier){var r=function(e){return e.parent.kind===Fr.SyntaxKind.ModuleDeclaration||ma.hasModifier(e.modifiers,Fr.SyntaxKind.ExportKeyword)}(e);this._scope.addVariable(e.name.text,e.name,1,r,5);var n=ma.hasModifier(e.modifiers,Fr.SyntaxKind.DeclareKeyword);return t(e,this._scope.createOrReuseNamespaceScope(e.name.text,r,n,n&&x(e)))}return t(e,this._scope.createOrReuseNamespaceScope('"'.concat(e.name.text,'"'),!1,!0,x(e)))}},{key:"_handleDeclaration",value:function(e,t,r){void 0!==e.name&&this._scope.addVariable(e.name.text,e.name,t?3:1,ma.hasModifier(e.modifiers,Fr.SyntaxKind.ExportKeyword),r)}},{key:"_handleBindingName",value:function(e,t,r){var n=this;if(e.kind===Fr.SyntaxKind.Identifier)return this._scope.addVariable(e.text,e,t?3:1,r,4);ma.forEachDestructuringIdentifier(e,(function(e){n._scope.addVariable(e.name.text,e.name,t?3:1,r,4)}))}},{key:"_handleVariableDeclaration",value:function(e){var t=ma.isBlockScopedVariableDeclarationList(e),r=e.parent.kind===Fr.SyntaxKind.VariableStatement&&ma.hasModifier(e.parent.modifiers,Fr.SyntaxKind.ExportKeyword),n=!0,i=!1,a=void 0;try{for(var o,s=e.declarations[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;this._handleBindingName(c.name,t,r)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}}]),e}();function x(e){return void 0!==e.body&&e.body.kind===Fr.SyntaxKind.ModuleBlock&&C(e.body)}function C(e){var t=!0,r=!1,n=void 0;try{for(var i,a=e.statements[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;if(o.kind===Fr.SyntaxKind.ExportDeclaration||o.kind===Fr.SyntaxKind.ExportAssignment)return!0}}catch(e){r=!0,n=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw n}}return!1}}));i(ga);ga.DeclarationDomain,ga.UsageDomain,ga.getUsageDomain,ga.getDeclarationDomain,ga.collectVariableUsage;var ya=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.endsControlFlow=function(e){return n(e).end};var r={statements:[],end:!1};function n(e){return oa.isBlockLike(e)?a(e):i(e)}function i(e){switch(e.kind){case Fr.SyntaxKind.ReturnStatement:case Fr.SyntaxKind.ThrowStatement:case Fr.SyntaxKind.ContinueStatement:case Fr.SyntaxKind.BreakStatement:return{statements:[e],end:!0};case Fr.SyntaxKind.Block:return a(e);case Fr.SyntaxKind.ForStatement:case Fr.SyntaxKind.WhileStatement:return function(e){var t=e.kind===Fr.SyntaxKind.WhileStatement?o(e.expression):void 0===e.condition||o(e.condition);if(!1===t)return r;var n=s(i(e.statement),oa.isBreakOrContinueStatement);void 0===t&&(n.end=!1);return n}(e);case Fr.SyntaxKind.ForOfStatement:case Fr.SyntaxKind.ForInStatement:return function(e){var t=s(i(e.statement),oa.isBreakOrContinueStatement);return t.end=!1,t}(e);case Fr.SyntaxKind.DoStatement:return s(i(e.statement),oa.isBreakOrContinueStatement);case Fr.SyntaxKind.IfStatement:return function(e){switch(o(e.expression)){case!0:return i(e.thenStatement);case!1:return void 0===e.elseStatement?r:i(e.elseStatement)}var t=i(e.thenStatement);if(void 0===e.elseStatement)return{statements:t.statements,end:!1};var n=i(e.elseStatement);return{statements:[].concat(E(t.statements),E(n.statements)),end:t.end&&n.end}}(e);case Fr.SyntaxKind.SwitchStatement:return s(function(e){var t=!1,r={statements:[],end:!1},n=!0,i=!1,o=void 0;try{for(var s,c=e.caseBlock.clauses[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var u,l=s.value;l.kind===Fr.SyntaxKind.DefaultClause&&(t=!0);var _=a(l);r.end=_.end,(u=r.statements).push.apply(u,E(_.statements))}}catch(e){i=!0,o=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw o}}t||(r.end=!1);return r}(e),oa.isBreakStatement);case Fr.SyntaxKind.TryStatement:return function(e){var t;if(void 0!==e.finallyBlock&&(t=a(e.finallyBlock)).end)return t;var r=a(e.tryBlock);if(void 0===e.catchClause)return{statements:t.statements.concat(r.statements),end:r.end};var n=a(e.catchClause.block);return{statements:r.statements.filter((function(e){return e.kind!==Fr.SyntaxKind.ThrowStatement})).concat(n.statements,void 0===t?[]:t.statements),end:r.end&&n.end}}(e);case Fr.SyntaxKind.LabeledStatement:return function(e,t){var r={statements:[],end:e.end},n=t.text,i=!0,a=!1,o=void 0;try{for(var s,c=e.statements[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value;switch(u.kind){case Fr.SyntaxKind.BreakStatement:case Fr.SyntaxKind.ContinueStatement:if(void 0!==u.label&&u.label.text===n){r.end=!1;continue}}r.statements.push(u)}}catch(e){a=!0,o=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw o}}return r}(i(e.statement),e.label);case Fr.SyntaxKind.WithStatement:return i(e.statement);default:return r}}function a(e){var t={statements:[],end:!1},r=!0,n=!1,a=void 0;try{for(var o,s=e.statements[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c,u=i(o.value);if((c=t.statements).push.apply(c,E(u.statements)),u.end){t.end=!0;break}}}catch(e){n=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(n)throw a}}return t}function o(e){switch(e.kind){case Fr.SyntaxKind.TrueKeyword:return!0;case Fr.SyntaxKind.FalseKeyword:return!1;default:return}}function s(e,t){var r={statements:[],end:e.end},n=!0,i=!1,a=void 0;try{for(var o,s=e.statements[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;t(c)&&void 0===c.label?r.end=!1:r.statements.push(c)}}catch(e){i=!0,a=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}t.getControlFlowEnd=n}));i(ya);ya.endsControlFlow,ya.getControlFlowEnd;var ha=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.convertAst=function(e){var t={node:e,parent:void 0,kind:Fr.SyntaxKind.SourceFile,children:[],next:void 0,skip:void 0},r=[],n=t,i=n;return Fr.forEachChild(e,(function e(t){r.push(t);var a=n;i.next=n={node:t,parent:a,kind:t.kind,children:[],next:void 0,skip:void 0},i!==a&&function(e,t){do{e.skip=t,e=e.parent}while(e!==t.parent)}(i,n),i=n,a.children.push(n),ma.isNodeKind(t.kind)&&Fr.forEachChild(t,e),n=a})),{wrapped:t,flat:r}}}));i(ha);ha.convertAst;var va=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(ma,t),ra.__exportStar(ga,t),ra.__exportStar(ya,t),ra.__exportStar(fa,t),ra.__exportStar(ha,t)}));i(va);var ba=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),ra.__exportStar(da,t),ra.__exportStar(va,t)}));i(ba);var xa=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Fr);t.convertComments=function(e,t){var r=[];return ba.forEachComment(e,(function(n,a){var o=a.kind==i.SyntaxKind.SingleLineCommentTrivia?"Line":"Block",s=[a.pos,a.end],c=Gi.getLocFor(s[0],s[1],e),u=s[0]+2,l=a.kind===i.SyntaxKind.SingleLineCommentTrivia?s[1]-u:s[1]-u-2;r.push({type:o,value:t.substr(u,l),range:s,loc:c})}),e),r}}));i(xa);xa.convertComments;var Da=a((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.astConverter=function(e,t,r){var n=e.parseDiagnostics;if(n.length)throw Hi.convertError(n[0]);var i=new Hi.Converter(e,{errorOnUnknownASTType:t.errorOnUnknownASTType||!1,useJSXTextNode:t.useJSXTextNode||!1,shouldPreserveNodeMaps:r}),a=i.convertProgram();return t.tokens&&(a.tokens=Gi.convertTokens(e)),t.comment&&(a.comments=xa.convertComments(e,t.code)),{estree:a,astMaps:r?i.getASTMaps():void 0}}}));i(Da);Da.astConverter;var Sa=1e3,Ta=60*Sa,Ea=60*Ta,Ca=24*Ea,ka=7*Ca,Na=365.25*Ca,Aa=function(e,t){t=t||{};var r=f(e);if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*Na;case"weeks":case"week":case"w":return r*ka;case"days":case"day":case"d":return r*Ca;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ea;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ta;case"seconds":case"second":case"secs":case"sec":case"s":return r*Sa;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){var t=Math.abs(e);if(t>=Ca)return Fa(e,t,Ca,"day");if(t>=Ea)return Fa(e,t,Ea,"hour");if(t>=Ta)return Fa(e,t,Ta,"minute");if(t>=Sa)return Fa(e,t,Sa,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=Ca)return Math.round(e/Ca)+"d";if(t>=Ea)return Math.round(e/Ea)+"h";if(t>=Ta)return Math.round(e/Ta)+"m";if(t>=Sa)return Math.round(e/Sa)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Fa(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")}var Pa=function(e){function t(e){for(var t=0,n=0;n=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.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"],e.exports=Pa(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),Ia=(wa.log,wa.formatArgs,wa.save,wa.load,wa.useColors,wa.storage,wa.colors,Object.freeze({__proto__:null,default:{}})),Oa=function(e,t){var r=(t=t||Oe.argv).indexOf("--"),n=/^--/.test(e)?"":"--",i=t.indexOf(n+e);return-1!==i&&(-1===r||i=2,has16m:La>=3}),Ba=o(Ia),ja=a((function(e,t){t.init=function(e){e.inspectOpts={};for(var r=Object.keys(t.inspectOpts),n=0;n=2&&(t.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(e){}t.inspectOpts=Object.keys(Oe.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()})),n=Oe.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e}),{}),e.exports=Pa(t);var n=e.exports.formatters;n.o=function(e){return this.inspectOpts.colors=this.useColors,kn.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,kn.inspect(e,this.inspectOpts)}})),Ka=(ja.init,ja.log,ja.formatArgs,ja.save,ja.load,ja.useColors,ja.colors,ja.inspectOpts,a((function(e){void 0===Oe||Oe.type,e.exports=wa}))),Ja=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(yr),o=i(Fr);t.DEFAULT_COMPILER_OPTIONS={allowNonTsExtensions:!0,allowJs:!0,checkJs:!0,noEmit:!0};var s=void 0===o.sys||o.sys.useCaseSensitiveFileNames?function(e){return a.default.normalize(e)}:function(e){return a.default.normalize(e).toLowerCase()};t.getCanonicalFileName=s,t.getTsconfigPath=function(e,t){return s(a.default.isAbsolute(e)?e:a.default.join(t.tsconfigRootDir||Oe.cwd(),e))},t.canonicalDirname=function(e){return a.default.dirname(e)},t.getScriptKind=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.filePath;switch(a.default.extname(t).toLowerCase()){case".ts":return o.ScriptKind.TS;case".tsx":return o.ScriptKind.TSX;case".js":return o.ScriptKind.JS;case".jsx":return o.ScriptKind.JSX;case".json":return o.ScriptKind.JSON;default:return e.jsx?o.ScriptKind.TSX:o.ScriptKind.TS}}}));i(Ja);Ja.DEFAULT_COMPILER_OPTIONS,Ja.getCanonicalFileName,Ja.getTsconfigPath,Ja.canonicalDirname,Ja.getScriptKind;var za=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=r(yr),s=i(Fr),c=a.default("typescript-eslint:typescript-estree:createDefaultProgram");t.createDefaultProgram=function(e,t){if(c("Getting default program for: %s",t.filePath||"unnamed file"),t.projects&&1===t.projects.length){var r=Ja.getTsconfigPath(t.projects[0],t),n=s.getParsedCommandLineOfConfigFile(r,Ja.DEFAULT_COMPILER_OPTIONS,Object.assign(Object.assign({},s.sys),{onUnRecoverableConfigFileDiagnostic:function(){}}));if(n){var i=s.createCompilerHost(n.options,!0),a=i.readFile;i.readFile=function(r){return o.default.normalize(r)===o.default.normalize(t.filePath)?e:a(r)};var u=s.createProgram([t.filePath],n.options,i),l=u.getSourceFile(t.filePath);return l&&{ast:l,program:u}}}}}));i(za);za.createDefaultProgram;var Ua=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=i(Fr),s=a.default("typescript-eslint:typescript-estree:createIsolatedProgram");t.createIsolatedProgram=function(e,t){s("Getting isolated program in %s mode for: %s",t.jsx?"TSX":"TS",t.filePath);var r={fileExists:function(){return!0},getCanonicalFileName:function(){return t.filePath},getCurrentDirectory:function(){return""},getDirectories:function(){return[]},getDefaultLibFileName:function(){return"lib.d.ts"},getNewLine:function(){return"\n"},getSourceFile:function(r){return o.createSourceFile(r,e,o.ScriptTarget.Latest,!0,Ja.getScriptKind(t,r))},readFile:function(){},useCaseSensitiveFileNames:function(){return!0},writeFile:function(){return null}},n=o.createProgram([t.filePath],Object.assign({noResolve:!0,target:o.ScriptTarget.Latest,jsx:t.jsx?o.JsxEmit.Preserve:void 0},Ja.DEFAULT_COMPILER_OPTIONS),r),i=n.getSourceFile(t.filePath);if(!i)throw new Error("Expected an ast to be returned for the single-file isolated program.");return{ast:i,program:n}}}));i(Ua);Ua.createIsolatedProgram;var Va=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=r(hr),s=r(yr),c=i(Fr),u=a.default("typescript-eslint:typescript-estree:createWatchProgram"),l=new Map,_=new Map,d=new Map,p=new Map,f=new Map,m=new Set;function g(e){return function(t,r){var n=Ja.getCanonicalFileName(s.default.normalize(t)),i=function(){var t=e.get(n);return t||(t=new Set,e.set(n,t)),t}();return i.add(r),{close:function(){i.delete(r)}}}}t.clearCaches=function(){l.clear(),_.clear(),d.clear(),m.clear(),p.clear(),f.clear()};var y={code:"",filePath:""};function h(e){throw new Error(c.flattenDiagnosticMessageText(e.messageText,c.sys.newLine))}function v(e,t){u("Creating watch program for %s.",e);var r=c.createWatchCompilerHost(e,Ja.DEFAULT_COMPILER_OPTIONS,c.sys,c.createSemanticDiagnosticsBuilderProgram,h,(function(){})),n=r.readFile;r.readFile=function(e,t){var r=Ja.getCanonicalFileName(e);return m.add(r),s.default.normalize(r)===s.default.normalize(y.filePath)?y.code:n(r,t)},r.onUnRecoverableConfigFileDiagnostic=h,r.afterProgramCreate=function(e){var t=e.getConfigFileParsingDiagnostics().filter((function(e){return e.category===c.DiagnosticCategory.Error&&18003!==e.code}));t.length>0&&h(t[0])},r.watchFile=g(_),r.watchDirectory=g(d);var i=r.onCachedDirectoryStructureHostCreate;r.onCachedDirectoryStructureHostCreate=function(e){var r=e.readDirectory;e.readDirectory=function(e,n,i,a,o){return r(e,n?n.concat(t.extraFileExtensions):void 0,i,a,o)},i(e)};var a=r.setTimeout;return r.setTimeout=function(e,t){if(250===t)return e(),null;for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;iNumber.EPSILON})(r)&&(u("tsconfig has changed - triggering program update. %s",r),_.get(r).forEach((function(e){return e(r,c.FileWatcherEventKind.Changed)})),p.delete(r));var i=n.getSourceFile(t);if(i)return n;u("File was not found in program - triggering folder update. %s",t);for(var a=Ja.canonicalDirname(t),s=null,l=a,m=!1;s!==l;){s=l;var g=d.get(s);if(g){g.forEach((function(e){return e(a,c.FileWatcherEventKind.Changed)})),m=!0;break}l=Ja.canonicalDirname(s)}if(!m)return u("No callback found for file, not part of this program. %s",t),null;if(p.delete(r),i=(n=e.getProgram().getProgram()).getSourceFile(t))return n;u("File was still not found in program after directory update - checking file deletions. %s",t);var y=n.getRootFileNames().find((function(e){return!o.default.existsSync(e)}));if(!y)return null;var h=_.get(Ja.getCanonicalFileName(y));return h?(u("Marking file as deleted. %s",y),h.forEach((function(e){return e(y,c.FileWatcherEventKind.Deleted)})),p.delete(r),(i=(n=e.getProgram().getProgram()).getSourceFile(t))?n:(u("File was still not found in program after deletion check, assuming it is not part of this program. %s",t),null)):(u("Could not find watch callbacks for root file. %s",y),n)}t.getProgramsForProjects=function(e,t,r){var n=Ja.getCanonicalFileName(t),i=[];y.code=e,y.filePath=n;var a=_.get(n);m.has(n)&&a&&a.size>0&&a.forEach((function(e){return e(n,c.FileWatcherEventKind.Changed)}));var o=!0,s=!1,d=void 0;try{for(var f,g=r.projects[Symbol.iterator]();!(o=(f=g.next()).done);o=!0){var h=f.value,x=Ja.getTsconfigPath(h,r),D=l.get(x);if(D){var S=p.get(x),T=null;if(S||(T=D.getProgram().getProgram(),S=new Set(T.getRootFileNames().map((function(e){return Ja.getCanonicalFileName(e)}))),p.set(x,S)),S.has(n))return u("Found existing program for file. %s",n),(T=T||D.getProgram().getProgram()).getTypeChecker(),[T]}}}catch(e){s=!0,d=e}finally{try{o||null==g.return||g.return()}finally{if(s)throw d}}u("File did not belong to any existing programs, moving to create/update. %s",n);var E=!0,C=!1,k=void 0;try{for(var N,A=r.projects[Symbol.iterator]();!(E=(N=A.next()).done);E=!0){var F=N.value,P=Ja.getTsconfigPath(F,r),w=l.get(P);if(w){var I=b(w,n,P);if(!I)continue;I.getTypeChecker(),i.push(I)}else{var O=v(P,r),M=O.getProgram().getProgram();l.set(P,O),i.push(M)}}}catch(e){C=!0,k=e}finally{try{E||null==A.return||A.return()}finally{if(C)throw k}}return i},t.createWatchProgram=v}));i(Va);Va.clearCaches,Va.getProgramsForProjects,Va.createWatchProgram;var qa=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Ka),a=r(yr),o=i.default("typescript-eslint:typescript-estree:createProjectProgram");t.createProjectProgram=function(e,t,r){o("Creating project program for: %s",r.filePath);var n=Gi.firstDefined(Va.getProgramsForProjects(e,r.filePath,r),(function(e){var t=e.getSourceFile(r.filePath);return t&&{ast:t,program:e}}));if(!n&&!t){var i=['"parserOptions.project" has been set for @typescript-eslint/parser.',"The file does not match your project config: ".concat(a.default.relative(Oe.cwd(),r.filePath),".")],s=!1,c=a.default.extname(r.filePath);if(-1===[".ts",".tsx",".js",".jsx"].indexOf(c)){var u="The extension for the file (".concat(c,") is non-standard");r.extraFileExtensions&&r.extraFileExtensions.length>0?r.extraFileExtensions.includes(c)||(i.push("".concat(u,'. It should be added to your existing "parserOptions.extraFileExtensions".')),s=!0):(i.push("".concat(u,'. You should add "parserOptions.extraFileExtensions" to your config.')),s=!0)}throw s||(i.push("The file must be included in at least one of the projects provided."),s=!0),new Error(i.join("\n"))}return n}}));i(qa);qa.createProjectProgram;var Wa=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=r(Ka),o=i(Fr),s=a.default("typescript-eslint:typescript-estree:createSourceFile");t.createSourceFile=function(e,t){return s("Getting AST without type information in %s mode for: %s",t.jsx?"TSX":"TS",t.filePath),o.createSourceFile(t.filePath,e,o.ScriptTarget.Latest,!0,Ja.getScriptKind(t))}}));i(Wa);Wa.createSourceFile;var Ga=a((function(e,t){var r=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(Fr);function a(e){return e.filter((function(e){switch(e.code){case 1013:case 1014:case 1044:case 1045:case 1048:case 1049:case 1070:case 1071:case 1085:case 1090:case 1096:case 1097:case 1098:case 1099:case 1117:case 1121:case 1123:case 1141:case 1162:case 1172:case 1173:case 1175:case 1176:case 1190:case 1200:case 1206:case 1211:case 1242:case 1246:case 1255:case 1308:case 2364:case 2369:case 2462:case 8017:case 17012:case 17013:return!0}return!1}))}function o(e){return Object.assign(Object.assign({},e),{message:i.flattenDiagnosticMessageText(e.messageText,i.sys.newLine)})}t.getFirstSemanticOrSyntacticError=function(e,t){try{var r=a(e.getSyntacticDiagnostics(t));if(r.length)return o(r[0]);var n=a(e.getSemanticDiagnostics(t));return n.length?o(n[0]):void 0}catch(e){return void console.warn('Warning From TSC: "'.concat(e.message))}}}));i(Ga);Ga.getFirstSemanticOrSyntacticError;var Ha="@typescript-eslint/typescript-estree",Ya="A parser that converts TypeScript source code into an ESTree compatible form",Xa="dist/parser.js",Qa="dist/parser.d.ts",$a=["dist","README.md","LICENSE"],Za={node:"^8.10.0 || ^10.13.0 || >=11.10.1"},eo={type:"git",url:"https://github.com/typescript-eslint/typescript-eslint.git",directory:"packages/typescript-estree"},to={url:"https://github.com/typescript-eslint/typescript-eslint/issues"},ro=["ast","estree","ecmascript","javascript","typescript","parser","syntax"],no={build:"tsc -b tsconfig.build.json",clean:"tsc -b tsconfig.build.json --clean",format:'prettier --write "./**/*.{ts,js,json,md}" --ignore-path ../../.prettierignore',lint:"eslint . --ext .js,.ts --ignore-path='../../.eslintignore'",test:"jest --coverage",typecheck:"tsc -p tsconfig.json --noEmit"},io={debug:"^4.1.1",glob:"^7.1.4","is-glob":"^4.0.1","lodash.unescape":"4.0.1",semver:"^6.3.0",tsutils:"^3.17.1"},ao={"@babel/code-frame":"7.5.5","@babel/parser":"7.5.5","@babel/types":"^7.3.2","@types/babel-code-frame":"^6.20.1","@types/debug":"^4.1.5","@types/glob":"^7.1.1","@types/is-glob":"^4.0.1","@types/lodash.isplainobject":"^4.0.4","@types/lodash.unescape":"^4.0.4","@types/semver":"^6.0.1","@types/tmp":"^0.1.0","@typescript-eslint/shared-fixtures":"2.6.1","babel-code-frame":"^6.26.0",glob:"^7.1.4","lodash.isplainobject":"4.0.6",tmp:"^0.1.0",typescript:"*"},oo={typescript:{optional:!0}},so="643d6d62630a16d189f0673a4bcf34202c7a3fde",co={name:Ha,version:"2.6.1",description:Ya,main:Xa,types:Qa,files:$a,engines:Za,repository:eo,bugs:to,license:"BSD-2-Clause",keywords:ro,scripts:no,dependencies:io,devDependencies:ao,peerDependenciesMeta:oo,gitHead:so},uo=o(Object.freeze({__proto__:null,name:Ha,version:"2.6.1",description:Ya,main:Xa,types:Qa,files:$a,engines:Za,repository:eo,bugs:to,license:"BSD-2-Clause",keywords:ro,scripts:no,dependencies:io,devDependencies:ao,peerDependenciesMeta:oo,gitHead:so,default:co})),lo=a((function(e,t){var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=n&&n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a,o=r(Me),s=i(Fr),c=r(Ni),u=">=3.2.1 <3.8.0",l=s.version,_=o.default.satisfies(l,[u].concat([">3.7.0-dev.0","3.7.1-rc"]).join(" || ")),d=!1;function p(e){return"string"!=typeof e?String(e):e}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).jsx?"estree.tsx":"estree.ts"}function g(){a={code:"",comment:!1,comments:[],createDefaultProgram:!1,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:!1,extraFileExtensions:[],filePath:m(),jsx:!1,loc:!1,log:console.log,preserveNodeMaps:void 0,projects:[],range:!1,strict:!1,tokens:null,tsconfigRootDir:Oe.cwd(),useJSXTextNode:!1}}function y(e){a.range="boolean"==typeof e.range&&e.range,a.loc="boolean"==typeof e.loc&&e.loc,"boolean"==typeof e.tokens&&e.tokens&&(a.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(a.comment=!0,a.comments=[]),"boolean"==typeof e.jsx&&e.jsx&&(a.jsx=!0),"string"==typeof e.filePath&&""!==e.filePath?a.filePath=e.filePath:a.filePath=m(a),"boolean"==typeof e.useJSXTextNode&&e.useJSXTextNode&&(a.useJSXTextNode=!0),"boolean"==typeof e.errorOnUnknownASTType&&e.errorOnUnknownASTType&&(a.errorOnUnknownASTType=!0),"function"==typeof e.loggerFn?a.log=e.loggerFn:!1===e.loggerFn&&(a.log=Function.prototype),"string"==typeof e.project?a.projects=[e.project]:Array.isArray(e.project)&&e.project.every((function(e){return"string"==typeof e}))&&(a.projects=e.project),"string"==typeof e.tsconfigRootDir&&(a.tsconfigRootDir=e.tsconfigRootDir),a.projects&&(a.projects=a.projects.reduce((function(e,t){return e.concat(c.default(t)?gi.sync(t,{cwd:a.tsconfigRootDir||Oe.cwd()}):t)}),[])),Array.isArray(e.extraFileExtensions)&&e.extraFileExtensions.every((function(e){return"string"==typeof e}))&&(a.extraFileExtensions=e.extraFileExtensions),a.preserveNodeMaps="boolean"==typeof e.preserveNodeMaps&&e.preserveNodeMaps,void 0===e.preserveNodeMaps&&a.projects.length>0&&(a.preserveNodeMaps=!0),a.createDefaultProgram="boolean"==typeof e.createDefaultProgram&&e.createDefaultProgram}function h(){if(!_&&!d){if(void 0!==f(Oe)&&Oe.stdout.isTTY){var e=["=============","WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.","You may find that it works just fine, or you may not.","SUPPORTED TYPESCRIPT VERSIONS: ".concat(u),"YOUR TYPESCRIPT VERSION: ".concat(l),"Please only submit bug reports when using the officially supported version.","============="];a.log(e.join("\n\n"))}d=!0}}var v=uo.version;t.version=v,t.parse=function(e,t){if(g(),t&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');e=p(e),a.code=e,void 0!==t&&y(t),h();var r=Wa.createSourceFile(e,a);return Da.astConverter(r,a,!1).estree},t.parseAndGenerateServices=function(e,t){g(),e=p(e),a.code=e,void 0!==t&&(y(t),"boolean"==typeof t.errorOnTypeScriptSyntacticAndSemanticIssues&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(a.errorOnTypeScriptSyntacticAndSemanticIssues=!0)),h();var r=a.projects&&a.projects.length>0,n=function(e,t,r){return t&&qa.createProjectProgram(e,r,a)||t&&r&&za.createDefaultProgram(e,a)||Ua.createIsolatedProgram(e,a)}(e,r,a.createDefaultProgram),i=n.ast,o=n.program,s=void 0!==a.preserveNodeMaps?a.preserveNodeMaps:r,c=Da.astConverter(i,a,s),u=c.estree,l=c.astMaps;if(o&&a.errorOnTypeScriptSyntacticAndSemanticIssues){var _=Ga.getFirstSemanticOrSyntacticError(o,i);if(_)throw Hi.convertError(_)}return{ast:u,services:{program:r?o:void 0,esTreeNodeToTSNodeMap:s&&l?l.esTreeNodeToTSNodeMap:void 0,tsNodeToESTreeNodeMap:s&&l?l.tsNodeToESTreeNodeMap:void 0}}},function(e){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}(Wi),t.clearCaches=Va.clearCaches}));i(lo);lo.version,lo.parse,lo.parseAndGenerateServices,lo.clearCaches;var _o=_;function po(e,t){return lo.parse(e,{loc:!0,range:!0,tokens:!0,comment:!0,useJSXTextNode:!0,jsx:t})}var fo={parsers:{typescript:Object.assign({parse:function(e,n,i){var a,o=function(e){return new RegExp(["(^[^\"'`]*)"].join(""),"m").test(e)}(e);try{a=po(e,o)}catch(r){try{a=po(e,!o)}catch(e){var s=r;if(void 0===s.lineNumber)throw s;throw t(s.message,{start:{line:s.lineNumber,column:s.column+1}})}}return delete a.tokens,r(e,a),ce(a,Object.assign({},i,{originalText:e}))},astFormat:"estree",hasPragma:_o},p)}},mo=fo.parsers;e.default=fo,e.parsers=mo,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/std/prettier/vendor/standalone.d.ts b/std/prettier/vendor/standalone.d.ts deleted file mode 100644 index 9c2f73d696..0000000000 --- a/std/prettier/vendor/standalone.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { CursorOptions, CursorResult, Options, Plugin } from './index.d.ts'; - -/** - * formatWithCursor both formats the code, and translates a cursor position from unformatted code to formatted code. - * This is useful for editor integrations, to prevent the cursor from moving when code is formatted - * - * The cursorOffset option should be provided, to specify where the cursor is. This option cannot be used with rangeStart and rangeEnd. - * - * ```js - * prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); - * ``` - * `-> { formatted: '1;\n', cursorOffset: 1 }` - */ -export function formatWithCursor( - source: string, - options: CursorOptions, -): CursorResult; - -/** - * `format` is used to format text using Prettier. [Options](https://github.com/prettier/prettier#options) may be provided to override the defaults. - */ -export function format(source: string, options?: Options): string; - -/** - * `check` checks to see if the file has been formatted with Prettier given those options and returns a `Boolean`. - * This is similar to the `--list-different` parameter in the CLI and is useful for running Prettier in CI scenarios. - */ -export function check(source: string, options?: Options): boolean; - -export as namespace prettier; diff --git a/std/prettier/vendor/standalone.js b/std/prettier/vendor/standalone.js deleted file mode 100644 index 681deaf9e5..0000000000 --- a/std/prettier/vendor/standalone.js +++ /dev/null @@ -1,31835 +0,0 @@ -// This file is copied from prettier@1.19.1 -/** - * Copyright © James Long and contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.prettier = factory()); -}(globalThis, (function () { 'use strict'; - - var name = "prettier"; - var version = "1.19.1"; - var description = "Prettier is an opinionated code formatter"; - var bin = { - prettier: "./bin/prettier.js" - }; - var repository = "prettier/prettier"; - var homepage = "https://prettier.io"; - var author = "James Long"; - var license = "MIT"; - var main = "./index.js"; - var engines = { - node: ">=8" - }; - var dependencies = { - "@angular/compiler": "8.2.13", - "@babel/code-frame": "7.5.5", - "@babel/parser": "7.7.3", - "@glimmer/syntax": "0.41.0", - "@iarna/toml": "2.2.3", - "@typescript-eslint/typescript-estree": "2.6.1", - "angular-estree-parser": "1.1.5", - "angular-html-parser": "1.3.0", - camelcase: "5.3.1", - chalk: "2.4.2", - "cjk-regex": "2.0.0", - cosmiconfig: "5.2.1", - dashify: "2.0.0", - dedent: "0.7.0", - diff: "4.0.1", - editorconfig: "0.15.3", - "editorconfig-to-prettier": "0.1.1", - "escape-string-regexp": "1.0.5", - esutils: "2.0.3", - "find-parent-dir": "0.3.0", - "find-project-root": "1.1.1", - "flow-parser": "0.111.3", - "get-stream": "4.1.0", - globby: "6.1.0", - graphql: "14.5.8", - "html-element-attributes": "2.2.0", - "html-styles": "1.0.0", - "html-tag-names": "1.1.4", - ignore: "4.0.6", - "is-ci": "2.0.0", - "jest-docblock": "24.9.0", - "json-stable-stringify": "1.0.1", - leven: "3.1.0", - "lines-and-columns": "1.1.6", - "linguist-languages": "7.6.0", - "lodash.uniqby": "4.7.0", - mem: "5.1.1", - minimatch: "3.0.4", - minimist: "1.2.0", - "n-readlines": "1.0.0", - "normalize-path": "3.0.0", - "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee", - "postcss-less": "2.0.0", - "postcss-media-query-parser": "0.2.3", - "postcss-scss": "2.0.0", - "postcss-selector-parser": "2.2.3", - "postcss-values-parser": "1.5.0", - "regexp-util": "1.2.2", - "remark-math": "1.0.6", - "remark-parse": "5.0.0", - resolve: "1.12.0", - semver: "6.3.0", - "string-width": "4.1.0", - typescript: "3.7.2", - "unicode-regex": "3.0.0", - unified: "8.4.1", - vnopts: "1.0.2", - "yaml-unist-parser": "1.1.1" - }; - var devDependencies = { - "@babel/core": "7.7.2", - "@babel/preset-env": "7.7.1", - "@rollup/plugin-alias": "2.2.0", - "@rollup/plugin-replace": "2.2.1", - "babel-loader": "8.0.6", - benchmark: "2.1.4", - "builtin-modules": "3.1.0", - codecov: "3.6.1", - "cross-env": "6.0.3", - eslint: "6.6.0", - "eslint-config-prettier": "6.5.0", - "eslint-formatter-friendly": "7.0.0", - "eslint-plugin-import": "2.18.2", - "eslint-plugin-prettier": "3.1.1", - "eslint-plugin-react": "7.16.0", - execa: "3.2.0", - jest: "23.3.0", - "jest-junit": "9.0.0", - "jest-snapshot-serializer-ansi": "1.0.0", - "jest-snapshot-serializer-raw": "1.1.0", - "jest-watch-typeahead": "0.4.0", - mkdirp: "0.5.1", - prettier: "1.19.0", - prettylint: "1.0.0", - rimraf: "3.0.0", - rollup: "1.26.3", - "rollup-plugin-babel": "4.3.3", - "rollup-plugin-commonjs": "10.1.0", - "rollup-plugin-json": "4.0.0", - "rollup-plugin-node-globals": "1.4.0", - "rollup-plugin-node-resolve": "5.2.0", - "rollup-plugin-terser": "5.1.2", - shelljs: "0.8.3", - "snapshot-diff": "0.4.0", - "strip-ansi": "5.2.0", - "synchronous-promise": "2.0.10", - tempy: "0.2.1", - "terser-webpack-plugin": "2.2.1", - webpack: "4.41.2" - }; - var scripts = { - prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1", - "prepare-release": "yarn && yarn build && yarn test:dist", - test: "jest", - "test:dist": "node ./scripts/test-dist.js", - "test-integration": "jest tests_integration", - "perf-repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", - "perf-repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", - "perf-benchmark": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-benchmark --loglevel debug ${PERF_FILE:-./index.js} > /dev/null", - "check-types": "tsc", - lint: "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly", - "lint-docs": "prettylint {.,docs,website,website/blog}/*.md", - "lint-dist": "eslint --no-eslintrc --no-ignore --env=browser \"dist/!(bin-prettier|index|third-party).js\"", - build: "node --max-old-space-size=3072 ./scripts/build/build.js", - "build-docs": "node ./scripts/build-docs.js", - "check-deps": "node ./scripts/check-deps.js", - spellcheck: "npx -p cspell@4.0.31 cspell {bin,scripts,src}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md" - }; - var _package = { - name: name, - version: version, - description: description, - bin: bin, - repository: repository, - homepage: homepage, - author: author, - license: license, - main: main, - engines: engines, - dependencies: dependencies, - devDependencies: devDependencies, - scripts: scripts - }; - - var _package$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name, - version: version, - description: description, - bin: bin, - repository: repository, - homepage: homepage, - author: author, - license: license, - main: main, - engines: engines, - dependencies: dependencies, - devDependencies: devDependencies, - scripts: scripts, - 'default': _package - }); - - function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a 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); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - writable: true, - configurable: true - } - }); - if (superClass) _setPrototypeOf(subClass, superClass); - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; - } - - function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !_isNativeFunction(Class)) return Class; - - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - - _cache.set(Class, Wrapper); - } - - function Wrapper() { - return _construct(Class, arguments, _getPrototypeOf(this).constructor); - } - - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class); - }; - - return _wrapNativeSuper(Class); - } - - function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return self; - } - - function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } - - return _assertThisInitialized(self); - } - - function _superPropBase(object, property) { - while (!Object.prototype.hasOwnProperty.call(object, property)) { - object = _getPrototypeOf(object); - if (object === null) break; - } - - return object; - } - - function _get(target, property, receiver) { - if (typeof Reflect !== "undefined" && Reflect.get) { - _get = Reflect.get; - } else { - _get = function _get(target, property, receiver) { - var base = _superPropBase(target, property); - - if (!base) return; - var desc = Object.getOwnPropertyDescriptor(base, property); - - if (desc.get) { - return desc.get.call(receiver); - } - - return desc.value; - }; - } - - return _get(target, property, receiver || target); - } - - function _taggedTemplateLiteral(strings, raw) { - if (!raw) { - raw = strings.slice(0); - } - - return Object.freeze(Object.defineProperties(strings, { - raw: { - value: Object.freeze(raw) - } - })); - } - - function _slicedToArray(arr, i) { - return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } - } - - function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - } - - function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); - } - - function _iterableToArrayLimit(arr, i) { - if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { - return; - } - - var _arr = []; - var _n = true; - var _d = false; - var _e = undefined; - - try { - for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { - _arr.push(_s.value); - - if (i && _arr.length === i) break; - } - } catch (err) { - _d = true; - _e = err; - } finally { - try { - if (!_n && _i["return"] != null) _i["return"](); - } finally { - if (_d) throw _e; - } - } - - return _arr; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } - - function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance"); - } - - function Diff() {} - - Diff.prototype = { - diff: function diff(oldString, newString) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - - if (typeof options === 'function') { - callback = options; - options = {}; - } - - this.options = options; - var self = this; - - function done(value) { - if (callback) { - setTimeout(function () { - callback(undefined, value); - }, 0); - return true; - } else { - return value; - } - } // Allow subclasses to massage the input prior to running - - - oldString = this.castInput(oldString); - newString = this.castInput(newString); - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ - newPos: -1, - components: [] - }]; // Seed editLength = 0, i.e. the content starts with the same values - - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - // Identity per the equality and tokenizer - return done([{ - value: this.join(newString), - count: newString.length - }]); - } // Main worker method. checks all permutations of a given edit length for acceptance. - - - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = void 0; - - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - - - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; // No need to clone, we've pulled it from the list - - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done - - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); - } else { - // Otherwise track this path as a potential candidate and continue. - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced. - - - if (callback) { - (function exec() { - setTimeout(function () { - // This should not happen, but we want to be safe. - - /* istanbul ignore next */ - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - - if (ret) { - return ret; - } - } - } - }, - pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length - 1] = { - count: last.count + 1, - added: added, - removed: removed - }; - } else { - components.push({ - count: 1, - added: added, - removed: removed - }); - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - commonCount = 0; - - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({ - count: commonCount - }); - } - - basePath.newPos = newPos; - return oldPos; - }, - equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); - } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return value.split(''); - }, - join: function join(chars) { - return chars.join(''); - } - }; - - function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - - newPos += component.count; // Common case - - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; // Reverse add and remove so removes are output first to match common convention - // The diffing algorithm is tied to add then remove output and this is the simplest - // route to get the desired output with minimal overhead. - - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } // Special case handle for when one terminal is ignored (i.e. whitespace). - // For this case we merge the terminal into the prior string and drop the change. - // This is only available for string mode. - - - var lastComponent = components[componentLen - 1]; - - if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); - } - - return components; - } - - function clonePath(path) { - return { - newPos: path.newPos, - components: path.components.slice(0) - }; - } - - var characterDiff = new Diff(); - - function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); - } - - function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - - return defaults; - } // - // Ranges and exceptions: - // Latin-1 Supplement, 0080–00FF - // - U+00D7 × Multiplication sign - // - U+00F7 ÷ Division sign - // Latin Extended-A, 0100–017F - // Latin Extended-B, 0180–024F - // IPA Extensions, 0250–02AF - // Spacing Modifier Letters, 02B0–02FF - // - U+02C7 ˇ ˇ Caron - // - U+02D8 ˘ ˘ Breve - // - U+02D9 ˙ ˙ Dot Above - // - U+02DA ˚ ˚ Ring Above - // - U+02DB ˛ ˛ Ogonek - // - U+02DC ˜ ˜ Small Tilde - // - U+02DD ˝ ˝ Double Acute Accent - // Latin Extended Additional, 1E00–1EFF - - - var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; - var reWhitespace = /\S/; - var wordDiff = new Diff(); - - wordDiff.equals = function (left, right) { - if (this.options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - - return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); - }; - - wordDiff.tokenize = function (value) { - var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. - - for (var i = 0; i < tokens.length - 1; i++) { - // If we have an empty string in the next field and we have only word chars before and after, merge - if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } - - return tokens; - }; - - function diffWords(oldStr, newStr, options) { - options = generateOptions(options, { - ignoreWhitespace: true - }); - return wordDiff.diff(oldStr, newStr, options); - } - - function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); - } - - var lineDiff = new Diff(); - - lineDiff.tokenize = function (value) { - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line - - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } // Merge the content and line separators into single tokens - - - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - - if (i % 2 && !this.options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - if (this.options.ignoreWhitespace) { - line = line.trim(); - } - - retLines.push(line); - } - } - - return retLines; - }; - - function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); - } - - function diffTrimmedLines(oldStr, newStr, callback) { - var options = generateOptions(callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); - } - - var sentenceDiff = new Diff(); - - sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); - }; - - function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); - } - - var cssDiff = new Diff(); - - cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); - }; - - function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); - } - - function _typeof$1(obj) { - if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") { - _typeof$1 = function _typeof$1(obj) { - return _typeof(obj); - }; - } else { - _typeof$1 = function _typeof$1(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj); - }; - } - - return _typeof$1(obj); - } - - function _toConsumableArray$1(arr) { - return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _nonIterableSpread$1(); - } - - function _arrayWithoutHoles$1(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { - arr2[i] = arr[i]; - } - - return arr2; - } - } - - function _iterableToArray$1(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); - } - - function _nonIterableSpread$1() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } - - var objectPrototypeToString = Object.prototype.toString; - var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a - // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - - jsonDiff.useLongestToken = true; - jsonDiff.tokenize = lineDiff.tokenize; - - jsonDiff.castInput = function (value) { - var _this$options = this.options, - undefinedReplacement = _this$options.undefinedReplacement, - _this$options$stringi = _this$options.stringifyReplacer, - stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) { - return typeof v === 'undefined' ? undefinedReplacement : v; - } : _this$options$stringi; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); - }; - - jsonDiff.equals = function (left, right) { - return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); - }; - - function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); - } // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. Accepts an optional replacer - - - function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - - if (replacer) { - obj = replacer(key, obj); - } - - var i; - - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - - var canonicalizedObj; - - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - - if (_typeof$1(obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - - var sortedKeys = [], - _key; - - for (_key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(_key)) { - sortedKeys.push(_key); - } - } - - sortedKeys.sort(); - - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - - return canonicalizedObj; - } - - var arrayDiff = new Diff(); - - arrayDiff.tokenize = function (value) { - return value.slice(); - }; - - arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; - }; - - function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); - } - - function parsePatch(uniDiff) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], - list = [], - i = 0; - - function parseIndex() { - var index = {}; - list.push(index); // Parse diff metadata - - while (i < diffstr.length) { - var line = diffstr[i]; // File header found, end parsing diff metadata - - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } // Diff index - - - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - - if (header) { - index.index = header[1]; - } - - i++; - } // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - - - parseFileHeader(index); - parseFileHeader(index); // Parse hunks - - index.hunks = []; - - while (i < diffstr.length) { - var _line = diffstr[i]; - - if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line && options.strict) { - // Ignore unexpected content unless in strict mode - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - - - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]); - - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } // Parses a hunk - // This assumes that we are at the start of a hunk. - - - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: +chunkHeader[2] || 1, - newStart: +chunkHeader[3], - newLines: +chunkHeader[4] || 1, - lines: [], - linedelimiters: [] - }; - var addCount = 0, - removeCount = 0; - - for (; i < diffstr.length; i++) { - // Lines starting with '---' could be mistaken for the "remove line" operation - // But they could be the header for the next file. Therefore prune such cases out. - if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { - break; - } - - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - hunk.linedelimiters.push(delimiters[i] || '\n'); - - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - break; - } - } // Handle the empty block count case - - - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } // Perform optional sanity checking - - - if (options.strict) { - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - } - - return hunk; - } - - while (i < diffstr.length) { - parseIndex(); - } - - return list; - } // Iterator that traverses in the range of [min, max], stepping - // by distance from a given start position. I.e. for [0, 4], with - // start of 2, this will iterate 2, 3, 1, 4, 0. - - - function distanceIterator(start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - - - if (start + localOffset <= maxLine) { - return localOffset; - } - - forwardExhausted = true; - } - - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - - - if (minLine <= start - localOffset) { - return -localOffset++; - } - - backwardExhausted = true; - return iterator(); - } // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - - }; - } - - function applyPatch(source, uniDiff) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - - uniDiff = uniDiff[0]; - } // Apply the diff to the input - - - var lines = source.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { - return line === patchContent; - }, - errorCount = 0, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0, - offset = 0, - removeEOFNL, - addEOFNL; - /** - * Checks if the hunk exactly fits on the provided location - */ - - - function hunkFits(hunk, toPos) { - for (var j = 0; j < hunk.lines.length; j++) { - var line = hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line; - - if (operation === ' ' || operation === '-') { - // Context sanity check - if (!compareLine(toPos + 1, lines[toPos], operation, content)) { - errorCount++; - - if (errorCount > fuzzFactor) { - return false; - } - } - - toPos++; - } - } - - return true; - } // Search best fit offsets for each hunk based on the previous ones - - - for (var i = 0; i < hunks.length; i++) { - var hunk = hunks[i], - maxLine = lines.length - hunk.oldLines, - localOffset = 0, - toPos = offset + hunk.oldStart - 1; - var iterator = distanceIterator(toPos, minLine, maxLine); - - for (; localOffset !== undefined; localOffset = iterator()) { - if (hunkFits(hunk, toPos + localOffset)) { - hunk.offset = offset += localOffset; - break; - } - } - - if (localOffset === undefined) { - return false; - } // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - - - minLine = hunk.offset + hunk.oldStart + hunk.oldLines; - } // Apply patch hunks - - - var diffOffset = 0; - - for (var _i = 0; _i < hunks.length; _i++) { - var _hunk = hunks[_i], - _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; - - diffOffset += _hunk.newLines - _hunk.oldLines; - - if (_toPos < 0) { - // Creating a new file - _toPos = 0; - } - - for (var j = 0; j < _hunk.lines.length; j++) { - var line = _hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line, - delimiter = _hunk.linedelimiters[j]; - - if (operation === ' ') { - _toPos++; - } else if (operation === '-') { - lines.splice(_toPos, 1); - delimiters.splice(_toPos, 1); - /* istanbul ignore else */ - } else if (operation === '+') { - lines.splice(_toPos, 0, content); - delimiters.splice(_toPos, 0, delimiter); - _toPos++; - } else if (operation === '\\') { - var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; - - if (previousOperation === '+') { - removeEOFNL = true; - } else if (previousOperation === '-') { - addEOFNL = true; - } - } - } - } // Handle EOFNL insertion/removal - - - if (removeEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - delimiters.pop(); - } - } else if (addEOFNL) { - lines.push(''); - delimiters.push('\n'); - } - - for (var _k = 0; _k < lines.length - 1; _k++) { - lines[_k] = lines[_k] + delimiters[_k]; - } - - return lines.join(''); - } // Wrapper that supports multiple file patches via callbacks. - - - function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - - var currentIndex = 0; - - function processIndex() { - var index = uniDiff[currentIndex++]; - - if (!index) { - return options.complete(); - } - - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - - processIndex(); - }); - }); - } - - processIndex(); - } - - function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - - if (typeof options.context === 'undefined') { - options.context = 4; - } - - var diff = diffLines(oldStr, newStr, options); - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - - var _loop = function _loop(i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - var _curRange; // If we have previous context, start with that - - - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } // Output our changes - - - (_curRange = curRange).push.apply(_curRange, _toConsumableArray$1(lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); // Track the updated file position - - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - var _curRange2; // Overlapping - - - (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray$1(contextLines(lines))); - } else { - var _curRange3; // end the range and output - - - var contextSize = Math.min(lines.length, options.context); - - (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray$1(contextLines(lines.slice(0, contextSize)))); - - var hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - - if (i >= diff.length - 2 && lines.length <= options.context) { - // EOF is inside this hunk - var oldEOFNewline = /\n$/.test(oldStr); - var newEOFNewline = /\n$/.test(newStr); - var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; - - if (!oldEOFNewline && noNlBeforeAdds) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); - } - - if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { - curRange.push('\\ No newline at end of file'); - } - } - - hunks.push(hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - - oldLine += lines.length; - newLine += lines.length; - } - }; - - for (var i = 0; i < diff.length; i++) { - _loop(i); - } - - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } - - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - var ret = []; - - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; - } - - function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); - } - - function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - - return arrayStartsWith(a, b); - } - - function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - - return true; - } - - function calcLineCount(hunk) { - var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } - } - - function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - - return ret; - } - - function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return parsePatch(param)[0]; - } - - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - - return structuredPatch(undefined, undefined, base, param); - } - - return param; - } - - function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; - } - - function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } - } - - function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; - } - - function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; - } - - function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; // Handle any leading content - - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. - - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - var _hunk$lines; // Mine inserted - - - (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray$1(collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - var _hunk$lines2; // Theirs inserted - - - (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray$1(collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } // Now push anything that may be remaining - - - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); - } - - function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - var _hunk$lines3; - - (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray$1(myChanges)); - - return; - } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - var _hunk$lines4; - - (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray$1(theirChanges)); - - return; - } - } else if (arrayEqual(myChanges, theirChanges)) { - var _hunk$lines5; - - (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray$1(myChanges)); - - return; - } - - conflict(hunk, myChanges, theirChanges); - } - - function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - - if (theirChanges.merged) { - var _hunk$lines6; - - (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray$1(theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } - } - - function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); - } - - function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } - } - - function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } - } - - function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - - while (state.index < state.lines.length) { - var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - - return ret; - } - - function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; // Once we've hit our add, then we are done - - if (match[0] === '+') { - break; - } - - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - - if (change[0] === '+') { - conflicted = true; - - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - - if (conflicted) { - return changes; - } - - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - - return { - merged: merged, - changes: changes - }; - } - - function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); - } - - function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - - state.index += delta; - return true; - } - - function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; - } // See: http://code.google.com/p/google-diff-match-patch/wiki/API - - - function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - - return ret; - } - - function convertChangesToXML(changes) { - var ret = []; - - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - - return ret.join(''); - } - - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; - } - - var index_es6 = /*#__PURE__*/Object.freeze({ - __proto__: null, - Diff: Diff, - diffChars: diffChars, - diffWords: diffWords, - diffWordsWithSpace: diffWordsWithSpace, - diffLines: diffLines, - diffTrimmedLines: diffTrimmedLines, - diffSentences: diffSentences, - diffCss: diffCss, - diffJson: diffJson, - diffArrays: diffArrays, - structuredPatch: structuredPatch, - createTwoFilesPatch: createTwoFilesPatch, - createPatch: createPatch, - applyPatch: applyPatch, - applyPatches: applyPatches, - parsePatch: parsePatch, - merge: merge, - convertChangesToDMP: convertChangesToDMP, - convertChangesToXML: convertChangesToXML, - canonicalize: canonicalize - }); - - var _shim_fs = {}; - - var _shim_fs$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': _shim_fs - }); - - /*! - * normalize-path - * - * Copyright (c) 2014-2018, Jon Schlinkert. - * Released under the MIT License. - */ - var normalizePath = function normalizePath(path, stripTrailing) { - if (typeof path !== 'string') { - throw new TypeError('expected path to be a string'); - } - - if (path === '\\' || path === '/') return '/'; - var len = path.length; - if (len <= 1) return path; // ensure that win32 namespaces has two leading slashes, so that the path is - // handled properly by the win32 version of path.parse() after being normalized - // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces - - var prefix = ''; - - if (len > 4 && path[3] === '\\') { - var ch = path[2]; - - if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { - path = path.slice(2); - prefix = '//'; - } - } - - var segs = path.split(/[/\\]+/); - - if (stripTrailing !== false && segs[segs.length - 1] === '') { - segs.pop(); - } - - return prefix + segs.join('/'); - }; - - var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; - - var lookup = []; - var revLookup = []; - var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; - var inited = false; - - function init() { - inited = true; - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i]; - revLookup[code.charCodeAt(i)] = i; - } - - revLookup['-'.charCodeAt(0)] = 62; - revLookup['_'.charCodeAt(0)] = 63; - } - - function toByteArray(b64) { - if (!inited) { - init(); - } - - var i, j, l, tmp, placeHolders, arr; - var len = b64.length; - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4'); - } // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - - - placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data - - arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars - - l = placeHolders > 0 ? len - 4 : len; - var L = 0; - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)]; - arr[L++] = tmp >> 16 & 0xFF; - arr[L++] = tmp >> 8 & 0xFF; - arr[L++] = tmp & 0xFF; - } - - if (placeHolders === 2) { - tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4; - arr[L++] = tmp & 0xFF; - } else if (placeHolders === 1) { - tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2; - arr[L++] = tmp >> 8 & 0xFF; - arr[L++] = tmp & 0xFF; - } - - return arr; - } - - function tripletToBase64(num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; - } - - function encodeChunk(uint8, start, end) { - var tmp; - var output = []; - - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + uint8[i + 2]; - output.push(tripletToBase64(tmp)); - } - - return output.join(''); - } - - function fromByteArray(uint8) { - if (!inited) { - init(); - } - - var tmp; - var len = uint8.length; - var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes - - var output = ''; - var parts = []; - var maxChunkLength = 16383; // must be multiple of 3 - // go through the array every three bytes, we'll deal with trailing stuff later - - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); - } // pad the end with zeros, but make sure to not forget the extra bytes - - - if (extraBytes === 1) { - tmp = uint8[len - 1]; - output += lookup[tmp >> 2]; - output += lookup[tmp << 4 & 0x3F]; - output += '=='; - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1]; - output += lookup[tmp >> 10]; - output += lookup[tmp >> 4 & 0x3F]; - output += lookup[tmp << 2 & 0x3F]; - output += '='; - } - - parts.push(output); - return parts.join(''); - } - - function read(buffer, offset, isLE, mLen, nBytes) { - var e, m; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i = isLE ? nBytes - 1 : 0; - var d = isLE ? -1 : 1; - var s = buffer[offset + i]; - i += d; - e = s & (1 << -nBits) - 1; - s >>= -nBits; - nBits += eLen; - - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & (1 << -nBits) - 1; - e >>= -nBits; - nBits += mLen; - - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : (s ? -1 : 1) * Infinity; - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - - return (s ? -1 : 1) * m * Math.pow(2, e - mLen); - } - function write(buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; - var i = isLE ? 0 : nBytes - 1; - var d = isLE ? 1 : -1; - var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = e << mLen | m; - eLen += mLen; - - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128; - } - - var toString = {}.toString; - var isArray = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; - }; - - var INSPECT_MAX_BYTES = 50; - /** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ - - Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined ? global$1.TYPED_ARRAY_SUPPORT : true; - - function kMaxLength() { - return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff; - } - - function createBuffer(that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length'); - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length); - that.__proto__ = Buffer.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length); - } - - that.length = length; - } - - return that; - } - /** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - - - function Buffer(arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length); - } // Common case. - - - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error('If encoding is specified then the first argument must be a string'); - } - - return allocUnsafe(this, arg); - } - - return from(this, arg, encodingOrOffset, length); - } - Buffer.poolSize = 8192; // not used by this implementation - // TODO: Legacy, not needed anymore. Remove in next major version. - - Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype; - return arr; - }; - - function from(that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number'); - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length); - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset); - } - - return fromObject(that, value); - } - /** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ - - - Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length); - }; - - if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype; - Buffer.__proto__ = Uint8Array; - } - - function assertSize(size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number'); - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative'); - } - } - - function alloc(that, size, fill, encoding) { - assertSize(size); - - if (size <= 0) { - return createBuffer(that, size); - } - - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill); - } - - return createBuffer(that, size); - } - /** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ - - - Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding); - }; - - function allocUnsafe(that, size) { - assertSize(size); - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); - - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0; - } - } - - return that; - } - /** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ - - - Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size); - }; - /** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ - - - Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size); - }; - - function fromString(that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8'; - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding'); - } - - var length = byteLength(string, encoding) | 0; - that = createBuffer(that, length); - var actual = that.write(string, encoding); - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual); - } - - return that; - } - - function fromArrayLike(that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0; - that = createBuffer(that, length); - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255; - } - - return that; - } - - function fromArrayBuffer(that, array, byteOffset, length) { - array.byteLength; // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds'); - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds'); - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array); - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset); - } else { - array = new Uint8Array(array, byteOffset, length); - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array; - that.__proto__ = Buffer.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array); - } - - return that; - } - - function fromObject(that, obj) { - if (internalIsBuffer(obj)) { - var len = checked(obj.length) | 0; - that = createBuffer(that, len); - - if (that.length === 0) { - return that; - } - - obj.copy(that, 0, 0, len); - return that; - } - - if (obj) { - if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0); - } - - return fromArrayLike(that, obj); - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data); - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); - } - - function checked(length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes'); - } - - return length | 0; - } - Buffer.isBuffer = isBuffer; - - function internalIsBuffer(b) { - return !!(b != null && b._isBuffer); - } - - Buffer.compare = function compare(a, b) { - if (!internalIsBuffer(a) || !internalIsBuffer(b)) { - throw new TypeError('Arguments must be Buffers'); - } - - if (a === b) return 0; - var x = a.length; - var y = b.length; - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i]; - y = b[i]; - break; - } - } - - if (x < y) return -1; - if (y < x) return 1; - return 0; - }; - - Buffer.isEncoding = function isEncoding(encoding) { - switch (String(encoding).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 true; - - default: - return false; - } - }; - - Buffer.concat = function concat(list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers'); - } - - if (list.length === 0) { - return Buffer.alloc(0); - } - - var i; - - if (length === undefined) { - length = 0; - - for (i = 0; i < list.length; ++i) { - length += list[i].length; - } - } - - var buffer = Buffer.allocUnsafe(length); - var pos = 0; - - for (i = 0; i < list.length; ++i) { - var buf = list[i]; - - if (!internalIsBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers'); - } - - buf.copy(buffer, pos); - pos += buf.length; - } - - return buffer; - }; - - function byteLength(string, encoding) { - if (internalIsBuffer(string)) { - return string.length; - } - - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength; - } - - if (typeof string !== 'string') { - string = '' + string; - } - - var len = string.length; - if (len === 0) return 0; // Use a for loop to avoid recursion - - var loweredCase = false; - - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len; - - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length; - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2; - - case 'hex': - return len >>> 1; - - case 'base64': - return base64ToBytes(string).length; - - default: - if (loweredCase) return utf8ToBytes(string).length; // assume utf8 - - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } - } - - Buffer.byteLength = byteLength; - - function slowToString(encoding, start, end) { - var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - - if (start === undefined || start < 0) { - start = 0; - } // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - - - if (start > this.length) { - return ''; - } - - if (end === undefined || end > this.length) { - end = this.length; - } - - if (end <= 0) { - return ''; - } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - - - end >>>= 0; - start >>>= 0; - - if (end <= start) { - return ''; - } - - if (!encoding) encoding = 'utf8'; - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end); - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end); - - case 'ascii': - return asciiSlice(this, start, end); - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end); - - case 'base64': - return base64Slice(this, start, end); - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end); - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); - encoding = (encoding + '').toLowerCase(); - loweredCase = true; - } - } - } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect - // Buffer instances. - - - Buffer.prototype._isBuffer = true; - - function swap(b, n, m) { - var i = b[n]; - b[n] = b[m]; - b[m] = i; - } - - Buffer.prototype.swap16 = function swap16() { - var len = this.length; - - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits'); - } - - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1); - } - - return this; - }; - - Buffer.prototype.swap32 = function swap32() { - var len = this.length; - - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits'); - } - - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3); - swap(this, i + 1, i + 2); - } - - return this; - }; - - Buffer.prototype.swap64 = function swap64() { - var len = this.length; - - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits'); - } - - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7); - swap(this, i + 1, i + 6); - swap(this, i + 2, i + 5); - swap(this, i + 3, i + 4); - } - - return this; - }; - - Buffer.prototype.toString = function toString() { - var length = this.length | 0; - if (length === 0) return ''; - if (arguments.length === 0) return utf8Slice(this, 0, length); - return slowToString.apply(this, arguments); - }; - - Buffer.prototype.equals = function equals(b) { - if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer'); - if (this === b) return true; - return Buffer.compare(this, b) === 0; - }; - - Buffer.prototype.inspect = function inspect() { - var str = ''; - var max = INSPECT_MAX_BYTES; - - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); - if (this.length > max) str += ' ... '; - } - - return ''; - }; - - Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { - if (!internalIsBuffer(target)) { - throw new TypeError('Argument must be a Buffer'); - } - - if (start === undefined) { - start = 0; - } - - if (end === undefined) { - end = target ? target.length : 0; - } - - if (thisStart === undefined) { - thisStart = 0; - } - - if (thisEnd === undefined) { - thisEnd = this.length; - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index'); - } - - if (thisStart >= thisEnd && start >= end) { - return 0; - } - - if (thisStart >= thisEnd) { - return -1; - } - - if (start >= end) { - return 1; - } - - start >>>= 0; - end >>>= 0; - thisStart >>>= 0; - thisEnd >>>= 0; - if (this === target) return 0; - var x = thisEnd - thisStart; - var y = end - start; - var len = Math.min(x, y); - var thisCopy = this.slice(thisStart, thisEnd); - var targetCopy = target.slice(start, end); - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i]; - y = targetCopy[i]; - break; - } - } - - if (x < y) return -1; - if (y < x) return 1; - return 0; - }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, - // OR the last index of `val` in `buffer` at offset <= `byteOffset`. - // - // Arguments: - // - buffer - a Buffer to search - // - val - a string, Buffer, or number - // - byteOffset - an index into `buffer`; will be clamped to an int32 - // - encoding - an optional encoding, relevant is val is a string - // - dir - true for indexOf, false for lastIndexOf - - - function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1; // Normalize byteOffset - - if (typeof byteOffset === 'string') { - encoding = byteOffset; - byteOffset = 0; - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff; - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000; - } - - byteOffset = +byteOffset; // Coerce to Number. - - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : buffer.length - 1; - } // Normalize byteOffset: negative offsets start from the end of the buffer - - - if (byteOffset < 0) byteOffset = buffer.length + byteOffset; - - if (byteOffset >= buffer.length) { - if (dir) return -1;else byteOffset = buffer.length - 1; - } else if (byteOffset < 0) { - if (dir) byteOffset = 0;else return -1; - } // Normalize val - - - if (typeof val === 'string') { - val = Buffer.from(val, encoding); - } // Finally, search either indexOf (if dir is true) or lastIndexOf - - - if (internalIsBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1; - } - - return arrayIndexOf(buffer, val, byteOffset, encoding, dir); - } else if (typeof val === 'number') { - val = val & 0xFF; // Search for a byte value [0-255] - - if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); - } - } - - return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); - } - - throw new TypeError('val must be string, number or Buffer'); - } - - function arrayIndexOf(arr, val, byteOffset, encoding, dir) { - var indexSize = 1; - var arrLength = arr.length; - var valLength = val.length; - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase(); - - if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1; - } - - indexSize = 2; - arrLength /= 2; - valLength /= 2; - byteOffset /= 2; - } - } - - function read(buf, i) { - if (indexSize === 1) { - return buf[i]; - } else { - return buf.readUInt16BE(i * indexSize); - } - } - - var i; - - if (dir) { - var foundIndex = -1; - - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i; - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; - } else { - if (foundIndex !== -1) i -= i - foundIndex; - foundIndex = -1; - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; - - for (i = byteOffset; i >= 0; i--) { - var found = true; - - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false; - break; - } - } - - if (found) return i; - } - } - - return -1; - } - - Buffer.prototype.includes = function includes(val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1; - }; - - Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true); - }; - - Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false); - }; - - function hexWrite(buf, string, offset, length) { - offset = Number(offset) || 0; - var remaining = buf.length - offset; - - if (!length) { - length = remaining; - } else { - length = Number(length); - - if (length > remaining) { - length = remaining; - } - } // must be an even number of digits - - - var strLen = string.length; - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string'); - - if (length > strLen / 2) { - length = strLen / 2; - } - - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(parsed)) return i; - buf[offset + i] = parsed; - } - - return i; - } - - function utf8Write(buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); - } - - function asciiWrite(buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length); - } - - function latin1Write(buf, string, offset, length) { - return asciiWrite(buf, string, offset, length); - } - - function base64Write(buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length); - } - - function ucs2Write(buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); - } - - Buffer.prototype.write = function write(string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8'; - length = this.length; - offset = 0; // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset; - length = this.length; - offset = 0; // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0; - - if (isFinite(length)) { - length = length | 0; - if (encoding === undefined) encoding = 'utf8'; - } else { - encoding = length; - length = undefined; - } // legacy write(string, encoding, offset, length) - remove in v0.13 - - } else { - throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - } - - var remaining = this.length - offset; - if (length === undefined || length > remaining) length = remaining; - - if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds'); - } - - if (!encoding) encoding = 'utf8'; - var loweredCase = false; - - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length); - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length); - - case 'ascii': - return asciiWrite(this, string, offset, length); - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length); - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length); - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length); - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } - }; - - Buffer.prototype.toJSON = function toJSON() { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - }; - }; - - function base64Slice(buf, start, end) { - if (start === 0 && end === buf.length) { - return fromByteArray(buf); - } else { - return fromByteArray(buf.slice(start, end)); - } - } - - function utf8Slice(buf, start, end) { - end = Math.min(buf.length, end); - var res = []; - var i = start; - - while (i < end) { - var firstByte = buf[i]; - var codePoint = null; - var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint; - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte; - } - - break; - - case 2: - secondByte = buf[i + 1]; - - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; - - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint; - } - } - - break; - - case 3: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; - - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint; - } - } - - break; - - case 4: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - fourthByte = buf[i + 3]; - - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; - - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint; - } - } - - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD; - bytesPerSequence = 1; - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000; - res.push(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - - res.push(codePoint); - i += bytesPerSequence; - } - - return decodeCodePointsArray(res); - } // Based on http://stackoverflow.com/a/22747272/680742, the browser with - // the lowest limit is Chrome, with 0x10000 args. - // We go 1 magnitude less, for safety - - - var MAX_ARGUMENTS_LENGTH = 0x1000; - - function decodeCodePointsArray(codePoints) { - var len = codePoints.length; - - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints); // avoid extra slice() - } // Decode in chunks to avoid "call stack size exceeded". - - - var res = ''; - var i = 0; - - while (i < len) { - res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); - } - - return res; - } - - function asciiSlice(buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F); - } - - return ret; - } - - function latin1Slice(buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]); - } - - return ret; - } - - function hexSlice(buf, start, end) { - var len = buf.length; - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - var out = ''; - - for (var i = start; i < end; ++i) { - out += toHex(buf[i]); - } - - return out; - } - - function utf16leSlice(buf, start, end) { - var bytes = buf.slice(start, end); - var res = ''; - - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); - } - - return res; - } - - Buffer.prototype.slice = function slice(start, end) { - var len = this.length; - start = ~~start; - end = end === undefined ? len : ~~end; - - if (start < 0) { - start += len; - if (start < 0) start = 0; - } else if (start > len) { - start = len; - } - - if (end < 0) { - end += len; - if (end < 0) end = 0; - } else if (end > len) { - end = len; - } - - if (end < start) end = start; - var newBuf; - - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end); - newBuf.__proto__ = Buffer.prototype; - } else { - var sliceLen = end - start; - newBuf = new Buffer(sliceLen, undefined); - - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start]; - } - } - - return newBuf; - }; - /* - * Need to make sure that buffer isn't trying to write out of bounds. - */ - - - function checkOffset(offset, ext, length) { - if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); - } - - Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - var val = this[offset]; - var mul = 1; - var i = 0; - - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - - return val; - }; - - Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - - if (!noAssert) { - checkOffset(offset, byteLength, this.length); - } - - var val = this[offset + --byteLength]; - var mul = 1; - - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul; - } - - return val; - }; - - Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - return this[offset]; - }; - - Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return this[offset] | this[offset + 1] << 8; - }; - - Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return this[offset] << 8 | this[offset + 1]; - }; - - Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; - }; - - Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); - }; - - Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - var val = this[offset]; - var mul = 1; - var i = 0; - - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - - mul *= 0x80; - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - return val; - }; - - Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - var i = byteLength; - var mul = 1; - var val = this[offset + --i]; - - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul; - } - - mul *= 0x80; - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - return val; - }; - - Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - if (!(this[offset] & 0x80)) return this[offset]; - return (0xff - this[offset] + 1) * -1; - }; - - Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset] | this[offset + 1] << 8; - return val & 0x8000 ? val | 0xFFFF0000 : val; - }; - - Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset + 1] | this[offset] << 8; - return val & 0x8000 ? val | 0xFFFF0000 : val; - }; - - Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; - }; - - Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; - }; - - Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, true, 23, 4); - }; - - Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, false, 23, 4); - }; - - Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, true, 52, 8); - }; - - Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, false, 52, 8); - }; - - function checkInt(buf, value, offset, ext, max, min) { - if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); - if (offset + ext > buf.length) throw new RangeError('Index out of range'); - } - - Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var mul = 1; - var i = 0; - this[offset] = value & 0xFF; - - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = value / mul & 0xFF; - } - - return offset + byteLength; - }; - - Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var i = byteLength - 1; - var mul = 1; - this[offset + i] = value & 0xFF; - - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = value / mul & 0xFF; - } - - return offset + byteLength; - }; - - Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - this[offset] = value & 0xff; - return offset + 1; - }; - - function objectWriteUInt16(buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1; - - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8; - } - } - - Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value & 0xff; - this[offset + 1] = value >>> 8; - } else { - objectWriteUInt16(this, value, offset, true); - } - - return offset + 2; - }; - - Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value >>> 8; - this[offset + 1] = value & 0xff; - } else { - objectWriteUInt16(this, value, offset, false); - } - - return offset + 2; - }; - - function objectWriteUInt32(buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1; - - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff; - } - } - - Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = value >>> 24; - this[offset + 2] = value >>> 16; - this[offset + 1] = value >>> 8; - this[offset] = value & 0xff; - } else { - objectWriteUInt32(this, value, offset, true); - } - - return offset + 4; - }; - - Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value >>> 24; - this[offset + 1] = value >>> 16; - this[offset + 2] = value >>> 8; - this[offset + 3] = value & 0xff; - } else { - objectWriteUInt32(this, value, offset, false); - } - - return offset + 4; - }; - - Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = 0; - var mul = 1; - var sub = 0; - this[offset] = value & 0xFF; - - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1; - } - - this[offset + i] = (value / mul >> 0) - sub & 0xFF; - } - - return offset + byteLength; - }; - - Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = byteLength - 1; - var mul = 1; - var sub = 0; - this[offset + i] = value & 0xFF; - - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1; - } - - this[offset + i] = (value / mul >> 0) - sub & 0xFF; - } - - return offset + byteLength; - }; - - Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - if (value < 0) value = 0xff + value + 1; - this[offset] = value & 0xff; - return offset + 1; - }; - - Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value & 0xff; - this[offset + 1] = value >>> 8; - } else { - objectWriteUInt16(this, value, offset, true); - } - - return offset + 2; - }; - - Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value >>> 8; - this[offset + 1] = value & 0xff; - } else { - objectWriteUInt16(this, value, offset, false); - } - - return offset + 2; - }; - - Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value & 0xff; - this[offset + 1] = value >>> 8; - this[offset + 2] = value >>> 16; - this[offset + 3] = value >>> 24; - } else { - objectWriteUInt32(this, value, offset, true); - } - - return offset + 4; - }; - - Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (value < 0) value = 0xffffffff + value + 1; - - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = value >>> 24; - this[offset + 1] = value >>> 16; - this[offset + 2] = value >>> 8; - this[offset + 3] = value & 0xff; - } else { - objectWriteUInt32(this, value, offset, false); - } - - return offset + 4; - }; - - function checkIEEE754(buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range'); - if (offset < 0) throw new RangeError('Index out of range'); - } - - function writeFloat(buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4); - } - - write(buf, value, offset, littleEndian, 23, 4); - return offset + 4; - } - - Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert); - }; - - Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert); - }; - - function writeDouble(buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8); - } - - write(buf, value, offset, littleEndian, 52, 8); - return offset + 8; - } - - Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert); - }; - - Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert); - }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) - - - Buffer.prototype.copy = function copy(target, targetStart, start, end) { - if (!start) start = 0; - if (!end && end !== 0) end = this.length; - if (targetStart >= target.length) targetStart = target.length; - if (!targetStart) targetStart = 0; - if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done - - if (end === start) return 0; - if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions - - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds'); - } - - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds'); - if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob? - - if (end > this.length) end = this.length; - - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start; - } - - var len = end - start; - var i; - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start]; - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start]; - } - } else { - Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart); - } - - return len; - }; // Usage: - // buffer.fill(number[, offset[, end]]) - // buffer.fill(buffer[, offset[, end]]) - // buffer.fill(string[, offset[, end]][, encoding]) - - - Buffer.prototype.fill = function fill(val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start; - start = 0; - end = this.length; - } else if (typeof end === 'string') { - encoding = end; - end = this.length; - } - - if (val.length === 1) { - var code = val.charCodeAt(0); - - if (code < 256) { - val = code; - } - } - - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string'); - } - - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding); - } - } else if (typeof val === 'number') { - val = val & 255; - } // Invalid ranges are not set to a default, so can range check early. - - - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index'); - } - - if (end <= start) { - return this; - } - - start = start >>> 0; - end = end === undefined ? this.length : end >>> 0; - if (!val) val = 0; - var i; - - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val; - } - } else { - var bytes = internalIsBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()); - var len = bytes.length; - - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len]; - } - } - - return this; - }; // HELPER FUNCTIONS - // ================ - - - var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; - - function base64clean(str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' - - if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - - while (str.length % 4 !== 0) { - str = str + '='; - } - - return str; - } - - function stringtrim(str) { - if (str.trim) return str.trim(); - return str.replace(/^\s+|\s+$/g, ''); - } - - function toHex(n) { - if (n < 16) return '0' + n.toString(16); - return n.toString(16); - } - - function utf8ToBytes(string, units) { - units = units || Infinity; - var codePoint; - var length = string.length; - var leadSurrogate = null; - var bytes = []; - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i); // is surrogate component - - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue; - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue; - } // valid lead - - - leadSurrogate = codePoint; - continue; - } // 2 leads in a row - - - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - leadSurrogate = codePoint; - continue; - } // valid surrogate pair - - - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - } - - leadSurrogate = null; // encode utf8 - - if (codePoint < 0x80) { - if ((units -= 1) < 0) break; - bytes.push(codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break; - bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break; - bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break; - bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); - } else { - throw new Error('Invalid code point'); - } - } - - return bytes; - } - - function asciiToBytes(str) { - var byteArray = []; - - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF); - } - - return byteArray; - } - - function utf16leToBytes(str, units) { - var c, hi, lo; - var byteArray = []; - - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break; - c = str.charCodeAt(i); - hi = c >> 8; - lo = c % 256; - byteArray.push(lo); - byteArray.push(hi); - } - - return byteArray; - } - - function base64ToBytes(str) { - return toByteArray(base64clean(str)); - } - - function blitBuffer(src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if (i + offset >= dst.length || i >= src.length) break; - dst[i + offset] = src[i]; - } - - return i; - } - - function isnan(val) { - return val !== val; // eslint-disable-line no-self-compare - } // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence - // The _isBuffer check is for Safari 5-7 support, because it's missing - // Object.prototype.constructor. Remove this eventually - - - function isBuffer(obj) { - return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)); - } - - function isFastBuffer(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' && isFastBuffer(obj.slice(0, 0)); - } - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function unwrapExports (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; - } - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } - - var fs = getCjsExportFromNamespace(_shim_fs$1); - - /** - * @class - */ - - - var LineByLine = - /*#__PURE__*/ - function () { - function LineByLine(file, options) { - _classCallCheck(this, LineByLine); - - options = options || {}; - if (!options.readChunk) options.readChunk = 1024; - - if (!options.newLineCharacter) { - options.newLineCharacter = 0x0a; //linux line ending - } else { - options.newLineCharacter = options.newLineCharacter.charCodeAt(0); - } - - if (typeof file === 'number') { - this.fd = file; - } else { - this.fd = fs.openSync(file, 'r'); - } - - this.options = options; - this.newLineCharacter = options.newLineCharacter; - this.reset(); - } - - _createClass(LineByLine, [{ - key: "_searchInBuffer", - value: function _searchInBuffer(buffer, hexNeedle) { - var found = -1; - - for (var i = 0; i <= buffer.length; i++) { - var b_byte = buffer[i]; - - if (b_byte === hexNeedle) { - found = i; - break; - } - } - - return found; - } - }, { - key: "reset", - value: function reset() { - this.eofReached = false; - this.linesCache = []; - this.fdPosition = 0; - } - }, { - key: "close", - value: function close() { - fs.closeSync(this.fd); - this.fd = null; - } - }, { - key: "_extractLines", - value: function _extractLines(buffer) { - var line; - var lines = []; - var bufferPosition = 0; - var lastNewLineBufferPosition = 0; - - while (true) { - var bufferPositionValue = buffer[bufferPosition++]; - - if (bufferPositionValue === this.newLineCharacter) { - line = buffer.slice(lastNewLineBufferPosition, bufferPosition); - lines.push(line); - lastNewLineBufferPosition = bufferPosition; - } else if (!bufferPositionValue) { - break; - } - } - - var leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition); - - if (leftovers.length) { - lines.push(leftovers); - } - - return lines; - } - }, { - key: "_readChunk", - value: function _readChunk(lineLeftovers) { - var totalBytesRead = 0; - var bytesRead; - var buffers = []; - - do { - var readBuffer = new Buffer(this.options.readChunk); - bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); - totalBytesRead = totalBytesRead + bytesRead; - this.fdPosition = this.fdPosition + bytesRead; - buffers.push(readBuffer); - } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); - - var bufferData = Buffer.concat(buffers); - - if (bytesRead < this.options.readChunk) { - this.eofReached = true; - bufferData = bufferData.slice(0, totalBytesRead); - } - - if (totalBytesRead) { - this.linesCache = this._extractLines(bufferData); - - if (lineLeftovers) { - this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); - } - } - - return totalBytesRead; - } - }, { - key: "next", - value: function next() { - if (!this.fd) return false; - var line = false; - - if (this.eofReached && this.linesCache.length === 0) { - return line; - } - - var bytesRead; - - if (!this.linesCache.length) { - bytesRead = this._readChunk(); - } - - if (this.linesCache.length) { - line = this.linesCache.shift(); - var lastLineCharacter = line[line.length - 1]; - - if (lastLineCharacter !== 0x0a) { - bytesRead = this._readChunk(line); - - if (bytesRead) { - line = this.linesCache.shift(); - } - } - } - - if (this.eofReached && this.linesCache.length === 0) { - this.close(); - } - - if (line && line[line.length - 1] === this.newLineCharacter) { - line = line.slice(0, line.length - 1); - } - - return line; - } - }]); - - return LineByLine; - }(); - - var readlines = LineByLine; - - var ConfigError = - /*#__PURE__*/ - function (_Error) { - _inherits(ConfigError, _Error); - - function ConfigError() { - _classCallCheck(this, ConfigError); - - return _possibleConstructorReturn(this, _getPrototypeOf(ConfigError).apply(this, arguments)); - } - - return ConfigError; - }(_wrapNativeSuper(Error)); - - var DebugError = - /*#__PURE__*/ - function (_Error2) { - _inherits(DebugError, _Error2); - - function DebugError() { - _classCallCheck(this, DebugError); - - return _possibleConstructorReturn(this, _getPrototypeOf(DebugError).apply(this, arguments)); - } - - return DebugError; - }(_wrapNativeSuper(Error)); - - var UndefinedParserError = - /*#__PURE__*/ - function (_Error3) { - _inherits(UndefinedParserError, _Error3); - - function UndefinedParserError() { - _classCallCheck(this, UndefinedParserError); - - return _possibleConstructorReturn(this, _getPrototypeOf(UndefinedParserError).apply(this, arguments)); - } - - return UndefinedParserError; - }(_wrapNativeSuper(Error)); - - var errors = { - ConfigError: ConfigError, - DebugError: DebugError, - UndefinedParserError: UndefinedParserError - }; - - // based off https://github.com/defunctzombie/node-process/blob/master/browser.js - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - - function defaultClearTimeout() { - throw new Error('clearTimeout has not been defined'); - } - - var cachedSetTimeout = defaultSetTimout; - var cachedClearTimeout = defaultClearTimeout; - - if (typeof global$1.setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } - - if (typeof global$1.clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } - - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } // if setTimeout wasn't available but was latter defined - - - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - } - - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } // if clearTimeout wasn't available but was latter defined - - - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e) { - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e) { - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - } - - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - - draining = false; - - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - - while (len) { - currentQueue = queue; - queue = []; - - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - - queueIndex = -1; - len = queue.length; - } - - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - function nextTick(fun) { - var args = new Array(arguments.length - 1); - - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - - queue.push(new Item(fun, args)); - - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - } // v8 likes predictible objects - - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - - var title = 'browser'; - var platform = 'browser'; - var browser = true; - var env = {}; - var argv = []; - var version$1 = ''; // empty string to avoid regexp issues - - var versions = {}; - var release = {}; - var config = {}; - - function noop() {} - - var on = noop; - var addListener = noop; - var once = noop; - var off = noop; - var removeListener = noop; - var removeAllListeners = noop; - var emit = noop; - function binding(name) { - throw new Error('process.binding is not supported'); - } - function cwd() { - return '/'; - } - function chdir(dir) { - throw new Error('process.chdir is not supported'); - } - function umask() { - return 0; - } // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js - - var performance = global$1.performance || {}; - - var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function () { - return new Date().getTime(); - }; // generate timestamp or delta - // see http://nodejs.org/api/process.html#process_process_hrtime - - - function hrtime(previousTimestamp) { - var clocktime = performanceNow.call(performance) * 1e-3; - var seconds = Math.floor(clocktime); - var nanoseconds = Math.floor(clocktime % 1 * 1e9); - - if (previousTimestamp) { - seconds = seconds - previousTimestamp[0]; - nanoseconds = nanoseconds - previousTimestamp[1]; - - if (nanoseconds < 0) { - seconds--; - nanoseconds += 1e9; - } - } - - return [seconds, nanoseconds]; - } - var startTime = new Date(); - function uptime() { - var currentTime = new Date(); - var dif = currentTime - startTime; - return dif / 1000; - } - var process = { - nextTick: nextTick, - title: title, - browser: browser, - env: env, - argv: argv, - version: version$1, - versions: versions, - on: on, - addListener: addListener, - once: once, - off: off, - removeListener: removeListener, - removeAllListeners: removeAllListeners, - emit: emit, - binding: binding, - cwd: cwd, - chdir: chdir, - umask: umask, - hrtime: hrtime, - platform: platform, - release: release, - config: config, - uptime: uptime - }; - - var semver = createCommonjsModule(function (module, exports) { - exports = module.exports = SemVer; - var debug; - /* istanbul ignore next */ - - if (_typeof(process) === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function debug() { - var args = Array.prototype.slice.call(arguments, 0); - args.unshift('SEMVER'); - console.log.apply(console, args); - }; - } else { - debug = function debug() {}; - } // 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 || - /* istanbul ignore next */ - 9007199254740991; // Max safe segment length for coercion. - - var MAX_SAFE_COMPONENT_LENGTH = 16; // The actual regexps go on exports.re - - var re = exports.re = []; - var src = exports.src = []; - var t = exports.tokens = {}; - var R = 0; - - function tok(n) { - t[n] = R++; - } // 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. - - - tok('NUMERICIDENTIFIER'); - src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*'; - tok('NUMERICIDENTIFIERLOOSE'); - src[t.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. - - tok('NONNUMERICIDENTIFIER'); - src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; // ## Main Version - // Three dot-separated numeric identifiers. - - tok('MAINVERSION'); - src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')'; - tok('MAINVERSIONLOOSE'); - src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'; // ## Pre-release Version Identifier - // A numeric identifier, or a non-numeric identifier. - - tok('PRERELEASEIDENTIFIER'); - src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')'; - tok('PRERELEASEIDENTIFIERLOOSE'); - src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')'; // ## Pre-release Version - // Hyphen, followed by one or more dot-separated pre-release version - // identifiers. - - tok('PRERELEASE'); - src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'; - tok('PRERELEASELOOSE'); - src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'; // ## Build Metadata Identifier - // Any combination of digits, letters, or hyphens. - - tok('BUILDIDENTIFIER'); - src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; // ## Build Metadata - // Plus sign, followed by one or more period-separated build metadata - // identifiers. - - tok('BUILD'); - src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.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. - - tok('FULL'); - tok('FULLPLAIN'); - src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?'; - src[t.FULL] = '^' + src[t.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. - - tok('LOOSEPLAIN'); - src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?'; - tok('LOOSE'); - src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'; - tok('GTLT'); - src[t.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. - - tok('XRANGEIDENTIFIERLOOSE'); - src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; - tok('XRANGEIDENTIFIER'); - src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*'; - tok('XRANGEPLAIN'); - src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?'; - tok('XRANGEPLAINLOOSE'); - src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?'; - tok('XRANGE'); - src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$'; - tok('XRANGELOOSE'); - src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$'; // Coercion. - // Extract anything that could conceivably be a part of a valid semver - - tok('COERCE'); - src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])'; - tok('COERCERTL'); - re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g'); // Tilde ranges. - // Meaning is "reasonably at or greater than" - - tok('LONETILDE'); - src[t.LONETILDE] = '(?:~>?)'; - tok('TILDETRIM'); - src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+'; - re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g'); - var tildeTrimReplace = '$1~'; - tok('TILDE'); - src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'; - tok('TILDELOOSE'); - src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'; // Caret ranges. - // Meaning is "at least and backwards compatible with" - - tok('LONECARET'); - src[t.LONECARET] = '(?:\\^)'; - tok('CARETTRIM'); - src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+'; - re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g'); - var caretTrimReplace = '$1^'; - tok('CARET'); - src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'; - tok('CARETLOOSE'); - src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'; // A simple gt/lt/eq thing, or just "" to indicate "any version" - - tok('COMPARATORLOOSE'); - src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'; - tok('COMPARATOR'); - src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$'; // An expression to strip any whitespace between the gtlt and the thing - // it modifies, so that `> 1.2.3` ==> `>1.2.3` - - tok('COMPARATORTRIM'); - src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'; // this one has to use the /g flag - - re[t.COMPARATORTRIM] = new RegExp(src[t.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. - - tok('HYPHENRANGE'); - src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$'; - tok('HYPHENRANGELOOSE'); - src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$'; // Star ranges basically just allow anything at all. - - tok('STAR'); - src[t.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, options) { - if (!options || _typeof(options) !== 'object') { - options = { - loose: !!options, - includePrerelease: false - }; - } - - if (version instanceof SemVer) { - return version; - } - - if (typeof version !== 'string') { - return null; - } - - if (version.length > MAX_LENGTH) { - return null; - } - - var r = options.loose ? re[t.LOOSE] : re[t.FULL]; - - if (!r.test(version)) { - return null; - } - - try { - return new SemVer(version, options); - } catch (er) { - return null; - } - } - - exports.valid = valid; - - function valid(version, options) { - var v = parse(version, options); - return v ? v.version : null; - } - - exports.clean = clean; - - function clean(version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options); - return s ? s.version : null; - } - - exports.SemVer = SemVer; - - function SemVer(version, options) { - if (!options || _typeof(options) !== 'object') { - options = { - loose: !!options, - includePrerelease: false - }; - } - - if (version instanceof SemVer) { - if (version.loose === options.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, options); - } - - debug('SemVer', version, options); - this.options = options; - this.loose = !!options.loose; - var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.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.options, other); - - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - - return this.compareMain(other) || this.comparePre(other); - }; - - SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - - 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.options); - } // 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); - }; - - SemVer.prototype.compareBuild = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options); - } - - var i = 0; - - do { - var a = this.build[i]; - var b = other.build[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); - var prefix = ''; - - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre'; - var defaultResult = 'prerelease'; - } - - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key; - } - } - } - - return defaultResult; // may be undefined - } - } - - 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 a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - } - - 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.compareBuild = compareBuild; - - function compareBuild(a, b, loose) { - var versionA = new SemVer(a, loose); - var versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - } - - 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.compareBuild(a, b, loose); - }); - } - - exports.rsort = rsort; - - function rsort(list, loose) { - return list.sort(function (a, b) { - return exports.compareBuild(b, a, 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) { - switch (op) { - case '===': - if (_typeof(a) === 'object') a = a.version; - if (_typeof(b) === 'object') b = b.version; - return a === b; - - case '!==': - if (_typeof(a) === 'object') a = a.version; - if (_typeof(b) === 'object') b = b.version; - return a !== b; - - case '': - case '=': - case '==': - return eq(a, b, loose); - - case '!=': - return neq(a, b, loose); - - case '>': - return gt(a, b, loose); - - case '>=': - return gte(a, b, loose); - - case '<': - return lt(a, b, loose); - - case '<=': - return lte(a, b, loose); - - default: - throw new TypeError('Invalid operator: ' + op); - } - } - - exports.Comparator = Comparator; - - function Comparator(comp, options) { - if (!options || _typeof(options) !== 'object') { - options = { - loose: !!options, - includePrerelease: false - }; - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options); - } - - debug('comparator', comp, options); - this.options = options; - this.loose = !!options.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.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - var m = comp.match(r); - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp); - } - - this.operator = m[1] !== undefined ? 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.options.loose); - } - }; - - Comparator.prototype.toString = function () { - return this.value; - }; - - Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose); - - if (this.semver === ANY || version === ANY) { - return true; - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - } - - return cmp(version, this.operator, this.semver, this.options); - }; - - Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required'); - } - - if (!options || _typeof(options) !== 'object') { - options = { - loose: !!options, - includePrerelease: false - }; - } - - var rangeTmp; - - if (this.operator === '') { - if (this.value === '') { - return true; - } - - rangeTmp = new Range(comp.value, options); - return satisfies(this.value, rangeTmp, options); - } else if (comp.operator === '') { - if (comp.value === '') { - return true; - } - - rangeTmp = new Range(this.value, options); - return satisfies(comp.semver, rangeTmp, options); - } - - 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, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<'); - var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>'); - return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; - }; - - exports.Range = Range; - - function Range(range, options) { - if (!options || _typeof(options) !== 'object') { - options = { - loose: !!options, - includePrerelease: false - }; - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; - } else { - return new Range(range.raw, options); - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options); - } - - if (!(this instanceof Range)) { - return new Range(range, options); - } - - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; // 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.options.loose; - range = range.trim(); // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - - var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.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[t.COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[t.COMPARATORTRIM]); // `~ 1.2.3` => `~1.2.3` - - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); // `^ 1.2.3` => `^1.2.3` - - range = range.replace(re[t.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[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options); - }, this).join(' ').split(/\s+/); - - if (this.options.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, this.options); - }, this); - return set; - }; - - Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required'); - } - - return this.set.some(function (thisComparators) { - return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) { - return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - }; // take a set of comparators and determine whether there - // exists a version which can satisfy it - - - function isSatisfiable(comparators, options) { - var result = true; - var remainingComparators = comparators.slice(); - var testComparator = remainingComparators.pop(); - - while (result && remainingComparators.length) { - result = remainingComparators.every(function (otherComparator) { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - - return result; - } // Mostly just for testing and legacy API reasons - - - exports.toComparators = toComparators; - - function toComparators(range, options) { - return new Range(range, options).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, options) { - debug('comp', comp, options); - comp = replaceCarets(comp, options); - debug('caret', comp); - comp = replaceTildes(comp, options); - debug('tildes', comp); - comp = replaceXRanges(comp, options); - debug('xrange', comp); - comp = replaceStars(comp, options); - 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, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options); - }).join(' '); - } - - function replaceTilde(comp, options) { - var r = options.loose ? re[t.TILDELOOSE] : re[t.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); - 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, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options); - }).join(' '); - } - - function replaceCaret(comp, options) { - debug('caret', comp, options); - var r = options.loose ? re[t.CARETLOOSE] : re[t.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 (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, options) { - debug('replaceXRanges', comp, options); - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options); - }).join(' '); - } - - function replaceXRange(comp, options) { - comp = comp.trim(); - var r = options.loose ? re[t.XRANGELOOSE] : re[t.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 we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - - - pr = options.includePrerelease ? '-0' : ''; - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0'; - } else { - // nothing is forbidden - ret = '*'; - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0; - } - - 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 { - 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 + pr; - } else if (xm) { - ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr; - } - - 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, options) { - debug('replaceStars', comp, options); // Looseness is ignored here. star is always as loose as it gets! - - return comp.trim().replace(re[t.STAR], ''); - } // This function is passed to string.replace(re[t.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') { - try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true; - } - } - - return false; - }; - - function testSet(set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false; - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // 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 (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, options) { - try { - range = new Range(range, options); - } catch (er) { - return false; - } - - return range.test(version); - } - - exports.maxSatisfying = maxSatisfying; - - function maxSatisfying(versions, range, options) { - var max = null; - var maxSV = null; - - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v; - maxSV = new SemVer(max, options); - } - } - }); - return max; - } - - exports.minSatisfying = minSatisfying; - - function minSatisfying(versions, range, options) { - var min = null; - var minSV = null; - - try { - var rangeObj = new Range(range, options); - } catch (er) { - return null; - } - - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v; - minSV = new SemVer(min, options); - } - } - }); - return min; - } - - exports.minVersion = minVersion; - - function minVersion(range, loose) { - range = new Range(range, loose); - var minver = new SemVer('0.0.0'); - - if (range.test(minver)) { - return minver; - } - - minver = new SemVer('0.0.0-0'); - - if (range.test(minver)) { - return minver; - } - - minver = null; - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version); - - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++; - } else { - compver.prerelease.push(0); - } - - compver.raw = compver.format(); - - /* fallthrough */ - - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver; - } - - break; - - case '<': - case '<=': - /* Ignore maximum versions */ - break; - - /* istanbul ignore next */ - - default: - throw new Error('Unexpected operation: ' + comparator.operator); - } - }); - } - - if (minver && range.test(minver)) { - return minver; - } - - return null; - } - - exports.validRange = validRange; - - function validRange(range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).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, options) { - return outside(version, range, '<', options); - } // Determine if version is greater than all the versions possible in the range. - - - exports.gtr = gtr; - - function gtr(version, range, options) { - return outside(version, range, '>', options); - } - - exports.outside = outside; - - function outside(version, range, hilo, options) { - version = new SemVer(version, options); - range = new Range(range, options); - 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, options)) { - 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, options)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, options)) { - 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, options) { - var parsed = parse(version, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - } - - exports.intersects = intersects; - - function intersects(r1, r2, options) { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2); - } - - exports.coerce = coerce; - - function coerce(version, options) { - if (version instanceof SemVer) { - return version; - } - - if (typeof version === 'number') { - version = String(version); - } - - if (typeof version !== 'string') { - return null; - } - - options = options || {}; - var match = null; - - if (!options.rtl) { - match = version.match(re[t.COERCE]); - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - var next; - - while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; - } - - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; - } // leave it in a clean state - - - re[t.COERCERTL].lastIndex = -1; - } - - if (match === null) { - return null; - } - - return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options); - } - }); - var semver_1 = semver.SEMVER_SPEC_VERSION; - var semver_2 = semver.re; - var semver_3 = semver.src; - var semver_4 = semver.tokens; - var semver_5 = semver.parse; - var semver_6 = semver.valid; - var semver_7 = semver.clean; - var semver_8 = semver.SemVer; - var semver_9 = semver.inc; - var semver_10 = semver.diff; - var semver_11 = semver.compareIdentifiers; - var semver_12 = semver.rcompareIdentifiers; - var semver_13 = semver.major; - var semver_14 = semver.minor; - var semver_15 = semver.patch; - var semver_16 = semver.compare; - var semver_17 = semver.compareLoose; - var semver_18 = semver.compareBuild; - var semver_19 = semver.rcompare; - var semver_20 = semver.sort; - var semver_21 = semver.rsort; - var semver_22 = semver.gt; - var semver_23 = semver.lt; - var semver_24 = semver.eq; - var semver_25 = semver.neq; - var semver_26 = semver.gte; - var semver_27 = semver.lte; - var semver_28 = semver.cmp; - var semver_29 = semver.Comparator; - var semver_30 = semver.Range; - var semver_31 = semver.toComparators; - var semver_32 = semver.satisfies; - var semver_33 = semver.maxSatisfying; - var semver_34 = semver.minSatisfying; - var semver_35 = semver.minVersion; - var semver_36 = semver.validRange; - var semver_37 = semver.ltr; - var semver_38 = semver.gtr; - var semver_39 = semver.outside; - var semver_40 = semver.prerelease; - var semver_41 = semver.intersects; - var semver_42 = semver.coerce; - - var arrayify = function arrayify(object, keyName) { - return Object.keys(object).reduce(function (array, key) { - return array.concat(Object.assign(_defineProperty({}, keyName, key), object[key])); - }, []); - }; - - var dedent_1 = createCommonjsModule(function (module) { - - function dedent(strings) { - var raw = void 0; - - if (typeof strings === "string") { - // dedent can be used as a plain function - raw = [strings]; - } else { - raw = strings.raw; - } // first, perform interpolation - - - var result = ""; - - for (var i = 0; i < raw.length; i++) { - result += raw[i]. // join lines when there is a suppressed newline - replace(/\\\n[ \t]*/g, ""). // handle escaped backticks - replace(/\\`/g, "`"); - - if (i < (arguments.length <= 1 ? 0 : arguments.length - 1)) { - result += arguments.length <= i + 1 ? undefined : arguments[i + 1]; - } - } // now strip indentation - - - var lines = result.split("\n"); - var mindent = null; - lines.forEach(function (l) { - var m = l.match(/^(\s+)\S+/); - - if (m) { - var indent = m[1].length; - - if (!mindent) { - // this is the first indented line - mindent = indent; - } else { - mindent = Math.min(mindent, indent); - } - } - }); - - if (mindent !== null) { - result = lines.map(function (l) { - return l[0] === " " ? l.slice(mindent) : l; - }).join("\n"); - } // dedent eats leading and trailing whitespace too - - - result = result.trim(); // handle escaped newlines at the end to ensure they don't get stripped too - - return result.replace(/\\n/g, "\n"); - } - - { - module.exports = dedent; - } - }); - - function _templateObject6() { - var data = _taggedTemplateLiteral(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]); - - _templateObject6 = function _templateObject6() { - return data; - }; - - return data; - } - - function _templateObject5() { - var data = _taggedTemplateLiteral(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]); - - _templateObject5 = function _templateObject5() { - return data; - }; - - return data; - } - - function _templateObject4() { - var data = _taggedTemplateLiteral(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]); - - _templateObject4 = function _templateObject4() { - return data; - }; - - return data; - } - - function _templateObject3() { - var data = _taggedTemplateLiteral(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]); - - _templateObject3 = function _templateObject3() { - return data; - }; - - return data; - } - - function _templateObject2() { - var data = _taggedTemplateLiteral(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]); - - _templateObject2 = function _templateObject2() { - return data; - }; - - return data; - } - - function _templateObject() { - var data = _taggedTemplateLiteral(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]); - - _templateObject = function _templateObject() { - return data; - }; - - return data; - } - - var CATEGORY_CONFIG = "Config"; - var CATEGORY_EDITOR = "Editor"; - var CATEGORY_FORMAT = "Format"; - var CATEGORY_OTHER = "Other"; - var CATEGORY_OUTPUT = "Output"; - var CATEGORY_GLOBAL = "Global"; - var CATEGORY_SPECIAL = "Special"; - /** - * @typedef {Object} OptionInfo - * @property {string} [since] - available since version - * @property {string} category - * @property {'int' | 'boolean' | 'choice' | 'path'} type - * @property {boolean} [array] - indicate it's an array of the specified type - * @property {OptionValueInfo} [default] - * @property {OptionRangeInfo} [range] - for type int - * @property {string} description - * @property {string} [deprecated] - deprecated since version - * @property {OptionRedirectInfo} [redirect] - redirect deprecated option - * @property {(value: any) => boolean} [exception] - * @property {OptionChoiceInfo[]} [choices] - for type choice - * @property {string} [cliName] - * @property {string} [cliCategory] - * @property {string} [cliDescription] - * - * @typedef {number | boolean | string} OptionValue - * @typedef {OptionValue | [{ value: OptionValue[] }] | Array<{ since: string, value: OptionValue}>} OptionValueInfo - * - * @typedef {Object} OptionRedirectInfo - * @property {string} option - * @property {OptionValue} value - * - * @typedef {Object} OptionRangeInfo - * @property {number} start - recommended range start - * @property {number} end - recommended range end - * @property {number} step - recommended range step - * - * @typedef {Object} OptionChoiceInfo - * @property {boolean | string} value - boolean for the option that is originally boolean type - * @property {string} description - * @property {string} [since] - undefined if available since the first version of the option - * @property {string} [deprecated] - deprecated since version - * @property {OptionValueInfo} [redirect] - redirect deprecated value - */ - - /** @type {{ [name: string]: OptionInfo }} */ - - var options = { - cursorOffset: { - since: "1.4.0", - category: CATEGORY_SPECIAL, - type: "int", - default: -1, - range: { - start: -1, - end: Infinity, - step: 1 - }, - description: dedent_1(_templateObject()), - cliCategory: CATEGORY_EDITOR - }, - endOfLine: { - since: "1.15.0", - category: CATEGORY_GLOBAL, - type: "choice", - default: "auto", - description: "Which end of line characters to apply.", - choices: [{ - value: "auto", - description: dedent_1(_templateObject2()) - }, { - value: "lf", - description: "Line Feed only (\\n), common on Linux and macOS as well as inside git repos" - }, { - value: "crlf", - description: "Carriage Return + Line Feed characters (\\r\\n), common on Windows" - }, { - value: "cr", - description: "Carriage Return character only (\\r), used very rarely" - }] - }, - filepath: { - since: "1.4.0", - category: CATEGORY_SPECIAL, - type: "path", - description: "Specify the input filepath. This will be used to do parser inference.", - cliName: "stdin-filepath", - cliCategory: CATEGORY_OTHER, - cliDescription: "Path to the file to pretend that stdin comes from." - }, - insertPragma: { - since: "1.8.0", - category: CATEGORY_SPECIAL, - type: "boolean", - default: false, - description: "Insert @format pragma into file's first docblock comment.", - cliCategory: CATEGORY_OTHER - }, - parser: { - since: "0.0.10", - category: CATEGORY_GLOBAL, - type: "choice", - default: [{ - since: "0.0.10", - value: "babylon" - }, { - since: "1.13.0", - value: undefined - }], - description: "Which parser to use.", - exception: function exception(value) { - return typeof value === "string" || typeof value === "function"; - }, - choices: [{ - value: "flow", - description: "Flow" - }, { - value: "babylon", - description: "JavaScript", - deprecated: "1.16.0", - redirect: "babel" - }, { - value: "babel", - since: "1.16.0", - description: "JavaScript" - }, { - value: "babel-flow", - since: "1.16.0", - description: "Flow" - }, { - value: "typescript", - since: "1.4.0", - description: "TypeScript" - }, { - value: "css", - since: "1.7.1", - description: "CSS" - }, { - value: "postcss", - since: "1.4.0", - description: "CSS/Less/SCSS", - deprecated: "1.7.1", - redirect: "css" - }, { - value: "less", - since: "1.7.1", - description: "Less" - }, { - value: "scss", - since: "1.7.1", - description: "SCSS" - }, { - value: "json", - since: "1.5.0", - description: "JSON" - }, { - value: "json5", - since: "1.13.0", - description: "JSON5" - }, { - value: "json-stringify", - since: "1.13.0", - description: "JSON.stringify" - }, { - value: "graphql", - since: "1.5.0", - description: "GraphQL" - }, { - value: "markdown", - since: "1.8.0", - description: "Markdown" - }, { - value: "mdx", - since: "1.15.0", - description: "MDX" - }, { - value: "vue", - since: "1.10.0", - description: "Vue" - }, { - value: "yaml", - since: "1.14.0", - description: "YAML" - }, { - value: "glimmer", - since: null, - description: "Handlebars" - }, { - value: "html", - since: "1.15.0", - description: "HTML" - }, { - value: "angular", - since: "1.15.0", - description: "Angular" - }, { - value: "lwc", - since: "1.17.0", - description: "Lightning Web Components" - }] - }, - plugins: { - since: "1.10.0", - type: "path", - array: true, - default: [{ - value: [] - }], - category: CATEGORY_GLOBAL, - description: "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", - exception: function exception(value) { - return typeof value === "string" || _typeof(value) === "object"; - }, - cliName: "plugin", - cliCategory: CATEGORY_CONFIG - }, - pluginSearchDirs: { - since: "1.13.0", - type: "path", - array: true, - default: [{ - value: [] - }], - category: CATEGORY_GLOBAL, - description: dedent_1(_templateObject3()), - exception: function exception(value) { - return typeof value === "string" || _typeof(value) === "object"; - }, - cliName: "plugin-search-dir", - cliCategory: CATEGORY_CONFIG - }, - printWidth: { - since: "0.0.0", - category: CATEGORY_GLOBAL, - type: "int", - default: 80, - description: "The line length where Prettier will try wrap.", - range: { - start: 0, - end: Infinity, - step: 1 - } - }, - rangeEnd: { - since: "1.4.0", - category: CATEGORY_SPECIAL, - type: "int", - default: Infinity, - range: { - start: 0, - end: Infinity, - step: 1 - }, - description: dedent_1(_templateObject4()), - cliCategory: CATEGORY_EDITOR - }, - rangeStart: { - since: "1.4.0", - category: CATEGORY_SPECIAL, - type: "int", - default: 0, - range: { - start: 0, - end: Infinity, - step: 1 - }, - description: dedent_1(_templateObject5()), - cliCategory: CATEGORY_EDITOR - }, - requirePragma: { - since: "1.7.0", - category: CATEGORY_SPECIAL, - type: "boolean", - default: false, - description: dedent_1(_templateObject6()), - cliCategory: CATEGORY_OTHER - }, - tabWidth: { - type: "int", - category: CATEGORY_GLOBAL, - default: 2, - description: "Number of spaces per indentation level.", - range: { - start: 0, - end: Infinity, - step: 1 - } - }, - useFlowParser: { - since: "0.0.0", - category: CATEGORY_GLOBAL, - type: "boolean", - default: [{ - since: "0.0.0", - value: false - }, { - since: "1.15.0", - value: undefined - }], - deprecated: "0.0.10", - description: "Use flow parser.", - redirect: { - option: "parser", - value: "flow" - }, - cliName: "flow-parser" - }, - useTabs: { - since: "1.0.0", - category: CATEGORY_GLOBAL, - type: "boolean", - default: false, - description: "Indent with tabs instead of spaces." - } - }; - var coreOptions = { - CATEGORY_CONFIG: CATEGORY_CONFIG, - CATEGORY_EDITOR: CATEGORY_EDITOR, - CATEGORY_FORMAT: CATEGORY_FORMAT, - CATEGORY_OTHER: CATEGORY_OTHER, - CATEGORY_OUTPUT: CATEGORY_OUTPUT, - CATEGORY_GLOBAL: CATEGORY_GLOBAL, - CATEGORY_SPECIAL: CATEGORY_SPECIAL, - options: options - }; - - var require$$0 = getCjsExportFromNamespace(_package$1); - - var currentVersion = require$$0.version; - var coreOptions$1 = coreOptions.options; - - function getSupportInfo(version, opts) { - opts = Object.assign({ - plugins: [], - showUnreleased: false, - showDeprecated: false, - showInternal: false - }, opts); - - if (!version) { - // pre-release version is smaller than the normal version in semver, - // we need to treat it as the normal one so as to test new features. - version = currentVersion.split("-", 1)[0]; - } - - var plugins = opts.plugins; - var options = arrayify(Object.assign(plugins.reduce(function (currentOptions, plugin) { - return Object.assign(currentOptions, plugin.options); - }, {}), coreOptions$1), "name").sort(function (a, b) { - return a.name === b.name ? 0 : a.name < b.name ? -1 : 1; - }).filter(filterSince).filter(filterDeprecated).map(mapDeprecated).map(mapInternal).map(function (option) { - var newOption = Object.assign({}, option); - - if (Array.isArray(newOption.default)) { - newOption.default = newOption.default.length === 1 ? newOption.default[0].value : newOption.default.filter(filterSince).sort(function (info1, info2) { - return semver.compare(info2.since, info1.since); - })[0].value; - } - - if (Array.isArray(newOption.choices)) { - newOption.choices = newOption.choices.filter(filterSince).filter(filterDeprecated).map(mapDeprecated); - } - - return newOption; - }).map(function (option) { - var filteredPlugins = plugins.filter(function (plugin) { - return plugin.defaultOptions && plugin.defaultOptions[option.name] !== undefined; - }); - var pluginDefaults = filteredPlugins.reduce(function (reduced, plugin) { - reduced[plugin.name] = plugin.defaultOptions[option.name]; - return reduced; - }, {}); - return Object.assign(option, { - pluginDefaults: pluginDefaults - }); - }); - var usePostCssParser = semver.lt(version, "1.7.1"); - var useBabylonParser = semver.lt(version, "1.16.0"); - var languages = plugins.reduce(function (all, plugin) { - return all.concat(plugin.languages || []); - }, []).filter(filterSince).map(function (language) { - // Prevent breaking changes - if (language.name === "Markdown") { - return Object.assign({}, language, { - parsers: ["markdown"] - }); - } - - if (language.name === "TypeScript") { - return Object.assign({}, language, { - parsers: ["typescript"] - }); - } // "babylon" was renamed to "babel" in 1.16.0 - - - if (useBabylonParser && language.parsers.indexOf("babel") !== -1) { - return Object.assign({}, language, { - parsers: language.parsers.map(function (parser) { - return parser === "babel" ? "babylon" : parser; - }) - }); - } - - if (usePostCssParser && (language.name === "CSS" || language.group === "CSS")) { - return Object.assign({}, language, { - parsers: ["postcss"] - }); - } - - return language; - }); - return { - languages: languages, - options: options - }; - - function filterSince(object) { - return opts.showUnreleased || !("since" in object) || object.since && semver.gte(version, object.since); - } - - function filterDeprecated(object) { - return opts.showDeprecated || !("deprecated" in object) || object.deprecated && semver.lt(version, object.deprecated); - } - - function mapDeprecated(object) { - if (!object.deprecated || opts.showDeprecated) { - return object; - } - - var newObject = Object.assign({}, object); - delete newObject.deprecated; - delete newObject.redirect; - return newObject; - } - - function mapInternal(object) { - if (opts.showInternal) { - return object; - } - - var newObject = Object.assign({}, object); - delete newObject.cliName; - delete newObject.cliCategory; - delete newObject.cliDescription; - return newObject; - } - } - - var support = { - getSupportInfo: getSupportInfo - }; - - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. All rights reserved. - 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 - - THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED - WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, - MERCHANTABLITY OR NON-INFRINGEMENT. - - See the Apache Version 2.0 License for specific language governing permissions - and limitations under the License. - ***************************************************************************** */ - - /* global Reflect, Promise */ - var _extendStatics = function extendStatics(d, b) { - _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 _extendStatics(d, b); - }; - - function __extends(d, b) { - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - var _assign = function __assign() { - _assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return _assign.apply(this, arguments); - }; - function __rest(s, e) { - var t = {}; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - } - - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; - } - function __decorate(decorators, target, key, desc) { - var c = arguments.length, - r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, - d; - if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) { - if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - } - return c > 3 && r && Object.defineProperty(target, key, r), r; - } - function __param(paramIndex, decorator) { - return function (target, key) { - decorator(target, key, paramIndex); - }; - } - function __metadata(metadataKey, metadataValue) { - if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - } - function __awaiter(thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : new P(function (resolve) { - resolve(result.value); - }).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } - } - function __exportStar(m, exports) { - for (var p in m) { - if (!exports.hasOwnProperty(p)) exports[p] = m[p]; - } - } - function __values(o) { - var m = typeof Symbol === "function" && o[Symbol.iterator], - i = 0; - if (m) return m.call(o); - return { - next: function next() { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - } - function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) { - ar.push(r.value); - } - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - - return ar; - } - function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) { - ar = ar.concat(__read(arguments[i])); - } - - return ar; - } - function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) { - s += arguments[i].length; - } - - for (var r = Array(s), k = 0, i = 0; i < il; i++) { - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) { - r[k] = a[j]; - } - } - - return r; - } - function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - } - function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), - i, - q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i; - - function verb(n) { - if (g[n]) i[n] = function (v) { - return new Promise(function (a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - - function step(r) { - r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - - function fulfill(value) { - resume("next", value); - } - - function reject(value) { - resume("throw", value); - } - - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - } - function __asyncDelegator(o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { - throw e; - }), verb("return"), i[Symbol.iterator] = function () { - return this; - }, i; - - function verb(n, f) { - i[n] = o[n] ? function (v) { - return (p = !p) ? { - value: __await(o[n](v)), - done: n === "return" - } : f ? f(v) : v; - } : f; - } - } - function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], - i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { - return this; - }, i); - - function verb(n) { - i[n] = o[n] && function (v) { - return new Promise(function (resolve, reject) { - v = o[n](v), settle(resolve, reject, v.done, v.value); - }); - }; - } - - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function (v) { - resolve({ - value: v, - done: d - }); - }, reject); - } - } - function __makeTemplateObject(cooked, raw) { - if (Object.defineProperty) { - Object.defineProperty(cooked, "raw", { - value: raw - }); - } else { - cooked.raw = raw; - } - - return cooked; - } - function __importStar(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) { - if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - } - result.default = mod; - return result; - } - function __importDefault(mod) { - return mod && mod.__esModule ? mod : { - default: mod - }; - } - - var tslib_es6 = /*#__PURE__*/Object.freeze({ - __proto__: null, - __extends: __extends, - get __assign () { return _assign; }, - __rest: __rest, - __decorate: __decorate, - __param: __param, - __metadata: __metadata, - __awaiter: __awaiter, - __generator: __generator, - __exportStar: __exportStar, - __values: __values, - __read: __read, - __spread: __spread, - __spreadArrays: __spreadArrays, - __await: __await, - __asyncGenerator: __asyncGenerator, - __asyncDelegator: __asyncDelegator, - __asyncValues: __asyncValues, - __makeTemplateObject: __makeTemplateObject, - __importStar: __importStar, - __importDefault: __importDefault - }); - - var api = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.apiDescriptor = { - key: function key(_key) { - return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(_key) ? _key : JSON.stringify(_key); - }, - value: function value(_value) { - if (_value === null || _typeof(_value) !== 'object') { - return JSON.stringify(_value); - } - - if (Array.isArray(_value)) { - return "[".concat(_value.map(function (subValue) { - return exports.apiDescriptor.value(subValue); - }).join(', '), "]"); - } - - var keys = Object.keys(_value); - return keys.length === 0 ? '{}' : "{ ".concat(keys.map(function (key) { - return "".concat(exports.apiDescriptor.key(key), ": ").concat(exports.apiDescriptor.value(_value[key])); - }).join(', '), " }"); - }, - pair: function pair(_ref) { - var key = _ref.key, - value = _ref.value; - return exports.apiDescriptor.value(_defineProperty({}, key, value)); - } - }; - }); - unwrapExports(api); - var api_1 = api.apiDescriptor; - - var tslib_1 = getCjsExportFromNamespace(tslib_es6); - - var descriptors = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(api, exports); - }); - unwrapExports(descriptors); - - var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - - var escapeStringRegexp = function escapeStringRegexp(str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); - }; - - var colorName = { - "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] - }; - - var conversions = createCommonjsModule(function (module) { - /* MIT license */ - // 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 colorName) { - if (colorName.hasOwnProperty(key)) { - reverseKeywords[colorName[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 colorName) { - if (colorName.hasOwnProperty(keyword)) { - var value = colorName[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 colorName[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]; - }; - }); - var conversions_1 = conversions.rgb; - var conversions_2 = conversions.hsl; - var conversions_3 = conversions.hsv; - var conversions_4 = conversions.hwb; - var conversions_5 = conversions.cmyk; - var conversions_6 = conversions.xyz; - var conversions_7 = conversions.lab; - var conversions_8 = conversions.lch; - var conversions_9 = conversions.hex; - var conversions_10 = conversions.keyword; - var conversions_11 = conversions.ansi16; - var conversions_12 = conversions.ansi256; - var conversions_13 = conversions.hcg; - var conversions_14 = conversions.apple; - var conversions_15 = conversions.gray; - - /* - 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. - */ - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - - var models = Object.keys(conversions); - - function buildGraph() { - var graph = {}; - - 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; - } - - var route = function route(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; - }; - - var convert = {}; - var models$1 = Object.keys(conversions); - - function wrapRaw(fn) { - var wrappedFn = function wrappedFn(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 wrappedFn(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$1.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); - }); - }); - var colorConvert = convert; - - var ansiStyles = createCommonjsModule(function (module) { - - var wrapAnsi16 = function wrapAnsi16(fn, offset) { - return function () { - var code = fn.apply(colorConvert, arguments); - return "\x1B[".concat(code + offset, "m"); - }; - }; - - var wrapAnsi256 = function wrapAnsi256(fn, offset) { - return function () { - var code = fn.apply(colorConvert, arguments); - return "\x1B[".concat(38 + offset, ";5;").concat(code, "m"); - }; - }; - - var wrapAnsi16m = function wrapAnsi16m(fn, offset) { - return function () { - var rgb = fn.apply(colorConvert, arguments); - return "\x1B[".concat(38 + offset, ";2;").concat(rgb[0], ";").concat(rgb[1], ";").concat(rgb[2], "m"); - }; - }; - - function assembleStyles() { - var codes = new Map(); - var 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 (var _i = 0, _Object$keys = Object.keys(styles); _i < _Object$keys.length; _i++) { - var groupName = _Object$keys[_i]; - var group = styles[groupName]; - - for (var _i3 = 0, _Object$keys3 = Object.keys(group); _i3 < _Object$keys3.length; _i3++) { - var styleName = _Object$keys3[_i3]; - var style = group[styleName]; - styles[styleName] = { - open: "\x1B[".concat(style[0], "m"), - close: "\x1B[".concat(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 - }); - } - - var ansi2ansi = function ansi2ansi(n) { - return n; - }; - - var rgb2rgb = function rgb2rgb(r, g, b) { - return [r, g, b]; - }; - - styles.color.close = "\x1B[39m"; - styles.bgColor.close = "\x1B[49m"; - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (var _i2 = 0, _Object$keys2 = Object.keys(colorConvert); _i2 < _Object$keys2.length; _i2++) { - var key = _Object$keys2[_i2]; - - if (_typeof(colorConvert[key]) !== 'object') { - continue; - } - - var suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - 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 - }); - }); - - var require$$0$1 = { - EOL: "\n" - }; - - var hasFlag = function hasFlag(flag, argv) { - argv = argv || process.argv; - var prefix = flag.startsWith('-') ? '' : flag.length === 1 ? '-' : '--'; - var pos = argv.indexOf(prefix + flag); - var terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); - }; - - var env$1 = process.env; - var forceColor; - - if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { - forceColor = false; - } else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { - forceColor = true; - } - - if ('FORCE_COLOR' in env$1) { - forceColor = env$1.FORCE_COLOR.length === 0 || parseInt(env$1.FORCE_COLOR, 10) !== 0; - } - - function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level: level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - - function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - var min = forceColor ? 1 : 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. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - var osRelease = require$$0$1.release().split('.'); - - if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env$1) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function (sign) { - return sign in env$1; - }) || env$1.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env$1) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env$1.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env$1) { - var version = parseInt((env$1.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env$1.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env$1.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)) { - return 1; - } - - if ('COLORTERM' in env$1) { - return 1; - } - - if (env$1.TERM === 'dumb') { - return min; - } - - return min; - } - - function getSupportLevel(stream) { - var level = supportsColor(stream); - return translateLevel(level); - } - - var supportsColor_1 = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) - }; - - var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; - var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; - var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; - var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', "\x1B"], ['a', "\x07"]]); - - 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) { - var results = []; - var chunks = args.trim().split(/\s*,\s*/g); - var matches; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = chunks[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var chunk = _step.value; - - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if (matches = chunk.match(STRING_REGEX)) { - results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) { - return escape ? unescape(escape) : chr; - })); - } else { - throw new Error("Invalid Chalk template style argument: ".concat(chunk, " (in style '").concat(name, "')")); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return results; - } - - function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - var results = []; - var matches; - - while ((matches = STYLE_REGEX.exec(style)) !== null) { - var name = matches[1]; - - if (matches[2]) { - var args = parseArguments(name, matches[2]); - results.push([name].concat(args)); - } else { - results.push([name]); - } - } - - return results; - } - - function buildStyle(chalk, styles) { - var enabled = {}; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = styles[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var layer = _step2.value; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = layer.styles[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var style = _step3.value; - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - var current = chalk; - - for (var _i = 0, _Object$keys = Object.keys(enabled); _i < _Object$keys.length; _i++) { - var styleName = _Object$keys[_i]; - - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error("Unknown Chalk style: ".concat(styleName)); - } - - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } - } - } - - return current; - } - - var templates = function templates(chalk, tmp) { - var styles = []; - var chunks = []; - var chunk = []; // eslint-disable-next-line max-params - - tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - var str = chunk.join(''); - chunk = []; - chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str)); - styles.push({ - inverse: 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) { - var errMsg = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)"); - throw new Error(errMsg); - } - - return chunks.join(''); - }; - - var chalk = createCommonjsModule(function (module) { - - var stdoutColor = supportsColor_1.stdout; - var isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm'); // `supportsColor.level` → `ansiStyles.color[name]` mapping - - var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m']; // `color-convert` models to exclude from the Chalk API due to conflicts and such - - var skipModels = new Set(['gray']); - var styles = Object.create(null); - - function applyOptions(obj, options) { - options = options || {}; // Detect level if not set manually - - var scLevel = stdoutColor ? stdoutColor.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) { - var _chalk = {}; - applyOptions(_chalk, options); - - _chalk.template = function () { - var 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 = "\x1B[94m"; - } - - var _loop = function _loop() { - var key = _Object$keys[_i]; - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - styles[key] = { - get: function get() { - var codes = ansiStyles[key]; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); - } - }; - }; - - for (var _i = 0, _Object$keys = Object.keys(ansiStyles); _i < _Object$keys.length; _i++) { - _loop(); - } - - styles.visible = { - get: function get() { - return build.call(this, this._styles || [], true, 'visible'); - } - }; - ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g'); - - var _loop2 = function _loop2() { - var model = _Object$keys2[_i2]; - - if (skipModels.has(model)) { - return "continue"; - } - - styles[model] = { - get: function get() { - var level = this.level; - return function () { - var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); - var codes = { - open: open, - close: ansiStyles.color.close, - closeRe: ansiStyles.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; - }; - - for (var _i2 = 0, _Object$keys2 = Object.keys(ansiStyles.color.ansi); _i2 < _Object$keys2.length; _i2++) { - var _ret = _loop2(); - - if (_ret === "continue") continue; - } - - ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g'); - - var _loop3 = function _loop3() { - var model = _Object$keys3[_i3]; - - if (skipModels.has(model)) { - return "continue"; - } - - var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get: function get() { - var level = this.level; - return function () { - var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); - var codes = { - open: open, - close: ansiStyles.bgColor.close, - closeRe: ansiStyles.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); - }; - } - }; - }; - - for (var _i3 = 0, _Object$keys3 = Object.keys(ansiStyles.bgColor.ansi); _i3 < _Object$keys3.length; _i3++) { - var _ret2 = _loop3(); - - if (_ret2 === "continue") continue; - } - - var proto = Object.defineProperties(function () {}, styles); - - function build(_styles, _empty, key) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder._empty = _empty; - var self = this; - Object.defineProperty(builder, 'level', { - enumerable: true, - get: function get() { - return self.level; - }, - set: function set(level) { - self.level = level; - } - }); - Object.defineProperty(builder, 'enabled', { - enumerable: true, - get: function get() { - return self.enabled; - }, - set: function 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 - var args = arguments; - var argsLen = args.length; - var str = String(arguments[0]); - - if (argsLen === 0) { - return ''; - } - - if (argsLen > 1) { - // Don't slice `arguments`, it prevents V8 optimizations - for (var 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. - - - var originalDim = ansiStyles.dim.open; - - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles.dim.open = ''; - } - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = this._styles.slice().reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var code = _step.value; - // 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, "".concat(code.close, "$&").concat(code.open)); - } // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue - - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - 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(' '); - } - - var args = [].slice.call(arguments, 2); - var parts = [strings.raw[0]]; - - for (var i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&')); - parts.push(String(strings.raw[i])); - } - - return templates(chalk, parts.join('')); - } - - Object.defineProperties(Chalk.prototype, styles); - module.exports = Chalk(); // eslint-disable-line new-cap - - module.exports.supportsColor = stdoutColor; - module.exports.default = module.exports; // For TypeScript - }); - var chalk_1 = chalk.supportsColor; - - var common = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - exports.commonDeprecatedHandler = function (keyOrPair, redirectTo, _ref) { - var descriptor = _ref.descriptor; - var messages = ["".concat(chalk.default.yellow(typeof keyOrPair === 'string' ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair)), " is deprecated")]; - - if (redirectTo) { - messages.push("we now treat it as ".concat(chalk.default.blue(typeof redirectTo === 'string' ? descriptor.key(redirectTo) : descriptor.pair(redirectTo)))); - } - - return messages.join('; ') + '.'; - }; - }); - unwrapExports(common); - var common_1 = common.commonDeprecatedHandler; - - var deprecated = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(common, exports); - }); - unwrapExports(deprecated); - - var common$1 = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - exports.commonInvalidHandler = function (key, value, utils) { - return ["Invalid ".concat(chalk.default.red(utils.descriptor.key(key)), " value."), "Expected ".concat(chalk.default.blue(utils.schemas[key].expected(utils)), ","), "but received ".concat(chalk.default.red(utils.descriptor.value(value)), ".")].join(' '); - }; - }); - unwrapExports(common$1); - var common_1$1 = common$1.commonInvalidHandler; - - var invalid = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(common$1, exports); - }); - unwrapExports(invalid); - - /* eslint-disable no-nested-ternary */ - - var arr = []; - var charCodeCache = []; - - var leven = function leven(a, b) { - if (a === b) { - return 0; - } - - var swap = a; // Swapping the strings if `a` is longer than `b` so we know which one is the - // shortest & which one is the longest - - if (a.length > b.length) { - a = b; - b = swap; - } - - var aLen = a.length; - var bLen = b.length; - - if (aLen === 0) { - return bLen; - } - - if (bLen === 0) { - return aLen; - } // Performing suffix trimming: - // We can linearly drop suffix common to both strings since they - // don't increase distance at all - // Note: `~-` is the bitwise way to perform a `- 1` operation - - - while (aLen > 0 && a.charCodeAt(~-aLen) === b.charCodeAt(~-bLen)) { - aLen--; - bLen--; - } - - if (aLen === 0) { - return bLen; - } // Performing prefix trimming - // We can linearly drop prefix common to both strings since they - // don't increase distance at all - - - var start = 0; - - while (start < aLen && a.charCodeAt(start) === b.charCodeAt(start)) { - start++; - } - - aLen -= start; - bLen -= start; - - if (aLen === 0) { - return bLen; - } - - var bCharCode; - var ret; - var tmp; - var tmp2; - var i = 0; - var j = 0; - - while (i < aLen) { - charCodeCache[start + i] = a.charCodeAt(start + i); - arr[i] = ++i; - } - - while (j < bLen) { - bCharCode = b.charCodeAt(start + j); - tmp = j++; - ret = j; - - for (i = 0; i < aLen; i++) { - tmp2 = bCharCode === charCodeCache[start + i] ? tmp : tmp + 1; - tmp = arr[i]; - ret = arr[i] = tmp > ret ? tmp2 > ret ? ret + 1 : tmp2 : tmp2 > tmp ? tmp + 1 : tmp2; - } - } - - return ret; - }; - - var leven_1 = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - exports.levenUnknownHandler = function (key, value, _ref) { - var descriptor = _ref.descriptor, - logger = _ref.logger, - schemas = _ref.schemas; - var messages = ["Ignored unknown option ".concat(chalk.default.yellow(descriptor.pair({ - key: key, - value: value - })), ".")]; - var suggestion = Object.keys(schemas).sort().find(function (knownKey) { - return leven(key, knownKey) < 3; - }); - - if (suggestion) { - messages.push("Did you mean ".concat(chalk.default.blue(descriptor.key(suggestion)), "?")); - } - - logger.warn(messages.join(' ')); - }; - }); - unwrapExports(leven_1); - var leven_2 = leven_1.levenUnknownHandler; - - var unknown = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(leven_1, exports); - }); - unwrapExports(unknown); - - var handlers = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(deprecated, exports); - - tslib_1.__exportStar(invalid, exports); - - tslib_1.__exportStar(unknown, exports); - }); - unwrapExports(handlers); - - var schema = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var HANDLER_KEYS = ['default', 'expected', 'validate', 'deprecated', 'forward', 'redirect', 'overlap', 'preprocess', 'postprocess']; - - function createSchema(SchemaConstructor, parameters) { - var schema = new SchemaConstructor(parameters); - var subSchema = Object.create(schema); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = HANDLER_KEYS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var handlerKey = _step.value; - - if (handlerKey in parameters) { - subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return subSchema; - } - - exports.createSchema = createSchema; - - var Schema = - /*#__PURE__*/ - function () { - function Schema(parameters) { - _classCallCheck(this, Schema); - - this.name = parameters.name; - } - - _createClass(Schema, [{ - key: "default", - value: function _default(_utils) { - return undefined; - } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` - - }, { - key: "expected", - value: function expected(_utils) { - return 'nothing'; - } // istanbul ignore next: this is actually an abstract method but we need a placeholder to get `function.length` - - }, { - key: "validate", - value: function validate(_value, _utils) { - return false; - } - }, { - key: "deprecated", - value: function deprecated(_value, _utils) { - return false; - } - }, { - key: "forward", - value: function forward(_value, _utils) { - return undefined; - } - }, { - key: "redirect", - value: function redirect(_value, _utils) { - return undefined; - } - }, { - key: "overlap", - value: function overlap(currentValue, _newValue, _utils) { - return currentValue; - } - }, { - key: "preprocess", - value: function preprocess(value, _utils) { - return value; - } - }, { - key: "postprocess", - value: function postprocess(value, _utils) { - return value; - } - }], [{ - key: "create", - value: function create(parameters) { - // @ts-ignore: https://github.com/Microsoft/TypeScript/issues/5863 - return createSchema(this, parameters); - } - }]); - - return Schema; - }(); - - exports.Schema = Schema; - - function normalizeHandler(handler, superSchema, handlerArgumentsLength) { - return typeof handler === 'function' ? function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return handler.apply(void 0, _toConsumableArray(args.slice(0, handlerArgumentsLength - 1)).concat([superSchema], _toConsumableArray(args.slice(handlerArgumentsLength - 1)))); - } : function () { - return handler; - }; - } - }); - unwrapExports(schema); - var schema_1 = schema.createSchema; - var schema_2 = schema.Schema; - - var alias = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var AliasSchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(AliasSchema, _schema_1$Schema); - - function AliasSchema(parameters) { - var _this; - - _classCallCheck(this, AliasSchema); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(AliasSchema).call(this, parameters)); - _this._sourceName = parameters.sourceName; - return _this; - } - - _createClass(AliasSchema, [{ - key: "expected", - value: function expected(utils) { - return utils.schemas[this._sourceName].expected(utils); - } - }, { - key: "validate", - value: function validate(value, utils) { - return utils.schemas[this._sourceName].validate(value, utils); - } - }, { - key: "redirect", - value: function redirect(_value, _utils) { - return this._sourceName; - } - }]); - - return AliasSchema; - }(schema.Schema); - - exports.AliasSchema = AliasSchema; - }); - unwrapExports(alias); - var alias_1 = alias.AliasSchema; - - var any = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var AnySchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(AnySchema, _schema_1$Schema); - - function AnySchema() { - _classCallCheck(this, AnySchema); - - return _possibleConstructorReturn(this, _getPrototypeOf(AnySchema).apply(this, arguments)); - } - - _createClass(AnySchema, [{ - key: "expected", - value: function expected() { - return 'anything'; - } - }, { - key: "validate", - value: function validate() { - return true; - } - }]); - - return AnySchema; - }(schema.Schema); - - exports.AnySchema = AnySchema; - }); - unwrapExports(any); - var any_1 = any.AnySchema; - - var array = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var ArraySchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(ArraySchema, _schema_1$Schema); - - function ArraySchema(_a) { - var _this; - - _classCallCheck(this, ArraySchema); - - var valueSchema = _a.valueSchema, - _a$name = _a.name, - name = _a$name === void 0 ? valueSchema.name : _a$name, - handlers = tslib_1.__rest(_a, ["valueSchema", "name"]); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(ArraySchema).call(this, Object.assign({}, handlers, { - name: name - }))); - _this._valueSchema = valueSchema; - return _this; - } - - _createClass(ArraySchema, [{ - key: "expected", - value: function expected(utils) { - return "an array of ".concat(this._valueSchema.expected(utils)); - } - }, { - key: "validate", - value: function validate(value, utils) { - if (!Array.isArray(value)) { - return false; - } - - var invalidValues = []; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = value[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var subValue = _step.value; - var subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); - - if (subValidateResult !== true) { - invalidValues.push(subValidateResult.value); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return invalidValues.length === 0 ? true : { - value: invalidValues - }; - } - }, { - key: "deprecated", - value: function deprecated(value, utils) { - var deprecatedResult = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var subValue = _step2.value; - var subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); - - if (subDeprecatedResult !== false) { - deprecatedResult.push.apply(deprecatedResult, _toConsumableArray(subDeprecatedResult.map(function (_ref) { - var deprecatedValue = _ref.value; - return { - value: [deprecatedValue] - }; - }))); - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return deprecatedResult; - } - }, { - key: "forward", - value: function forward(value, utils) { - var forwardResult = []; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = value[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var subValue = _step3.value; - var subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); - forwardResult.push.apply(forwardResult, _toConsumableArray(subForwardResult.map(wrapTransferResult))); - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - return forwardResult; - } - }, { - key: "redirect", - value: function redirect(value, utils) { - var remain = []; - var redirect = []; - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for (var _iterator4 = value[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { - var subValue = _step4.value; - var subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); - - if ('remain' in subRedirectResult) { - remain.push(subRedirectResult.remain); - } - - redirect.push.apply(redirect, _toConsumableArray(subRedirectResult.redirect.map(wrapTransferResult))); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - - return remain.length === 0 ? { - redirect: redirect - } : { - redirect: redirect, - remain: remain - }; - } - }, { - key: "overlap", - value: function overlap(currentValue, newValue) { - return currentValue.concat(newValue); - } - }]); - - return ArraySchema; - }(schema.Schema); - - exports.ArraySchema = ArraySchema; - - function wrapTransferResult(_ref2) { - var from = _ref2.from, - to = _ref2.to; - return { - from: [from], - to: to - }; - } - }); - unwrapExports(array); - var array_1 = array.ArraySchema; - - var boolean_1 = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var BooleanSchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(BooleanSchema, _schema_1$Schema); - - function BooleanSchema() { - _classCallCheck(this, BooleanSchema); - - return _possibleConstructorReturn(this, _getPrototypeOf(BooleanSchema).apply(this, arguments)); - } - - _createClass(BooleanSchema, [{ - key: "expected", - value: function expected() { - return 'true or false'; - } - }, { - key: "validate", - value: function validate(value) { - return typeof value === 'boolean'; - } - }]); - - return BooleanSchema; - }(schema.Schema); - - exports.BooleanSchema = BooleanSchema; - }); - unwrapExports(boolean_1); - var boolean_2 = boolean_1.BooleanSchema; - - var utils = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function recordFromArray(array, mainKey) { - var record = Object.create(null); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var value = _step.value; - var key = value[mainKey]; // istanbul ignore next - - if (record[key]) { - throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key))); - } // @ts-ignore - - - record[key] = value; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return record; - } - - exports.recordFromArray = recordFromArray; - - function mapFromArray(array, mainKey) { - var map = new Map(); - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = array[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var value = _step2.value; - var key = value[mainKey]; // istanbul ignore next - - if (map.has(key)) { - throw new Error("Duplicate ".concat(mainKey, " ").concat(JSON.stringify(key))); - } - - map.set(key, value); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return map; - } - - exports.mapFromArray = mapFromArray; - - function createAutoChecklist() { - var map = Object.create(null); - return function (id) { - var idString = JSON.stringify(id); - - if (map[idString]) { - return true; - } - - map[idString] = true; - return false; - }; - } - - exports.createAutoChecklist = createAutoChecklist; - - function partition(array, predicate) { - var trueArray = []; - var falseArray = []; - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = array[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var value = _step3.value; - - if (predicate(value)) { - trueArray.push(value); - } else { - falseArray.push(value); - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - return [trueArray, falseArray]; - } - - exports.partition = partition; - - function isInt(value) { - return value === Math.floor(value); - } - - exports.isInt = isInt; - - function comparePrimitive(a, b) { - if (a === b) { - return 0; - } - - var typeofA = _typeof(a); - - var typeofB = _typeof(b); - - var orders = ['undefined', 'object', 'boolean', 'number', 'string']; - - if (typeofA !== typeofB) { - return orders.indexOf(typeofA) - orders.indexOf(typeofB); - } - - if (typeofA !== 'string') { - return Number(a) - Number(b); - } - - return a.localeCompare(b); - } - - exports.comparePrimitive = comparePrimitive; - - function normalizeDefaultResult(result) { - return result === undefined ? {} : result; - } - - exports.normalizeDefaultResult = normalizeDefaultResult; - - function normalizeValidateResult(result, value) { - return result === true ? true : result === false ? { - value: value - } : result; - } - - exports.normalizeValidateResult = normalizeValidateResult; - - function normalizeDeprecatedResult(result, value) { - var doNotNormalizeTrue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ - value: value - }] : 'value' in result ? [result] : result.length === 0 ? false : result; - } - - exports.normalizeDeprecatedResult = normalizeDeprecatedResult; - - function normalizeTransferResult(result, value) { - return typeof result === 'string' || 'key' in result ? { - from: value, - to: result - } : 'from' in result ? { - from: result.from, - to: result.to - } : { - from: value, - to: result.to - }; - } - - exports.normalizeTransferResult = normalizeTransferResult; - - function normalizeForwardResult(result, value) { - return result === undefined ? [] : Array.isArray(result) ? result.map(function (transferResult) { - return normalizeTransferResult(transferResult, value); - }) : [normalizeTransferResult(result, value)]; - } - - exports.normalizeForwardResult = normalizeForwardResult; - - function normalizeRedirectResult(result, value) { - var redirect = normalizeForwardResult(_typeof(result) === 'object' && 'redirect' in result ? result.redirect : result, value); - return redirect.length === 0 ? { - remain: value, - redirect: redirect - } : _typeof(result) === 'object' && 'remain' in result ? { - remain: result.remain, - redirect: redirect - } : { - redirect: redirect - }; - } - - exports.normalizeRedirectResult = normalizeRedirectResult; - }); - unwrapExports(utils); - var utils_1 = utils.recordFromArray; - var utils_2 = utils.mapFromArray; - var utils_3 = utils.createAutoChecklist; - var utils_4 = utils.partition; - var utils_5 = utils.isInt; - var utils_6 = utils.comparePrimitive; - var utils_7 = utils.normalizeDefaultResult; - var utils_8 = utils.normalizeValidateResult; - var utils_9 = utils.normalizeDeprecatedResult; - var utils_10 = utils.normalizeTransferResult; - var utils_11 = utils.normalizeForwardResult; - var utils_12 = utils.normalizeRedirectResult; - - var choice = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var ChoiceSchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(ChoiceSchema, _schema_1$Schema); - - function ChoiceSchema(parameters) { - var _this; - - _classCallCheck(this, ChoiceSchema); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(ChoiceSchema).call(this, parameters)); - _this._choices = utils.mapFromArray(parameters.choices.map(function (choice) { - return choice && _typeof(choice) === 'object' ? choice : { - value: choice - }; - }), 'value'); - return _this; - } - - _createClass(ChoiceSchema, [{ - key: "expected", - value: function expected(_ref) { - var _this2 = this; - - var descriptor = _ref.descriptor; - var choiceValues = Array.from(this._choices.keys()).map(function (value) { - return _this2._choices.get(value); - }).filter(function (choiceInfo) { - return !choiceInfo.deprecated; - }).map(function (choiceInfo) { - return choiceInfo.value; - }).sort(utils.comparePrimitive).map(descriptor.value); - var head = choiceValues.slice(0, -2); - var tail = choiceValues.slice(-2); - return head.concat(tail.join(' or ')).join(', '); - } - }, { - key: "validate", - value: function validate(value) { - return this._choices.has(value); - } - }, { - key: "deprecated", - value: function deprecated(value) { - var choiceInfo = this._choices.get(value); - - return choiceInfo && choiceInfo.deprecated ? { - value: value - } : false; - } - }, { - key: "forward", - value: function forward(value) { - var choiceInfo = this._choices.get(value); - - return choiceInfo ? choiceInfo.forward : undefined; - } - }, { - key: "redirect", - value: function redirect(value) { - var choiceInfo = this._choices.get(value); - - return choiceInfo ? choiceInfo.redirect : undefined; - } - }]); - - return ChoiceSchema; - }(schema.Schema); - - exports.ChoiceSchema = ChoiceSchema; - }); - unwrapExports(choice); - var choice_1 = choice.ChoiceSchema; - - var number = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var NumberSchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(NumberSchema, _schema_1$Schema); - - function NumberSchema() { - _classCallCheck(this, NumberSchema); - - return _possibleConstructorReturn(this, _getPrototypeOf(NumberSchema).apply(this, arguments)); - } - - _createClass(NumberSchema, [{ - key: "expected", - value: function expected() { - return 'a number'; - } - }, { - key: "validate", - value: function validate(value, _utils) { - return typeof value === 'number'; - } - }]); - - return NumberSchema; - }(schema.Schema); - - exports.NumberSchema = NumberSchema; - }); - unwrapExports(number); - var number_1 = number.NumberSchema; - - var integer = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var IntegerSchema = - /*#__PURE__*/ - function (_number_1$NumberSchem) { - _inherits(IntegerSchema, _number_1$NumberSchem); - - function IntegerSchema() { - _classCallCheck(this, IntegerSchema); - - return _possibleConstructorReturn(this, _getPrototypeOf(IntegerSchema).apply(this, arguments)); - } - - _createClass(IntegerSchema, [{ - key: "expected", - value: function expected() { - return 'an integer'; - } - }, { - key: "validate", - value: function validate(value, utils$1) { - return utils$1.normalizeValidateResult(_get(_getPrototypeOf(IntegerSchema.prototype), "validate", this).call(this, value, utils$1), value) === true && utils.isInt(value); - } - }]); - - return IntegerSchema; - }(number.NumberSchema); - - exports.IntegerSchema = IntegerSchema; - }); - unwrapExports(integer); - var integer_1 = integer.IntegerSchema; - - var string = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var StringSchema = - /*#__PURE__*/ - function (_schema_1$Schema) { - _inherits(StringSchema, _schema_1$Schema); - - function StringSchema() { - _classCallCheck(this, StringSchema); - - return _possibleConstructorReturn(this, _getPrototypeOf(StringSchema).apply(this, arguments)); - } - - _createClass(StringSchema, [{ - key: "expected", - value: function expected() { - return 'a string'; - } - }, { - key: "validate", - value: function validate(value) { - return typeof value === 'string'; - } - }]); - - return StringSchema; - }(schema.Schema); - - exports.StringSchema = StringSchema; - }); - unwrapExports(string); - var string_1 = string.StringSchema; - - var schemas = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(alias, exports); - - tslib_1.__exportStar(any, exports); - - tslib_1.__exportStar(array, exports); - - tslib_1.__exportStar(boolean_1, exports); - - tslib_1.__exportStar(choice, exports); - - tslib_1.__exportStar(integer, exports); - - tslib_1.__exportStar(number, exports); - - tslib_1.__exportStar(string, exports); - }); - unwrapExports(schemas); - - var defaults = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.defaultDescriptor = api.apiDescriptor; - exports.defaultUnknownHandler = leven_1.levenUnknownHandler; - exports.defaultInvalidHandler = invalid.commonInvalidHandler; - exports.defaultDeprecatedHandler = common.commonDeprecatedHandler; - }); - unwrapExports(defaults); - var defaults_1 = defaults.defaultDescriptor; - var defaults_2 = defaults.defaultUnknownHandler; - var defaults_3 = defaults.defaultInvalidHandler; - var defaults_4 = defaults.defaultDeprecatedHandler; - - var normalize = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - exports.normalize = function (options, schemas, opts) { - return new Normalizer(schemas, opts).normalize(options); - }; - - var Normalizer = - /*#__PURE__*/ - function () { - function Normalizer(schemas, opts) { - _classCallCheck(this, Normalizer); - - // istanbul ignore next - var _ref = opts || {}, - _ref$logger = _ref.logger, - logger = _ref$logger === void 0 ? console : _ref$logger, - _ref$descriptor = _ref.descriptor, - descriptor = _ref$descriptor === void 0 ? defaults.defaultDescriptor : _ref$descriptor, - _ref$unknown = _ref.unknown, - unknown = _ref$unknown === void 0 ? defaults.defaultUnknownHandler : _ref$unknown, - _ref$invalid = _ref.invalid, - invalid = _ref$invalid === void 0 ? defaults.defaultInvalidHandler : _ref$invalid, - _ref$deprecated = _ref.deprecated, - deprecated = _ref$deprecated === void 0 ? defaults.defaultDeprecatedHandler : _ref$deprecated; - - this._utils = { - descriptor: descriptor, - logger: - /* istanbul ignore next */ - logger || { - warn: function warn() {} - }, - schemas: utils.recordFromArray(schemas, 'name'), - normalizeDefaultResult: utils.normalizeDefaultResult, - normalizeDeprecatedResult: utils.normalizeDeprecatedResult, - normalizeForwardResult: utils.normalizeForwardResult, - normalizeRedirectResult: utils.normalizeRedirectResult, - normalizeValidateResult: utils.normalizeValidateResult - }; - this._unknownHandler = unknown; - this._invalidHandler = invalid; - this._deprecatedHandler = deprecated; - this.cleanHistory(); - } - - _createClass(Normalizer, [{ - key: "cleanHistory", - value: function cleanHistory() { - this._hasDeprecationWarned = utils.createAutoChecklist(); - } - }, { - key: "normalize", - value: function normalize(options) { - var _this = this; - - var normalized = {}; - var restOptionsArray = [options]; - - var applyNormalization = function applyNormalization() { - while (restOptionsArray.length !== 0) { - var currentOptions = restOptionsArray.shift(); - - var transferredOptionsArray = _this._applyNormalization(currentOptions, normalized); - - restOptionsArray.push.apply(restOptionsArray, _toConsumableArray(transferredOptionsArray)); - } - }; - - applyNormalization(); - - for (var _i = 0, _Object$keys = Object.keys(this._utils.schemas); _i < _Object$keys.length; _i++) { - var key = _Object$keys[_i]; - var schema = this._utils.schemas[key]; - - if (!(key in normalized)) { - var defaultResult = utils.normalizeDefaultResult(schema.default(this._utils)); - - if ('value' in defaultResult) { - restOptionsArray.push(_defineProperty({}, key, defaultResult.value)); - } - } - } - - applyNormalization(); - - for (var _i2 = 0, _Object$keys2 = Object.keys(this._utils.schemas); _i2 < _Object$keys2.length; _i2++) { - var _key = _Object$keys2[_i2]; - var _schema = this._utils.schemas[_key]; - - if (_key in normalized) { - normalized[_key] = _schema.postprocess(normalized[_key], this._utils); - } - } - - return normalized; - } - }, { - key: "_applyNormalization", - value: function _applyNormalization(options, normalized) { - var _this2 = this; - - var transferredOptionsArray = []; - - var _utils_1$partition = utils.partition(Object.keys(options), function (key) { - return key in _this2._utils.schemas; - }), - _utils_1$partition2 = _slicedToArray(_utils_1$partition, 2), - knownOptionNames = _utils_1$partition2[0], - unknownOptionNames = _utils_1$partition2[1]; - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - var _loop = function _loop() { - var key = _step.value; - var schema = _this2._utils.schemas[key]; - var value = schema.preprocess(options[key], _this2._utils); - var validateResult = utils.normalizeValidateResult(schema.validate(value, _this2._utils), value); - - if (validateResult !== true) { - var invalidValue = validateResult.value; - - var errorMessageOrError = _this2._invalidHandler(key, invalidValue, _this2._utils); - - throw typeof errorMessageOrError === 'string' ? new Error(errorMessageOrError) : - /* istanbul ignore next*/ - errorMessageOrError; - } - - var appendTransferredOptions = function appendTransferredOptions(_ref2) { - var from = _ref2.from, - to = _ref2.to; - transferredOptionsArray.push(typeof to === 'string' ? _defineProperty({}, to, from) : _defineProperty({}, to.key, to.value)); - }; - - var warnDeprecated = function warnDeprecated(_ref5) { - var currentValue = _ref5.value, - redirectTo = _ref5.redirectTo; - var deprecatedResult = utils.normalizeDeprecatedResult(schema.deprecated(currentValue, _this2._utils), value, - /* doNotNormalizeTrue */ - true); - - if (deprecatedResult === false) { - return; - } - - if (deprecatedResult === true) { - if (!_this2._hasDeprecationWarned(key)) { - _this2._utils.logger.warn(_this2._deprecatedHandler(key, redirectTo, _this2._utils)); - } - } else { - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = deprecatedResult[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var deprecatedValue = _step3.value.value; - var pair = { - key: key, - value: deprecatedValue - }; - - if (!_this2._hasDeprecationWarned(pair)) { - var redirectToPair = typeof redirectTo === 'string' ? { - key: redirectTo, - value: deprecatedValue - } : redirectTo; - - _this2._utils.logger.warn(_this2._deprecatedHandler(pair, redirectToPair, _this2._utils)); - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - } - }; - - var forwardResult = utils.normalizeForwardResult(schema.forward(value, _this2._utils), value); - forwardResult.forEach(appendTransferredOptions); - var redirectResult = utils.normalizeRedirectResult(schema.redirect(value, _this2._utils), value); - redirectResult.redirect.forEach(appendTransferredOptions); - - if ('remain' in redirectResult) { - var remainingValue = redirectResult.remain; - normalized[key] = key in normalized ? schema.overlap(normalized[key], remainingValue, _this2._utils) : remainingValue; - warnDeprecated({ - value: remainingValue - }); - } - - var _iteratorNormalCompletion4 = true; - var _didIteratorError4 = false; - var _iteratorError4 = undefined; - - try { - for (var _iterator4 = redirectResult.redirect[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { - var _step4$value = _step4.value, - from = _step4$value.from, - to = _step4$value.to; - warnDeprecated({ - value: from, - redirectTo: to - }); - } - } catch (err) { - _didIteratorError4 = true; - _iteratorError4 = err; - } finally { - try { - if (!_iteratorNormalCompletion4 && _iterator4.return != null) { - _iterator4.return(); - } - } finally { - if (_didIteratorError4) { - throw _iteratorError4; - } - } - } - }; - - for (var _iterator = knownOptionNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - _loop(); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = unknownOptionNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var key = _step2.value; - var value = options[key]; - - var unknownResult = this._unknownHandler(key, value, this._utils); - - if (unknownResult) { - for (var _i3 = 0, _Object$keys3 = Object.keys(unknownResult); _i3 < _Object$keys3.length; _i3++) { - var unknownKey = _Object$keys3[_i3]; - - var unknownOption = _defineProperty({}, unknownKey, unknownResult[unknownKey]); - - if (unknownKey in this._utils.schemas) { - transferredOptionsArray.push(unknownOption); - } else { - Object.assign(normalized, unknownOption); - } - } - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return transferredOptionsArray; - } - }]); - - return Normalizer; - }(); - - exports.Normalizer = Normalizer; - }); - unwrapExports(normalize); - var normalize_1 = normalize.normalize; - var normalize_2 = normalize.Normalizer; - - var lib = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - tslib_1.__exportStar(descriptors, exports); - - tslib_1.__exportStar(handlers, exports); - - tslib_1.__exportStar(schemas, exports); - - tslib_1.__exportStar(normalize, exports); - - tslib_1.__exportStar(schema, exports); - }); - unwrapExports(lib); - - var array$1 = []; - var charCodeCache$1 = []; - - var leven$1 = function leven(left, right) { - if (left === right) { - return 0; - } - - var swap = left; // Swapping the strings if `a` is longer than `b` so we know which one is the - // shortest & which one is the longest - - if (left.length > right.length) { - left = right; - right = swap; - } - - var leftLength = left.length; - var rightLength = right.length; // Performing suffix trimming: - // We can linearly drop suffix common to both strings since they - // don't increase distance at all - // Note: `~-` is the bitwise way to perform a `- 1` operation - - while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) { - leftLength--; - rightLength--; - } // Performing prefix trimming - // We can linearly drop prefix common to both strings since they - // don't increase distance at all - - - var start = 0; - - while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) { - start++; - } - - leftLength -= start; - rightLength -= start; - - if (leftLength === 0) { - return rightLength; - } - - var bCharCode; - var result; - var temp; - var temp2; - var i = 0; - var j = 0; - - while (i < leftLength) { - charCodeCache$1[i] = left.charCodeAt(start + i); - array$1[i] = ++i; - } - - while (j < rightLength) { - bCharCode = right.charCodeAt(start + j); - temp = j++; - result = j; - - for (i = 0; i < leftLength; i++) { - temp2 = bCharCode === charCodeCache$1[i] ? temp : temp + 1; - temp = array$1[i]; // eslint-disable-next-line no-multi-assign - - result = array$1[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2; - } - } - - return result; - }; - - var leven_1$1 = leven$1; // TODO: Remove this for the next major release - - var default_1 = leven$1; - leven_1$1.default = default_1; - - var cliDescriptor = { - key: function key(_key) { - return _key.length === 1 ? "-".concat(_key) : "--".concat(_key); - }, - value: function value(_value) { - return lib.apiDescriptor.value(_value); - }, - pair: function pair(_ref) { - var key = _ref.key, - value = _ref.value; - return value === false ? "--no-".concat(key) : value === true ? cliDescriptor.key(key) : value === "" ? "".concat(cliDescriptor.key(key), " without an argument") : "".concat(cliDescriptor.key(key), "=").concat(value); - } - }; - - var FlagSchema = - /*#__PURE__*/ - function (_vnopts$ChoiceSchema) { - _inherits(FlagSchema, _vnopts$ChoiceSchema); - - function FlagSchema(_ref2) { - var _this; - - var name = _ref2.name, - flags = _ref2.flags; - - _classCallCheck(this, FlagSchema); - - _this = _possibleConstructorReturn(this, _getPrototypeOf(FlagSchema).call(this, { - name: name, - choices: flags - })); - _this._flags = flags.slice().sort(); - return _this; - } - - _createClass(FlagSchema, [{ - key: "preprocess", - value: function preprocess(value, utils) { - if (typeof value === "string" && value.length !== 0 && this._flags.indexOf(value) === -1) { - var suggestion = this._flags.find(function (flag) { - return leven_1$1(flag, value) < 3; - }); - - if (suggestion) { - utils.logger.warn(["Unknown flag ".concat(chalk.yellow(utils.descriptor.value(value)), ","), "did you mean ".concat(chalk.blue(utils.descriptor.value(suggestion)), "?")].join(" ")); - return suggestion; - } - } - - return value; - } - }, { - key: "expected", - value: function expected() { - return "a flag"; - } - }]); - - return FlagSchema; - }(lib.ChoiceSchema); - - var hasDeprecationWarned; - - function normalizeOptions(options, optionInfos) { - var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, - logger = _ref3.logger, - _ref3$isCLI = _ref3.isCLI, - isCLI = _ref3$isCLI === void 0 ? false : _ref3$isCLI, - _ref3$passThrough = _ref3.passThrough, - passThrough = _ref3$passThrough === void 0 ? false : _ref3$passThrough; - - var unknown = !passThrough ? lib.levenUnknownHandler : Array.isArray(passThrough) ? function (key, value) { - return passThrough.indexOf(key) === -1 ? undefined : _defineProperty({}, key, value); - } : function (key, value) { - return _defineProperty({}, key, value); - }; - var descriptor = isCLI ? cliDescriptor : lib.apiDescriptor; - var schemas = optionInfosToSchemas(optionInfos, { - isCLI: isCLI - }); - var normalizer = new lib.Normalizer(schemas, { - logger: logger, - unknown: unknown, - descriptor: descriptor - }); - var shouldSuppressDuplicateDeprecationWarnings = logger !== false; - - if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) { - normalizer._hasDeprecationWarned = hasDeprecationWarned; - } - - var normalized = normalizer.normalize(options); - - if (shouldSuppressDuplicateDeprecationWarnings) { - hasDeprecationWarned = normalizer._hasDeprecationWarned; - } - - return normalized; - } - - function optionInfosToSchemas(optionInfos, _ref6) { - var isCLI = _ref6.isCLI; - var schemas = []; - - if (isCLI) { - schemas.push(lib.AnySchema.create({ - name: "_" - })); - } - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = optionInfos[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var optionInfo = _step.value; - schemas.push(optionInfoToSchema(optionInfo, { - isCLI: isCLI, - optionInfos: optionInfos - })); - - if (optionInfo.alias && isCLI) { - schemas.push(lib.AliasSchema.create({ - name: optionInfo.alias, - sourceName: optionInfo.name - })); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return schemas; - } - - function optionInfoToSchema(optionInfo, _ref7) { - var isCLI = _ref7.isCLI, - optionInfos = _ref7.optionInfos; - var SchemaConstructor; - var parameters = { - name: optionInfo.name - }; - var handlers = {}; - - switch (optionInfo.type) { - case "int": - SchemaConstructor = lib.IntegerSchema; - - if (isCLI) { - parameters.preprocess = function (value) { - return Number(value); - }; - } - - break; - - case "string": - SchemaConstructor = lib.StringSchema; - break; - - case "choice": - SchemaConstructor = lib.ChoiceSchema; - parameters.choices = optionInfo.choices.map(function (choiceInfo) { - return _typeof(choiceInfo) === "object" && choiceInfo.redirect ? Object.assign({}, choiceInfo, { - redirect: { - to: { - key: optionInfo.name, - value: choiceInfo.redirect - } - } - }) : choiceInfo; - }); - break; - - case "boolean": - SchemaConstructor = lib.BooleanSchema; - break; - - case "flag": - SchemaConstructor = FlagSchema; - parameters.flags = optionInfos.map(function (optionInfo) { - return [].concat(optionInfo.alias || [], optionInfo.description ? optionInfo.name : [], optionInfo.oppositeDescription ? "no-".concat(optionInfo.name) : []); - }).reduce(function (a, b) { - return a.concat(b); - }, []); - break; - - case "path": - SchemaConstructor = lib.StringSchema; - break; - - default: - throw new Error("Unexpected type ".concat(optionInfo.type)); - } - - if (optionInfo.exception) { - parameters.validate = function (value, schema, utils) { - return optionInfo.exception(value) || schema.validate(value, utils); - }; - } else { - parameters.validate = function (value, schema, utils) { - return value === undefined || schema.validate(value, utils); - }; - } - - if (optionInfo.redirect) { - handlers.redirect = function (value) { - return !value ? undefined : { - to: { - key: optionInfo.redirect.option, - value: optionInfo.redirect.value - } - }; - }; - } - - if (optionInfo.deprecated) { - handlers.deprecated = true; - } // allow CLI overriding, e.g., prettier package.json --tab-width 1 --tab-width 2 - - - if (isCLI && !optionInfo.array) { - var originalPreprocess = parameters.preprocess || function (x) { - return x; - }; - - parameters.preprocess = function (value, schema, utils) { - return schema.preprocess(originalPreprocess(Array.isArray(value) ? value[value.length - 1] : value), utils); - }; - } - - return optionInfo.array ? lib.ArraySchema.create(Object.assign(isCLI ? { - preprocess: function preprocess(v) { - return [].concat(v); - } - } : {}, handlers, { - valueSchema: SchemaConstructor.create(parameters) - })) : SchemaConstructor.create(Object.assign({}, parameters, handlers)); - } - - function normalizeApiOptions(options, optionInfos, opts) { - return normalizeOptions(options, optionInfos, opts); - } - - function normalizeCliOptions(options, optionInfos, opts) { - return normalizeOptions(options, optionInfos, Object.assign({ - isCLI: true - }, opts)); - } - - var optionsNormalizer = { - normalizeApiOptions: normalizeApiOptions, - normalizeCliOptions: normalizeCliOptions - }; - - var getLast = function getLast(arr) { - return arr.length > 0 ? arr[arr.length - 1] : null; - }; - - function locStart(node, opts) { - opts = opts || {}; // Handle nodes with decorators. They should start at the first decorator - - if (!opts.ignoreDecorators && node.declaration && node.declaration.decorators && node.declaration.decorators.length > 0) { - return locStart(node.declaration.decorators[0]); - } - - if (!opts.ignoreDecorators && node.decorators && node.decorators.length > 0) { - return locStart(node.decorators[0]); - } - - if (node.__location) { - return node.__location.startOffset; - } - - if (node.range) { - return node.range[0]; - } - - if (typeof node.start === "number") { - return node.start; - } - - if (node.loc) { - return node.loc.start; - } - - return null; - } - - function locEnd(node) { - var endNode = node.nodes && getLast(node.nodes); - - if (endNode && node.source && !node.source.end) { - node = endNode; - } - - if (node.__location) { - return node.__location.endOffset; - } - - var loc = node.range ? node.range[1] : typeof node.end === "number" ? node.end : null; - - if (node.typeAnnotation) { - return Math.max(loc, locEnd(node.typeAnnotation)); - } - - if (node.loc && !loc) { - return node.loc.end; - } - - return loc; - } - - var loc = { - locStart: locStart, - locEnd: locEnd - }; - - var jsTokens = createCommonjsModule(function (module, exports) { - // Copyright 2014, 2015, 2016, 2017, 2018 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))|[gmiyus]{1,6}\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], - closed: undefined - }; - 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; - }; - }); - unwrapExports(jsTokens); - var jsTokens_1 = jsTokens.matchToToken; - - var ast = createCommonjsModule(function (module) { - /* - Copyright (C) 2013 Yusuke Suzuki - - 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 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 () { - - 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 : */ - - }); - var ast_1 = ast.isExpression; - var ast_2 = ast.isStatement; - var ast_3 = ast.isIterationStatement; - var ast_4 = ast.isSourceElement; - var ast_5 = ast.isProblematicIfStatement; - var ast_6 = ast.trailingStatement; - - var code = createCommonjsModule(function (module) { - /* - Copyright (C) 2013-2014 Yusuke Suzuki - Copyright (C) 2014 Ivan Nikulin - - 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 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 () { - - var ES6Regex, ES5Regex, NON_ASCII_WHITESPACES, IDENTIFIER_START, IDENTIFIER_PART, ch; // See `tools/generate-identifier-regex.js`. - - ES5Regex = { - // ECMAScript 5.1/Unicode v9.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\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-\u1884\u1887-\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\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-\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]/, - // ECMAScript 5.1/Unicode v9.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-\u08B4\u08B6-\u08BD\u08D4-\u08E1\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\u0C80-\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\u0D54-\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\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-\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\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\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]/ - }; - ES6Regex = { - // ECMAScript 6/Unicode v9.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\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]|\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\uDCB0-\uDCD3\uDCD8-\uDCFB\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[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\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\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\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\uDD00-\uDD43]|\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]/, - // ECMAScript 6/Unicode v9.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\u08B6-\u08BD\u08D4-\u08E1\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\u0C80-\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\u0D54-\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\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\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\uDCB0-\uDCD3\uDCD8-\uDCFB\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\uDE3E\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[\uDC00-\uDC4A\uDC50-\uDC59\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]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\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\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\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]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\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]/ - }; - - 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, 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 : */ - - }); - var code_1 = code.isDecimalDigit; - var code_2 = code.isHexDigit; - var code_3 = code.isOctalDigit; - var code_4 = code.isWhiteSpace; - var code_5 = code.isLineTerminator; - var code_6 = code.isIdentifierStartES5; - var code_7 = code.isIdentifierPartES5; - var code_8 = code.isIdentifierStartES6; - var code_9 = code.isIdentifierPartES6; - - var keyword = createCommonjsModule(function (module) { - /* - Copyright (C) 2013 Yusuke Suzuki - - 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 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 () { - - var code$1 = 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$1.isIdentifierStartES5(ch)) { - return false; - } - - for (i = 1, iz = id.length; i < iz; ++i) { - ch = id.charCodeAt(i); - - if (!code$1.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$1.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$1.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 : */ - - }); - var keyword_1 = keyword.isKeywordES5; - var keyword_2 = keyword.isKeywordES6; - var keyword_3 = keyword.isReservedWordES5; - var keyword_4 = keyword.isReservedWordES6; - var keyword_5 = keyword.isRestrictedWord; - var keyword_6 = keyword.isIdentifierNameES5; - var keyword_7 = keyword.isIdentifierNameES6; - var keyword_8 = keyword.isIdentifierES5; - var keyword_9 = keyword.isIdentifierES6; - - var utils$1 = createCommonjsModule(function (module, exports) { - /* - Copyright (C) 2013 Yusuke Suzuki - - 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 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 () { - - exports.ast = ast; - exports.code = code; - exports.keyword = keyword; - })(); - /* vim: set sw=4 ts=4 et tw=80 : */ - - }); - var utils_1$1 = utils$1.ast; - var utils_2$1 = utils$1.code; - var utils_3$1 = utils$1.keyword; - - var lib$1 = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.shouldHighlight = shouldHighlight; - exports.getChalk = getChalk; - exports.default = highlight; - - function _jsTokens() { - var data = _interopRequireWildcard(jsTokens); - - _jsTokens = function _jsTokens() { - return data; - }; - - return data; - } - - function _esutils() { - var data = _interopRequireDefault(utils$1); - - _esutils = function _esutils() { - return data; - }; - - return data; - } - - function _chalk() { - var data = _interopRequireDefault(chalk); - - _chalk = function _chalk() { - return data; - }; - - return data; - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; - - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - - newObj.default = obj; - return newObj; - } - } - - 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 - }; - } - - 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), - _match$slice2 = _slicedToArray(_match$slice, 2), - offset = _match$slice2[0], - text = _match$slice2[1]; - - var token = (0, _jsTokens().matchToToken)(match); - - if (token.type === "name") { - if (_esutils().default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (shouldHighlight(options)) { - var chalk = getChalk(options); - var defs = getDefs(chalk); - return highlightTokens(defs, code); - } else { - return code; - } - } - }); - unwrapExports(lib$1); - var lib_1 = lib$1.shouldHighlight; - var lib_2 = lib$1.getChalk; - - var lib$2 = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.codeFrameColumns = codeFrameColumns; - exports.default = _default; - - function _highlight() { - var data = _interopRequireWildcard(lib$1); - - _highlight = function _highlight() { - return data; - }; - - return data; - } - - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; - - if (desc.get || desc.set) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - } - - newObj.default = obj; - return newObj; - } - } - - var deprecationWarningShown = false; - - function getDefs(chalk) { - return { - gutter: chalk.grey, - marker: chalk.red.bold, - message: chalk.red.bold - }; - } - - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - - function getMarkerLines(loc, source, opts) { - var startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - var endLoc = Object.assign({}, startLoc, loc.end); - - var _ref = opts || {}, - _ref$linesAbove = _ref.linesAbove, - linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove, - _ref$linesBelow = _ref.linesBelow, - linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow; - - var startLine = startLoc.line; - var startColumn = startLoc.column; - var endLine = endLoc.line; - var endColumn = endLoc.column; - var start = Math.max(startLine - (linesAbove + 1), 0); - var end = Math.min(source.length, endLine + linesBelow); - - if (startLine === -1) { - start = 0; - } - - if (endLine === -1) { - end = source.length; - } - - var lineDiff = endLine - startLine; - var markerLines = {}; - - if (lineDiff) { - for (var i = 0; i <= lineDiff; i++) { - var lineNumber = i + startLine; - - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - var sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - var _sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, _sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; - } - } - - return { - start: start, - end: end, - markerLines: markerLines - }; - } - - function codeFrameColumns(rawLines, loc) { - var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight().shouldHighlight)(opts); - var chalk = (0, _highlight().getChalk)(opts); - var defs = getDefs(chalk); - - var maybeHighlight = function maybeHighlight(chalkFn, string) { - return highlighted ? chalkFn(string) : string; - }; - - var lines = rawLines.split(NEWLINE); - - var _getMarkerLines = getMarkerLines(loc, lines, opts), - start = _getMarkerLines.start, - end = _getMarkerLines.end, - markerLines = _getMarkerLines.markerLines; - - var hasColumns = loc.start && typeof loc.start.column === "number"; - var numberMaxWidth = String(end).length; - var highlightedLines = highlighted ? (0, _highlight().default)(rawLines, opts) : rawLines; - var frame = highlightedLines.split(NEWLINE).slice(start, end).map(function (line, index) { - var number = start + 1 + index; - var paddedNumber = " ".concat(number).slice(-numberMaxWidth); - var gutter = " ".concat(paddedNumber, " | "); - var hasMarker = markerLines[number]; - var lastMarkerLine = !markerLines[number + 1]; - - if (hasMarker) { - var markerLine = ""; - - if (Array.isArray(hasMarker)) { - var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - var numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } - } - - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return " ".concat(maybeHighlight(defs.gutter, gutter)).concat(line); - } - }).join("\n"); - - if (opts.message && !hasColumns) { - frame = "".concat(" ".repeat(numberMaxWidth + 1)).concat(opts.message, "\n").concat(frame); - } - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } - } - - function _default(rawLines, lineNumber, colNumber) { - var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - if (!deprecationWarningShown) { - deprecationWarningShown = true; - var message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - var deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); - } - } - - colNumber = Math.max(colNumber, 0); - var location = { - start: { - column: colNumber, - line: lineNumber - } - }; - return codeFrameColumns(rawLines, location, opts); - } - }); - unwrapExports(lib$2); - var lib_1$1 = lib$2.codeFrameColumns; - - var ConfigError$1 = errors.ConfigError; - var locStart$1 = loc.locStart, - locEnd$1 = loc.locEnd; // Use defineProperties()/getOwnPropertyDescriptor() to prevent - // triggering the parsers getters. - - var ownNames = Object.getOwnPropertyNames; - var ownDescriptor = Object.getOwnPropertyDescriptor; - - function getParsers(options) { - var parsers = {}; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = options.plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var plugin = _step.value; - - if (!plugin.parsers) { - continue; - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = ownNames(plugin.parsers)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var name = _step2.value; - Object.defineProperty(parsers, name, ownDescriptor(plugin.parsers, name)); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return parsers; - } - - function resolveParser(opts, parsers) { - parsers = parsers || getParsers(opts); - - if (typeof opts.parser === "function") { - // Custom parser API always works with JavaScript. - return { - parse: opts.parser, - astFormat: "estree", - locStart: locStart$1, - locEnd: locEnd$1 - }; - } - - if (typeof opts.parser === "string") { - if (Object.prototype.hasOwnProperty.call(parsers, opts.parser)) { - return parsers[opts.parser]; - } - /* istanbul ignore next */ - - - { - throw new ConfigError$1("Couldn't resolve parser \"".concat(opts.parser, "\". Parsers must be explicitly added to the standalone bundle.")); - } - } - } - - function parse(text, opts) { - var parsers = getParsers(opts); // Create a new object {parserName: parseFn}. Uses defineProperty() to only call - // the parsers getters when actually calling the parser `parse` function. - - var parsersForCustomParserApi = Object.keys(parsers).reduce(function (object, parserName) { - return Object.defineProperty(object, parserName, { - enumerable: true, - get: function get() { - return parsers[parserName].parse; - } - }); - }, {}); - var parser = resolveParser(opts, parsers); - - try { - if (parser.preprocess) { - text = parser.preprocess(text, opts); - } - - return { - text: text, - ast: parser.parse(text, parsersForCustomParserApi, opts) - }; - } catch (error) { - var loc = error.loc; - - if (loc) { - var codeFrame = lib$2; - error.codeFrame = codeFrame.codeFrameColumns(text, loc, { - highlightCode: true - }); - error.message += "\n" + error.codeFrame; - throw error; - } - /* istanbul ignore next */ - - - throw error.stack; - } - } - - var parser = { - parse: parse, - resolveParser: resolveParser - }; - - var UndefinedParserError$1 = errors.UndefinedParserError; - var getSupportInfo$1 = support.getSupportInfo; - var resolveParser$1 = parser.resolveParser; - var hiddenDefaults = { - astFormat: "estree", - printer: {}, - originalText: undefined, - locStart: null, - locEnd: null - }; // Copy options and fill in default values. - - function normalize$1(options, opts) { - opts = opts || {}; - var rawOptions = Object.assign({}, options); - var supportOptions = getSupportInfo$1(null, { - plugins: options.plugins, - showUnreleased: true, - showDeprecated: true - }).options; - var defaults = supportOptions.reduce(function (reduced, optionInfo) { - return optionInfo.default !== undefined ? Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.default)) : reduced; - }, Object.assign({}, hiddenDefaults)); - - if (!rawOptions.parser) { - if (!rawOptions.filepath) { - var logger = opts.logger || console; - logger.warn("No parser and no filepath given, using 'babel' the parser now " + "but this will throw an error in the future. " + "Please specify a parser or a filepath so one can be inferred."); - rawOptions.parser = "babel"; - } else { - rawOptions.parser = inferParser(rawOptions.filepath, rawOptions.plugins); - - if (!rawOptions.parser) { - throw new UndefinedParserError$1("No parser could be inferred for file: ".concat(rawOptions.filepath)); - } - } - } - - var parser = resolveParser$1(optionsNormalizer.normalizeApiOptions(rawOptions, [supportOptions.find(function (x) { - return x.name === "parser"; - })], { - passThrough: true, - logger: false - })); - rawOptions.astFormat = parser.astFormat; - rawOptions.locEnd = parser.locEnd; - rawOptions.locStart = parser.locStart; - var plugin = getPlugin(rawOptions); - rawOptions.printer = plugin.printers[rawOptions.astFormat]; - var pluginDefaults = supportOptions.filter(function (optionInfo) { - return optionInfo.pluginDefaults && optionInfo.pluginDefaults[plugin.name] !== undefined; - }).reduce(function (reduced, optionInfo) { - return Object.assign(reduced, _defineProperty({}, optionInfo.name, optionInfo.pluginDefaults[plugin.name])); - }, {}); - var mixedDefaults = Object.assign({}, defaults, pluginDefaults); - Object.keys(mixedDefaults).forEach(function (k) { - if (rawOptions[k] == null) { - rawOptions[k] = mixedDefaults[k]; - } - }); - - if (rawOptions.parser === "json") { - rawOptions.trailingComma = "none"; - } - - return optionsNormalizer.normalizeApiOptions(rawOptions, supportOptions, Object.assign({ - passThrough: Object.keys(hiddenDefaults) - }, opts)); - } - - function getPlugin(options) { - var astFormat = options.astFormat; - - if (!astFormat) { - throw new Error("getPlugin() requires astFormat to be set"); - } - - var printerPlugin = options.plugins.find(function (plugin) { - return plugin.printers && plugin.printers[astFormat]; - }); - - if (!printerPlugin) { - throw new Error("Couldn't find plugin for AST format \"".concat(astFormat, "\"")); - } - - return printerPlugin; - } - - function getInterpreter(filepath) { - if (typeof filepath !== "string") { - return ""; - } - - var fd; - - try { - fd = fs.openSync(filepath, "r"); - } catch (err) { - return ""; - } - - try { - var liner = new readlines(fd); - var firstLine = liner.next().toString("utf8"); // #!/bin/env node, #!/usr/bin/env node - - var m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/); - - if (m1) { - return m1[1]; - } // #!/bin/node, #!/usr/bin/node, #!/usr/local/bin/node - - - var m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/); - - if (m2) { - return m2[1]; - } - - return ""; - } catch (err) { - // There are some weird cases where paths are missing, causing Jest - // failures. It's unclear what these correspond to in the real world. - return ""; - } finally { - try { - // There are some weird cases where paths are missing, causing Jest - // failures. It's unclear what these correspond to in the real world. - fs.closeSync(fd); - } catch (err) {// nop - } - } - } - - function inferParser(filepath, plugins) { - var filepathParts = normalizePath(filepath).split("/"); - var filename = filepathParts[filepathParts.length - 1].toLowerCase(); // If the file has no extension, we can try to infer the language from the - // interpreter in the shebang line, if any; but since this requires FS access, - // do it last. - - var language = getSupportInfo$1(null, { - plugins: plugins - }).languages.find(function (language) { - return language.since !== null && (language.extensions && language.extensions.some(function (extension) { - return filename.endsWith(extension); - }) || language.filenames && language.filenames.find(function (name) { - return name.toLowerCase() === filename; - }) || filename.indexOf(".") === -1 && language.interpreters && language.interpreters.indexOf(getInterpreter(filepath)) !== -1); - }); - return language && language.parsers[0]; - } - - var options$1 = { - normalize: normalize$1, - hiddenDefaults: hiddenDefaults, - inferParser: inferParser - }; - - function massageAST(ast, options, parent) { - if (Array.isArray(ast)) { - return ast.map(function (e) { - return massageAST(e, options, parent); - }).filter(function (e) { - return e; - }); - } - - if (!ast || _typeof(ast) !== "object") { - return ast; - } - - var newObj = {}; - - for (var _i = 0, _Object$keys = Object.keys(ast); _i < _Object$keys.length; _i++) { - var key = _Object$keys[_i]; - - if (typeof ast[key] !== "function") { - newObj[key] = massageAST(ast[key], options, ast); - } - } - - if (options.printer.massageAstNode) { - var result = options.printer.massageAstNode(ast, newObj, parent); - - if (result === null) { - return undefined; - } - - if (result) { - return result; - } - } - - return newObj; - } - - var massageAst = massageAST; - - function assert() {} - - assert.ok = function () {}; - - assert.strictEqual = function () {}; - - /** - * @param {Doc[]} parts - * @returns Doc - */ - - - function concat(parts) { - // access the internals of a document directly. - // if(parts.length === 1) { - // // If it's a single document, no need to concat it. - // return parts[0]; - // } - - - return { - type: "concat", - parts: parts - }; - } - /** - * @param {Doc} contents - * @returns Doc - */ - - - function indent(contents) { - - return { - type: "indent", - contents: contents - }; - } - /** - * @param {number} n - * @param {Doc} contents - * @returns Doc - */ - - - function align(n, contents) { - - return { - type: "align", - contents: contents, - n: n - }; - } - /** - * @param {Doc} contents - * @param {object} [opts] - TBD ??? - * @returns Doc - */ - - - function group(contents, opts) { - opts = opts || {}; - - return { - type: "group", - id: opts.id, - contents: contents, - break: !!opts.shouldBreak, - expandedStates: opts.expandedStates - }; - } - /** - * @param {Doc} contents - * @returns Doc - */ - - - function dedentToRoot(contents) { - return align(-Infinity, contents); - } - /** - * @param {Doc} contents - * @returns Doc - */ - - - function markAsRoot(contents) { - // @ts-ignore - TBD ???: - return align({ - type: "root" - }, contents); - } - /** - * @param {Doc} contents - * @returns Doc - */ - - - function dedent(contents) { - return align(-1, contents); - } - /** - * @param {Doc[]} states - * @param {object} [opts] - TBD ??? - * @returns Doc - */ - - - function conditionalGroup(states, opts) { - return group(states[0], Object.assign(opts || {}, { - expandedStates: states - })); - } - /** - * @param {Doc[]} parts - * @returns Doc - */ - - - function fill(parts) { - - return { - type: "fill", - parts: parts - }; - } - /** - * @param {Doc} [breakContents] - * @param {Doc} [flatContents] - * @param {object} [opts] - TBD ??? - * @returns Doc - */ - - - function ifBreak(breakContents, flatContents, opts) { - opts = opts || {}; - - return { - type: "if-break", - breakContents: breakContents, - flatContents: flatContents, - groupId: opts.groupId - }; - } - /** - * @param {Doc} contents - * @returns Doc - */ - - - function lineSuffix(contents) { - - return { - type: "line-suffix", - contents: contents - }; - } - - var lineSuffixBoundary = { - type: "line-suffix-boundary" - }; - var breakParent = { - type: "break-parent" - }; - var trim = { - type: "trim" - }; - var line = { - type: "line" - }; - var softline = { - type: "line", - soft: true - }; - var hardline = concat([{ - type: "line", - hard: true - }, breakParent]); - var literalline = concat([{ - type: "line", - hard: true, - literal: true - }, breakParent]); - var cursor = { - type: "cursor", - placeholder: Symbol("cursor") - }; - /** - * @param {Doc} sep - * @param {Doc[]} arr - * @returns Doc - */ - - function join(sep, arr) { - var res = []; - - for (var i = 0; i < arr.length; i++) { - if (i !== 0) { - res.push(sep); - } - - res.push(arr[i]); - } - - return concat(res); - } - /** - * @param {Doc} doc - * @param {number} size - * @param {number} tabWidth - */ - - - function addAlignmentToDoc(doc, size, tabWidth) { - var aligned = doc; - - if (size > 0) { - // Use indent to add tabs for all the levels of tabs we need - for (var i = 0; i < Math.floor(size / tabWidth); ++i) { - aligned = indent(aligned); - } // Use align for all the spaces that are needed - - - aligned = align(size % tabWidth, aligned); // size is absolute from 0 and not relative to the current - // indentation, so we use -Infinity to reset the indentation to 0 - - aligned = align(-Infinity, aligned); - } - - return aligned; - } - - var docBuilders = { - concat: concat, - join: join, - line: line, - softline: softline, - hardline: hardline, - literalline: literalline, - group: group, - conditionalGroup: conditionalGroup, - fill: fill, - lineSuffix: lineSuffix, - lineSuffixBoundary: lineSuffixBoundary, - cursor: cursor, - breakParent: breakParent, - ifBreak: ifBreak, - trim: trim, - indent: indent, - align: align, - addAlignmentToDoc: addAlignmentToDoc, - markAsRoot: markAsRoot, - dedentToRoot: dedentToRoot, - dedent: dedent - }; - - var ansiRegex = function ansiRegex(options) { - options = Object.assign({ - onlyFirst: false - }, options); - var pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'].join('|'); - return new RegExp(pattern, options.onlyFirst ? undefined : 'g'); - }; - - var stripAnsi = function stripAnsi(string) { - return typeof string === 'string' ? string.replace(ansiRegex(), '') : string; - }; - - var stripAnsi_1 = stripAnsi; - var default_1$1 = stripAnsi; - stripAnsi_1.default = default_1$1; - - /* eslint-disable yoda */ - - var isFullwidthCodePoint = function isFullwidthCodePoint(codePoint) { - if (Number.isNaN(codePoint)) { - return false; - } // Code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - - - if (codePoint >= 0x1100 && (codePoint <= 0x115F || // Hangul Jamo - codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET - codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - 0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - 0x3250 <= codePoint && codePoint <= 0x4DBF || // CJK Unified Ideographs .. Yi Radicals - 0x4E00 <= codePoint && codePoint <= 0xA4C6 || // Hangul Jamo Extended-A - 0xA960 <= codePoint && codePoint <= 0xA97C || // Hangul Syllables - 0xAC00 <= codePoint && codePoint <= 0xD7A3 || // CJK Compatibility Ideographs - 0xF900 <= codePoint && codePoint <= 0xFAFF || // Vertical Forms - 0xFE10 <= codePoint && codePoint <= 0xFE19 || // CJK Compatibility Forms .. Small Form Variants - 0xFE30 <= codePoint && codePoint <= 0xFE6B || // Halfwidth and Fullwidth Forms - 0xFF01 <= codePoint && codePoint <= 0xFF60 || 0xFFE0 <= codePoint && codePoint <= 0xFFE6 || // Kana Supplement - 0x1B000 <= codePoint && codePoint <= 0x1B001 || // Enclosed Ideographic Supplement - 0x1F200 <= codePoint && codePoint <= 0x1F251 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - 0x20000 <= codePoint && codePoint <= 0x3FFFD)) { - return true; - } - - return false; - }; - - var isFullwidthCodePoint_1 = isFullwidthCodePoint; - var default_1$2 = isFullwidthCodePoint; - isFullwidthCodePoint_1.default = default_1$2; - - var emojiRegex = function emojiRegex() { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; - }; - - var stringWidth = function stringWidth(string) { - string = string.replace(emojiRegex(), ' '); - - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - string = stripAnsi_1(string); - var width = 0; - - for (var i = 0; i < string.length; i++) { - var code = string.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_1(code) ? 2 : 1; - } - - return width; - }; - - var stringWidth_1 = stringWidth; // TODO: remove this in the next major version - - var default_1$3 = stringWidth; - stringWidth_1.default = default_1$3; - - var notAsciiRegex = /[^\x20-\x7F]/; - - function isExportDeclaration(node) { - if (node) { - switch (node.type) { - case "ExportDefaultDeclaration": - case "ExportDefaultSpecifier": - case "DeclareExportDeclaration": - case "ExportNamedDeclaration": - case "ExportAllDeclaration": - return true; - } - } - - return false; - } - - function getParentExportDeclaration(path) { - var parentNode = path.getParentNode(); - - if (path.getName() === "declaration" && isExportDeclaration(parentNode)) { - return parentNode; - } - - return null; - } - - function getPenultimate(arr) { - if (arr.length > 1) { - return arr[arr.length - 2]; - } - - return null; - } - /** - * @typedef {{backwards?: boolean}} SkipOptions - */ - - /** - * @param {string | RegExp} chars - * @returns {(text: string, index: number | false, opts?: SkipOptions) => number | false} - */ - - - function skip(chars) { - return function (text, index, opts) { - var backwards = opts && opts.backwards; // Allow `skip` functions to be threaded together without having - // to check for failures (did someone say monads?). - - if (index === false) { - return false; - } - - var length = text.length; - var cursor = index; - - while (cursor >= 0 && cursor < length) { - var c = text.charAt(cursor); - - if (chars instanceof RegExp) { - if (!chars.test(c)) { - return cursor; - } - } else if (chars.indexOf(c) === -1) { - return cursor; - } - - backwards ? cursor-- : cursor++; - } - - if (cursor === -1 || cursor === length) { - // If we reached the beginning or end of the file, return the - // out-of-bounds cursor. It's up to the caller to handle this - // correctly. We don't want to indicate `false` though if it - // actually skipped valid characters. - return cursor; - } - - return false; - }; - } - /** - * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false} - */ - - - var skipWhitespace = skip(/\s/); - /** - * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false} - */ - - var skipSpaces = skip(" \t"); - /** - * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false} - */ - - var skipToLineEnd = skip(",; \t"); - /** - * @type {(text: string, index: number | false, opts?: SkipOptions) => number | false} - */ - - var skipEverythingButNewLine = skip(/[^\r\n]/); - /** - * @param {string} text - * @param {number | false} index - * @returns {number | false} - */ - - function skipInlineComment(text, index) { - if (index === false) { - return false; - } - - if (text.charAt(index) === "/" && text.charAt(index + 1) === "*") { - for (var i = index + 2; i < text.length; ++i) { - if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") { - return i + 2; - } - } - } - - return index; - } - /** - * @param {string} text - * @param {number | false} index - * @returns {number | false} - */ - - - function skipTrailingComment(text, index) { - if (index === false) { - return false; - } - - if (text.charAt(index) === "/" && text.charAt(index + 1) === "/") { - return skipEverythingButNewLine(text, index); - } - - return index; - } // This one doesn't use the above helper function because it wants to - // test \r\n in order and `skip` doesn't support ordering and we only - // want to skip one newline. It's simple to implement. - - /** - * @param {string} text - * @param {number | false} index - * @param {SkipOptions=} opts - * @returns {number | false} - */ - - - function skipNewline(text, index, opts) { - var backwards = opts && opts.backwards; - - if (index === false) { - return false; - } - - var atIndex = text.charAt(index); - - if (backwards) { - if (text.charAt(index - 1) === "\r" && atIndex === "\n") { - return index - 2; - } - - if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { - return index - 1; - } - } else { - if (atIndex === "\r" && text.charAt(index + 1) === "\n") { - return index + 2; - } - - if (atIndex === "\n" || atIndex === "\r" || atIndex === "\u2028" || atIndex === "\u2029") { - return index + 1; - } - } - - return index; - } - /** - * @param {string} text - * @param {number} index - * @param {SkipOptions=} opts - * @returns {boolean} - */ - - - function hasNewline(text, index, opts) { - opts = opts || {}; - var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); - var idx2 = skipNewline(text, idx, opts); - return idx !== idx2; - } - /** - * @param {string} text - * @param {number} start - * @param {number} end - * @returns {boolean} - */ - - - function hasNewlineInRange(text, start, end) { - for (var i = start; i < end; ++i) { - if (text.charAt(i) === "\n") { - return true; - } - } - - return false; - } // Note: this function doesn't ignore leading comments unlike isNextLineEmpty - - /** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locStart - */ - - - function isPreviousLineEmpty(text, node, locStart) { - /** @type {number | false} */ - var idx = locStart(node) - 1; - idx = skipSpaces(text, idx, { - backwards: true - }); - idx = skipNewline(text, idx, { - backwards: true - }); - idx = skipSpaces(text, idx, { - backwards: true - }); - var idx2 = skipNewline(text, idx, { - backwards: true - }); - return idx !== idx2; - } - /** - * @param {string} text - * @param {number} index - * @returns {boolean} - */ - - - function isNextLineEmptyAfterIndex(text, index) { - /** @type {number | false} */ - var oldIdx = null; - /** @type {number | false} */ - - var idx = index; - - while (idx !== oldIdx) { - // We need to skip all the potential trailing inline comments - oldIdx = idx; - idx = skipToLineEnd(text, idx); - idx = skipInlineComment(text, idx); - idx = skipSpaces(text, idx); - } - - idx = skipTrailingComment(text, idx); - idx = skipNewline(text, idx); - return idx !== false && hasNewline(text, idx); - } - /** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locEnd - * @returns {boolean} - */ - - - function isNextLineEmpty(text, node, locEnd) { - return isNextLineEmptyAfterIndex(text, locEnd(node)); - } - /** - * @param {string} text - * @param {number} idx - * @returns {number | false} - */ - - - function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, idx) { - /** @type {number | false} */ - var oldIdx = null; - /** @type {number | false} */ - - var nextIdx = idx; - - while (nextIdx !== oldIdx) { - oldIdx = nextIdx; - nextIdx = skipSpaces(text, nextIdx); - nextIdx = skipInlineComment(text, nextIdx); - nextIdx = skipTrailingComment(text, nextIdx); - nextIdx = skipNewline(text, nextIdx); - } - - return nextIdx; - } - /** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locEnd - * @returns {number | false} - */ - - - function getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) { - return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(text, locEnd(node)); - } - /** - * @template N - * @param {string} text - * @param {N} node - * @param {(node: N) => number} locEnd - * @returns {string} - */ - - - function getNextNonSpaceNonCommentCharacter(text, node, locEnd) { - return text.charAt( // @ts-ignore => TBD: can return false, should we define a fallback? - getNextNonSpaceNonCommentCharacterIndex(text, node, locEnd)); - } - /** - * @param {string} text - * @param {number} index - * @param {SkipOptions=} opts - * @returns {boolean} - */ - - - function hasSpaces(text, index, opts) { - opts = opts || {}; - var idx = skipSpaces(text, opts.backwards ? index - 1 : index, opts); - return idx !== index; - } - /** - * @param {{range?: [number, number], start?: number}} node - * @param {number} index - */ - - - function setLocStart(node, index) { - if (node.range) { - node.range[0] = index; - } else { - node.start = index; - } - } - /** - * @param {{range?: [number, number], end?: number}} node - * @param {number} index - */ - - - function setLocEnd(node, index) { - if (node.range) { - node.range[1] = index; - } else { - node.end = index; - } - } - - var PRECEDENCE = {}; - [["|>"], ["??"], ["||"], ["&&"], ["|"], ["^"], ["&"], ["==", "===", "!=", "!=="], ["<", ">", "<=", ">=", "in", "instanceof"], [">>", "<<", ">>>"], ["+", "-"], ["*", "/", "%"], ["**"]].forEach(function (tier, i) { - tier.forEach(function (op) { - PRECEDENCE[op] = i; - }); - }); - - function getPrecedence(op) { - return PRECEDENCE[op]; - } - - var equalityOperators = { - "==": true, - "!=": true, - "===": true, - "!==": true - }; - var multiplicativeOperators = { - "*": true, - "/": true, - "%": true - }; - var bitshiftOperators = { - ">>": true, - ">>>": true, - "<<": true - }; - - function shouldFlatten(parentOp, nodeOp) { - if (getPrecedence(nodeOp) !== getPrecedence(parentOp)) { - return false; - } // ** is right-associative - // x ** y ** z --> x ** (y ** z) - - - if (parentOp === "**") { - return false; - } // x == y == z --> (x == y) == z - - - if (equalityOperators[parentOp] && equalityOperators[nodeOp]) { - return false; - } // x * y % z --> (x * y) % z - - - if (nodeOp === "%" && multiplicativeOperators[parentOp] || parentOp === "%" && multiplicativeOperators[nodeOp]) { - return false; - } // x * y / z --> (x * y) / z - // x / y * z --> (x / y) * z - - - if (nodeOp !== parentOp && multiplicativeOperators[nodeOp] && multiplicativeOperators[parentOp]) { - return false; - } // x << y << z --> (x << y) << z - - - if (bitshiftOperators[parentOp] && bitshiftOperators[nodeOp]) { - return false; - } - - return true; - } - - function isBitwiseOperator(operator) { - return !!bitshiftOperators[operator] || operator === "|" || operator === "^" || operator === "&"; - } // Tests if an expression starts with `{`, or (if forbidFunctionClassAndDoExpr - // holds) `function`, `class`, or `do {}`. Will be overzealous if there's - // already necessary grouping parentheses. - - - function startsWithNoLookaheadToken(node, forbidFunctionClassAndDoExpr) { - node = getLeftMost(node); - - switch (node.type) { - case "FunctionExpression": - case "ClassExpression": - case "DoExpression": - return forbidFunctionClassAndDoExpr; - - case "ObjectExpression": - return true; - - case "MemberExpression": - case "OptionalMemberExpression": - return startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); - - case "TaggedTemplateExpression": - if (node.tag.type === "FunctionExpression") { - // IIFEs are always already parenthesized - return false; - } - - return startsWithNoLookaheadToken(node.tag, forbidFunctionClassAndDoExpr); - - case "CallExpression": - case "OptionalCallExpression": - if (node.callee.type === "FunctionExpression") { - // IIFEs are always already parenthesized - return false; - } - - return startsWithNoLookaheadToken(node.callee, forbidFunctionClassAndDoExpr); - - case "ConditionalExpression": - return startsWithNoLookaheadToken(node.test, forbidFunctionClassAndDoExpr); - - case "UpdateExpression": - return !node.prefix && startsWithNoLookaheadToken(node.argument, forbidFunctionClassAndDoExpr); - - case "BindExpression": - return node.object && startsWithNoLookaheadToken(node.object, forbidFunctionClassAndDoExpr); - - case "SequenceExpression": - return startsWithNoLookaheadToken(node.expressions[0], forbidFunctionClassAndDoExpr); - - case "TSAsExpression": - return startsWithNoLookaheadToken(node.expression, forbidFunctionClassAndDoExpr); - - default: - return false; - } - } - - function getLeftMost(node) { - if (node.left) { - return getLeftMost(node.left); - } - - return node; - } - /** - * @param {string} value - * @param {number} tabWidth - * @param {number=} startIndex - * @returns {number} - */ - - - function getAlignmentSize(value, tabWidth, startIndex) { - startIndex = startIndex || 0; - var size = 0; - - for (var i = startIndex; i < value.length; ++i) { - if (value[i] === "\t") { - // Tabs behave in a way that they are aligned to the nearest - // multiple of tabWidth: - // 0 -> 4, 1 -> 4, 2 -> 4, 3 -> 4 - // 4 -> 8, 5 -> 8, 6 -> 8, 7 -> 8 ... - size = size + tabWidth - size % tabWidth; - } else { - size++; - } - } - - return size; - } - /** - * @param {string} value - * @param {number} tabWidth - * @returns {number} - */ - - - function getIndentSize(value, tabWidth) { - var lastNewlineIndex = value.lastIndexOf("\n"); - - if (lastNewlineIndex === -1) { - return 0; - } - - return getAlignmentSize( // All the leading whitespaces - value.slice(lastNewlineIndex + 1).match(/^[ \t]*/)[0], tabWidth); - } - /** - * @typedef {'"' | "'"} Quote - */ - - /** - * - * @param {string} raw - * @param {Quote} preferredQuote - * @returns {Quote} - */ - - - function getPreferredQuote(raw, preferredQuote) { - // `rawContent` is the string exactly like it appeared in the input source - // code, without its enclosing quotes. - var rawContent = raw.slice(1, -1); - /** @type {{ quote: '"', regex: RegExp }} */ - - var double = { - quote: '"', - regex: /"/g - }; - /** @type {{ quote: "'", regex: RegExp }} */ - - var single = { - quote: "'", - regex: /'/g - }; - var preferred = preferredQuote === "'" ? single : double; - var alternate = preferred === single ? double : single; - var result = preferred.quote; // If `rawContent` contains at least one of the quote preferred for enclosing - // the string, we might want to enclose with the alternate quote instead, to - // minimize the number of escaped quotes. - - if (rawContent.includes(preferred.quote) || rawContent.includes(alternate.quote)) { - var numPreferredQuotes = (rawContent.match(preferred.regex) || []).length; - var numAlternateQuotes = (rawContent.match(alternate.regex) || []).length; - result = numPreferredQuotes > numAlternateQuotes ? alternate.quote : preferred.quote; - } - - return result; - } - - function printString(raw, options, isDirectiveLiteral) { - // `rawContent` is the string exactly like it appeared in the input source - // code, without its enclosing quotes. - var rawContent = raw.slice(1, -1); // Check for the alternate quote, to determine if we're allowed to swap - // the quotes on a DirectiveLiteral. - - var canChangeDirectiveQuotes = !rawContent.includes('"') && !rawContent.includes("'"); - /** @type {Quote} */ - - var enclosingQuote = options.parser === "json" ? '"' : options.__isInHtmlAttribute ? "'" : getPreferredQuote(raw, options.singleQuote ? "'" : '"'); // Directives are exact code unit sequences, which means that you can't - // change the escape sequences they use. - // See https://github.com/prettier/prettier/issues/1555 - // and https://tc39.github.io/ecma262/#directive-prologue - - if (isDirectiveLiteral) { - if (canChangeDirectiveQuotes) { - return enclosingQuote + rawContent + enclosingQuote; - } - - return raw; - } // It might sound unnecessary to use `makeString` even if the string already - // is enclosed with `enclosingQuote`, but it isn't. The string could contain - // unnecessary escapes (such as in `"\'"`). Always using `makeString` makes - // sure that we consistently output the minimum amount of escaped quotes. - - - return makeString(rawContent, enclosingQuote, !(options.parser === "css" || options.parser === "less" || options.parser === "scss" || options.embeddedInHtml)); - } - /** - * @param {string} rawContent - * @param {Quote} enclosingQuote - * @param {boolean=} unescapeUnnecessaryEscapes - * @returns {string} - */ - - - function makeString(rawContent, enclosingQuote, unescapeUnnecessaryEscapes) { - var otherQuote = enclosingQuote === '"' ? "'" : '"'; // Matches _any_ escape and unescaped quotes (both single and double). - - var regex = /\\([\s\S])|(['"])/g; // Escape and unescape single and double quotes as needed to be able to - // enclose `rawContent` with `enclosingQuote`. - - var newContent = rawContent.replace(regex, function (match, escaped, quote) { - // If we matched an escape, and the escaped character is a quote of the - // other type than we intend to enclose the string with, there's no need for - // it to be escaped, so return it _without_ the backslash. - if (escaped === otherQuote) { - return escaped; - } // If we matched an unescaped quote and it is of the _same_ type as we - // intend to enclose the string with, it must be escaped, so return it with - // a backslash. - - - if (quote === enclosingQuote) { - return "\\" + quote; - } - - if (quote) { - return quote; - } // Unescape any unnecessarily escaped character. - // Adapted from https://github.com/eslint/eslint/blob/de0b4ad7bd820ade41b1f606008bea68683dc11a/lib/rules/no-useless-escape.js#L27 - - - return unescapeUnnecessaryEscapes && /^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(escaped) ? escaped : "\\" + escaped; - }); - return enclosingQuote + newContent + enclosingQuote; - } - - function printNumber(rawNumber) { - return rawNumber.toLowerCase() // Remove unnecessary plus and zeroes from scientific notation. - .replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/, "$1$2$3") // Remove unnecessary scientific notation (1e0). - .replace(/^([+-]?[\d.]+)e[+-]?0+$/, "$1") // Make sure numbers always start with a digit. - .replace(/^([+-])?\./, "$10.") // Remove extraneous trailing decimal zeroes. - .replace(/(\.\d+?)0+(?=e|$)/, "$1") // Remove trailing dot. - .replace(/\.(?=e|$)/, ""); - } - /** - * @param {string} str - * @param {string} target - * @returns {number} - */ - - - function getMaxContinuousCount(str, target) { - var results = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g")); - - if (results === null) { - return 0; - } - - return results.reduce(function (maxCount, result) { - return Math.max(maxCount, result.length / target.length); - }, 0); - } - - function getMinNotPresentContinuousCount(str, target) { - var matches = str.match(new RegExp("(".concat(escapeStringRegexp(target), ")+"), "g")); - - if (matches === null) { - return 0; - } - - var countPresent = new Map(); - var max = 0; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = matches[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var match = _step.value; - var count = match.length / target.length; - countPresent.set(count, true); - - if (count > max) { - max = count; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - for (var i = 1; i < max; i++) { - if (!countPresent.get(i)) { - return i; - } - } - - return max + 1; - } - /** - * @param {string} text - * @returns {number} - */ - - - function getStringWidth(text) { - if (!text) { - return 0; - } // shortcut to avoid needless string `RegExp`s, replacements, and allocations within `string-width` - - - if (!notAsciiRegex.test(text)) { - return text.length; - } - - return stringWidth_1(text); - } - - function hasIgnoreComment(path) { - var node = path.getValue(); - return hasNodeIgnoreComment(node); - } - - function hasNodeIgnoreComment(node) { - return node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) { - return comment.value.trim() === "prettier-ignore"; - }); - } - - function matchAncestorTypes(path, types, index) { - index = index || 0; - types = types.slice(); - - while (types.length) { - var parent = path.getParentNode(index); - var type = types.shift(); - - if (!parent || parent.type !== type) { - return false; - } - - index++; - } - - return true; - } - - function addCommentHelper(node, comment) { - var comments = node.comments || (node.comments = []); - comments.push(comment); - comment.printed = false; // For some reason, TypeScript parses `// x` inside of JSXText as a comment - // We already "print" it via the raw text, we don't need to re-print it as a - // comment - - if (node.type === "JSXText") { - comment.printed = true; - } - } - - function addLeadingComment(node, comment) { - comment.leading = true; - comment.trailing = false; - addCommentHelper(node, comment); - } - - function addDanglingComment(node, comment) { - comment.leading = false; - comment.trailing = false; - addCommentHelper(node, comment); - } - - function addTrailingComment(node, comment) { - comment.leading = false; - comment.trailing = true; - addCommentHelper(node, comment); - } - - function isWithinParentArrayProperty(path, propertyName) { - var node = path.getValue(); - var parent = path.getParentNode(); - - if (parent == null) { - return false; - } - - if (!Array.isArray(parent[propertyName])) { - return false; - } - - var key = path.getName(); - return parent[propertyName][key] === node; - } - - function replaceEndOfLineWith(text, replacement) { - var parts = []; - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = text.split("\n")[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var part = _step2.value; - - if (parts.length !== 0) { - parts.push(replacement); - } - - parts.push(part); - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return parts; - } - - var util = { - replaceEndOfLineWith: replaceEndOfLineWith, - getStringWidth: getStringWidth, - getMaxContinuousCount: getMaxContinuousCount, - getMinNotPresentContinuousCount: getMinNotPresentContinuousCount, - getPrecedence: getPrecedence, - shouldFlatten: shouldFlatten, - isBitwiseOperator: isBitwiseOperator, - isExportDeclaration: isExportDeclaration, - getParentExportDeclaration: getParentExportDeclaration, - getPenultimate: getPenultimate, - getLast: getLast, - getNextNonSpaceNonCommentCharacterIndexWithStartIndex: getNextNonSpaceNonCommentCharacterIndexWithStartIndex, - getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex, - getNextNonSpaceNonCommentCharacter: getNextNonSpaceNonCommentCharacter, - skip: skip, - skipWhitespace: skipWhitespace, - skipSpaces: skipSpaces, - skipToLineEnd: skipToLineEnd, - skipEverythingButNewLine: skipEverythingButNewLine, - skipInlineComment: skipInlineComment, - skipTrailingComment: skipTrailingComment, - skipNewline: skipNewline, - isNextLineEmptyAfterIndex: isNextLineEmptyAfterIndex, - isNextLineEmpty: isNextLineEmpty, - isPreviousLineEmpty: isPreviousLineEmpty, - hasNewline: hasNewline, - hasNewlineInRange: hasNewlineInRange, - hasSpaces: hasSpaces, - setLocStart: setLocStart, - setLocEnd: setLocEnd, - startsWithNoLookaheadToken: startsWithNoLookaheadToken, - getAlignmentSize: getAlignmentSize, - getIndentSize: getIndentSize, - getPreferredQuote: getPreferredQuote, - printString: printString, - printNumber: printNumber, - hasIgnoreComment: hasIgnoreComment, - hasNodeIgnoreComment: hasNodeIgnoreComment, - makeString: makeString, - matchAncestorTypes: matchAncestorTypes, - addLeadingComment: addLeadingComment, - addDanglingComment: addDanglingComment, - addTrailingComment: addTrailingComment, - isWithinParentArrayProperty: isWithinParentArrayProperty - }; - - function guessEndOfLine(text) { - var index = text.indexOf("\r"); - - if (index >= 0) { - return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; - } - - return "lf"; - } - - function convertEndOfLineToChars(value) { - switch (value) { - case "cr": - return "\r"; - - case "crlf": - return "\r\n"; - - default: - return "\n"; - } - } - - var endOfLine = { - guessEndOfLine: guessEndOfLine, - convertEndOfLineToChars: convertEndOfLineToChars - }; - - var getStringWidth$1 = util.getStringWidth; - var convertEndOfLineToChars$1 = endOfLine.convertEndOfLineToChars; - var concat$1 = docBuilders.concat, - fill$1 = docBuilders.fill, - cursor$1 = docBuilders.cursor; - /** @type {Record} */ - - var groupModeMap; - var MODE_BREAK = 1; - var MODE_FLAT = 2; - - function rootIndent() { - return { - value: "", - length: 0, - queue: [] - }; - } - - function makeIndent(ind, options) { - return generateInd(ind, { - type: "indent" - }, options); - } - - function makeAlign(ind, n, options) { - return n === -Infinity ? ind.root || rootIndent() : n < 0 ? generateInd(ind, { - type: "dedent" - }, options) : !n ? ind : n.type === "root" ? Object.assign({}, ind, { - root: ind - }) : typeof n === "string" ? generateInd(ind, { - type: "stringAlign", - n: n - }, options) : generateInd(ind, { - type: "numberAlign", - n: n - }, options); - } - - function generateInd(ind, newPart, options) { - var queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : ind.queue.concat(newPart); - var value = ""; - var length = 0; - var lastTabs = 0; - var lastSpaces = 0; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = queue[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var part = _step.value; - - switch (part.type) { - case "indent": - flush(); - - if (options.useTabs) { - addTabs(1); - } else { - addSpaces(options.tabWidth); - } - - break; - - case "stringAlign": - flush(); - value += part.n; - length += part.n.length; - break; - - case "numberAlign": - lastTabs += 1; - lastSpaces += part.n; - break; - - /* istanbul ignore next */ - - default: - throw new Error("Unexpected type '".concat(part.type, "'")); - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - flushSpaces(); - return Object.assign({}, ind, { - value: value, - length: length, - queue: queue - }); - - function addTabs(count) { - value += "\t".repeat(count); - length += options.tabWidth * count; - } - - function addSpaces(count) { - value += " ".repeat(count); - length += count; - } - - function flush() { - if (options.useTabs) { - flushTabs(); - } else { - flushSpaces(); - } - } - - function flushTabs() { - if (lastTabs > 0) { - addTabs(lastTabs); - } - - resetLast(); - } - - function flushSpaces() { - if (lastSpaces > 0) { - addSpaces(lastSpaces); - } - - resetLast(); - } - - function resetLast() { - lastTabs = 0; - lastSpaces = 0; - } - } - - function trim$1(out) { - if (out.length === 0) { - return 0; - } - - var trimCount = 0; // Trim whitespace at the end of line - - while (out.length > 0 && typeof out[out.length - 1] === "string" && out[out.length - 1].match(/^[ \t]*$/)) { - trimCount += out.pop().length; - } - - if (out.length && typeof out[out.length - 1] === "string") { - var trimmed = out[out.length - 1].replace(/[ \t]*$/, ""); - trimCount += out[out.length - 1].length - trimmed.length; - out[out.length - 1] = trimmed; - } - - return trimCount; - } - - function fits(next, restCommands, width, options, mustBeFlat) { - var restIdx = restCommands.length; - var cmds = [next]; // `out` is only used for width counting because `trim` requires to look - // backwards for space characters. - - var out = []; - - while (width >= 0) { - if (cmds.length === 0) { - if (restIdx === 0) { - return true; - } - - cmds.push(restCommands[restIdx - 1]); - restIdx--; - continue; - } - - var x = cmds.pop(); - var ind = x[0]; - var mode = x[1]; - var doc = x[2]; - - if (typeof doc === "string") { - out.push(doc); - width -= getStringWidth$1(doc); - } else { - switch (doc.type) { - case "concat": - for (var i = doc.parts.length - 1; i >= 0; i--) { - cmds.push([ind, mode, doc.parts[i]]); - } - - break; - - case "indent": - cmds.push([makeIndent(ind, options), mode, doc.contents]); - break; - - case "align": - cmds.push([makeAlign(ind, doc.n, options), mode, doc.contents]); - break; - - case "trim": - width += trim$1(out); - break; - - case "group": - if (mustBeFlat && doc.break) { - return false; - } - - cmds.push([ind, doc.break ? MODE_BREAK : mode, doc.contents]); - - if (doc.id) { - groupModeMap[doc.id] = cmds[cmds.length - 1][1]; - } - - break; - - case "fill": - for (var _i = doc.parts.length - 1; _i >= 0; _i--) { - cmds.push([ind, mode, doc.parts[_i]]); - } - - break; - - case "if-break": - { - var groupMode = doc.groupId ? groupModeMap[doc.groupId] : mode; - - if (groupMode === MODE_BREAK) { - if (doc.breakContents) { - cmds.push([ind, mode, doc.breakContents]); - } - } - - if (groupMode === MODE_FLAT) { - if (doc.flatContents) { - cmds.push([ind, mode, doc.flatContents]); - } - } - - break; - } - - case "line": - switch (mode) { - // fallthrough - case MODE_FLAT: - if (!doc.hard) { - if (!doc.soft) { - out.push(" "); - width -= 1; - } - - break; - } - - return true; - - case MODE_BREAK: - return true; - } - - break; - } - } - } - - return false; - } - - function printDocToString(doc, options) { - groupModeMap = {}; - var width = options.printWidth; - var newLine = convertEndOfLineToChars$1(options.endOfLine); - var pos = 0; // cmds is basically a stack. We've turned a recursive call into a - // while loop which is much faster. The while loop below adds new - // cmds to the array instead of recursively calling `print`. - - var cmds = [[rootIndent(), MODE_BREAK, doc]]; - var out = []; - var shouldRemeasure = false; - var lineSuffix = []; - - while (cmds.length !== 0) { - var x = cmds.pop(); - var ind = x[0]; - var mode = x[1]; - var _doc = x[2]; - - if (typeof _doc === "string") { - out.push(_doc); - pos += getStringWidth$1(_doc); - } else { - switch (_doc.type) { - case "cursor": - out.push(cursor$1.placeholder); - break; - - case "concat": - for (var i = _doc.parts.length - 1; i >= 0; i--) { - cmds.push([ind, mode, _doc.parts[i]]); - } - - break; - - case "indent": - cmds.push([makeIndent(ind, options), mode, _doc.contents]); - break; - - case "align": - cmds.push([makeAlign(ind, _doc.n, options), mode, _doc.contents]); - break; - - case "trim": - pos -= trim$1(out); - break; - - case "group": - switch (mode) { - case MODE_FLAT: - if (!shouldRemeasure) { - cmds.push([ind, _doc.break ? MODE_BREAK : MODE_FLAT, _doc.contents]); - break; - } - - // fallthrough - - case MODE_BREAK: - { - shouldRemeasure = false; - var next = [ind, MODE_FLAT, _doc.contents]; - var rem = width - pos; - - if (!_doc.break && fits(next, cmds, rem, options)) { - cmds.push(next); - } else { - // Expanded states are a rare case where a document - // can manually provide multiple representations of - // itself. It provides an array of documents - // going from the least expanded (most flattened) - // representation first to the most expanded. If a - // group has these, we need to manually go through - // these states and find the first one that fits. - if (_doc.expandedStates) { - var mostExpanded = _doc.expandedStates[_doc.expandedStates.length - 1]; - - if (_doc.break) { - cmds.push([ind, MODE_BREAK, mostExpanded]); - break; - } else { - for (var _i2 = 1; _i2 < _doc.expandedStates.length + 1; _i2++) { - if (_i2 >= _doc.expandedStates.length) { - cmds.push([ind, MODE_BREAK, mostExpanded]); - break; - } else { - var state = _doc.expandedStates[_i2]; - var cmd = [ind, MODE_FLAT, state]; - - if (fits(cmd, cmds, rem, options)) { - cmds.push(cmd); - break; - } - } - } - } - } else { - cmds.push([ind, MODE_BREAK, _doc.contents]); - } - } - - break; - } - } - - if (_doc.id) { - groupModeMap[_doc.id] = cmds[cmds.length - 1][1]; - } - - break; - // Fills each line with as much code as possible before moving to a new - // line with the same indentation. - // - // Expects doc.parts to be an array of alternating content and - // whitespace. The whitespace contains the linebreaks. - // - // For example: - // ["I", line, "love", line, "monkeys"] - // or - // [{ type: group, ... }, softline, { type: group, ... }] - // - // It uses this parts structure to handle three main layout cases: - // * The first two content items fit on the same line without - // breaking - // -> output the first content item and the whitespace "flat". - // * Only the first content item fits on the line without breaking - // -> output the first content item "flat" and the whitespace with - // "break". - // * Neither content item fits on the line without breaking - // -> output the first content item and the whitespace with "break". - - case "fill": - { - var _rem = width - pos; - - var parts = _doc.parts; - - if (parts.length === 0) { - break; - } - - var content = parts[0]; - var contentFlatCmd = [ind, MODE_FLAT, content]; - var contentBreakCmd = [ind, MODE_BREAK, content]; - var contentFits = fits(contentFlatCmd, [], _rem, options, true); - - if (parts.length === 1) { - if (contentFits) { - cmds.push(contentFlatCmd); - } else { - cmds.push(contentBreakCmd); - } - - break; - } - - var whitespace = parts[1]; - var whitespaceFlatCmd = [ind, MODE_FLAT, whitespace]; - var whitespaceBreakCmd = [ind, MODE_BREAK, whitespace]; - - if (parts.length === 2) { - if (contentFits) { - cmds.push(whitespaceFlatCmd); - cmds.push(contentFlatCmd); - } else { - cmds.push(whitespaceBreakCmd); - cmds.push(contentBreakCmd); - } - - break; - } // At this point we've handled the first pair (context, separator) - // and will create a new fill doc for the rest of the content. - // Ideally we wouldn't mutate the array here but coping all the - // elements to a new array would make this algorithm quadratic, - // which is unusable for large arrays (e.g. large texts in JSX). - - - parts.splice(0, 2); - var remainingCmd = [ind, mode, fill$1(parts)]; - var secondContent = parts[0]; - var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$1([content, whitespace, secondContent])]; - var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, options, true); - - if (firstAndSecondContentFits) { - cmds.push(remainingCmd); - cmds.push(whitespaceFlatCmd); - cmds.push(contentFlatCmd); - } else if (contentFits) { - cmds.push(remainingCmd); - cmds.push(whitespaceBreakCmd); - cmds.push(contentFlatCmd); - } else { - cmds.push(remainingCmd); - cmds.push(whitespaceBreakCmd); - cmds.push(contentBreakCmd); - } - - break; - } - - case "if-break": - { - var groupMode = _doc.groupId ? groupModeMap[_doc.groupId] : mode; - - if (groupMode === MODE_BREAK) { - if (_doc.breakContents) { - cmds.push([ind, mode, _doc.breakContents]); - } - } - - if (groupMode === MODE_FLAT) { - if (_doc.flatContents) { - cmds.push([ind, mode, _doc.flatContents]); - } - } - - break; - } - - case "line-suffix": - lineSuffix.push([ind, mode, _doc.contents]); - break; - - case "line-suffix-boundary": - if (lineSuffix.length > 0) { - cmds.push([ind, mode, { - type: "line", - hard: true - }]); - } - - break; - - case "line": - switch (mode) { - case MODE_FLAT: - if (!_doc.hard) { - if (!_doc.soft) { - out.push(" "); - pos += 1; - } - - break; - } else { - // This line was forced into the output even if we - // were in flattened mode, so we need to tell the next - // group that no matter what, it needs to remeasure - // because the previous measurement didn't accurately - // capture the entire expression (this is necessary - // for nested groups) - shouldRemeasure = true; - } - - // fallthrough - - case MODE_BREAK: - if (lineSuffix.length) { - cmds.push([ind, mode, _doc]); - [].push.apply(cmds, lineSuffix.reverse()); - lineSuffix = []; - break; - } - - if (_doc.literal) { - if (ind.root) { - out.push(newLine, ind.root.value); - pos = ind.root.length; - } else { - out.push(newLine); - pos = 0; - } - } else { - pos -= trim$1(out); - out.push(newLine + ind.value); - pos = ind.length; - } - - break; - } - - break; - } - } - } - - var cursorPlaceholderIndex = out.indexOf(cursor$1.placeholder); - - if (cursorPlaceholderIndex !== -1) { - var otherCursorPlaceholderIndex = out.indexOf(cursor$1.placeholder, cursorPlaceholderIndex + 1); - var beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); - var aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join(""); - var afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); - return { - formatted: beforeCursor + aroundCursor + afterCursor, - cursorNodeStart: beforeCursor.length, - cursorNodeText: aroundCursor - }; - } - - return { - formatted: out.join("") - }; - } - - var docPrinter = { - printDocToString: printDocToString - }; - - var traverseDocOnExitStackMarker = {}; - - function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { - var docsStack = [doc]; - - while (docsStack.length !== 0) { - var _doc = docsStack.pop(); - - if (_doc === traverseDocOnExitStackMarker) { - onExit(docsStack.pop()); - continue; - } - - var shouldRecurse = true; - - if (onEnter) { - if (onEnter(_doc) === false) { - shouldRecurse = false; - } - } - - if (onExit) { - docsStack.push(_doc); - docsStack.push(traverseDocOnExitStackMarker); - } - - if (shouldRecurse) { - // When there are multiple parts to process, - // the parts need to be pushed onto the stack in reverse order, - // so that they are processed in the original order - // when the stack is popped. - if (_doc.type === "concat" || _doc.type === "fill") { - for (var ic = _doc.parts.length, i = ic - 1; i >= 0; --i) { - docsStack.push(_doc.parts[i]); - } - } else if (_doc.type === "if-break") { - if (_doc.flatContents) { - docsStack.push(_doc.flatContents); - } - - if (_doc.breakContents) { - docsStack.push(_doc.breakContents); - } - } else if (_doc.type === "group" && _doc.expandedStates) { - if (shouldTraverseConditionalGroups) { - for (var _ic = _doc.expandedStates.length, _i = _ic - 1; _i >= 0; --_i) { - docsStack.push(_doc.expandedStates[_i]); - } - } else { - docsStack.push(_doc.contents); - } - } else if (_doc.contents) { - docsStack.push(_doc.contents); - } - } - } - } - - function mapDoc(doc, cb) { - if (doc.type === "concat" || doc.type === "fill") { - var parts = doc.parts.map(function (part) { - return mapDoc(part, cb); - }); - return cb(Object.assign({}, doc, { - parts: parts - })); - } else if (doc.type === "if-break") { - var breakContents = doc.breakContents && mapDoc(doc.breakContents, cb); - var flatContents = doc.flatContents && mapDoc(doc.flatContents, cb); - return cb(Object.assign({}, doc, { - breakContents: breakContents, - flatContents: flatContents - })); - } else if (doc.contents) { - var contents = mapDoc(doc.contents, cb); - return cb(Object.assign({}, doc, { - contents: contents - })); - } - - return cb(doc); - } - - function findInDoc(doc, fn, defaultValue) { - var result = defaultValue; - var hasStopped = false; - - function findInDocOnEnterFn(doc) { - var maybeResult = fn(doc); - - if (maybeResult !== undefined) { - hasStopped = true; - result = maybeResult; - } - - if (hasStopped) { - return false; - } - } - - traverseDoc(doc, findInDocOnEnterFn); - return result; - } - - function isEmpty(n) { - return typeof n === "string" && n.length === 0; - } - - function isLineNextFn(doc) { - if (typeof doc === "string") { - return false; - } - - if (doc.type === "line") { - return true; - } - } - - function isLineNext(doc) { - return findInDoc(doc, isLineNextFn, false); - } - - function willBreakFn(doc) { - if (doc.type === "group" && doc.break) { - return true; - } - - if (doc.type === "line" && doc.hard) { - return true; - } - - if (doc.type === "break-parent") { - return true; - } - } - - function willBreak(doc) { - return findInDoc(doc, willBreakFn, false); - } - - function breakParentGroup(groupStack) { - if (groupStack.length > 0) { - var parentGroup = groupStack[groupStack.length - 1]; // Breaks are not propagated through conditional groups because - // the user is expected to manually handle what breaks. - - if (!parentGroup.expandedStates) { - parentGroup.break = true; - } - } - - return null; - } - - function propagateBreaks(doc) { - var alreadyVisitedSet = new Set(); - var groupStack = []; - - function propagateBreaksOnEnterFn(doc) { - if (doc.type === "break-parent") { - breakParentGroup(groupStack); - } - - if (doc.type === "group") { - groupStack.push(doc); - - if (alreadyVisitedSet.has(doc)) { - return false; - } - - alreadyVisitedSet.add(doc); - } - } - - function propagateBreaksOnExitFn(doc) { - if (doc.type === "group") { - var group = groupStack.pop(); - - if (group.break) { - breakParentGroup(groupStack); - } - } - } - - traverseDoc(doc, propagateBreaksOnEnterFn, propagateBreaksOnExitFn, - /* shouldTraverseConditionalGroups */ - true); - } - - function removeLinesFn(doc) { - // Force this doc into flat mode by statically converting all - // lines into spaces (or soft lines into nothing). Hard lines - // should still output because there's too great of a chance - // of breaking existing assumptions otherwise. - if (doc.type === "line" && !doc.hard) { - return doc.soft ? "" : " "; - } else if (doc.type === "if-break") { - return doc.flatContents || ""; - } - - return doc; - } - - function removeLines(doc) { - return mapDoc(doc, removeLinesFn); - } - - function stripTrailingHardline(doc) { - // HACK remove ending hardline, original PR: #1984 - if (doc.type === "concat" && doc.parts.length !== 0) { - var lastPart = doc.parts[doc.parts.length - 1]; - - if (lastPart.type === "concat") { - if (lastPart.parts.length === 2 && lastPart.parts[0].hard && lastPart.parts[1].type === "break-parent") { - return { - type: "concat", - parts: doc.parts.slice(0, -1) - }; - } - - return { - type: "concat", - parts: doc.parts.slice(0, -1).concat(stripTrailingHardline(lastPart)) - }; - } - } - - return doc; - } - - var docUtils = { - isEmpty: isEmpty, - willBreak: willBreak, - isLineNext: isLineNext, - traverseDoc: traverseDoc, - findInDoc: findInDoc, - mapDoc: mapDoc, - propagateBreaks: propagateBreaks, - removeLines: removeLines, - stripTrailingHardline: stripTrailingHardline - }; - - function flattenDoc(doc) { - if (doc.type === "concat") { - var res = []; - - for (var i = 0; i < doc.parts.length; ++i) { - var doc2 = doc.parts[i]; - - if (typeof doc2 !== "string" && doc2.type === "concat") { - [].push.apply(res, flattenDoc(doc2).parts); - } else { - var flattened = flattenDoc(doc2); - - if (flattened !== "") { - res.push(flattened); - } - } - } - - return Object.assign({}, doc, { - parts: res - }); - } else if (doc.type === "if-break") { - return Object.assign({}, doc, { - breakContents: doc.breakContents != null ? flattenDoc(doc.breakContents) : null, - flatContents: doc.flatContents != null ? flattenDoc(doc.flatContents) : null - }); - } else if (doc.type === "group") { - return Object.assign({}, doc, { - contents: flattenDoc(doc.contents), - expandedStates: doc.expandedStates ? doc.expandedStates.map(flattenDoc) : doc.expandedStates - }); - } else if (doc.contents) { - return Object.assign({}, doc, { - contents: flattenDoc(doc.contents) - }); - } - - return doc; - } - - function printDoc(doc) { - if (typeof doc === "string") { - return JSON.stringify(doc); - } - - if (doc.type === "line") { - if (doc.literal) { - return "literalline"; - } - - if (doc.hard) { - return "hardline"; - } - - if (doc.soft) { - return "softline"; - } - - return "line"; - } - - if (doc.type === "break-parent") { - return "breakParent"; - } - - if (doc.type === "trim") { - return "trim"; - } - - if (doc.type === "concat") { - return "[" + doc.parts.map(printDoc).join(", ") + "]"; - } - - if (doc.type === "indent") { - return "indent(" + printDoc(doc.contents) + ")"; - } - - if (doc.type === "align") { - return doc.n === -Infinity ? "dedentToRoot(" + printDoc(doc.contents) + ")" : doc.n < 0 ? "dedent(" + printDoc(doc.contents) + ")" : doc.n.type === "root" ? "markAsRoot(" + printDoc(doc.contents) + ")" : "align(" + JSON.stringify(doc.n) + ", " + printDoc(doc.contents) + ")"; - } - - if (doc.type === "if-break") { - return "ifBreak(" + printDoc(doc.breakContents) + (doc.flatContents ? ", " + printDoc(doc.flatContents) : "") + ")"; - } - - if (doc.type === "group") { - if (doc.expandedStates) { - return "conditionalGroup(" + "[" + doc.expandedStates.map(printDoc).join(",") + "])"; - } - - return (doc.break ? "wrappedGroup" : "group") + "(" + printDoc(doc.contents) + ")"; - } - - if (doc.type === "fill") { - return "fill" + "(" + doc.parts.map(printDoc).join(", ") + ")"; - } - - if (doc.type === "line-suffix") { - return "lineSuffix(" + printDoc(doc.contents) + ")"; - } - - if (doc.type === "line-suffix-boundary") { - return "lineSuffixBoundary"; - } - - throw new Error("Unknown doc type " + doc.type); - } - - var docDebug = { - printDocToDebug: function printDocToDebug(doc) { - return printDoc(flattenDoc(doc)); - } - }; - - var doc = { - builders: docBuilders, - printer: docPrinter, - utils: docUtils, - debug: docDebug - }; - - var mapDoc$1 = doc.utils.mapDoc; - - function isNextLineEmpty$1(text, node, options) { - return util.isNextLineEmpty(text, node, options.locEnd); - } - - function isPreviousLineEmpty$1(text, node, options) { - return util.isPreviousLineEmpty(text, node, options.locStart); - } - - function getNextNonSpaceNonCommentCharacterIndex$1(text, node, options) { - return util.getNextNonSpaceNonCommentCharacterIndex(text, node, options.locEnd); - } - - var utilShared = { - getMaxContinuousCount: util.getMaxContinuousCount, - getStringWidth: util.getStringWidth, - getAlignmentSize: util.getAlignmentSize, - getIndentSize: util.getIndentSize, - skip: util.skip, - skipWhitespace: util.skipWhitespace, - skipSpaces: util.skipSpaces, - skipNewline: util.skipNewline, - skipToLineEnd: util.skipToLineEnd, - skipEverythingButNewLine: util.skipEverythingButNewLine, - skipInlineComment: util.skipInlineComment, - skipTrailingComment: util.skipTrailingComment, - hasNewline: util.hasNewline, - hasNewlineInRange: util.hasNewlineInRange, - hasSpaces: util.hasSpaces, - isNextLineEmpty: isNextLineEmpty$1, - isNextLineEmptyAfterIndex: util.isNextLineEmptyAfterIndex, - isPreviousLineEmpty: isPreviousLineEmpty$1, - getNextNonSpaceNonCommentCharacterIndex: getNextNonSpaceNonCommentCharacterIndex$1, - mapDoc: mapDoc$1, - // TODO: remove in 2.0, we already exposed it in docUtils - makeString: util.makeString, - addLeadingComment: util.addLeadingComment, - addDanglingComment: util.addDanglingComment, - addTrailingComment: util.addTrailingComment - }; - - var _require$$0$builders = doc.builders, - concat$2 = _require$$0$builders.concat, - hardline$1 = _require$$0$builders.hardline, - breakParent$1 = _require$$0$builders.breakParent, - indent$1 = _require$$0$builders.indent, - lineSuffix$1 = _require$$0$builders.lineSuffix, - join$1 = _require$$0$builders.join, - cursor$2 = _require$$0$builders.cursor; - var hasNewline$1 = util.hasNewline, - skipNewline$1 = util.skipNewline, - isPreviousLineEmpty$2 = util.isPreviousLineEmpty; - var addLeadingComment$1 = utilShared.addLeadingComment, - addDanglingComment$1 = utilShared.addDanglingComment, - addTrailingComment$1 = utilShared.addTrailingComment; - var childNodesCacheKey = Symbol("child-nodes"); - - function getSortedChildNodes(node, options, resultArray) { - if (!node) { - return; - } - - var printer = options.printer, - locStart = options.locStart, - locEnd = options.locEnd; - - if (resultArray) { - if (node && printer.canAttachComment && printer.canAttachComment(node)) { - // This reverse insertion sort almost always takes constant - // time because we almost always (maybe always?) append the - // nodes in order anyway. - var i; - - for (i = resultArray.length - 1; i >= 0; --i) { - if (locStart(resultArray[i]) <= locStart(node) && locEnd(resultArray[i]) <= locEnd(node)) { - break; - } - } - - resultArray.splice(i + 1, 0, node); - return; - } - } else if (node[childNodesCacheKey]) { - return node[childNodesCacheKey]; - } - - var childNodes; - - if (printer.getCommentChildNodes) { - childNodes = printer.getCommentChildNodes(node); - } else if (node && _typeof(node) === "object") { - childNodes = Object.keys(node).filter(function (n) { - return n !== "enclosingNode" && n !== "precedingNode" && n !== "followingNode"; - }).map(function (n) { - return node[n]; - }); - } - - if (!childNodes) { - return; - } - - if (!resultArray) { - Object.defineProperty(node, childNodesCacheKey, { - value: resultArray = [], - enumerable: false - }); - } - - childNodes.forEach(function (childNode) { - getSortedChildNodes(childNode, options, resultArray); - }); - return resultArray; - } // As efficiently as possible, decorate the comment object with - // .precedingNode, .enclosingNode, and/or .followingNode properties, at - // least one of which is guaranteed to be defined. - - - function decorateComment(node, comment, options) { - var locStart = options.locStart, - locEnd = options.locEnd; - var childNodes = getSortedChildNodes(node, options); - var precedingNode; - var followingNode; // Time to dust off the old binary search robes and wizard hat. - - var left = 0; - var right = childNodes.length; - - while (left < right) { - var middle = left + right >> 1; - var child = childNodes[middle]; - - if (locStart(child) - locStart(comment) <= 0 && locEnd(comment) - locEnd(child) <= 0) { - // The comment is completely contained by this child node. - comment.enclosingNode = child; - decorateComment(child, comment, options); - return; // Abandon the binary search at this level. - } - - if (locEnd(child) - locStart(comment) <= 0) { - // This child node falls completely before the comment. - // Because we will never consider this node or any nodes - // before it again, this node must be the closest preceding - // node we have encountered so far. - precedingNode = child; - left = middle + 1; - continue; - } - - if (locEnd(comment) - locStart(child) <= 0) { - // This child node falls completely after the comment. - // Because we will never consider this node or any nodes after - // it again, this node must be the closest following node we - // have encountered so far. - followingNode = child; - right = middle; - continue; - } - /* istanbul ignore next */ - - - throw new Error("Comment location overlaps with node location"); - } // We don't want comments inside of different expressions inside of the same - // template literal to move to another expression. - - - if (comment.enclosingNode && comment.enclosingNode.type === "TemplateLiteral") { - var quasis = comment.enclosingNode.quasis; - var commentIndex = findExpressionIndexForComment(quasis, comment, options); - - if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options) !== commentIndex) { - precedingNode = null; - } - - if (followingNode && findExpressionIndexForComment(quasis, followingNode, options) !== commentIndex) { - followingNode = null; - } - } - - if (precedingNode) { - comment.precedingNode = precedingNode; - } - - if (followingNode) { - comment.followingNode = followingNode; - } - } - - function attach(comments, ast, text, options) { - if (!Array.isArray(comments)) { - return; - } - - var tiesToBreak = []; - var locStart = options.locStart, - locEnd = options.locEnd; - comments.forEach(function (comment, i) { - if (options.parser === "json" || options.parser === "json5" || options.parser === "__js_expression" || options.parser === "__vue_expression") { - if (locStart(comment) - locStart(ast) <= 0) { - addLeadingComment$1(ast, comment); - return; - } - - if (locEnd(comment) - locEnd(ast) >= 0) { - addTrailingComment$1(ast, comment); - return; - } - } - - decorateComment(ast, comment, options); - var precedingNode = comment.precedingNode, - enclosingNode = comment.enclosingNode, - followingNode = comment.followingNode; - var pluginHandleOwnLineComment = options.printer.handleComments && options.printer.handleComments.ownLine ? options.printer.handleComments.ownLine : function () { - return false; - }; - var pluginHandleEndOfLineComment = options.printer.handleComments && options.printer.handleComments.endOfLine ? options.printer.handleComments.endOfLine : function () { - return false; - }; - var pluginHandleRemainingComment = options.printer.handleComments && options.printer.handleComments.remaining ? options.printer.handleComments.remaining : function () { - return false; - }; - var isLastComment = comments.length - 1 === i; - - if (hasNewline$1(text, locStart(comment), { - backwards: true - })) { - // If a comment exists on its own line, prefer a leading comment. - // We also need to check if it's the first line of the file. - if (pluginHandleOwnLineComment(comment, text, options, ast, isLastComment)) ; else if (followingNode) { - // Always a leading comment. - addLeadingComment$1(followingNode, comment); - } else if (precedingNode) { - addTrailingComment$1(precedingNode, comment); - } else if (enclosingNode) { - addDanglingComment$1(enclosingNode, comment); - } else { - // There are no nodes, let's attach it to the root of the ast - - /* istanbul ignore next */ - addDanglingComment$1(ast, comment); - } - } else if (hasNewline$1(text, locEnd(comment))) { - if (pluginHandleEndOfLineComment(comment, text, options, ast, isLastComment)) ; else if (precedingNode) { - // There is content before this comment on the same line, but - // none after it, so prefer a trailing comment of the previous node. - addTrailingComment$1(precedingNode, comment); - } else if (followingNode) { - addLeadingComment$1(followingNode, comment); - } else if (enclosingNode) { - addDanglingComment$1(enclosingNode, comment); - } else { - // There are no nodes, let's attach it to the root of the ast - - /* istanbul ignore next */ - addDanglingComment$1(ast, comment); - } - } else { - if (pluginHandleRemainingComment(comment, text, options, ast, isLastComment)) ; else if (precedingNode && followingNode) { - // Otherwise, text exists both before and after the comment on - // the same line. If there is both a preceding and following - // node, use a tie-breaking algorithm to determine if it should - // be attached to the next or previous node. In the last case, - // simply attach the right node; - var tieCount = tiesToBreak.length; - - if (tieCount > 0) { - var lastTie = tiesToBreak[tieCount - 1]; - - if (lastTie.followingNode !== comment.followingNode) { - breakTies(tiesToBreak, text, options); - } - } - - tiesToBreak.push(comment); - } else if (precedingNode) { - addTrailingComment$1(precedingNode, comment); - } else if (followingNode) { - addLeadingComment$1(followingNode, comment); - } else if (enclosingNode) { - addDanglingComment$1(enclosingNode, comment); - } else { - // There are no nodes, let's attach it to the root of the ast - - /* istanbul ignore next */ - addDanglingComment$1(ast, comment); - } - } - }); - breakTies(tiesToBreak, text, options); - comments.forEach(function (comment) { - // These node references were useful for breaking ties, but we - // don't need them anymore, and they create cycles in the AST that - // may lead to infinite recursion if we don't delete them here. - delete comment.precedingNode; - delete comment.enclosingNode; - delete comment.followingNode; - }); - } - - function breakTies(tiesToBreak, text, options) { - var tieCount = tiesToBreak.length; - - if (tieCount === 0) { - return; - } - - var _tiesToBreak$ = tiesToBreak[0], - precedingNode = _tiesToBreak$.precedingNode, - followingNode = _tiesToBreak$.followingNode; - var gapEndPos = options.locStart(followingNode); // Iterate backwards through tiesToBreak, examining the gaps - // between the tied comments. In order to qualify as leading, a - // comment must be separated from followingNode by an unbroken series of - // gaps (or other comments). Gaps should only contain whitespace or open - // parentheses. - - var indexOfFirstLeadingComment; - - for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { - var comment = tiesToBreak[indexOfFirstLeadingComment - 1]; - assert.strictEqual(comment.precedingNode, precedingNode); - assert.strictEqual(comment.followingNode, followingNode); - var gap = text.slice(options.locEnd(comment), gapEndPos); - - if (/^[\s(]*$/.test(gap)) { - gapEndPos = options.locStart(comment); - } else { - // The gap string contained something other than whitespace or open - // parentheses. - break; - } - } - - tiesToBreak.forEach(function (comment, i) { - if (i < indexOfFirstLeadingComment) { - addTrailingComment$1(precedingNode, comment); - } else { - addLeadingComment$1(followingNode, comment); - } - }); - tiesToBreak.length = 0; - } - - function printComment(commentPath, options) { - var comment = commentPath.getValue(); - comment.printed = true; - return options.printer.printComment(commentPath, options); - } - - function findExpressionIndexForComment(quasis, comment, options) { - var startPos = options.locStart(comment) - 1; - - for (var i = 1; i < quasis.length; ++i) { - if (startPos < getQuasiRange(quasis[i]).start) { - return i - 1; - } - } // We haven't found it, it probably means that some of the locations are off. - // Let's just return the first one. - - /* istanbul ignore next */ - - - return 0; - } - - function getQuasiRange(expr) { - if (expr.start !== undefined) { - // Babel - return { - start: expr.start, - end: expr.end - }; - } // Flow - - - return { - start: expr.range[0], - end: expr.range[1] - }; - } - - function printLeadingComment(commentPath, print, options) { - var comment = commentPath.getValue(); - var contents = printComment(commentPath, options); - - if (!contents) { - return ""; - } - - var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // Leading block comments should see if they need to stay on the - // same line or not. - - if (isBlock) { - return concat$2([contents, hasNewline$1(options.originalText, options.locEnd(comment)) ? hardline$1 : " "]); - } - - return concat$2([contents, hardline$1]); - } - - function printTrailingComment(commentPath, print, options) { - var comment = commentPath.getValue(); - var contents = printComment(commentPath, options); - - if (!contents) { - return ""; - } - - var isBlock = options.printer.isBlockComment && options.printer.isBlockComment(comment); // We don't want the line to break - // when the parentParentNode is a ClassDeclaration/-Expression - // And the parentNode is in the superClass property - - var parentNode = commentPath.getNode(1); - var parentParentNode = commentPath.getNode(2); - var isParentSuperClass = parentParentNode && (parentParentNode.type === "ClassDeclaration" || parentParentNode.type === "ClassExpression") && parentParentNode.superClass === parentNode; - - if (hasNewline$1(options.originalText, options.locStart(comment), { - backwards: true - })) { - // This allows comments at the end of nested structures: - // { - // x: 1, - // y: 2 - // // A comment - // } - // Those kinds of comments are almost always leading comments, but - // here it doesn't go "outside" the block and turns it into a - // trailing comment for `2`. We can simulate the above by checking - // if this a comment on its own line; normal trailing comments are - // always at the end of another expression. - var isLineBeforeEmpty = isPreviousLineEmpty$2(options.originalText, comment, options.locStart); - return lineSuffix$1(concat$2([hardline$1, isLineBeforeEmpty ? hardline$1 : "", contents])); - } else if (isBlock || isParentSuperClass) { - // Trailing block comments never need a newline - return concat$2([" ", contents]); - } - - return concat$2([lineSuffix$1(concat$2([" ", contents])), !isBlock ? breakParent$1 : ""]); - } - - function printDanglingComments(path, options, sameIndent, filter) { - var parts = []; - var node = path.getValue(); - - if (!node || !node.comments) { - return ""; - } - - path.each(function (commentPath) { - var comment = commentPath.getValue(); - - if (comment && !comment.leading && !comment.trailing && (!filter || filter(comment))) { - parts.push(printComment(commentPath, options)); - } - }, "comments"); - - if (parts.length === 0) { - return ""; - } - - if (sameIndent) { - return join$1(hardline$1, parts); - } - - return indent$1(concat$2([hardline$1, join$1(hardline$1, parts)])); - } - - function prependCursorPlaceholder(path, options, printed) { - if (path.getNode() === options.cursorNode && path.getValue()) { - return concat$2([cursor$2, printed, cursor$2]); - } - - return printed; - } - - function printComments(path, print, options, needsSemi) { - var value = path.getValue(); - var printed = print(path); - var comments = value && value.comments; - - if (!comments || comments.length === 0) { - return prependCursorPlaceholder(path, options, printed); - } - - var leadingParts = []; - var trailingParts = [needsSemi ? ";" : "", printed]; - path.each(function (commentPath) { - var comment = commentPath.getValue(); - var leading = comment.leading, - trailing = comment.trailing; - - if (leading) { - var contents = printLeadingComment(commentPath, print, options); - - if (!contents) { - return; - } - - leadingParts.push(contents); - var text = options.originalText; - var index = skipNewline$1(text, options.locEnd(comment)); - - if (index !== false && hasNewline$1(text, index)) { - leadingParts.push(hardline$1); - } - } else if (trailing) { - trailingParts.push(printTrailingComment(commentPath, print, options)); - } - }, "comments"); - return prependCursorPlaceholder(path, options, concat$2(leadingParts.concat(trailingParts))); - } - - var comments = { - attach: attach, - printComments: printComments, - printDanglingComments: printDanglingComments, - getSortedChildNodes: getSortedChildNodes - }; - - function FastPath(value) { - assert.ok(this instanceof FastPath); - this.stack = [value]; - } // The name of the current property is always the penultimate element of - // this.stack, and always a String. - - - FastPath.prototype.getName = function getName() { - var s = this.stack; - var len = s.length; - - if (len > 1) { - return s[len - 2]; - } // Since the name is always a string, null is a safe sentinel value to - // return if we do not know the name of the (root) value. - - /* istanbul ignore next */ - - - return null; - }; // The value of the current property is always the final element of - // this.stack. - - - FastPath.prototype.getValue = function getValue() { - var s = this.stack; - return s[s.length - 1]; - }; - - function getNodeHelper(path, count) { - var stackIndex = getNodeStackIndexHelper(path.stack, count); - return stackIndex === -1 ? null : path.stack[stackIndex]; - } - - function getNodeStackIndexHelper(stack, count) { - for (var i = stack.length - 1; i >= 0; i -= 2) { - var value = stack[i]; - - if (value && !Array.isArray(value) && --count < 0) { - return i; - } - } - - return -1; - } - - FastPath.prototype.getNode = function getNode(count) { - return getNodeHelper(this, ~~count); - }; - - FastPath.prototype.getParentNode = function getParentNode(count) { - return getNodeHelper(this, ~~count + 1); - }; // Temporarily push properties named by string arguments given after the - // callback function onto this.stack, then call the callback with a - // reference to this (modified) FastPath object. Note that the stack will - // be restored to its original state after the callback is finished, so it - // is probably a mistake to retain a reference to the path. - - - FastPath.prototype.call = function call(callback - /*, name1, name2, ... */ - ) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - - var result = callback(this); - s.length = origLen; - return result; - }; - - FastPath.prototype.callParent = function callParent(callback, count) { - var stackIndex = getNodeStackIndexHelper(this.stack, ~~count + 1); - var parentValues = this.stack.splice(stackIndex + 1); - var result = callback(this); - Array.prototype.push.apply(this.stack, parentValues); - return result; - }; // Similar to FastPath.prototype.call, except that the value obtained by - // accessing this.getValue()[name1][name2]... should be array-like. The - // callback will be called with a reference to this path object for each - // element of the array. - - - FastPath.prototype.each = function each(callback - /*, name1, name2, ... */ - ) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - - for (var _i = 0; _i < value.length; ++_i) { - if (_i in value) { - s.push(_i, value[_i]); // If the callback needs to know the value of i, call - // path.getName(), assuming path is the parameter name. - - callback(this); - s.length -= 2; - } - } - - s.length = origLen; - }; // Similar to FastPath.prototype.each, except that the results of the - // callback function invocations are stored in an array and returned at - // the end of the iteration. - - - FastPath.prototype.map = function map(callback - /*, name1, name2, ... */ - ) { - var s = this.stack; - var origLen = s.length; - var value = s[origLen - 1]; - var argc = arguments.length; - - for (var i = 1; i < argc; ++i) { - var name = arguments[i]; - value = value[name]; - s.push(name, value); - } - - var result = new Array(value.length); - - for (var _i2 = 0; _i2 < value.length; ++_i2) { - if (_i2 in value) { - s.push(_i2, value[_i2]); - result[_i2] = callback(this, _i2); - s.length -= 2; - } - } - - s.length = origLen; - return result; - }; - - var fastPath = FastPath; - - var normalize$2 = options$1.normalize; - - function printSubtree(path, print, options, printAstToDoc) { - if (options.printer.embed) { - return options.printer.embed(path, print, function (text, partialNextOptions) { - return textToDoc(text, partialNextOptions, options, printAstToDoc); - }, options); - } - } - - function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc) { - var nextOptions = normalize$2(Object.assign({}, parentOptions, partialNextOptions, { - parentParser: parentOptions.parser, - embeddedInHtml: !!(parentOptions.embeddedInHtml || parentOptions.parser === "html" || parentOptions.parser === "vue" || parentOptions.parser === "angular" || parentOptions.parser === "lwc"), - originalText: text - }), { - passThrough: true - }); - var result = parser.parse(text, nextOptions); - var ast = result.ast; - text = result.text; - var astComments = ast.comments; - delete ast.comments; - comments.attach(astComments, ast, text, nextOptions); - return printAstToDoc(ast, nextOptions); - } - - var multiparser = { - printSubtree: printSubtree - }; - - var doc$1 = doc; - var docBuilders$1 = doc$1.builders; - var concat$3 = docBuilders$1.concat; - var hardline$2 = docBuilders$1.hardline; - var addAlignmentToDoc$1 = docBuilders$1.addAlignmentToDoc; - var docUtils$1 = doc$1.utils; - /** - * Takes an abstract syntax tree (AST) and recursively converts it to a - * document (series of printing primitives). - * - * This is done by descending down the AST recursively. The recursion - * involves two functions that call each other: - * - * 1. printGenerically(), which is defined as an inner function here. - * It basically takes care of node caching. - * 2. callPluginPrintFunction(), which checks for some options, and - * ultimately calls the print() function provided by the plugin. - * - * The plugin function will call printGenerically() again for child nodes - * of the current node, which will do its housekeeping, then call the - * plugin function again, and so on. - * - * All the while, these functions pass a "path" variable around, which - * is a stack-like data structure (FastPath) that maintains the current - * state of the recursion. It is called "path", because it represents - * the path to the current node through the Abstract Syntax Tree. - */ - - function printAstToDoc(ast, options) { - var alignmentSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; - var printer = options.printer; - - if (printer.preprocess) { - ast = printer.preprocess(ast, options); - } - - var cache = new Map(); - - function printGenerically(path, args) { - var node = path.getValue(); - var shouldCache = node && _typeof(node) === "object" && args === undefined; - - if (shouldCache && cache.has(node)) { - return cache.get(node); - } // We let JSXElement print its comments itself because it adds () around - // UnionTypeAnnotation has to align the child without the comments - - - var res; - - if (printer.willPrintOwnComments && printer.willPrintOwnComments(path, options)) { - res = callPluginPrintFunction(path, options, printGenerically, args); - } else { - // printComments will call the plugin print function and check for - // comments to print - res = comments.printComments(path, function (p) { - return callPluginPrintFunction(p, options, printGenerically, args); - }, options, args && args.needsSemi); - } - - if (shouldCache) { - cache.set(node, res); - } - - return res; - } - - var doc = printGenerically(new fastPath(ast)); - - if (alignmentSize > 0) { - // Add a hardline to make the indents take effect - // It should be removed in index.js format() - doc = addAlignmentToDoc$1(concat$3([hardline$2, doc]), alignmentSize, options.tabWidth); - } - - docUtils$1.propagateBreaks(doc); - return doc; - } - - function callPluginPrintFunction(path, options, printPath, args) { - assert.ok(path instanceof fastPath); - var node = path.getValue(); - var printer = options.printer; // Escape hatch - - if (printer.hasPrettierIgnore && printer.hasPrettierIgnore(path)) { - return options.originalText.slice(options.locStart(node), options.locEnd(node)); - } - - if (node) { - try { - // Potentially switch to a different parser - var sub = multiparser.printSubtree(path, printPath, options, printAstToDoc); - - if (sub) { - return sub; - } - } catch (error) { - /* istanbul ignore if */ - if (commonjsGlobal.PRETTIER_DEBUG) { - throw error; - } // Continue with current parser - - } - } - - return printer.print(path, options, printPath, args); - } - - var astToDoc = printAstToDoc; - - function findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts) { - var resultStartNode = startNodeAndParents.node; - var resultEndNode = endNodeAndParents.node; - - if (resultStartNode === resultEndNode) { - return { - startNode: resultStartNode, - endNode: resultEndNode - }; - } - - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = endNodeAndParents.parentNodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var endParent = _step.value; - - if (endParent.type !== "Program" && endParent.type !== "File" && opts.locStart(endParent) >= opts.locStart(startNodeAndParents.node)) { - resultEndNode = endParent; - } else { - break; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - var _iteratorNormalCompletion2 = true; - var _didIteratorError2 = false; - var _iteratorError2 = undefined; - - try { - for (var _iterator2 = startNodeAndParents.parentNodes[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { - var startParent = _step2.value; - - if (startParent.type !== "Program" && startParent.type !== "File" && opts.locEnd(startParent) <= opts.locEnd(endNodeAndParents.node)) { - resultStartNode = startParent; - } else { - break; - } - } - } catch (err) { - _didIteratorError2 = true; - _iteratorError2 = err; - } finally { - try { - if (!_iteratorNormalCompletion2 && _iterator2.return != null) { - _iterator2.return(); - } - } finally { - if (_didIteratorError2) { - throw _iteratorError2; - } - } - } - - return { - startNode: resultStartNode, - endNode: resultEndNode - }; - } - - function findNodeAtOffset(node, offset, options, predicate, parentNodes) { - predicate = predicate || function () { - return true; - }; - - parentNodes = parentNodes || []; - var start = options.locStart(node, options.locStart); - var end = options.locEnd(node, options.locEnd); - - if (start <= offset && offset <= end) { - var _iteratorNormalCompletion3 = true; - var _didIteratorError3 = false; - var _iteratorError3 = undefined; - - try { - for (var _iterator3 = comments.getSortedChildNodes(node, options)[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { - var childNode = _step3.value; - var childResult = findNodeAtOffset(childNode, offset, options, predicate, [node].concat(parentNodes)); - - if (childResult) { - return childResult; - } - } - } catch (err) { - _didIteratorError3 = true; - _iteratorError3 = err; - } finally { - try { - if (!_iteratorNormalCompletion3 && _iterator3.return != null) { - _iterator3.return(); - } - } finally { - if (_didIteratorError3) { - throw _iteratorError3; - } - } - } - - if (predicate(node)) { - return { - node: node, - parentNodes: parentNodes - }; - } - } - } // See https://www.ecma-international.org/ecma-262/5.1/#sec-A.5 - - - function isSourceElement(opts, node) { - if (node == null) { - return false; - } // JS and JS like to avoid repetitions - - - var jsSourceElements = ["FunctionDeclaration", "BlockStatement", "BreakStatement", "ContinueStatement", "DebuggerStatement", "DoWhileStatement", "EmptyStatement", "ExpressionStatement", "ForInStatement", "ForStatement", "IfStatement", "LabeledStatement", "ReturnStatement", "SwitchStatement", "ThrowStatement", "TryStatement", "VariableDeclaration", "WhileStatement", "WithStatement", "ClassDeclaration", // ES 2015 - "ImportDeclaration", // Module - "ExportDefaultDeclaration", // Module - "ExportNamedDeclaration", // Module - "ExportAllDeclaration", // Module - "TypeAlias", // Flow - "InterfaceDeclaration", // Flow, TypeScript - "TypeAliasDeclaration", // TypeScript - "ExportAssignment", // TypeScript - "ExportDeclaration" // TypeScript - ]; - var jsonSourceElements = ["ObjectExpression", "ArrayExpression", "StringLiteral", "NumericLiteral", "BooleanLiteral", "NullLiteral"]; - var graphqlSourceElements = ["OperationDefinition", "FragmentDefinition", "VariableDefinition", "TypeExtensionDefinition", "ObjectTypeDefinition", "FieldDefinition", "DirectiveDefinition", "EnumTypeDefinition", "EnumValueDefinition", "InputValueDefinition", "InputObjectTypeDefinition", "SchemaDefinition", "OperationTypeDefinition", "InterfaceTypeDefinition", "UnionTypeDefinition", "ScalarTypeDefinition"]; - - switch (opts.parser) { - case "flow": - case "babel": - case "typescript": - return jsSourceElements.indexOf(node.type) > -1; - - case "json": - return jsonSourceElements.indexOf(node.type) > -1; - - case "graphql": - return graphqlSourceElements.indexOf(node.kind) > -1; - - case "vue": - return node.tag !== "root"; - } - - return false; - } - - function calculateRange(text, opts, ast) { - // Contract the range so that it has non-whitespace characters at its endpoints. - // This ensures we can format a range that doesn't end on a node. - var rangeStringOrig = text.slice(opts.rangeStart, opts.rangeEnd); - var startNonWhitespace = Math.max(opts.rangeStart + rangeStringOrig.search(/\S/), opts.rangeStart); - var endNonWhitespace; - - for (endNonWhitespace = opts.rangeEnd; endNonWhitespace > opts.rangeStart; --endNonWhitespace) { - if (text[endNonWhitespace - 1].match(/\S/)) { - break; - } - } - - var startNodeAndParents = findNodeAtOffset(ast, startNonWhitespace, opts, function (node) { - return isSourceElement(opts, node); - }); - var endNodeAndParents = findNodeAtOffset(ast, endNonWhitespace, opts, function (node) { - return isSourceElement(opts, node); - }); - - if (!startNodeAndParents || !endNodeAndParents) { - return { - rangeStart: 0, - rangeEnd: 0 - }; - } - - var siblingAncestors = findSiblingAncestors(startNodeAndParents, endNodeAndParents, opts); - var startNode = siblingAncestors.startNode, - endNode = siblingAncestors.endNode; - var rangeStart = Math.min(opts.locStart(startNode, opts.locStart), opts.locStart(endNode, opts.locStart)); - var rangeEnd = Math.max(opts.locEnd(startNode, opts.locEnd), opts.locEnd(endNode, opts.locEnd)); - return { - rangeStart: rangeStart, - rangeEnd: rangeEnd - }; - } - - var rangeUtil = { - calculateRange: calculateRange, - findNodeAtOffset: findNodeAtOffset - }; - - var diff = getCjsExportFromNamespace(index_es6); - - var normalizeOptions$1 = options$1.normalize; - var guessEndOfLine$1 = endOfLine.guessEndOfLine, - convertEndOfLineToChars$2 = endOfLine.convertEndOfLineToChars; - var mapDoc$2 = doc.utils.mapDoc, - _printDocToString = doc.printer.printDocToString, - printDocToDebug = doc.debug.printDocToDebug; - var UTF8BOM = 0xfeff; - var CURSOR = Symbol("cursor"); - var PLACEHOLDERS = { - cursorOffset: "<<>>", - rangeStart: "<<>>", - rangeEnd: "<<>>" - }; - - function ensureAllCommentsPrinted(astComments) { - if (!astComments) { - return; - } - - for (var i = 0; i < astComments.length; ++i) { - if (astComments[i].value.trim() === "prettier-ignore") { - // If there's a prettier-ignore, we're not printing that sub-tree so we - // don't know if the comments was printed or not. - return; - } - } - - astComments.forEach(function (comment) { - if (!comment.printed) { - throw new Error('Comment "' + comment.value.trim() + '" was not printed. Please report this error!'); - } - - delete comment.printed; - }); - } - - function attachComments(text, ast, opts) { - var astComments = ast.comments; - - if (astComments) { - delete ast.comments; - comments.attach(astComments, ast, text, opts); - } - - ast.tokens = []; - opts.originalText = opts.parser === "yaml" ? text : text.trimRight(); - return astComments; - } - - function coreFormat(text, opts, addAlignmentSize) { - if (!text || !text.trim().length) { - return { - formatted: "", - cursorOffset: 0 - }; - } - - addAlignmentSize = addAlignmentSize || 0; - var parsed = parser.parse(text, opts); - var ast = parsed.ast; - text = parsed.text; - - if (opts.cursorOffset >= 0) { - var nodeResult = rangeUtil.findNodeAtOffset(ast, opts.cursorOffset, opts); - - if (nodeResult && nodeResult.node) { - opts.cursorNode = nodeResult.node; - } - } - - var astComments = attachComments(text, ast, opts); - var doc = astToDoc(ast, opts, addAlignmentSize); - var eol = convertEndOfLineToChars$2(opts.endOfLine); - - var result = _printDocToString(opts.endOfLine === "lf" ? doc : mapDoc$2(doc, function (currentDoc) { - return typeof currentDoc === "string" && currentDoc.indexOf("\n") !== -1 ? currentDoc.replace(/\n/g, eol) : currentDoc; - }), opts); - - ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline - - if (addAlignmentSize > 0) { - var trimmed = result.formatted.trim(); - - if (result.cursorNodeStart !== undefined) { - result.cursorNodeStart -= result.formatted.indexOf(trimmed); - } - - result.formatted = trimmed + convertEndOfLineToChars$2(opts.endOfLine); - } - - if (opts.cursorOffset >= 0) { - var oldCursorNodeStart; - var oldCursorNodeText; - var cursorOffsetRelativeToOldCursorNode; - var newCursorNodeStart; - var newCursorNodeText; - - if (opts.cursorNode && result.cursorNodeText) { - oldCursorNodeStart = opts.locStart(opts.cursorNode); - oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode)); - cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart; - newCursorNodeStart = result.cursorNodeStart; - newCursorNodeText = result.cursorNodeText; - } else { - oldCursorNodeStart = 0; - oldCursorNodeText = text; - cursorOffsetRelativeToOldCursorNode = opts.cursorOffset; - newCursorNodeStart = 0; - newCursorNodeText = result.formatted; - } - - if (oldCursorNodeText === newCursorNodeText) { - return { - formatted: result.formatted, - cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode - }; - } // diff old and new cursor node texts, with a special cursor - // symbol inserted to find out where it moves to - - - var oldCursorNodeCharArray = oldCursorNodeText.split(""); - oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR); - var newCursorNodeCharArray = newCursorNodeText.split(""); - var cursorNodeDiff = diff.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray); - var cursorOffset = newCursorNodeStart; - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = cursorNodeDiff[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var entry = _step.value; - - if (entry.removed) { - if (entry.value.indexOf(CURSOR) > -1) { - break; - } - } else { - cursorOffset += entry.count; - } - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return { - formatted: result.formatted, - cursorOffset: cursorOffset - }; - } - - return { - formatted: result.formatted - }; - } - - function formatRange(text, opts) { - var parsed = parser.parse(text, opts); - var ast = parsed.ast; - text = parsed.text; - var range = rangeUtil.calculateRange(text, opts, ast); - var rangeStart = range.rangeStart; - var rangeEnd = range.rangeEnd; - var rangeString = text.slice(rangeStart, rangeEnd); // Try to extend the range backwards to the beginning of the line. - // This is so we can detect indentation correctly and restore it. - // Use `Math.min` since `lastIndexOf` returns 0 when `rangeStart` is 0 - - var rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); - var indentString = text.slice(rangeStart2, rangeStart); - var alignmentSize = util.getAlignmentSize(indentString, opts.tabWidth); - var rangeResult = coreFormat(rangeString, Object.assign({}, opts, { - rangeStart: 0, - rangeEnd: Infinity, - // track the cursor offset only if it's within our range - cursorOffset: opts.cursorOffset >= rangeStart && opts.cursorOffset < rangeEnd ? opts.cursorOffset - rangeStart : -1 - }), alignmentSize); // Since the range contracts to avoid trailing whitespace, - // we need to remove the newline that was inserted by the `format` call. - - var rangeTrimmed = rangeResult.formatted.trimRight(); - var rangeLeft = text.slice(0, rangeStart); - var rangeRight = text.slice(rangeEnd); - var cursorOffset = opts.cursorOffset; - - if (opts.cursorOffset >= rangeEnd) { - // handle the case where the cursor was past the end of the range - cursorOffset = opts.cursorOffset - rangeEnd + (rangeStart + rangeTrimmed.length); - } else if (rangeResult.cursorOffset !== undefined) { - // handle the case where the cursor was in the range - cursorOffset = rangeResult.cursorOffset + rangeStart; - } // keep the cursor as it was if it was before the start of the range - - - var formatted; - - if (opts.endOfLine === "lf") { - formatted = rangeLeft + rangeTrimmed + rangeRight; - } else { - var eol = convertEndOfLineToChars$2(opts.endOfLine); - - if (cursorOffset >= 0) { - var parts = [rangeLeft, rangeTrimmed, rangeRight]; - var partIndex = 0; - var partOffset = cursorOffset; - - while (partIndex < parts.length) { - var part = parts[partIndex]; - - if (partOffset < part.length) { - parts[partIndex] = parts[partIndex].slice(0, partOffset) + PLACEHOLDERS.cursorOffset + parts[partIndex].slice(partOffset); - break; - } - - partIndex++; - partOffset -= part.length; - } - - var newRangeLeft = parts[0], - newRangeTrimmed = parts[1], - newRangeRight = parts[2]; - formatted = (newRangeLeft.replace(/\n/g, eol) + newRangeTrimmed + newRangeRight.replace(/\n/g, eol)).replace(PLACEHOLDERS.cursorOffset, function (_, index) { - cursorOffset = index; - return ""; - }); - } else { - formatted = rangeLeft.replace(/\n/g, eol) + rangeTrimmed + rangeRight.replace(/\n/g, eol); - } - } - - return { - formatted: formatted, - cursorOffset: cursorOffset - }; - } - - function format(text, opts) { - var selectedParser = parser.resolveParser(opts); - var hasPragma = !selectedParser.hasPragma || selectedParser.hasPragma(text); - - if (opts.requirePragma && !hasPragma) { - return { - formatted: text - }; - } - - if (opts.endOfLine === "auto") { - opts.endOfLine = guessEndOfLine$1(text); - } - - var hasCursor = opts.cursorOffset >= 0; - var hasRangeStart = opts.rangeStart > 0; - var hasRangeEnd = opts.rangeEnd < text.length; // get rid of CR/CRLF parsing - - if (text.indexOf("\r") !== -1) { - var offsetKeys = [hasCursor && "cursorOffset", hasRangeStart && "rangeStart", hasRangeEnd && "rangeEnd"].filter(Boolean).sort(function (aKey, bKey) { - return opts[aKey] - opts[bKey]; - }); - - for (var i = offsetKeys.length - 1; i >= 0; i--) { - var key = offsetKeys[i]; - text = text.slice(0, opts[key]) + PLACEHOLDERS[key] + text.slice(opts[key]); - } - - text = text.replace(/\r\n?/g, "\n"); - - var _loop = function _loop(_i) { - var key = offsetKeys[_i]; - text = text.replace(PLACEHOLDERS[key], function (_, index) { - opts[key] = index; - return ""; - }); - }; - - for (var _i = 0; _i < offsetKeys.length; _i++) { - _loop(_i); - } - } - - var hasUnicodeBOM = text.charCodeAt(0) === UTF8BOM; - - if (hasUnicodeBOM) { - text = text.substring(1); - - if (hasCursor) { - opts.cursorOffset++; - } - - if (hasRangeStart) { - opts.rangeStart++; - } - - if (hasRangeEnd) { - opts.rangeEnd++; - } - } - - if (!hasCursor) { - opts.cursorOffset = -1; - } - - if (opts.rangeStart < 0) { - opts.rangeStart = 0; - } - - if (opts.rangeEnd > text.length) { - opts.rangeEnd = text.length; - } - - var result = hasRangeStart || hasRangeEnd ? formatRange(text, opts) : coreFormat(opts.insertPragma && opts.printer.insertPragma && !hasPragma ? opts.printer.insertPragma(text) : text, opts); - - if (hasUnicodeBOM) { - result.formatted = String.fromCharCode(UTF8BOM) + result.formatted; - - if (hasCursor) { - result.cursorOffset++; - } - } - - return result; - } - - var core = { - formatWithCursor: function formatWithCursor(text, opts) { - opts = normalizeOptions$1(opts); - return format(text, opts); - }, - parse: function parse(text, opts, massage) { - opts = normalizeOptions$1(opts); - - if (text.indexOf("\r") !== -1) { - text = text.replace(/\r\n?/g, "\n"); - } - - var parsed = parser.parse(text, opts); - - if (massage) { - parsed.ast = massageAst(parsed.ast, opts); - } - - return parsed; - }, - formatAST: function formatAST(ast, opts) { - opts = normalizeOptions$1(opts); - var doc = astToDoc(ast, opts); - return _printDocToString(doc, opts); - }, - // Doesn't handle shebang for now - formatDoc: function formatDoc(doc, opts) { - var debug = printDocToDebug(doc); - opts = normalizeOptions$1(Object.assign({}, opts, { - parser: "babel" - })); - return format(debug, opts).formatted; - }, - printToDoc: function printToDoc(text, opts) { - opts = normalizeOptions$1(opts); - var parsed = parser.parse(text, opts); - var ast = parsed.ast; - text = parsed.text; - attachComments(text, ast, opts); - return astToDoc(ast, opts); - }, - printDocToString: function printDocToString(doc, opts) { - return _printDocToString(doc, normalizeOptions$1(opts)); - } - }; - - var index = [ - "a", - "abbr", - "acronym", - "address", - "applet", - "area", - "article", - "aside", - "audio", - "b", - "base", - "basefont", - "bdi", - "bdo", - "bgsound", - "big", - "blink", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "center", - "cite", - "code", - "col", - "colgroup", - "command", - "content", - "data", - "datalist", - "dd", - "del", - "details", - "dfn", - "dialog", - "dir", - "div", - "dl", - "dt", - "element", - "em", - "embed", - "fieldset", - "figcaption", - "figure", - "font", - "footer", - "form", - "frame", - "frameset", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hgroup", - "hr", - "html", - "i", - "iframe", - "image", - "img", - "input", - "ins", - "isindex", - "kbd", - "keygen", - "label", - "legend", - "li", - "link", - "listing", - "main", - "map", - "mark", - "marquee", - "math", - "menu", - "menuitem", - "meta", - "meter", - "multicol", - "nav", - "nextid", - "nobr", - "noembed", - "noframes", - "noscript", - "object", - "ol", - "optgroup", - "option", - "output", - "p", - "param", - "picture", - "plaintext", - "pre", - "progress", - "q", - "rb", - "rbc", - "rp", - "rt", - "rtc", - "ruby", - "s", - "samp", - "script", - "section", - "select", - "shadow", - "slot", - "small", - "source", - "spacer", - "span", - "strike", - "strong", - "style", - "sub", - "summary", - "sup", - "svg", - "table", - "tbody", - "td", - "template", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "tr", - "track", - "tt", - "u", - "ul", - "var", - "video", - "wbr", - "xmp" - ]; - - var htmlTagNames = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': index - }); - - var htmlTagNames$1 = getCjsExportFromNamespace(htmlTagNames); - - function clean(ast, newObj, parent) { - ["raw", // front-matter - "raws", "sourceIndex", "source", "before", "after", "trailingComma"].forEach(function (name) { - delete newObj[name]; - }); - - if (ast.type === "yaml") { - delete newObj.value; - } // --insert-pragma - - - if (ast.type === "css-comment" && parent.type === "css-root" && parent.nodes.length !== 0 && ( // first non-front-matter comment - parent.nodes[0] === ast || (parent.nodes[0].type === "yaml" || parent.nodes[0].type === "toml") && parent.nodes[1] === ast)) { - /** - * something - * - * @format - */ - delete newObj.text; // standalone pragma - - if (/^\*\s*@(format|prettier)\s*$/.test(ast.text)) { - return null; - } - } - - if (ast.type === "media-query" || ast.type === "media-query-list" || ast.type === "media-feature-expression") { - delete newObj.value; - } - - if (ast.type === "css-rule") { - delete newObj.params; - } - - if (ast.type === "selector-combinator") { - newObj.value = newObj.value.replace(/\s+/g, " "); - } - - if (ast.type === "media-feature") { - newObj.value = newObj.value.replace(/ /g, ""); - } - - if (ast.type === "value-word" && (ast.isColor && ast.isHex || ["initial", "inherit", "unset", "revert"].indexOf(newObj.value.replace().toLowerCase()) !== -1) || ast.type === "media-feature" || ast.type === "selector-root-invalid" || ast.type === "selector-pseudo") { - newObj.value = newObj.value.toLowerCase(); - } - - if (ast.type === "css-decl") { - newObj.prop = newObj.prop.toLowerCase(); - } - - if (ast.type === "css-atrule" || ast.type === "css-import") { - newObj.name = newObj.name.toLowerCase(); - } - - if (ast.type === "value-number") { - newObj.unit = newObj.unit.toLowerCase(); - } - - if ((ast.type === "media-feature" || ast.type === "media-keyword" || ast.type === "media-type" || ast.type === "media-unknown" || ast.type === "media-url" || ast.type === "media-value" || ast.type === "selector-attribute" || ast.type === "selector-string" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "value-string") && newObj.value) { - newObj.value = cleanCSSStrings(newObj.value); - } - - if (ast.type === "selector-attribute") { - newObj.attribute = newObj.attribute.trim(); - - if (newObj.namespace) { - if (typeof newObj.namespace === "string") { - newObj.namespace = newObj.namespace.trim(); - - if (newObj.namespace.length === 0) { - newObj.namespace = true; - } - } - } - - if (newObj.value) { - newObj.value = newObj.value.trim().replace(/^['"]|['"]$/g, ""); - delete newObj.quoted; - } - } - - if ((ast.type === "media-value" || ast.type === "media-type" || ast.type === "value-number" || ast.type === "selector-root-invalid" || ast.type === "selector-class" || ast.type === "selector-combinator" || ast.type === "selector-tag") && newObj.value) { - newObj.value = newObj.value.replace(/([\d.eE+-]+)([a-zA-Z]*)/g, function (match, numStr, unit) { - var num = Number(numStr); - return isNaN(num) ? match : num + unit.toLowerCase(); - }); - } - - if (ast.type === "selector-tag") { - var lowercasedValue = ast.value.toLowerCase(); - - if (htmlTagNames$1.indexOf(lowercasedValue) !== -1) { - newObj.value = lowercasedValue; - } - - if (["from", "to"].indexOf(lowercasedValue) !== -1) { - newObj.value = lowercasedValue; - } - } // Workaround when `postcss-values-parser` parse `not`, `and` or `or` keywords as `value-func` - - - if (ast.type === "css-atrule" && ast.name.toLowerCase() === "supports") { - delete newObj.value; - } // Workaround for SCSS nested properties - - - if (ast.type === "selector-unknown") { - delete newObj.value; - } - } - - function cleanCSSStrings(value) { - return value.replace(/'/g, '"').replace(/\\([^a-fA-F\d])/g, "$1"); - } - - var clean_1 = clean; - - var _require$$0$builders$1 = doc.builders, - hardline$3 = _require$$0$builders$1.hardline, - literalline$1 = _require$$0$builders$1.literalline, - concat$4 = _require$$0$builders$1.concat, - markAsRoot$1 = _require$$0$builders$1.markAsRoot, - mapDoc$3 = doc.utils.mapDoc; - - function embed(path, print, textToDoc - /*, options */ - ) { - var node = path.getValue(); - - if (node.type === "yaml") { - return markAsRoot$1(concat$4(["---", hardline$3, node.value.trim() ? replaceNewlinesWithLiterallines(textToDoc(node.value, { - parser: "yaml" - })) : "", "---", hardline$3])); - } - - return null; - - function replaceNewlinesWithLiterallines(doc) { - return mapDoc$3(doc, function (currentDoc) { - return typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$4(currentDoc.split(/(\n)/g).map(function (v, i) { - return i % 2 === 0 ? v : literalline$1; - })) : currentDoc; - }); - } - } - - var embed_1 = embed; - - var detectNewline = createCommonjsModule(function (module) { - - module.exports = function (str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - var newlines = str.match(/(?:\r?\n)/g) || []; - - if (newlines.length === 0) { - return null; - } - - var crlf = newlines.filter(function (el) { - return el === '\r\n'; - }).length; - var lf = newlines.length - crlf; - return crlf > lf ? '\r\n' : '\n'; - }; - - module.exports.graceful = function (str) { - return module.exports(str) || '\n'; - }; - }); - var detectNewline_1 = detectNewline.graceful; - - var build = createCommonjsModule(function (module, exports) { - - Object.defineProperty(exports, '__esModule', { - value: true - }); - exports.extract = extract; - exports.strip = strip; - exports.parse = parse; - exports.parseWithComments = parseWithComments; - exports.print = print; - - function _os() { - var data = require$$0$1; - - _os = function _os() { - return data; - }; - - return data; - } - - function _detectNewline() { - var data = _interopRequireDefault(detectNewline); - - _detectNewline = function _detectNewline() { - return data; - }; - - return data; - } - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - /** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - - - var commentEndRe = /\*\/$/; - var commentStartRe = /^\/\*\*/; - var docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; - var lineCommentRe = /(^|\s+)\/\/([^\r\n]*)/g; - var ltrimNewlineRe = /^(\r?\n)+/; - var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g; - var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; - var stringStartRe = /(\r?\n|^) *\* ?/g; - - function extract(contents) { - var match = contents.match(docblockRe); - return match ? match[0].trimLeft() : ''; - } - - function strip(contents) { - var match = contents.match(docblockRe); - return match && match[0] ? contents.substring(match[0].length) : contents; - } - - function parse(docblock) { - return parseWithComments(docblock).pragmas; - } - - function parseWithComments(docblock) { - var line = (0, _detectNewline().default)(docblock) || _os().EOL; - - docblock = docblock.replace(commentStartRe, '').replace(commentEndRe, '').replace(stringStartRe, '$1'); // Normalize multi-line directives - - var prev = ''; - - while (prev !== docblock) { - prev = docblock; - docblock = docblock.replace(multilineRe, "".concat(line, "$1 $2").concat(line)); - } - - docblock = docblock.replace(ltrimNewlineRe, '').trimRight(); - var result = Object.create(null); - var comments = docblock.replace(propertyRe, '').replace(ltrimNewlineRe, '').trimRight(); - var match; - - while (match = propertyRe.exec(docblock)) { - // strip linecomments from pragmas - var nextPragma = match[2].replace(lineCommentRe, ''); - - if (typeof result[match[1]] === 'string' || Array.isArray(result[match[1]])) { - result[match[1]] = [].concat(result[match[1]], nextPragma); - } else { - result[match[1]] = nextPragma; - } - } - - return { - comments: comments, - pragmas: result - }; - } - - function print(_ref) { - var _ref$comments = _ref.comments, - comments = _ref$comments === void 0 ? '' : _ref$comments, - _ref$pragmas = _ref.pragmas, - pragmas = _ref$pragmas === void 0 ? {} : _ref$pragmas; - - var line = (0, _detectNewline().default)(comments) || _os().EOL; - - var head = '/**'; - var start = ' *'; - var tail = ' */'; - var keys = Object.keys(pragmas); - var printedObject = keys.map(function (key) { - return printKeyValues(key, pragmas[key]); - }).reduce(function (arr, next) { - return arr.concat(next); - }, []).map(function (keyValue) { - return start + ' ' + keyValue + line; - }).join(''); - - if (!comments) { - if (keys.length === 0) { - return ''; - } - - if (keys.length === 1 && !Array.isArray(pragmas[keys[0]])) { - var value = pragmas[keys[0]]; - return "".concat(head, " ").concat(printKeyValues(keys[0], value)[0]).concat(tail); - } - } - - var printedComments = comments.split(line).map(function (textLine) { - return "".concat(start, " ").concat(textLine); - }).join(line) + line; - return head + line + (comments ? printedComments : '') + (comments && keys.length ? start + line : '') + printedObject + tail; - } - - function printKeyValues(key, valueOrArray) { - return [].concat(valueOrArray).map(function (value) { - return "@".concat(key, " ").concat(value).trim(); - }); - } - }); - unwrapExports(build); - var build_1 = build.extract; - var build_2 = build.strip; - var build_3 = build.parse; - var build_4 = build.parseWithComments; - var build_5 = build.print; - - function hasPragma(text) { - var pragmas = Object.keys(build.parse(build.extract(text))); - return pragmas.indexOf("prettier") !== -1 || pragmas.indexOf("format") !== -1; - } - - function insertPragma(text) { - var parsedDocblock = build.parseWithComments(build.extract(text)); - var pragmas = Object.assign({ - format: "" - }, parsedDocblock.pragmas); - var newDocblock = build.print({ - pragmas: pragmas, - comments: parsedDocblock.comments.replace(/^(\s+?\r?\n)+/, "") // remove leading newlines - - }).replace(/(\r\n|\r)/g, "\n"); // normalise newlines (mitigate use of os.EOL by jest-docblock) - - var strippedText = build.strip(text); - var separatingNewlines = strippedText.startsWith("\n") ? "\n" : "\n\n"; - return newDocblock + separatingNewlines + strippedText; - } - - var pragma = { - hasPragma: hasPragma, - insertPragma: insertPragma - }; - - var DELIMITER_MAP = { - "---": "yaml", - "+++": "toml" - }; - - function parse$1(text) { - var delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp).join("|"); - var match = text.match( // trailing spaces after delimiters are allowed - new RegExp("^(".concat(delimiterRegex, ")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)"))); - - if (match === null) { - return { - frontMatter: null, - content: text - }; - } - - var raw = match[0].replace(/\n$/, ""); - var delimiter = match[1]; - var value = match[2]; - return { - frontMatter: { - type: DELIMITER_MAP[delimiter], - value: value, - raw: raw - }, - content: match[0].replace(/[^\n]/g, " ") + text.slice(match[0].length) - }; - } - - var frontMatter = parse$1; - - function hasPragma$1(text) { - return pragma.hasPragma(frontMatter(text).content); - } - - function insertPragma$1(text) { - var _parseFrontMatter = frontMatter(text), - frontMatter$1 = _parseFrontMatter.frontMatter, - content = _parseFrontMatter.content; - - return (frontMatter$1 ? frontMatter$1.raw + "\n\n" : "") + pragma.insertPragma(content); - } - - var pragma$1 = { - hasPragma: hasPragma$1, - insertPragma: insertPragma$1 - }; - - var colorAdjusterFunctions = ["red", "green", "blue", "alpha", "a", "rgb", "hue", "h", "saturation", "s", "lightness", "l", "whiteness", "w", "blackness", "b", "tint", "shade", "blend", "blenda", "contrast", "hsl", "hsla", "hwb", "hwba"]; - - function getAncestorCounter(path, typeOrTypes) { - var types = [].concat(typeOrTypes); - var counter = -1; - var ancestorNode; - - while (ancestorNode = path.getParentNode(++counter)) { - if (types.indexOf(ancestorNode.type) !== -1) { - return counter; - } - } - - return -1; - } - - function getAncestorNode(path, typeOrTypes) { - var counter = getAncestorCounter(path, typeOrTypes); - return counter === -1 ? null : path.getParentNode(counter); - } - - function getPropOfDeclNode(path) { - var declAncestorNode = getAncestorNode(path, "css-decl"); - return declAncestorNode && declAncestorNode.prop && declAncestorNode.prop.toLowerCase(); - } - - function isSCSS(parser, text) { - var hasExplicitParserChoice = parser === "less" || parser === "scss"; - var IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/; - return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text); - } - - function isWideKeywords(value) { - return ["initial", "inherit", "unset", "revert"].indexOf(value.toLowerCase()) !== -1; - } - - function isKeyframeAtRuleKeywords(path, value) { - var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); - return atRuleAncestorNode && atRuleAncestorNode.name && atRuleAncestorNode.name.toLowerCase().endsWith("keyframes") && ["from", "to"].indexOf(value.toLowerCase()) !== -1; - } - - function maybeToLowerCase(value) { - return value.includes("$") || value.includes("@") || value.includes("#") || value.startsWith("%") || value.startsWith("--") || value.startsWith(":--") || value.includes("(") && value.includes(")") ? value : value.toLowerCase(); - } - - function insideValueFunctionNode(path, functionName) { - var funcAncestorNode = getAncestorNode(path, "value-func"); - return funcAncestorNode && funcAncestorNode.value && funcAncestorNode.value.toLowerCase() === functionName; - } - - function insideICSSRuleNode(path) { - var ruleAncestorNode = getAncestorNode(path, "css-rule"); - return ruleAncestorNode && ruleAncestorNode.raws && ruleAncestorNode.raws.selector && (ruleAncestorNode.raws.selector.startsWith(":import") || ruleAncestorNode.raws.selector.startsWith(":export")); - } - - function insideAtRuleNode(path, atRuleNameOrAtRuleNames) { - var atRuleNames = [].concat(atRuleNameOrAtRuleNames); - var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); - return atRuleAncestorNode && atRuleNames.indexOf(atRuleAncestorNode.name.toLowerCase()) !== -1; - } - - function insideURLFunctionInImportAtRuleNode(path) { - var node = path.getValue(); - var atRuleAncestorNode = getAncestorNode(path, "css-atrule"); - return atRuleAncestorNode && atRuleAncestorNode.name === "import" && node.groups[0].value === "url" && node.groups.length === 2; - } - - function isURLFunctionNode(node) { - return node.type === "value-func" && node.value.toLowerCase() === "url"; - } - - function isLastNode(path, node) { - var parentNode = path.getParentNode(); - - if (!parentNode) { - return false; - } - - var nodes = parentNode.nodes; - return nodes && nodes.indexOf(node) === nodes.length - 1; - } - - function isHTMLTag(value) { - return htmlTagNames$1.indexOf(value.toLowerCase()) !== -1; - } - - function isDetachedRulesetDeclarationNode(node) { - // If a Less file ends up being parsed with the SCSS parser, Less - // variable declarations will be parsed as atrules with names ending - // with a colon, so keep the original case then. - if (!node.selector) { - return false; - } - - return typeof node.selector === "string" && /^@.+:.*$/.test(node.selector) || node.selector.value && /^@.+:.*$/.test(node.selector.value); - } - - function isForKeywordNode(node) { - return node.type === "value-word" && ["from", "through", "end"].indexOf(node.value) !== -1; - } - - function isIfElseKeywordNode(node) { - return node.type === "value-word" && ["and", "or", "not"].indexOf(node.value) !== -1; - } - - function isEachKeywordNode(node) { - return node.type === "value-word" && node.value === "in"; - } - - function isMultiplicationNode(node) { - return node.type === "value-operator" && node.value === "*"; - } - - function isDivisionNode(node) { - return node.type === "value-operator" && node.value === "/"; - } - - function isAdditionNode(node) { - return node.type === "value-operator" && node.value === "+"; - } - - function isSubtractionNode(node) { - return node.type === "value-operator" && node.value === "-"; - } - - function isModuloNode(node) { - return node.type === "value-operator" && node.value === "%"; - } - - function isMathOperatorNode(node) { - return isMultiplicationNode(node) || isDivisionNode(node) || isAdditionNode(node) || isSubtractionNode(node) || isModuloNode(node); - } - - function isEqualityOperatorNode(node) { - return node.type === "value-word" && ["==", "!="].indexOf(node.value) !== -1; - } - - function isRelationalOperatorNode(node) { - return node.type === "value-word" && ["<", ">", "<=", ">="].indexOf(node.value) !== -1; - } - - function isSCSSControlDirectiveNode(node) { - return node.type === "css-atrule" && ["if", "else", "for", "each", "while"].indexOf(node.name) !== -1; - } - - function isSCSSNestedPropertyNode(node) { - if (!node.selector) { - return false; - } - - return node.selector.replace(/\/\*.*?\*\//, "").replace(/\/\/.*?\n/, "").trim().endsWith(":"); - } - - function isDetachedRulesetCallNode(node) { - return node.raws && node.raws.params && /^\(\s*\)$/.test(node.raws.params); - } - - function isTemplatePlaceholderNode(node) { - return node.name.startsWith("prettier-placeholder"); - } - - function isTemplatePropNode(node) { - return node.prop.startsWith("@prettier-placeholder"); - } - - function isPostcssSimpleVarNode(currentNode, nextNode) { - return currentNode.value === "$$" && currentNode.type === "value-func" && nextNode && nextNode.type === "value-word" && !nextNode.raws.before; - } - - function hasComposesNode(node) { - return node.value && node.value.type === "value-root" && node.value.group && node.value.group.type === "value-value" && node.prop.toLowerCase() === "composes"; - } - - function hasParensAroundNode(node) { - return node.value && node.value.group && node.value.group.group && node.value.group.group.type === "value-paren_group" && node.value.group.group.open !== null && node.value.group.group.close !== null; - } - - function hasEmptyRawBefore(node) { - return node.raws && node.raws.before === ""; - } - - function isKeyValuePairNode(node) { - return node.type === "value-comma_group" && node.groups && node.groups[1] && node.groups[1].type === "value-colon"; - } - - function isKeyValuePairInParenGroupNode(node) { - return node.type === "value-paren_group" && node.groups && node.groups[0] && isKeyValuePairNode(node.groups[0]); - } - - function isSCSSMapItemNode(path) { - var node = path.getValue(); // Ignore empty item (i.e. `$key: ()`) - - if (node.groups.length === 0) { - return false; - } - - var parentParentNode = path.getParentNode(1); // Check open parens contain key/value pair (i.e. `(key: value)` and `(key: (value, other-value)`) - - if (!isKeyValuePairInParenGroupNode(node) && !(parentParentNode && isKeyValuePairInParenGroupNode(parentParentNode))) { - return false; - } - - var declNode = getAncestorNode(path, "css-decl"); // SCSS map declaration (i.e. `$map: (key: value, other-key: other-value)`) - - if (declNode && declNode.prop && declNode.prop.startsWith("$")) { - return true; - } // List as value of key inside SCSS map (i.e. `$map: (key: (value other-value other-other-value))`) - - - if (isKeyValuePairInParenGroupNode(parentParentNode)) { - return true; - } // SCSS Map is argument of function (i.e. `func((key: value, other-key: other-value))`) - - - if (parentParentNode.type === "value-func") { - return true; - } - - return false; - } - - function isInlineValueCommentNode(node) { - return node.type === "value-comment" && node.inline; - } - - function isHashNode(node) { - return node.type === "value-word" && node.value === "#"; - } - - function isLeftCurlyBraceNode(node) { - return node.type === "value-word" && node.value === "{"; - } - - function isRightCurlyBraceNode(node) { - return node.type === "value-word" && node.value === "}"; - } - - function isWordNode(node) { - return ["value-word", "value-atword"].indexOf(node.type) !== -1; - } - - function isColonNode(node) { - return node.type === "value-colon"; - } - - function isMediaAndSupportsKeywords(node) { - return node.value && ["not", "and", "or"].indexOf(node.value.toLowerCase()) !== -1; - } - - function isColorAdjusterFuncNode(node) { - if (node.type !== "value-func") { - return false; - } - - return colorAdjusterFunctions.indexOf(node.value.toLowerCase()) !== -1; - } - - var utils$2 = { - getAncestorCounter: getAncestorCounter, - getAncestorNode: getAncestorNode, - getPropOfDeclNode: getPropOfDeclNode, - maybeToLowerCase: maybeToLowerCase, - insideValueFunctionNode: insideValueFunctionNode, - insideICSSRuleNode: insideICSSRuleNode, - insideAtRuleNode: insideAtRuleNode, - insideURLFunctionInImportAtRuleNode: insideURLFunctionInImportAtRuleNode, - isKeyframeAtRuleKeywords: isKeyframeAtRuleKeywords, - isHTMLTag: isHTMLTag, - isWideKeywords: isWideKeywords, - isSCSS: isSCSS, - isLastNode: isLastNode, - isSCSSControlDirectiveNode: isSCSSControlDirectiveNode, - isDetachedRulesetDeclarationNode: isDetachedRulesetDeclarationNode, - isRelationalOperatorNode: isRelationalOperatorNode, - isEqualityOperatorNode: isEqualityOperatorNode, - isMultiplicationNode: isMultiplicationNode, - isDivisionNode: isDivisionNode, - isAdditionNode: isAdditionNode, - isSubtractionNode: isSubtractionNode, - isModuloNode: isModuloNode, - isMathOperatorNode: isMathOperatorNode, - isEachKeywordNode: isEachKeywordNode, - isForKeywordNode: isForKeywordNode, - isURLFunctionNode: isURLFunctionNode, - isIfElseKeywordNode: isIfElseKeywordNode, - hasComposesNode: hasComposesNode, - hasParensAroundNode: hasParensAroundNode, - hasEmptyRawBefore: hasEmptyRawBefore, - isSCSSNestedPropertyNode: isSCSSNestedPropertyNode, - isDetachedRulesetCallNode: isDetachedRulesetCallNode, - isTemplatePlaceholderNode: isTemplatePlaceholderNode, - isTemplatePropNode: isTemplatePropNode, - isPostcssSimpleVarNode: isPostcssSimpleVarNode, - isKeyValuePairNode: isKeyValuePairNode, - isKeyValuePairInParenGroupNode: isKeyValuePairInParenGroupNode, - isSCSSMapItemNode: isSCSSMapItemNode, - isInlineValueCommentNode: isInlineValueCommentNode, - isHashNode: isHashNode, - isLeftCurlyBraceNode: isLeftCurlyBraceNode, - isRightCurlyBraceNode: isRightCurlyBraceNode, - isWordNode: isWordNode, - isColonNode: isColonNode, - isMediaAndSupportsKeywords: isMediaAndSupportsKeywords, - isColorAdjusterFuncNode: isColorAdjusterFuncNode - }; - - var insertPragma$2 = pragma$1.insertPragma; - var printNumber$1 = util.printNumber, - printString$1 = util.printString, - hasIgnoreComment$1 = util.hasIgnoreComment, - hasNewline$2 = util.hasNewline; - var isNextLineEmpty$2 = utilShared.isNextLineEmpty; - var _require$$3$builders = doc.builders, - concat$5 = _require$$3$builders.concat, - join$2 = _require$$3$builders.join, - line$1 = _require$$3$builders.line, - hardline$4 = _require$$3$builders.hardline, - softline$1 = _require$$3$builders.softline, - group$1 = _require$$3$builders.group, - fill$2 = _require$$3$builders.fill, - indent$2 = _require$$3$builders.indent, - dedent$1 = _require$$3$builders.dedent, - ifBreak$1 = _require$$3$builders.ifBreak, - removeLines$1 = doc.utils.removeLines; - var getAncestorNode$1 = utils$2.getAncestorNode, - getPropOfDeclNode$1 = utils$2.getPropOfDeclNode, - maybeToLowerCase$1 = utils$2.maybeToLowerCase, - insideValueFunctionNode$1 = utils$2.insideValueFunctionNode, - insideICSSRuleNode$1 = utils$2.insideICSSRuleNode, - insideAtRuleNode$1 = utils$2.insideAtRuleNode, - insideURLFunctionInImportAtRuleNode$1 = utils$2.insideURLFunctionInImportAtRuleNode, - isKeyframeAtRuleKeywords$1 = utils$2.isKeyframeAtRuleKeywords, - isHTMLTag$1 = utils$2.isHTMLTag, - isWideKeywords$1 = utils$2.isWideKeywords, - isSCSS$1 = utils$2.isSCSS, - isLastNode$1 = utils$2.isLastNode, - isSCSSControlDirectiveNode$1 = utils$2.isSCSSControlDirectiveNode, - isDetachedRulesetDeclarationNode$1 = utils$2.isDetachedRulesetDeclarationNode, - isRelationalOperatorNode$1 = utils$2.isRelationalOperatorNode, - isEqualityOperatorNode$1 = utils$2.isEqualityOperatorNode, - isMultiplicationNode$1 = utils$2.isMultiplicationNode, - isDivisionNode$1 = utils$2.isDivisionNode, - isAdditionNode$1 = utils$2.isAdditionNode, - isSubtractionNode$1 = utils$2.isSubtractionNode, - isMathOperatorNode$1 = utils$2.isMathOperatorNode, - isEachKeywordNode$1 = utils$2.isEachKeywordNode, - isForKeywordNode$1 = utils$2.isForKeywordNode, - isURLFunctionNode$1 = utils$2.isURLFunctionNode, - isIfElseKeywordNode$1 = utils$2.isIfElseKeywordNode, - hasComposesNode$1 = utils$2.hasComposesNode, - hasParensAroundNode$1 = utils$2.hasParensAroundNode, - hasEmptyRawBefore$1 = utils$2.hasEmptyRawBefore, - isKeyValuePairNode$1 = utils$2.isKeyValuePairNode, - isDetachedRulesetCallNode$1 = utils$2.isDetachedRulesetCallNode, - isTemplatePlaceholderNode$1 = utils$2.isTemplatePlaceholderNode, - isTemplatePropNode$1 = utils$2.isTemplatePropNode, - isPostcssSimpleVarNode$1 = utils$2.isPostcssSimpleVarNode, - isSCSSMapItemNode$1 = utils$2.isSCSSMapItemNode, - isInlineValueCommentNode$1 = utils$2.isInlineValueCommentNode, - isHashNode$1 = utils$2.isHashNode, - isLeftCurlyBraceNode$1 = utils$2.isLeftCurlyBraceNode, - isRightCurlyBraceNode$1 = utils$2.isRightCurlyBraceNode, - isWordNode$1 = utils$2.isWordNode, - isColonNode$1 = utils$2.isColonNode, - isMediaAndSupportsKeywords$1 = utils$2.isMediaAndSupportsKeywords, - isColorAdjusterFuncNode$1 = utils$2.isColorAdjusterFuncNode; - - function shouldPrintComma(options) { - switch (options.trailingComma) { - case "all": - case "es5": - return true; - - case "none": - default: - return false; - } - } - - function genericPrint(path, options, print) { - var node = path.getValue(); - /* istanbul ignore if */ - - if (!node) { - return ""; - } - - if (typeof node === "string") { - return node; - } - - switch (node.type) { - case "yaml": - case "toml": - return concat$5([node.raw, hardline$4]); - - case "css-root": - { - var nodes = printNodeSequence(path, options, print); - - if (nodes.parts.length) { - return concat$5([nodes, hardline$4]); - } - - return nodes; - } - - case "css-comment": - { - if (node.raws.content) { - return node.raws.content; - } - - var text = options.originalText.slice(options.locStart(node), options.locEnd(node)); - var rawText = node.raws.text || node.text; // Workaround a bug where the location is off. - // https://github.com/postcss/postcss-scss/issues/63 - - if (text.indexOf(rawText) === -1) { - if (node.raws.inline) { - return concat$5(["// ", rawText]); - } - - return concat$5(["/* ", rawText, " */"]); - } - - return text; - } - - case "css-rule": - { - return concat$5([path.call(print, "selector"), node.important ? " !important" : "", node.nodes ? concat$5([" {", node.nodes.length > 0 ? indent$2(concat$5([hardline$4, printNodeSequence(path, options, print)])) : "", hardline$4, "}", isDetachedRulesetDeclarationNode$1(node) ? ";" : ""]) : ";"]); - } - - case "css-decl": - { - var parentNode = path.getParentNode(); - return concat$5([node.raws.before.replace(/[\s;]/g, ""), insideICSSRuleNode$1(path) ? node.prop : maybeToLowerCase$1(node.prop), node.raws.between.trim() === ":" ? ":" : node.raws.between.trim(), node.extend ? "" : " ", hasComposesNode$1(node) ? removeLines$1(path.call(print, "value")) : path.call(print, "value"), node.raws.important ? node.raws.important.replace(/\s*!\s*important/i, " !important") : node.important ? " !important" : "", node.raws.scssDefault ? node.raws.scssDefault.replace(/\s*!default/i, " !default") : node.scssDefault ? " !default" : "", node.raws.scssGlobal ? node.raws.scssGlobal.replace(/\s*!global/i, " !global") : node.scssGlobal ? " !global" : "", node.nodes ? concat$5([" {", indent$2(concat$5([softline$1, printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePropNode$1(node) && !parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); - } - - case "css-atrule": - { - var _parentNode = path.getParentNode(); - - return concat$5(["@", // If a Less file ends up being parsed with the SCSS parser, Less - // variable declarations will be parsed as at-rules with names ending - // with a colon, so keep the original case then. - isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$5([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$5([hardline$4, hardline$4]) : hardline$4 : " ", path.call(print, "params")]) : "", node.selector ? indent$2(concat$5([" ", path.call(print, "selector")])) : "", node.value ? group$1(concat$5([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$1 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$5([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$2(concat$5([node.nodes.length > 0 ? softline$1 : "", printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePlaceholderNode$1(node) && !_parentNode.raws.semicolon && options.originalText[options.locEnd(node) - 1] !== ";" ? "" : ";"]); - } - // postcss-media-query-parser - - case "media-query-list": - { - var parts = []; - path.each(function (childPath) { - var node = childPath.getValue(); - - if (node.type === "media-query" && node.value === "") { - return; - } - - parts.push(childPath.call(print)); - }, "nodes"); - return group$1(indent$2(join$2(line$1, parts))); - } - - case "media-query": - { - return concat$5([join$2(" ", path.map(print, "nodes")), isLastNode$1(path, node) ? "" : ","]); - } - - case "media-type": - { - return adjustNumbers(adjustStrings(node.value, options)); - } - - case "media-feature-expression": - { - if (!node.nodes) { - return node.value; - } - - return concat$5(["(", concat$5(path.map(print, "nodes")), ")"]); - } - - case "media-feature": - { - return maybeToLowerCase$1(adjustStrings(node.value.replace(/ +/g, " "), options)); - } - - case "media-colon": - { - return concat$5([node.value, " "]); - } - - case "media-value": - { - return adjustNumbers(adjustStrings(node.value, options)); - } - - case "media-keyword": - { - return adjustStrings(node.value, options); - } - - case "media-url": - { - return adjustStrings(node.value.replace(/^url\(\s+/gi, "url(").replace(/\s+\)$/gi, ")"), options); - } - - case "media-unknown": - { - return node.value; - } - // postcss-selector-parser - - case "selector-root": - { - return group$1(concat$5([insideAtRuleNode$1(path, "custom-selector") ? concat$5([getAncestorNode$1(path, "css-atrule").customSelector, line$1]) : "", join$2(concat$5([",", insideAtRuleNode$1(path, ["extend", "custom-selector", "nest"]) ? line$1 : hardline$4]), path.map(print, "nodes"))])); - } - - case "selector-selector": - { - return group$1(indent$2(concat$5(path.map(print, "nodes")))); - } - - case "selector-comment": - { - return node.value; - } - - case "selector-string": - { - return adjustStrings(node.value, options); - } - - case "selector-tag": - { - var _parentNode2 = path.getParentNode(); - - var index = _parentNode2 && _parentNode2.nodes.indexOf(node); - - var prevNode = index && _parentNode2.nodes[index - 1]; - return concat$5([node.namespace ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", prevNode.type === "selector-nesting" ? node.value : adjustNumbers(isHTMLTag$1(node.value) || isKeyframeAtRuleKeywords$1(path, node.value) ? node.value.toLowerCase() : node.value)]); - } - - case "selector-id": - { - return concat$5(["#", node.value]); - } - - case "selector-class": - { - return concat$5([".", adjustNumbers(adjustStrings(node.value, options))]); - } - - case "selector-attribute": - { - return concat$5(["[", node.namespace ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.attribute.trim(), node.operator ? node.operator : "", node.value ? quoteAttributeValue(adjustStrings(node.value.trim(), options), options) : "", node.insensitive ? " i" : "", "]"]); - } - - case "selector-combinator": - { - if (node.value === "+" || node.value === ">" || node.value === "~" || node.value === ">>>") { - var _parentNode3 = path.getParentNode(); - - var _leading = _parentNode3.type === "selector-selector" && _parentNode3.nodes[0] === node ? "" : line$1; - - return concat$5([_leading, node.value, isLastNode$1(path, node) ? "" : " "]); - } - - var leading = node.value.trim().startsWith("(") ? line$1 : ""; - var value = adjustNumbers(adjustStrings(node.value.trim(), options)) || line$1; - return concat$5([leading, value]); - } - - case "selector-universal": - { - return concat$5([node.namespace ? concat$5([node.namespace === true ? "" : node.namespace.trim(), "|"]) : "", node.value]); - } - - case "selector-pseudo": - { - return concat$5([maybeToLowerCase$1(node.value), node.nodes && node.nodes.length > 0 ? concat$5(["(", join$2(", ", path.map(print, "nodes")), ")"]) : ""]); - } - - case "selector-nesting": - { - return node.value; - } - - case "selector-unknown": - { - var ruleAncestorNode = getAncestorNode$1(path, "css-rule"); // Nested SCSS property - - if (ruleAncestorNode && ruleAncestorNode.isSCSSNesterProperty) { - return adjustNumbers(adjustStrings(maybeToLowerCase$1(node.value), options)); - } - - return node.value; - } - // postcss-values-parser - - case "value-value": - case "value-root": - { - return path.call(print, "group"); - } - - case "value-comment": - { - return concat$5([node.inline ? "//" : "/*", node.value, node.inline ? "" : "*/"]); - } - - case "value-comma_group": - { - var _parentNode4 = path.getParentNode(); - - var parentParentNode = path.getParentNode(1); - var declAncestorProp = getPropOfDeclNode$1(path); - var isGridValue = declAncestorProp && _parentNode4.type === "value-value" && (declAncestorProp === "grid" || declAncestorProp.startsWith("grid-template")); - var atRuleAncestorNode = getAncestorNode$1(path, "css-atrule"); - var isControlDirective = atRuleAncestorNode && isSCSSControlDirectiveNode$1(atRuleAncestorNode); - var printed = path.map(print, "groups"); - var _parts = []; - var insideURLFunction = insideValueFunctionNode$1(path, "url"); - var insideSCSSInterpolationInString = false; - var didBreak = false; - - for (var i = 0; i < node.groups.length; ++i) { - _parts.push(printed[i]); // Ignore value inside `url()` - - - if (insideURLFunction) { - continue; - } - - var iPrevNode = node.groups[i - 1]; - var iNode = node.groups[i]; - var iNextNode = node.groups[i + 1]; - var iNextNextNode = node.groups[i + 2]; // Ignore after latest node (i.e. before semicolon) - - if (!iNextNode) { - continue; - } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`) - - - var isStartSCSSInterpolationInString = iNode.type === "value-string" && iNode.value.startsWith("#{"); - var isEndingSCSSInterpolationInString = insideSCSSInterpolationInString && iNextNode.type === "value-string" && iNextNode.value.endsWith("}"); - - if (isStartSCSSInterpolationInString || isEndingSCSSInterpolationInString) { - insideSCSSInterpolationInString = !insideSCSSInterpolationInString; - continue; - } - - if (insideSCSSInterpolationInString) { - continue; - } // Ignore colon (i.e. `:`) - - - if (isColonNode$1(iNode) || isColonNode$1(iNextNode)) { - continue; - } // Ignore `@` in Less (i.e. `@@var;`) - - - if (iNode.type === "value-atword" && iNode.value === "") { - continue; - } // Ignore `~` in Less (i.e. `content: ~"^//* some horrible but needed css hack";`) - - - if (iNode.value === "~") { - continue; - } // Ignore escape `\` - - - if (iNode.value && iNode.value.indexOf("\\") !== -1 && iNextNode && iNextNode.type !== "value-comment") { - continue; - } // Ignore escaped `/` - - - if (iPrevNode && iPrevNode.value && iPrevNode.value.indexOf("\\") === iPrevNode.value.length - 1 && iNode.type === "value-operator" && iNode.value === "/") { - continue; - } // Ignore `\` (i.e. `$variable: \@small;`) - - - if (iNode.value === "\\") { - continue; - } // Ignore `$$` (i.e. `background-color: $$(style)Color;`) - - - if (isPostcssSimpleVarNode$1(iNode, iNextNode)) { - continue; - } // Ignore spaces after `#` and after `{` and before `}` in SCSS interpolation (i.e. `#{variable}`) - - - if (isHashNode$1(iNode) || isLeftCurlyBraceNode$1(iNode) || isRightCurlyBraceNode$1(iNextNode) || isLeftCurlyBraceNode$1(iNextNode) && hasEmptyRawBefore$1(iNextNode) || isRightCurlyBraceNode$1(iNode) && hasEmptyRawBefore$1(iNextNode)) { - continue; - } // Ignore css variables and interpolation in SCSS (i.e. `--#{$var}`) - - - if (iNode.value === "--" && isHashNode$1(iNextNode)) { - continue; - } // Formatting math operations - - - var isMathOperator = isMathOperatorNode$1(iNode); - var isNextMathOperator = isMathOperatorNode$1(iNextNode); // Print spaces before and after math operators beside SCSS interpolation as is - // (i.e. `#{$var}+5`, `#{$var} +5`, `#{$var}+ 5`, `#{$var} + 5`) - // (i.e. `5+#{$var}`, `5 +#{$var}`, `5+ #{$var}`, `5 + #{$var}`) - - if ((isMathOperator && isHashNode$1(iNextNode) || isNextMathOperator && isRightCurlyBraceNode$1(iNode)) && hasEmptyRawBefore$1(iNextNode)) { - continue; - } // Print spaces before and after addition and subtraction math operators as is in `calc` function - // due to the fact that it is not valid syntax - // (i.e. `calc(1px+1px)`, `calc(1px+ 1px)`, `calc(1px +1px)`, `calc(1px + 1px)`) - - - if (insideValueFunctionNode$1(path, "calc") && (isAdditionNode$1(iNode) || isAdditionNode$1(iNextNode) || isSubtractionNode$1(iNode) || isSubtractionNode$1(iNextNode)) && hasEmptyRawBefore$1(iNextNode)) { - continue; - } // Print spaces after `+` and `-` in color adjuster functions as is (e.g. `color(red l(+ 20%))`) - // Adjusters with signed numbers (e.g. `color(red l(+20%))`) output as-is. - - - var isColorAdjusterNode = (isAdditionNode$1(iNode) || isSubtractionNode$1(iNode)) && i === 0 && (iNextNode.type === "value-number" || iNextNode.isHex) && parentParentNode && isColorAdjusterFuncNode$1(parentParentNode) && !hasEmptyRawBefore$1(iNextNode); - var requireSpaceBeforeOperator = iNextNextNode && iNextNextNode.type === "value-func" || iNextNextNode && isWordNode$1(iNextNextNode) || iNode.type === "value-func" || isWordNode$1(iNode); - var requireSpaceAfterOperator = iNextNode.type === "value-func" || isWordNode$1(iNextNode) || iPrevNode && iPrevNode.type === "value-func" || iPrevNode && isWordNode$1(iPrevNode); // Formatting `/`, `+`, `-` sign - - if (!(isMultiplicationNode$1(iNextNode) || isMultiplicationNode$1(iNode)) && !insideValueFunctionNode$1(path, "calc") && !isColorAdjusterNode && (isDivisionNode$1(iNextNode) && !requireSpaceBeforeOperator || isDivisionNode$1(iNode) && !requireSpaceAfterOperator || isAdditionNode$1(iNextNode) && !requireSpaceBeforeOperator || isAdditionNode$1(iNode) && !requireSpaceAfterOperator || isSubtractionNode$1(iNextNode) || isSubtractionNode$1(iNode)) && (hasEmptyRawBefore$1(iNextNode) || isMathOperator && (!iPrevNode || iPrevNode && isMathOperatorNode$1(iPrevNode)))) { - continue; - } // Add `hardline` after inline comment (i.e. `// comment\n foo: bar;`) - - - if (isInlineValueCommentNode$1(iNode)) { - _parts.push(hardline$4); - - continue; - } // Handle keywords in SCSS control directive - - - if (isControlDirective && (isEqualityOperatorNode$1(iNextNode) || isRelationalOperatorNode$1(iNextNode) || isIfElseKeywordNode$1(iNextNode) || isEachKeywordNode$1(iNode) || isForKeywordNode$1(iNode))) { - _parts.push(" "); - - continue; - } // At-rule `namespace` should be in one line - - - if (atRuleAncestorNode && atRuleAncestorNode.name.toLowerCase() === "namespace") { - _parts.push(" "); - - continue; - } // Formatting `grid` property - - - if (isGridValue) { - if (iNode.source && iNextNode.source && iNode.source.start.line !== iNextNode.source.start.line) { - _parts.push(hardline$4); - - didBreak = true; - } else { - _parts.push(" "); - } - - continue; - } // Add `space` before next math operation - // Note: `grip` property have `/` delimiter and it is not math operation, so - // `grid` property handles above - - - if (isNextMathOperator) { - _parts.push(" "); - - continue; - } // Be default all values go through `line` - - - _parts.push(line$1); - } - - if (didBreak) { - _parts.unshift(hardline$4); - } - - if (isControlDirective) { - return group$1(indent$2(concat$5(_parts))); - } // Indent is not needed for import url when url is very long - // and node has two groups - // when type is value-comma_group - // example @import url("verylongurl") projection,tv - - - if (insideURLFunctionInImportAtRuleNode$1(path)) { - return group$1(fill$2(_parts)); - } - - return group$1(indent$2(fill$2(_parts))); - } - - case "value-paren_group": - { - var _parentNode5 = path.getParentNode(); - - if (_parentNode5 && isURLFunctionNode$1(_parentNode5) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) { - return concat$5([node.open ? path.call(print, "open") : "", join$2(",", path.map(print, "groups")), node.close ? path.call(print, "close") : ""]); - } - - if (!node.open) { - var _printed = path.map(print, "groups"); - - var res = []; - - for (var _i = 0; _i < _printed.length; _i++) { - if (_i !== 0) { - res.push(concat$5([",", line$1])); - } - - res.push(_printed[_i]); - } - - return group$1(indent$2(fill$2(res))); - } - - var isSCSSMapItem = isSCSSMapItemNode$1(path); - return group$1(concat$5([node.open ? path.call(print, "open") : "", indent$2(concat$5([softline$1, join$2(concat$5([",", line$1]), path.map(function (childPath) { - var node = childPath.getValue(); - var printed = print(childPath); // Key/Value pair in open paren already indented - - if (isKeyValuePairNode$1(node) && node.type === "value-comma_group" && node.groups && node.groups[2] && node.groups[2].type === "value-paren_group") { - printed.contents.contents.parts[1] = group$1(printed.contents.contents.parts[1]); - return group$1(dedent$1(printed)); - } - - return printed; - }, "groups"))])), ifBreak$1(isSCSS$1(options.parser, options.originalText) && isSCSSMapItem && shouldPrintComma(options) ? "," : ""), softline$1, node.close ? path.call(print, "close") : ""]), { - shouldBreak: isSCSSMapItem - }); - } - - case "value-func": - { - return concat$5([node.value, insideAtRuleNode$1(path, "supports") && isMediaAndSupportsKeywords$1(node) ? " " : "", path.call(print, "group")]); - } - - case "value-paren": - { - return node.value; - } - - case "value-number": - { - return concat$5([printCssNumber(node.value), maybeToLowerCase$1(node.unit)]); - } - - case "value-operator": - { - return node.value; - } - - case "value-word": - { - if (node.isColor && node.isHex || isWideKeywords$1(node.value)) { - return node.value.toLowerCase(); - } - - return node.value; - } - - case "value-colon": - { - return concat$5([node.value, // Don't add spaces on `:` in `url` function (i.e. `url(fbglyph: cross-outline, fig-white)`) - insideValueFunctionNode$1(path, "url") ? "" : line$1]); - } - - case "value-comma": - { - return concat$5([node.value, " "]); - } - - case "value-string": - { - return printString$1(node.raws.quote + node.value + node.raws.quote, options); - } - - case "value-atword": - { - return concat$5(["@", node.value]); - } - - case "value-unicode-range": - { - return node.value; - } - - case "value-unknown": - { - return node.value; - } - - default: - /* istanbul ignore next */ - throw new Error("Unknown postcss type ".concat(JSON.stringify(node.type))); - } - } - - function printNodeSequence(path, options, print) { - var node = path.getValue(); - var parts = []; - var i = 0; - path.map(function (pathChild) { - var prevNode = node.nodes[i - 1]; - - if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") { - var childNode = pathChild.getValue(); - parts.push(options.originalText.slice(options.locStart(childNode), options.locEnd(childNode))); - } else { - parts.push(pathChild.call(print)); - } - - if (i !== node.nodes.length - 1) { - if (node.nodes[i + 1].type === "css-comment" && !hasNewline$2(options.originalText, options.locStart(node.nodes[i + 1]), { - backwards: true - }) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml" || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else" && node.nodes[i].type !== "css-comment") { - parts.push(" "); - } else { - parts.push(hardline$4); - - if (isNextLineEmpty$2(options.originalText, pathChild.getValue(), options) && node.nodes[i].type !== "yaml" && node.nodes[i].type !== "toml") { - parts.push(hardline$4); - } - } - } - - i++; - }, "nodes"); - return concat$5(parts); - } - - var STRING_REGEX$1 = /(['"])(?:(?!\1)[^\\]|\\[\s\S])*\1/g; - var NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g; - var STANDARD_UNIT_REGEX = /[a-zA-Z]+/g; - var WORD_PART_REGEX = /[$@]?[a-zA-Z_\u0080-\uFFFF][\w\-\u0080-\uFFFF]*/g; - var ADJUST_NUMBERS_REGEX = RegExp(STRING_REGEX$1.source + "|" + "(".concat(WORD_PART_REGEX.source, ")?") + "(".concat(NUMBER_REGEX.source, ")") + "(".concat(STANDARD_UNIT_REGEX.source, ")?"), "g"); - - function adjustStrings(value, options) { - return value.replace(STRING_REGEX$1, function (match) { - return printString$1(match, options); - }); - } - - function quoteAttributeValue(value, options) { - var quote = options.singleQuote ? "'" : '"'; - return value.includes('"') || value.includes("'") ? value : quote + value + quote; - } - - function adjustNumbers(value) { - return value.replace(ADJUST_NUMBERS_REGEX, function (match, quote, wordPart, number, unit) { - return !wordPart && number ? (wordPart || "") + printCssNumber(number) + maybeToLowerCase$1(unit || "") : match; - }); - } - - function printCssNumber(rawNumber) { - return printNumber$1(rawNumber) // Remove trailing `.0`. - .replace(/\.0(?=$|e)/, ""); - } - - var printerPostcss = { - print: genericPrint, - embed: embed_1, - insertPragma: insertPragma$2, - hasPrettierIgnore: hasIgnoreComment$1, - massageAstNode: clean_1 - }; - - var CATEGORY_COMMON = "Common"; // format based on https://github.com/prettier/prettier/blob/master/src/main/core-options.js - - var commonOptions = { - bracketSpacing: { - since: "0.0.0", - category: CATEGORY_COMMON, - type: "boolean", - default: true, - description: "Print spaces between brackets.", - oppositeDescription: "Do not print spaces between brackets." - }, - singleQuote: { - since: "0.0.0", - category: CATEGORY_COMMON, - type: "boolean", - default: false, - description: "Use single quotes instead of double quotes." - }, - proseWrap: { - since: "1.8.2", - category: CATEGORY_COMMON, - type: "choice", - default: [{ - since: "1.8.2", - value: true - }, { - since: "1.9.0", - value: "preserve" - }], - description: "How to wrap prose.", - choices: [{ - since: "1.9.0", - value: "always", - description: "Wrap prose if it exceeds the print width." - }, { - since: "1.9.0", - value: "never", - description: "Do not wrap prose." - }, { - since: "1.9.0", - value: "preserve", - description: "Wrap prose as-is." - }, { - value: false, - deprecated: "1.9.0", - redirect: "never" - }, { - value: true, - deprecated: "1.9.0", - redirect: "always" - }] - } - }; - - var options$2 = { - singleQuote: commonOptions.singleQuote - }; - - var createLanguage = function createLanguage(linguistData, transform) { - var language = {}; - - for (var key in linguistData) { - var newKey = key === "languageId" ? "linguistLanguageId" : key; - language[newKey] = linguistData[key]; - } - - return transform(language); - }; - - var name$1 = "CSS"; - var type = "markup"; - var tmScope = "source.css"; - var aceMode = "css"; - var codemirrorMode = "css"; - var codemirrorMimeType = "text/css"; - var color = "#563d7c"; - var extensions = [ - ".css" - ]; - var languageId = 50; - var CSS = { - name: name$1, - type: type, - tmScope: tmScope, - aceMode: aceMode, - codemirrorMode: codemirrorMode, - codemirrorMimeType: codemirrorMimeType, - color: color, - extensions: extensions, - languageId: languageId - }; - - var CSS$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name$1, - type: type, - tmScope: tmScope, - aceMode: aceMode, - codemirrorMode: codemirrorMode, - codemirrorMimeType: codemirrorMimeType, - color: color, - extensions: extensions, - languageId: languageId, - 'default': CSS - }); - - var name$2 = "PostCSS"; - var type$1 = "markup"; - var tmScope$1 = "source.postcss"; - var group$2 = "CSS"; - var extensions$1 = [ - ".pcss" - ]; - var aceMode$1 = "text"; - var languageId$1 = 262764437; - var PostCSS = { - name: name$2, - type: type$1, - tmScope: tmScope$1, - group: group$2, - extensions: extensions$1, - aceMode: aceMode$1, - languageId: languageId$1 - }; - - var PostCSS$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name$2, - type: type$1, - tmScope: tmScope$1, - group: group$2, - extensions: extensions$1, - aceMode: aceMode$1, - languageId: languageId$1, - 'default': PostCSS - }); - - var name$3 = "Less"; - var type$2 = "markup"; - var group$3 = "CSS"; - var extensions$2 = [ - ".less" - ]; - var tmScope$2 = "source.css.less"; - var aceMode$2 = "less"; - var codemirrorMode$1 = "css"; - var codemirrorMimeType$1 = "text/css"; - var languageId$2 = 198; - var Less = { - name: name$3, - type: type$2, - group: group$3, - extensions: extensions$2, - tmScope: tmScope$2, - aceMode: aceMode$2, - codemirrorMode: codemirrorMode$1, - codemirrorMimeType: codemirrorMimeType$1, - languageId: languageId$2 - }; - - var Less$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name$3, - type: type$2, - group: group$3, - extensions: extensions$2, - tmScope: tmScope$2, - aceMode: aceMode$2, - codemirrorMode: codemirrorMode$1, - codemirrorMimeType: codemirrorMimeType$1, - languageId: languageId$2, - 'default': Less - }); - - var name$4 = "SCSS"; - var type$3 = "markup"; - var tmScope$3 = "source.css.scss"; - var group$4 = "CSS"; - var aceMode$3 = "scss"; - var codemirrorMode$2 = "css"; - var codemirrorMimeType$2 = "text/x-scss"; - var extensions$3 = [ - ".scss" - ]; - var languageId$3 = 329; - var SCSS = { - name: name$4, - type: type$3, - tmScope: tmScope$3, - group: group$4, - aceMode: aceMode$3, - codemirrorMode: codemirrorMode$2, - codemirrorMimeType: codemirrorMimeType$2, - extensions: extensions$3, - languageId: languageId$3 - }; - - var SCSS$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name$4, - type: type$3, - tmScope: tmScope$3, - group: group$4, - aceMode: aceMode$3, - codemirrorMode: codemirrorMode$2, - codemirrorMimeType: codemirrorMimeType$2, - extensions: extensions$3, - languageId: languageId$3, - 'default': SCSS - }); - - var require$$0$2 = getCjsExportFromNamespace(CSS$1); - - var require$$1 = getCjsExportFromNamespace(PostCSS$1); - - var require$$2 = getCjsExportFromNamespace(Less$1); - - var require$$3 = getCjsExportFromNamespace(SCSS$1); - - var languages = [createLanguage(require$$0$2, function (data) { - return Object.assign(data, { - since: "1.4.0", - parsers: ["css"], - vscodeLanguageIds: ["css"] - }); - }), createLanguage(require$$1, function (data) { - return Object.assign(data, { - since: "1.4.0", - parsers: ["css"], - vscodeLanguageIds: ["postcss"], - extensions: data.extensions.concat(".postcss") - }); - }), createLanguage(require$$2, function (data) { - return Object.assign(data, { - since: "1.4.0", - parsers: ["less"], - vscodeLanguageIds: ["less"] - }); - }), createLanguage(require$$3, function (data) { - return Object.assign(data, { - since: "1.4.0", - parsers: ["scss"], - vscodeLanguageIds: ["scss"] - }); - })]; - var printers = { - postcss: printerPostcss - }; - var languageCss = { - languages: languages, - options: options$2, - printers: printers - }; - - function hasPragma$2(text) { - return /^\s*#[^\n\S]*@(format|prettier)\s*(\n|$)/.test(text); - } - - function insertPragma$3(text) { - return "# @format\n\n" + text; - } - - var pragma$2 = { - hasPragma: hasPragma$2, - insertPragma: insertPragma$3 - }; - - var _require$$0$builders$2 = doc.builders, - concat$6 = _require$$0$builders$2.concat, - join$3 = _require$$0$builders$2.join, - hardline$5 = _require$$0$builders$2.hardline, - line$2 = _require$$0$builders$2.line, - softline$2 = _require$$0$builders$2.softline, - group$5 = _require$$0$builders$2.group, - indent$3 = _require$$0$builders$2.indent, - ifBreak$2 = _require$$0$builders$2.ifBreak; - var hasIgnoreComment$2 = util.hasIgnoreComment; - var isNextLineEmpty$3 = utilShared.isNextLineEmpty; - var insertPragma$4 = pragma$2.insertPragma; - - function genericPrint$1(path, options, print) { - var n = path.getValue(); - - if (!n) { - return ""; - } - - if (typeof n === "string") { - return n; - } - - switch (n.kind) { - case "Document": - { - var parts = []; - path.map(function (pathChild, index) { - parts.push(concat$6([pathChild.call(print)])); - - if (index !== n.definitions.length - 1) { - parts.push(hardline$5); - - if (isNextLineEmpty$3(options.originalText, pathChild.getValue(), options)) { - parts.push(hardline$5); - } - } - }, "definitions"); - return concat$6([concat$6(parts), hardline$5]); - } - - case "OperationDefinition": - { - var hasOperation = options.originalText[options.locStart(n)] !== "{"; - var hasName = !!n.name; - return concat$6([hasOperation ? n.operation : "", hasOperation && hasName ? concat$6([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? !hasOperation && !hasName ? "" : " " : "", path.call(print, "selectionSet")]); - } - - case "FragmentDefinition": - { - return concat$6(["fragment ", path.call(print, "name"), n.variableDefinitions && n.variableDefinitions.length ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]); - } - - case "SelectionSet": - { - return concat$6(["{", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (selectionsPath) { - return printSequence(selectionsPath, options, print); - }, "selections"))])), hardline$5, "}"]); - } - - case "Field": - { - return group$5(concat$6([n.alias ? concat$6([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { - return printSequence(argsPath, options, print); - }, "arguments"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")])); - } - - case "Name": - { - return n.value; - } - - case "StringValue": - { - if (n.block) { - return concat$6(['"""', hardline$5, join$3(hardline$5, n.value.replace(/"""/g, "\\$&").split("\n")), hardline$5, '"""']); - } - - return concat$6(['"', n.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"']); - } - - case "IntValue": - case "FloatValue": - case "EnumValue": - { - return n.value; - } - - case "BooleanValue": - { - return n.value ? "true" : "false"; - } - - case "NullValue": - { - return "null"; - } - - case "Variable": - { - return concat$6(["$", path.call(print, "name")]); - } - - case "ListValue": - { - return group$5(concat$6(["[", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "values"))])), softline$2, "]"])); - } - - case "ObjectValue": - { - return group$5(concat$6(["{", options.bracketSpacing && n.fields.length > 0 ? " " : "", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.map(print, "fields"))])), softline$2, ifBreak$2("", options.bracketSpacing && n.fields.length > 0 ? " " : ""), "}"])); - } - - case "ObjectField": - case "Argument": - { - return concat$6([path.call(print, "name"), ": ", path.call(print, "value")]); - } - - case "Directive": - { - return concat$6(["@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { - return printSequence(argsPath, options, print); - }, "arguments"))])), softline$2, ")"])) : ""]); - } - - case "NamedType": - { - return path.call(print, "name"); - } - - case "VariableDefinition": - { - return concat$6([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]); - } - - case "TypeExtensionDefinition": - { - return concat$6(["extend ", path.call(print, "definition")]); - } - - case "ObjectTypeExtension": - case "ObjectTypeDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ObjectTypeExtension" ? "extend " : "", "type ", path.call(print, "name"), n.interfaces.length > 0 ? concat$6([" implements ", join$3(determineInterfaceSeparator(options.originalText.substr(options.locStart(n), options.locEnd(n))), path.map(print, "interfaces"))]) : "", printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) { - return printSequence(fieldsPath, options, print); - }, "fields"))])), hardline$5, "}"]) : ""]); - } - - case "FieldDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { - return printSequence(argsPath, options, print); - }, "arguments"))])), softline$2, ")"])) : "", ": ", path.call(print, "type"), printDirectives(path, print, n)]); - } - - case "DirectiveDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", "directive ", "@", path.call(print, "name"), n.arguments.length > 0 ? group$5(concat$6(["(", indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", ", "), softline$2]), path.call(function (argsPath) { - return printSequence(argsPath, options, print); - }, "arguments"))])), softline$2, ")"])) : "", concat$6([" on ", join$3(" | ", path.map(print, "locations"))])]); - } - - case "EnumTypeExtension": - case "EnumTypeDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "EnumTypeExtension" ? "extend " : "", "enum ", path.call(print, "name"), printDirectives(path, print, n), n.values.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (valuesPath) { - return printSequence(valuesPath, options, print); - }, "values"))])), hardline$5, "}"]) : ""]); - } - - case "EnumValueDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", path.call(print, "name"), printDirectives(path, print, n)]); - } - - case "InputValueDefinition": - { - return concat$6([path.call(print, "description"), n.description ? n.description.block ? hardline$5 : line$2 : "", path.call(print, "name"), ": ", path.call(print, "type"), n.defaultValue ? concat$6([" = ", path.call(print, "defaultValue")]) : "", printDirectives(path, print, n)]); - } - - case "InputObjectTypeExtension": - case "InputObjectTypeDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) { - return printSequence(fieldsPath, options, print); - }, "fields"))])), hardline$5, "}"]) : ""]); - } - - case "SchemaDefinition": - { - return concat$6(["schema", printDirectives(path, print, n), " {", n.operationTypes.length > 0 ? indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (opsPath) { - return printSequence(opsPath, options, print); - }, "operationTypes"))])) : "", hardline$5, "}"]); - } - - case "OperationTypeDefinition": - { - return concat$6([path.call(print, "operation"), ": ", path.call(print, "type")]); - } - - case "InterfaceTypeExtension": - case "InterfaceTypeDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", path.call(print, "name"), printDirectives(path, print, n), n.fields.length > 0 ? concat$6([" {", indent$3(concat$6([hardline$5, join$3(hardline$5, path.call(function (fieldsPath) { - return printSequence(fieldsPath, options, print); - }, "fields"))])), hardline$5, "}"]) : ""]); - } - - case "FragmentSpread": - { - return concat$6(["...", path.call(print, "name"), printDirectives(path, print, n)]); - } - - case "InlineFragment": - { - return concat$6(["...", n.typeCondition ? concat$6([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]); - } - - case "UnionTypeExtension": - case "UnionTypeDefinition": - { - return group$5(concat$6([path.call(print, "description"), n.description ? hardline$5 : "", group$5(concat$6([n.kind === "UnionTypeExtension" ? "extend " : "", "union ", path.call(print, "name"), printDirectives(path, print, n), n.types.length > 0 ? concat$6([" =", ifBreak$2("", " "), indent$3(concat$6([ifBreak$2(concat$6([line$2, " "])), join$3(concat$6([line$2, "| "]), path.map(print, "types"))]))]) : ""]))])); - } - - case "ScalarTypeExtension": - case "ScalarTypeDefinition": - { - return concat$6([path.call(print, "description"), n.description ? hardline$5 : "", n.kind === "ScalarTypeExtension" ? "extend " : "", "scalar ", path.call(print, "name"), printDirectives(path, print, n)]); - } - - case "NonNullType": - { - return concat$6([path.call(print, "type"), "!"]); - } - - case "ListType": - { - return concat$6(["[", path.call(print, "type"), "]"]); - } - - default: - /* istanbul ignore next */ - throw new Error("unknown graphql type: " + JSON.stringify(n.kind)); - } - } - - function printDirectives(path, print, n) { - if (n.directives.length === 0) { - return ""; - } - - return concat$6([" ", group$5(indent$3(concat$6([softline$2, join$3(concat$6([ifBreak$2("", " "), softline$2]), path.map(print, "directives"))])))]); - } - - function printSequence(sequencePath, options, print) { - var count = sequencePath.getValue().length; - return sequencePath.map(function (path, i) { - var printed = print(path); - - if (isNextLineEmpty$3(options.originalText, path.getValue(), options) && i < count - 1) { - return concat$6([printed, hardline$5]); - } - - return printed; - }); - } - - function canAttachComment(node) { - return node.kind && node.kind !== "Comment"; - } - - function printComment$1(commentPath) { - var comment = commentPath.getValue(); - - if (comment.kind === "Comment") { - return "#" + comment.value.trimRight(); - } - - throw new Error("Not a comment: " + JSON.stringify(comment)); - } - - function determineInterfaceSeparator(originalSource) { - var start = originalSource.indexOf("implements"); - - if (start === -1) { - throw new Error("Must implement interfaces: " + originalSource); - } - - var end = originalSource.indexOf("{"); - - if (end === -1) { - end = originalSource.length; - } - - return originalSource.substr(start, end).includes("&") ? " & " : ", "; - } - - function clean$1(node, newNode - /*, parent*/ - ) { - delete newNode.loc; - delete newNode.comments; - } - - var printerGraphql = { - print: genericPrint$1, - massageAstNode: clean$1, - hasPrettierIgnore: hasIgnoreComment$2, - insertPragma: insertPragma$4, - printComment: printComment$1, - canAttachComment: canAttachComment - }; - - var options$3 = { - bracketSpacing: commonOptions.bracketSpacing - }; - - var name$5 = "GraphQL"; - var type$4 = "data"; - var extensions$4 = [ - ".graphql", - ".gql", - ".graphqls" - ]; - var tmScope$4 = "source.graphql"; - var aceMode$4 = "text"; - var languageId$4 = 139; - var GraphQL = { - name: name$5, - type: type$4, - extensions: extensions$4, - tmScope: tmScope$4, - aceMode: aceMode$4, - languageId: languageId$4 - }; - - var GraphQL$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name$5, - type: type$4, - extensions: extensions$4, - tmScope: tmScope$4, - aceMode: aceMode$4, - languageId: languageId$4, - 'default': GraphQL - }); - - var require$$0$3 = getCjsExportFromNamespace(GraphQL$1); - - var languages$1 = [createLanguage(require$$0$3, function (data) { - return Object.assign(data, { - since: "1.5.0", - parsers: ["graphql"], - vscodeLanguageIds: ["graphql"] - }); - })]; - var printers$1 = { - graphql: printerGraphql - }; - var languageGraphql = { - languages: languages$1, - options: options$3, - printers: printers$1 - }; - - var _require$$0$builders$3 = doc.builders, - concat$7 = _require$$0$builders$3.concat, - join$4 = _require$$0$builders$3.join, - softline$3 = _require$$0$builders$3.softline, - hardline$6 = _require$$0$builders$3.hardline, - line$3 = _require$$0$builders$3.line, - group$6 = _require$$0$builders$3.group, - indent$4 = _require$$0$builders$3.indent, - ifBreak$3 = _require$$0$builders$3.ifBreak; // http://w3c.github.io/html/single-page.html#void-elements - - var voidTags = ["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]; // Formatter based on @glimmerjs/syntax's built-in test formatter: - // https://github.com/glimmerjs/glimmer-vm/blob/master/packages/%40glimmer/syntax/lib/generation/print.ts - - function printChildren(path, options, print) { - return concat$7(path.map(function (childPath, childIndex) { - var childNode = path.getValue(); - var isFirstNode = childIndex === 0; - var isLastNode = childIndex == path.getParentNode(0).children.length - 1; - var isLastNodeInMultiNodeList = isLastNode && !isFirstNode; - var isWhitespace = isWhitespaceNode(childNode); - - if (isWhitespace && isLastNodeInMultiNodeList) { - return print(childPath, options, print); - } else if (isFirstNode) { - return concat$7([softline$3, print(childPath, options, print)]); - } - - return print(childPath, options, print); - }, "children")); - } - - function print(path, options, print) { - var n = path.getValue(); - /* istanbul ignore if*/ - - if (!n) { - return ""; - } - - switch (n.type) { - case "Block": - case "Program": - case "Template": - { - return group$6(concat$7(path.map(print, "body").filter(function (text) { - return text !== ""; - }))); - } - - case "ElementNode": - { - var tagFirstChar = n.tag[0]; - var isLocal = n.tag.indexOf(".") !== -1; - var isGlimmerComponent = tagFirstChar.toUpperCase() === tagFirstChar || isLocal; - var hasChildren = n.children.length > 0; - var hasNonWhitespaceChildren = n.children.some(function (n) { - return !isWhitespaceNode(n); - }); - var isVoid = isGlimmerComponent && (!hasChildren || !hasNonWhitespaceChildren) || voidTags.indexOf(n.tag) !== -1; - var closeTagForNoBreak = isVoid ? concat$7([" />", softline$3]) : ">"; - var closeTagForBreak = isVoid ? "/>" : ">"; - - var _getParams = function _getParams(path, print) { - return indent$4(concat$7([n.attributes.length ? line$3 : "", join$4(line$3, path.map(print, "attributes")), n.modifiers.length ? line$3 : "", join$4(line$3, path.map(print, "modifiers")), n.comments.length ? line$3 : "", join$4(line$3, path.map(print, "comments"))])); - }; - - var nextNode = getNextNode(path); - return concat$7([group$6(concat$7(["<", n.tag, _getParams(path, print), n.blockParams.length ? " as |".concat(n.blockParams.join(" "), "|") : "", ifBreak$3(softline$3, ""), ifBreak$3(closeTagForBreak, closeTagForNoBreak)])), !isVoid ? group$6(concat$7([hasNonWhitespaceChildren ? indent$4(printChildren(path, options, print)) : "", ifBreak$3(hasChildren ? hardline$6 : "", ""), concat$7([""])])) : "", nextNode && nextNode.type === "ElementNode" ? hardline$6 : ""]); - } - - case "BlockStatement": - { - var pp = path.getParentNode(1); - var isElseIf = pp && pp.inverse && pp.inverse.body.length === 1 && pp.inverse.body[0] === n && pp.inverse.body[0].path.parts[0] === "if"; - var hasElseIf = n.inverse && n.inverse.body.length === 1 && n.inverse.body[0].type === "BlockStatement" && n.inverse.body[0].path.parts[0] === "if"; - var indentElse = hasElseIf ? function (a) { - return a; - } : indent$4; - - if (n.inverse) { - return concat$7([isElseIf ? concat$7(["{{else ", printPathParams(path, print), "}}"]) : printOpenBlock(path, print), indent$4(concat$7([hardline$6, path.call(print, "program")])), n.inverse && !hasElseIf ? concat$7([hardline$6, "{{else}}"]) : "", n.inverse ? indentElse(concat$7([hardline$6, path.call(print, "inverse")])) : "", isElseIf ? "" : concat$7([hardline$6, printCloseBlock(path, print)])]); - } else if (isElseIf) { - return concat$7([concat$7(["{{else ", printPathParams(path, print), "}}"]), indent$4(concat$7([hardline$6, path.call(print, "program")]))]); - } - - var _hasNonWhitespaceChildren = n.program.body.some(function (n) { - return !isWhitespaceNode(n); - }); - - return concat$7([printOpenBlock(path, print), group$6(concat$7([indent$4(concat$7([softline$3, path.call(print, "program")])), _hasNonWhitespaceChildren ? hardline$6 : softline$3, printCloseBlock(path, print)]))]); - } - - case "ElementModifierStatement": - case "MustacheStatement": - { - var _pp = path.getParentNode(1); - - var isConcat = _pp && _pp.type === "ConcatStatement"; - return group$6(concat$7([n.escaped === false ? "{{{" : "{{", printPathParams(path, print, { - group: false - }), isConcat ? "" : softline$3, n.escaped === false ? "}}}" : "}}"])); - } - - case "SubExpression": - { - var params = getParams(path, print); - var printedParams = params.length > 0 ? indent$4(concat$7([line$3, group$6(join$4(line$3, params))])) : ""; - return group$6(concat$7(["(", printPath(path, print), printedParams, softline$3, ")"])); - } - - case "AttrNode": - { - var isText = n.value.type === "TextNode"; - - if (isText && n.value.loc.start.column === n.value.loc.end.column) { - return concat$7([n.name]); - } - - var value = path.call(print, "value"); - var quotedValue = isText ? printStringLiteral(value.parts.join(), options) : value; - return concat$7([n.name, "=", quotedValue]); - } - - case "ConcatStatement": - { - return concat$7(['"', group$6(indent$4(join$4(softline$3, path.map(function (partPath) { - return print(partPath); - }, "parts").filter(function (a) { - return a !== ""; - })))), '"']); - } - - case "Hash": - { - return concat$7([join$4(line$3, path.map(print, "pairs"))]); - } - - case "HashPair": - { - return concat$7([n.key, "=", path.call(print, "value")]); - } - - case "TextNode": - { - var maxLineBreaksToPreserve = 2; - var isFirstElement = !getPreviousNode(path); - var isLastElement = !getNextNode(path); - var isWhitespaceOnly = !/\S/.test(n.chars); - var lineBreaksCount = countNewLines(n.chars); - var hasBlockParent = path.getParentNode(0).type === "Block"; - var hasElementParent = path.getParentNode(0).type === "ElementNode"; - var hasTemplateParent = path.getParentNode(0).type === "Template"; - var leadingLineBreaksCount = countLeadingNewLines(n.chars); - var trailingLineBreaksCount = countTrailingNewLines(n.chars); - - if ((isFirstElement || isLastElement) && isWhitespaceOnly && (hasBlockParent || hasElementParent || hasTemplateParent)) { - return ""; - } - - if (isWhitespaceOnly && lineBreaksCount) { - leadingLineBreaksCount = Math.min(lineBreaksCount, maxLineBreaksToPreserve); - trailingLineBreaksCount = 0; - } else { - if (isNextNodeOfType(path, "ElementNode") || isNextNodeOfType(path, "BlockStatement")) { - trailingLineBreaksCount = Math.max(trailingLineBreaksCount, 1); - } - - if (isPreviousNodeOfSomeType(path, ["ElementNode"]) || isPreviousNodeOfSomeType(path, ["BlockStatement"])) { - leadingLineBreaksCount = Math.max(leadingLineBreaksCount, 1); - } - } - - var leadingSpace = ""; - var trailingSpace = ""; // preserve a space inside of an attribute node where whitespace present, - // when next to mustache statement. - - var inAttrNode = path.stack.indexOf("attributes") >= 0; - - if (inAttrNode) { - var parentNode = path.getParentNode(0); - - var _isConcat = parentNode.type === "ConcatStatement"; - - if (_isConcat) { - var parts = parentNode.parts; - var partIndex = parts.indexOf(n); - - if (partIndex > 0) { - var partType = parts[partIndex - 1].type; - var isMustache = partType === "MustacheStatement"; - - if (isMustache) { - leadingSpace = " "; - } - } - - if (partIndex < parts.length - 1) { - var _partType = parts[partIndex + 1].type; - - var _isMustache = _partType === "MustacheStatement"; - - if (_isMustache) { - trailingSpace = " "; - } - } - } - } else { - if (trailingLineBreaksCount === 0 && isNextNodeOfType(path, "MustacheStatement")) { - trailingSpace = " "; - } - - if (leadingLineBreaksCount === 0 && isPreviousNodeOfSomeType(path, ["MustacheStatement"])) { - leadingSpace = " "; - } - - if (isFirstElement) { - leadingLineBreaksCount = 0; - leadingSpace = ""; - } - - if (isLastElement) { - trailingLineBreaksCount = 0; - trailingSpace = ""; - } - } - - return concat$7([].concat(_toConsumableArray(generateHardlines(leadingLineBreaksCount, maxLineBreaksToPreserve)), [n.chars.replace(/^[\s ]+/g, leadingSpace).replace(/[\s ]+$/, trailingSpace)], _toConsumableArray(generateHardlines(trailingLineBreaksCount, maxLineBreaksToPreserve))).filter(Boolean)); - } - - case "MustacheCommentStatement": - { - var dashes = n.value.indexOf("}}") > -1 ? "--" : ""; - return concat$7(["{{!", dashes, n.value, dashes, "}}"]); - } - - case "PathExpression": - { - return n.original; - } - - case "BooleanLiteral": - { - return String(n.value); - } - - case "CommentStatement": - { - return concat$7([""]); - } - - case "StringLiteral": - { - return printStringLiteral(n.value, options); - } - - case "NumberLiteral": - { - return String(n.value); - } - - case "UndefinedLiteral": - { - return "undefined"; - } - - case "NullLiteral": - { - return "null"; - } - - /* istanbul ignore next */ - - default: - throw new Error("unknown glimmer type: " + JSON.stringify(n.type)); - } - } - /** - * Prints a string literal with the correct surrounding quotes based on - * `options.singleQuote` and the number of escaped quotes contained in - * the string literal. This function is the glimmer equivalent of `printString` - * in `common/util`, but has differences because of the way escaped characters - * are treated in hbs string literals. - * @param {string} stringLiteral - the string literal value - * @param {object} options - the prettier options object - */ - - - function printStringLiteral(stringLiteral, options) { - var double = { - quote: '"', - regex: /"/g - }; - var single = { - quote: "'", - regex: /'/g - }; - var preferred = options.singleQuote ? single : double; - var alternate = preferred === single ? double : single; - var shouldUseAlternateQuote = false; // If `stringLiteral` contains at least one of the quote preferred for - // enclosing the string, we might want to enclose with the alternate quote - // instead, to minimize the number of escaped quotes. - - if (stringLiteral.includes(preferred.quote) || stringLiteral.includes(alternate.quote)) { - var numPreferredQuotes = (stringLiteral.match(preferred.regex) || []).length; - var numAlternateQuotes = (stringLiteral.match(alternate.regex) || []).length; - shouldUseAlternateQuote = numPreferredQuotes > numAlternateQuotes; - } - - var enclosingQuote = shouldUseAlternateQuote ? alternate : preferred; - var escapedStringLiteral = stringLiteral.replace(enclosingQuote.regex, "\\".concat(enclosingQuote.quote)); - return "".concat(enclosingQuote.quote).concat(escapedStringLiteral).concat(enclosingQuote.quote); - } - - function printPath(path, print) { - return path.call(print, "path"); - } - - function getParams(path, print) { - var node = path.getValue(); - var parts = []; - - if (node.params.length > 0) { - parts = parts.concat(path.map(print, "params")); - } - - if (node.hash && node.hash.pairs.length > 0) { - parts.push(path.call(print, "hash")); - } - - return parts; - } - - function printPathParams(path, print, options) { - var parts = []; - options = Object.assign({ - group: true - }, options || {}); - parts.push(printPath(path, print)); - parts = parts.concat(getParams(path, print)); - - if (!options.group) { - return indent$4(join$4(line$3, parts)); - } - - return indent$4(group$6(join$4(line$3, parts))); - } - - function printBlockParams(path) { - var block = path.getValue(); - - if (!block.program || !block.program.blockParams.length) { - return ""; - } - - return concat$7([" as |", block.program.blockParams.join(" "), "|"]); - } - - function printOpenBlock(path, print) { - return group$6(concat$7(["{{#", printPathParams(path, print), printBlockParams(path), softline$3, "}}"])); - } - - function printCloseBlock(path, print) { - return concat$7(["{{/", path.call(print, "path"), "}}"]); - } - - function isWhitespaceNode(node) { - return node.type === "TextNode" && !/\S/.test(node.chars); - } - - function getPreviousNode(path) { - var node = path.getValue(); - var parentNode = path.getParentNode(0); - var children = parentNode.children || parentNode.body; - - if (children) { - var nodeIndex = children.indexOf(node); - - if (nodeIndex > 0) { - var previousNode = children[nodeIndex - 1]; - return previousNode; - } - } - } - - function getNextNode(path) { - var node = path.getValue(); - var parentNode = path.getParentNode(0); - var children = parentNode.children || parentNode.body; - - if (children) { - var nodeIndex = children.indexOf(node); - - if (nodeIndex < children.length) { - var nextNode = children[nodeIndex + 1]; - return nextNode; - } - } - } - - function isPreviousNodeOfSomeType(path, types) { - var previousNode = getPreviousNode(path); - - if (previousNode) { - return types.some(function (type) { - return previousNode.type === type; - }); - } - - return false; - } - - function isNextNodeOfType(path, type) { - var nextNode = getNextNode(path); - return nextNode && nextNode.type === type; - } - - function clean$2(ast, newObj) { - delete newObj.loc; - delete newObj.selfClosing; // (Glimmer/HTML) ignore TextNode whitespace - - if (ast.type === "TextNode") { - if (ast.chars.replace(/\s+/, "") === "") { - return null; - } - - newObj.chars = ast.chars.replace(/^\s+/, "").replace(/\s+$/, ""); - } - } - - function countNewLines(string) { - /* istanbul ignore next */ - string = typeof string === "string" ? string : ""; - return string.split("\n").length - 1; - } - - function countLeadingNewLines(string) { - /* istanbul ignore next */ - string = typeof string === "string" ? string : ""; - var newLines = (string.match(/^([^\S\r\n]*[\r\n])+/g) || [])[0] || ""; - return countNewLines(newLines); - } - - function countTrailingNewLines(string) { - /* istanbul ignore next */ - string = typeof string === "string" ? string : ""; - var newLines = (string.match(/([\r\n][^\S\r\n]*)+$/g) || [])[0] || ""; - return countNewLines(newLines); - } - - function generateHardlines() { - var number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; - var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - return new Array(Math.min(number, max)).fill(hardline$6); - } - - var printerGlimmer = { - print: print, - massageAstNode: clean$2 - }; - - var name$6 = "Handlebars"; - var type$5 = "markup"; - var group$7 = "HTML"; - var aliases = [ - "hbs", - "htmlbars" - ]; - var extensions$5 = [ - ".handlebars", - ".hbs" - ]; - var tmScope$5 = "text.html.handlebars"; - var aceMode$5 = "handlebars"; - var languageId$5 = 155; - var Handlebars = { - name: name$6, - type: type$5, - group: group$7, - aliases: aliases, - extensions: extensions$5, - tmScope: tmScope$5, - aceMode: aceMode$5, - languageId: languageId$5 - }; - - var Handlebars$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - name: name$6, - type: type$5, - group: group$7, - aliases: aliases, - extensions: extensions$5, - tmScope: tmScope$5, - aceMode: aceMode$5, - languageId: languageId$5, - 'default': Handlebars - }); - - var require$$0$4 = getCjsExportFromNamespace(Handlebars$1); - - var languages$2 = [createLanguage(require$$0$4, function (data) { - return Object.assign(data, { - since: null, - // unreleased - parsers: ["glimmer"], - vscodeLanguageIds: ["handlebars"] - }); - })]; - var printers$2 = { - glimmer: printerGlimmer - }; - var languageHandlebars = { - languages: languages$2, - printers: printers$2 - }; - - var clean$3 = function clean(ast, newNode) { - delete newNode.sourceSpan; - delete newNode.startSourceSpan; - delete newNode.endSourceSpan; - delete newNode.nameSpan; - delete newNode.valueSpan; - - if (ast.type === "text" || ast.type === "comment") { - return null; - } // may be formatted by multiparser - - - if (ast.type === "yaml" || ast.type === "toml") { - return null; - } - - if (ast.type === "attribute") { - delete newNode.value; - } - - if (ast.type === "docType") { - delete newNode.value; - } - }; - - var json = { - "CSS_DISPLAY_TAGS": { - "area": "none", - "base": "none", - "basefont": "none", - "datalist": "none", - "head": "none", - "link": "none", - "meta": "none", - "noembed": "none", - "noframes": "none", - "param": "none", - "rp": "none", - "script": "block", - "source": "block", - "style": "none", - "template": "inline", - "track": "block", - "title": "none", - "html": "block", - "body": "block", - "address": "block", - "blockquote": "block", - "center": "block", - "div": "block", - "figure": "block", - "figcaption": "block", - "footer": "block", - "form": "block", - "header": "block", - "hr": "block", - "legend": "block", - "listing": "block", - "main": "block", - "p": "block", - "plaintext": "block", - "pre": "block", - "xmp": "block", - "slot": "contents", - "ruby": "ruby", - "rt": "ruby-text", - "article": "block", - "aside": "block", - "h1": "block", - "h2": "block", - "h3": "block", - "h4": "block", - "h5": "block", - "h6": "block", - "hgroup": "block", - "nav": "block", - "section": "block", - "dir": "block", - "dd": "block", - "dl": "block", - "dt": "block", - "ol": "block", - "ul": "block", - "li": "list-item", - "table": "table", - "caption": "table-caption", - "colgroup": "table-column-group", - "col": "table-column", - "thead": "table-header-group", - "tbody": "table-row-group", - "tfoot": "table-footer-group", - "tr": "table-row", - "td": "table-cell", - "th": "table-cell", - "fieldset": "block", - "button": "inline-block", - "video": "inline-block", - "audio": "inline-block" - }, - "CSS_DISPLAY_DEFAULT": "inline", - "CSS_WHITE_SPACE_TAGS": { - "listing": "pre", - "plaintext": "pre", - "pre": "pre", - "xmp": "pre", - "nobr": "nowrap", - "table": "initial", - "textarea": "pre-wrap" - }, - "CSS_WHITE_SPACE_DEFAULT": "normal" - }; - - var a = [ - "accesskey", - "charset", - "coords", - "download", - "href", - "hreflang", - "name", - "ping", - "referrerpolicy", - "rel", - "rev", - "shape", - "tabindex", - "target", - "type" - ]; - var abbr = [ - "title" - ]; - var applet = [ - "align", - "alt", - "archive", - "code", - "codebase", - "height", - "hspace", - "name", - "object", - "vspace", - "width" - ]; - var area = [ - "accesskey", - "alt", - "coords", - "download", - "href", - "hreflang", - "nohref", - "ping", - "referrerpolicy", - "rel", - "shape", - "tabindex", - "target", - "type" - ]; - var audio = [ - "autoplay", - "controls", - "crossorigin", - "loop", - "muted", - "preload", - "src" - ]; - var base = [ - "href", - "target" - ]; - var basefont = [ - "color", - "face", - "size" - ]; - var bdo = [ - "dir" - ]; - var blockquote = [ - "cite" - ]; - var body = [ - "alink", - "background", - "bgcolor", - "link", - "text", - "vlink" - ]; - var br = [ - "clear" - ]; - var button = [ - "accesskey", - "autofocus", - "disabled", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "name", - "tabindex", - "type", - "value" - ]; - var canvas = [ - "height", - "width" - ]; - var caption = [ - "align" - ]; - var col = [ - "align", - "char", - "charoff", - "span", - "valign", - "width" - ]; - var colgroup = [ - "align", - "char", - "charoff", - "span", - "valign", - "width" - ]; - var data = [ - "value" - ]; - var del = [ - "cite", - "datetime" - ]; - var details = [ - "open" - ]; - var dfn = [ - "title" - ]; - var dialog = [ - "open" - ]; - var dir = [ - "compact" - ]; - var div = [ - "align" - ]; - var dl = [ - "compact" - ]; - var embed$1 = [ - "height", - "src", - "type", - "width" - ]; - var fieldset = [ - "disabled", - "form", - "name" - ]; - var font = [ - "color", - "face", - "size" - ]; - var form = [ - "accept", - "accept-charset", - "action", - "autocomplete", - "enctype", - "method", - "name", - "novalidate", - "target" - ]; - var frame = [ - "frameborder", - "longdesc", - "marginheight", - "marginwidth", - "name", - "noresize", - "scrolling", - "src" - ]; - var frameset = [ - "cols", - "rows" - ]; - var h1 = [ - "align" - ]; - var h2 = [ - "align" - ]; - var h3 = [ - "align" - ]; - var h4 = [ - "align" - ]; - var h5 = [ - "align" - ]; - var h6 = [ - "align" - ]; - var head = [ - "profile" - ]; - var hr = [ - "align", - "noshade", - "size", - "width" - ]; - var html = [ - "manifest", - "version" - ]; - var iframe = [ - "align", - "allow", - "allowfullscreen", - "allowpaymentrequest", - "allowusermedia", - "frameborder", - "height", - "longdesc", - "marginheight", - "marginwidth", - "name", - "referrerpolicy", - "sandbox", - "scrolling", - "src", - "srcdoc", - "width" - ]; - var img = [ - "align", - "alt", - "border", - "crossorigin", - "decoding", - "height", - "hspace", - "ismap", - "longdesc", - "name", - "referrerpolicy", - "sizes", - "src", - "srcset", - "usemap", - "vspace", - "width" - ]; - var input = [ - "accept", - "accesskey", - "align", - "alt", - "autocomplete", - "autofocus", - "checked", - "dirname", - "disabled", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "height", - "ismap", - "list", - "max", - "maxlength", - "min", - "minlength", - "multiple", - "name", - "pattern", - "placeholder", - "readonly", - "required", - "size", - "src", - "step", - "tabindex", - "title", - "type", - "usemap", - "value", - "width" - ]; - var ins = [ - "cite", - "datetime" - ]; - var isindex = [ - "prompt" - ]; - var label = [ - "accesskey", - "for", - "form" - ]; - var legend = [ - "accesskey", - "align" - ]; - var li = [ - "type", - "value" - ]; - var link$1 = [ - "as", - "charset", - "color", - "crossorigin", - "href", - "hreflang", - "imagesizes", - "imagesrcset", - "integrity", - "media", - "nonce", - "referrerpolicy", - "rel", - "rev", - "sizes", - "target", - "title", - "type" - ]; - var map = [ - "name" - ]; - var menu = [ - "compact" - ]; - var meta = [ - "charset", - "content", - "http-equiv", - "name", - "scheme" - ]; - var meter = [ - "high", - "low", - "max", - "min", - "optimum", - "value" - ]; - var object = [ - "align", - "archive", - "border", - "classid", - "codebase", - "codetype", - "data", - "declare", - "form", - "height", - "hspace", - "name", - "standby", - "tabindex", - "type", - "typemustmatch", - "usemap", - "vspace", - "width" - ]; - var ol = [ - "compact", - "reversed", - "start", - "type" - ]; - var optgroup = [ - "disabled", - "label" - ]; - var option = [ - "disabled", - "label", - "selected", - "value" - ]; - var output = [ - "for", - "form", - "name" - ]; - var p = [ - "align" - ]; - var param = [ - "name", - "type", - "value", - "valuetype" - ]; - var pre = [ - "width" - ]; - var progress = [ - "max", - "value" - ]; - var q = [ - "cite" - ]; - var script = [ - "async", - "charset", - "crossorigin", - "defer", - "integrity", - "language", - "nomodule", - "nonce", - "referrerpolicy", - "src", - "type" - ]; - var select = [ - "autocomplete", - "autofocus", - "disabled", - "form", - "multiple", - "name", - "required", - "size", - "tabindex" - ]; - var slot = [ - "name" - ]; - var source = [ - "media", - "sizes", - "src", - "srcset", - "type" - ]; - var style = [ - "media", - "nonce", - "title", - "type" - ]; - var table = [ - "align", - "bgcolor", - "border", - "cellpadding", - "cellspacing", - "frame", - "rules", - "summary", - "width" - ]; - var tbody = [ - "align", - "char", - "charoff", - "valign" - ]; - var td = [ - "abbr", - "align", - "axis", - "bgcolor", - "char", - "charoff", - "colspan", - "headers", - "height", - "nowrap", - "rowspan", - "scope", - "valign", - "width" - ]; - var textarea = [ - "accesskey", - "autocomplete", - "autofocus", - "cols", - "dirname", - "disabled", - "form", - "maxlength", - "minlength", - "name", - "placeholder", - "readonly", - "required", - "rows", - "tabindex", - "wrap" - ]; - var tfoot = [ - "align", - "char", - "charoff", - "valign" - ]; - var th = [ - "abbr", - "align", - "axis", - "bgcolor", - "char", - "charoff", - "colspan", - "headers", - "height", - "nowrap", - "rowspan", - "scope", - "valign", - "width" - ]; - var thead = [ - "align", - "char", - "charoff", - "valign" - ]; - var time = [ - "datetime" - ]; - var tr = [ - "align", - "bgcolor", - "char", - "charoff", - "valign" - ]; - var track = [ - "default", - "kind", - "label", - "src", - "srclang" - ]; - var ul = [ - "compact", - "type" - ]; - var video = [ - "autoplay", - "controls", - "crossorigin", - "height", - "loop", - "muted", - "playsinline", - "poster", - "preload", - "src", - "width" - ]; - var index$1 = { - "*": [ - "accesskey", - "autocapitalize", - "autofocus", - "class", - "contenteditable", - "dir", - "draggable", - "enterkeyhint", - "hidden", - "id", - "inputmode", - "is", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "nonce", - "slot", - "spellcheck", - "style", - "tabindex", - "title", - "translate" - ], - a: a, - abbr: abbr, - applet: applet, - area: area, - audio: audio, - base: base, - basefont: basefont, - bdo: bdo, - blockquote: blockquote, - body: body, - br: br, - button: button, - canvas: canvas, - caption: caption, - col: col, - colgroup: colgroup, - data: data, - del: del, - details: details, - dfn: dfn, - dialog: dialog, - dir: dir, - div: div, - dl: dl, - embed: embed$1, - fieldset: fieldset, - font: font, - form: form, - frame: frame, - frameset: frameset, - h1: h1, - h2: h2, - h3: h3, - h4: h4, - h5: h5, - h6: h6, - head: head, - hr: hr, - html: html, - iframe: iframe, - img: img, - input: input, - ins: ins, - isindex: isindex, - label: label, - legend: legend, - li: li, - link: link$1, - map: map, - menu: menu, - meta: meta, - meter: meter, - object: object, - ol: ol, - optgroup: optgroup, - option: option, - output: output, - p: p, - param: param, - pre: pre, - progress: progress, - q: q, - script: script, - select: select, - slot: slot, - source: source, - style: style, - table: table, - tbody: tbody, - td: td, - textarea: textarea, - tfoot: tfoot, - th: th, - thead: thead, - time: time, - tr: tr, - track: track, - ul: ul, - video: video - }; - - var htmlElementAttributes = /*#__PURE__*/Object.freeze({ - __proto__: null, - a: a, - abbr: abbr, - applet: applet, - area: area, - audio: audio, - base: base, - basefont: basefont, - bdo: bdo, - blockquote: blockquote, - body: body, - br: br, - button: button, - canvas: canvas, - caption: caption, - col: col, - colgroup: colgroup, - data: data, - del: del, - details: details, - dfn: dfn, - dialog: dialog, - dir: dir, - div: div, - dl: dl, - embed: embed$1, - fieldset: fieldset, - font: font, - form: form, - frame: frame, - frameset: frameset, - h1: h1, - h2: h2, - h3: h3, - h4: h4, - h5: h5, - h6: h6, - head: head, - hr: hr, - html: html, - iframe: iframe, - img: img, - input: input, - ins: ins, - isindex: isindex, - label: label, - legend: legend, - li: li, - link: link$1, - map: map, - menu: menu, - meta: meta, - meter: meter, - object: object, - ol: ol, - optgroup: optgroup, - option: option, - output: output, - p: p, - param: param, - pre: pre, - progress: progress, - q: q, - script: script, - select: select, - slot: slot, - source: source, - style: style, - table: table, - tbody: tbody, - td: td, - textarea: textarea, - tfoot: tfoot, - th: th, - thead: thead, - time: time, - tr: tr, - track: track, - ul: ul, - video: video, - 'default': index$1 - }); - - var htmlElementAttributes$1 = getCjsExportFromNamespace(htmlElementAttributes); - - var CSS_DISPLAY_TAGS = json.CSS_DISPLAY_TAGS, - CSS_DISPLAY_DEFAULT = json.CSS_DISPLAY_DEFAULT, - CSS_WHITE_SPACE_TAGS = json.CSS_WHITE_SPACE_TAGS, - CSS_WHITE_SPACE_DEFAULT = json.CSS_WHITE_SPACE_DEFAULT; - var HTML_TAGS = arrayToMap(htmlTagNames$1); - var HTML_ELEMENT_ATTRIBUTES = mapObject(htmlElementAttributes$1, arrayToMap); - - function arrayToMap(array) { - var map = Object.create(null); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = array[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var value = _step.value; - map[value] = true; - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return != null) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } - - return map; - } - - function mapObject(object, fn) { - var newObject = Object.create(null); - - for (var _i = 0, _Object$keys = Object.keys(object); _i < _Object$keys.length; _i++) { - var key = _Object$keys[_i]; - newObject[key] = fn(object[key], key); - } - - return newObject; - } - - function shouldPreserveContent(node, options) { - if (node.type === "element" && node.fullName === "template" && node.attrMap.lang && node.attrMap.lang !== "html") { - return true; - } // unterminated node in ie conditional comment - // e.g. - - - if (node.type === "ieConditionalComment" && node.lastChild && !node.lastChild.isSelfClosing && !node.lastChild.endSourceSpan) { - return true; - } // incomplete html in ie conditional comment - // e.g. - - - if (node.type === "ieConditionalComment" && !node.complete) { - return true; - } // top-level elements (excluding