From d47d1ed90a5903f321e8f7c32c7d9c96fd9c8412 Mon Sep 17 00:00:00 2001 From: lex00 <121451605+lex00@users.noreply.github.com> Date: Sun, 9 Aug 2026 14:59:32 -0600 Subject: [PATCH 1/3] chore(deps): chant + lexicon-github ^0.11.0 -> ^0.44.1 (#55) --- package-lock.json | 493 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 4 +- 2 files changed, 486 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index e672b04..76f21ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "0.3.0", "license": "Apache-2.0", "dependencies": { - "@intentius/chant": "^0.11.0", - "@intentius/chant-lexicon-github": "^0.11.0" + "@intentius/chant": "^0.44.1", + "@intentius/chant-lexicon-github": "^0.44.1" }, "bin": { "github-warden": "bin/github-warden.js" @@ -24,6 +24,21 @@ "vitest": "^4.1.9" } }, + "node_modules/@dagrejs/dagre": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@dagrejs/dagre/-/dagre-3.1.1.tgz", + "integrity": "sha512-zroZB1dFOFiGgv4Xcrn1DckB1o4aOikPqD2NDQPV0WM//CXGcS6xiD0rNkqHmw6FEg4tabt4nxPLwgCWT+Vb2A==", + "license": "MIT", + "dependencies": { + "@dagrejs/graphlib": "4.0.5" + } + }, + "node_modules/@dagrejs/graphlib": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@dagrejs/graphlib/-/graphlib-4.0.5.tgz", + "integrity": "sha512-7xrBTqIts3o+PMUZX97wSc+7TUbW+/rULzGNCTP6yooNVDXbzw4Wutg/H/xOutTB/c/k0YqOAavgPh4/Zk9PFA==", + "license": "MIT" + }, "node_modules/@emnapi/core": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", @@ -475,11 +490,13 @@ } }, "node_modules/@intentius/chant": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@intentius/chant/-/chant-0.11.0.tgz", - "integrity": "sha512-Vs6eA98mPINryYeUVvmo3STDu0Zm5iNb4+hAfCjYlxib2a3AoJLhPcxoUdhjRl36FUEeKONFU8uklGy1JrTR2Q==", + "version": "0.44.1", + "resolved": "https://registry.npmjs.org/@intentius/chant/-/chant-0.44.1.tgz", + "integrity": "sha512-2iAinpURMWXjGpD68EgtX7q2qx5k4HEtTwfF5u6jtDn0WQhTNcXb++3a4z1bZElZK/YeixOufHhF18vLtBtKvA==", "license": "Apache-2.0", "dependencies": { + "@dagrejs/dagre": "^3.0.0", + "esbuild": "^0.27.0", "fflate": "^0.8.2", "picomatch": "^4.0.3", "tsx": "^4.0.0", @@ -491,12 +508,470 @@ } }, "node_modules/@intentius/chant-lexicon-github": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-github/-/chant-lexicon-github-0.11.0.tgz", - "integrity": "sha512-1mKfo3oaG11WIY7W4r2gKs4hIctWkS20i1kWo2IglaAWp9QwIynsm9WEk7GZCqfcbDvD7i4yhZoOIxC64v0WlQ==", + "version": "0.44.1", + "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-github/-/chant-lexicon-github-0.44.1.tgz", + "integrity": "sha512-gBBC/3epidt38lh/0ju0ay3qFZkndS9+bQV3wqxhCPtSjdvxDkcWijATRS+/ajXmMlIFz1TD/f2rPlt4L0MUbg==", "license": "Apache-2.0", "peerDependencies": { - "@intentius/chant": "^0.11.0" + "@intentius/chant": "^0.44.1", + "typescript": "^5.9.3" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@intentius/chant/node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" } }, "node_modules/@jridgewell/sourcemap-codec": { diff --git a/package.json b/package.json index 291bcda..ecdabee 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@intentius/chant": "^0.11.0", - "@intentius/chant-lexicon-github": "^0.11.0" + "@intentius/chant": "^0.44.1", + "@intentius/chant-lexicon-github": "^0.44.1" }, "devDependencies": { "@types/libsodium-wrappers": "^0.7.14", From eacd9a2fc50d9a132ed41bd9e5edbfa8951a7048 Mon Sep 17 00:00:00 2001 From: lex00 <121451605+lex00@users.noreply.github.com> Date: Sun, 9 Aug 2026 14:59:32 -0600 Subject: [PATCH 2/3] feat(cycles): stamp the shared governance verb vocabulary from chant 0.44 --- src/cli/verbs.test.ts | 15 +++++++++++++++ src/cycles/branch-protection.ts | 1 + src/cycles/dependency-hygiene.ts | 1 + src/cycles/environments.ts | 1 + src/cycles/membership.ts | 1 + src/cycles/org-settings.ts | 1 + src/cycles/repo-baseline.ts | 1 + src/cycles/repo-settings.ts | 1 + src/cycles/rulesets.ts | 1 + src/cycles/secrets-variables.ts | 1 + src/cycles/security-features.ts | 1 + src/cycles/teams.ts | 1 + src/cycles/token-approval.ts | 1 + src/cycles/token-governance.ts | 1 + 14 files changed, 28 insertions(+) create mode 100644 src/cli/verbs.test.ts diff --git a/src/cli/verbs.test.ts b/src/cli/verbs.test.ts new file mode 100644 index 0000000..9aeaf70 --- /dev/null +++ b/src/cli/verbs.test.ts @@ -0,0 +1,15 @@ +/** + * Every cycle stamps a governance verb (chant#790), so this provider's plans + * read on the same cross-provider grammar as every other warden's. + */ +import { describe, expect, it } from "vitest"; +import { isGovernanceVerb } from "@intentius/chant/governance"; +import { CYCLE_REGISTRY } from "./registry.js"; + +describe("governance verbs (chant#790)", () => { + it("every registered cycle stamps a valid verb", () => { + for (const [name, cycle] of Object.entries(CYCLE_REGISTRY)) { + expect(isGovernanceVerb(cycle.verb), `cycle "${name}" stamps no governance verb`).toBe(true); + } + }); +}); diff --git a/src/cycles/branch-protection.ts b/src/cycles/branch-protection.ts index 0cd27a2..0f35ea6 100644 --- a/src/cycles/branch-protection.ts +++ b/src/cycles/branch-protection.ts @@ -345,6 +345,7 @@ function buildProtectionBody( */ export const branchProtectionCycle: Cycle = { name: "branch-protection", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/dependency-hygiene.ts b/src/cycles/dependency-hygiene.ts index 8edd9ab..9ecae09 100644 --- a/src/cycles/dependency-hygiene.ts +++ b/src/cycles/dependency-hygiene.ts @@ -99,6 +99,7 @@ export async function fetchDependabot( export const dependencyHygieneCycle: Cycle = { name: "dependency-hygiene", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/environments.ts b/src/cycles/environments.ts index bd92280..7ece2b9 100644 --- a/src/cycles/environments.ts +++ b/src/cycles/environments.ts @@ -179,6 +179,7 @@ async function fetchRepoEnvironments( export const environmentsCycle: Cycle = { name: "environments", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/membership.ts b/src/cycles/membership.ts index f42c4cc..6aa85b5 100644 --- a/src/cycles/membership.ts +++ b/src/cycles/membership.ts @@ -101,6 +101,7 @@ export async function listOrgMembers( */ export const membershipCycle: Cycle = { name: "membership", + verb: "membership", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/org-settings.ts b/src/cycles/org-settings.ts index 3507f3b..69cce8a 100644 --- a/src/cycles/org-settings.ts +++ b/src/cycles/org-settings.ts @@ -160,6 +160,7 @@ export function buildOrgPatchBody(desired: OrgSettings): Record */ export const orgSettingsCycle: Cycle = { name: "org-settings", + verb: "org-unit", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/repo-baseline.ts b/src/cycles/repo-baseline.ts index 74454aa..5a23e34 100644 --- a/src/cycles/repo-baseline.ts +++ b/src/cycles/repo-baseline.ts @@ -88,6 +88,7 @@ export async function listOrgRepoNames( export const repoBaselineCycle: Cycle = { name: "repo-baseline", + verb: "org-unit", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/repo-settings.ts b/src/cycles/repo-settings.ts index ba3dd40..c937b89 100644 --- a/src/cycles/repo-settings.ts +++ b/src/cycles/repo-settings.ts @@ -158,6 +158,7 @@ export function buildRepoPatchBody(desired: RepoConfig): Record */ export const repoSettingsCycle: Cycle = { name: "repo-settings", + verb: "org-unit", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/rulesets.ts b/src/cycles/rulesets.ts index fafa125..35a8f85 100644 --- a/src/cycles/rulesets.ts +++ b/src/cycles/rulesets.ts @@ -195,6 +195,7 @@ async function applyRuleset( export const rulesetsCycle: Cycle = { name: "rulesets", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/secrets-variables.ts b/src/cycles/secrets-variables.ts index bb101f8..d2c34d9 100644 --- a/src/cycles/secrets-variables.ts +++ b/src/cycles/secrets-variables.ts @@ -200,6 +200,7 @@ async function applyVariable( export const secretsVariablesCycle: Cycle = { name: "secrets-variables", + verb: "secret-material", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/security-features.ts b/src/cycles/security-features.ts index aa589d3..71aabea 100644 --- a/src/cycles/security-features.ts +++ b/src/cycles/security-features.ts @@ -163,6 +163,7 @@ export function buildSecurityAnalysisBody(desired: RepoSecurityConfig): Record = { name: "security-features", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/teams.ts b/src/cycles/teams.ts index 5f45b9f..f8229d5 100644 --- a/src/cycles/teams.ts +++ b/src/cycles/teams.ts @@ -249,6 +249,7 @@ function splitKey(key: string, resourceType: string): [string, string] { export const teamsCycle: Cycle = { name: "teams", + verb: "membership", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/token-approval.ts b/src/cycles/token-approval.ts index 4f01de7..d8d8729 100644 --- a/src/cycles/token-approval.ts +++ b/src/cycles/token-approval.ts @@ -74,6 +74,7 @@ export function mapTokenRequest(raw: GhTokenRequest): LiveTokenRequest { export const tokenApprovalCycle: Cycle = { name: "token-approval", + verb: "identity-assignment", // ── Part 2: fetchLive ────────────────────────────────────────────────────── diff --git a/src/cycles/token-governance.ts b/src/cycles/token-governance.ts index bcaa2b6..90a61d6 100644 --- a/src/cycles/token-governance.ts +++ b/src/cycles/token-governance.ts @@ -81,6 +81,7 @@ export function mapTokenGrant(raw: GhTokenGrant): LiveTokenGrant { export const tokenGovernanceCycle: Cycle = { name: "token-governance", + verb: "identity-assignment", // ── Part 2: fetchLive ────────────────────────────────────────────────────── From c691873c1a55bf05e7b71b573cc1ade912468ea9 Mon Sep 17 00:00:00 2001 From: lex00 <121451605+lex00@users.noreply.github.com> Date: Sun, 9 Aug 2026 14:59:32 -0600 Subject: [PATCH 3/3] chore(action): regenerate the committed bundle against chant 0.44.1 --- action/index.mjs | 10751 +++++++++++++++++++++++++++++---------------- 1 file changed, 6967 insertions(+), 3784 deletions(-) diff --git a/action/index.mjs b/action/index.mjs index 2c9d50d..90d78ee 100644 --- a/action/index.mjs +++ b/action/index.mjs @@ -270,6 +270,21 @@ var init_app_client = __esm({ } }); +// node_modules/@intentius/chant/src/governance.ts +var GOVERNANCE_VERBS; +var init_governance = __esm({ + "node_modules/@intentius/chant/src/governance.ts"() { + GOVERNANCE_VERBS = [ + "org-unit", + "policy-guardrail", + "membership", + "identity-assignment", + "audit-sink", + "secret-material" + ]; + } +}); + // node_modules/@intentius/chant/src/reconcile.ts function deepEqual(a, b) { if (a === b) return true; @@ -288,7 +303,7 @@ function diffFields(desired, live, keys) { } return fields; } -function diffCollection(params) { +function diffCollection(params2) { const { resourceType, keyPrefix = "", @@ -299,7 +314,7 @@ function diffCollection(params) { updateAfter, opts, out - } = params; + } = params2; for (const [key, d] of desired) { const entryKey = `${keyPrefix}${key}`; const l = live.get(key); @@ -347,8 +362,12 @@ No changes.`; for (const e of cs.entries) byKind[e.kind].push(e); const ORDER = ["create", "update", "delete"]; for (const kind of ORDER) { - const group = byKind[kind]; + let group = byKind[kind]; if (group.length === 0) continue; + if (group.some((e) => e.verb)) { + const rank = (e) => e.verb ? GOVERNANCE_VERBS.indexOf(e.verb) : GOVERNANCE_VERBS.length; + group = [...group].sort((a, b) => rank(a) - rank(b)); + } lines.push(` ${kind.toUpperCase()}:`); for (const e of group) { @@ -459,11 +478,15 @@ async function runReconcile(opts) { continue; } const changeSet = diffFn(scopeId, desired, live, diffOptions); + if (cycle.verb) { + for (const e of changeSet.entries) e.verb ??= cycle.verb; + } const guardrailResult = guardrails(changeSet, live); const counts = { create: 0, update: 0, delete: 0 }; for (const e of changeSet.entries) counts[e.kind]++; const cycleResult = { name: cycle.name, + verb: cycle.verb, org: scopeId, counts, guardrails: guardrailResult, @@ -506,6 +529,7 @@ async function runReconcile(opts) { var BudgetExhaustedError, MutableRateBudget; var init_reconcile = __esm({ "node_modules/@intentius/chant/src/reconcile.ts"() { + init_governance(); BudgetExhaustedError = class extends Error { constructor(message = "rate budget exhausted") { super(message); @@ -583,10 +607,10 @@ function diffSettings(desired, live, out) { } function diffTeams(desired, live, opts, out) { if (desired === void 0) return; - for (const [slug, desiredTeam] of Object.entries(desired)) { - const liveTeam = live[slug]; + for (const [slug2, desiredTeam] of Object.entries(desired)) { + const liveTeam = live[slug2]; if (!liveTeam) { - out.push({ kind: "create", resourceType: "team", key: slug, after: desiredTeam }); + out.push({ kind: "create", resourceType: "team", key: slug2, after: desiredTeam }); continue; } const teamFields = diffObjectKeys( @@ -598,20 +622,20 @@ function diffTeams(desired, live, opts, out) { out.push({ kind: "update", resourceType: "team", - key: slug, + key: slug2, before: liveTeam, after: desiredTeam, fields: teamFields }); } - diffTeamMembers(slug, desiredTeam.members, liveTeam.members ?? [], opts, out); - diffTeamRepos(slug, desiredTeam.repos, liveTeam.repos ?? [], opts, out); + diffTeamMembers(slug2, desiredTeam.members, liveTeam.members ?? [], opts, out); + diffTeamRepos(slug2, desiredTeam.repos, liveTeam.repos ?? [], opts, out); } - for (const slug of Object.keys(live)) { - if (!Object.prototype.hasOwnProperty.call(desired, slug)) { - const key = slug; + for (const slug2 of Object.keys(live)) { + if (!Object.prototype.hasOwnProperty.call(desired, slug2)) { + const key = slug2; if (opts.isOwned?.("team", key)) { - out.push({ kind: "delete", resourceType: "team", key, before: live[slug] }); + out.push({ kind: "delete", resourceType: "team", key, before: live[slug2] }); } } } @@ -1110,6 +1134,61 @@ function parseYAML(content) { const lines = content.replace(/\r\n?/g, "\n").split("\n"); return parseYAMLLines(lines, 0, 0).value; } +function blockScalarHeader(inline) { + const m = inline.match(/^([|>])([+-]?)(?:\s+#.*)?$/); + if (!m) return null; + return { + style: m[1] === "|" ? "literal" : "folded", + chomp: m[2] === "-" ? "strip" : m[2] === "+" ? "keep" : "clip" + }; +} +function parseBlockScalar(lines, startIndex, parentIndent, header) { + const raw = []; + let blockIndent = -1; + let i = startIndex; + for (; i < lines.length; i++) { + const line = lines[i]; + if (line.trim() === "") { + raw.push(""); + continue; + } + const ni = line.search(/\S/); + if (ni <= parentIndent) break; + if (blockIndent === -1) blockIndent = ni; + if (ni < blockIndent) break; + raw.push(line.slice(blockIndent)); + } + let text; + if (header.style === "folded") { + text = ""; + let buf = []; + let blankRun = 0; + let wrote = false; + const flush = () => { + if (buf.length === 0) return; + if (wrote) text += "\n".repeat(blankRun); + text += buf.join(" "); + buf = []; + blankRun = 0; + wrote = true; + }; + for (const l of raw) { + if (l === "") { + flush(); + blankRun++; + } else buf.push(l); + } + flush(); + } else { + text = raw.join("\n"); + } + const trailing = text.match(/\n*$/)?.[0].length ?? 0; + const stripped = text.replace(/\n+$/, ""); + if (header.chomp === "strip") text = stripped; + else if (header.chomp === "keep") text = stripped + "\n".repeat(Math.max(trailing, raw.length > 0 ? 1 : 0)); + else text = stripped === "" ? "" : stripped + "\n"; + return { value: text, endIndex: i }; +} function parseYAMLLines(lines, startIndex, baseIndent) { const result = {}; let i = startIndex; @@ -1159,8 +1238,15 @@ function parseYAMLLines(lines, startIndex, baseIndent) { } i++; } else { - result[key] = parseScalar(inlineValue); - i++; + const header = blockScalarHeader(inlineValue); + if (header) { + const block = parseBlockScalar(lines, i + 1, indent, header); + result[key] = block.value; + i = block.endIndex; + } else { + result[key] = parseScalar(inlineValue); + i++; + } } } else if (line.trimStart().startsWith("- ")) { break; @@ -1170,8 +1256,14 @@ function parseYAMLLines(lines, startIndex, baseIndent) { } return { value: result, endIndex: i }; } -function parseArrayItemValue(inlineValue, lines, currentIndex, childIndent) { +function parseArrayItemValue(inlineValue, lines, currentIndex, keyIndent) { if (inlineValue !== "" && !inlineValue.startsWith("#")) { + const header = blockScalarHeader(inlineValue); + if (header) { + const dash = lines[currentIndex].match(/^(\s*)- /); + const keyIndent2 = dash ? dash[1].length + 2 : lines[currentIndex].search(/\S/); + return parseBlockScalar(lines, currentIndex + 1, keyIndent2, header).value; + } if (inlineValue.startsWith("[")) { try { return JSON.parse(inlineValue); @@ -1193,16 +1285,26 @@ function parseArrayItemValue(inlineValue, lines, currentIndex, childIndent) { const nextLine = lines[nextIdx]; if (nextLine.trim() !== "" && !nextLine.trim().startsWith("#")) { const ni = nextLine.search(/\S/); - if (ni >= childIndent) { - if (nextLine.trimStart().startsWith("- ")) { - return parseYAMLArray(lines, nextIdx, ni).value; - } + if (nextLine.trimStart().startsWith("- ")) { + if (ni >= keyIndent) return parseYAMLArray(lines, nextIdx, ni).value; + } else if (ni > keyIndent) { return parseYAMLLines(lines, nextIdx, ni).value; } } } return null; } +function skipValueBlock(lines, startIndex, keyIndent) { + let k = startIndex; + while (k < lines.length && (lines[k].trim() === "" || lines[k].trim().startsWith("#"))) k++; + if (k < lines.length) { + const ni = lines[k].search(/\S/); + if (ni >= keyIndent && lines[k].trimStart().startsWith("- ")) { + return parseYAMLArray(lines, k, ni).endIndex; + } + } + return skipNestedBlock(lines, startIndex, keyIndent + 1); +} function skipNestedBlock(lines, startIndex, childIndent) { let j = startIndex; while (j < lines.length) { @@ -1237,7 +1339,8 @@ function parseYAMLArray(lines, startIndex, baseIndent) { const obj = {}; obj[kvMatch[1].trim()] = parseArrayItemValue(kvMatch[2].trim(), lines, i, indent + 2); const nextIndent = indent + 2; - let j = kvMatch[2].trim() === "" || kvMatch[2].trim().startsWith("#") ? skipNestedBlock(lines, i + 1, nextIndent) : i + 1; + const firstVal = kvMatch[2].trim(); + let j = firstVal === "" || firstVal.startsWith("#") ? skipValueBlock(lines, i + 1, nextIndent) : blockScalarHeader(firstVal) ? skipNestedBlock(lines, i + 1, nextIndent + 1) : i + 1; while (j < lines.length) { const nextLine = lines[j]; if (nextLine.trim() === "" || nextLine.trim().startsWith("#")) { @@ -1250,9 +1353,11 @@ function parseYAMLArray(lines, startIndex, baseIndent) { const nextKV = nextLine.match(/^(\s*)([^\s:][^:]*?):\s*(.*)$/); if (nextKV) { const nextVal = nextKV[3].trim(); - obj[nextKV[2].trim()] = parseArrayItemValue(nextVal, lines, j, ni + 2); + obj[nextKV[2].trim()] = parseArrayItemValue(nextVal, lines, j, ni); if (nextVal === "" || nextVal.startsWith("#")) { - j = skipNestedBlock(lines, j + 1, ni + 2); + j = skipValueBlock(lines, j + 1, ni); + } else if (blockScalarHeader(nextVal)) { + j = skipNestedBlock(lines, j + 1, ni + 1); } else { j++; } @@ -1263,8 +1368,15 @@ function parseYAMLArray(lines, startIndex, baseIndent) { result.push(obj); i = j; } else { - result.push(parseScalar(itemValue)); - i++; + const header = blockScalarHeader(itemValue); + if (header) { + const block = parseBlockScalar(lines, i + 1, indent, header); + result.push(block.value); + i = block.endIndex; + } else { + result.push(parseScalar(itemValue)); + i++; + } } } else { break; @@ -1303,7 +1415,7 @@ var init_lexicon = __esm({ // node_modules/zod/v4/core/core.js // @__NO_SIDE_EFFECTS__ -function $constructor(name, initializer3, params) { +function $constructor(name, initializer3, params2) { function init(inst, def) { if (!inst._zod) { Object.defineProperty(inst, "_zod", { @@ -1329,13 +1441,13 @@ function $constructor(name, initializer3, params) { } } } - const Parent = params?.Parent ?? Object; + const Parent = params2?.Parent ?? Object; class Definition extends Parent { } Object.defineProperty(Definition, "name", { value: name }); function _(def) { var _a3; - const inst = params?.Parent ? new Definition() : this; + const inst = params2?.Parent ? new Definition() : this; init(inst, def); (_a3 = inst._zod).deferred ?? (_a3.deferred = []); for (const fn of inst._zod.deferred) { @@ -1346,7 +1458,7 @@ function $constructor(name, initializer3, params) { Object.defineProperty(_, "init", { value: init }); Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => { - if (params?.Parent && inst instanceof params.Parent) + if (params2?.Parent && inst instanceof params2.Parent) return true; return inst?._zod?.traits?.has(name); } @@ -1620,27 +1732,27 @@ function numKeys(data) { function escapeRegex(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } -function clone(inst, def, params) { +function clone(inst, def, params2) { const cl = new inst._zod.constr(def ?? inst._zod.def); - if (!def || params?.parent) + if (!def || params2?.parent) cl._zod.parent = inst; return cl; } function normalizeParams(_params) { - const params = _params; - if (!params) + const params2 = _params; + if (!params2) return {}; - if (typeof params === "string") - return { error: () => params }; - if (params?.message !== void 0) { - if (params?.error !== void 0) + if (typeof params2 === "string") + return { error: () => params2 }; + if (params2?.message !== void 0) { + if (params2?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params"); - params.error = params.message; + params2.error = params2.message; } - delete params.message; - if (typeof params.error === "string") - return { ...params, error: () => params.error }; - return params; + delete params2.message; + if (typeof params2.error === "string") + return { ...params2, error: () => params2.error }; + return params2; } function createTransparentProxy(getter) { let target; @@ -2251,14 +2363,14 @@ var init_parse = __esm({ return result.value; }; parse = /* @__PURE__ */ _parse($ZodRealError); - _parseAsync = (_Err) => async (schema, value, _ctx, params) => { + _parseAsync = (_Err) => async (schema, value, _ctx, params2) => { const ctx = _ctx ? { ..._ctx, async: true } : { async: true }; let result = schema._zod.run({ value, issues: [] }, ctx); if (result instanceof Promise) result = await result; if (result.issues.length) { - const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); - captureStackTrace(e, params?.callee); + const e = new (params2?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e, params2?.callee); throw e; } return result.value; @@ -2460,8 +2572,8 @@ var init_regexes = __esm({ e164 = /^\+[1-9]\d{6,14}$/; dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); - string = (params) => { - const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + string = (params2) => { + const regex = params2 ? `[\\s\\S]{${params2?.minimum ?? 0},${params2?.maximum ?? ""}}` : `[\\s\\S]*`; return new RegExp(`^${regex}$`); }; bigint = /^-?\d+n?$/; @@ -11583,255 +11695,255 @@ var init_registries = __esm({ // node_modules/zod/v4/core/api.js // @__NO_SIDE_EFFECTS__ -function _string(Class2, params) { +function _string(Class2, params2) { return new Class2({ type: "string", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _coercedString(Class2, params) { +function _coercedString(Class2, params2) { return new Class2({ type: "string", coerce: true, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _email(Class2, params) { +function _email(Class2, params2) { return new Class2({ type: "string", format: "email", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _guid(Class2, params) { +function _guid(Class2, params2) { return new Class2({ type: "string", format: "guid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uuid(Class2, params) { +function _uuid(Class2, params2) { return new Class2({ type: "string", format: "uuid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uuidv4(Class2, params) { +function _uuidv4(Class2, params2) { return new Class2({ type: "string", format: "uuid", check: "string_format", abort: false, version: "v4", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uuidv6(Class2, params) { +function _uuidv6(Class2, params2) { return new Class2({ type: "string", format: "uuid", check: "string_format", abort: false, version: "v6", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uuidv7(Class2, params) { +function _uuidv7(Class2, params2) { return new Class2({ type: "string", format: "uuid", check: "string_format", abort: false, version: "v7", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _url(Class2, params) { +function _url(Class2, params2) { return new Class2({ type: "string", format: "url", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _emoji2(Class2, params) { +function _emoji2(Class2, params2) { return new Class2({ type: "string", format: "emoji", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _nanoid(Class2, params) { +function _nanoid(Class2, params2) { return new Class2({ type: "string", format: "nanoid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _cuid(Class2, params) { +function _cuid(Class2, params2) { return new Class2({ type: "string", format: "cuid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _cuid2(Class2, params) { +function _cuid2(Class2, params2) { return new Class2({ type: "string", format: "cuid2", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _ulid(Class2, params) { +function _ulid(Class2, params2) { return new Class2({ type: "string", format: "ulid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _xid(Class2, params) { +function _xid(Class2, params2) { return new Class2({ type: "string", format: "xid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _ksuid(Class2, params) { +function _ksuid(Class2, params2) { return new Class2({ type: "string", format: "ksuid", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _ipv4(Class2, params) { +function _ipv4(Class2, params2) { return new Class2({ type: "string", format: "ipv4", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _ipv6(Class2, params) { +function _ipv6(Class2, params2) { return new Class2({ type: "string", format: "ipv6", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _mac(Class2, params) { +function _mac(Class2, params2) { return new Class2({ type: "string", format: "mac", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _cidrv4(Class2, params) { +function _cidrv4(Class2, params2) { return new Class2({ type: "string", format: "cidrv4", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _cidrv6(Class2, params) { +function _cidrv6(Class2, params2) { return new Class2({ type: "string", format: "cidrv6", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _base64(Class2, params) { +function _base64(Class2, params2) { return new Class2({ type: "string", format: "base64", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _base64url(Class2, params) { +function _base64url(Class2, params2) { return new Class2({ type: "string", format: "base64url", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _e164(Class2, params) { +function _e164(Class2, params2) { return new Class2({ type: "string", format: "e164", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _jwt(Class2, params) { +function _jwt(Class2, params2) { return new Class2({ type: "string", format: "jwt", check: "string_format", abort: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _isoDateTime(Class2, params) { +function _isoDateTime(Class2, params2) { return new Class2({ type: "string", format: "datetime", @@ -11839,173 +11951,173 @@ function _isoDateTime(Class2, params) { offset: false, local: false, precision: null, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _isoDate(Class2, params) { +function _isoDate(Class2, params2) { return new Class2({ type: "string", format: "date", check: "string_format", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _isoTime(Class2, params) { +function _isoTime(Class2, params2) { return new Class2({ type: "string", format: "time", check: "string_format", precision: null, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _isoDuration(Class2, params) { +function _isoDuration(Class2, params2) { return new Class2({ type: "string", format: "duration", check: "string_format", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _number(Class2, params) { +function _number(Class2, params2) { return new Class2({ type: "number", checks: [], - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _coercedNumber(Class2, params) { +function _coercedNumber(Class2, params2) { return new Class2({ type: "number", coerce: true, checks: [], - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _int(Class2, params) { +function _int(Class2, params2) { return new Class2({ type: "number", check: "number_format", abort: false, format: "safeint", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _float32(Class2, params) { +function _float32(Class2, params2) { return new Class2({ type: "number", check: "number_format", abort: false, format: "float32", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _float64(Class2, params) { +function _float64(Class2, params2) { return new Class2({ type: "number", check: "number_format", abort: false, format: "float64", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _int32(Class2, params) { +function _int32(Class2, params2) { return new Class2({ type: "number", check: "number_format", abort: false, format: "int32", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uint32(Class2, params) { +function _uint32(Class2, params2) { return new Class2({ type: "number", check: "number_format", abort: false, format: "uint32", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _boolean(Class2, params) { +function _boolean(Class2, params2) { return new Class2({ type: "boolean", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _coercedBoolean(Class2, params) { +function _coercedBoolean(Class2, params2) { return new Class2({ type: "boolean", coerce: true, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _bigint(Class2, params) { +function _bigint(Class2, params2) { return new Class2({ type: "bigint", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _coercedBigint(Class2, params) { +function _coercedBigint(Class2, params2) { return new Class2({ type: "bigint", coerce: true, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _int64(Class2, params) { +function _int64(Class2, params2) { return new Class2({ type: "bigint", check: "bigint_format", abort: false, format: "int64", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uint64(Class2, params) { +function _uint64(Class2, params2) { return new Class2({ type: "bigint", check: "bigint_format", abort: false, format: "uint64", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _symbol(Class2, params) { +function _symbol(Class2, params2) { return new Class2({ type: "symbol", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _undefined2(Class2, params) { +function _undefined2(Class2, params2) { return new Class2({ type: "undefined", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _null2(Class2, params) { +function _null2(Class2, params2) { return new Class2({ type: "null", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ @@ -12021,217 +12133,217 @@ function _unknown(Class2) { }); } // @__NO_SIDE_EFFECTS__ -function _never(Class2, params) { +function _never(Class2, params2) { return new Class2({ type: "never", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _void(Class2, params) { +function _void(Class2, params2) { return new Class2({ type: "void", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _date(Class2, params) { +function _date(Class2, params2) { return new Class2({ type: "date", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _coercedDate(Class2, params) { +function _coercedDate(Class2, params2) { return new Class2({ type: "date", coerce: true, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _nan(Class2, params) { +function _nan(Class2, params2) { return new Class2({ type: "nan", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _lt(value, params) { +function _lt(value, params2) { return new $ZodCheckLessThan({ check: "less_than", - ...normalizeParams(params), + ...normalizeParams(params2), value, inclusive: false }); } // @__NO_SIDE_EFFECTS__ -function _lte(value, params) { +function _lte(value, params2) { return new $ZodCheckLessThan({ check: "less_than", - ...normalizeParams(params), + ...normalizeParams(params2), value, inclusive: true }); } // @__NO_SIDE_EFFECTS__ -function _gt(value, params) { +function _gt(value, params2) { return new $ZodCheckGreaterThan({ check: "greater_than", - ...normalizeParams(params), + ...normalizeParams(params2), value, inclusive: false }); } // @__NO_SIDE_EFFECTS__ -function _gte(value, params) { +function _gte(value, params2) { return new $ZodCheckGreaterThan({ check: "greater_than", - ...normalizeParams(params), + ...normalizeParams(params2), value, inclusive: true }); } // @__NO_SIDE_EFFECTS__ -function _positive(params) { - return /* @__PURE__ */ _gt(0, params); +function _positive(params2) { + return /* @__PURE__ */ _gt(0, params2); } // @__NO_SIDE_EFFECTS__ -function _negative(params) { - return /* @__PURE__ */ _lt(0, params); +function _negative(params2) { + return /* @__PURE__ */ _lt(0, params2); } // @__NO_SIDE_EFFECTS__ -function _nonpositive(params) { - return /* @__PURE__ */ _lte(0, params); +function _nonpositive(params2) { + return /* @__PURE__ */ _lte(0, params2); } // @__NO_SIDE_EFFECTS__ -function _nonnegative(params) { - return /* @__PURE__ */ _gte(0, params); +function _nonnegative(params2) { + return /* @__PURE__ */ _gte(0, params2); } // @__NO_SIDE_EFFECTS__ -function _multipleOf(value, params) { +function _multipleOf(value, params2) { return new $ZodCheckMultipleOf({ check: "multiple_of", - ...normalizeParams(params), + ...normalizeParams(params2), value }); } // @__NO_SIDE_EFFECTS__ -function _maxSize(maximum, params) { +function _maxSize(maximum, params2) { return new $ZodCheckMaxSize({ check: "max_size", - ...normalizeParams(params), + ...normalizeParams(params2), maximum }); } // @__NO_SIDE_EFFECTS__ -function _minSize(minimum, params) { +function _minSize(minimum, params2) { return new $ZodCheckMinSize({ check: "min_size", - ...normalizeParams(params), + ...normalizeParams(params2), minimum }); } // @__NO_SIDE_EFFECTS__ -function _size(size, params) { +function _size(size, params2) { return new $ZodCheckSizeEquals({ check: "size_equals", - ...normalizeParams(params), + ...normalizeParams(params2), size }); } // @__NO_SIDE_EFFECTS__ -function _maxLength(maximum, params) { +function _maxLength(maximum, params2) { const ch = new $ZodCheckMaxLength({ check: "max_length", - ...normalizeParams(params), + ...normalizeParams(params2), maximum }); return ch; } // @__NO_SIDE_EFFECTS__ -function _minLength(minimum, params) { +function _minLength(minimum, params2) { return new $ZodCheckMinLength({ check: "min_length", - ...normalizeParams(params), + ...normalizeParams(params2), minimum }); } // @__NO_SIDE_EFFECTS__ -function _length(length, params) { +function _length(length, params2) { return new $ZodCheckLengthEquals({ check: "length_equals", - ...normalizeParams(params), + ...normalizeParams(params2), length }); } // @__NO_SIDE_EFFECTS__ -function _regex(pattern, params) { +function _regex(pattern, params2) { return new $ZodCheckRegex({ check: "string_format", format: "regex", - ...normalizeParams(params), + ...normalizeParams(params2), pattern }); } // @__NO_SIDE_EFFECTS__ -function _lowercase(params) { +function _lowercase(params2) { return new $ZodCheckLowerCase({ check: "string_format", format: "lowercase", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _uppercase(params) { +function _uppercase(params2) { return new $ZodCheckUpperCase({ check: "string_format", format: "uppercase", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _includes(includes, params) { +function _includes(includes, params2) { return new $ZodCheckIncludes({ check: "string_format", format: "includes", - ...normalizeParams(params), + ...normalizeParams(params2), includes }); } // @__NO_SIDE_EFFECTS__ -function _startsWith(prefix, params) { +function _startsWith(prefix, params2) { return new $ZodCheckStartsWith({ check: "string_format", format: "starts_with", - ...normalizeParams(params), + ...normalizeParams(params2), prefix }); } // @__NO_SIDE_EFFECTS__ -function _endsWith(suffix, params) { +function _endsWith(suffix, params2) { return new $ZodCheckEndsWith({ check: "string_format", format: "ends_with", - ...normalizeParams(params), + ...normalizeParams(params2), suffix }); } // @__NO_SIDE_EFFECTS__ -function _property(property, schema, params) { +function _property(property, schema, params2) { return new $ZodCheckProperty({ check: "property", property, schema, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _mime(types, params) { +function _mime(types, params2) { return new $ZodCheckMimeType({ check: "mime_type", mime: types, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ @@ -12262,39 +12374,39 @@ function _slugify() { return /* @__PURE__ */ _overwrite((input) => slugify(input)); } // @__NO_SIDE_EFFECTS__ -function _array(Class2, element, params) { +function _array(Class2, element, params2) { return new Class2({ type: "array", element, // get element() { // return element; // }, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _union(Class2, options, params) { +function _union(Class2, options, params2) { return new Class2({ type: "union", options, - ...normalizeParams(params) + ...normalizeParams(params2) }); } -function _xor(Class2, options, params) { +function _xor(Class2, options, params2) { return new Class2({ type: "union", options, inclusive: false, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _discriminatedUnion(Class2, discriminator, options, params) { +function _discriminatedUnion(Class2, discriminator, options, params2) { return new Class2({ type: "union", options, discriminator, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ @@ -12308,71 +12420,71 @@ function _intersection(Class2, left, right) { // @__NO_SIDE_EFFECTS__ function _tuple(Class2, items, _paramsOrRest, _params) { const hasRest = _paramsOrRest instanceof $ZodType; - const params = hasRest ? _params : _paramsOrRest; + const params2 = hasRest ? _params : _paramsOrRest; const rest = hasRest ? _paramsOrRest : null; return new Class2({ type: "tuple", items, rest, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _record(Class2, keyType, valueType, params) { +function _record(Class2, keyType, valueType, params2) { return new Class2({ type: "record", keyType, valueType, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _map(Class2, keyType, valueType, params) { +function _map(Class2, keyType, valueType, params2) { return new Class2({ type: "map", keyType, valueType, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _set(Class2, valueType, params) { +function _set(Class2, valueType, params2) { return new Class2({ type: "set", valueType, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _enum(Class2, values, params) { +function _enum(Class2, values, params2) { const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; return new Class2({ type: "enum", entries, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _nativeEnum(Class2, entries, params) { +function _nativeEnum(Class2, entries, params2) { return new Class2({ type: "enum", entries, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _literal(Class2, value, params) { +function _literal(Class2, value, params2) { return new Class2({ type: "literal", values: Array.isArray(value) ? value : [value], - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ -function _file(Class2, params) { +function _file(Class2, params2) { return new Class2({ type: "file", - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ @@ -12407,11 +12519,11 @@ function _default(Class2, innerType, defaultValue) { }); } // @__NO_SIDE_EFFECTS__ -function _nonoptional(Class2, innerType, params) { +function _nonoptional(Class2, innerType, params2) { return new Class2({ type: "nonoptional", innerType, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ @@ -12445,11 +12557,11 @@ function _readonly(Class2, innerType) { }); } // @__NO_SIDE_EFFECTS__ -function _templateLiteral(Class2, parts, params) { +function _templateLiteral(Class2, parts, params2) { return new Class2({ type: "template_literal", parts, - ...normalizeParams(params) + ...normalizeParams(params2) }); } // @__NO_SIDE_EFFECTS__ @@ -12489,7 +12601,7 @@ function _refine(Class2, fn, _params) { return schema; } // @__NO_SIDE_EFFECTS__ -function _superRefine(fn, params) { +function _superRefine(fn, params2) { const ch = /* @__PURE__ */ _check((payload) => { payload.addIssue = (issue2) => { if (typeof issue2 === "string") { @@ -12506,14 +12618,14 @@ function _superRefine(fn, params) { } }; return fn(payload.value, payload); - }, params); + }, params2); return ch; } // @__NO_SIDE_EFFECTS__ -function _check(fn, params) { +function _check(fn, params2) { const ch = new $ZodCheck({ check: "custom", - ...normalizeParams(params) + ...normalizeParams(params2) }); ch._zod.check = fn; return ch; @@ -12546,10 +12658,10 @@ function meta(metadata) { } // @__NO_SIDE_EFFECTS__ function _stringbool(Classes, _params) { - const params = normalizeParams(_params); - let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; - let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; - if (params.case !== "sensitive") { + const params2 = normalizeParams(_params); + let truthyArray = params2.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params2.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params2.case !== "sensitive") { truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); } @@ -12558,15 +12670,15 @@ function _stringbool(Classes, _params) { const _Codec = Classes.Codec ?? $ZodCodec; const _Boolean = Classes.Boolean ?? $ZodBoolean; const _String = Classes.String ?? $ZodString; - const stringSchema = new _String({ type: "string", error: params.error }); - const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const stringSchema = new _String({ type: "string", error: params2.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params2.error }); const codec2 = new _Codec({ type: "pipe", in: stringSchema, out: booleanSchema, transform: ((input, payload) => { let data = input; - if (params.case !== "sensitive") + if (params2.case !== "sensitive") data = data.toLowerCase(); if (truthySet.has(data)) { return true; @@ -12591,20 +12703,20 @@ function _stringbool(Classes, _params) { return falsyArray[0] || "false"; } }), - error: params.error + error: params2.error }); return codec2; } // @__NO_SIDE_EFFECTS__ function _stringFormat(Class2, format, fnOrRegex, _params = {}) { - const params = normalizeParams(_params); + const params2 = normalizeParams(_params); const def = { ...normalizeParams(_params), check: "string_format", type: "string", format, fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), - ...params + ...params2 }; if (fnOrRegex instanceof RegExp) { def.pattern = fnOrRegex; @@ -12630,25 +12742,25 @@ var init_api = __esm({ }); // node_modules/zod/v4/core/to-json-schema.js -function initializeContext(params) { - let target = params?.target ?? "draft-2020-12"; +function initializeContext(params2) { + let target = params2?.target ?? "draft-2020-12"; if (target === "draft-4") target = "draft-04"; if (target === "draft-7") target = "draft-07"; return { - processors: params.processors ?? {}, - metadataRegistry: params?.metadata ?? globalRegistry, + processors: params2.processors ?? {}, + metadataRegistry: params2?.metadata ?? globalRegistry, target, - unrepresentable: params?.unrepresentable ?? "throw", - override: params?.override ?? (() => { + unrepresentable: params2?.unrepresentable ?? "throw", + override: params2?.override ?? (() => { }), - io: params?.io ?? "output", + io: params2?.io ?? "output", counter: 0, seen: /* @__PURE__ */ new Map(), - cycles: params?.cycles ?? "ref", - reused: params?.reused ?? "inline", - external: params?.external ?? void 0 + cycles: params2?.cycles ?? "ref", + reused: params2?.reused ?? "inline", + external: params2?.external ?? void 0 }; } function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { @@ -12669,26 +12781,26 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { if (overrideSchema) { result.schema = overrideSchema; } else { - const params = { + const params2 = { ..._params, schemaPath: [..._params.schemaPath, schema], path: _params.path }; if (schema._zod.processJSONSchema) { - schema._zod.processJSONSchema(ctx, result.schema, params); + schema._zod.processJSONSchema(ctx, result.schema, params2); } else { const _json = result.schema; const processor = ctx.processors[def.type]; if (!processor) { throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); } - processor(schema, ctx, _json, params); + processor(schema, ctx, _json, params2); } const parent = schema._zod.parent; if (parent) { if (!result.ref) result.ref = parent; - process2(parent, ctx, params); + process2(parent, ctx, params2); ctx.seen.get(parent).isParent = true; } } @@ -12978,14 +13090,14 @@ var createToJSONSchemaMethod, createStandardJSONSchemaMethod; var init_to_json_schema = __esm({ "node_modules/zod/v4/core/to-json-schema.js"() { init_registries(); - createToJSONSchemaMethod = (schema, processors = {}) => (params) => { - const ctx = initializeContext({ ...params, processors }); + createToJSONSchemaMethod = (schema, processors = {}) => (params2) => { + const ctx = initializeContext({ ...params2, processors }); process2(schema, ctx); extractDefs(ctx, schema); return finalize(ctx, schema); }; - createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => { - const { libraryOptions, target } = params ?? {}; + createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params2) => { + const { libraryOptions, target } = params2 ?? {}; const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); process2(schema, ctx); extractDefs(ctx, schema); @@ -12995,10 +13107,10 @@ var init_to_json_schema = __esm({ }); // node_modules/zod/v4/core/json-schema-processors.js -function toJSONSchema(input, params) { +function toJSONSchema(input, params2) { if ("_idmap" in input) { const registry2 = input; - const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const ctx2 = initializeContext({ ...params2, processors: allProcessors }); const defs = {}; for (const entry of registry2._idmap.entries()) { const [_, schema] = entry; @@ -13007,7 +13119,7 @@ function toJSONSchema(input, params) { const schemas = {}; const external = { registry: registry2, - uri: params?.uri, + uri: params2?.uri, defs }; ctx2.external = external; @@ -13024,7 +13136,7 @@ function toJSONSchema(input, params) { } return { schemas }; } - const ctx = initializeContext({ ...params, processors: allProcessors }); + const ctx = initializeContext({ ...params2, processors: allProcessors }); process2(input, ctx); extractDefs(ctx, input); return finalize(ctx, input); @@ -13265,7 +13377,7 @@ var init_json_schema_processors = __esm({ throw new Error("Set cannot be represented in JSON Schema"); } }; - arrayProcessor = (schema, ctx, _json, params) => { + arrayProcessor = (schema, ctx, _json, params2) => { const json2 = _json; const def = schema._zod.def; const { minimum, maximum } = schema._zod.bag; @@ -13275,11 +13387,11 @@ var init_json_schema_processors = __esm({ json2.maxItems = maximum; json2.type = "array"; json2.items = process2(def.element, ctx, { - ...params, - path: [...params.path, "items"] + ...params2, + path: [...params2.path, "items"] }); }; - objectProcessor = (schema, ctx, _json, params) => { + objectProcessor = (schema, ctx, _json, params2) => { const json2 = _json; const def = schema._zod.def; json2.type = "object"; @@ -13287,8 +13399,8 @@ var init_json_schema_processors = __esm({ const shape = def.shape; for (const key in shape) { json2.properties[key] = process2(shape[key], ctx, { - ...params, - path: [...params.path, "properties", key] + ...params2, + path: [...params2.path, "properties", key] }); } const allKeys = new Set(Object.keys(shape)); @@ -13310,17 +13422,17 @@ var init_json_schema_processors = __esm({ json2.additionalProperties = false; } else if (def.catchall) { json2.additionalProperties = process2(def.catchall, ctx, { - ...params, - path: [...params.path, "additionalProperties"] + ...params2, + path: [...params2.path, "additionalProperties"] }); } }; - unionProcessor = (schema, ctx, json2, params) => { + unionProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; const isExclusive = def.inclusive === false; const options = def.options.map((x, i) => process2(x, ctx, { - ...params, - path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] + ...params2, + path: [...params2.path, isExclusive ? "oneOf" : "anyOf", i] })); if (isExclusive) { json2.oneOf = options; @@ -13328,15 +13440,15 @@ var init_json_schema_processors = __esm({ json2.anyOf = options; } }; - intersectionProcessor = (schema, ctx, json2, params) => { + intersectionProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; const a = process2(def.left, ctx, { - ...params, - path: [...params.path, "allOf", 0] + ...params2, + path: [...params2.path, "allOf", 0] }); const b = process2(def.right, ctx, { - ...params, - path: [...params.path, "allOf", 1] + ...params2, + path: [...params2.path, "allOf", 1] }); const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; const allOf = [ @@ -13345,19 +13457,19 @@ var init_json_schema_processors = __esm({ ]; json2.allOf = allOf; }; - tupleProcessor = (schema, ctx, _json, params) => { + tupleProcessor = (schema, ctx, _json, params2) => { const json2 = _json; const def = schema._zod.def; json2.type = "array"; const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; const prefixItems = def.items.map((x, i) => process2(x, ctx, { - ...params, - path: [...params.path, prefixPath, i] + ...params2, + path: [...params2.path, prefixPath, i] })); const rest = def.rest ? process2(def.rest, ctx, { - ...params, - path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + ...params2, + path: [...params2.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] }) : null; if (ctx.target === "draft-2020-12") { json2.prefixItems = prefixItems; @@ -13387,7 +13499,7 @@ var init_json_schema_processors = __esm({ if (typeof maximum === "number") json2.maxItems = maximum; }; - recordProcessor = (schema, ctx, _json, params) => { + recordProcessor = (schema, ctx, _json, params2) => { const json2 = _json; const def = schema._zod.def; json2.type = "object"; @@ -13396,8 +13508,8 @@ var init_json_schema_processors = __esm({ const patterns = keyBag?.patterns; if (def.mode === "loose" && patterns && patterns.size > 0) { const valueSchema = process2(def.valueType, ctx, { - ...params, - path: [...params.path, "patternProperties", "*"] + ...params2, + path: [...params2.path, "patternProperties", "*"] }); json2.patternProperties = {}; for (const pattern of patterns) { @@ -13406,13 +13518,13 @@ var init_json_schema_processors = __esm({ } else { if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { json2.propertyNames = process2(def.keyType, ctx, { - ...params, - path: [...params.path, "propertyNames"] + ...params2, + path: [...params2.path, "propertyNames"] }); } json2.additionalProperties = process2(def.valueType, ctx, { - ...params, - path: [...params.path, "additionalProperties"] + ...params2, + path: [...params2.path, "additionalProperties"] }); } const keyValues = keyType._zod.values; @@ -13423,9 +13535,9 @@ var init_json_schema_processors = __esm({ } } }; - nullableProcessor = (schema, ctx, json2, params) => { + nullableProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; - const inner2 = process2(def.innerType, ctx, params); + const inner2 = process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); if (ctx.target === "openapi-3.0") { seen.ref = def.innerType; @@ -13434,30 +13546,30 @@ var init_json_schema_processors = __esm({ json2.anyOf = [inner2, { type: "null" }]; } }; - nonoptionalProcessor = (schema, ctx, _json, params) => { + nonoptionalProcessor = (schema, ctx, _json, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; }; - defaultProcessor = (schema, ctx, json2, params) => { + defaultProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; json2.default = JSON.parse(JSON.stringify(def.defaultValue)); }; - prefaultProcessor = (schema, ctx, json2, params) => { + prefaultProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; if (ctx.io === "input") json2._prefault = JSON.parse(JSON.stringify(def.defaultValue)); }; - catchProcessor = (schema, ctx, json2, params) => { + catchProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; let catchValue; @@ -13468,36 +13580,36 @@ var init_json_schema_processors = __esm({ } json2.default = catchValue; }; - pipeProcessor = (schema, ctx, _json, params) => { + pipeProcessor = (schema, ctx, _json, params2) => { const def = schema._zod.def; const inIsTransform = def.in._zod.traits.has("$ZodTransform"); const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out; - process2(innerType, ctx, params); + process2(innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = innerType; }; - readonlyProcessor = (schema, ctx, json2, params) => { + readonlyProcessor = (schema, ctx, json2, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; json2.readOnly = true; }; - promiseProcessor = (schema, ctx, _json, params) => { + promiseProcessor = (schema, ctx, _json, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; }; - optionalProcessor = (schema, ctx, _json, params) => { + optionalProcessor = (schema, ctx, _json, params2) => { const def = schema._zod.def; - process2(def.innerType, ctx, params); + process2(def.innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = def.innerType; }; - lazyProcessor = (schema, ctx, _json, params) => { + lazyProcessor = (schema, ctx, _json, params2) => { const innerType = schema._zod.innerType; - process2(innerType, ctx, params); + process2(innerType, ctx, params2); const seen = ctx.seen.get(schema); seen.ref = innerType; }; @@ -13583,8 +13695,8 @@ var init_json_schema_generator = __esm({ get seen() { return this.ctx.seen; } - constructor(params) { - let normalizedTarget = params?.target ?? "draft-2020-12"; + constructor(params2) { + let normalizedTarget = params2?.target ?? "draft-2020-12"; if (normalizedTarget === "draft-4") normalizedTarget = "draft-04"; if (normalizedTarget === "draft-7") @@ -13592,10 +13704,10 @@ var init_json_schema_generator = __esm({ this.ctx = initializeContext({ processors: allProcessors, target: normalizedTarget, - ...params?.metadata && { metadata: params.metadata }, - ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, - ...params?.override && { override: params.override }, - ...params?.io && { io: params.io } + ...params2?.metadata && { metadata: params2.metadata }, + ...params2?.unrepresentable && { unrepresentable: params2.unrepresentable }, + ...params2?.override && { override: params2.override }, + ...params2?.io && { io: params2.io } }); } /** @@ -13984,17 +14096,17 @@ __export(iso_exports, { duration: () => duration2, time: () => time2 }); -function datetime2(params) { - return _isoDateTime(ZodISODateTime, params); +function datetime2(params2) { + return _isoDateTime(ZodISODateTime, params2); } -function date2(params) { - return _isoDate(ZodISODate, params); +function date2(params2) { + return _isoDate(ZodISODate, params2); } -function time2(params) { - return _isoTime(ZodISOTime, params); +function time2(params2) { + return _isoTime(ZodISOTime, params2); } -function duration2(params) { - return _isoDuration(ZodISODuration, params); +function duration2(params2) { + return _isoDuration(ZodISODuration, params2); } var ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration; var init_iso = __esm({ @@ -14295,84 +14407,84 @@ function _installLazyMethods(inst, group, methods) { }); } } -function string2(params) { - return _string(ZodString, params); +function string2(params2) { + return _string(ZodString, params2); } -function email2(params) { - return _email(ZodEmail, params); +function email2(params2) { + return _email(ZodEmail, params2); } -function guid2(params) { - return _guid(ZodGUID, params); +function guid2(params2) { + return _guid(ZodGUID, params2); } -function uuid2(params) { - return _uuid(ZodUUID, params); +function uuid2(params2) { + return _uuid(ZodUUID, params2); } -function uuidv4(params) { - return _uuidv4(ZodUUID, params); +function uuidv4(params2) { + return _uuidv4(ZodUUID, params2); } -function uuidv6(params) { - return _uuidv6(ZodUUID, params); +function uuidv6(params2) { + return _uuidv6(ZodUUID, params2); } -function uuidv7(params) { - return _uuidv7(ZodUUID, params); +function uuidv7(params2) { + return _uuidv7(ZodUUID, params2); } -function url(params) { - return _url(ZodURL, params); +function url(params2) { + return _url(ZodURL, params2); } -function httpUrl(params) { +function httpUrl(params2) { return _url(ZodURL, { protocol: regexes_exports.httpProtocol, hostname: regexes_exports.domain, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function emoji2(params) { - return _emoji2(ZodEmoji, params); +function emoji2(params2) { + return _emoji2(ZodEmoji, params2); } -function nanoid2(params) { - return _nanoid(ZodNanoID, params); +function nanoid2(params2) { + return _nanoid(ZodNanoID, params2); } -function cuid3(params) { - return _cuid(ZodCUID, params); +function cuid3(params2) { + return _cuid(ZodCUID, params2); } -function cuid22(params) { - return _cuid2(ZodCUID2, params); +function cuid22(params2) { + return _cuid2(ZodCUID2, params2); } -function ulid2(params) { - return _ulid(ZodULID, params); +function ulid2(params2) { + return _ulid(ZodULID, params2); } -function xid2(params) { - return _xid(ZodXID, params); +function xid2(params2) { + return _xid(ZodXID, params2); } -function ksuid2(params) { - return _ksuid(ZodKSUID, params); +function ksuid2(params2) { + return _ksuid(ZodKSUID, params2); } -function ipv42(params) { - return _ipv4(ZodIPv4, params); +function ipv42(params2) { + return _ipv4(ZodIPv4, params2); } -function mac2(params) { - return _mac(ZodMAC, params); +function mac2(params2) { + return _mac(ZodMAC, params2); } -function ipv62(params) { - return _ipv6(ZodIPv6, params); +function ipv62(params2) { + return _ipv6(ZodIPv6, params2); } -function cidrv42(params) { - return _cidrv4(ZodCIDRv4, params); +function cidrv42(params2) { + return _cidrv4(ZodCIDRv4, params2); } -function cidrv62(params) { - return _cidrv6(ZodCIDRv6, params); +function cidrv62(params2) { + return _cidrv6(ZodCIDRv6, params2); } -function base642(params) { - return _base64(ZodBase64, params); +function base642(params2) { + return _base64(ZodBase64, params2); } -function base64url2(params) { - return _base64url(ZodBase64URL, params); +function base64url2(params2) { + return _base64url(ZodBase64URL, params2); } -function e1642(params) { - return _e164(ZodE164, params); +function e1642(params2) { + return _e164(ZodE164, params2); } -function jwt(params) { - return _jwt(ZodJWT, params); +function jwt(params2) { + return _jwt(ZodJWT, params2); } function stringFormat(format, fnOrRegex, _params = {}) { return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params); @@ -14383,52 +14495,52 @@ function hostname2(_params) { function hex2(_params) { return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); } -function hash(alg, params) { - const enc = params?.enc ?? "hex"; +function hash(alg, params2) { + const enc = params2?.enc ?? "hex"; const format = `${alg}_${enc}`; const regex = regexes_exports[format]; if (!regex) throw new Error(`Unrecognized hash format: ${format}`); - return _stringFormat(ZodCustomStringFormat, format, regex, params); + return _stringFormat(ZodCustomStringFormat, format, regex, params2); } -function number2(params) { - return _number(ZodNumber, params); +function number2(params2) { + return _number(ZodNumber, params2); } -function int(params) { - return _int(ZodNumberFormat, params); +function int(params2) { + return _int(ZodNumberFormat, params2); } -function float32(params) { - return _float32(ZodNumberFormat, params); +function float32(params2) { + return _float32(ZodNumberFormat, params2); } -function float64(params) { - return _float64(ZodNumberFormat, params); +function float64(params2) { + return _float64(ZodNumberFormat, params2); } -function int32(params) { - return _int32(ZodNumberFormat, params); +function int32(params2) { + return _int32(ZodNumberFormat, params2); } -function uint32(params) { - return _uint32(ZodNumberFormat, params); +function uint32(params2) { + return _uint32(ZodNumberFormat, params2); } -function boolean2(params) { - return _boolean(ZodBoolean, params); +function boolean2(params2) { + return _boolean(ZodBoolean, params2); } -function bigint2(params) { - return _bigint(ZodBigInt, params); +function bigint2(params2) { + return _bigint(ZodBigInt, params2); } -function int64(params) { - return _int64(ZodBigIntFormat, params); +function int64(params2) { + return _int64(ZodBigIntFormat, params2); } -function uint64(params) { - return _uint64(ZodBigIntFormat, params); +function uint64(params2) { + return _uint64(ZodBigIntFormat, params2); } -function symbol(params) { - return _symbol(ZodSymbol, params); +function symbol(params2) { + return _symbol(ZodSymbol, params2); } -function _undefined3(params) { - return _undefined2(ZodUndefined, params); +function _undefined3(params2) { + return _undefined2(ZodUndefined, params2); } -function _null3(params) { - return _null2(ZodNull, params); +function _null3(params2) { + return _null2(ZodNull, params2); } function any() { return _any(ZodAny); @@ -14436,67 +14548,67 @@ function any() { function unknown() { return _unknown(ZodUnknown); } -function never(params) { - return _never(ZodNever, params); +function never(params2) { + return _never(ZodNever, params2); } -function _void2(params) { - return _void(ZodVoid, params); +function _void2(params2) { + return _void(ZodVoid, params2); } -function date3(params) { - return _date(ZodDate, params); +function date3(params2) { + return _date(ZodDate, params2); } -function array(element, params) { - return _array(ZodArray, element, params); +function array(element, params2) { + return _array(ZodArray, element, params2); } function keyof(schema) { const shape = schema._zod.def.shape; return _enum2(Object.keys(shape)); } -function object(shape, params) { +function object(shape, params2) { const def = { type: "object", shape: shape ?? {}, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }; return new ZodObject(def); } -function strictObject(shape, params) { +function strictObject(shape, params2) { return new ZodObject({ type: "object", shape, catchall: never(), - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function looseObject(shape, params) { +function looseObject(shape, params2) { return new ZodObject({ type: "object", shape, catchall: unknown(), - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function union(options, params) { +function union(options, params2) { return new ZodUnion({ type: "union", options, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function xor(options, params) { +function xor(options, params2) { return new ZodXor({ type: "union", options, inclusive: false, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function discriminatedUnion(discriminator, options, params) { +function discriminatedUnion(discriminator, options, params2) { return new ZodDiscriminatedUnion({ type: "union", options, discriminator, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } function intersection(left, right) { @@ -14508,16 +14620,16 @@ function intersection(left, right) { } function tuple(items, _paramsOrRest, _params) { const hasRest = _paramsOrRest instanceof $ZodType; - const params = hasRest ? _params : _paramsOrRest; + const params2 = hasRest ? _params : _paramsOrRest; const rest = hasRest ? _paramsOrRest : null; return new ZodTuple({ type: "tuple", items, rest, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function record(keyType, valueType, params) { +function record(keyType, valueType, params2) { if (!valueType || !valueType._zod) { return new ZodRecord({ type: "record", @@ -14530,67 +14642,67 @@ function record(keyType, valueType, params) { type: "record", keyType, valueType, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function partialRecord(keyType, valueType, params) { +function partialRecord(keyType, valueType, params2) { const k = clone(keyType); k._zod.values = void 0; return new ZodRecord({ type: "record", keyType: k, valueType, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function looseRecord(keyType, valueType, params) { +function looseRecord(keyType, valueType, params2) { return new ZodRecord({ type: "record", keyType, valueType, mode: "loose", - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function map(keyType, valueType, params) { +function map(keyType, valueType, params2) { return new ZodMap({ type: "map", keyType, valueType, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function set(valueType, params) { +function set(valueType, params2) { return new ZodSet({ type: "set", valueType, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function _enum2(values, params) { +function _enum2(values, params2) { const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; return new ZodEnum({ type: "enum", entries, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function nativeEnum(entries, params) { +function nativeEnum(entries, params2) { return new ZodEnum({ type: "enum", entries, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function literal(value, params) { +function literal(value, params2) { return new ZodLiteral({ type: "literal", values: Array.isArray(value) ? value : [value], - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } -function file(params) { - return _file(ZodFile, params); +function file(params2) { + return _file(ZodFile, params2); } function transform(fn) { return new ZodTransform({ @@ -14637,11 +14749,11 @@ function prefault(innerType, defaultValue) { } }); } -function nonoptional(innerType, params) { +function nonoptional(innerType, params2) { return new ZodNonOptional({ type: "nonoptional", innerType, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } function success(innerType) { @@ -14657,8 +14769,8 @@ function _catch2(innerType, catchValue) { catchValue: typeof catchValue === "function" ? catchValue : () => catchValue }); } -function nan(params) { - return _nan(ZodNaN, params); +function nan(params2) { + return _nan(ZodNaN, params2); } function pipe(in_, out) { return new ZodPipe({ @@ -14668,13 +14780,13 @@ function pipe(in_, out) { // ...util.normalizeParams(params), }); } -function codec(in_, out, params) { +function codec(in_, out, params2) { return new ZodCodec({ type: "pipe", in: in_, out, - transform: params.decode, - reverseTransform: params.encode + transform: params2.decode, + reverseTransform: params2.encode }); } function invertCodec(codec2) { @@ -14693,11 +14805,11 @@ function readonly(innerType) { innerType }); } -function templateLiteral(parts, params) { +function templateLiteral(parts, params2) { return new ZodTemplateLiteral({ type: "template_literal", parts, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); } function lazy(getter) { @@ -14712,11 +14824,11 @@ function promise(innerType) { innerType }); } -function _function(params) { +function _function(params2) { return new ZodFunction({ type: "function", - input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), - output: params?.output ?? unknown() + input: Array.isArray(params2?.input) ? tuple(params2?.input) : params2?.input ?? array(unknown()), + output: params2?.output ?? unknown() }); } function check(fn) { @@ -14733,16 +14845,16 @@ function custom(fn, _params) { function refine(fn, _params = {}) { return _refine(ZodCustom, fn, _params); } -function superRefine(fn, params) { - return _superRefine(fn, params); +function superRefine(fn, params2) { + return _superRefine(fn, params2); } -function _instanceof(cls, params = {}) { +function _instanceof(cls, params2 = {}) { const inst = new ZodCustom({ type: "custom", check: "custom", fn: (data) => data instanceof cls, abort: true, - ...util_exports.normalizeParams(params) + ...util_exports.normalizeParams(params2) }); inst._zod.bag.Class = cls; inst._zod.check = (payload) => { @@ -14758,9 +14870,9 @@ function _instanceof(cls, params = {}) { }; return inst; } -function json(params) { +function json(params2) { const jsonSchema = lazy(() => { - return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + return union([string2(params2), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); }); return jsonSchema; } @@ -14794,19 +14906,19 @@ var init_schemas2 = __esm({ inst.def = def; inst.type = def.type; Object.defineProperty(inst, "_def", { value: def }); - inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); - inst.safeParse = (data, params) => safeParse2(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); - inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.parse = (data, params2) => parse2(inst, data, params2, { callee: inst.parse }); + inst.safeParse = (data, params2) => safeParse2(inst, data, params2); + inst.parseAsync = async (data, params2) => parseAsync2(inst, data, params2, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params2) => safeParseAsync2(inst, data, params2); inst.spa = inst.safeParseAsync; - inst.encode = (data, params) => encode2(inst, data, params); - inst.decode = (data, params) => decode2(inst, data, params); - inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); - inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); - inst.safeEncode = (data, params) => safeEncode2(inst, data, params); - inst.safeDecode = (data, params) => safeDecode2(inst, data, params); - inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); - inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.encode = (data, params2) => encode2(inst, data, params2); + inst.decode = (data, params2) => decode2(inst, data, params2); + inst.encodeAsync = async (data, params2) => encodeAsync2(inst, data, params2); + inst.decodeAsync = async (data, params2) => decodeAsync2(inst, data, params2); + inst.safeEncode = (data, params2) => safeEncode2(inst, data, params2); + inst.safeDecode = (data, params2) => safeDecode2(inst, data, params2); + inst.safeEncodeAsync = async (data, params2) => safeEncodeAsync2(inst, data, params2); + inst.safeDecodeAsync = async (data, params2) => safeDecodeAsync2(inst, data, params2); _installLazyMethods(inst, "ZodType", { check(...chks) { const def2 = this.def; @@ -14820,8 +14932,8 @@ var init_schemas2 = __esm({ with(...chks) { return this.check(...chks); }, - clone(def2, params) { - return clone(this, def2, params); + clone(def2, params2) { + return clone(this, def2, params2); }, brand() { return this; @@ -14830,11 +14942,11 @@ var init_schemas2 = __esm({ reg.add(this, meta4); return this; }, - refine(check2, params) { - return this.check(refine(check2, params)); + refine(check2, params2) { + return this.check(refine(check2, params2)); }, - superRefine(refinement, params) { - return this.check(superRefine(refinement, params)); + superRefine(refinement, params2) { + return this.check(superRefine(refinement, params2)); }, overwrite(fn) { return this.check(_overwrite(fn)); @@ -14851,8 +14963,8 @@ var init_schemas2 = __esm({ nullish() { return optional(nullable(this)); }, - nonoptional(params) { - return nonoptional(this, params); + nonoptional(params2) { + return nonoptional(this, params2); }, array() { return array(this); @@ -14872,8 +14984,8 @@ var init_schemas2 = __esm({ prefault(d) { return prefault(this, d); }, - catch(params) { - return _catch2(this, params); + catch(params2) { + return _catch2(this, params2); }, pipe(target) { return pipe(this, target); @@ -14914,7 +15026,7 @@ var init_schemas2 = __esm({ _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { $ZodString.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => stringProcessor(inst, ctx, json2, params2); const bag = inst._zod.bag; inst.format = bag.format ?? null; inst.minLength = bag.minimum ?? null; @@ -14944,11 +15056,11 @@ var init_schemas2 = __esm({ nonempty(...args) { return this.check(_minLength(1, ...args)); }, - lowercase(params) { - return this.check(_lowercase(params)); + lowercase(params2) { + return this.check(_lowercase(params2)); }, - uppercase(params) { - return this.check(_uppercase(params)); + uppercase(params2) { + return this.check(_uppercase(params2)); }, trim() { return this.check(_trim()); @@ -14970,33 +15082,33 @@ var init_schemas2 = __esm({ ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { $ZodString.init(inst, def); _ZodString.init(inst, def); - inst.email = (params) => inst.check(_email(ZodEmail, params)); - inst.url = (params) => inst.check(_url(ZodURL, params)); - inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); - inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); - inst.guid = (params) => inst.check(_guid(ZodGUID, params)); - inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); - inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); - inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); - inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); - inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); - inst.guid = (params) => inst.check(_guid(ZodGUID, params)); - inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); - inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); - inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); - inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); - inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); - inst.xid = (params) => inst.check(_xid(ZodXID, params)); - inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); - inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); - inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); - inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); - inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); - inst.e164 = (params) => inst.check(_e164(ZodE164, params)); - inst.datetime = (params) => inst.check(datetime2(params)); - inst.date = (params) => inst.check(date2(params)); - inst.time = (params) => inst.check(time2(params)); - inst.duration = (params) => inst.check(duration2(params)); + inst.email = (params2) => inst.check(_email(ZodEmail, params2)); + inst.url = (params2) => inst.check(_url(ZodURL, params2)); + inst.jwt = (params2) => inst.check(_jwt(ZodJWT, params2)); + inst.emoji = (params2) => inst.check(_emoji2(ZodEmoji, params2)); + inst.guid = (params2) => inst.check(_guid(ZodGUID, params2)); + inst.uuid = (params2) => inst.check(_uuid(ZodUUID, params2)); + inst.uuidv4 = (params2) => inst.check(_uuidv4(ZodUUID, params2)); + inst.uuidv6 = (params2) => inst.check(_uuidv6(ZodUUID, params2)); + inst.uuidv7 = (params2) => inst.check(_uuidv7(ZodUUID, params2)); + inst.nanoid = (params2) => inst.check(_nanoid(ZodNanoID, params2)); + inst.guid = (params2) => inst.check(_guid(ZodGUID, params2)); + inst.cuid = (params2) => inst.check(_cuid(ZodCUID, params2)); + inst.cuid2 = (params2) => inst.check(_cuid2(ZodCUID2, params2)); + inst.ulid = (params2) => inst.check(_ulid(ZodULID, params2)); + inst.base64 = (params2) => inst.check(_base64(ZodBase64, params2)); + inst.base64url = (params2) => inst.check(_base64url(ZodBase64URL, params2)); + inst.xid = (params2) => inst.check(_xid(ZodXID, params2)); + inst.ksuid = (params2) => inst.check(_ksuid(ZodKSUID, params2)); + inst.ipv4 = (params2) => inst.check(_ipv4(ZodIPv4, params2)); + inst.ipv6 = (params2) => inst.check(_ipv6(ZodIPv6, params2)); + inst.cidrv4 = (params2) => inst.check(_cidrv4(ZodCIDRv4, params2)); + inst.cidrv6 = (params2) => inst.check(_cidrv6(ZodCIDRv6, params2)); + inst.e164 = (params2) => inst.check(_e164(ZodE164, params2)); + inst.datetime = (params2) => inst.check(datetime2(params2)); + inst.date = (params2) => inst.check(date2(params2)); + inst.time = (params2) => inst.check(time2(params2)); + inst.duration = (params2) => inst.check(duration2(params2)); }); ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { $ZodStringFormat.init(inst, def); @@ -15089,49 +15201,49 @@ var init_schemas2 = __esm({ ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { $ZodNumber.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => numberProcessor(inst, ctx, json2, params2); _installLazyMethods(inst, "ZodNumber", { - gt(value, params) { - return this.check(_gt(value, params)); + gt(value, params2) { + return this.check(_gt(value, params2)); }, - gte(value, params) { - return this.check(_gte(value, params)); + gte(value, params2) { + return this.check(_gte(value, params2)); }, - min(value, params) { - return this.check(_gte(value, params)); + min(value, params2) { + return this.check(_gte(value, params2)); }, - lt(value, params) { - return this.check(_lt(value, params)); + lt(value, params2) { + return this.check(_lt(value, params2)); }, - lte(value, params) { - return this.check(_lte(value, params)); + lte(value, params2) { + return this.check(_lte(value, params2)); }, - max(value, params) { - return this.check(_lte(value, params)); + max(value, params2) { + return this.check(_lte(value, params2)); }, - int(params) { - return this.check(int(params)); + int(params2) { + return this.check(int(params2)); }, - safe(params) { - return this.check(int(params)); + safe(params2) { + return this.check(int(params2)); }, - positive(params) { - return this.check(_gt(0, params)); + positive(params2) { + return this.check(_gt(0, params2)); }, - nonnegative(params) { - return this.check(_gte(0, params)); + nonnegative(params2) { + return this.check(_gte(0, params2)); }, - negative(params) { - return this.check(_lt(0, params)); + negative(params2) { + return this.check(_lt(0, params2)); }, - nonpositive(params) { - return this.check(_lte(0, params)); + nonpositive(params2) { + return this.check(_lte(0, params2)); }, - multipleOf(value, params) { - return this.check(_multipleOf(value, params)); + multipleOf(value, params2) { + return this.check(_multipleOf(value, params2)); }, - step(value, params) { - return this.check(_multipleOf(value, params)); + step(value, params2) { + return this.check(_multipleOf(value, params2)); }, finite() { return this; @@ -15151,25 +15263,25 @@ var init_schemas2 = __esm({ ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { $ZodBoolean.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => booleanProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => booleanProcessor(inst, ctx, json2, params2); }); ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { $ZodBigInt.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.gt = (value, params) => inst.check(_gt(value, params)); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.lt = (value, params) => inst.check(_lt(value, params)); - inst.lte = (value, params) => inst.check(_lte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - inst.positive = (params) => inst.check(_gt(BigInt(0), params)); - inst.negative = (params) => inst.check(_lt(BigInt(0), params)); - inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); - inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); - inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst._zod.processJSONSchema = (ctx, json2, params2) => bigintProcessor(inst, ctx, json2, params2); + inst.gte = (value, params2) => inst.check(_gte(value, params2)); + inst.min = (value, params2) => inst.check(_gte(value, params2)); + inst.gt = (value, params2) => inst.check(_gt(value, params2)); + inst.gte = (value, params2) => inst.check(_gte(value, params2)); + inst.min = (value, params2) => inst.check(_gte(value, params2)); + inst.lt = (value, params2) => inst.check(_lt(value, params2)); + inst.lte = (value, params2) => inst.check(_lte(value, params2)); + inst.max = (value, params2) => inst.check(_lte(value, params2)); + inst.positive = (params2) => inst.check(_gt(BigInt(0), params2)); + inst.negative = (params2) => inst.check(_lt(BigInt(0), params2)); + inst.nonpositive = (params2) => inst.check(_lte(BigInt(0), params2)); + inst.nonnegative = (params2) => inst.check(_gte(BigInt(0), params2)); + inst.multipleOf = (value, params2) => inst.check(_multipleOf(value, params2)); const bag = inst._zod.bag; inst.minValue = bag.minimum ?? null; inst.maxValue = bag.maximum ?? null; @@ -15182,44 +15294,44 @@ var init_schemas2 = __esm({ ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { $ZodSymbol.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => symbolProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => symbolProcessor(inst, ctx, json2, params2); }); ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { $ZodUndefined.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => undefinedProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => undefinedProcessor(inst, ctx, json2, params2); }); ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { $ZodNull.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => nullProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => nullProcessor(inst, ctx, json2, params2); }); ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { $ZodAny.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => anyProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => anyProcessor(inst, ctx, json2, params2); }); ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { $ZodUnknown.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => unknownProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => unknownProcessor(inst, ctx, json2, params2); }); ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { $ZodNever.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => neverProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => neverProcessor(inst, ctx, json2, params2); }); ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { $ZodVoid.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => voidProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => voidProcessor(inst, ctx, json2, params2); }); ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { $ZodDate.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); + inst._zod.processJSONSchema = (ctx, json2, params2) => dateProcessor(inst, ctx, json2, params2); + inst.min = (value, params2) => inst.check(_gte(value, params2)); + inst.max = (value, params2) => inst.check(_lte(value, params2)); const c = inst._zod.bag; inst.minDate = c.minimum ? new Date(c.minimum) : null; inst.maxDate = c.maximum ? new Date(c.maximum) : null; @@ -15227,20 +15339,20 @@ var init_schemas2 = __esm({ ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { $ZodArray.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => arrayProcessor(inst, ctx, json2, params2); inst.element = def.element; _installLazyMethods(inst, "ZodArray", { - min(n, params) { - return this.check(_minLength(n, params)); + min(n, params2) { + return this.check(_minLength(n, params2)); }, - nonempty(params) { - return this.check(_minLength(1, params)); + nonempty(params2) { + return this.check(_minLength(1, params2)); }, - max(n, params) { - return this.check(_maxLength(n, params)); + max(n, params2) { + return this.check(_maxLength(n, params2)); }, - length(n, params) { - return this.check(_length(n, params)); + length(n, params2) { + return this.check(_length(n, params2)); }, unwrap() { return this.element; @@ -15250,7 +15362,7 @@ var init_schemas2 = __esm({ ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { $ZodObjectJIT.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => objectProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => objectProcessor(inst, ctx, json2, params2); util_exports.defineLazy(inst, "shape", () => { return def.shape; }); @@ -15299,13 +15411,13 @@ var init_schemas2 = __esm({ ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { $ZodUnion.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => unionProcessor(inst, ctx, json2, params2); inst.options = def.options; }); ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { ZodUnion.init(inst, def); $ZodXor.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => unionProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => unionProcessor(inst, ctx, json2, params2); inst.options = def.options; }); ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { @@ -15315,12 +15427,12 @@ var init_schemas2 = __esm({ ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { $ZodIntersection.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => intersectionProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => intersectionProcessor(inst, ctx, json2, params2); }); ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { $ZodTuple.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => tupleProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => tupleProcessor(inst, ctx, json2, params2); inst.rest = (rest) => inst.clone({ ...inst._zod.def, rest @@ -15329,38 +15441,38 @@ var init_schemas2 = __esm({ ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { $ZodRecord.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => recordProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => recordProcessor(inst, ctx, json2, params2); inst.keyType = def.keyType; inst.valueType = def.valueType; }); ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { $ZodMap.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => mapProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => mapProcessor(inst, ctx, json2, params2); inst.keyType = def.keyType; inst.valueType = def.valueType; inst.min = (...args) => inst.check(_minSize(...args)); - inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.nonempty = (params2) => inst.check(_minSize(1, params2)); inst.max = (...args) => inst.check(_maxSize(...args)); inst.size = (...args) => inst.check(_size(...args)); }); ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { $ZodSet.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => setProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => setProcessor(inst, ctx, json2, params2); inst.min = (...args) => inst.check(_minSize(...args)); - inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.nonempty = (params2) => inst.check(_minSize(1, params2)); inst.max = (...args) => inst.check(_maxSize(...args)); inst.size = (...args) => inst.check(_size(...args)); }); ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { $ZodEnum.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => enumProcessor(inst, ctx, json2, params2); inst.enum = def.entries; inst.options = Object.values(def.entries); const keys = new Set(Object.keys(def.entries)); - inst.extract = (values, params) => { + inst.extract = (values, params2) => { const newEntries = {}; for (const value of values) { if (keys.has(value)) { @@ -15371,11 +15483,11 @@ var init_schemas2 = __esm({ return new ZodEnum({ ...def, checks: [], - ...util_exports.normalizeParams(params), + ...util_exports.normalizeParams(params2), entries: newEntries }); }; - inst.exclude = (values, params) => { + inst.exclude = (values, params2) => { const newEntries = { ...def.entries }; for (const value of values) { if (keys.has(value)) { @@ -15386,7 +15498,7 @@ var init_schemas2 = __esm({ return new ZodEnum({ ...def, checks: [], - ...util_exports.normalizeParams(params), + ...util_exports.normalizeParams(params2), entries: newEntries }); }; @@ -15394,7 +15506,7 @@ var init_schemas2 = __esm({ ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { $ZodLiteral.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => literalProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => literalProcessor(inst, ctx, json2, params2); inst.values = new Set(def.values); Object.defineProperty(inst, "value", { get() { @@ -15408,15 +15520,15 @@ var init_schemas2 = __esm({ ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { $ZodFile.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => fileProcessor(inst, ctx, json2, params); - inst.min = (size, params) => inst.check(_minSize(size, params)); - inst.max = (size, params) => inst.check(_maxSize(size, params)); - inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); + inst._zod.processJSONSchema = (ctx, json2, params2) => fileProcessor(inst, ctx, json2, params2); + inst.min = (size, params2) => inst.check(_minSize(size, params2)); + inst.max = (size, params2) => inst.check(_maxSize(size, params2)); + inst.mime = (types, params2) => inst.check(_mime(Array.isArray(types) ? types : [types], params2)); }); ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { $ZodTransform.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => transformProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => transformProcessor(inst, ctx, json2, params2); inst._zod.parse = (payload, _ctx) => { if (_ctx.direction === "backward") { throw new $ZodEncodeError(inst.constructor.name); @@ -15450,62 +15562,62 @@ var init_schemas2 = __esm({ ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { $ZodOptional.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => optionalProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { $ZodExactOptional.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => optionalProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => optionalProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { $ZodNullable.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => nullableProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => nullableProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { $ZodDefault.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => defaultProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => defaultProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; inst.removeDefault = inst.unwrap; }); ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { $ZodPrefault.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => prefaultProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => prefaultProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { $ZodNonOptional.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => nonoptionalProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => nonoptionalProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { $ZodSuccess.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => successProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => successProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { $ZodCatch.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => catchProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => catchProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; inst.removeCatch = inst.unwrap; }); ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { $ZodNaN.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => nanProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => nanProcessor(inst, ctx, json2, params2); }); ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { $ZodPipe.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => pipeProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => pipeProcessor(inst, ctx, json2, params2); inst.in = def.in; inst.out = def.out; }); @@ -15520,35 +15632,35 @@ var init_schemas2 = __esm({ ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { $ZodReadonly.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => readonlyProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => readonlyProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { $ZodTemplateLiteral.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => templateLiteralProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => templateLiteralProcessor(inst, ctx, json2, params2); }); ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { $ZodLazy.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => lazyProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => lazyProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.getter(); }); ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { $ZodPromise.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => promiseProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => promiseProcessor(inst, ctx, json2, params2); inst.unwrap = () => inst._zod.def.innerType; }); ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { $ZodFunction.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => functionProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => functionProcessor(inst, ctx, json2, params2); }); ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { $ZodCustom.init(inst, def); ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json2, params) => customProcessor(inst, ctx, json2, params); + inst._zod.processJSONSchema = (ctx, json2, params2) => customProcessor(inst, ctx, json2, params2); }); describe2 = describe; meta2 = meta; @@ -15972,7 +16084,7 @@ function convertSchema(schema, ctx) { } return baseSchema; } -function fromJSONSchema(schema, params) { +function fromJSONSchema(schema, params2) { if (typeof schema === "boolean") { return schema ? z.any() : z.never(); } @@ -15982,7 +16094,7 @@ function fromJSONSchema(schema, params) { } catch { throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas"); } - const version2 = detectVersion(normalized, params?.defaultTarget); + const version2 = detectVersion(normalized, params2?.defaultTarget); const defs = normalized.$defs || normalized.definitions || {}; const ctx = { version: version2, @@ -15990,7 +16102,7 @@ function fromJSONSchema(schema, params) { refs: /* @__PURE__ */ new Map(), processing: /* @__PURE__ */ new Set(), rootSchema: normalized, - registry: params?.registry ?? globalRegistry + registry: params2?.registry ?? globalRegistry }; return convertSchema(normalized, ctx); } @@ -16089,20 +16201,20 @@ __export(coerce_exports, { number: () => number3, string: () => string3 }); -function string3(params) { - return _coercedString(ZodString, params); +function string3(params2) { + return _coercedString(ZodString, params2); } -function number3(params) { - return _coercedNumber(ZodNumber, params); +function number3(params2) { + return _coercedNumber(ZodNumber, params2); } -function boolean3(params) { - return _coercedBoolean(ZodBoolean, params); +function boolean3(params2) { + return _coercedBoolean(ZodBoolean, params2); } -function bigint3(params) { - return _coercedBigint(ZodBigInt, params); +function bigint3(params2) { + return _coercedBigint(ZodBigInt, params2); } -function date4(params) { - return _coercedDate(ZodDate, params); +function date4(params2) { + return _coercedDate(ZodDate, params2); } var init_coerce = __esm({ "node_modules/zod/v4/classic/coerce.js"() { @@ -16382,25 +16494,3291 @@ var init_zod = __esm({ } }); -// node_modules/@intentius/chant/src/config.ts +// node_modules/@intentius/chant/src/components/verbs/bom-writer.ts +function stableId(input) { + let hash2 = 0; + for (let i = 0; i < input.length; i++) { + hash2 = Math.imul(hash2, 31) + input.charCodeAt(i) | 0; + } + return Math.abs(hash2).toString(16).padStart(8, "0"); +} +function spdxSafeId(name) { + return name.replace(/[^a-zA-Z0-9.-]/g, "-"); +} +function spdxPackagesAndDeps(packages, idPrefix) { + const spdxId = (name) => `SPDXRef-Package-${idPrefix}${spdxSafeId(name)}`; + const pkgs = packages.map((pkg) => ({ + name: pkg.name, + SPDXID: spdxId(pkg.name), + versionInfo: pkg.version ?? "NOASSERTION", + downloadLocation: pkg.downloadLocation ?? "NOASSERTION", + filesAnalyzed: false, + licenseConcluded: "NOASSERTION", + licenseDeclared: "NOASSERTION", + copyrightText: "NOASSERTION", + ...pkg.purl ? { + externalRefs: [ + { referenceCategory: "PACKAGE-MANAGER", referenceType: "purl", referenceLocator: pkg.purl } + ] + } : {} + })); + const relationships = packages.flatMap( + (pkg) => (pkg.dependsOn ?? []).map((dep) => ({ + spdxElementId: spdxId(pkg.name), + relationshipType: "DEPENDS_ON", + relatedSpdxElement: spdxId(dep) + })) + ); + return { packages: pkgs, relationships }; +} +function writeSpdx(input, now = () => /* @__PURE__ */ new Date()) { + const rootId = "SPDXRef-DOCUMENT"; + const subjectSpdxId = `SPDXRef-Package-${spdxSafeId(input.subjectName)}`; + const { packages, relationships: packageRelationships } = spdxPackagesAndDeps(input.packages, ""); + const relationships = [ + { spdxElementId: rootId, relationshipType: "DESCRIBES", relatedSpdxElement: subjectSpdxId }, + ...packageRelationships + ]; + const subDocumentPackages = []; + (input.subDocuments ?? []).forEach((sub, i) => { + const subRootId = `SPDXRef-Package-sub${i}-${spdxSafeId(sub.subjectName)}`; + subDocumentPackages.push({ + name: sub.subjectName, + SPDXID: subRootId, + versionInfo: sub.subjectVersion ?? "NOASSERTION", + downloadLocation: "NOASSERTION", + filesAnalyzed: false, + licenseConcluded: "NOASSERTION", + licenseDeclared: "NOASSERTION", + copyrightText: "NOASSERTION", + comment: `subjectId: ${sub.subjectId}` + }); + relationships.push({ + spdxElementId: subjectSpdxId, + relationshipType: "CONTAINS", + relatedSpdxElement: subRootId + }); + const { packages: subPkgs, relationships: subRels } = spdxPackagesAndDeps(sub.packages, `sub${i}-`); + subDocumentPackages.push(...subPkgs); + relationships.push( + ...subPkgs.map((p) => ({ + spdxElementId: subRootId, + relationshipType: "CONTAINS", + relatedSpdxElement: p.SPDXID + })), + ...subRels + ); + }); + const document = { + spdxVersion: "SPDX-2.3", + dataLicense: "CC0-1.0", + SPDXID: rootId, + name: input.subjectName, + documentNamespace: `https://chant.dev/spdxdocs/${spdxSafeId(input.subjectName)}-${stableId(input.subjectId)}`, + creationInfo: { + created: now().toISOString(), + creators: [`Tool: ${input.generator}`] + }, + packages: [ + { + name: input.subjectName, + SPDXID: subjectSpdxId, + versionInfo: input.subjectVersion ?? "NOASSERTION", + downloadLocation: "NOASSERTION", + filesAnalyzed: false, + licenseConcluded: "NOASSERTION", + licenseDeclared: "NOASSERTION", + copyrightText: "NOASSERTION" + }, + ...packages, + ...subDocumentPackages + ], + relationships + }; + return JSON.stringify(document, null, 2); +} +function cycloneDxComponents(packages, refPrefix) { + return packages.map((pkg) => ({ + type: pkg.type === "config" ? "application" : "library", + "bom-ref": `${refPrefix}${pkg.name}`, + name: pkg.name, + ...pkg.version ? { version: pkg.version } : {}, + ...pkg.purl ? { purl: pkg.purl } : {} + })); +} +function cycloneDxDependencies(packages, refPrefix) { + return packages.filter((p) => (p.dependsOn?.length ?? 0) > 0).map((p) => ({ ref: `${refPrefix}${p.name}`, dependsOn: p.dependsOn.map((d) => `${refPrefix}${d}`) })); +} +function writeCycloneDx(input, now = () => /* @__PURE__ */ new Date()) { + const rootRef = `subject:${input.subjectName}`; + const components = cycloneDxComponents(input.packages, ""); + const subDocuments = input.subDocuments ?? []; + const subComponents = subDocuments.map((sub, i) => { + const refPrefix = `sub${i}:`; + const subRef = `${refPrefix}subject:${sub.subjectName}`; + return { + type: "application", + "bom-ref": subRef, + name: sub.subjectName, + ...sub.subjectVersion ? { version: sub.subjectVersion } : {}, + properties: [{ name: "chant:subjectId", value: sub.subjectId }], + components: cycloneDxComponents(sub.packages, refPrefix) + }; + }); + const subDependencies = subDocuments.flatMap((sub, i) => { + const refPrefix = `sub${i}:`; + const subRef = `${refPrefix}subject:${sub.subjectName}`; + return [ + { ref: subRef, dependsOn: sub.packages.map((p) => `${refPrefix}${p.name}`) }, + ...cycloneDxDependencies(sub.packages, refPrefix) + ]; + }); + const rootDependsOn = [...input.packages.map((p) => p.name), ...subComponents.map((c) => c["bom-ref"])]; + const dependencies = [ + { ref: rootRef, dependsOn: rootDependsOn }, + ...cycloneDxDependencies(input.packages, ""), + ...subDependencies + ]; + const compositions = subDocuments.length > 0 ? [{ aggregate: "incomplete", assemblies: [rootRef, ...subComponents.map((c) => c["bom-ref"])] }] : void 0; + const document = { + bomFormat: "CycloneDX", + specVersion: "1.5", + serialNumber: `urn:uuid:${toUuidLike(stableId(input.subjectId) + stableId(input.subjectName))}`, + version: 1, + metadata: { + timestamp: now().toISOString(), + tools: [{ name: input.generator }], + component: { + type: "application", + "bom-ref": rootRef, + name: input.subjectName, + ...input.subjectVersion ? { version: input.subjectVersion } : {}, + ...subComponents.length > 0 ? { components: subComponents } : {} + } + }, + components, + dependencies, + ...compositions ? { compositions } : {} + }; + return JSON.stringify(document, null, 2); +} +function toUuidLike(seed) { + const padded = (seed + seed + seed + seed).slice(0, 32); + return `${padded.slice(0, 8)}-${padded.slice(8, 12)}-4${padded.slice(13, 16)}-8${padded.slice(17, 20)}-${padded.slice(20, 32)}`; +} +function writeBom(format, input, now) { + const bytes = format === "spdx" ? writeSpdx(input, now) : writeCycloneDx(input, now); + return { format, mediaType: SBOM_MEDIA_TYPES[format], bytes }; +} +var init_bom_writer = __esm({ + "node_modules/@intentius/chant/src/components/verbs/bom-writer.ts"() { + init_sbom_generator(); + } +}); + +// node_modules/@intentius/chant/src/components/verbs/lockfile-sbom-generator.ts +import { readFileSync, writeFileSync, mkdirSync } from "node:fs"; +import { dirname, join } from "node:path"; +function parseNpmPackageLock(content) { + const lock = JSON.parse(content); + const seen = /* @__PURE__ */ new Map(); + const add = (name, version2, deps) => { + if (!name) return; + const key = `${name}@${version2 ?? ""}`; + const existing = seen.get(key); + if (existing) { + if (deps?.length) existing.dependsOn = [.../* @__PURE__ */ new Set([...existing.dependsOn ?? [], ...deps])]; + return; + } + seen.set(key, { + name, + version: version2, + type: "npm", + purl: version2 ? `pkg:npm/${encodeURIComponent(name)}@${version2}` : void 0, + dependsOn: deps?.length ? deps : void 0 + }); + }; + if (lock.packages) { + for (const [path, pkg] of Object.entries(lock.packages)) { + if (path === "") continue; + const name = pkg.name ?? path.replace(/^.*node_modules\//, ""); + add(name, pkg.version, pkg.dependencies ? Object.keys(pkg.dependencies) : void 0); + } + } else if (lock.dependencies) { + for (const [name, pkg] of Object.entries(lock.dependencies)) { + add(name, pkg.version, pkg.requires ? Object.keys(pkg.requires) : void 0); + } + } + return [...seen.values()].sort((a, b) => a.name.localeCompare(b.name)); +} +function parsePomXml(content) { + const packages = []; + const withoutManagement = content.replace(/[\s\S]*?<\/dependencyManagement>/, ""); + const depsBlockMatch = withoutManagement.match(/([\s\S]*?)<\/dependencies>/); + if (!depsBlockMatch) return packages; + const depBlock = depsBlockMatch[1]; + const depRegex = /([\s\S]*?)<\/dependency>/g; + let match; + while ((match = depRegex.exec(depBlock)) !== null) { + const entry = match[1]; + const groupId = entry.match(/([^<]+)<\/groupId>/)?.[1]?.trim(); + const artifactId = entry.match(/([^<]+)<\/artifactId>/)?.[1]?.trim(); + const version2 = entry.match(/([^<]+)<\/version>/)?.[1]?.trim(); + if (!groupId || !artifactId) continue; + const name = `${groupId}:${artifactId}`; + packages.push({ + name, + version: version2, + type: "maven", + purl: version2 ? `pkg:maven/${encodeURIComponent(groupId)}/${encodeURIComponent(artifactId)}@${version2}` : void 0 + }); + } + return packages.sort((a, b) => a.name.localeCompare(b.name)); +} +function findManifest(dir) { + for (const [kind, filename] of [["npm", "package-lock.json"], ["maven", "pom.xml"]]) { + const candidate = join(dir, filename); + try { + readFileSync(candidate, "utf-8"); + return { kind, path: candidate }; + } catch { + continue; + } + } + return void 0; +} +function sbomOutputPath(dir, format) { + return join(dir, `sbom.${format}.json`); +} +function createLockfileSbomGenerator(options = {}) { + const now = options.now ?? (() => /* @__PURE__ */ new Date()); + function generateFromDir(dir, subjectName, digest, format = DEFAULT_SBOM_FORMAT) { + const manifest = findManifest(dir); + if (!manifest) { + throw new Error( + `no supported lockfile/manifest found under "${dir}" (looked for package-lock.json, pom.xml) \u2014 the hermetic lockfile SBOM backend requires a lockfile on disk; use the deep-scan path (#610) for images with no lockfile` + ); + } + const content = readFileSync(manifest.path, "utf-8"); + const packages = manifest.kind === "npm" ? parseNpmPackageLock(content) : parsePomXml(content); + const generatorName = manifest.kind === "npm" ? "chant-lockfile-sbom/package-lock.json" : "chant-lockfile-sbom/pom.xml"; + const doc = writeBom( + format, + { subjectName, subjectId: digest ?? manifest.path, packages, generator: generatorName }, + now + ); + const outDir = options.outDir ?? dir; + mkdirSync(outDir, { recursive: true }); + writeFileSync(sbomOutputPath(outDir, format), doc.bytes); + return { ...doc, packageCount: packages.length, generator: generatorName }; + } + return { + async forImage(_input) { + throw new SbomGeneratorNotImplementedError("forImage"); + }, + async forJar(input) { + return generateFromDir(dirname(input.jarPath), input.jarPath, input.digest, input.format); + }, + async forZip(input) { + return generateFromDir(dirname(input.zipPath), input.zipPath, input.digest, input.format); + }, + async forDir(input) { + return generateFromDir(input.path, input.path, void 0, input.format); + } + }; +} +var lockfileSbomGenerator; +var init_lockfile_sbom_generator = __esm({ + "node_modules/@intentius/chant/src/components/verbs/lockfile-sbom-generator.ts"() { + init_bom_writer(); + init_sbom_generator(); + init_sbom_generator(); + lockfileSbomGenerator = createLockfileSbomGenerator(); + } +}); + +// node_modules/@intentius/chant/src/components/verbs/sbom-generator.ts +var SBOM_MEDIA_TYPES, DEFAULT_SBOM_FORMAT, SbomGeneratorNotImplementedError; +var init_sbom_generator = __esm({ + "node_modules/@intentius/chant/src/components/verbs/sbom-generator.ts"() { + init_lockfile_sbom_generator(); + SBOM_MEDIA_TYPES = { + spdx: "application/spdx+json", + cyclonedx: "application/vnd.cyclonedx+json" + }; + DEFAULT_SBOM_FORMAT = "spdx"; + SbomGeneratorNotImplementedError = class extends Error { + constructor(method) { + super( + `SbomGenerator.${method} has no real implementation configured \u2014 inject a real generator (shelling out to syft/buildx/cyclonedx-maven/cdxgen) or use a mock in tests` + ); + this.method = method; + this.name = "SbomGeneratorNotImplementedError"; + } + method; + }; + } +}); + +// node_modules/@intentius/chant/src/project-root.ts import { existsSync } from "fs"; -import { join } from "path"; +import { dirname as dirname2, join as join2, resolve } from "path"; +function findProjectConfig(startDir) { + const resolvedStart = resolve(startDir); + let dir = resolvedStart; + for (; ; ) { + const tsPath = join2(dir, "chant.config.ts"); + if (existsSync(tsPath)) return { dir, configPath: tsPath }; + const jsonPath = join2(dir, "chant.config.json"); + if (existsSync(jsonPath)) return { dir, configPath: jsonPath }; + if (existsSync(join2(dir, ".git")) || existsSync(join2(dir, "package.json"))) { + return { dir }; + } + const parent = dirname2(dir); + if (parent === dir) { + return { dir: resolvedStart }; + } + dir = parent; + } +} +var init_project_root = __esm({ + "node_modules/@intentius/chant/src/project-root.ts"() { + } +}); + +// node_modules/@intentius/chant/src/config-import.ts +async function importConfigModule(configPath) { + return await import(configPath); +} +var init_config_import = __esm({ + "node_modules/@intentius/chant/src/config-import.ts"() { + } +}); + +// node_modules/@intentius/chant/node_modules/esbuild/lib/main.js +var require_main = __commonJS({ + "node_modules/@intentius/chant/node_modules/esbuild/lib/main.js"(exports, module) { + "use strict"; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __export2 = (target, all) => { + for (var name in all) + __defProp2(target, name, { get: all[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var node_exports = {}; + __export2(node_exports, { + analyzeMetafile: () => analyzeMetafile, + analyzeMetafileSync: () => analyzeMetafileSync, + build: () => build4, + buildSync: () => buildSync, + context: () => context, + default: () => node_default, + formatMessages: () => formatMessages, + formatMessagesSync: () => formatMessagesSync, + initialize: () => initialize, + stop: () => stop, + transform: () => transform2, + transformSync: () => transformSync, + version: () => version2 + }); + module.exports = __toCommonJS(node_exports); + function encodePacket(packet) { + let visit = (value) => { + if (value === null) { + bb.write8(0); + } else if (typeof value === "boolean") { + bb.write8(1); + bb.write8(+value); + } else if (typeof value === "number") { + bb.write8(2); + bb.write32(value | 0); + } else if (typeof value === "string") { + bb.write8(3); + bb.write(encodeUTF8(value)); + } else if (value instanceof Uint8Array) { + bb.write8(4); + bb.write(value); + } else if (value instanceof Array) { + bb.write8(5); + bb.write32(value.length); + for (let item of value) { + visit(item); + } + } else { + let keys = Object.keys(value); + bb.write8(6); + bb.write32(keys.length); + for (let key of keys) { + bb.write(encodeUTF8(key)); + visit(value[key]); + } + } + }; + let bb = new ByteBuffer(); + bb.write32(0); + bb.write32(packet.id << 1 | +!packet.isRequest); + visit(packet.value); + writeUInt32LE(bb.buf, bb.len - 4, 0); + return bb.buf.subarray(0, bb.len); + } + function decodePacket(bytes) { + let visit = () => { + switch (bb.read8()) { + case 0: + return null; + case 1: + return !!bb.read8(); + case 2: + return bb.read32(); + case 3: + return decodeUTF8(bb.read()); + case 4: + return bb.read(); + case 5: { + let count = bb.read32(); + let value2 = []; + for (let i = 0; i < count; i++) { + value2.push(visit()); + } + return value2; + } + case 6: { + let count = bb.read32(); + let value2 = {}; + for (let i = 0; i < count; i++) { + value2[decodeUTF8(bb.read())] = visit(); + } + return value2; + } + default: + throw new Error("Invalid packet"); + } + }; + let bb = new ByteBuffer(bytes); + let id = bb.read32(); + let isRequest = (id & 1) === 0; + id >>>= 1; + let value = visit(); + if (bb.ptr !== bytes.length) { + throw new Error("Invalid packet"); + } + return { id, isRequest, value }; + } + var ByteBuffer = class { + constructor(buf = new Uint8Array(1024)) { + this.buf = buf; + this.len = 0; + this.ptr = 0; + } + _write(delta) { + if (this.len + delta > this.buf.length) { + let clone2 = new Uint8Array((this.len + delta) * 2); + clone2.set(this.buf); + this.buf = clone2; + } + this.len += delta; + return this.len - delta; + } + write8(value) { + let offset = this._write(1); + this.buf[offset] = value; + } + write32(value) { + let offset = this._write(4); + writeUInt32LE(this.buf, value, offset); + } + write(bytes) { + let offset = this._write(4 + bytes.length); + writeUInt32LE(this.buf, bytes.length, offset); + this.buf.set(bytes, offset + 4); + } + _read(delta) { + if (this.ptr + delta > this.buf.length) { + throw new Error("Invalid packet"); + } + this.ptr += delta; + return this.ptr - delta; + } + read8() { + return this.buf[this._read(1)]; + } + read32() { + return readUInt32LE(this.buf, this._read(4)); + } + read() { + let length = this.read32(); + let bytes = new Uint8Array(length); + let ptr = this._read(bytes.length); + bytes.set(this.buf.subarray(ptr, ptr + length)); + return bytes; + } + }; + var encodeUTF8; + var decodeUTF8; + var encodeInvariant; + if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") { + let encoder = new TextEncoder(); + let decoder = new TextDecoder(); + encodeUTF8 = (text) => encoder.encode(text); + decodeUTF8 = (bytes) => decoder.decode(bytes); + encodeInvariant = 'new TextEncoder().encode("")'; + } else if (typeof Buffer !== "undefined") { + encodeUTF8 = (text) => Buffer.from(text); + decodeUTF8 = (bytes) => { + let { buffer, byteOffset, byteLength } = bytes; + return Buffer.from(buffer, byteOffset, byteLength).toString(); + }; + encodeInvariant = 'Buffer.from("")'; + } else { + throw new Error("No UTF-8 codec found"); + } + if (!(encodeUTF8("") instanceof Uint8Array)) + throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false + +This indicates that your JavaScript environment is broken. You cannot use +esbuild in this environment because esbuild relies on this invariant. This +is not a problem with esbuild. You need to fix your environment instead. +`); + function readUInt32LE(buffer, offset) { + return (buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24) >>> 0; + } + function writeUInt32LE(buffer, value, offset) { + buffer[offset++] = value; + buffer[offset++] = value >> 8; + buffer[offset++] = value >> 16; + buffer[offset++] = value >> 24; + } + var fromCharCode = String.fromCharCode; + function throwSyntaxError(bytes, index, message) { + const c = bytes[index]; + let line = 1; + let column = 0; + for (let i = 0; i < index; i++) { + if (bytes[i] === 10) { + line++; + column = 0; + } else { + column++; + } + } + throw new SyntaxError( + message ? message : index === bytes.length ? "Unexpected end of input while parsing JSON" : c >= 32 && c <= 126 ? `Unexpected character ${fromCharCode(c)} in JSON at position ${index} (line ${line}, column ${column})` : `Unexpected byte 0x${c.toString(16)} in JSON at position ${index} (line ${line}, column ${column})` + ); + } + function JSON_parse(bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new Error(`JSON input must be a Uint8Array`); + } + const propertyStack = []; + const objectStack = []; + const stateStack = []; + const length = bytes.length; + let property = null; + let state = 0; + let object2; + let i = 0; + while (i < length) { + let c = bytes[i++]; + if (c <= 32) { + continue; + } + let value; + if (state === 2 && property === null && c !== 34 && c !== 125) { + throwSyntaxError(bytes, --i); + } + switch (c) { + // True + case 116: { + if (bytes[i++] !== 114 || bytes[i++] !== 117 || bytes[i++] !== 101) { + throwSyntaxError(bytes, --i); + } + value = true; + break; + } + // False + case 102: { + if (bytes[i++] !== 97 || bytes[i++] !== 108 || bytes[i++] !== 115 || bytes[i++] !== 101) { + throwSyntaxError(bytes, --i); + } + value = false; + break; + } + // Null + case 110: { + if (bytes[i++] !== 117 || bytes[i++] !== 108 || bytes[i++] !== 108) { + throwSyntaxError(bytes, --i); + } + value = null; + break; + } + // Number begin + case 45: + case 46: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: { + let index = i; + value = fromCharCode(c); + c = bytes[i]; + while (true) { + switch (c) { + case 43: + case 45: + case 46: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + case 101: + case 69: { + value += fromCharCode(c); + c = bytes[++i]; + continue; + } + } + break; + } + value = +value; + if (isNaN(value)) { + throwSyntaxError(bytes, --index, "Invalid number"); + } + break; + } + // String begin + case 34: { + value = ""; + while (true) { + if (i >= length) { + throwSyntaxError(bytes, length); + } + c = bytes[i++]; + if (c === 34) { + break; + } else if (c === 92) { + switch (bytes[i++]) { + // Normal escape sequence + case 34: + value += '"'; + break; + case 47: + value += "/"; + break; + case 92: + value += "\\"; + break; + case 98: + value += "\b"; + break; + case 102: + value += "\f"; + break; + case 110: + value += "\n"; + break; + case 114: + value += "\r"; + break; + case 116: + value += " "; + break; + // Unicode escape sequence + case 117: { + let code = 0; + for (let j = 0; j < 4; j++) { + c = bytes[i++]; + code <<= 4; + if (c >= 48 && c <= 57) code |= c - 48; + else if (c >= 97 && c <= 102) code |= c + (10 - 97); + else if (c >= 65 && c <= 70) code |= c + (10 - 65); + else throwSyntaxError(bytes, --i); + } + value += fromCharCode(code); + break; + } + // Invalid escape sequence + default: + throwSyntaxError(bytes, --i); + break; + } + } else if (c <= 127) { + value += fromCharCode(c); + } else if ((c & 224) === 192) { + value += fromCharCode((c & 31) << 6 | bytes[i++] & 63); + } else if ((c & 240) === 224) { + value += fromCharCode((c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63); + } else if ((c & 248) == 240) { + let codePoint = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63; + if (codePoint > 65535) { + codePoint -= 65536; + value += fromCharCode(codePoint >> 10 & 1023 | 55296); + codePoint = 56320 | codePoint & 1023; + } + value += fromCharCode(codePoint); + } + } + value[0]; + break; + } + // Array begin + case 91: { + value = []; + propertyStack.push(property); + objectStack.push(object2); + stateStack.push(state); + property = null; + object2 = value; + state = 1; + continue; + } + // Object begin + case 123: { + value = {}; + propertyStack.push(property); + objectStack.push(object2); + stateStack.push(state); + property = null; + object2 = value; + state = 2; + continue; + } + // Array end + case 93: { + if (state !== 1) { + throwSyntaxError(bytes, --i); + } + value = object2; + property = propertyStack.pop(); + object2 = objectStack.pop(); + state = stateStack.pop(); + break; + } + // Object end + case 125: { + if (state !== 2) { + throwSyntaxError(bytes, --i); + } + value = object2; + property = propertyStack.pop(); + object2 = objectStack.pop(); + state = stateStack.pop(); + break; + } + default: { + throwSyntaxError(bytes, --i); + } + } + c = bytes[i]; + while (c <= 32) { + c = bytes[++i]; + } + switch (state) { + case 0: { + if (i === length) { + return value; + } + break; + } + case 1: { + object2.push(value); + if (c === 44) { + i++; + continue; + } + if (c === 93) { + continue; + } + break; + } + case 2: { + if (property === null) { + property = value; + if (c === 58) { + i++; + continue; + } + } else { + object2[property] = value; + property = null; + if (c === 44) { + i++; + continue; + } + if (c === 125) { + continue; + } + } + break; + } + } + break; + } + throwSyntaxError(bytes, i); + } + var quote = JSON.stringify; + var buildLogLevelDefault = "warning"; + var transformLogLevelDefault = "silent"; + function validateAndJoinStringArray(values, what) { + const toJoin = []; + for (const value of values) { + validateStringValue(value, what); + if (value.indexOf(",") >= 0) throw new Error(`Invalid ${what}: ${value}`); + toJoin.push(value); + } + return toJoin.join(","); + } + var canBeAnything = () => null; + var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean"; + var mustBeString = (value) => typeof value === "string" ? null : "a string"; + var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object"; + var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer"; + var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number"; + var mustBeFunction = (value) => typeof value === "function" ? null : "a function"; + var mustBeArray = (value) => Array.isArray(value) ? null : "an array"; + var mustBeArrayOfStrings = (value) => Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "an array of strings"; + var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object"; + var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object"; + var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module"; + var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null"; + var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean"; + var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object"; + var mustBeStringOrArrayOfStrings = (value) => typeof value === "string" || Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "a string or an array of strings"; + var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array"; + var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL"; + function getFlag(object2, keys, key, mustBeFn) { + let value = object2[key]; + keys[key + ""] = true; + if (value === void 0) return void 0; + let mustBe = mustBeFn(value); + if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`); + return value; + } + function checkForInvalidFlags(object2, keys, where) { + for (let key in object2) { + if (!(key in keys)) { + throw new Error(`Invalid option ${where}: ${quote(key)}`); + } + } + } + function validateInitializeOptions(options) { + let keys = /* @__PURE__ */ Object.create(null); + let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL); + let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule); + let worker = getFlag(options, keys, "worker", mustBeBoolean); + checkForInvalidFlags(options, keys, "in initialize() call"); + return { + wasmURL, + wasmModule, + worker + }; + } + function validateMangleCache(mangleCache) { + let validated; + if (mangleCache !== void 0) { + validated = /* @__PURE__ */ Object.create(null); + for (let key in mangleCache) { + let value = mangleCache[key]; + if (typeof value === "string" || value === false) { + validated[key] = value; + } else { + throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`); + } + } + } + return validated; + } + function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) { + let color = getFlag(options, keys, "color", mustBeBoolean); + let logLevel = getFlag(options, keys, "logLevel", mustBeString); + let logLimit = getFlag(options, keys, "logLimit", mustBeInteger); + if (color !== void 0) flags.push(`--color=${color}`); + else if (isTTY2) flags.push(`--color=true`); + flags.push(`--log-level=${logLevel || logLevelDefault}`); + flags.push(`--log-limit=${logLimit || 0}`); + } + function validateStringValue(value, what, key) { + if (typeof value !== "string") { + throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`); + } + return value; + } + function pushCommonFlags(flags, options, keys) { + let legalComments = getFlag(options, keys, "legalComments", mustBeString); + let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString); + let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean); + let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings); + let format = getFlag(options, keys, "format", mustBeString); + let globalName = getFlag(options, keys, "globalName", mustBeString); + let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp); + let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp); + let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean); + let minify = getFlag(options, keys, "minify", mustBeBoolean); + let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean); + let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean); + let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean); + let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger); + let drop = getFlag(options, keys, "drop", mustBeArrayOfStrings); + let dropLabels = getFlag(options, keys, "dropLabels", mustBeArrayOfStrings); + let charset = getFlag(options, keys, "charset", mustBeString); + let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean); + let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean); + let jsx = getFlag(options, keys, "jsx", mustBeString); + let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString); + let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString); + let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString); + let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean); + let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean); + let define = getFlag(options, keys, "define", mustBeObject); + let logOverride = getFlag(options, keys, "logOverride", mustBeObject); + let supported = getFlag(options, keys, "supported", mustBeObject); + let pure = getFlag(options, keys, "pure", mustBeArrayOfStrings); + let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean); + let platform = getFlag(options, keys, "platform", mustBeString); + let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject); + let absPaths = getFlag(options, keys, "absPaths", mustBeArrayOfStrings); + if (legalComments) flags.push(`--legal-comments=${legalComments}`); + if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`); + if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`); + if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`); + if (format) flags.push(`--format=${format}`); + if (globalName) flags.push(`--global-name=${globalName}`); + if (platform) flags.push(`--platform=${platform}`); + if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`); + if (minify) flags.push("--minify"); + if (minifySyntax) flags.push("--minify-syntax"); + if (minifyWhitespace) flags.push("--minify-whitespace"); + if (minifyIdentifiers) flags.push("--minify-identifiers"); + if (lineLimit) flags.push(`--line-limit=${lineLimit}`); + if (charset) flags.push(`--charset=${charset}`); + if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`); + if (ignoreAnnotations) flags.push(`--ignore-annotations`); + if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`); + if (dropLabels) flags.push(`--drop-labels=${validateAndJoinStringArray(dropLabels, "drop label")}`); + if (absPaths) flags.push(`--abs-paths=${validateAndJoinStringArray(absPaths, "abs paths")}`); + if (mangleProps) flags.push(`--mangle-props=${jsRegExpToGoRegExp(mangleProps)}`); + if (reserveProps) flags.push(`--reserve-props=${jsRegExpToGoRegExp(reserveProps)}`); + if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`); + if (jsx) flags.push(`--jsx=${jsx}`); + if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`); + if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`); + if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`); + if (jsxDev) flags.push(`--jsx-dev`); + if (jsxSideEffects) flags.push(`--jsx-side-effects`); + if (define) { + for (let key in define) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`); + flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`); + } + } + if (logOverride) { + for (let key in logOverride) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`); + flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`); + } + } + if (supported) { + for (let key in supported) { + if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`); + const value = supported[key]; + if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`); + flags.push(`--supported:${key}=${value}`); + } + } + if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`); + if (keepNames) flags.push(`--keep-names`); + } + function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) { + var _a22; + let flags = []; + let entries = []; + let keys = /* @__PURE__ */ Object.create(null); + let stdinContents = null; + let stdinResolveDir = null; + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let bundle = getFlag(options, keys, "bundle", mustBeBoolean); + let splitting = getFlag(options, keys, "splitting", mustBeBoolean); + let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean); + let metafile = getFlag(options, keys, "metafile", mustBeBoolean); + let outfile = getFlag(options, keys, "outfile", mustBeString); + let outdir = getFlag(options, keys, "outdir", mustBeString); + let outbase = getFlag(options, keys, "outbase", mustBeString); + let tsconfig = getFlag(options, keys, "tsconfig", mustBeString); + let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArrayOfStrings); + let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArrayOfStrings); + let mainFields = getFlag(options, keys, "mainFields", mustBeArrayOfStrings); + let conditions = getFlag(options, keys, "conditions", mustBeArrayOfStrings); + let external = getFlag(options, keys, "external", mustBeArrayOfStrings); + let packages = getFlag(options, keys, "packages", mustBeString); + let alias = getFlag(options, keys, "alias", mustBeObject); + let loader = getFlag(options, keys, "loader", mustBeObject); + let outExtension = getFlag(options, keys, "outExtension", mustBeObject); + let publicPath = getFlag(options, keys, "publicPath", mustBeString); + let entryNames = getFlag(options, keys, "entryNames", mustBeString); + let chunkNames = getFlag(options, keys, "chunkNames", mustBeString); + let assetNames = getFlag(options, keys, "assetNames", mustBeString); + let inject = getFlag(options, keys, "inject", mustBeArrayOfStrings); + let banner = getFlag(options, keys, "banner", mustBeObject); + let footer = getFlag(options, keys, "footer", mustBeObject); + let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints); + let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString); + let stdin = getFlag(options, keys, "stdin", mustBeObject); + let write = (_a22 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a22 : writeDefault; + let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + keys.plugins = true; + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`); + if (bundle) flags.push("--bundle"); + if (allowOverwrite) flags.push("--allow-overwrite"); + if (splitting) flags.push("--splitting"); + if (preserveSymlinks) flags.push("--preserve-symlinks"); + if (metafile) flags.push(`--metafile`); + if (outfile) flags.push(`--outfile=${outfile}`); + if (outdir) flags.push(`--outdir=${outdir}`); + if (outbase) flags.push(`--outbase=${outbase}`); + if (tsconfig) flags.push(`--tsconfig=${tsconfig}`); + if (packages) flags.push(`--packages=${packages}`); + if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, "resolve extension")}`); + if (publicPath) flags.push(`--public-path=${publicPath}`); + if (entryNames) flags.push(`--entry-names=${entryNames}`); + if (chunkNames) flags.push(`--chunk-names=${chunkNames}`); + if (assetNames) flags.push(`--asset-names=${assetNames}`); + if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, "main field")}`); + if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, "condition")}`); + if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`); + if (alias) { + for (let old in alias) { + if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`); + flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`); + } + } + if (banner) { + for (let type in banner) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`); + flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`); + } + } + if (footer) { + for (let type in footer) { + if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`); + flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`); + } + } + if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`); + if (loader) { + for (let ext in loader) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`); + flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`); + } + } + if (outExtension) { + for (let ext in outExtension) { + if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`); + flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`); + } + } + if (entryPoints) { + if (Array.isArray(entryPoints)) { + for (let i = 0, n = entryPoints.length; i < n; i++) { + let entryPoint = entryPoints[i]; + if (typeof entryPoint === "object" && entryPoint !== null) { + let entryPointKeys = /* @__PURE__ */ Object.create(null); + let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString); + let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString); + checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i); + if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i); + if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i); + entries.push([output, input]); + } else { + entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]); + } + } + } else { + for (let key in entryPoints) { + entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]); + } + } + } + if (stdin) { + let stdinKeys = /* @__PURE__ */ Object.create(null); + let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString); + let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString); + let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString); + checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object'); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader2) flags.push(`--loader=${loader2}`); + if (resolveDir) stdinResolveDir = resolveDir; + if (typeof contents === "string") stdinContents = encodeUTF8(contents); + else if (contents instanceof Uint8Array) stdinContents = contents; + } + let nodePaths = []; + if (nodePathsInput) { + for (let value of nodePathsInput) { + value += ""; + nodePaths.push(value); + } + } + return { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache: validateMangleCache(mangleCache) + }; + } + function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) { + let flags = []; + let keys = /* @__PURE__ */ Object.create(null); + pushLogFlags(flags, options, keys, isTTY2, logLevelDefault); + pushCommonFlags(flags, options, keys); + let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean); + let sourcefile = getFlag(options, keys, "sourcefile", mustBeString); + let loader = getFlag(options, keys, "loader", mustBeString); + let banner = getFlag(options, keys, "banner", mustBeString); + let footer = getFlag(options, keys, "footer", mustBeString); + let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`); + if (sourcefile) flags.push(`--sourcefile=${sourcefile}`); + if (loader) flags.push(`--loader=${loader}`); + if (banner) flags.push(`--banner=${banner}`); + if (footer) flags.push(`--footer=${footer}`); + return { + flags, + mangleCache: validateMangleCache(mangleCache) + }; + } + function createChannel(streamIn) { + const requestCallbacksByKey = {}; + const closeData = { didClose: false, reason: "" }; + let responseCallbacks = {}; + let nextRequestID = 0; + let nextBuildKey = 0; + let stdout = new Uint8Array(16 * 1024); + let stdoutUsed = 0; + let readFromStdout = (chunk) => { + let limit = stdoutUsed + chunk.length; + if (limit > stdout.length) { + let swap = new Uint8Array(limit * 2); + swap.set(stdout); + stdout = swap; + } + stdout.set(chunk, stdoutUsed); + stdoutUsed += chunk.length; + let offset = 0; + while (offset + 4 <= stdoutUsed) { + let length = readUInt32LE(stdout, offset); + if (offset + 4 + length > stdoutUsed) { + break; + } + offset += 4; + handleIncomingPacket(stdout.subarray(offset, offset + length)); + offset += length; + } + if (offset > 0) { + stdout.copyWithin(0, offset, stdoutUsed); + stdoutUsed -= offset; + } + }; + let afterClose = (error51) => { + closeData.didClose = true; + if (error51) closeData.reason = ": " + (error51.message || error51); + const text = "The service was stopped" + closeData.reason; + for (let id in responseCallbacks) { + responseCallbacks[id](text, null); + } + responseCallbacks = {}; + }; + let sendRequest = (refs, value, callback) => { + if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null); + let id = nextRequestID++; + responseCallbacks[id] = (error51, response) => { + try { + callback(error51, response); + } finally { + if (refs) refs.unref(); + } + }; + if (refs) refs.ref(); + streamIn.writeToStdin(encodePacket({ id, isRequest: true, value })); + }; + let sendResponse = (id, value) => { + if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason); + streamIn.writeToStdin(encodePacket({ id, isRequest: false, value })); + }; + let handleRequest = async (id, request) => { + try { + if (request.command === "ping") { + sendResponse(id, {}); + return; + } + if (typeof request.key === "number") { + const requestCallbacks = requestCallbacksByKey[request.key]; + if (!requestCallbacks) { + return; + } + const callback = requestCallbacks[request.command]; + if (callback) { + await callback(id, request); + return; + } + } + throw new Error(`Invalid command: ` + request.command); + } catch (e) { + const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")]; + try { + sendResponse(id, { errors }); + } catch { + } + } + }; + let isFirstPacket = true; + let handleIncomingPacket = (bytes) => { + if (isFirstPacket) { + isFirstPacket = false; + let binaryVersion = String.fromCharCode(...bytes); + if (binaryVersion !== "0.27.7") { + throw new Error(`Cannot start service: Host version "${"0.27.7"}" does not match binary version ${quote(binaryVersion)}`); + } + return; + } + let packet = decodePacket(bytes); + if (packet.isRequest) { + handleRequest(packet.id, packet.value); + } else { + let callback = responseCallbacks[packet.id]; + delete responseCallbacks[packet.id]; + if (packet.value.error) callback(packet.value.error, {}); + else callback(null, packet.value); + } + }; + let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => { + let refCount = 0; + const buildKey = nextBuildKey++; + const requestCallbacks = {}; + const buildRefs = { + ref() { + if (++refCount === 1) { + if (refs) refs.ref(); + } + }, + unref() { + if (--refCount === 0) { + delete requestCallbacksByKey[buildKey]; + if (refs) refs.unref(); + } + } + }; + requestCallbacksByKey[buildKey] = requestCallbacks; + buildRefs.ref(); + buildOrContextImpl( + callName, + buildKey, + sendRequest, + sendResponse, + buildRefs, + streamIn, + requestCallbacks, + options, + isTTY2, + defaultWD2, + (err, res) => { + try { + callback(err, res); + } finally { + buildRefs.unref(); + } + } + ); + }; + let transform22 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => { + const details = createObjectStash(); + let start = (inputPath) => { + try { + if (typeof input !== "string" && !(input instanceof Uint8Array)) + throw new Error('The input to "transform" must be a string or a Uint8Array'); + let { + flags, + mangleCache + } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault); + let request = { + command: "transform", + flags, + inputFS: inputPath !== null, + input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input + }; + if (mangleCache) request.mangleCache = mangleCache; + sendRequest(refs, request, (error51, response) => { + if (error51) return callback(new Error(error51), null); + let errors = replaceDetailsInMessages(response.errors, details); + let warnings = replaceDetailsInMessages(response.warnings, details); + let outstanding = 1; + let next = () => { + if (--outstanding === 0) { + let result = { + warnings, + code: response.code, + map: response.map, + mangleCache: void 0, + legalComments: void 0 + }; + if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments; + if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache; + callback(null, result); + } + }; + if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null); + if (response.codeFS) { + outstanding++; + fs3.readFile(response.code, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.code = contents; + next(); + } + }); + } + if (response.mapFS) { + outstanding++; + fs3.readFile(response.map, (err, contents) => { + if (err !== null) { + callback(err, null); + } else { + response.map = contents; + next(); + } + }); + } + next(); + }); + } catch (e) { + let flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault); + } catch { + } + const error51 = extractErrorMessageV8(e, streamIn, details, void 0, ""); + sendRequest(refs, { command: "error", flags, error: error51 }, () => { + error51.detail = details.load(error51.detail); + callback(failureErrorWithLog("Transform failed", [error51], []), null); + }); + } + }; + if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) { + let next = start; + start = () => fs3.writeFile(input, next); + } + start(null); + }; + let formatMessages2 = ({ callName, refs, messages, options, callback }) => { + if (!options) throw new Error(`Missing second argument in ${callName}() call`); + let keys = {}; + let kind = getFlag(options, keys, "kind", mustBeString); + let color = getFlag(options, keys, "color", mustBeBoolean); + let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`); + if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`); + let request = { + command: "format-msgs", + messages: sanitizeMessages(messages, "messages", null, "", terminalWidth), + isWarning: kind === "warning" + }; + if (color !== void 0) request.color = color; + if (terminalWidth !== void 0) request.terminalWidth = terminalWidth; + sendRequest(refs, request, (error51, response) => { + if (error51) return callback(new Error(error51), null); + callback(null, response.messages); + }); + }; + let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => { + if (options === void 0) options = {}; + let keys = {}; + let color = getFlag(options, keys, "color", mustBeBoolean); + let verbose = getFlag(options, keys, "verbose", mustBeBoolean); + checkForInvalidFlags(options, keys, `in ${callName}() call`); + let request = { + command: "analyze-metafile", + metafile + }; + if (color !== void 0) request.color = color; + if (verbose !== void 0) request.verbose = verbose; + sendRequest(refs, request, (error51, response) => { + if (error51) return callback(new Error(error51), null); + callback(null, response.result); + }); + }; + return { + readFromStdout, + afterClose, + service: { + buildOrContext, + transform: transform22, + formatMessages: formatMessages2, + analyzeMetafile: analyzeMetafile2 + } + }; + } + function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) { + const details = createObjectStash(); + const isContext = callName === "context"; + const handleError = (e, pluginName) => { + const flags = []; + try { + pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault); + } catch { + } + const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName); + sendRequest(refs, { command: "error", flags, error: message }, () => { + message.detail = details.load(message.detail); + callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null); + }); + }; + let plugins; + if (typeof options === "object") { + const value = options.plugins; + if (value !== void 0) { + if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), ""); + plugins = value; + } + } + if (plugins && plugins.length > 0) { + if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), ""); + handlePlugins( + buildKey, + sendRequest, + sendResponse, + refs, + streamIn, + requestCallbacks, + options, + plugins, + details + ).then( + (result) => { + if (!result.ok) return handleError(result.error, result.pluginName); + try { + buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks); + } catch (e) { + handleError(e, ""); + } + }, + (e) => handleError(e, "") + ); + return; + } + try { + buildOrContextContinue(null, (result, done) => done([], []), () => { + }); + } catch (e) { + handleError(e, ""); + } + function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) { + const writeDefault = streamIn.hasFS; + const { + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir, + nodePaths, + mangleCache + } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault); + if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`); + const request = { + command: "build", + key: buildKey, + entries, + flags, + write, + stdinContents, + stdinResolveDir, + absWorkingDir: absWorkingDir || defaultWD2, + nodePaths, + context: isContext + }; + if (requestPlugins) request.plugins = requestPlugins; + if (mangleCache) request.mangleCache = mangleCache; + const buildResponseToResult = (response, callback2) => { + const result = { + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + outputFiles: void 0, + metafile: void 0, + mangleCache: void 0 + }; + const originalErrors = result.errors.slice(); + const originalWarnings = result.warnings.slice(); + if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles); + if (response.metafile && response.metafile.length) result.metafile = parseJSON(response.metafile); + if (response.mangleCache) result.mangleCache = response.mangleCache; + if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, "")); + runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => { + if (originalErrors.length > 0 || onEndErrors.length > 0) { + const error51 = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings)); + return callback2(error51, null, onEndErrors, onEndWarnings); + } + callback2(null, result, onEndErrors, onEndWarnings); + }); + }; + let latestResultPromise; + let provideLatestResult; + if (isContext) + requestCallbacks["on-end"] = (id, request2) => new Promise((resolve4) => { + buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => { + const response = { + errors: onEndErrors, + warnings: onEndWarnings + }; + if (provideLatestResult) provideLatestResult(err, result); + latestResultPromise = void 0; + provideLatestResult = void 0; + sendResponse(id, response); + resolve4(); + }); + }); + sendRequest(refs, request, (error51, response) => { + if (error51) return callback(new Error(error51), null); + if (!isContext) { + return buildResponseToResult(response, (err, res) => { + scheduleOnDisposeCallbacks(); + return callback(err, res); + }); + } + if (response.errors.length > 0) { + return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null); + } + let didDispose = false; + const result = { + rebuild: () => { + if (!latestResultPromise) latestResultPromise = new Promise((resolve4, reject) => { + let settlePromise; + provideLatestResult = (err, result2) => { + if (!settlePromise) settlePromise = () => err ? reject(err) : resolve4(result2); + }; + const triggerAnotherBuild = () => { + const request2 = { + command: "rebuild", + key: buildKey + }; + sendRequest(refs, request2, (error210, response2) => { + if (error210) { + reject(new Error(error210)); + } else if (settlePromise) { + settlePromise(); + } else { + triggerAnotherBuild(); + } + }); + }; + triggerAnotherBuild(); + }); + return latestResultPromise; + }, + watch: (options2 = {}) => new Promise((resolve4, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`); + const keys = {}; + const delay = getFlag(options2, keys, "delay", mustBeInteger); + checkForInvalidFlags(options2, keys, `in watch() call`); + const request2 = { + command: "watch", + key: buildKey + }; + if (delay) request2.delay = delay; + sendRequest(refs, request2, (error210) => { + if (error210) reject(new Error(error210)); + else resolve4(void 0); + }); + }), + serve: (options2 = {}) => new Promise((resolve4, reject) => { + if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`); + const keys = {}; + const port = getFlag(options2, keys, "port", mustBeValidPortNumber); + const host = getFlag(options2, keys, "host", mustBeString); + const servedir = getFlag(options2, keys, "servedir", mustBeString); + const keyfile = getFlag(options2, keys, "keyfile", mustBeString); + const certfile = getFlag(options2, keys, "certfile", mustBeString); + const fallback = getFlag(options2, keys, "fallback", mustBeString); + const cors = getFlag(options2, keys, "cors", mustBeObject); + const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction); + checkForInvalidFlags(options2, keys, `in serve() call`); + const request2 = { + command: "serve", + key: buildKey, + onRequest: !!onRequest + }; + if (port !== void 0) request2.port = port; + if (host !== void 0) request2.host = host; + if (servedir !== void 0) request2.servedir = servedir; + if (keyfile !== void 0) request2.keyfile = keyfile; + if (certfile !== void 0) request2.certfile = certfile; + if (fallback !== void 0) request2.fallback = fallback; + if (cors) { + const corsKeys = {}; + const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings); + checkForInvalidFlags(cors, corsKeys, `on "cors" object`); + if (Array.isArray(origin)) request2.corsOrigin = origin; + else if (origin !== void 0) request2.corsOrigin = [origin]; + } + sendRequest(refs, request2, (error210, response2) => { + if (error210) return reject(new Error(error210)); + if (onRequest) { + requestCallbacks["serve-request"] = (id, request3) => { + onRequest(request3.args); + sendResponse(id, {}); + }; + } + resolve4(response2); + }); + }), + cancel: () => new Promise((resolve4) => { + if (didDispose) return resolve4(); + const request2 = { + command: "cancel", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve4(); + }); + }), + dispose: () => new Promise((resolve4) => { + if (didDispose) return resolve4(); + didDispose = true; + const request2 = { + command: "dispose", + key: buildKey + }; + sendRequest(refs, request2, () => { + resolve4(); + scheduleOnDisposeCallbacks(); + refs.unref(); + }); + }) + }; + refs.ref(); + callback(null, result); + }); + } + } + var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => { + let onStartCallbacks = []; + let onEndCallbacks = []; + let onResolveCallbacks = {}; + let onLoadCallbacks = {}; + let onDisposeCallbacks = []; + let nextCallbackID = 0; + let i = 0; + let requestPlugins = []; + let isSetupDone = false; + plugins = [...plugins]; + for (let item of plugins) { + let keys = {}; + if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`); + const name = getFlag(item, keys, "name", mustBeString); + if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`); + try { + let setup = getFlag(item, keys, "setup", mustBeFunction); + if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`); + checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`); + let plugin = { + name, + onStart: false, + onEnd: false, + onResolve: [], + onLoad: [] + }; + i++; + let resolve4 = (path3, options = {}) => { + if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed'); + if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`); + let keys2 = /* @__PURE__ */ Object.create(null); + let pluginName = getFlag(options, keys2, "pluginName", mustBeString); + let importer = getFlag(options, keys2, "importer", mustBeString); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString); + let kind = getFlag(options, keys2, "kind", mustBeString); + let pluginData = getFlag(options, keys2, "pluginData", canBeAnything); + let importAttributes = getFlag(options, keys2, "with", mustBeObject); + checkForInvalidFlags(options, keys2, "in resolve() call"); + return new Promise((resolve22, reject) => { + const request = { + command: "resolve", + path: path3, + key: buildKey, + pluginName: name + }; + if (pluginName != null) request.pluginName = pluginName; + if (importer != null) request.importer = importer; + if (namespace != null) request.namespace = namespace; + if (resolveDir != null) request.resolveDir = resolveDir; + if (kind != null) request.kind = kind; + else throw new Error(`Must specify "kind" when calling "resolve"`); + if (pluginData != null) request.pluginData = details.store(pluginData); + if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with"); + sendRequest(refs, request, (error51, response) => { + if (error51 !== null) reject(new Error(error51)); + else resolve22({ + errors: replaceDetailsInMessages(response.errors, details), + warnings: replaceDetailsInMessages(response.warnings, details), + path: response.path, + external: response.external, + sideEffects: response.sideEffects, + namespace: response.namespace, + suffix: response.suffix, + pluginData: details.load(response.pluginData) + }); + }); + }); + }; + let promise2 = setup({ + initialOptions, + resolve: resolve4, + onStart(callback) { + let registeredText = `This error came from the "onStart" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart"); + onStartCallbacks.push({ name, callback, note: registeredNote }); + plugin.onStart = true; + }, + onEnd(callback) { + let registeredText = `This error came from the "onEnd" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd"); + onEndCallbacks.push({ name, callback, note: registeredNote }); + plugin.onEnd = true; + }, + onResolve(options, callback) { + let registeredText = `This error came from the "onResolve" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onResolve() call is missing a filter`); + let id = nextCallbackID++; + onResolveCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onResolve.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" }); + }, + onLoad(options, callback) { + let registeredText = `This error came from the "onLoad" callback registered here:`; + let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad"); + let keys2 = {}; + let filter = getFlag(options, keys2, "filter", mustBeRegExp); + let namespace = getFlag(options, keys2, "namespace", mustBeString); + checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`); + if (filter == null) throw new Error(`onLoad() call is missing a filter`); + let id = nextCallbackID++; + onLoadCallbacks[id] = { name, callback, note: registeredNote }; + plugin.onLoad.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" }); + }, + onDispose(callback) { + onDisposeCallbacks.push(callback); + }, + esbuild: streamIn.esbuild + }); + if (promise2) await promise2; + requestPlugins.push(plugin); + } catch (e) { + return { ok: false, error: e, pluginName: name }; + } + } + requestCallbacks["on-start"] = async (id, request) => { + details.clear(); + let response = { errors: [], warnings: [] }; + await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => { + try { + let result = await callback(); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`); + if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0)); + if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0)); + } + } catch (e) { + response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name)); + } + })); + sendResponse(id, response); + }; + requestCallbacks["on-resolve"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onResolveCallbacks[id2]); + let result = await callback({ + path: request.path, + importer: request.importer, + namespace: request.namespace, + resolveDir: request.resolveDir, + kind: request.kind, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let path3 = getFlag(result, keys, "path", mustBeString); + let namespace = getFlag(result, keys, "namespace", mustBeString); + let suffix = getFlag(result, keys, "suffix", mustBeString); + let external = getFlag(result, keys, "external", mustBeBoolean); + let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings); + checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (path3 != null) response.path = path3; + if (namespace != null) response.namespace = namespace; + if (suffix != null) response.suffix = suffix; + if (external != null) response.external = external; + if (sideEffects != null) response.sideEffects = sideEffects; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + requestCallbacks["on-load"] = async (id, request) => { + let response = {}, name = "", callback, note; + for (let id2 of request.ids) { + try { + ({ name, callback, note } = onLoadCallbacks[id2]); + let result = await callback({ + path: request.path, + namespace: request.namespace, + suffix: request.suffix, + pluginData: details.load(request.pluginData), + with: request.with + }); + if (result != null) { + if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let pluginName = getFlag(result, keys, "pluginName", mustBeString); + let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array); + let resolveDir = getFlag(result, keys, "resolveDir", mustBeString); + let pluginData = getFlag(result, keys, "pluginData", canBeAnything); + let loader = getFlag(result, keys, "loader", mustBeString); + let errors = getFlag(result, keys, "errors", mustBeArray); + let warnings = getFlag(result, keys, "warnings", mustBeArray); + let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings); + let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings); + checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`); + response.id = id2; + if (pluginName != null) response.pluginName = pluginName; + if (contents instanceof Uint8Array) response.contents = contents; + else if (contents != null) response.contents = encodeUTF8(contents); + if (resolveDir != null) response.resolveDir = resolveDir; + if (pluginData != null) response.pluginData = details.store(pluginData); + if (loader != null) response.loader = loader; + if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles"); + if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs"); + break; + } + } catch (e) { + response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] }; + break; + } + } + sendResponse(id, response); + }; + let runOnEndCallbacks = (result, done) => done([], []); + if (onEndCallbacks.length > 0) { + runOnEndCallbacks = (result, done) => { + (async () => { + const onEndErrors = []; + const onEndWarnings = []; + for (const { name, callback, note } of onEndCallbacks) { + let newErrors; + let newWarnings; + try { + const value = await callback(result); + if (value != null) { + if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`); + let keys = {}; + let errors = getFlag(value, keys, "errors", mustBeArray); + let warnings = getFlag(value, keys, "warnings", mustBeArray); + checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`); + if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0); + if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0); + } + } catch (e) { + newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)]; + } + if (newErrors) { + onEndErrors.push(...newErrors); + try { + result.errors.push(...newErrors); + } catch { + } + } + if (newWarnings) { + onEndWarnings.push(...newWarnings); + try { + result.warnings.push(...newWarnings); + } catch { + } + } + } + done(onEndErrors, onEndWarnings); + })(); + }; + } + let scheduleOnDisposeCallbacks = () => { + for (const cb of onDisposeCallbacks) { + setTimeout(() => cb(), 0); + } + }; + isSetupDone = true; + return { + ok: true, + requestPlugins, + runOnEndCallbacks, + scheduleOnDisposeCallbacks + }; + }; + function createObjectStash() { + const map2 = /* @__PURE__ */ new Map(); + let nextID = 0; + return { + clear() { + map2.clear(); + }, + load(id) { + return map2.get(id); + }, + store(value) { + if (value === void 0) return -1; + const id = nextID++; + map2.set(id, value); + return id; + } + }; + } + function extractCallerV8(e, streamIn, ident) { + let note; + let tried = false; + return () => { + if (tried) return note; + tried = true; + try { + let lines = (e.stack + "").split("\n"); + lines.splice(1, 1); + let location = parseStackLinesV8(streamIn, lines, ident); + if (location) { + note = { text: e.message, location }; + return note; + } + } catch { + } + }; + } + function extractErrorMessageV8(e, streamIn, stash, note, pluginName) { + let text = "Internal error"; + let location = null; + try { + text = (e && e.message || e) + ""; + } catch { + } + try { + location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), ""); + } catch { + } + return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 }; + } + function parseStackLinesV8(streamIn, lines, ident) { + let at = " at "; + if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) { + for (let i = 1; i < lines.length; i++) { + let line = lines[i]; + if (!line.startsWith(at)) continue; + line = line.slice(at.length); + while (true) { + let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line); + if (match) { + line = match[1]; + continue; + } + match = /^(\S+):(\d+):(\d+)$/.exec(line); + if (match) { + let contents; + try { + contents = streamIn.readFileSync(match[1], "utf8"); + } catch { + break; + } + let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || ""; + let column = +match[3] - 1; + let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0; + return { + file: match[1], + namespace: "file", + line: +match[2], + column: encodeUTF8(lineText.slice(0, column)).length, + length: encodeUTF8(lineText.slice(column, column + length)).length, + lineText: lineText + "\n" + lines.slice(1).join("\n"), + suggestion: "" + }; + } + break; + } + } + } + return null; + } + function failureErrorWithLog(text, errors, warnings) { + let limit = 5; + text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => { + if (i === limit) return "\n..."; + if (!e.location) return ` +error: ${e.text}`; + let { file: file2, line, column } = e.location; + let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : ""; + return ` +${file2}:${line}:${column}: ERROR: ${pluginText}${e.text}`; + }).join(""); + let error51 = new Error(text); + for (const [key, value] of [["errors", errors], ["warnings", warnings]]) { + Object.defineProperty(error51, key, { + configurable: true, + enumerable: true, + get: () => value, + set: (value2) => Object.defineProperty(error51, key, { + configurable: true, + enumerable: true, + value: value2 + }) + }); + } + return error51; + } + function replaceDetailsInMessages(messages, stash) { + for (const message of messages) { + message.detail = stash.load(message.detail); + } + return messages; + } + function sanitizeLocation(location, where, terminalWidth) { + if (location == null) return null; + let keys = {}; + let file2 = getFlag(location, keys, "file", mustBeString); + let namespace = getFlag(location, keys, "namespace", mustBeString); + let line = getFlag(location, keys, "line", mustBeInteger); + let column = getFlag(location, keys, "column", mustBeInteger); + let length = getFlag(location, keys, "length", mustBeInteger); + let lineText = getFlag(location, keys, "lineText", mustBeString); + let suggestion = getFlag(location, keys, "suggestion", mustBeString); + checkForInvalidFlags(location, keys, where); + if (lineText) { + const relevantASCII = lineText.slice( + 0, + (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80) + ); + if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) { + lineText = relevantASCII; + } + } + return { + file: file2 || "", + namespace: namespace || "", + line: line || 0, + column: column || 0, + length: length || 0, + lineText: lineText || "", + suggestion: suggestion || "" + }; + } + function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) { + let messagesClone = []; + let index = 0; + for (const message of messages) { + let keys = {}; + let id = getFlag(message, keys, "id", mustBeString); + let pluginName = getFlag(message, keys, "pluginName", mustBeString); + let text = getFlag(message, keys, "text", mustBeString); + let location = getFlag(message, keys, "location", mustBeObjectOrNull); + let notes = getFlag(message, keys, "notes", mustBeArray); + let detail = getFlag(message, keys, "detail", canBeAnything); + let where = `in element ${index} of "${property}"`; + checkForInvalidFlags(message, keys, where); + let notesClone = []; + if (notes) { + for (const note of notes) { + let noteKeys = {}; + let noteText = getFlag(note, noteKeys, "text", mustBeString); + let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull); + checkForInvalidFlags(note, noteKeys, where); + notesClone.push({ + text: noteText || "", + location: sanitizeLocation(noteLocation, where, terminalWidth) + }); + } + } + messagesClone.push({ + id: id || "", + pluginName: pluginName || fallbackPluginName, + text: text || "", + location: sanitizeLocation(location, where, terminalWidth), + notes: notesClone, + detail: stash ? stash.store(detail) : -1 + }); + index++; + } + return messagesClone; + } + function sanitizeStringArray(values, property) { + const result = []; + for (const value of values) { + if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`); + result.push(value); + } + return result; + } + function sanitizeStringMap(map2, property) { + const result = /* @__PURE__ */ Object.create(null); + for (const key in map2) { + const value = map2[key]; + if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`); + result[key] = value; + } + return result; + } + function convertOutputFiles({ path: path3, contents, hash: hash2 }) { + let text = null; + return { + path: path3, + contents, + hash: hash2, + get text() { + const binary = this.contents; + if (text === null || binary !== contents) { + contents = binary; + text = decodeUTF8(binary); + } + return text; + } + }; + } + function jsRegExpToGoRegExp(regexp) { + let result = regexp.source; + if (regexp.flags) result = `(?${regexp.flags})${result}`; + return result; + } + function parseJSON(bytes) { + let text; + try { + text = decodeUTF8(bytes); + } catch { + return JSON_parse(bytes); + } + return JSON.parse(text); + } + var fs = __require("fs"); + var os = __require("os"); + var path = __require("path"); + var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH; + var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild"; + var packageDarwin_arm64 = "@esbuild/darwin-arm64"; + var packageDarwin_x64 = "@esbuild/darwin-x64"; + var knownWindowsPackages = { + "win32 arm64 LE": "@esbuild/win32-arm64", + "win32 ia32 LE": "@esbuild/win32-ia32", + "win32 x64 LE": "@esbuild/win32-x64" + }; + var knownUnixlikePackages = { + "aix ppc64 BE": "@esbuild/aix-ppc64", + "android arm64 LE": "@esbuild/android-arm64", + "darwin arm64 LE": "@esbuild/darwin-arm64", + "darwin x64 LE": "@esbuild/darwin-x64", + "freebsd arm64 LE": "@esbuild/freebsd-arm64", + "freebsd x64 LE": "@esbuild/freebsd-x64", + "linux arm LE": "@esbuild/linux-arm", + "linux arm64 LE": "@esbuild/linux-arm64", + "linux ia32 LE": "@esbuild/linux-ia32", + "linux mips64el LE": "@esbuild/linux-mips64el", + "linux ppc64 LE": "@esbuild/linux-ppc64", + "linux riscv64 LE": "@esbuild/linux-riscv64", + "linux s390x BE": "@esbuild/linux-s390x", + "linux x64 LE": "@esbuild/linux-x64", + "linux loong64 LE": "@esbuild/linux-loong64", + "netbsd arm64 LE": "@esbuild/netbsd-arm64", + "netbsd x64 LE": "@esbuild/netbsd-x64", + "openbsd arm64 LE": "@esbuild/openbsd-arm64", + "openbsd x64 LE": "@esbuild/openbsd-x64", + "sunos x64 LE": "@esbuild/sunos-x64" + }; + var knownWebAssemblyFallbackPackages = { + "android arm LE": "@esbuild/android-arm", + "android x64 LE": "@esbuild/android-x64", + "openharmony arm64 LE": "@esbuild/openharmony-arm64" + }; + function pkgAndSubpathForCurrentPlatform() { + let pkg; + let subpath; + let isWASM = false; + let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`; + if (platformKey in knownWindowsPackages) { + pkg = knownWindowsPackages[platformKey]; + subpath = "esbuild.exe"; + } else if (platformKey in knownUnixlikePackages) { + pkg = knownUnixlikePackages[platformKey]; + subpath = "bin/esbuild"; + } else if (platformKey in knownWebAssemblyFallbackPackages) { + pkg = knownWebAssemblyFallbackPackages[platformKey]; + subpath = "bin/esbuild"; + isWASM = true; + } else { + throw new Error(`Unsupported platform: ${platformKey}`); + } + return { pkg, subpath, isWASM }; + } + function pkgForSomeOtherPlatform() { + const libMainJS = __require.resolve("esbuild"); + const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS))); + if (path.basename(nodeModulesDirectory) === "node_modules") { + for (const unixKey in knownUnixlikePackages) { + try { + const pkg = knownUnixlikePackages[unixKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + for (const windowsKey in knownWindowsPackages) { + try { + const pkg = knownWindowsPackages[windowsKey]; + if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg; + } catch { + } + } + } + return null; + } + function downloadedBinPath(pkg, subpath) { + const esbuildLibDir = path.dirname(__require.resolve("esbuild")); + return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`); + } + function generateBinPath() { + if (isValidBinaryPath(ESBUILD_BINARY_PATH)) { + if (!fs.existsSync(ESBUILD_BINARY_PATH)) { + console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`); + } else { + return { binPath: ESBUILD_BINARY_PATH, isWASM: false }; + } + } + const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform(); + let binPath; + try { + binPath = __require.resolve(`${pkg}/${subpath}`); + } catch (e) { + binPath = downloadedBinPath(pkg, subpath); + if (!fs.existsSync(binPath)) { + try { + __require.resolve(pkg); + } catch { + const otherPkg = pkgForSomeOtherPlatform(); + if (otherPkg) { + let suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild on Windows or macOS and copying "node_modules" +into a Docker image that runs Linux, or by copying "node_modules" between +Windows and WSL environments. + +If you are installing with npm, you can try not copying the "node_modules" +directory when you copy the files over, and running "npm ci" or "npm install" +on the destination platform after the copy. Or you could consider using yarn +instead of npm which has built-in support for installing a package on multiple +platforms simultaneously. + +If you are installing with yarn, you can try listing both this platform and the +other platform in your ".yarnrc.yml" file using the "supportedArchitectures" +feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) { + suggestions = ` +Specifically the "${otherPkg}" package is present but this platform +needs the "${pkg}" package instead. People often get into this +situation by installing esbuild with npm running inside of Rosetta 2 and then +trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta +2 is Apple's on-the-fly x86_64-to-arm64 translation service). + +If you are installing with npm, you can try ensuring that both npm and node are +not running under Rosetta 2 and then reinstalling esbuild. This likely involves +changing how you installed npm and/or node. For example, installing node with +the universal installer here should work: https://nodejs.org/en/download/. Or +you could consider using yarn instead of npm which has built-in support for +installing a package on multiple platforms simultaneously. + +If you are installing with yarn, you can try listing both "arm64" and "x64" +in your ".yarnrc.yml" file using the "supportedArchitectures" feature: +https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures +Keep in mind that this means multiple copies of esbuild will be present. +`; + } + throw new Error(` +You installed esbuild for another platform than the one you're currently using. +This won't work because esbuild is written with native code and needs to +install a platform-specific binary executable. +${suggestions} +Another alternative is to use the "esbuild-wasm" package instead, which works +the same way on all platforms. But it comes with a heavy performance cost and +can sometimes be 10x slower than the "esbuild" package, so you may also not +want to do that. +`); + } + throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild. + +If you are installing esbuild with npm, make sure that you don't specify the +"--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature +of "package.json" is used by esbuild to install the correct binary executable +for your current platform.`); + } + throw e; + } + } + if (/\.zip\//.test(binPath)) { + let pnpapi; + try { + pnpapi = __require("pnpapi"); + } catch (e) { + } + if (pnpapi) { + const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation; + const binTargetPath = path.join( + root, + "node_modules", + ".cache", + "esbuild", + `pnpapi-${pkg.replace("/", "-")}-${"0.27.7"}-${path.basename(subpath)}` + ); + if (!fs.existsSync(binTargetPath)) { + fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); + fs.copyFileSync(binPath, binTargetPath); + fs.chmodSync(binTargetPath, 493); + } + return { binPath: binTargetPath, isWASM }; + } + } + return { binPath, isWASM }; + } + var child_process = __require("child_process"); + var crypto2 = __require("crypto"); + var path2 = __require("path"); + var fs2 = __require("fs"); + var os2 = __require("os"); + var tty = __require("tty"); + var worker_threads; + if (process.env.ESBUILD_WORKER_THREADS !== "0") { + try { + worker_threads = __require("worker_threads"); + } catch { + } + let [major, minor] = process.versions.node.split("."); + if ( + // { + if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { + throw new Error( + `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle. + +More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.` + ); + } + if (false) { + return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]]; + } else { + const { binPath, isWASM } = generateBinPath(); + if (isWASM) { + return ["node", [binPath]]; + } else { + return [binPath, []]; + } + } + }; + var isTTY = () => tty.isatty(2); + var fsSync = { + readFile(tempFile, callback) { + try { + let contents = fs2.readFileSync(tempFile, "utf8"); + try { + fs2.unlinkSync(tempFile); + } catch { + } + callback(null, contents); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFileSync(tempFile, contents); + callback(tempFile); + } catch { + callback(null); + } + } + }; + var fsAsync = { + readFile(tempFile, callback) { + try { + fs2.readFile(tempFile, "utf8", (err, contents) => { + try { + fs2.unlink(tempFile, () => callback(err, contents)); + } catch { + callback(err, contents); + } + }); + } catch (err) { + callback(err, null); + } + }, + writeFile(contents, callback) { + try { + let tempFile = randomFileName(); + fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile)); + } catch { + callback(null); + } + } + }; + var version2 = "0.27.7"; + var build4 = (options) => ensureServiceIsRunning().build(options); + var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); + var transform2 = (input, options) => ensureServiceIsRunning().transform(input, options); + var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options); + var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options); + var buildSync = (options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.buildSync(options); + } + let result; + runServiceSync((service) => service.buildOrContext({ + callName: "buildSync", + refs: null, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; + }; + var transformSync = (input, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.transformSync(input, options); + } + let result; + runServiceSync((service) => service.transform({ + callName: "transformSync", + refs: null, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsSync, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; + }; + var formatMessagesSync = (messages, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.formatMessagesSync(messages, options); + } + let result; + runServiceSync((service) => service.formatMessages({ + callName: "formatMessagesSync", + refs: null, + messages, + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; + }; + var analyzeMetafileSync = (metafile, options) => { + if (worker_threads && !isInternalWorkerThread) { + if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads); + return workerThreadService.analyzeMetafileSync(metafile, options); + } + let result; + runServiceSync((service) => service.analyzeMetafile({ + callName: "analyzeMetafileSync", + refs: null, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => { + if (err) throw err; + result = res; + } + })); + return result; + }; + var stop = () => { + if (stopService) stopService(); + if (workerThreadService) workerThreadService.stop(); + return Promise.resolve(); + }; + var initializeWasCalled = false; + var initialize = (options) => { + options = validateInitializeOptions(options || {}); + if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`); + if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`); + if (options.worker) throw new Error(`The "worker" option only works in the browser`); + if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once'); + ensureServiceIsRunning(); + initializeWasCalled = true; + return Promise.resolve(); + }; + var defaultWD = process.cwd(); + var longLivedService; + var stopService; + var ensureServiceIsRunning = () => { + if (longLivedService) return longLivedService; + let [command, args] = esbuildCommandAndArgs(); + let child = child_process.spawn(command, args.concat(`--service=${"0.27.7"}`, "--ping"), { + windowsHide: true, + stdio: ["pipe", "pipe", "inherit"], + cwd: defaultWD + }); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + child.stdin.write(bytes, (err) => { + if (err) afterClose(err); + }); + }, + readFileSync: fs2.readFileSync, + isSync: false, + hasFS: true, + esbuild: node_exports + }); + child.stdin.on("error", afterClose); + child.on("error", afterClose); + const stdin = child.stdin; + const stdout = child.stdout; + stdout.on("data", readFromStdout); + stdout.on("end", afterClose); + stopService = () => { + stdin.destroy(); + stdout.destroy(); + child.kill(); + initializeWasCalled = false; + longLivedService = void 0; + stopService = void 0; + }; + let refCount = 0; + child.unref(); + if (stdin.unref) { + stdin.unref(); + } + if (stdout.unref) { + stdout.unref(); + } + const refs = { + ref() { + if (++refCount === 1) child.ref(); + }, + unref() { + if (--refCount === 0) child.unref(); + } + }; + longLivedService = { + build: (options) => new Promise((resolve4, reject) => { + service.buildOrContext({ + callName: "build", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve4(res) + }); + }), + context: (options) => new Promise((resolve4, reject) => service.buildOrContext({ + callName: "context", + refs, + options, + isTTY: isTTY(), + defaultWD, + callback: (err, res) => err ? reject(err) : resolve4(res) + })), + transform: (input, options) => new Promise((resolve4, reject) => service.transform({ + callName: "transform", + refs, + input, + options: options || {}, + isTTY: isTTY(), + fs: fsAsync, + callback: (err, res) => err ? reject(err) : resolve4(res) + })), + formatMessages: (messages, options) => new Promise((resolve4, reject) => service.formatMessages({ + callName: "formatMessages", + refs, + messages, + options, + callback: (err, res) => err ? reject(err) : resolve4(res) + })), + analyzeMetafile: (metafile, options) => new Promise((resolve4, reject) => service.analyzeMetafile({ + callName: "analyzeMetafile", + refs, + metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile), + options, + callback: (err, res) => err ? reject(err) : resolve4(res) + })) + }; + return longLivedService; + }; + var runServiceSync = (callback) => { + let [command, args] = esbuildCommandAndArgs(); + let stdin = new Uint8Array(); + let { readFromStdout, afterClose, service } = createChannel({ + writeToStdin(bytes) { + if (stdin.length !== 0) throw new Error("Must run at most one command"); + stdin = bytes; + }, + isSync: true, + hasFS: true, + esbuild: node_exports + }); + callback(service); + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.27.7"}`), { + cwd: defaultWD, + windowsHide: true, + input: stdin, + // We don't know how large the output could be. If it's too large, the + // command will fail with ENOBUFS. Reserve 16mb for now since that feels + // like it should be enough. Also allow overriding this with an environment + // variable. + maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024 + }); + readFromStdout(stdout); + afterClose(null); + }; + var randomFileName = () => { + return path2.join(os2.tmpdir(), `esbuild-${crypto2.randomBytes(32).toString("hex")}`); + }; + var workerThreadService = null; + var startWorkerThreadService = (worker_threads2) => { + let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); + let worker = new worker_threads2.Worker(__filename, { + workerData: { workerPort, defaultWD, esbuildVersion: "0.27.7" }, + transferList: [workerPort], + // From node's documentation: https://nodejs.org/api/worker_threads.html + // + // Take care when launching worker threads from preload scripts (scripts loaded + // and run using the `-r` command line flag). Unless the `execArgv` option is + // explicitly set, new Worker threads automatically inherit the command line flags + // from the running process and will preload the same preload scripts as the main + // thread. If the preload script unconditionally launches a worker thread, every + // thread spawned will spawn another until the application crashes. + // + execArgv: [] + }); + let nextID = 0; + let fakeBuildError = (text) => { + let error51 = new Error(`Build failed with 1 error: +error: ${text}`); + let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }]; + error51.errors = errors; + error51.warnings = []; + return error51; + }; + let validateBuildSyncOptions = (options) => { + if (!options) return; + let plugins = options.plugins; + if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`); + }; + let applyProperties = (object2, properties) => { + for (let key in properties) { + object2[key] = properties[key]; + } + }; + let runCallSync = (command, args) => { + let id = nextID++; + let sharedBuffer = new SharedArrayBuffer(8); + let sharedBufferView = new Int32Array(sharedBuffer); + let msg = { sharedBuffer, id, command, args }; + worker.postMessage(msg); + let status = Atomics.wait(sharedBufferView, 0, 0); + if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status); + let { message: { id: id2, resolve: resolve4, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort); + if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`); + if (reject) { + applyProperties(reject, properties); + throw reject; + } + return resolve4; + }; + worker.unref(); + return { + buildSync(options) { + validateBuildSyncOptions(options); + return runCallSync("build", [options]); + }, + transformSync(input, options) { + return runCallSync("transform", [input, options]); + }, + formatMessagesSync(messages, options) { + return runCallSync("formatMessages", [messages, options]); + }, + analyzeMetafileSync(metafile, options) { + return runCallSync("analyzeMetafile", [metafile, options]); + }, + stop() { + worker.terminate(); + workerThreadService = null; + } + }; + }; + var startSyncServiceWorker = () => { + let workerPort = worker_threads.workerData.workerPort; + let parentPort = worker_threads.parentPort; + let extractProperties = (object2) => { + let properties = {}; + if (object2 && typeof object2 === "object") { + for (let key in object2) { + properties[key] = object2[key]; + } + } + return properties; + }; + try { + let service = ensureServiceIsRunning(); + defaultWD = worker_threads.workerData.defaultWD; + parentPort.on("message", (msg) => { + (async () => { + let { sharedBuffer, id, command, args } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + try { + switch (command) { + case "build": + workerPort.postMessage({ id, resolve: await service.build(args[0]) }); + break; + case "transform": + workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) }); + break; + case "formatMessages": + workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) }); + break; + case "analyzeMetafile": + workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) }); + break; + default: + throw new Error(`Invalid command: ${command}`); + } + } catch (reject) { + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + } + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + })(); + }); + } catch (reject) { + parentPort.on("message", (msg) => { + let { sharedBuffer, id } = msg; + let sharedBufferView = new Int32Array(sharedBuffer); + workerPort.postMessage({ id, reject, properties: extractProperties(reject) }); + Atomics.add(sharedBufferView, 0, 1); + Atomics.notify(sharedBufferView, 0, Infinity); + }); + } + }; + if (isInternalWorkerThread) { + startSyncServiceWorker(); + } + var node_default = node_exports; + } +}); + +// node_modules/@intentius/chant/src/discovery/sandbox/bundle.ts +import { existsSync as existsSync2, mkdtempSync, readFileSync as readFileSync2, realpathSync, rmSync, statSync, writeFileSync as writeFileSync2 } from "node:fs"; +import { createRequire } from "node:module"; +import { tmpdir } from "node:os"; +import { dirname as dirname3, join as join3, resolve as resolvePath } from "node:path"; +function getExternalPackagePathCache() { + const g = globalThis; + return g.__chantExternalPackagePathCache ??= /* @__PURE__ */ new Map(); +} +function fastResolvePackage(specifier, fromDir) { + let dir = fromDir; + for (; ; ) { + const packageDir = join3(dir, "node_modules", specifier); + if (existsSync2(packageDir)) { + const pkgJsonPath = join3(packageDir, "package.json"); + if (!existsSync2(pkgJsonPath)) return void 0; + let pkg; + try { + pkg = JSON.parse(readFileSync2(pkgJsonPath, "utf-8")); + } catch { + return void 0; + } + if (typeof pkg !== "object" || pkg === null || pkg.exports !== void 0) { + return void 0; + } + const main3 = pkg.main; + const entry = typeof main3 === "string" ? main3 : "index.js"; + const resolved = resolvePath(packageDir, entry); + if (!existsSync2(resolved) || !statSync(resolved).isFile()) return void 0; + try { + return realpathSync(resolved); + } catch { + return void 0; + } + } + const parent = dirname3(dir); + if (parent === dir) return void 0; + dir = parent; + } +} +function externalTrustedPackagesPlugin() { + const readPaths = []; + const resolved = /* @__PURE__ */ new Map(); + const pathCache = getExternalPackagePathCache(); + for (const name of EXTERNAL_PACKAGES) { + try { + let path = pathCache.get(name); + if (path === void 0 && !pathCache.has(name)) { + path = fastResolvePackage(name, HERE) ?? require2.resolve(name, { paths: [HERE] }); + pathCache.set(name, path); + } + if (path === void 0) continue; + resolved.set(name, path); + readPaths.push(dirname3(path)); + } catch { + pathCache.set(name, void 0); + } + } + const plugin = { + name: "chant-sandbox-external-trusted-packages", + setup(build4) { + for (const [name, path] of resolved) { + const filter = new RegExp(`^${name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}$`); + build4.onResolve({ filter }, () => ({ path, external: true })); + } + } + }; + return { plugin, readPaths }; +} +async function bundleDriver(driverSource) { + const bundleDir = realpathSync(mkdtempSync(join3(tmpdir(), "chant-sandbox-"))); + const entryPath = join3(bundleDir, "driver.mts"); + writeFileSync2(entryPath, driverSource, "utf-8"); + const outfile = join3(bundleDir, "child.mjs"); + const { plugin, readPaths } = externalTrustedPackagesPlugin(); + const start = performance.now(); + try { + await esbuild.build({ + entryPoints: [entryPath], + outfile, + bundle: true, + platform: "node", + format: "esm", + absWorkingDir: bundleDir, + logLevel: "silent", + plugins: [plugin] + }); + } catch (err) { + rmSync(bundleDir, { recursive: true, force: true }); + throw err; + } + const durationMs = performance.now() - start; + const bytes = statSync(outfile).size; + return { bundlePath: outfile, bundleDir, externalReadPaths: readPaths, durationMs, bytes }; +} +var esbuild, HERE, require2, EXTERNAL_PACKAGES; +var init_bundle = __esm({ + "node_modules/@intentius/chant/src/discovery/sandbox/bundle.ts"() { + esbuild = __toESM(require_main(), 1); + HERE = import.meta.dirname; + require2 = createRequire(import.meta.url); + EXTERNAL_PACKAGES = ["typescript"]; + } +}); + +// node_modules/@intentius/chant/src/params.ts +var init_params = __esm({ + "node_modules/@intentius/chant/src/params.ts"() { + } +}); + +// node_modules/@intentius/chant/src/discovery/sandbox/driver.ts +import { dirname as dirname4, join as join4 } from "node:path"; +function lit(value) { + return JSON.stringify(value); +} +function generateConfigDriverSource(configPath) { + return [ + `import { classifyChildError } from ${lit(CHILD_ERRORS_MODULE)};`, + `import { scanConfigWireSafety } from ${lit(CONFIG_WIRE_MODULE)};`, + ``, + `function send(payload) {`, + ` if (typeof process.send === "function") process.send(payload);`, + ` else console.log(JSON.stringify(payload));`, + `}`, + ``, + `async function main() {`, + ` let namespace;`, + ` try {`, + ` namespace = await import(${lit(configPath)});`, + ` } catch (err) {`, + ` send({ kind: "chant-config", ok: false, error: classifyChildError(${lit(configPath)}, err).toJSON() });`, + ` return;`, + ` }`, + ``, + // Mirrors loadChantConfig's own selection so the scan sees exactly the + // object the parent will normalize. A namespace object is not a plain + // object; scanConfigWireSafety walks its own keys rather than rejecting it. + ` const selected = namespace.default ?? namespace.config ?? namespace;`, + ``, + ` const offenders = scanConfigWireSafety(selected);`, + ` if (offenders.length > 0) {`, + ` send({ kind: "chant-config", ok: false, offenders });`, + ` return;`, + ` }`, + ``, + ` try {`, + // Round-trip here, not just at the IPC boundary: this is what proves the + // payload really is JSON before it leaves the child, and turns anything + // the scan somehow missed into a named error instead of a quiet drop. + ` const config = JSON.parse(JSON.stringify(selected ?? {}));`, + ` send({ kind: "chant-config", ok: true, config });`, + ` } catch (err) {`, + ` send({ kind: "chant-config", ok: false, error: classifyChildError(${lit(configPath)}, err, "resolution").toJSON() });`, + ` }`, + `}`, + ``, + `main().catch((err) => {`, + ` send({ kind: "chant-config", ok: false, error: classifyChildError(${lit(configPath)}, err).toJSON() });`, + `});` + ].join("\n"); +} +var HERE2, DISCOVERY_DIR, COLLECT_MODULE, RESOLVE_MODULE, ENTITY_WIRE_CODEC_MODULE, CHILD_ERRORS_MODULE, PROVENANCE_MODULE, CONFIG_WIRE_MODULE, POLICY_WIRE_MODULE, POST_SYNTH_MODULE, PARAMS_MODULE; +var init_driver = __esm({ + "node_modules/@intentius/chant/src/discovery/sandbox/driver.ts"() { + init_params(); + HERE2 = import.meta.dirname; + DISCOVERY_DIR = join4(HERE2, ".."); + COLLECT_MODULE = join4(DISCOVERY_DIR, "collect.ts"); + RESOLVE_MODULE = join4(DISCOVERY_DIR, "resolve.ts"); + ENTITY_WIRE_CODEC_MODULE = join4(DISCOVERY_DIR, "entity-wire-codec.ts"); + CHILD_ERRORS_MODULE = join4(HERE2, "child-errors.ts"); + PROVENANCE_MODULE = join4(dirname4(DISCOVERY_DIR), "provenance.ts"); + CONFIG_WIRE_MODULE = join4(HERE2, "config-wire.ts"); + POLICY_WIRE_MODULE = join4(HERE2, "policy-wire.ts"); + POST_SYNTH_MODULE = join4(dirname4(DISCOVERY_DIR), "lint", "post-synth.ts"); + PARAMS_MODULE = join4(dirname4(DISCOVERY_DIR), "params.ts"); + } +}); + +// node_modules/@intentius/chant/src/discovery/sandbox/config-wire.ts +function formatConfigWireOffenders(configPath, offenders) { + const lines = offenders.map((o) => ` ${o.path || ""}: ${o.found}`); + return [ + `Cannot evaluate ${configPath} inside the --sandbox boundary: it holds values that are not data.`, + ...lines, + `Under --sandbox the config is evaluated in an isolated child process and only JSON crosses back, so every value must be a string, number, boolean, null, array or plain object. Move the offending value out of chant.config.ts (lint rule plugins and policy checks are referenced by path, not embedded), or drop --sandbox for this build.` + ].join("\n"); +} +var init_config_wire = __esm({ + "node_modules/@intentius/chant/src/discovery/sandbox/config-wire.ts"() { + } +}); + +// node_modules/@intentius/chant/src/discovery/sandbox/fork.ts +import { fork } from "node:child_process"; +function lineBuffered(emit) { + let pending = ""; + return { + push(chunk) { + pending += chunk.toString(); + let newlineAt = pending.indexOf("\n"); + while (newlineAt !== -1) { + emit(pending.slice(0, newlineAt)); + pending = pending.slice(newlineAt + 1); + newlineAt = pending.indexOf("\n"); + } + }, + flush() { + if (pending.length > 0) { + emit(pending); + pending = ""; + } + } + }; +} +function forkSandboxed(options, isResponse) { + const { bundlePath, bundleDir, projectRealpath, externalReadPaths, env: env2, timeoutMs, label, send, outputPrefix } = options; + return new Promise((resolvePromise, reject) => { + const readAllowances = [bundleDir, projectRealpath, ...externalReadPaths].map( + (p) => `--allow-fs-read=${p}` + ); + const child = fork(bundlePath, [], { + execArgv: ["--permission", ...readAllowances], + env: env2, + stdio: ["ignore", "pipe", "pipe", "ipc"] + }); + let settled = false; + let stderrBuf = ""; + const timeout = setTimeout(() => { + if (settled) return; + settled = true; + child.kill(); + reject(new Error(`${label} timed out after ${timeoutMs}ms`)); + }, timeoutMs); + if (send !== void 0) { + child.send(send, (err) => { + if (settled || !err) return; + settled = true; + clearTimeout(timeout); + child.kill(); + reject(new Error(`${label}: failed to send the child its input: ${err.message}`)); + }); + } + const forwardLine = (line) => { + process.stderr.write(`${outputPrefix} ${line} +`); + }; + const stdoutForwarder = lineBuffered(forwardLine); + const stderrForwarder = lineBuffered(forwardLine); + child.stdout?.on("data", (chunk) => { + stdoutForwarder.push(chunk); + }); + child.stdout?.on("end", () => stdoutForwarder.flush()); + child.stderr?.on("data", (chunk) => { + stderrBuf += chunk.toString(); + stderrForwarder.push(chunk); + }); + child.stderr?.on("end", () => stderrForwarder.flush()); + child.on("message", (msg) => { + if (settled || !isResponse(msg)) return; + settled = true; + clearTimeout(timeout); + child.kill(); + resolvePromise(msg); + }); + child.on("error", (err) => { + if (settled) return; + settled = true; + clearTimeout(timeout); + reject(err); + }); + child.on("exit", (code, signal) => { + if (settled) return; + settled = true; + clearTimeout(timeout); + reject( + new Error( + `${label}: child exited before reporting results (code ${code}, signal ${signal})${stderrBuf.trim() ? `: ${stderrBuf.trim()}` : ""}` + ) + ); + }); + }); +} +var init_fork = __esm({ + "node_modules/@intentius/chant/src/discovery/sandbox/fork.ts"() { + } +}); + +// node_modules/@intentius/chant/src/env.ts +var ENV_VAR; +var init_env = __esm({ + "node_modules/@intentius/chant/src/env.ts"() { + init_config(); + ENV_VAR = "CHANT_ENV"; + } +}); + +// node_modules/@intentius/chant/src/discovery/sandbox/config-run.ts +var config_run_exports = {}; +__export(config_run_exports, { + evaluateConfigSandboxed: () => evaluateConfigSandboxed +}); +import { realpathSync as realpathSync2, rmSync as rmSync2 } from "node:fs"; +import { resolve as resolve2 } from "node:path"; +function isConfigChildResponse(value) { + return typeof value === "object" && value !== null && value.kind === "chant-config" && typeof value.ok === "boolean"; +} +async function evaluateConfigSandboxed(configPath, projectRoot) { + const driverSource = generateConfigDriverSource(configPath); + const { bundlePath, bundleDir, externalReadPaths, durationMs, bytes } = await bundleDriver(driverSource); + try { + let projectRealpath; + try { + projectRealpath = realpathSync2(resolve2(projectRoot)); + } catch { + projectRealpath = resolve2(projectRoot); + } + const env2 = { PATH: process.env.PATH ?? "" }; + const activeEnv = process.env[ENV_VAR]; + if (activeEnv) env2[ENV_VAR] = activeEnv; + const response = await forkSandboxed( + { + bundlePath, + bundleDir, + projectRealpath, + externalReadPaths, + env: env2, + timeoutMs: CONFIG_CHILD_TIMEOUT_MS, + label: `sandboxed evaluation of ${configPath}`, + // chant #1148 — the config's own console.log/error no longer goes + // nowhere; see `./fork.ts`'s `outputPrefix` doc. + outputPrefix: "[sandbox:config]" + }, + isConfigChildResponse + ); + if (!response.ok) { + if (response.offenders && response.offenders.length > 0) { + throw new Error(formatConfigWireOffenders(configPath, response.offenders)); + } + throw new Error( + response.error?.message ? `Failed to evaluate ${configPath} inside the --sandbox boundary: ${response.error.message}` : `Failed to evaluate ${configPath} inside the --sandbox boundary` + ); + } + return { config: response.config ?? {}, bundleMs: durationMs, bundleBytes: bytes }; + } finally { + rmSync2(bundleDir, { recursive: true, force: true }); + } +} +var CONFIG_CHILD_TIMEOUT_MS; +var init_config_run = __esm({ + "node_modules/@intentius/chant/src/discovery/sandbox/config-run.ts"() { + init_bundle(); + init_driver(); + init_config_wire(); + init_fork(); + init_env(); + CONFIG_CHILD_TIMEOUT_MS = 6e4; + } +}); + +// node_modules/@intentius/chant/src/config-sandbox.ts +import { dirname as dirname5 } from "node:path"; +function selectConfigExport(namespace) { + return namespace.default ?? namespace.config ?? namespace; +} +async function evaluateProjectConfig(configPath, projectRoot = dirname5(configPath)) { + if (!armed) { + return selectConfigExport(await importConfigModule(configPath)); + } + if (memo.has(configPath)) return memo.get(configPath); + const { evaluateConfigSandboxed: evaluateConfigSandboxed2 } = await Promise.resolve().then(() => (init_config_run(), config_run_exports)); + const { config: config2 } = await evaluateConfigSandboxed2(configPath, projectRoot); + memo.set(configPath, config2); + return config2; +} +var armed, memo; +var init_config_sandbox = __esm({ + "node_modules/@intentius/chant/src/config-sandbox.ts"() { + init_config_import(); + armed = false; + memo = /* @__PURE__ */ new Map(); + } +}); + +// node_modules/@intentius/chant/src/config.ts +import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs"; +import { dirname as dirname6, join as join5 } from "path"; async function loadChantConfig(dir) { - const tsPath = join(dir, "chant.config.ts"); - if (existsSync(tsPath)) { - const mod = await import(tsPath); - const config2 = mod.default ?? mod.config ?? mod; + const tsPath = join5(dir, "chant.config.ts"); + if (existsSync3(tsPath)) { + const config2 = await evaluateProjectConfig(tsPath, dir); return { config: normalizeConfig(config2, tsPath), configPath: tsPath }; } - const jsonPath = join(dir, "chant.config.json"); - if (existsSync(jsonPath)) { - const { readFileSync: readFileSync3 } = await import("fs"); - const content = readFileSync3(jsonPath, "utf-8"); + const jsonPath = join5(dir, "chant.config.json"); + if (existsSync3(jsonPath)) { + const { readFileSync: readFileSync7 } = await import("fs"); + const content = readFileSync7(jsonPath, "utf-8"); const parsed = JSON.parse(content); return { config: normalizeConfig(parsed, jsonPath), configPath: jsonPath }; } return { config: DEFAULT_CHANT_CONFIG }; } +async function loadChantConfigUpward(startDir) { + let { dir, configPath } = findProjectConfig(startDir); + while (configPath && isLintOnlyFragment(configPath)) { + const parent = dirname6(dir); + if (parent === dir) break; + ({ dir, configPath } = findProjectConfig(parent)); + } + return loadChantConfig(dir); +} +function isLintOnlyFragment(configPath) { + if (!configPath.endsWith("chant.config.json")) return false; + try { + const parsed = JSON.parse(readFileSync3(configPath, "utf-8")); + if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return false; + const keys = Object.keys(parsed); + return keys.length > 0 && keys.every((k) => LINT_FRAGMENT_KEYS.has(k)); + } catch { + return false; + } +} function normalizeConfig(raw, source) { if (typeof raw !== "object" || raw === null) { return DEFAULT_CHANT_CONFIG; @@ -16414,29 +19792,83 @@ function normalizeConfig(raw, source) { } return raw; } -var ChantConfigSchema, DEFAULT_CHANT_CONFIG; +var EnvironmentEntrySchema, ChantConfigSchema, DEFAULT_CHANT_CONFIG, LINT_FRAGMENT_KEYS; var init_config = __esm({ "node_modules/@intentius/chant/src/config.ts"() { init_zod(); + init_sbom_generator(); + init_project_root(); + init_config_sandbox(); + EnvironmentEntrySchema = external_exports.union([ + external_exports.string().min(1), + external_exports.object({ + name: external_exports.string().min(1), + endpoint: external_exports.string().min(1).optional() + }) + ]); ChantConfigSchema = external_exports.object({ lexicons: external_exports.array(external_exports.string().min(1)).optional(), - environments: external_exports.array(external_exports.string().min(1)).optional(), + capabilities: external_exports.array(external_exports.string().min(1)).optional(), + environments: external_exports.array(EnvironmentEntrySchema).optional(), sourceDir: external_exports.string().min(1).optional(), lint: external_exports.record(external_exports.string(), external_exports.unknown()).optional(), ownership: external_exports.object({ stack: external_exports.string().min(1).optional(), env: external_exports.string().min(1).optional(), enabled: external_exports.boolean().optional() + }).optional(), + build: external_exports.object({ + fold: external_exports.boolean().optional() + }).optional(), + buildParams: external_exports.record( + external_exports.string(), + external_exports.object({ + type: external_exports.enum(["string", "number", "boolean"]), + default: external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()]).optional(), + enum: external_exports.array(external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean()])).optional(), + env: external_exports.string().min(1).optional(), + required: external_exports.boolean().optional(), + description: external_exports.string().optional() + }) + ).optional(), + release: external_exports.object({ + autoRecord: external_exports.boolean().optional() + }).optional(), + sbom: external_exports.object({ + format: external_exports.enum(["spdx", "cyclonedx"]).optional(), + enabled: external_exports.boolean().optional() + }).optional(), + signing: external_exports.object({ + keyless: external_exports.boolean().optional(), + oidcIssuer: external_exports.string().min(1).optional(), + identity: external_exports.string().min(1).optional(), + identityIsRegexp: external_exports.boolean().optional(), + key: external_exports.string().min(1).optional() + }).optional(), + vulnPolicy: external_exports.object({ + failSeverity: external_exports.enum(["critical", "high", "medium", "low", "negligible", "unknown"]).optional(), + fixableOnly: external_exports.boolean().optional(), + warnSeverity: external_exports.enum(["critical", "high", "medium", "low", "negligible", "unknown"]).optional(), + failOnLicense: external_exports.boolean().optional(), + failOnUnknownSeverity: external_exports.boolean().optional(), + failOnKev: external_exports.boolean().optional(), + failEpssAtOrAbove: external_exports.number().min(0).max(1).optional(), + warnEpssAtOrAbove: external_exports.number().min(0).max(1).optional(), + exploitabilityFixableOnly: external_exports.boolean().optional(), + license: external_exports.object({ + allow: external_exports.array(external_exports.string()).optional(), + deny: external_exports.array(external_exports.string()).optional() + }).optional(), + scanner: external_exports.enum(["grype", "trivy"]).optional(), + vexSources: external_exports.array(external_exports.string()).optional() }).optional() }).passthrough(); DEFAULT_CHANT_CONFIG = {}; + LINT_FRAGMENT_KEYS = /* @__PURE__ */ new Set(["$schema", "extends", "rules", "overrides", "plugins", "policies"]); } }); // node_modules/@intentius/chant/src/declarable.ts -function isDeclarable(value) { - return typeof value === "object" && value !== null && DECLARABLE_MARKER in value && value[DECLARABLE_MARKER] === true; -} var DECLARABLE_MARKER; var init_declarable = __esm({ "node_modules/@intentius/chant/src/declarable.ts"() { @@ -16445,90 +19877,29 @@ var init_declarable = __esm({ }); // node_modules/@intentius/chant/src/provenance.ts -function setProvenance(entity, prov) { - if (!Object.isExtensible(entity)) return; - const existing = entity[PROVENANCE]; - if (existing) { - existing.sourceFile ??= prov.sourceFile; - existing.composite ??= prov.composite; - existing.compositeInstance ??= prov.compositeInstance; - return; - } - Object.defineProperty(entity, PROVENANCE, { - value: { ...prov }, - enumerable: false, - writable: true, - configurable: true - }); -} -var PROVENANCE; var init_provenance = __esm({ "node_modules/@intentius/chant/src/provenance.ts"() { - PROVENANCE = /* @__PURE__ */ Symbol.for("chant.provenance"); } }); // node_modules/@intentius/chant/src/composite.ts -function isCompositeInstance(value) { - return typeof value === "object" && value !== null && COMPOSITE_MARKER in value && value[COMPOSITE_MARKER] === true; -} -function expandComposite(prefix, instance) { - const result = /* @__PURE__ */ new Map(); - const shared = instance[SHARED_PROPS]; - const compositeName = instance._definition?.compositeName; - for (const [memberName, member] of Object.entries(instance.members)) { - const fullName = `${prefix}${memberName[0].toUpperCase()}${memberName.slice(1)}`; - if (isCompositeInstance(member)) { - const nested = expandComposite(fullName, member); - for (const [nestedName, nestedEntity] of nested) { - if (compositeName) setProvenance(nestedEntity, { composite: compositeName }); - result.set(nestedName, nestedEntity); - } - } else { - if (compositeName) setProvenance(member, { composite: compositeName }); - result.set(fullName, member); - } - } - if (shared) { - for (const entity of result.values()) { - if ("props" in entity) { - const existing = entity.props; - const merged = {}; - for (const [k, v] of Object.entries(shared)) { - if (v !== void 0) { - merged[k] = v; - } - } - for (const [k, v] of Object.entries(existing)) { - if (v !== void 0) { - if (Array.isArray(v) && Array.isArray(merged[k])) { - merged[k] = [...merged[k], ...v]; - } else { - merged[k] = v; - } - } - } - Object.defineProperty(entity, "props", { - value: merged, - enumerable: false, - configurable: true - }); - } - } - } - return result; -} -var COMPOSITE_MARKER, SHARED_PROPS; var init_composite = __esm({ "node_modules/@intentius/chant/src/composite.ts"() { init_declarable(); init_provenance(); - COMPOSITE_MARKER = /* @__PURE__ */ Symbol.for("chant.composite"); - SHARED_PROPS = /* @__PURE__ */ Symbol.for("chant.composite.shared"); + } +}); + +// node_modules/@intentius/chant/src/build-params.ts +var init_build_params = __esm({ + "node_modules/@intentius/chant/src/build-params.ts"() { } }); // node_modules/@intentius/chant/src/intrinsic.ts +function isIntrinsic(value) { + return typeof value === "object" && value !== null && INTRINSIC_MARKER in value && value[INTRINSIC_MARKER] === true; +} var INTRINSIC_MARKER; var init_intrinsic = __esm({ "node_modules/@intentius/chant/src/intrinsic.ts"() { @@ -16543,72 +19914,8 @@ var init_types = __esm({ }); // node_modules/@intentius/chant/src/errors.ts -var errors_exports2 = {}; -__export(errors_exports2, { - BuildError: () => BuildError, - DiscoveryError: () => DiscoveryError, - LintError: () => LintError -}); -var DiscoveryError, BuildError, LintError; var init_errors3 = __esm({ "node_modules/@intentius/chant/src/errors.ts"() { - DiscoveryError = class extends Error { - file; - type; - constructor(file2, message, type) { - super(message); - this.name = "DiscoveryError"; - this.file = file2; - this.type = type; - } - toJSON() { - return { - name: this.name, - file: this.file, - message: this.message, - type: this.type - }; - } - }; - BuildError = class extends Error { - entityName; - constructor(entityName, message) { - super(message); - this.name = "BuildError"; - this.entityName = entityName; - } - toJSON() { - return { - name: this.name, - entityName: this.entityName, - message: this.message - }; - } - }; - LintError = class extends Error { - file; - line; - column; - ruleId; - constructor(file2, line, column, ruleId, message) { - super(message); - this.name = "LintError"; - this.file = file2; - this.line = line; - this.column = column; - this.ruleId = ruleId; - } - toJSON() { - return { - name: this.name, - file: this.file, - line: this.line, - column: this.column, - ruleId: this.ruleId, - message: this.message - }; - } - }; } }); @@ -16664,24 +19971,9 @@ function isAttrRefLike(value) { if (value instanceof AttrRef) return true; return typeof value === "object" && value !== null && "parent" in value && "attribute" in value && "_setLogicalName" in value && typeof value.parent === "object" && typeof value.attribute === "string"; } -function getAttributes(entity) { - const attributes = []; - const obj = entity; - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - const value = obj[key]; - if (isAttrRefLike(value)) { - attributes.push(key); - } - } - } - return attributes; -} -var LOGICAL_NAME_SYMBOL; var init_utils = __esm({ "node_modules/@intentius/chant/src/utils.ts"() { init_attrref(); - LOGICAL_NAME_SYMBOL = /* @__PURE__ */ Symbol.for("chant.logicalName"); } }); @@ -16698,26 +19990,52 @@ var init_serializer = __esm({ }); // node_modules/@intentius/chant/src/lexicon-output.ts -function isLexiconOutput(value) { - return value instanceof LexiconOutput; +function sanitizeLogicalId(...parts) { + const segments = parts.join("_").split(/[^A-Za-z0-9]+/).filter((segment) => segment.length > 0); + if (segments.length === 0) return "Output"; + return segments.map((segment, i) => i === 0 ? segment : segment.charAt(0).toUpperCase() + segment.slice(1)).join(""); } -var LexiconOutput; +var LEXICON_OUTPUT_MARKER, LexiconOutput; var init_lexicon_output = __esm({ "node_modules/@intentius/chant/src/lexicon-output.ts"() { init_intrinsic(); - init_attrref(); + init_utils(); + LEXICON_OUTPUT_MARKER = /* @__PURE__ */ Symbol.for("chant.lexiconOutput"); LexiconOutput = class _LexiconOutput { [INTRINSIC_MARKER] = true; + /** @internal Brand marker — see {@link LEXICON_OUTPUT_MARKER}. Declared + * here only for type purposes; the real, non-enumerable property is + * installed by the constructor. */ + [LEXICON_OUTPUT_MARKER]; sourceLexicon; sourceEntity; sourceAttribute; outputName; /** @internal WeakRef to the source entity object for identity-based matching */ _sourceParent; - /** @internal Intrinsic value when constructed from an Intrinsic rather than AttrRef */ + /** + * @internal Intrinsic value when constructed from an Intrinsic rather than AttrRef. + * Readable outside the class (like `_sourceParent` above) so the entity-wire + * encoder can reach it without an `as unknown as` cast that would erase type + * checking on every field it reads (#1047). + */ _intrinsic; + /** + * @internal The already-resolved literal (string/number/boolean) when + * constructed from neither an AttrRef nor an Intrinsic — non-null exactly + * when `_intrinsic` is null AND `sourceAttribute` is null. There is no + * source entity or attribute to reference, so `getOutputValue()` returns + * this value verbatim rather than fabricating a `Fn::GetAtt` out of an + * unset attribute (chant #1121). Readable outside the class for the same + * reason as `_intrinsic`/`_sourceParent` above. + */ + _literalValue; constructor(ref, name) { - if (ref instanceof AttrRef) { + Object.defineProperty(this, LEXICON_OUTPUT_MARKER, { + value: true, + enumerable: false + }); + if (isAttrRefLike(ref)) { const parent = ref.parent.deref(); if (!parent) { throw new Error("Cannot create LexiconOutput: parent entity has been garbage collected"); @@ -16731,13 +20049,27 @@ var init_lexicon_output = __esm({ this.outputName = name; this._sourceParent = ref.parent; this._intrinsic = null; - } else { + this._literalValue = null; + } else if (isIntrinsic(ref)) { this.sourceLexicon = ""; this.sourceEntity = ""; this.sourceAttribute = null; this.outputName = name; this._sourceParent = null; - this._intrinsic = typeof ref !== "string" ? ref : null; + this._intrinsic = ref; + this._literalValue = null; + } else if (typeof ref === "string" || typeof ref === "number" || typeof ref === "boolean") { + this.sourceLexicon = ""; + this.sourceEntity = ""; + this.sourceAttribute = null; + this.outputName = name; + this._sourceParent = null; + this._intrinsic = null; + this._literalValue = ref; + } else { + throw new Error( + `output(ref, "${name}"): ref must be an AttrRef, an Intrinsic, or an already-resolved string/number/boolean \u2014 got ${ref === null ? "null" : typeof ref} instead. If this came from a resource member access (e.g. "resource.SomeField"), that member is neither a generated attribute nor a real value here \u2014 check for a typo or a property that CloudFormation does not expose via Fn::GetAtt.` + ); } } /** @@ -16750,10 +20082,14 @@ var init_lexicon_output = __esm({ } /** * Returns the CloudFormation Output Value for this output. + * For a literal output: the resolved value itself, verbatim. * For AttrRef-based outputs: emits Fn::GetAtt. * For Intrinsic-based outputs: delegates to the intrinsic's toJSON(). */ getOutputValue() { + if (this._literalValue !== null) { + return this._literalValue; + } if (this._intrinsic) { return this._intrinsic.toJSON(); } @@ -16763,12 +20099,17 @@ var init_lexicon_output = __esm({ * Create a LexiconOutput with an auto-generated name from entity name and attribute. * Used during cross-lexicon ref auto-detection. * + * The name is sanitized to a valid CloudFormation logical id (see + * {@link sanitizeLogicalId}) since it is used verbatim as the `Outputs` + * key by lexicon serializers (e.g. AWS CloudFormation), which reject + * dots or underscores in logical ids. + * * @param ref - The AttrRef pointing to the source entity * @param entityName - The logical name of the source entity - * @returns A LexiconOutput with name `{entityName}_{attribute}` + * @returns A LexiconOutput with a name derived from `{entityName}{Attribute}` */ static auto(ref, entityName) { - const name = `${entityName}_${ref.attribute}`; + const name = sanitizeLogicalId(entityName, ref.attribute); const output = new _LexiconOutput(ref, name); output._setSourceEntity(entityName); return output; @@ -16781,9 +20122,21 @@ var init_lexicon_output = __esm({ }); // node_modules/@intentius/chant/src/discovery/files.ts -import { readdir } from "node:fs/promises"; -import { existsSync as existsSync2 } from "node:fs"; -import { join as join2 } from "node:path"; +import { readdir, open } from "node:fs/promises"; +import { existsSync as existsSync4 } from "node:fs"; +import { join as join6 } from "node:path"; +async function isGeneratedFile(file2) { + let fh; + try { + fh = await open(file2, "r"); + const { buffer, bytesRead } = await fh.read({ buffer: Buffer.alloc(256), position: 0 }); + return buffer.toString("utf8", 0, bytesRead).includes(GENERATED_MARKER); + } catch { + return false; + } finally { + await fh?.close(); + } +} async function findInfraFiles(path) { const files = []; let sourceRoot = null; @@ -16795,13 +20148,13 @@ async function findInfraFiles(path) { return; } for (const entry of entries) { - const fullPath = join2(dir, entry.name); + const fullPath = join6(dir, entry.name); if (entry.isDirectory() && entry.name === "node_modules") { continue; } if (entry.isDirectory()) { - const configPath = join2(fullPath, "chant.config.ts"); - if (existsSync2(configPath)) { + const configPath = join6(fullPath, "chant.config.ts"); + if (existsSync4(configPath)) { if (sourceRoot === null) { sourceRoot = fullPath; } else { @@ -16810,7 +20163,7 @@ async function findInfraFiles(path) { } await scanDirectory(fullPath); } else if (entry.isFile()) { - if (entry.name.endsWith(".ts") && !entry.name.endsWith(".test.ts") && !entry.name.endsWith(".spec.ts")) { + if (entry.name.endsWith(".ts") && !entry.name.endsWith(".test.ts") && !entry.name.endsWith(".spec.ts") && !await isGeneratedFile(fullPath)) { files.push(fullPath); } } @@ -16819,20 +20172,14 @@ async function findInfraFiles(path) { await scanDirectory(path); return files; } +var GENERATED_MARKER; var init_files = __esm({ "node_modules/@intentius/chant/src/discovery/files.ts"() { + GENERATED_MARKER = "Generated by chant \u2014 do not edit directly"; } }); // node_modules/@intentius/chant/src/discovery/import.ts -async function importModule(path) { - try { - return await import(path); - } catch (error51) { - const message = error51 instanceof Error ? error51.message : "Unknown import error"; - throw new DiscoveryError(path, message, "import"); - } -} var init_import = __esm({ "node_modules/@intentius/chant/src/discovery/import.ts"() { init_errors3(); @@ -16840,69 +20187,6 @@ var init_import = __esm({ }); // node_modules/@intentius/chant/src/discovery/collect.ts -function collectEntities(modules) { - const entities = /* @__PURE__ */ new Map(); - for (const { file: file2, exports } of modules) { - for (const [name, value] of Object.entries(exports)) { - if (isDeclarable(value)) { - if (entities.has(name)) { - if (entities.get(name) !== value) { - throw new DiscoveryError( - file2, - `Duplicate export name "${name}" found`, - "resolution" - ); - } - } else { - setProvenance(value, { sourceFile: file2 }); - entities.set(name, value); - } - } else if (Array.isArray(value)) { - for (let i = 0; i < value.length; i++) { - const item = value[i]; - if (isDeclarable(item)) { - const indexedName = `${name}_${i}`; - if (entities.has(indexedName) && entities.get(indexedName) !== item) { - throw new DiscoveryError(file2, `Duplicate entity name "${indexedName}"`, "resolution"); - } - setProvenance(item, { sourceFile: file2 }); - entities.set(indexedName, item); - } else if (isCompositeInstance(item)) { - const indexedName = `${name}_${i}`; - const expanded = expandComposite(indexedName, item); - for (const [expandedName, entity] of expanded) { - if (entities.has(expandedName)) { - throw new DiscoveryError( - file2, - `Duplicate entity name "${expandedName}" from composite expansion of "${indexedName}"`, - "resolution" - ); - } - setProvenance(entity, { sourceFile: file2, compositeInstance: indexedName }); - entities.set(expandedName, entity); - } - } - } - } else if (isCompositeInstance(value)) { - const expanded = expandComposite(name, value); - for (const [expandedName, entity] of expanded) { - if (entities.has(expandedName)) { - throw new DiscoveryError( - file2, - `Duplicate entity name "${expandedName}" from composite expansion of "${name}"`, - "resolution" - ); - } - setProvenance(entity, { sourceFile: file2, compositeInstance: name }); - entities.set(expandedName, entity); - } - } else if (isLexiconOutput(value)) { - entities.set(name, value); - } - } - } - return entities; -} var init_collect = __esm({ "node_modules/@intentius/chant/src/discovery/collect.ts"() { init_declarable(); @@ -16928,38 +20212,6 @@ var init_sort = __esm({ }); // node_modules/@intentius/chant/src/discovery/resolve.ts -function resolveAttrRefs(entities) { - for (const [name, entity] of entities.entries()) { - entity[LOGICAL_NAME_SYMBOL] = name; - } - for (const [name, entity] of entities.entries()) { - const attributes = getAttributes(entity); - for (const attrName of attributes) { - const attrRef = entity[attrName]; - if (isAttrRefLike(attrRef)) { - const parent = attrRef.parent.deref(); - if (!parent) { - throw new Error( - `Cannot resolve AttrRef on "${name}.${attrName}": parent has been garbage collected` - ); - } - let parentLogicalName; - for (const [entityName, entityValue] of entities.entries()) { - if (entityValue === parent) { - parentLogicalName = entityName; - break; - } - } - if (!parentLogicalName) { - throw new Error( - `Cannot resolve AttrRef on "${name}.${attrName}": parent entity not found in entities collection` - ); - } - attrRef._setLogicalName(parentLogicalName); - } - } - } -} var init_resolve = __esm({ "node_modules/@intentius/chant/src/discovery/resolve.ts"() { init_utils(); @@ -16967,284 +20219,17 @@ var init_resolve = __esm({ }); // node_modules/@intentius/chant/src/discovery/graph.ts -function buildDependencyGraph(entities) { - const graph = /* @__PURE__ */ new Map(); - for (const name of entities.keys()) { - graph.set(name, /* @__PURE__ */ new Set()); - } - const entityToName = /* @__PURE__ */ new Map(); - for (const [name, entity] of entities.entries()) { - entityToName.set(entity, name); - } - for (const [name, entity] of entities.entries()) { - const dependencies = graph.get(name); - const visited = /* @__PURE__ */ new Set(); - scanProperties(entity, entities, entityToName, dependencies, visited, entity); - } - return graph; -} -function scanProperties(obj, entities, entityToName, dependencies, visited, rootEntity) { - if (!isDeclarable(obj) && !visited.has(obj)) { - visited.add(obj); - } - if (Array.isArray(obj)) { - for (const item of obj) { - findDependencies(item, entities, entityToName, dependencies, visited, rootEntity); - } - return; - } - for (const prop in obj) { - if (Object.prototype.hasOwnProperty.call(obj, prop)) { - const propValue = obj[prop]; - findDependencies( - propValue, - entities, - entityToName, - dependencies, - visited, - rootEntity - ); - } - } -} -function findDependencies(value, entities, entityToName, dependencies, visited, rootEntity) { - if (value === null || value === void 0) { - return; - } - if (typeof value !== "object") { - return; - } - if (value instanceof AttrRef) { - if (visited.has(value)) { - return; - } - visited.add(value); - const parent = value.parent.deref(); - if (parent && isDeclarable(parent) && parent !== rootEntity) { - const parentName = entityToName.get(parent); - if (parentName) { - dependencies.add(parentName); - } - } - return; - } - if (isDeclarable(value)) { - if (value === rootEntity) { - if (visited.has(value)) { - const referencedName2 = entityToName.get(value); - if (referencedName2) { - dependencies.add(referencedName2); - } - return; - } - visited.add(value); - scanProperties(value, entities, entityToName, dependencies, visited, rootEntity); - return; - } - const referencedName = entityToName.get(value); - if (referencedName) { - dependencies.add(referencedName); - } - return; - } - if (visited.has(value)) { - return; - } - scanProperties(value, entities, entityToName, dependencies, visited, rootEntity); -} var init_graph = __esm({ "node_modules/@intentius/chant/src/discovery/graph.ts"() { init_declarable(); - init_attrref(); - } -}); - -// node_modules/@intentius/chant/src/discovery/index.ts -async function discover(path) { - const errors = []; - const sourceFiles = []; - const files = await findInfraFiles(path); - sourceFiles.push(...files); - const modules = []; - for (const file2 of files) { - try { - const exports = await importModule(file2); - modules.push({ file: file2, exports }); - } catch (error51) { - if (error51 instanceof Error && error51.name === "DiscoveryError") { - errors.push(error51); - } else { - const { DiscoveryError: DiscoveryErrorClass } = await Promise.resolve().then(() => (init_errors3(), errors_exports2)); - errors.push( - new DiscoveryErrorClass( - file2, - error51 instanceof Error ? error51.message : String(error51), - "import" - ) - ); - } - } - } - let entities = /* @__PURE__ */ new Map(); - try { - entities = collectEntities(modules); - } catch (error51) { - if (error51 instanceof Error && error51.name === "DiscoveryError") { - errors.push(error51); - } else { - const { DiscoveryError: DiscoveryErrorClass } = await Promise.resolve().then(() => (init_errors3(), errors_exports2)); - errors.push( - new DiscoveryErrorClass( - "", - error51 instanceof Error ? error51.message : String(error51), - "resolution" - ) - ); - } - return { - entities: /* @__PURE__ */ new Map(), - dependencies: /* @__PURE__ */ new Map(), - sourceFiles, - errors - }; - } - try { - resolveAttrRefs(entities); - } catch (error51) { - const { DiscoveryError: DiscoveryErrorClass } = await Promise.resolve().then(() => (init_errors3(), errors_exports2)); - errors.push( - new DiscoveryErrorClass( - "", - error51 instanceof Error ? error51.message : String(error51), - "resolution" - ) - ); - } - let dependencies = /* @__PURE__ */ new Map(); - try { - dependencies = buildDependencyGraph(entities); - } catch (error51) { - const { DiscoveryError: DiscoveryErrorClass } = await Promise.resolve().then(() => (init_errors3(), errors_exports2)); - errors.push( - new DiscoveryErrorClass( - "", - error51 instanceof Error ? error51.message : String(error51), - "resolution" - ) - ); - } - return { - entities, - dependencies, - sourceFiles, - errors - }; -} -var init_discovery = __esm({ - "node_modules/@intentius/chant/src/discovery/index.ts"() { - init_files(); - init_import(); - init_collect(); - init_resolve(); - init_graph(); - } -}); - -// node_modules/@intentius/chant/src/discovery/cache.ts -var init_cache = __esm({ - "node_modules/@intentius/chant/src/discovery/cache.ts"() { - } -}); - -// node_modules/@intentius/chant/src/child-project.ts -var init_child_project = __esm({ - "node_modules/@intentius/chant/src/child-project.ts"() { - } -}); - -// node_modules/@intentius/chant/src/build.ts -var init_build = __esm({ - "node_modules/@intentius/chant/src/build.ts"() { - init_errors3(); - init_lexicon_output(); - init_attrref(); - init_child_project(); - init_discovery(); - init_sort(); - } -}); - -// node_modules/@intentius/chant/src/graph-ir.ts -var init_graph_ir = __esm({ - "node_modules/@intentius/chant/src/graph-ir.ts"() { - init_attrref(); - init_declarable(); - init_lexicon_output(); - init_provenance(); - init_intrinsic(); - } -}); - -// node_modules/@intentius/chant/src/graph-detail.ts -var init_graph_detail = __esm({ - "node_modules/@intentius/chant/src/graph-detail.ts"() { - } -}); - -// node_modules/@intentius/chant/src/graph-mermaid.ts -var init_graph_mermaid = __esm({ - "node_modules/@intentius/chant/src/graph-mermaid.ts"() { - } -}); - -// node_modules/@intentius/chant/src/graph-dot.ts -var init_graph_dot = __esm({ - "node_modules/@intentius/chant/src/graph-dot.ts"() { - } -}); - -// node_modules/@intentius/chant/src/graph-layout.ts -var init_graph_layout = __esm({ - "node_modules/@intentius/chant/src/graph-layout.ts"() { - } -}); - -// node_modules/@intentius/chant/src/graph-lens.ts -var init_graph_lens = __esm({ - "node_modules/@intentius/chant/src/graph-lens.ts"() { - } -}); - -// node_modules/@intentius/chant/src/detectLexicon.ts -import { readFile } from "node:fs/promises"; -async function detectLexicons(files) { - const detectedLexicons = /* @__PURE__ */ new Set(); - for (const file2 of files) { - let content; - try { - content = await readFile(file2, "utf-8"); - } catch (error51) { - continue; - } - const regex = /(?:import|export)\s+[\s\S]*?\s+from\s+['"]@intentius\/chant-lexicon-([a-z][\w-]*)['"]/g; - for (const match of content.matchAll(regex)) { - detectedLexicons.add(match[1]); - } - } - if (detectedLexicons.size === 0) { - throw new Error("No lexicon detected in infrastructure files"); - } - return Array.from(detectedLexicons); -} -var init_detectLexicon = __esm({ - "node_modules/@intentius/chant/src/detectLexicon.ts"() { + init_utils(); } }); // node_modules/typescript/lib/typescript.js var require_typescript = __commonJS({ "node_modules/typescript/lib/typescript.js"(exports, module) { - var ts25 = {}; + var ts29 = {}; ((module2) => { "use strict"; var __defProp2 = Object.defineProperty; @@ -17356,7 +20341,7 @@ var require_typescript = __commonJS({ NodeBuilderFlags: () => NodeBuilderFlags, NodeCheckFlags: () => NodeCheckFlags, NodeFactoryFlags: () => NodeFactoryFlags, - NodeFlags: () => NodeFlags3, + NodeFlags: () => NodeFlags5, NodeResolutionFeatures: () => NodeResolutionFeatures, ObjectFlags: () => ObjectFlags, OperationCanceledException: () => OperationCanceledException, @@ -17384,9 +20369,9 @@ var require_typescript = __commonJS({ Rename: () => ts_Rename_exports, ScriptElementKind: () => ScriptElementKind, ScriptElementKindModifier: () => ScriptElementKindModifier, - ScriptKind: () => ScriptKind, + ScriptKind: () => ScriptKind2, ScriptSnapshot: () => ScriptSnapshot, - ScriptTarget: () => ScriptTarget2, + ScriptTarget: () => ScriptTarget5, SemanticClassificationFormat: () => SemanticClassificationFormat, SemanticMeaning: () => SemanticMeaning, SemicolonPreference: () => SemicolonPreference, @@ -17404,7 +20389,7 @@ var require_typescript = __commonJS({ SymbolDisplayPartKind: () => SymbolDisplayPartKind, SymbolFlags: () => SymbolFlags, SymbolFormatFlags: () => SymbolFormatFlags, - SyntaxKind: () => SyntaxKind8, + SyntaxKind: () => SyntaxKind10, Ternary: () => Ternary, ThrottledCancellationToken: () => ThrottledCancellationToken, TokenClass: () => TokenClass, @@ -17682,7 +20667,7 @@ var require_typescript = __commonJS({ createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, createSortedArray: () => createSortedArray, - createSourceFile: () => createSourceFile2, + createSourceFile: () => createSourceFile5, createSourceMapGenerator: () => createSourceMapGenerator, createSourceMapSource: () => createSourceMapSource, createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, @@ -18276,7 +21261,7 @@ var require_typescript = __commonJS({ getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState, getTextOfConstantValue: () => getTextOfConstantValue, getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral, - getTextOfJSDocComment: () => getTextOfJSDocComment, + getTextOfJSDocComment: () => getTextOfJSDocComment2, getTextOfJsxAttributeName: () => getTextOfJsxAttributeName, getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName, getTextOfNode: () => getTextOfNode, @@ -18403,11 +21388,11 @@ var require_typescript = __commonJS({ isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement, isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern, isArrayBindingPattern: () => isArrayBindingPattern, - isArrayLiteralExpression: () => isArrayLiteralExpression5, + isArrayLiteralExpression: () => isArrayLiteralExpression7, isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern, isArrayTypeNode: () => isArrayTypeNode2, - isArrowFunction: () => isArrowFunction5, - isAsExpression: () => isAsExpression4, + isArrowFunction: () => isArrowFunction6, + isAsExpression: () => isAsExpression6, isAssertClause: () => isAssertClause, isAssertEntry: () => isAssertEntry, isAssertionExpression: () => isAssertionExpression, @@ -18424,7 +21409,7 @@ var require_typescript = __commonJS({ isAwaitExpression: () => isAwaitExpression, isAwaitKeyword: () => isAwaitKeyword, isBigIntLiteral: () => isBigIntLiteral, - isBinaryExpression: () => isBinaryExpression2, + isBinaryExpression: () => isBinaryExpression4, isBinaryLogicalOperator: () => isBinaryLogicalOperator, isBinaryOperatorToken: () => isBinaryOperatorToken, isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, @@ -18437,7 +21422,7 @@ var require_typescript = __commonJS({ isBindingOrAssignmentElement: () => isBindingOrAssignmentElement, isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern, isBindingPattern: () => isBindingPattern, - isBlock: () => isBlock4, + isBlock: () => isBlock5, isBlockLike: () => isBlockLike, isBlockOrCatchScoped: () => isBlockOrCatchScoped, isBlockScope: () => isBlockScope, @@ -18450,7 +21435,7 @@ var require_typescript = __commonJS({ isBuilderProgram: () => isBuilderProgram, isBundle: () => isBundle, isCallChain: () => isCallChain, - isCallExpression: () => isCallExpression9, + isCallExpression: () => isCallExpression12, isCallExpressionTarget: () => isCallExpressionTarget, isCallLikeExpression: () => isCallLikeExpression, isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression, @@ -18467,7 +21452,7 @@ var require_typescript = __commonJS({ isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, isCircularBuildOrder: () => isCircularBuildOrder, - isClassDeclaration: () => isClassDeclaration3, + isClassDeclaration: () => isClassDeclaration5, isClassElement: () => isClassElement, isClassExpression: () => isClassExpression, isClassInstanceProperty: () => isClassInstanceProperty, @@ -18489,12 +21474,12 @@ var require_typescript = __commonJS({ isComputedNonLiteralName: () => isComputedNonLiteralName, isComputedPropertyName: () => isComputedPropertyName, isConciseBody: () => isConciseBody, - isConditionalExpression: () => isConditionalExpression2, + isConditionalExpression: () => isConditionalExpression4, isConditionalTypeNode: () => isConditionalTypeNode, isConstAssertion: () => isConstAssertion, isConstTypeReference: () => isConstTypeReference, isConstructSignatureDeclaration: () => isConstructSignatureDeclaration, - isConstructorDeclaration: () => isConstructorDeclaration, + isConstructorDeclaration: () => isConstructorDeclaration2, isConstructorTypeNode: () => isConstructorTypeNode, isContextualKeyword: () => isContextualKeyword, isContinueStatement: () => isContinueStatement, @@ -18528,7 +21513,7 @@ var require_typescript = __commonJS({ isEffectiveExternalModule: () => isEffectiveExternalModule, isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, isElementAccessChain: () => isElementAccessChain, - isElementAccessExpression: () => isElementAccessExpression3, + isElementAccessExpression: () => isElementAccessExpression5, isEmittedFileOfProgram: () => isEmittedFileOfProgram, isEmptyArrayLiteral: () => isEmptyArrayLiteral, isEmptyBindingElement: () => isEmptyBindingElement, @@ -18547,8 +21532,8 @@ var require_typescript = __commonJS({ isExcludedFile: () => isExcludedFile, isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration, - isExportAssignment: () => isExportAssignment2, - isExportDeclaration: () => isExportDeclaration, + isExportAssignment: () => isExportAssignment3, + isExportDeclaration: () => isExportDeclaration2, isExportModifier: () => isExportModifier, isExportName: () => isExportName, isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration, @@ -18584,8 +21569,8 @@ var require_typescript = __commonJS({ isFullSourceFile: () => isFullSourceFile, isFunctionBlock: () => isFunctionBlock, isFunctionBody: () => isFunctionBody, - isFunctionDeclaration: () => isFunctionDeclaration2, - isFunctionExpression: () => isFunctionExpression4, + isFunctionDeclaration: () => isFunctionDeclaration3, + isFunctionExpression: () => isFunctionExpression5, isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction, isFunctionLike: () => isFunctionLike, isFunctionLikeDeclaration: () => isFunctionLikeDeclaration, @@ -18606,7 +21591,7 @@ var require_typescript = __commonJS({ isHeritageClause: () => isHeritageClause, isHoistedFunction: () => isHoistedFunction, isHoistedVariableStatement: () => isHoistedVariableStatement, - isIdentifier: () => isIdentifier17, + isIdentifier: () => isIdentifier21, isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword, isIdentifierName: () => isIdentifierName, isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode, @@ -18623,7 +21608,7 @@ var require_typescript = __commonJS({ isImportAttributes: () => isImportAttributes, isImportCall: () => isImportCall, isImportClause: () => isImportClause, - isImportDeclaration: () => isImportDeclaration5, + isImportDeclaration: () => isImportDeclaration6, isImportEqualsDeclaration: () => isImportEqualsDeclaration, isImportKeyword: () => isImportKeyword, isImportMeta: () => isImportMeta, @@ -18802,20 +21787,20 @@ var require_typescript = __commonJS({ isNamedEvaluation: () => isNamedEvaluation, isNamedEvaluationSource: () => isNamedEvaluationSource, isNamedExportBindings: () => isNamedExportBindings, - isNamedExports: () => isNamedExports, + isNamedExports: () => isNamedExports2, isNamedImportBindings: () => isNamedImportBindings, - isNamedImports: () => isNamedImports3, + isNamedImports: () => isNamedImports4, isNamedImportsOrExports: () => isNamedImportsOrExports, isNamedTupleMember: () => isNamedTupleMember, isNamespaceBody: () => isNamespaceBody, isNamespaceExport: () => isNamespaceExport, isNamespaceExportDeclaration: () => isNamespaceExportDeclaration, - isNamespaceImport: () => isNamespaceImport4, + isNamespaceImport: () => isNamespaceImport5, isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, - isNewExpression: () => isNewExpression12, + isNewExpression: () => isNewExpression15, isNewExpressionTarget: () => isNewExpressionTarget, isNewScopeNode: () => isNewScopeNode, - isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral2, + isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral4, isNodeArray: () => isNodeArray, isNodeArrayMultiLine: () => isNodeArrayMultiLine, isNodeDescendantOf: () => isNodeDescendantOf, @@ -18827,20 +21812,20 @@ var require_typescript = __commonJS({ isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, isNonNullAccess: () => isNonNullAccess, isNonNullChain: () => isNonNullChain, - isNonNullExpression: () => isNonNullExpression2, + isNonNullExpression: () => isNonNullExpression4, isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, isNotEmittedStatement: () => isNotEmittedStatement, isNullishCoalesce: () => isNullishCoalesce, isNumber: () => isNumber, - isNumericLiteral: () => isNumericLiteral3, + isNumericLiteral: () => isNumericLiteral4, isNumericLiteralName: () => isNumericLiteralName, isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName, isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement, isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern, - isObjectBindingPattern: () => isObjectBindingPattern, + isObjectBindingPattern: () => isObjectBindingPattern2, isObjectLiteralElement: () => isObjectLiteralElement, isObjectLiteralElementLike: () => isObjectLiteralElementLike, - isObjectLiteralExpression: () => isObjectLiteralExpression6, + isObjectLiteralExpression: () => isObjectLiteralExpression9, isObjectLiteralMethod: () => isObjectLiteralMethod, isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, isObjectTypeDeclaration: () => isObjectTypeDeclaration, @@ -18858,7 +21843,7 @@ var require_typescript = __commonJS({ isParameter: () => isParameter, isParameterPropertyDeclaration: () => isParameterPropertyDeclaration, isParameterPropertyModifier: () => isParameterPropertyModifier, - isParenthesizedExpression: () => isParenthesizedExpression4, + isParenthesizedExpression: () => isParenthesizedExpression6, isParenthesizedTypeNode: () => isParenthesizedTypeNode, isParseTreeNode: () => isParseTreeNode, isPartOfParameterDeclaration: () => isPartOfParameterDeclaration, @@ -18872,7 +21857,7 @@ var require_typescript = __commonJS({ isPlusToken: () => isPlusToken, isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition, isPostfixUnaryExpression: () => isPostfixUnaryExpression, - isPrefixUnaryExpression: () => isPrefixUnaryExpression2, + isPrefixUnaryExpression: () => isPrefixUnaryExpression4, isPrimitiveLiteralValue: () => isPrimitiveLiteralValue, isPrivateIdentifier: () => isPrivateIdentifier, isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, @@ -18882,14 +21867,14 @@ var require_typescript = __commonJS({ isPrologueDirective: () => isPrologueDirective, isPropertyAccessChain: () => isPropertyAccessChain, isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression, - isPropertyAccessExpression: () => isPropertyAccessExpression10, + isPropertyAccessExpression: () => isPropertyAccessExpression12, isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName, isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode, - isPropertyAssignment: () => isPropertyAssignment6, + isPropertyAssignment: () => isPropertyAssignment8, isPropertyDeclaration: () => isPropertyDeclaration, isPropertyName: () => isPropertyName, isPropertyNameLiteral: () => isPropertyNameLiteral, - isPropertySignature: () => isPropertySignature2, + isPropertySignature: () => isPropertySignature3, isPrototypeAccess: () => isPrototypeAccess, isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, isPunctuation: () => isPunctuation, @@ -18909,7 +21894,7 @@ var require_typescript = __commonJS({ isRequireVariableStatement: () => isRequireVariableStatement, isRestParameter: () => isRestParameter, isRestTypeNode: () => isRestTypeNode, - isReturnStatement: () => isReturnStatement2, + isReturnStatement: () => isReturnStatement3, isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression, @@ -18919,13 +21904,13 @@ var require_typescript = __commonJS({ isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName, isRootedDiskPath: () => isRootedDiskPath, isSameEntityName: () => isSameEntityName, - isSatisfiesExpression: () => isSatisfiesExpression3, + isSatisfiesExpression: () => isSatisfiesExpression5, isSemicolonClassElement: () => isSemicolonClassElement, isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, - isShorthandPropertyAssignment: () => isShorthandPropertyAssignment3, + isShorthandPropertyAssignment: () => isShorthandPropertyAssignment5, isSideEffectImport: () => isSideEffectImport, isSignedNumericLiteral: () => isSignedNumericLiteral, isSimpleCopiableExpression: () => isSimpleCopiableExpression, @@ -18940,8 +21925,8 @@ var require_typescript = __commonJS({ isSourceFileNotJson: () => isSourceFileNotJson, isSourceMapping: () => isSourceMapping, isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, - isSpreadAssignment: () => isSpreadAssignment3, - isSpreadElement: () => isSpreadElement3, + isSpreadAssignment: () => isSpreadAssignment5, + isSpreadElement: () => isSpreadElement5, isStatement: () => isStatement, isStatementButNotDeclaration: () => isStatementButNotDeclaration, isStatementOrBlock: () => isStatementOrBlock, @@ -18952,7 +21937,7 @@ var require_typescript = __commonJS({ isStringANonContextualKeyword: () => isStringANonContextualKeyword, isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, isStringDoubleQuoted: () => isStringDoubleQuoted, - isStringLiteral: () => isStringLiteral10, + isStringLiteral: () => isStringLiteral12, isStringLiteralLike: () => isStringLiteralLike, isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression, isStringLiteralOrTemplate: () => isStringLiteralOrTemplate, @@ -18968,9 +21953,9 @@ var require_typescript = __commonJS({ isSyntheticExpression: () => isSyntheticExpression, isSyntheticReference: () => isSyntheticReference, isTagName: () => isTagName, - isTaggedTemplateExpression: () => isTaggedTemplateExpression2, + isTaggedTemplateExpression: () => isTaggedTemplateExpression4, isTaggedTemplateTag: () => isTaggedTemplateTag, - isTemplateExpression: () => isTemplateExpression2, + isTemplateExpression: () => isTemplateExpression4, isTemplateHead: () => isTemplateHead, isTemplateLiteral: () => isTemplateLiteral, isTemplateLiteralKind: () => isTemplateLiteralKind, @@ -19002,12 +21987,12 @@ var require_typescript = __commonJS({ isTupleTypeNode: () => isTupleTypeNode, isTypeAlias: () => isTypeAlias, isTypeAliasDeclaration: () => isTypeAliasDeclaration2, - isTypeAssertionExpression: () => isTypeAssertionExpression, + isTypeAssertionExpression: () => isTypeAssertionExpression2, isTypeDeclaration: () => isTypeDeclaration, isTypeElement: () => isTypeElement, isTypeKeyword: () => isTypeKeyword, isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, - isTypeLiteralNode: () => isTypeLiteralNode, + isTypeLiteralNode: () => isTypeLiteralNode2, isTypeNode: () => isTypeNode, isTypeNodeKind: () => isTypeNodeKind, isTypeOfExpression: () => isTypeOfExpression, @@ -19041,7 +22026,7 @@ var require_typescript = __commonJS({ isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, isVariableDeclarationList: () => isVariableDeclarationList, isVariableLike: () => isVariableLike, - isVariableStatement: () => isVariableStatement8, + isVariableStatement: () => isVariableStatement10, isVoidExpression: () => isVoidExpression, isWatchSet: () => isWatchSet, isWhileStatement: () => isWhileStatement, @@ -19253,7 +22238,7 @@ var require_typescript = __commonJS({ resolveModuleName: () => resolveModuleName, resolveModuleNameFromCache: () => resolveModuleNameFromCache, resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson, - resolvePath: () => resolvePath, + resolvePath: () => resolvePath2, resolveProjectReferencePath: () => resolveProjectReferencePath, resolveTripleslashReference: () => resolveTripleslashReference, resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, @@ -19995,12 +22980,12 @@ var require_typescript = __commonJS({ function createSortedArray() { return []; } - function insertSorted(array2, insert, compare, equalityComparer, allowDuplicates) { + function insertSorted(array2, insert, compare2, equalityComparer, allowDuplicates) { if (array2.length === 0) { array2.push(insert); return true; } - const insertIndex = binarySearch(array2, insert, identity, compare); + const insertIndex = binarySearch(array2, insert, identity, compare2); if (insertIndex < 0) { if (equalityComparer && !allowDuplicates) { const idx = ~insertIndex; @@ -20660,8 +23645,8 @@ var require_typescript = __commonJS({ } return init; } - function min(items, compare) { - return reduceLeft(items, (x, y) => compare(x, y) === -1 ? x : y); + function min(items, compare2) { + return reduceLeft(items, (x, y) => compare2(x, y) === -1 ? x : y); } function compareStringsCaseInsensitive(a, b) { if (a === b) return 0; @@ -21291,7 +24276,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, function formatSyntaxKind(kind) { return formatEnum( kind, - SyntaxKind8, + SyntaxKind10, /*isFlags*/ false ); @@ -21309,7 +24294,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, function formatScriptKind(kind) { return formatEnum( kind, - ScriptKind, + ScriptKind2, /*isFlags*/ false ); @@ -21318,7 +24303,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, function formatNodeFlags(flags) { return formatEnum( flags, - NodeFlags3, + NodeFlags5, /*isFlags*/ true ); @@ -21588,7 +24573,7 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, // for use with vscode-js-debug's new customDescriptionGenerator in launch.json __tsDebuggerDisplay: { value() { - const nodeHeader = isGeneratedIdentifier(this) ? "GeneratedIdentifier" : isIdentifier17(this) ? `Identifier '${idText(this)}'` : isPrivateIdentifier(this) ? `PrivateIdentifier '${idText(this)}'` : isStringLiteral10(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : isNumericLiteral3(this) ? `NumericLiteral ${this.text}` : isBigIntLiteral(this) ? `BigIntLiteral ${this.text}n` : isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" : isParameter(this) ? "ParameterDeclaration" : isConstructorDeclaration(this) ? "ConstructorDeclaration" : isGetAccessorDeclaration(this) ? "GetAccessorDeclaration" : isSetAccessorDeclaration(this) ? "SetAccessorDeclaration" : isCallSignatureDeclaration(this) ? "CallSignatureDeclaration" : isConstructSignatureDeclaration(this) ? "ConstructSignatureDeclaration" : isIndexSignatureDeclaration(this) ? "IndexSignatureDeclaration" : isTypePredicateNode(this) ? "TypePredicateNode" : isTypeReferenceNode3(this) ? "TypeReferenceNode" : isFunctionTypeNode(this) ? "FunctionTypeNode" : isConstructorTypeNode(this) ? "ConstructorTypeNode" : isTypeQueryNode(this) ? "TypeQueryNode" : isTypeLiteralNode(this) ? "TypeLiteralNode" : isArrayTypeNode2(this) ? "ArrayTypeNode" : isTupleTypeNode(this) ? "TupleTypeNode" : isOptionalTypeNode(this) ? "OptionalTypeNode" : isRestTypeNode(this) ? "RestTypeNode" : isUnionTypeNode2(this) ? "UnionTypeNode" : isIntersectionTypeNode2(this) ? "IntersectionTypeNode" : isConditionalTypeNode(this) ? "ConditionalTypeNode" : isInferTypeNode(this) ? "InferTypeNode" : isParenthesizedTypeNode(this) ? "ParenthesizedTypeNode" : isThisTypeNode(this) ? "ThisTypeNode" : isTypeOperatorNode(this) ? "TypeOperatorNode" : isIndexedAccessTypeNode(this) ? "IndexedAccessTypeNode" : isMappedTypeNode(this) ? "MappedTypeNode" : isLiteralTypeNode(this) ? "LiteralTypeNode" : isNamedTupleMember(this) ? "NamedTupleMember" : isImportTypeNode(this) ? "ImportTypeNode" : formatSyntaxKind(this.kind); + const nodeHeader = isGeneratedIdentifier(this) ? "GeneratedIdentifier" : isIdentifier21(this) ? `Identifier '${idText(this)}'` : isPrivateIdentifier(this) ? `PrivateIdentifier '${idText(this)}'` : isStringLiteral12(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : isNumericLiteral4(this) ? `NumericLiteral ${this.text}` : isBigIntLiteral(this) ? `BigIntLiteral ${this.text}n` : isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" : isParameter(this) ? "ParameterDeclaration" : isConstructorDeclaration2(this) ? "ConstructorDeclaration" : isGetAccessorDeclaration(this) ? "GetAccessorDeclaration" : isSetAccessorDeclaration(this) ? "SetAccessorDeclaration" : isCallSignatureDeclaration(this) ? "CallSignatureDeclaration" : isConstructSignatureDeclaration(this) ? "ConstructSignatureDeclaration" : isIndexSignatureDeclaration(this) ? "IndexSignatureDeclaration" : isTypePredicateNode(this) ? "TypePredicateNode" : isTypeReferenceNode3(this) ? "TypeReferenceNode" : isFunctionTypeNode(this) ? "FunctionTypeNode" : isConstructorTypeNode(this) ? "ConstructorTypeNode" : isTypeQueryNode(this) ? "TypeQueryNode" : isTypeLiteralNode2(this) ? "TypeLiteralNode" : isArrayTypeNode2(this) ? "ArrayTypeNode" : isTupleTypeNode(this) ? "TupleTypeNode" : isOptionalTypeNode(this) ? "OptionalTypeNode" : isRestTypeNode(this) ? "RestTypeNode" : isUnionTypeNode2(this) ? "UnionTypeNode" : isIntersectionTypeNode2(this) ? "IntersectionTypeNode" : isConditionalTypeNode(this) ? "ConditionalTypeNode" : isInferTypeNode(this) ? "InferTypeNode" : isParenthesizedTypeNode(this) ? "ParenthesizedTypeNode" : isThisTypeNode(this) ? "ThisTypeNode" : isTypeOperatorNode(this) ? "TypeOperatorNode" : isIndexedAccessTypeNode(this) ? "IndexedAccessTypeNode" : isMappedTypeNode(this) ? "MappedTypeNode" : isLiteralTypeNode(this) ? "LiteralTypeNode" : isNamedTupleMember(this) ? "NamedTupleMember" : isImportTypeNode(this) ? "ImportTypeNode" : formatSyntaxKind(this.kind); return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; } }, @@ -22739,7 +25724,7 @@ ${lanes.join("\n")} })(tracingEnabled || (tracingEnabled = {})); var startTracing = tracingEnabled.startTracing; var dumpTracingLegend = tracingEnabled.dumpLegend; - var SyntaxKind8 = /* @__PURE__ */ ((SyntaxKind52) => { + var SyntaxKind10 = /* @__PURE__ */ ((SyntaxKind52) => { SyntaxKind52[SyntaxKind52["Unknown"] = 0] = "Unknown"; SyntaxKind52[SyntaxKind52["EndOfFileToken"] = 1] = "EndOfFileToken"; SyntaxKind52[SyntaxKind52["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; @@ -23245,8 +26230,8 @@ ${lanes.join("\n")} /* LastKeyword */ ] = "LastContextualKeyword"; return SyntaxKind52; - })(SyntaxKind8 || {}); - var NodeFlags3 = /* @__PURE__ */ ((NodeFlags32) => { + })(SyntaxKind10 || {}); + var NodeFlags5 = /* @__PURE__ */ ((NodeFlags32) => { NodeFlags32[NodeFlags32["None"] = 0] = "None"; NodeFlags32[NodeFlags32["Let"] = 1] = "Let"; NodeFlags32[NodeFlags32["Const"] = 2] = "Const"; @@ -23295,7 +26280,7 @@ ${lanes.join("\n")} /* HasAsyncFunctions */ ] = "IdentifierIsInJSDocNamespace"; return NodeFlags32; - })(NodeFlags3 || {}); + })(NodeFlags5 || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { ModifierFlags3[ModifierFlags3["None"] = 0] = "None"; ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public"; @@ -24137,7 +27122,7 @@ ${lanes.join("\n")} NewLineKind3[NewLineKind3["LineFeed"] = 1] = "LineFeed"; return NewLineKind3; })(NewLineKind || {}); - var ScriptKind = /* @__PURE__ */ ((ScriptKind7) => { + var ScriptKind2 = /* @__PURE__ */ ((ScriptKind7) => { ScriptKind7[ScriptKind7["Unknown"] = 0] = "Unknown"; ScriptKind7[ScriptKind7["JS"] = 1] = "JS"; ScriptKind7[ScriptKind7["JSX"] = 2] = "JSX"; @@ -24147,8 +27132,8 @@ ${lanes.join("\n")} ScriptKind7[ScriptKind7["JSON"] = 6] = "JSON"; ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred"; return ScriptKind7; - })(ScriptKind || {}); - var ScriptTarget2 = /* @__PURE__ */ ((ScriptTarget12) => { + })(ScriptKind2 || {}); + var ScriptTarget5 = /* @__PURE__ */ ((ScriptTarget12) => { ScriptTarget12[ScriptTarget12["ES3"] = 0] = "ES3"; ScriptTarget12[ScriptTarget12["ES5"] = 1] = "ES5"; ScriptTarget12[ScriptTarget12["ES2015"] = 2] = "ES2015"; @@ -24168,7 +27153,7 @@ ${lanes.join("\n")} /* ESNext */ ] = "Latest"; return ScriptTarget12; - })(ScriptTarget2 || {}); + })(ScriptTarget5 || {}); var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => { LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard"; LanguageVariant4[LanguageVariant4["JSX"] = 1] = "JSX"; @@ -25772,10 +28757,10 @@ ${lanes.join("\n")} } function patchWriteFileEnsuringDirectory(sys2) { const originalWriteFile = sys2.writeFile; - sys2.writeFile = (path, data, writeBom) => writeFileEnsuringDirectories( + sys2.writeFile = (path, data, writeBom2) => writeFileEnsuringDirectories( path, data, - !!writeBom, + !!writeBom2, (path2, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path2, data2, writeByteOrderMark), (path2) => sys2.createDirectory(path2), (path2) => sys2.directoryExists(path2) @@ -25880,7 +28865,7 @@ ${lanes.join("\n")} return process.memoryUsage().heapUsed; }, getFileSize(path) { - const stat2 = statSync2(path); + const stat2 = statSync3(path); if (stat2 == null ? void 0 : stat2.isFile()) { return stat2.size; } @@ -25924,7 +28909,7 @@ ${lanes.join("\n")} } }; return nodeSystem; - function statSync2(path) { + function statSync3(path) { try { return _fs.statSync(path, statSyncOptions); } catch { @@ -25983,7 +28968,7 @@ ${lanes.join("\n")} activeSession.post("Profiler.stop", (err, { profile }) => { var _a3; if (!err) { - if ((_a3 = statSync2(profilePath)) == null ? void 0 : _a3.isDirectory()) { + if ((_a3 = statSync3(profilePath)) == null ? void 0 : _a3.isDirectory()) { profilePath = _path.join(profilePath, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`); } try { @@ -26103,7 +29088,7 @@ ${lanes.join("\n")} let stat2; if (typeof dirent === "string" || dirent.isSymbolicLink()) { const name = combinePaths(path, entry); - stat2 = statSync2(name); + stat2 = statSync3(name); if (!stat2) { continue; } @@ -26127,7 +29112,7 @@ ${lanes.join("\n")} return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); } function fileSystemEntryExists(path, entryKind) { - const stat2 = statSync2(path); + const stat2 = statSync3(path); if (!stat2) { return false; } @@ -26169,7 +29154,7 @@ ${lanes.join("\n")} } function getModifiedTime3(path) { var _a3; - return (_a3 = statSync2(path)) == null ? void 0 : _a3.mtime; + return (_a3 = statSync3(path)) == null ? void 0 : _a3.mtime; } function setModifiedTime(path, time3) { try { @@ -26406,7 +29391,7 @@ ${lanes.join("\n")} } return path; } - function resolvePath(path, ...paths) { + function resolvePath2(path, ...paths) { return normalizePath(some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path)); } function getNormalizedPathComponents(path, currentDirectory) { @@ -26661,8 +29646,8 @@ ${lanes.join("\n")} } function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { const pathComponents2 = getPathComponentsRelativeTo( - resolvePath(currentDirectory, directoryPathOrUrl), - resolvePath(currentDirectory, relativeOrAbsolutePath), + resolvePath2(currentDirectory, directoryPathOrUrl), + resolvePath2(currentDirectory, relativeOrAbsolutePath), equateStringsCaseSensitive, getCanonicalFileName ); @@ -32654,7 +35639,7 @@ ${lanes.join("\n")} return expr.name; case 213: const arg = expr.argumentExpression; - if (isIdentifier17(arg)) { + if (isIdentifier21(arg)) { return arg; } } @@ -32672,13 +35657,13 @@ ${lanes.join("\n")} } function getDeclarationIdentifier(node) { const name = getNameOfDeclaration(node); - return name && isIdentifier17(name) ? name : void 0; + return name && isIdentifier21(name) ? name : void 0; } function nodeHasName(statement, name) { - if (isNamedDeclaration(statement) && isIdentifier17(statement.name) && idText(statement.name) === idText(name)) { + if (isNamedDeclaration(statement) && isIdentifier21(statement.name) && idText(statement.name) === idText(name)) { return true; } - if (isVariableStatement8(statement) && some(statement.declarationList.declarations, (d) => nodeHasName(d, name))) { + if (isVariableStatement10(statement) && some(statement.declarationList.declarations, (d) => nodeHasName(d, name))) { return true; } return false; @@ -32724,7 +35709,7 @@ ${lanes.join("\n")} return nameForNamelessJSDocTypedef(declaration); case 278: { const { expression } = declaration; - return isIdentifier17(expression) ? expression : void 0; + return isIdentifier21(expression) ? expression : void 0; } case 213: const expr = declaration; @@ -32736,20 +35721,20 @@ ${lanes.join("\n")} } function getNameOfDeclaration(declaration) { if (declaration === void 0) return void 0; - return getNonAssignedNameOfDeclaration(declaration) || (isFunctionExpression4(declaration) || isArrowFunction5(declaration) || isClassExpression(declaration) ? getAssignedName(declaration) : void 0); + return getNonAssignedNameOfDeclaration(declaration) || (isFunctionExpression5(declaration) || isArrowFunction6(declaration) || isClassExpression(declaration) ? getAssignedName(declaration) : void 0); } function getAssignedName(node) { if (!node.parent) { return void 0; - } else if (isPropertyAssignment6(node.parent) || isBindingElement(node.parent)) { + } else if (isPropertyAssignment8(node.parent) || isBindingElement(node.parent)) { return node.parent.name; - } else if (isBinaryExpression2(node.parent) && node === node.parent.right) { - if (isIdentifier17(node.parent.left)) { + } else if (isBinaryExpression4(node.parent) && node === node.parent.right) { + if (isIdentifier21(node.parent.left)) { return node.parent.left; } else if (isAccessExpression(node.parent.left)) { return getElementOrPropertyAccessArgumentExpressionOrName(node.parent.left); } - } else if (isVariableDeclaration4(node.parent) && isIdentifier17(node.parent.name)) { + } else if (isVariableDeclaration4(node.parent) && isIdentifier21(node.parent.name)) { return node.parent.name; } } @@ -32769,9 +35754,9 @@ ${lanes.join("\n")} } function getJSDocParameterTagsWorker(param, noCache) { if (param.name) { - if (isIdentifier17(param.name)) { + if (isIdentifier21(param.name)) { const name = param.name.escapedText; - return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier17(tag.name) && tag.name.escapedText === name); + return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier21(tag.name) && tag.name.escapedText === name); } else { const i = param.parent.parameters.indexOf(param); Debug.assert(i > -1, "Parameters should always be in their parents' parameter list"); @@ -32927,7 +35912,7 @@ ${lanes.join("\n")} const typeTag = getJSDocTypeTag(node); if (typeTag && typeTag.typeExpression) { const type = typeTag.typeExpression.type; - if (isTypeLiteralNode(type)) { + if (isTypeLiteralNode2(type)) { const sig = find(type.members, isCallSignatureDeclaration); return sig && sig.type; } @@ -32967,7 +35952,7 @@ ${lanes.join("\n")} function getAllJSDocTagsOfKind(node, kind) { return getJSDocTags(node).filter((doc) => doc.kind === kind); } - function getTextOfJSDocComment(comment) { + function getTextOfJSDocComment2(comment) { return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 322 ? c.text : formatJSDocLink(c)).join(""); } function formatJSDocLink(link) { @@ -33021,20 +36006,20 @@ ${lanes.join("\n")} return node.kind === 179 || node.kind === 178; } function isPropertyAccessChain(node) { - return isPropertyAccessExpression10(node) && !!(node.flags & 64); + return isPropertyAccessExpression12(node) && !!(node.flags & 64); } function isElementAccessChain(node) { - return isElementAccessExpression3(node) && !!(node.flags & 64); + return isElementAccessExpression5(node) && !!(node.flags & 64); } function isCallChain(node) { - return isCallExpression9(node) && !!(node.flags & 64); + return isCallExpression12(node) && !!(node.flags & 64); } function isOptionalChain(node) { const kind = node.kind; return !!(node.flags & 64) && (kind === 212 || kind === 213 || kind === 214 || kind === 236); } function isOptionalChainRoot(node) { - return isOptionalChain(node) && !isNonNullExpression2(node) && !!node.questionDotToken; + return isOptionalChain(node) && !isNonNullExpression4(node) && !!node.questionDotToken; } function isExpressionOfOptionalChainRoot(node) { return isOptionalChainRoot(node.parent) && node.parent.expression === node; @@ -33046,7 +36031,7 @@ ${lanes.join("\n")} return node.kind === 227 && node.operatorToken.kind === 61; } function isConstTypeReference(node) { - return isTypeReferenceNode3(node) && isIdentifier17(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; + return isTypeReferenceNode3(node) && isIdentifier21(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; } function skipPartiallyEmittedExpressions(node) { return skipOuterExpressions( @@ -33056,7 +36041,7 @@ ${lanes.join("\n")} ); } function isNonNullChain(node) { - return isNonNullExpression2(node) && !!(node.flags & 64); + return isNonNullExpression4(node) && !!(node.flags & 64); } function isBreakOrContinueStatement(node) { return node.kind === 253 || node.kind === 252; @@ -33143,11 +36128,11 @@ ${lanes.join("\n")} return node.kind === 11 || isTemplateLiteralKind(node.kind); } function isImportAttributeName(node) { - return isStringLiteral10(node) || isIdentifier17(node); + return isStringLiteral12(node) || isIdentifier21(node); } function isGeneratedIdentifier(node) { var _a3; - return isIdentifier17(node) && ((_a3 = node.emitNode) == null ? void 0 : _a3.autoGenerate) !== void 0; + return isIdentifier21(node) && ((_a3 = node.emitNode) == null ? void 0 : _a3.autoGenerate) !== void 0; } function isGeneratedPrivateIdentifier(node) { var _a3; @@ -33161,7 +36146,7 @@ ${lanes.join("\n")} return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name); } function isPrivateIdentifierPropertyAccessExpression(node) { - return isPropertyAccessExpression10(node) && isPrivateIdentifier(node.name); + return isPropertyAccessExpression12(node) && isPrivateIdentifier(node.name); } function isModifierKind(token) { switch (token) { @@ -33247,7 +36232,7 @@ ${lanes.join("\n")} } } function isFunctionOrModuleBlock(node) { - return isSourceFile(node) || isModuleBlock(node) || isBlock4(node) && isFunctionLike(node.parent); + return isSourceFile(node) || isModuleBlock(node) || isBlock5(node) && isFunctionLike(node.parent); } function isClassElement(node) { const kind = node.kind; @@ -33542,20 +36527,20 @@ ${lanes.join("\n")} return false; } function isScopeMarker(node) { - return isExportAssignment2(node) || isExportDeclaration(node); + return isExportAssignment3(node) || isExportDeclaration2(node); } function hasScopeMarker(statements) { return some(statements, isScopeMarker); } function needsScopeMarker(result) { - return !isAnyImportOrReExport(result) && !isExportAssignment2(result) && !hasSyntacticModifier( + return !isAnyImportOrReExport(result) && !isExportAssignment3(result) && !hasSyntacticModifier( result, 32 /* Export */ ) && !isAmbientModule(result); } function isExternalModuleIndicator(result) { - return isAnyImportOrReExport(result) || isExportAssignment2(result) || hasSyntacticModifier( + return isAnyImportOrReExport(result) || isExportAssignment3(result) || hasSyntacticModifier( result, 32 /* Export */ @@ -33565,10 +36550,10 @@ ${lanes.join("\n")} return node.kind === 250 || node.kind === 251; } function isConciseBody(node) { - return isBlock4(node) || isExpression(node); + return isBlock5(node) || isExpression(node); } function isFunctionBody(node) { - return isBlock4(node); + return isBlock5(node); } function isForInitializer(node) { return isVariableDeclarationList(node) || isExpression(node); @@ -34193,12 +37178,12 @@ ${lanes.join("\n")} function isGrammarError(parent2, child) { if (isTypeParameterDeclaration(parent2)) return child === parent2.expression; if (isClassStaticBlockDeclaration(parent2)) return child === parent2.modifiers; - if (isPropertySignature2(parent2)) return child === parent2.initializer; + if (isPropertySignature3(parent2)) return child === parent2.initializer; if (isPropertyDeclaration(parent2)) return child === parent2.questionToken && isAutoAccessorPropertyDeclaration(parent2); - if (isPropertyAssignment6(parent2)) return child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); - if (isShorthandPropertyAssignment3(parent2)) return child === parent2.equalsToken || child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); + if (isPropertyAssignment8(parent2)) return child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); + if (isShorthandPropertyAssignment5(parent2)) return child === parent2.equalsToken || child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); if (isMethodDeclaration(parent2)) return child === parent2.exclamationToken; - if (isConstructorDeclaration(parent2)) return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); + if (isConstructorDeclaration2(parent2)) return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); if (isGetAccessorDeclaration(parent2)) return child === parent2.typeParameters || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); if (isSetAccessorDeclaration(parent2)) return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); if (isNamespaceExportDeclaration(parent2)) return child === parent2.modifiers || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); @@ -34330,7 +37315,7 @@ ${lanes.join("\n")} return !!findAncestor(node, isJSDocTypeExpression); } function isExportNamespaceAsDefaultDeclaration(node) { - return !!(isExportDeclaration(node) && node.exportClause && isNamespaceExport(node.exportClause) && moduleExportNameIsDefault(node.exportClause.name)); + return !!(isExportDeclaration2(node) && node.exportClause && isNamespaceExport(node.exportClause) && moduleExportNameIsDefault(node.exportClause.name)); } function moduleExportNameTextUnescaped(node) { return node.kind === 11 ? node.text : unescapeLeadingUnderscores(node.escapedText); @@ -34960,7 +37945,7 @@ ${lanes.join("\n")} if (nodeIsSynthesized(node) || !node.parent || flags & 4 && node.isUnterminated) { return false; } - if (isNumericLiteral3(node)) { + if (isNumericLiteral4(node)) { if (node.numericLiteralFlags & 26656) { return false; } @@ -34990,10 +37975,10 @@ ${lanes.join("\n")} return isModuleDeclaration(node) && node.name.kind === 11; } function isNonGlobalAmbientModule(node) { - return isModuleDeclaration(node) && isStringLiteral10(node.name); + return isModuleDeclaration(node) && isStringLiteral12(node.name); } function isEffectiveModuleDeclaration(node) { - return isModuleDeclaration(node) || isIdentifier17(node); + return isModuleDeclaration(node) || isIdentifier21(node); } function isShorthandAmbientModuleSymbol(moduleSymbol) { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); @@ -35159,7 +38144,7 @@ ${lanes.join("\n")} return isAnyImportOrReExport(node) || isModuleDeclaration(node) || isImportTypeNode(node) || isImportCall(node); } function isAnyImportOrReExport(node) { - return isAnyImportSyntax(node) || isExportDeclaration(node); + return isAnyImportSyntax(node) || isExportDeclaration2(node); } function getEnclosingContainer(node) { return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1)); @@ -35216,7 +38201,7 @@ ${lanes.join("\n")} case 167: return entityNameToString(name.left) + "." + entityNameToString(name.right); case 212: - if (isIdentifier17(name.name) || isPrivateIdentifier(name.name)) { + if (isIdentifier21(name.name) || isPrivateIdentifier(name.name)) { return entityNameToString(name.expression) + "." + entityNameToString(name.name); } else { return Debug.assertNever(name.name); @@ -35479,7 +38464,7 @@ ${lanes.join("\n")} return isMetaProperty(n) && n.keywordToken === 102 && n.name.escapedText === "meta"; } function isLiteralImportTypeNode(n) { - return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral10(n.argument.literal); + return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral12(n.argument.literal); } function isPrologueDirective(node) { return node.kind === 245 && node.expression.kind === 11; @@ -35488,13 +38473,13 @@ ${lanes.join("\n")} return !!(getEmitFlags(node) & 2097152); } function isHoistedFunction(node) { - return isCustomPrologue(node) && isFunctionDeclaration2(node); + return isCustomPrologue(node) && isFunctionDeclaration3(node); } function isHoistedVariable(node) { - return isIdentifier17(node.name) && !node.initializer; + return isIdentifier21(node.name) && !node.initializer; } function isHoistedVariableStatement(node) { - return isCustomPrologue(node) && isVariableStatement8(node) && every(node.declarationList.declarations, isHoistedVariable); + return isCustomPrologue(node) && isVariableStatement10(node) && every(node.declarationList.declarations, isHoistedVariable); } function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { return node.kind !== 12 ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; @@ -35693,14 +38678,14 @@ ${lanes.join("\n")} } function isCommonJsExportedExpression(node) { if (!isInJSFile(node)) return false; - return isObjectLiteralExpression6(node.parent) && isBinaryExpression2(node.parent.parent) && getAssignmentDeclarationKind(node.parent.parent) === 2 || isCommonJsExportPropertyAssignment(node.parent); + return isObjectLiteralExpression9(node.parent) && isBinaryExpression4(node.parent.parent) && getAssignmentDeclarationKind(node.parent.parent) === 2 || isCommonJsExportPropertyAssignment(node.parent); } function isCommonJsExportPropertyAssignment(node) { if (!isInJSFile(node)) return false; - return isBinaryExpression2(node) && getAssignmentDeclarationKind(node) === 1; + return isBinaryExpression4(node) && getAssignmentDeclarationKind(node) === 1; } function isValidESSymbolDeclaration(node) { - return (isVariableDeclaration4(node) ? isVarConst(node) && isIdentifier17(node.name) && isVariableDeclarationInVariableStatement(node) : isPropertyDeclaration(node) ? hasEffectiveReadonlyModifier(node) && hasStaticModifier(node) : isPropertySignature2(node) && hasEffectiveReadonlyModifier(node)) || isCommonJsExportPropertyAssignment(node); + return (isVariableDeclaration4(node) ? isVarConst(node) && isIdentifier21(node.name) && isVariableDeclarationInVariableStatement(node) : isPropertyDeclaration(node) ? hasEffectiveReadonlyModifier(node) && hasStaticModifier(node) : isPropertySignature3(node) && hasEffectiveReadonlyModifier(node)) || isCommonJsExportPropertyAssignment(node); } function introducesArgumentsExoticObject(node) { switch (node.kind) { @@ -35743,19 +38728,19 @@ ${lanes.join("\n")} } function forEachPropertyAssignment(objectLiteral, key, callback, key2) { return forEach(objectLiteral == null ? void 0 : objectLiteral.properties, (property) => { - if (!isPropertyAssignment6(property)) return void 0; - const propName = tryGetTextOfPropertyName(property.name); - return key === propName || key2 && key2 === propName ? callback(property) : void 0; + if (!isPropertyAssignment8(property)) return void 0; + const propName2 = tryGetTextOfPropertyName(property.name); + return key === propName2 || key2 && key2 === propName2 ? callback(property) : void 0; }); } function getTsConfigObjectLiteralExpression(tsConfigSourceFile) { if (tsConfigSourceFile && tsConfigSourceFile.statements.length) { const expression = tsConfigSourceFile.statements[0].expression; - return tryCast(expression, isObjectLiteralExpression6); + return tryCast(expression, isObjectLiteralExpression9); } } function getTsConfigPropArrayElementValue(tsConfigSourceFile, propKey, elementValue) { - return forEachTsConfigPropArray(tsConfigSourceFile, propKey, (property) => isArrayLiteralExpression5(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral10(element) && element.text === elementValue) : void 0); + return forEachTsConfigPropArray(tsConfigSourceFile, propKey, (property) => isArrayLiteralExpression7(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral12(element) && element.text === elementValue) : void 0); } function forEachTsConfigPropArray(tsConfigSourceFile, propKey, callback) { return forEachPropertyAssignment(getTsConfigObjectLiteralExpression(tsConfigSourceFile), propKey, callback); @@ -35857,7 +38842,7 @@ ${lanes.join("\n")} } } function isInTopLevelContext(node) { - if (isIdentifier17(node) && (isClassDeclaration3(node.parent) || isFunctionDeclaration2(node.parent)) && node.parent.name === node) { + if (isIdentifier21(node) && (isClassDeclaration5(node.parent) || isFunctionDeclaration3(node.parent)) && node.parent.name === node) { node = node.parent; } const container = getThisContainer( @@ -35949,7 +38934,7 @@ ${lanes.join("\n")} return !!node && isVariableDeclaration4(node) && ((_a3 = node.initializer) == null ? void 0 : _a3.kind) === 110; } function isThisInitializedObjectBindingExpression(node) { - return !!node && (isShorthandPropertyAssignment3(node) || isPropertyAssignment6(node)) && isBinaryExpression2(node.parent.parent) && node.parent.parent.operatorToken.kind === 64 && node.parent.parent.right.kind === 110; + return !!node && (isShorthandPropertyAssignment5(node) || isPropertyAssignment8(node)) && isBinaryExpression4(node.parent.parent) && node.parent.parent.operatorToken.kind === 64 && node.parent.parent.right.kind === 110; } function getEntityNameFromTypeNode(node) { switch (node.kind) { @@ -35989,11 +38974,11 @@ ${lanes.join("\n")} case 232: return !useLegacyDecorators; case 173: - return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration3(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); + return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration5(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); case 178: case 179: case 175: - return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration3(parent2) : isClassLike(parent2)); + return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration5(parent2) : isClassLike(parent2)); case 170: if (!useLegacyDecorators) return false; return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 177 || parent2.kind === 175 || parent2.kind === 179) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 264; @@ -36120,7 +39105,7 @@ ${lanes.join("\n")} } return node.parent.kind === 187 || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); case 81: - return isBinaryExpression2(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103; + return isBinaryExpression4(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103; case 80: if (node.parent.kind === 187 || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { return true; @@ -36227,7 +39212,7 @@ ${lanes.join("\n")} return !!node && !!(node.flags & 16777216); } function isJSDocIndexSignature(node) { - return isTypeReferenceNode3(node) && isIdentifier17(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 || node.typeArguments[0].kind === 150); + return isTypeReferenceNode3(node) && isIdentifier21(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 || node.typeArguments[0].kind === 150); } function isRequireCall(callExpression, requireStringLiteralLikeArgument) { if (callExpression.kind !== 214) { @@ -36268,7 +39253,7 @@ ${lanes.join("\n")} ); } function isRequireVariableStatement(node) { - return isVariableStatement8(node) && node.declarationList.declarations.length > 0 && every(node.declarationList.declarations, (decl) => isVariableDeclarationInitializedToRequire(decl)); + return isVariableStatement10(node) && node.declarationList.declarations.length > 0 && every(node.declarationList.declarations, (decl) => isVariableDeclarationInitializedToRequire(decl)); } function isSingleOrDoubleQuote(charCode) { return charCode === 39 || charCode === 34; @@ -36277,10 +39262,10 @@ ${lanes.join("\n")} return getSourceTextOfNodeFromSourceFile(sourceFile, str).charCodeAt(0) === 34; } function isAssignmentDeclaration(decl) { - return isBinaryExpression2(decl) || isAccessExpression(decl) || isIdentifier17(decl) || isCallExpression9(decl); + return isBinaryExpression4(decl) || isAccessExpression(decl) || isIdentifier21(decl) || isCallExpression12(decl); } function getEffectiveInitializer(node) { - if (isInJSFile(node) && node.initializer && isBinaryExpression2(node.initializer) && (node.initializer.operatorToken.kind === 57 || node.initializer.operatorToken.kind === 61) && node.name && isEntityNameExpression(node.name) && isSameEntityName(node.name, node.initializer.left)) { + if (isInJSFile(node) && node.initializer && isBinaryExpression4(node.initializer) && (node.initializer.operatorToken.kind === 57 || node.initializer.operatorToken.kind === 61) && node.name && isEntityNameExpression(node.name) && isSameEntityName(node.name, node.initializer.left)) { return node.initializer.right; } return node.initializer; @@ -36290,14 +39275,14 @@ ${lanes.join("\n")} return init && getExpandoInitializer(init, isPrototypeAccess(node.name)); } function hasExpandoValueProperty(node, isPrototypeAssignment) { - return forEach(node.properties, (p) => isPropertyAssignment6(p) && isIdentifier17(p.name) && p.name.escapedText === "value" && p.initializer && getExpandoInitializer(p.initializer, isPrototypeAssignment)); + return forEach(node.properties, (p) => isPropertyAssignment8(p) && isIdentifier21(p.name) && p.name.escapedText === "value" && p.initializer && getExpandoInitializer(p.initializer, isPrototypeAssignment)); } function getAssignedExpandoInitializer(node) { - if (node && node.parent && isBinaryExpression2(node.parent) && node.parent.operatorToken.kind === 64) { + if (node && node.parent && isBinaryExpression4(node.parent) && node.parent.operatorToken.kind === 64) { const isPrototypeAssignment = isPrototypeAccess(node.parent.left); return getExpandoInitializer(node.parent.right, isPrototypeAssignment) || getDefaultedExpandoInitializer(node.parent.left, node.parent.right, isPrototypeAssignment); } - if (node && isCallExpression9(node) && isBindableObjectDefinePropertyCall(node)) { + if (node && isCallExpression12(node) && isBindableObjectDefinePropertyCall(node)) { const result = hasExpandoValueProperty(node.arguments[2], node.arguments[1].text === "prototype"); if (result) { return result; @@ -36305,31 +39290,31 @@ ${lanes.join("\n")} } } function getExpandoInitializer(initializer3, isPrototypeAssignment) { - if (isCallExpression9(initializer3)) { + if (isCallExpression12(initializer3)) { const e = skipParentheses(initializer3.expression); return e.kind === 219 || e.kind === 220 ? initializer3 : void 0; } if (initializer3.kind === 219 || initializer3.kind === 232 || initializer3.kind === 220) { return initializer3; } - if (isObjectLiteralExpression6(initializer3) && (initializer3.properties.length === 0 || isPrototypeAssignment)) { + if (isObjectLiteralExpression9(initializer3) && (initializer3.properties.length === 0 || isPrototypeAssignment)) { return initializer3; } } function getDefaultedExpandoInitializer(name, initializer3, isPrototypeAssignment) { - const e = isBinaryExpression2(initializer3) && (initializer3.operatorToken.kind === 57 || initializer3.operatorToken.kind === 61) && getExpandoInitializer(initializer3.right, isPrototypeAssignment); + const e = isBinaryExpression4(initializer3) && (initializer3.operatorToken.kind === 57 || initializer3.operatorToken.kind === 61) && getExpandoInitializer(initializer3.right, isPrototypeAssignment); if (e && isSameEntityName(name, initializer3.left)) { return e; } } function isDefaultedExpandoInitializer(node) { - const name = isVariableDeclaration4(node.parent) ? node.parent.name : isBinaryExpression2(node.parent) && node.parent.operatorToken.kind === 64 ? node.parent.left : void 0; + const name = isVariableDeclaration4(node.parent) ? node.parent.name : isBinaryExpression4(node.parent) && node.parent.operatorToken.kind === 64 ? node.parent.left : void 0; return name && getExpandoInitializer(node.right, isPrototypeAccess(name)) && isEntityNameExpression(name) && isSameEntityName(name, node.left); } function getNameOfExpando(node) { - if (isBinaryExpression2(node.parent)) { - const parent2 = (node.parent.operatorToken.kind === 57 || node.parent.operatorToken.kind === 61) && isBinaryExpression2(node.parent.parent) ? node.parent.parent : node.parent; - if (parent2.operatorToken.kind === 64 && isIdentifier17(parent2.left)) { + if (isBinaryExpression4(node.parent)) { + const parent2 = (node.parent.operatorToken.kind === 57 || node.parent.operatorToken.kind === 61) && isBinaryExpression4(node.parent.parent) ? node.parent.parent : node.parent; + if (parent2.operatorToken.kind === 64 && isIdentifier21(parent2.left)) { return parent2.left; } } else if (isVariableDeclaration4(node.parent)) { @@ -36340,7 +39325,7 @@ ${lanes.join("\n")} if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer3)) { return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer3); } - if (isMemberName(name) && isLiteralLikeAccess(initializer3) && (initializer3.expression.kind === 110 || isIdentifier17(initializer3.expression) && (initializer3.expression.escapedText === "window" || initializer3.expression.escapedText === "self" || initializer3.expression.escapedText === "global"))) { + if (isMemberName(name) && isLiteralLikeAccess(initializer3) && (initializer3.expression.kind === 110 || isIdentifier21(initializer3.expression) && (initializer3.expression.escapedText === "window" || initializer3.expression.escapedText === "self" || initializer3.expression.escapedText === "global"))) { return isSameEntityName(name, getNameOrArgument(initializer3)); } if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer3)) { @@ -36359,33 +39344,33 @@ ${lanes.join("\n")} return node; } function isExportsIdentifier(node) { - return isIdentifier17(node) && node.escapedText === "exports"; + return isIdentifier21(node) && node.escapedText === "exports"; } function isModuleIdentifier(node) { - return isIdentifier17(node) && node.escapedText === "module"; + return isIdentifier21(node) && node.escapedText === "module"; } function isModuleExportsAccessExpression(node) { - return (isPropertyAccessExpression10(node) || isLiteralLikeElementAccess(node)) && isModuleIdentifier(node.expression) && getElementOrPropertyAccessName(node) === "exports"; + return (isPropertyAccessExpression12(node) || isLiteralLikeElementAccess(node)) && isModuleIdentifier(node.expression) && getElementOrPropertyAccessName(node) === "exports"; } function getAssignmentDeclarationKind(expr) { const special = getAssignmentDeclarationKindWorker(expr); return special === 5 || isInJSFile(expr) ? special : 0; } function isBindableObjectDefinePropertyCall(expr) { - return length(expr.arguments) === 3 && isPropertyAccessExpression10(expr.expression) && isIdentifier17(expr.expression.expression) && idText(expr.expression.expression) === "Object" && idText(expr.expression.name) === "defineProperty" && isStringOrNumericLiteralLike(expr.arguments[1]) && isBindableStaticNameExpression( + return length(expr.arguments) === 3 && isPropertyAccessExpression12(expr.expression) && isIdentifier21(expr.expression.expression) && idText(expr.expression.expression) === "Object" && idText(expr.expression.name) === "defineProperty" && isStringOrNumericLiteralLike(expr.arguments[1]) && isBindableStaticNameExpression( expr.arguments[0], /*excludeThisKeyword*/ true ); } function isLiteralLikeAccess(node) { - return isPropertyAccessExpression10(node) || isLiteralLikeElementAccess(node); + return isPropertyAccessExpression12(node) || isLiteralLikeElementAccess(node); } function isLiteralLikeElementAccess(node) { - return isElementAccessExpression3(node) && isStringOrNumericLiteralLike(node.argumentExpression); + return isElementAccessExpression5(node) && isStringOrNumericLiteralLike(node.argumentExpression); } function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression10(node) && (!excludeThisKeyword && node.expression.kind === 110 || isIdentifier17(node.name) && isBindableStaticNameExpression( + return isPropertyAccessExpression12(node) && (!excludeThisKeyword && node.expression.kind === 110 || isIdentifier21(node.name) && isBindableStaticNameExpression( node.expression, /*excludeThisKeyword*/ true @@ -36402,13 +39387,13 @@ ${lanes.join("\n")} return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); } function getNameOrArgument(expr) { - if (isPropertyAccessExpression10(expr)) { + if (isPropertyAccessExpression12(expr)) { return expr.name; } return expr.argumentExpression; } function getAssignmentDeclarationKindWorker(expr) { - if (isCallExpression9(expr)) { + if (isCallExpression12(expr)) { if (!isBindableObjectDefinePropertyCall(expr)) { return 0; } @@ -36428,20 +39413,20 @@ ${lanes.join("\n")} expr.left.expression, /*excludeThisKeyword*/ true - ) && getElementOrPropertyAccessName(expr.left) === "prototype" && isObjectLiteralExpression6(getInitializerOfBinaryExpression(expr))) { + ) && getElementOrPropertyAccessName(expr.left) === "prototype" && isObjectLiteralExpression9(getInitializerOfBinaryExpression(expr))) { return 6; } return getAssignmentDeclarationPropertyAccessKind(expr.left); } function isVoidZero(node) { - return isVoidExpression(node) && isNumericLiteral3(node.expression) && node.expression.text === "0"; + return isVoidExpression(node) && isNumericLiteral4(node.expression) && node.expression.text === "0"; } function getElementOrPropertyAccessArgumentExpressionOrName(node) { - if (isPropertyAccessExpression10(node)) { + if (isPropertyAccessExpression12(node)) { return node.name; } const arg = skipParentheses(node.argumentExpression); - if (isNumericLiteral3(arg) || isStringLiteralLike(arg)) { + if (isNumericLiteral4(arg) || isStringLiteralLike(arg)) { return arg; } return node; @@ -36449,10 +39434,10 @@ ${lanes.join("\n")} function getElementOrPropertyAccessName(node) { const name = getElementOrPropertyAccessArgumentExpressionOrName(node); if (name) { - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { return name.escapedText; } - if (isStringLiteralLike(name) || isNumericLiteral3(name)) { + if (isStringLiteralLike(name) || isNumericLiteral4(name)) { return escapeLeadingUnderscores(name.text); } } @@ -36472,7 +39457,7 @@ ${lanes.join("\n")} return 3; } let nextToLast = lhs; - while (!isIdentifier17(nextToLast.expression)) { + while (!isIdentifier21(nextToLast.expression)) { nextToLast = nextToLast.expression; } const id = nextToLast.expression; @@ -36484,23 +39469,23 @@ ${lanes.join("\n")} lhs, /*excludeThisKeyword*/ true - ) || isElementAccessExpression3(lhs) && isDynamicName(lhs)) { + ) || isElementAccessExpression5(lhs) && isDynamicName(lhs)) { return 5; } } return 0; } function getInitializerOfBinaryExpression(expr) { - while (isBinaryExpression2(expr.right)) { + while (isBinaryExpression4(expr.right)) { expr = expr.right; } return expr.right; } function isPrototypePropertyAssignment(node) { - return isBinaryExpression2(node) && getAssignmentDeclarationKind(node) === 3; + return isBinaryExpression4(node) && getAssignmentDeclarationKind(node) === 3; } function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 && (!isElementAccessExpression3(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); + return isInJSFile(expr) && expr.parent && expr.parent.kind === 245 && (!isElementAccessExpression5(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); } function setValueDeclaration(symbol2, node) { const { valueDeclaration } = symbol2; @@ -36580,7 +39565,7 @@ ${lanes.join("\n")} false ) ? node.parent : void 0; case 202: - if (!isStringLiteral10(node)) { + if (!isStringLiteral12(node)) { break; } return tryCast(node.parent.parent, isImportTypeNode); @@ -36612,7 +39597,7 @@ ${lanes.join("\n")} function getNamespaceDeclarationNode(node) { switch (node.kind) { case 273: - return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport4); + return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport5); case 272: return node; case 279: @@ -36630,7 +39615,7 @@ ${lanes.join("\n")} if (result) return result; } if (node.namedBindings) { - const result = isNamespaceImport4(node.namedBindings) ? action(node.namedBindings) : forEach(node.namedBindings.elements, action); + const result = isNamespaceImport5(node.namedBindings) ? action(node.namedBindings) : forEach(node.namedBindings.elements, action); if (result) return result; } } @@ -36649,7 +39634,7 @@ ${lanes.join("\n")} } function isJSDocConstructSignature(node) { const param = isJSDocFunctionType(node) ? firstOrUndefined(node.parameters) : void 0; - const name = tryCast(param && param.name, isIdentifier17); + const name = tryCast(param && param.name, isIdentifier21); return !!name && name.escapedText === "new"; } function isJSDocTypeAlias(node) { @@ -36659,10 +39644,10 @@ ${lanes.join("\n")} return isJSDocTypeAlias(node) || isTypeAliasDeclaration2(node); } function getSourceOfAssignment(node) { - return isExpressionStatement(node) && isBinaryExpression2(node.expression) && node.expression.operatorToken.kind === 64 ? getRightMostAssignedExpression(node.expression) : void 0; + return isExpressionStatement(node) && isBinaryExpression4(node.expression) && node.expression.operatorToken.kind === 64 ? getRightMostAssignedExpression(node.expression) : void 0; } function getSourceOfDefaultedAssignment(node) { - return isExpressionStatement(node) && isBinaryExpression2(node.expression) && getAssignmentDeclarationKind(node.expression) !== 0 && isBinaryExpression2(node.expression.right) && (node.expression.right.operatorToken.kind === 57 || node.expression.right.operatorToken.kind === 61) ? node.expression.right.right : void 0; + return isExpressionStatement(node) && isBinaryExpression4(node.expression) && getAssignmentDeclarationKind(node.expression) !== 0 && isBinaryExpression4(node.expression.right) && (node.expression.right.operatorToken.kind === 57 || node.expression.right.operatorToken.kind === 61) ? node.expression.right.right : void 0; } function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { switch (node.kind) { @@ -36676,7 +39661,7 @@ ${lanes.join("\n")} } } function getSingleVariableOfVariableStatement(node) { - return isVariableStatement8(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; + return isVariableStatement10(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; } function getNestedModuleDeclaration(node) { return isModuleDeclaration(node) && node.body && node.body.kind === 268 ? node.body : void 0; @@ -36811,7 +39796,7 @@ ${lanes.join("\n")} }); } function ownsJSDocTag(hostNode, tag) { - return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression4(tag.parent.parent) || tag.parent.parent === hostNode; + return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression6(tag.parent.parent) || tag.parent.parent === hostNode; } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; @@ -36827,7 +39812,7 @@ ${lanes.join("\n")} if (node.symbol) { return node.symbol; } - if (!isIdentifier17(node.name)) { + if (!isIdentifier21(node.name)) { return void 0; } const name = node.name.escapedText; @@ -36853,7 +39838,7 @@ ${lanes.join("\n")} function getHostSignatureFromJSDoc(node) { const host = getEffectiveJSDocHost(node); if (host) { - return isPropertySignature2(host) && host.type && isFunctionLike(host.type) ? host.type : isFunctionLike(host) ? host : void 0; + return isPropertySignature3(host) && host.type && isFunctionLike(host.type) ? host.type : isFunctionLike(host) ? host : void 0; } return void 0; } @@ -36989,7 +39974,7 @@ ${lanes.join("\n")} return false; } function isValueSignatureDeclaration(node) { - return isFunctionExpression4(node) || isArrowFunction5(node) || isMethodOrAccessor(node) || isFunctionDeclaration2(node) || isConstructorDeclaration(node); + return isFunctionExpression5(node) || isArrowFunction6(node) || isMethodOrAccessor(node) || isFunctionDeclaration3(node) || isConstructorDeclaration2(node); } function walkUp(node, kind) { while (node && node.kind === kind) { @@ -37060,7 +40045,7 @@ ${lanes.join("\n")} return isJSDocParameterTag(tag) && tag.name === parent2 ? tag : void 0; } else { const binExp = parent2.parent; - return isBinaryExpression2(binExp) && getAssignmentDeclarationKind(binExp) !== 0 && (binExp.left.symbol || binExp.symbol) && getNameOfDeclaration(binExp) === name ? binExp : void 0; + return isBinaryExpression4(binExp) && getAssignmentDeclarationKind(binExp) !== 0 && (binExp.left.symbol || binExp.symbol) && getNameOfDeclaration(binExp) === name ? binExp : void 0; } case 81: return isDeclaration(parent2) && parent2.name === name ? parent2 : void 0; @@ -37123,7 +40108,7 @@ ${lanes.join("\n")} return isAliasableExpression(e); } function getExportAssignmentExpression(node) { - return isExportAssignment2(node) ? node.expression : node.right; + return isExportAssignment3(node) ? node.expression : node.right; } function getPropertyAssignmentAliasLikeExpression(node) { return node.kind === 305 ? node.name : node.kind === 304 ? node.initializer : node.parent.right; @@ -37265,10 +40250,10 @@ ${lanes.join("\n")} return false; } function isStringOrNumericLiteralLike(node) { - return isStringLiteralLike(node) || isNumericLiteral3(node); + return isStringLiteralLike(node) || isNumericLiteral4(node); } function isSignedNumericLiteral(node) { - return isPrefixUnaryExpression2(node) && (node.operator === 40 || node.operator === 41) && isNumericLiteral3(node.operand); + return isPrefixUnaryExpression4(node) && (node.operator === 40 || node.operator === 41) && isNumericLiteral4(node.operand); } function hasDynamicName(declaration) { const name = getNameOfDeclaration(declaration); @@ -37278,7 +40263,7 @@ ${lanes.join("\n")} if (!(name.kind === 168 || name.kind === 213)) { return false; } - const expr = isElementAccessExpression3(name) ? skipParentheses(name.argumentExpression) : name.expression; + const expr = isElementAccessExpression5(name) ? skipParentheses(name.argumentExpression) : name.expression; return !isStringOrNumericLiteralLike(expr) && !isSignedNumericLiteral(expr); } function getPropertyNameForPropertyNameNode(name) { @@ -37335,7 +40320,7 @@ ${lanes.join("\n")} return startsWith(symbol2.escapedName, "__#"); } function isProtoSetter(node) { - return isIdentifier17(node) ? idText(node) === "__proto__" : isStringLiteral10(node) && node.text === "__proto__"; + return isIdentifier21(node) ? idText(node) === "__proto__" : isStringLiteral12(node) && node.text === "__proto__"; } function isAnonymousFunctionDefinition(node, cb) { node = skipOuterExpressions(node); @@ -37364,11 +40349,11 @@ ${lanes.join("\n")} case 305: return !!node.objectAssignmentInitializer; case 261: - return isIdentifier17(node.name) && !!node.initializer; + return isIdentifier21(node.name) && !!node.initializer; case 170: - return isIdentifier17(node.name) && !!node.initializer && !node.dotDotDotToken; + return isIdentifier21(node.name) && !!node.initializer && !node.dotDotDotToken; case 209: - return isIdentifier17(node.name) && !!node.initializer && !node.dotDotDotToken; + return isIdentifier21(node.name) && !!node.initializer && !node.dotDotDotToken; case 173: return !!node.initializer; case 227: @@ -37377,7 +40362,7 @@ ${lanes.join("\n")} case 77: case 76: case 78: - return isIdentifier17(node.left); + return isIdentifier21(node.left); } break; case 278: @@ -37733,7 +40718,7 @@ ${lanes.join("\n")} return !!((node.templateFlags || 0) & 2048); } function hasInvalidEscape(template) { - return template && !!(isNoSubstitutionTemplateLiteral2(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); + return template && !!(isNoSubstitutionTemplateLiteral4(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); } var doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\u2028\u2029\u0085]/g; var singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\u2028\u2029\u0085]/g; @@ -38096,7 +41081,7 @@ ${lanes.join("\n")} ]; } function getPossibleOriginalInputPathWithoutChangingExt(filePath, ignoreCase, outputDir, getCommonSourceDirectory2) { - return outputDir ? resolvePath( + return outputDir ? resolvePath2( getCommonSourceDirectory2(), getRelativePathFromDirectory(outputDir, filePath, ignoreCase) ) : filePath; @@ -38185,7 +41170,7 @@ ${lanes.join("\n")} return computeLineOfPosition(lineMap, pos); } function getFirstConstructorWithBody(node) { - return find(node.members, (member) => isConstructorDeclaration(member) && nodeIsPresent(member.body)); + return find(node.members, (member) => isConstructorDeclaration2(member) && nodeIsPresent(member.body)); } function getSetAccessorValueParameter(accessor) { if (accessor && accessor.parameters.length > 0) { @@ -38272,7 +41257,7 @@ ${lanes.join("\n")} }; } function getEffectiveTypeAnnotationNode(node) { - if (!isInJSFile(node) && isFunctionDeclaration2(node)) return void 0; + if (!isInJSFile(node) && isFunctionDeclaration3(node)) return void 0; if (isTypeAliasDeclaration2(node)) return void 0; const type = node.type; if (type || !isInJSFile(node)) return type; @@ -38632,13 +41617,13 @@ ${lanes.join("\n")} return token === 76 || token === 77 || token === 78; } function isLogicalOrCoalescingAssignmentExpression(expr) { - return isBinaryExpression2(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind); + return isBinaryExpression4(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind); } function isLogicalOrCoalescingBinaryOperator(token) { return isBinaryLogicalOperator(token) || token === 61; } function isLogicalOrCoalescingBinaryExpression(expr) { - return isBinaryExpression2(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind); + return isBinaryExpression4(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind); } function isAssignmentOperator(token) { return token >= 64 && token <= 79; @@ -38666,7 +41651,7 @@ ${lanes.join("\n")} return void 0; } function isAssignmentExpression(node, excludeCompoundAssignment) { - return isBinaryExpression2(node) && (excludeCompoundAssignment ? node.operatorToken.kind === 64 : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); + return isBinaryExpression4(node) && (excludeCompoundAssignment ? node.operatorToken.kind === 64 : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); } function isDestructuringAssignment(node) { if (isAssignmentExpression( @@ -38705,20 +41690,20 @@ ${lanes.join("\n")} return node.kind === 80 || node.kind === 110 || node.kind === 108 || node.kind === 237 || node.kind === 212 && isDottedName(node.expression) || node.kind === 218 && isDottedName(node.expression); } function isPropertyAccessEntityNameExpression(node) { - return isPropertyAccessExpression10(node) && isIdentifier17(node.name) && isEntityNameExpression(node.expression); + return isPropertyAccessExpression12(node) && isIdentifier21(node.name) && isEntityNameExpression(node.expression); } function tryGetPropertyAccessOrIdentifierToString(expr) { - if (isPropertyAccessExpression10(expr)) { + if (isPropertyAccessExpression12(expr)) { const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression); if (baseStr !== void 0) { return baseStr + "." + entityNameToString(expr.name); } - } else if (isElementAccessExpression3(expr)) { + } else if (isElementAccessExpression5(expr)) { const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression); if (baseStr !== void 0 && isPropertyName(expr.argumentExpression)) { return baseStr + "." + getPropertyNameForPropertyNameNode(expr.argumentExpression); } - } else if (isIdentifier17(expr)) { + } else if (isIdentifier21(expr)) { return unescapeLeadingUnderscores(expr.escapedText); } else if (isJsxNamespacedName(expr)) { return getTextOfJsxNamespacedName(expr); @@ -38732,13 +41717,13 @@ ${lanes.join("\n")} return node.parent.kind === 167 && node.parent.right === node || node.parent.kind === 212 && node.parent.name === node || node.parent.kind === 237 && node.parent.name === node; } function isRightSideOfAccessExpression(node) { - return !!node.parent && (isPropertyAccessExpression10(node.parent) && node.parent.name === node || isElementAccessExpression3(node.parent) && node.parent.argumentExpression === node); + return !!node.parent && (isPropertyAccessExpression12(node.parent) && node.parent.name === node || isElementAccessExpression5(node.parent) && node.parent.argumentExpression === node); } function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { - return isQualifiedName2(node.parent) && node.parent.right === node || isPropertyAccessExpression10(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; + return isQualifiedName2(node.parent) && node.parent.right === node || isPropertyAccessExpression12(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } function isInstanceOfExpression(node) { - return isBinaryExpression2(node) && node.operatorToken.kind === 104; + return isBinaryExpression4(node) && node.operatorToken.kind === 104; } function isRightSideOfInstanceofExpression(node) { return isInstanceOfExpression(node.parent) && node === node.parent.right; @@ -39189,7 +42174,7 @@ ${lanes.join("\n")} return !!symbol2 && !!symbol2.declarations && !!symbol2.declarations[0] && isNamespaceExportDeclaration(symbol2.declarations[0]); } function showModuleSpecifier({ moduleSpecifier }) { - return isStringLiteral10(moduleSpecifier) ? moduleSpecifier.text : getTextOfNode(moduleSpecifier); + return isStringLiteral12(moduleSpecifier) ? moduleSpecifier.text : getTextOfNode(moduleSpecifier); } function getLastChild(node) { let lastChild; @@ -39213,7 +42198,7 @@ ${lanes.join("\n")} return true; } function isObjectTypeDeclaration(node) { - return isClassLike(node) || isInterfaceDeclaration2(node) || isTypeLiteralNode(node); + return isClassLike(node) || isInterfaceDeclaration2(node) || isTypeLiteralNode2(node); } function isTypeNodeKind(kind) { return kind >= 183 && kind <= 206 || kind === 133 || kind === 159 || kind === 150 || kind === 163 || kind === 151 || kind === 136 || kind === 154 || kind === 155 || kind === 116 || kind === 157 || kind === 146 || kind === 141 || kind === 234 || kind === 313 || kind === 314 || kind === 315 || kind === 316 || kind === 317 || kind === 318 || kind === 319; @@ -39251,7 +42236,7 @@ ${lanes.join("\n")} return res; } } else if (access.kind === 213) { - if (isIdentifier17(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { + if (isIdentifier21(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { const res = action(access.argumentExpression); if (res !== void 0) { return res; @@ -39263,7 +42248,7 @@ ${lanes.join("\n")} if (isAccessExpression(access.expression)) { return walkAccessExpression(access.expression); } - if (isIdentifier17(access.expression)) { + if (isIdentifier21(access.expression)) { return action(access.expression); } return void 0; @@ -40825,7 +43810,7 @@ ${lanes.join("\n")} return !!(useSite.flags & 33554432) || isInJSDoc(useSite) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); } function isShorthandPropertyNameUseSite(useSite) { - return isIdentifier17(useSite) && isShorthandPropertyAssignment3(useSite.parent) && useSite.parent.name === useSite; + return isIdentifier21(useSite) && isShorthandPropertyAssignment5(useSite.parent) && useSite.parent.name === useSite; } function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { while (node.kind === 80 || node.kind === 212) { @@ -40860,7 +43845,7 @@ ${lanes.join("\n")} return (heritageClause == null ? void 0 : heritageClause.token) === 119 || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 265; } function isIdentifierTypeReference(node) { - return isTypeReferenceNode3(node) && isIdentifier17(node.typeName); + return isTypeReferenceNode3(node) && isIdentifier21(node.typeName); } function arrayIsHomogeneous(array2, comparer = equateValues) { if (array2.length < 2) return true; @@ -40923,13 +43908,13 @@ ${lanes.join("\n")} return !isOmittedExpression(node); } function isPackedArrayLiteral(node) { - return isArrayLiteralExpression5(node) && every(node.elements, isPackedElement); + return isArrayLiteralExpression7(node) && every(node.elements, isPackedElement); } function expressionResultIsUnused(node) { Debug.assertIsDefined(node.parent); while (true) { const parent2 = node.parent; - if (isParenthesizedExpression4(parent2)) { + if (isParenthesizedExpression6(parent2)) { node = parent2; continue; } @@ -40941,7 +43926,7 @@ ${lanes.join("\n")} node = parent2; continue; } - if (isBinaryExpression2(parent2) && parent2.operatorToken.kind === 28) { + if (isBinaryExpression4(parent2) && parent2.operatorToken.kind === 28) { if (node === parent2.left) return true; node = parent2; continue; @@ -41121,7 +44106,7 @@ ${lanes.join("\n")} } } function canHaveExportModifier(node) { - return isEnumDeclaration(node) || isVariableStatement8(node) || isFunctionDeclaration2(node) || isClassDeclaration3(node) || isInterfaceDeclaration2(node) || isTypeDeclaration(node) || isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node); + return isEnumDeclaration(node) || isVariableStatement10(node) || isFunctionDeclaration3(node) || isClassDeclaration5(node) || isInterfaceDeclaration2(node) || isTypeDeclaration(node) || isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node); } function isOptionalJSDocPropertyLikeTag(node) { if (!isJSDocPropertyLikeTag(node)) { @@ -41161,10 +44146,10 @@ ${lanes.join("\n")} } function isNonNullAccess(node) { const kind = node.kind; - return (kind === 212 || kind === 213) && isNonNullExpression2(node.expression); + return (kind === 212 || kind === 213) && isNonNullExpression4(node.expression); } function isJSDocSatisfiesExpression(node) { - return isInJSFile(node) && isParenthesizedExpression4(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); + return isInJSFile(node) && isParenthesizedExpression6(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); } function getJSDocSatisfiesExpressionType(node) { return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node)); @@ -41174,10 +44159,10 @@ ${lanes.join("\n")} return tag && tag.typeExpression && tag.typeExpression.type; } function getEscapedTextOfJsxAttributeName(node) { - return isIdentifier17(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node); + return isIdentifier21(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node); } function getTextOfJsxAttributeName(node) { - return isIdentifier17(node) ? idText(node) : getTextOfJsxNamespacedName(node); + return isIdentifier21(node) ? idText(node) : getTextOfJsxNamespacedName(node); } function isJsxAttributeName(node) { const kind = node.kind; @@ -41190,7 +44175,7 @@ ${lanes.join("\n")} return `${idText(node.namespace)}:${idText(node.name)}`; } function intrinsicTagNameToString(node) { - return isIdentifier17(node) ? idText(node) : getTextOfJsxNamespacedName(node); + return isIdentifier21(node) ? idText(node) : getTextOfJsxNamespacedName(node); } function isTypeUsableAsPropertyName(type) { return !!(type.flags & 8576); @@ -41205,7 +44190,7 @@ ${lanes.join("\n")} return Debug.fail(); } function isExpandoPropertyDeclaration(declaration) { - return !!declaration && (isPropertyAccessExpression10(declaration) || isElementAccessExpression3(declaration) || isBinaryExpression2(declaration)); + return !!declaration && (isPropertyAccessExpression12(declaration) || isElementAccessExpression5(declaration) || isBinaryExpression4(declaration)); } function hasResolutionModeOverride(node) { if (node === void 0) { @@ -41218,7 +44203,7 @@ ${lanes.join("\n")} return stringReplace.call(s, "*", replacement); } function getNameFromImportAttribute(node) { - return isIdentifier17(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text); + return isIdentifier21(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text); } function isSourceElement(node) { switch (node.kind) { @@ -41823,7 +44808,7 @@ ${lanes.join("\n")} if (isNullishCoalesce(node) || isOptionalChain(node)) { return target < 7; } - if (isBindingElement(node) && node.dotDotDotToken && isObjectBindingPattern(node.parent)) { + if (isBindingElement(node) && node.dotDotDotToken && isObjectBindingPattern2(node.parent)) { return target < 4; } if (isTypeNode(node)) return false; @@ -41889,10 +44874,10 @@ ${lanes.join("\n")} return includeBigInt; case 225: if (node.operator === 41) { - return isNumericLiteral3(node.operand) || includeBigInt && isBigIntLiteral(node.operand); + return isNumericLiteral4(node.operand) || includeBigInt && isBigIntLiteral(node.operand); } if (node.operator === 40) { - return isNumericLiteral3(node.operand); + return isNumericLiteral4(node.operand); } return false; default: @@ -41929,7 +44914,7 @@ ${lanes.join("\n")} } } function isSideEffectImport(node) { - const ancestor = findAncestor(node, isImportDeclaration5); + const ancestor = findAncestor(node, isImportDeclaration6); return !!ancestor && !ancestor.importClause; } var unprefixedNodeCoreModulesList = [ @@ -42019,7 +45004,7 @@ ${lanes.join("\n")} cb(node, node.argument.literal); } else if (includeTypeSpaceImports && isJSDocImportTag(node)) { const moduleNameExpr = getExternalModuleName(node); - if (moduleNameExpr && isStringLiteral10(moduleNameExpr) && moduleNameExpr.text) { + if (moduleNameExpr && isStringLiteral12(moduleNameExpr) && moduleNameExpr.text) { cb(node, moduleNameExpr); } } @@ -42094,10 +45079,10 @@ ${lanes.join("\n")} return optionsObject && getPropertyArrayElementValue(optionsObject, name, value); } function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { - return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression5(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral10(element) && element.text === elementValue) : void 0); + return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression7(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral12(element) && element.text === elementValue) : void 0); } function getOptionsSyntaxByValue(optionsObject, name, value) { - return forEachOptionsSyntaxByName(optionsObject, name, (property) => isStringLiteral10(property.initializer) && property.initializer.text === value ? property.initializer : void 0); + return forEachOptionsSyntaxByName(optionsObject, name, (property) => isStringLiteral12(property.initializer) && property.initializer.text === value ? property.initializer : void 0); } function forEachOptionsSyntaxByName(optionsObject, name, callback) { return forEachPropertyAssignment(optionsObject, name, callback); @@ -42143,7 +45128,7 @@ ${lanes.join("\n")} nodeClone ); if (visited === node) { - const clone22 = isStringLiteral10(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) : isNumericLiteral3(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) : factory.cloneNode(node); + const clone22 = isStringLiteral12(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) : isNumericLiteral4(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) : factory.cloneNode(node); return setTextRange(clone22, node); } visited.parent = void 0; @@ -42306,7 +45291,7 @@ ${lanes.join("\n")} } function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (isBinaryExpression2(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) { + if (isBinaryExpression4(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) { return true; } const binaryOperatorPrecedence = getOperatorPrecedence(227, binaryOperator); @@ -42327,7 +45312,7 @@ ${lanes.join("\n")} if (isLeftSideOfBinary) { return binaryOperatorAssociativity === 1; } else { - if (isBinaryExpression2(emittedOperand) && emittedOperand.operatorToken.kind === binaryOperator) { + if (isBinaryExpression4(emittedOperand) && emittedOperand.operatorToken.kind === binaryOperator) { if (operatorHasAssociativeProperty(binaryOperator)) { return false; } @@ -42465,7 +45450,7 @@ ${lanes.join("\n")} } function parenthesizeExpressionOfExpressionStatement(expression) { const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isCallExpression9(emittedExpression)) { + if (isCallExpression12(emittedExpression)) { const callee = emittedExpression.expression; const kind = skipPartiallyEmittedExpressions(callee).kind; if (kind === 219 || kind === 220) { @@ -42494,7 +45479,7 @@ ${lanes.join("\n")} return expression; } function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock4(body) && (isCommaSequence(body) || getLeftmostExpression( + if (!isBlock5(body) && (isCommaSequence(body) || getLeftmostExpression( body, /*stopAtCallExpressions*/ false @@ -42643,7 +45628,7 @@ ${lanes.join("\n")} convertToAssignmentElementTarget }; function convertToFunctionBlock(node, multiLine) { - if (isBlock4(node)) return node; + if (isBlock5(node)) return node; const returnStatement = factory2.createReturnStatement(node); setTextRange(returnStatement, node); const body = factory2.createBlock([returnStatement], multiLine); @@ -42696,7 +45681,7 @@ ${lanes.join("\n")} function convertToArrayAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { - Debug.assertNode(element.name, isIdentifier17); + Debug.assertNode(element.name, isIdentifier21); return setOriginalNode(setTextRange(factory2.createSpreadElement(element.name), element), element); } const expression = convertToAssignmentElementTarget(element.name); @@ -42713,14 +45698,14 @@ ${lanes.join("\n")} function convertToObjectAssignmentElement(element) { if (isBindingElement(element)) { if (element.dotDotDotToken) { - Debug.assertNode(element.name, isIdentifier17); + Debug.assertNode(element.name, isIdentifier21); return setOriginalNode(setTextRange(factory2.createSpreadAssignment(element.name), element), element); } if (element.propertyName) { const expression = convertToAssignmentElementTarget(element.name); return setOriginalNode(setTextRange(factory2.createPropertyAssignment(element.propertyName, element.initializer ? factory2.createAssignment(expression, element.initializer) : expression), element), element); } - Debug.assertNode(element.name, isIdentifier17); + Debug.assertNode(element.name, isIdentifier21); return setOriginalNode(setTextRange(factory2.createShorthandPropertyAssignment(element.name, element.initializer), element), element); } return cast(element, isObjectLiteralElementLike); @@ -42736,7 +45721,7 @@ ${lanes.join("\n")} } } function convertToObjectAssignmentPattern(node) { - if (isObjectBindingPattern(node)) { + if (isObjectBindingPattern2(node)) { return setOriginalNode( setTextRange( factory2.createObjectLiteralExpression(map2(node.elements, convertToObjectAssignmentElement)), @@ -42745,7 +45730,7 @@ ${lanes.join("\n")} node ); } - return cast(node, isObjectLiteralExpression6); + return cast(node, isObjectLiteralExpression9); } function convertToArrayAssignmentPattern(node) { if (isArrayBindingPattern(node)) { @@ -42757,7 +45742,7 @@ ${lanes.join("\n")} node ); } - return cast(node, isArrayLiteralExpression5); + return cast(node, isArrayLiteralExpression7); } function convertToAssignmentElementTarget(node) { if (isBindingPattern(node)) { @@ -44883,7 +47868,7 @@ ${lanes.join("\n")} node.expression = expression; node.questionDotToken = questionDotToken; node.name = name; - node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier17(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912); + node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier21(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912); node.jsDoc = void 0; node.flowNode = void 0; return node; @@ -44906,7 +47891,7 @@ ${lanes.join("\n")} } function updatePropertyAccessExpression(node, expression, name) { if (isPropertyAccessChain(node)) { - return updatePropertyAccessChain(node, expression, node.questionDotToken, cast(name, isIdentifier17)); + return updatePropertyAccessChain(node, expression, node.questionDotToken, cast(name, isIdentifier21)); } return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; } @@ -45220,7 +48205,7 @@ ${lanes.join("\n")} node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); - if ((operator === 46 || operator === 47) && isIdentifier17(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) { + if ((operator === 46 || operator === 47) && isIdentifier21(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) { node.transformFlags |= 268435456; } return node; @@ -45236,7 +48221,7 @@ ${lanes.join("\n")} node.operator = operator; node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); node.transformFlags |= propagateChildFlags(node.operand); - if (isIdentifier17(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) { + if (isIdentifier21(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) { node.transformFlags |= 268435456; } return node; @@ -45258,9 +48243,9 @@ ${lanes.join("\n")} if (operatorKind === 61) { node.transformFlags |= 32; } else if (operatorKind === 64) { - if (isObjectLiteralExpression6(node.left)) { + if (isObjectLiteralExpression9(node.left)) { node.transformFlags |= 1024 | 128 | 4096 | propagateAssignmentPatternFlags(node.left); - } else if (isArrayLiteralExpression5(node.left)) { + } else if (isArrayLiteralExpression7(node.left)) { node.transformFlags |= 1024 | 4096 | propagateAssignmentPatternFlags(node.left); } } else if (operatorKind === 43 || operatorKind === 68) { @@ -47145,7 +50130,7 @@ ${lanes.join("\n")} if (isCommaListExpression(node)) { return node.elements; } - if (isBinaryExpression2(node) && isCommaToken(node.operatorToken)) { + if (isBinaryExpression4(node) && isCommaToken(node.operatorToken)) { return [node.left, node.right]; } } @@ -47221,7 +50206,7 @@ ${lanes.join("\n")} if (isGeneratedIdentifier(node)) { return cloneGeneratedIdentifier(node); } - if (isIdentifier17(node)) { + if (isIdentifier21(node)) { return cloneIdentifier(node); } if (isGeneratedPrivateIdentifier(node)) { @@ -47419,7 +50404,7 @@ ${lanes.join("\n")} } } function isIgnorableParen(node) { - return isParenthesizedExpression4(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node)); + return isParenthesizedExpression6(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node)); } function restoreOuterExpressions(outerExpression, innerExpression, kinds = 63) { if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) { @@ -47487,7 +50472,7 @@ ${lanes.join("\n")} /*optionalChain*/ false ); - } else if (isPropertyAccessExpression10(callee)) { + } else if (isPropertyAccessExpression12(callee)) { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = createTempVariable(recordTempVariable); target = createPropertyAccessExpression( @@ -47505,7 +50490,7 @@ ${lanes.join("\n")} thisArg = callee.expression; target = callee; } - } else if (isElementAccessExpression3(callee)) { + } else if (isElementAccessExpression5(callee)) { if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { thisArg = createTempVariable(recordTempVariable); target = createElementAccessExpression( @@ -47569,7 +50554,7 @@ ${lanes.join("\n")} } function getName(node, allowComments, allowSourceMaps, emitFlags = 0, ignoreAssignedName) { const nodeName = ignoreAssignedName ? node && getNonAssignedNameOfDeclaration(node) : getNameOfDeclaration(node); - if (nodeName && isIdentifier17(nodeName) && !isGeneratedIdentifier(nodeName)) { + if (nodeName && isIdentifier21(nodeName) && !isGeneratedIdentifier(nodeName)) { const name = setParent(setTextRange(cloneNode(nodeName), nodeName), nodeName.parent); emitFlags |= getEmitFlags(nodeName); if (!allowSourceMaps) emitFlags |= 96; @@ -47627,7 +50612,7 @@ ${lanes.join("\n")} return copyCustomPrologue(source, target, offset, visitor); } function isUseStrictPrologue2(node) { - return isStringLiteral10(node.expression) && node.expression.text === "use strict"; + return isStringLiteral12(node.expression) && node.expression.text === "use strict"; } function createUseStrictPrologue() { return startOnNewLine(createExpressionStatement(createStringLiteral("use strict"))); @@ -47735,10 +50720,10 @@ ${lanes.join("\n")} } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature2(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression4(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction5(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement8(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration2(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration3(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration2(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration2(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration5(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment2(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature3(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration2(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression5(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction6(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement10(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration3(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration5(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration2(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration2(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration6(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment3(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration2(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node); } function replaceDecoratorsAndModifiers(node, modifierArray) { - return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration3(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); + return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration5(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); } function replacePropertyName(node, name) { switch (node.kind) { @@ -47898,7 +50883,7 @@ ${lanes.join("\n")} return tokenValue; } function propagateNameFlags(node) { - return node && isIdentifier17(node) ? propagateIdentifierNameFlags(node) : propagateChildFlags(node); + return node && isIdentifier21(node) ? propagateIdentifierNameFlags(node) : propagateChildFlags(node); } function propagateIdentifierNameFlags(node) { return propagateChildFlags(node) & ~67108864; @@ -48490,7 +51475,7 @@ ${lanes.join("\n")} ); } function createESDecorateClassElementAccessHasMethod(elementName) { - const propertyName = elementName.computed ? elementName.name : isIdentifier17(elementName.name) ? factory2.createStringLiteralFromNode(elementName.name) : elementName.name; + const propertyName = elementName.computed ? elementName.name : isIdentifier21(elementName.name) ? factory2.createStringLiteralFromNode(elementName.name) : elementName.name; return factory2.createPropertyAssignment( "has", factory2.createArrowFunction( @@ -49413,15 +52398,15 @@ ${lanes.join("\n")} })(name => super[name], (name, value) => super[name] = value);` }; function isCallToHelper(firstSegment, helperName) { - return isCallExpression9(firstSegment) && isIdentifier17(firstSegment.expression) && (getEmitFlags(firstSegment.expression) & 8192) !== 0 && firstSegment.expression.escapedText === helperName; + return isCallExpression12(firstSegment) && isIdentifier21(firstSegment.expression) && (getEmitFlags(firstSegment.expression) & 8192) !== 0 && firstSegment.expression.escapedText === helperName; } - function isNumericLiteral3(node) { + function isNumericLiteral4(node) { return node.kind === 9; } function isBigIntLiteral(node) { return node.kind === 10; } - function isStringLiteral10(node) { + function isStringLiteral12(node) { return node.kind === 11; } function isJsxText(node) { @@ -49430,7 +52415,7 @@ ${lanes.join("\n")} function isRegularExpressionLiteral(node) { return node.kind === 14; } - function isNoSubstitutionTemplateLiteral2(node) { + function isNoSubstitutionTemplateLiteral4(node) { return node.kind === 15; } function isTemplateHead(node) { @@ -49472,7 +52457,7 @@ ${lanes.join("\n")} function isEqualsGreaterThanToken(node) { return node.kind === 39; } - function isIdentifier17(node) { + function isIdentifier21(node) { return node.kind === 80; } function isPrivateIdentifier(node) { @@ -49532,7 +52517,7 @@ ${lanes.join("\n")} function isDecorator(node) { return node.kind === 171; } - function isPropertySignature2(node) { + function isPropertySignature3(node) { return node.kind === 172; } function isPropertyDeclaration(node) { @@ -49547,7 +52532,7 @@ ${lanes.join("\n")} function isClassStaticBlockDeclaration(node) { return node.kind === 176; } - function isConstructorDeclaration(node) { + function isConstructorDeclaration2(node) { return node.kind === 177; } function isGetAccessorDeclaration(node) { @@ -49580,7 +52565,7 @@ ${lanes.join("\n")} function isTypeQueryNode(node) { return node.kind === 187; } - function isTypeLiteralNode(node) { + function isTypeLiteralNode2(node) { return node.kind === 188; } function isArrayTypeNode2(node) { @@ -49637,7 +52622,7 @@ ${lanes.join("\n")} function isTemplateLiteralTypeNode(node) { return node.kind === 204; } - function isObjectBindingPattern(node) { + function isObjectBindingPattern2(node) { return node.kind === 207; } function isArrayBindingPattern(node) { @@ -49646,37 +52631,37 @@ ${lanes.join("\n")} function isBindingElement(node) { return node.kind === 209; } - function isArrayLiteralExpression5(node) { + function isArrayLiteralExpression7(node) { return node.kind === 210; } - function isObjectLiteralExpression6(node) { + function isObjectLiteralExpression9(node) { return node.kind === 211; } - function isPropertyAccessExpression10(node) { + function isPropertyAccessExpression12(node) { return node.kind === 212; } - function isElementAccessExpression3(node) { + function isElementAccessExpression5(node) { return node.kind === 213; } - function isCallExpression9(node) { + function isCallExpression12(node) { return node.kind === 214; } - function isNewExpression12(node) { + function isNewExpression15(node) { return node.kind === 215; } - function isTaggedTemplateExpression2(node) { + function isTaggedTemplateExpression4(node) { return node.kind === 216; } - function isTypeAssertionExpression(node) { + function isTypeAssertionExpression2(node) { return node.kind === 217; } - function isParenthesizedExpression4(node) { + function isParenthesizedExpression6(node) { return node.kind === 218; } - function isFunctionExpression4(node) { + function isFunctionExpression5(node) { return node.kind === 219; } - function isArrowFunction5(node) { + function isArrowFunction6(node) { return node.kind === 220; } function isDeleteExpression(node) { @@ -49691,25 +52676,25 @@ ${lanes.join("\n")} function isAwaitExpression(node) { return node.kind === 224; } - function isPrefixUnaryExpression2(node) { + function isPrefixUnaryExpression4(node) { return node.kind === 225; } function isPostfixUnaryExpression(node) { return node.kind === 226; } - function isBinaryExpression2(node) { + function isBinaryExpression4(node) { return node.kind === 227; } - function isConditionalExpression2(node) { + function isConditionalExpression4(node) { return node.kind === 228; } - function isTemplateExpression2(node) { + function isTemplateExpression4(node) { return node.kind === 229; } function isYieldExpression(node) { return node.kind === 230; } - function isSpreadElement3(node) { + function isSpreadElement5(node) { return node.kind === 231; } function isClassExpression(node) { @@ -49721,13 +52706,13 @@ ${lanes.join("\n")} function isExpressionWithTypeArguments(node) { return node.kind === 234; } - function isAsExpression4(node) { + function isAsExpression6(node) { return node.kind === 235; } - function isSatisfiesExpression3(node) { + function isSatisfiesExpression5(node) { return node.kind === 239; } - function isNonNullExpression2(node) { + function isNonNullExpression4(node) { return node.kind === 236; } function isMetaProperty(node) { @@ -49748,10 +52733,10 @@ ${lanes.join("\n")} function isSemicolonClassElement(node) { return node.kind === 241; } - function isBlock4(node) { + function isBlock5(node) { return node.kind === 242; } - function isVariableStatement8(node) { + function isVariableStatement10(node) { return node.kind === 244; } function isEmptyStatement(node) { @@ -49784,7 +52769,7 @@ ${lanes.join("\n")} function isBreakStatement(node) { return node.kind === 253; } - function isReturnStatement2(node) { + function isReturnStatement3(node) { return node.kind === 254; } function isWithStatement(node) { @@ -49811,10 +52796,10 @@ ${lanes.join("\n")} function isVariableDeclarationList(node) { return node.kind === 262; } - function isFunctionDeclaration2(node) { + function isFunctionDeclaration3(node) { return node.kind === 263; } - function isClassDeclaration3(node) { + function isClassDeclaration5(node) { return node.kind === 264; } function isInterfaceDeclaration2(node) { @@ -49841,7 +52826,7 @@ ${lanes.join("\n")} function isImportEqualsDeclaration(node) { return node.kind === 272; } - function isImportDeclaration5(node) { + function isImportDeclaration6(node) { return node.kind === 273; } function isImportClause(node) { @@ -49862,25 +52847,25 @@ ${lanes.join("\n")} function isImportAttribute(node) { return node.kind === 302; } - function isNamespaceImport4(node) { + function isNamespaceImport5(node) { return node.kind === 275; } function isNamespaceExport(node) { return node.kind === 281; } - function isNamedImports3(node) { + function isNamedImports4(node) { return node.kind === 276; } function isImportSpecifier(node) { return node.kind === 277; } - function isExportAssignment2(node) { + function isExportAssignment3(node) { return node.kind === 278; } - function isExportDeclaration(node) { + function isExportDeclaration2(node) { return node.kind === 279; } - function isNamedExports(node) { + function isNamedExports2(node) { return node.kind === 280; } function isExportSpecifier(node) { @@ -49949,13 +52934,13 @@ ${lanes.join("\n")} function isCatchClause(node) { return node.kind === 300; } - function isPropertyAssignment6(node) { + function isPropertyAssignment8(node) { return node.kind === 304; } - function isShorthandPropertyAssignment3(node) { + function isShorthandPropertyAssignment5(node) { return node.kind === 305; } - function isSpreadAssignment3(node) { + function isSpreadAssignment5(node) { return node.kind === 306; } function isEnumMember(node) { @@ -50283,7 +53268,7 @@ ${lanes.join("\n")} } } function createExpressionForPropertyName(factory2, memberName) { - if (isIdentifier17(memberName)) { + if (isIdentifier21(memberName)) { return factory2.createStringLiteralFromNode(memberName); } else if (isComputedPropertyName(memberName)) { return setParent(setTextRange(factory2.cloneNode(memberName.expression), memberName.expression), memberName.expression.parent); @@ -50448,7 +53433,7 @@ ${lanes.join("\n")} const temp = factory2.createTempVariable(recordTempVariable); expression = factory2.createAssignment(temp, expression); setTextRange(expression, node.operand); - let operation = isPrefixUnaryExpression2(node) ? factory2.createPrefixUnaryExpression(operator, temp) : factory2.createPostfixUnaryExpression(temp, operator); + let operation = isPrefixUnaryExpression4(node) ? factory2.createPrefixUnaryExpression(operator, temp) : factory2.createPostfixUnaryExpression(temp, operator); setTextRange(operation, node); if (resultVariable) { operation = factory2.createAssignment(resultVariable, operation); @@ -50472,7 +53457,7 @@ ${lanes.join("\n")} return (getEmitFlags(node) & 16384) !== 0; } function isUseStrictPrologue(node) { - return isStringLiteral10(node.expression) && node.expression.text === "use strict"; + return isStringLiteral12(node.expression) && node.expression.text === "use strict"; } function findUseStrictPrologue(statements) { for (const statement of statements) { @@ -50497,7 +53482,7 @@ ${lanes.join("\n")} return isCommaExpression(node) || isCommaListExpression(node); } function isJSDocTypeAssertion(node) { - return isParenthesizedExpression4(node) && isInJSFile(node) && !!getJSDocTypeTag(node); + return isParenthesizedExpression6(node) && isInJSFile(node) && !!getJSDocTypeTag(node); } function getJSDocTypeAssertionType(node) { const type = getJSDocType(node); @@ -50666,7 +53651,7 @@ ${lanes.join("\n")} } function getExternalModuleNameLiteral(factory2, importNode, sourceFile, host, resolver, compilerOptions) { const moduleName = getExternalModuleName(importNode); - if (moduleName && isStringLiteral10(moduleName)) { + if (moduleName && isStringLiteral12(moduleName)) { return tryGetModuleNameFromDeclaration(importNode, host, factory2, resolver, compilerOptions) || tryRenameExternalModule(factory2, moduleName, sourceFile) || factory2.cloneNode(moduleName); } return void 0; @@ -50694,7 +53679,7 @@ ${lanes.join("\n")} if (isDeclarationBindingElement(bindingElement)) { return bindingElement.initializer; } - if (isPropertyAssignment6(bindingElement)) { + if (isPropertyAssignment8(bindingElement)) { const initializer3 = bindingElement.initializer; return isAssignmentExpression( initializer3, @@ -50702,7 +53687,7 @@ ${lanes.join("\n")} true ) ? initializer3.right : void 0; } - if (isShorthandPropertyAssignment3(bindingElement)) { + if (isShorthandPropertyAssignment5(bindingElement)) { return bindingElement.objectAssignmentInitializer; } if (isAssignmentExpression( @@ -50712,7 +53697,7 @@ ${lanes.join("\n")} )) { return bindingElement.right; } - if (isSpreadElement3(bindingElement)) { + if (isSpreadElement5(bindingElement)) { return getInitializerOfBindingOrAssignmentElement(bindingElement.expression); } } @@ -50738,7 +53723,7 @@ ${lanes.join("\n")} )) { return getTargetOfBindingOrAssignmentElement(bindingElement.left); } - if (isSpreadElement3(bindingElement)) { + if (isSpreadElement5(bindingElement)) { return getTargetOfBindingOrAssignmentElement(bindingElement.expression); } return bindingElement; @@ -50756,7 +53741,7 @@ ${lanes.join("\n")} } function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); - Debug.assert(!!propertyName || isSpreadAssignment3(bindingElement), "Invalid property name for binding element."); + Debug.assert(!!propertyName || isSpreadAssignment5(bindingElement), "Invalid property name for binding element."); return propertyName; } function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { @@ -50808,8 +53793,8 @@ ${lanes.join("\n")} if (fullName) { let rightNode = fullName; while (true) { - if (isIdentifier17(rightNode) || !rightNode.body) { - return isIdentifier17(rightNode) ? rightNode : rightNode.name; + if (isIdentifier21(rightNode) || !rightNode.body) { + return isIdentifier21(rightNode) ? rightNode : rightNode.name; } rightNode = rightNode.body; } @@ -50835,7 +53820,7 @@ ${lanes.join("\n")} return isQuestionToken(node) || isExclamationToken(node); } function isIdentifierOrThisTypeNode(node) { - return isIdentifier17(node) || isThisTypeNode(node); + return isIdentifier21(node) || isThisTypeNode(node); } function isReadonlyKeywordOrPlusOrMinusToken(node) { return isReadonlyKeyword(node) || isPlusToken(node) || isMinusToken(node); @@ -50844,7 +53829,7 @@ ${lanes.join("\n")} return isQuestionToken(node) || isPlusToken(node) || isMinusToken(node); } function isModuleName(node) { - return isIdentifier17(node) || isStringLiteral10(node); + return isIdentifier21(node) || isStringLiteral12(node); } function isExponentiationOperator(kind) { return kind === 43; @@ -51174,7 +54159,7 @@ ${lanes.join("\n")} } } function isSyntheticParenthesizedExpression(node) { - return isParenthesizedExpression4(node) && nodeIsSynthesized(node) && !node.emitNode; + return isParenthesizedExpression6(node) && nodeIsSynthesized(node) && !node.emitNode; } function flattenCommaListWorker(node, expressions) { if (isSyntheticParenthesizedExpression(node)) { @@ -51263,7 +54248,7 @@ ${lanes.join("\n")} node, 95 /* ExportKeyword */ - ) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration5(node) || isExportAssignment2(node) || isExportDeclaration(node) ? node : void 0; + ) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration6(node) || isExportAssignment3(node) || isExportDeclaration2(node) ? node : void 0; } function getImportMetaIfNecessary(sourceFile) { return sourceFile.flags & 8388608 ? walkTreeForImportMeta(sourceFile) : void 0; @@ -52336,7 +55321,7 @@ ${lanes.join("\n")} function setExternalModuleIndicator(sourceFile) { sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile); } - function createSourceFile2(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) { + function createSourceFile5(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) { var _a3, _b; (_a3 = tracing) == null ? void 0 : _a3.push( tracing.Phase.Parse, @@ -53159,11 +56144,11 @@ ${lanes.join("\n")} } const viableKeywordSuggestions = Object.keys(textToKeywordObj).filter((keyword) => keyword.length > 2); function parseErrorForMissingSemicolonAfter(node) { - if (isTaggedTemplateExpression2(node)) { + if (isTaggedTemplateExpression4(node)) { parseErrorAt(skipTrivia(sourceText, node.template.pos), node.template.end, Diagnostics.Module_declaration_names_may_only_use_or_quoted_strings); return; } - const expressionText = isIdentifier17(node) ? idText(node) : void 0; + const expressionText = isIdentifier21(node) ? idText(node) : void 0; if (!expressionText || !isIdentifierText(expressionText, languageVersion)) { parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString( 27 @@ -53469,7 +56454,7 @@ ${lanes.join("\n")} } return createIdentifier(tokenIsIdentifierOrKeyword(token())); } - function isLiteralPropertyName() { + function isLiteralPropertyName2() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 || token() === 9 || token() === 10; } function isImportAttributeName2() { @@ -53561,10 +56546,10 @@ ${lanes.join("\n")} return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); } function canFollowModifier() { - return token() === 23 || token() === 19 || token() === 42 || token() === 26 || isLiteralPropertyName(); + return token() === 23 || token() === 19 || token() === 42 || token() === 26 || isLiteralPropertyName2(); } function canFollowGetOrSetKeyword() { - return token() === 23 || isLiteralPropertyName(); + return token() === 23 || isLiteralPropertyName2(); } function nextTokenCanFollowDefaultKeyword() { nextToken(); @@ -53587,7 +56572,7 @@ ${lanes.join("\n")} case 5: return lookAhead(isClassMemberStart) || token() === 27 && !inErrorRecovery; case 6: - return token() === 23 || isLiteralPropertyName(); + return token() === 23 || isLiteralPropertyName2(); case 12: switch (token()) { case 23: @@ -53596,12 +56581,12 @@ ${lanes.join("\n")} case 25: return true; default: - return isLiteralPropertyName(); + return isLiteralPropertyName2(); } case 18: - return isLiteralPropertyName(); + return isLiteralPropertyName2(); case 9: - return token() === 23 || token() === 26 || isLiteralPropertyName(); + return token() === 23 || token() === 26 || isLiteralPropertyName2(); case 24: return isImportAttributeName2(); case 7: @@ -54101,8 +57086,8 @@ ${lanes.join("\n")} function isMissingList(arr) { return !!arr.isMissingList; } - function parseBracketedList(kind, parseElement, open, close) { - if (parseExpected(open)) { + function parseBracketedList(kind, parseElement, open2, close) { + if (parseExpected(open2)) { const result = parseDelimitedList(kind, parseElement); parseExpected(close); return result; @@ -54773,7 +57758,7 @@ ${lanes.join("\n")} if (token() === 23) { return true; } - if (isLiteralPropertyName()) { + if (isLiteralPropertyName2()) { idToken = true; nextToken(); } @@ -56537,7 +59522,7 @@ ${lanes.join("\n")} ); return finishNode(factory2.createJsxSpreadAttribute(expression), pos); } - function parseJsxClosingElement(open, inExpressionContext) { + function parseJsxClosingElement(open2, inExpressionContext) { const pos = getNodePos(); parseExpected( 31 @@ -56551,7 +59536,7 @@ ${lanes.join("\n")} /*shouldAdvance*/ false )) { - if (inExpressionContext || !tagNamesAreEquivalent(open.tagName, tagName)) { + if (inExpressionContext || !tagNamesAreEquivalent(open2.tagName, tagName)) { nextToken(); } else { scanJsxText(); @@ -56605,13 +59590,13 @@ ${lanes.join("\n")} if (node.flags & 64) { return true; } - if (isNonNullExpression2(node)) { + if (isNonNullExpression4(node)) { let expr = node.expression; - while (isNonNullExpression2(expr) && !(expr.flags & 64)) { + while (isNonNullExpression4(expr) && !(expr.flags & 64)) { expr = expr.expression; } if (expr.flags & 64) { - while (isNonNullExpression2(node)) { + while (isNonNullExpression4(node)) { node.flags |= 64; node = node.expression; } @@ -57482,7 +60467,7 @@ ${lanes.join("\n")} let node; const hasParen = token() === 21; const expression = allowInAnd(parseExpression); - if (isIdentifier17(expression) && parseOptional( + if (isIdentifier21(expression) && parseOptional( 59 /* ColonToken */ )) { @@ -58228,7 +61213,7 @@ ${lanes.join("\n")} if (token() === 42) { return true; } - if (isLiteralPropertyName()) { + if (isLiteralPropertyName2()) { idToken = token(); nextToken(); } @@ -59788,7 +62773,7 @@ ${lanes.join("\n")} case 189: return isObjectOrObjectArrayTypeReference(node.elementType); default: - return isTypeReferenceNode3(node) && isIdentifier17(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; + return isTypeReferenceNode3(node) && isIdentifier21(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } function parseParameterOrPropertyTag(start2, tagName, target, indent3) { @@ -60104,8 +63089,8 @@ ${lanes.join("\n")} return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2); } function escapedTextsEqual(a, b) { - while (!isIdentifier17(a) || !isIdentifier17(b)) { - if (!isIdentifier17(a) && !isIdentifier17(b) && a.right.escapedText === b.right.escapedText) { + while (!isIdentifier21(a) || !isIdentifier21(b)) { + if (!isIdentifier21(a) && !isIdentifier21(b) && a.right.escapedText === b.right.escapedText) { a = a.left; b = b.left; } else { @@ -60125,7 +63110,7 @@ ${lanes.join("\n")} case 60: if (canParseTag) { const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 342 || child.kind === 349) && name && (isIdentifier17(child.name) || !escapedTextsEqual(name, child.name.left))) { + if (child && (child.kind === 342 || child.kind === 349) && name && (isIdentifier21(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } return child; @@ -62989,8 +65974,8 @@ ${lanes.join("\n")} Diagnostics.The_root_value_of_a_0_file_must_be_an_object, getBaseFileName(sourceFile.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json" )); - if (isArrayLiteralExpression5(rootExpression)) { - const firstObject = find(rootExpression.elements, isObjectLiteralExpression6); + if (isArrayLiteralExpression7(rootExpression)) { + const firstObject = find(rootExpression.elements, isObjectLiteralExpression9); if (firstObject) { return convertToJson( sourceFile, @@ -63102,7 +66087,7 @@ ${lanes.join("\n")} return void 0; } function isDoubleQuotedString(node) { - return isStringLiteral10(node) && isStringDoubleQuoted(node, sourceFile); + return isStringLiteral12(node) && isStringDoubleQuoted(node, sourceFile); } } function getCompilerOptionValueTypeString(option) { @@ -67248,7 +70233,7 @@ ${lanes.join("\n")} } let p = specifier.parent; while (p) { - if (isBlock4(p) || isModuleBlock(p) || isSourceFile(p)) { + if (isBlock5(p) || isModuleBlock(p) || isSourceFile(p)) { const statements = p.statements; let found; for (const statement of statements) { @@ -67729,7 +70714,7 @@ ${lanes.join("\n")} } else if (containerFlags & 64) { seenThisKeyword = false; bindChildren(node); - Debug.assertNotNode(node, isIdentifier17); + Debug.assertNotNode(node, isIdentifier21); node.flags = seenThisKeyword ? node.flags | 256 : node.flags & ~256; } else { bindChildren(node); @@ -68082,7 +71067,7 @@ ${lanes.join("\n")} return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node)); } function isTopLevelLogicalExpression(node) { - while (isParenthesizedExpression4(node.parent) || isPrefixUnaryExpression2(node.parent) && node.parent.operator === 54) { + while (isParenthesizedExpression6(node.parent) || isPrefixUnaryExpression4(node.parent) && node.parent.operator === 54) { node = node.parent; } return !isStatementCondition(node) && !isLogicalExpression(node.parent) && !(isOptionalChain(node.parent) && node.parent.expression === node); @@ -68541,7 +71526,7 @@ ${lanes.join("\n")} state.stackIndex--; } function maybeBind2(node) { - if (node && isBinaryExpression2(node) && !isDestructuringAssignment(node)) { + if (node && isBinaryExpression4(node) && !isDestructuringAssignment(node)) { return node; } bind(node); @@ -68736,7 +71721,7 @@ ${lanes.join("\n")} } if (node.expression.kind === 212) { const propertyAccess = node.expression; - if (isIdentifier17(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { + if (isIdentifier21(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { currentFlow = createFlowMutation(256, currentFlow, node); } } @@ -68812,7 +71797,7 @@ ${lanes.join("\n")} } function hasExportDeclarations(node) { const body = isSourceFile(node) ? node : tryCast(node.body, isModuleBlock); - return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment2(s)); + return !!body && body.statements.some((s) => isExportDeclaration2(s) || isExportAssignment3(s)); } function setExportContextFlag(node) { if (node.flags & 33554432 && !hasExportDeclarations(node)) { @@ -68975,7 +71960,7 @@ ${lanes.join("\n")} file2.symbol, declName.parent, isTopLevel, - !!findAncestor(declName, (d) => isPropertyAccessExpression10(d) && d.name.escapedText === "prototype"), + !!findAncestor(declName, (d) => isPropertyAccessExpression12(d) && d.name.escapedText === "prototype"), /*containerIsClass*/ false ); @@ -68996,7 +71981,7 @@ ${lanes.join("\n")} container = declName.parent.expression.name; break; case 5: - container = isExportsOrModuleExportsOrAlias(file2, declName.parent.expression) ? file2 : isPropertyAccessExpression10(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; + container = isExportsOrModuleExportsOrAlias(file2, declName.parent.expression) ? file2 : isPropertyAccessExpression12(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; break; case 0: return Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); @@ -69112,7 +72097,7 @@ ${lanes.join("\n")} } } function isEvalOrArgumentsIdentifier(node) { - return isIdentifier17(node) && (node.escapedText === "eval" || node.escapedText === "arguments"); + return isIdentifier21(node) && (node.escapedText === "eval" || node.escapedText === "arguments"); } function checkStrictModeEvalOrArguments(contextNode, name) { if (name && name.kind === 80) { @@ -69173,7 +72158,7 @@ ${lanes.join("\n")} } function checkStrictModeLabeledStatement(node) { if (inStrictMode && getEmitScriptTarget(options) >= 2) { - if (isDeclarationStatement(node.statement) || isVariableStatement8(node.statement)) { + if (isDeclarationStatement(node.statement) || isVariableStatement10(node.statement)) { errorOnFirstToken(node.label, Diagnostics.A_label_is_not_allowed_here); } } @@ -69336,7 +72321,7 @@ ${lanes.join("\n")} break; case 5: const expression = node.left.expression; - if (isInJSFile(node) && isIdentifier17(expression)) { + if (isInJSFile(node) && isIdentifier21(expression)) { const symbol2 = lookupSymbolForName(blockScopeContainer, expression.escapedText); if (isThisInitializedDeclaration(symbol2 == null ? void 0 : symbol2.valueDeclaration)) { bindThisPropertyAssignment(node); @@ -69753,7 +72738,7 @@ ${lanes.join("\n")} if (isEmptyObjectLiteral(assignedExpression) || container === file2 && isExportsOrModuleExportsOrAlias(file2, assignedExpression)) { return; } - if (isObjectLiteralExpression6(assignedExpression) && every(assignedExpression.properties, isShorthandPropertyAssignment3)) { + if (isObjectLiteralExpression9(assignedExpression) && every(assignedExpression.properties, isShorthandPropertyAssignment5)) { forEach(assignedExpression.properties, bindExportAssignedObjectMemberAlias); return; } @@ -69780,7 +72765,7 @@ ${lanes.join("\n")} } function bindThisPropertyAssignment(node) { Debug.assert(isInJSFile(node)); - const hasPrivateIdentifier = isBinaryExpression2(node) && isPropertyAccessExpression10(node.left) && isPrivateIdentifier(node.left.name) || isPropertyAccessExpression10(node) && isPrivateIdentifier(node.name); + const hasPrivateIdentifier = isBinaryExpression4(node) && isPropertyAccessExpression12(node.left) && isPrivateIdentifier(node.left.name) || isPropertyAccessExpression12(node) && isPrivateIdentifier(node.name); if (hasPrivateIdentifier) { return; } @@ -69795,7 +72780,7 @@ ${lanes.join("\n")} case 263: case 219: let constructorSymbol = thisContainer.symbol; - if (isBinaryExpression2(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64) { + if (isBinaryExpression4(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64) { const l = thisContainer.parent.left; if (isBindableStaticAccessExpression(l) && isPrototypeAccess(l.expression)) { constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); @@ -69973,12 +72958,12 @@ ${lanes.join("\n")} return; } const rootExpr = getLeftmostAccessExpression(node.left); - if (isIdentifier17(rootExpr) && ((_a3 = lookupSymbolForName(container, rootExpr.escapedText)) == null ? void 0 : _a3.flags) & 2097152) { + if (isIdentifier21(rootExpr) && ((_a3 = lookupSymbolForName(container, rootExpr.escapedText)) == null ? void 0 : _a3.flags) & 2097152) { return; } setParent(node.left, node); setParent(node.right, node); - if (isIdentifier17(node.left.expression) && container === file2 && isExportsOrModuleExportsOrAlias(file2, node.left.expression)) { + if (isIdentifier21(node.left.expression) && container === file2 && isExportsOrModuleExportsOrAlias(file2, node.left.expression)) { bindExportsPropertyAssignment(node); } else if (hasDynamicName(node)) { bindAnonymousDeclaration( @@ -70002,7 +72987,7 @@ ${lanes.join("\n")} } } function bindStaticPropertyAssignment(node) { - Debug.assert(!isIdentifier17(node)); + Debug.assert(!isIdentifier21(node)); setParent(node.expression, node); bindPropertyAssignment( node.expression, @@ -70050,17 +73035,17 @@ ${lanes.join("\n")} if (isFunctionLikeDeclaration(getAssignedExpandoInitializer(declaration))) { includes = 8192; excludes = 103359; - } else if (isCallExpression9(declaration) && isBindableObjectDefinePropertyCall(declaration)) { + } else if (isCallExpression12(declaration) && isBindableObjectDefinePropertyCall(declaration)) { if (some(declaration.arguments[2].properties, (p) => { const id = getNameOfDeclaration(p); - return !!id && isIdentifier17(id) && idText(id) === "set"; + return !!id && isIdentifier21(id) && idText(id) === "set"; })) { includes |= 65536 | 4; excludes |= 78783; } if (some(declaration.arguments[2].properties, (p) => { const id = getNameOfDeclaration(p); - return !!id && isIdentifier17(id) && idText(id) === "get"; + return !!id && isIdentifier21(id) && idText(id) === "get"; })) { includes |= 32768 | 4; excludes |= 46015; @@ -70080,7 +73065,7 @@ ${lanes.join("\n")} ); } function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression2(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 : propertyAccess.parent.parent.kind === 308; + return isBinaryExpression4(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 308 : propertyAccess.parent.parent.kind === 308; } function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { let namespaceSymbol = lookupSymbolForPropertyAccess(name, blockScopeContainer) || lookupSymbolForPropertyAccess(name, container); @@ -70093,25 +73078,25 @@ ${lanes.join("\n")} return true; } const node = symbol2.valueDeclaration; - if (node && isCallExpression9(node)) { + if (node && isCallExpression12(node)) { return !!getAssignedExpandoInitializer(node); } - let init = !node ? void 0 : isVariableDeclaration4(node) ? node.initializer : isBinaryExpression2(node) ? node.right : isPropertyAccessExpression10(node) && isBinaryExpression2(node.parent) ? node.parent.right : void 0; + let init = !node ? void 0 : isVariableDeclaration4(node) ? node.initializer : isBinaryExpression4(node) ? node.right : isPropertyAccessExpression12(node) && isBinaryExpression4(node.parent) ? node.parent.right : void 0; init = init && getRightMostAssignedExpression(init); if (init) { - const isPrototypeAssignment = isPrototypeAccess(isVariableDeclaration4(node) ? node.name : isBinaryExpression2(node) ? node.left : node); - return !!getExpandoInitializer(isBinaryExpression2(init) && (init.operatorToken.kind === 57 || init.operatorToken.kind === 61) ? init.right : init, isPrototypeAssignment); + const isPrototypeAssignment = isPrototypeAccess(isVariableDeclaration4(node) ? node.name : isBinaryExpression4(node) ? node.left : node); + return !!getExpandoInitializer(isBinaryExpression4(init) && (init.operatorToken.kind === 57 || init.operatorToken.kind === 61) ? init.right : init, isPrototypeAssignment); } return false; } function getParentOfBinaryExpression(expr) { - while (isBinaryExpression2(expr.parent)) { + while (isBinaryExpression4(expr.parent)) { expr = expr.parent; } return expr.parent; } function lookupSymbolForPropertyAccess(node, lookupContainer = container) { - if (isIdentifier17(node)) { + if (isIdentifier21(node)) { return lookupSymbolForName(lookupContainer, node.escapedText); } else { const symbol2 = lookupSymbolForPropertyAccess(node.expression); @@ -70121,7 +73106,7 @@ ${lanes.join("\n")} function forEachIdentifierInEntityName(e, parent3, action) { if (isExportsOrModuleExportsOrAlias(file2, e)) { return file2.symbol; - } else if (isIdentifier17(e)) { + } else if (isIdentifier21(e)) { return action(e, lookupSymbolForPropertyAccess(e), parent3); } else { const s = forEachIdentifierInEntityName(e.expression, parent3, action); @@ -70370,7 +73355,7 @@ ${lanes.join("\n")} if (reportError) { currentFlow = reportedUnreachableFlow; if (!options.allowUnreachableCode) { - const isError = unreachableCodeIsError(options) && !(node.flags & 33554432) && (!isVariableStatement8(node) || !!(getCombinedNodeFlags(node.declarationList) & 7) || node.declarationList.declarations.some((d) => !!d.initializer)); + const isError = unreachableCodeIsError(options) && !(node.flags & 33554432) && (!isVariableStatement10(node) || !!(getCombinedNodeFlags(node.declarationList) & 7) || node.declarationList.declarations.some((d) => !!d.initializer)); eachUnreachableRange(node, options, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); } } @@ -70382,7 +73367,7 @@ ${lanes.join("\n")} return node.kind === 267 && (!isEnumConst(node) || shouldPreserveConstEnums(options)); } function eachUnreachableRange(node, options, cb) { - if (isStatement(node) && isExecutableStatement(node) && isBlock4(node.parent)) { + if (isStatement(node) && isExecutableStatement(node) && isBlock5(node.parent)) { const { statements } = node.parent; const slice = sliceAfter(statements, node); getRangesWhere(slice, isExecutableStatement, (start, afterEnd) => cb(slice[start], slice[afterEnd - 1])); @@ -70390,8 +73375,8 @@ ${lanes.join("\n")} cb(node, node); } function isExecutableStatement(s) { - return !isFunctionDeclaration2(s) && !isPurelyTypeDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement8(s) && !(getCombinedNodeFlags(s) & 7) && s.declarationList.declarations.some((d) => !d.initializer)); + return !isFunctionDeclaration3(s) && !isPurelyTypeDeclaration(s) && // `var x;` may declare a variable used above + !(isVariableStatement10(s) && !(getCombinedNodeFlags(s) & 7) && s.declarationList.declarations.some((d) => !d.initializer)); } function isPurelyTypeDeclaration(s) { switch (s.kind) { @@ -70409,25 +73394,25 @@ ${lanes.join("\n")} } function isExportsOrModuleExportsOrAlias(sourceFile, node) { let i = 0; - const q = createQueue(); - q.enqueue(node); - while (!q.isEmpty() && i < 100) { + const q2 = createQueue(); + q2.enqueue(node); + while (!q2.isEmpty() && i < 100) { i++; - node = q.dequeue(); + node = q2.dequeue(); if (isExportsIdentifier(node) || isModuleExportsAccessExpression(node)) { return true; - } else if (isIdentifier17(node)) { + } else if (isIdentifier21(node)) { const symbol2 = lookupSymbolForName(sourceFile, node.escapedText); if (!!symbol2 && !!symbol2.valueDeclaration && isVariableDeclaration4(symbol2.valueDeclaration) && !!symbol2.valueDeclaration.initializer) { const init = symbol2.valueDeclaration.initializer; - q.enqueue(init); + q2.enqueue(init); if (isAssignmentExpression( init, /*excludeCompoundAssignment*/ true )) { - q.enqueue(init.left); - q.enqueue(init.right); + q2.enqueue(init.left); + q2.enqueue(init.right); } } } @@ -71118,7 +74103,7 @@ ${lanes.join("\n")} } const relative3 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName); for (const symlinkDirectory of symlinkDirectories) { - const option = resolvePath(symlinkDirectory, relative3); + const option = resolvePath2(symlinkDirectory, relative3); const result2 = cb(option, target === referenceRedirect); shouldFilterIgnoredPaths = true; if (result2) return result2; @@ -72074,8 +75059,8 @@ ${lanes.join("\n")} if (!node) { return void 0; } - const propName = escapeLeadingUnderscores(name); - const lexicallyScopedIdentifier = lookupSymbolForPrivateIdentifierDeclaration(propName, node); + const propName2 = escapeLeadingUnderscores(name); + const lexicallyScopedIdentifier = lookupSymbolForPrivateIdentifierDeclaration(propName2, node); return lexicallyScopedIdentifier ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) : void 0; }, getTypeOfPropertyOfType: (type, name) => getTypeOfPropertyOfType(type, escapeLeadingUnderscores(name)), @@ -72150,7 +75135,7 @@ ${lanes.join("\n")} return node && getTypeOfAssignmentPattern(node) || errorType; }, getPropertySymbolOfDestructuringAssignment: (locationIn) => { - const location = getParseTreeNode(locationIn, isIdentifier17); + const location = getParseTreeNode(locationIn, isIdentifier21); return location ? getPropertySymbolOfDestructuringAssignment(location) : void 0; }, signatureToString: (signature, enclosingDeclaration, flags, kind) => { @@ -72240,7 +75225,7 @@ ${lanes.join("\n")} return !!node && isValidPropertyAccess(node, escapeLeadingUnderscores(propertyName)); }, isValidPropertyAccessForCompletions: (nodeIn, type, property) => { - const node = getParseTreeNode(nodeIn, isPropertyAccessExpression10); + const node = getParseTreeNode(nodeIn, isPropertyAccessExpression12); return !!node && isValidPropertyAccessForCompletions(node, type, property); }, getSignatureFromDeclaration: (declarationIn) => { @@ -73006,10 +75991,10 @@ ${lanes.join("\n")} initializeTypeChecker(); return checker; function isDefinitelyReferenceToGlobalSymbolObject(node) { - if (!isPropertyAccessExpression10(node)) return false; - if (!isIdentifier17(node.name)) return false; - if (!isPropertyAccessExpression10(node.expression) && !isIdentifier17(node.expression)) return false; - if (isIdentifier17(node.expression)) { + if (!isPropertyAccessExpression12(node)) return false; + if (!isIdentifier21(node.name)) return false; + if (!isPropertyAccessExpression12(node.expression) && !isIdentifier21(node.expression)) return false; + if (isIdentifier21(node.expression)) { return idText(node.expression) === "Symbol" && getResolvedSymbol(node.expression) === (getGlobalSymbol( "Symbol", 111551 | 1048576, @@ -73017,7 +76002,7 @@ ${lanes.join("\n")} void 0 ) || unknownSymbol); } - if (!isIdentifier17(node.expression.expression)) return false; + if (!isIdentifier21(node.expression.expression)) return false; return idText(node.expression.name) === "Symbol" && idText(node.expression.expression) === "globalThis" && getResolvedSymbol(node.expression.expression) === globalThisSymbol; } function getCachedType(key) { @@ -73603,11 +76588,11 @@ ${lanes.join("\n")} return true; } if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { - const propName = declaration2.name; - if (isIdentifier17(propName) || isPrivateIdentifier(propName)) { + const propName2 = declaration2.name; + if (isIdentifier21(propName2) || isPrivateIdentifier(propName2)) { const type = getTypeOfSymbol(getSymbolOfDeclaration(declaration2)); const staticBlocks = filter(declaration2.parent.members, isClassStaticBlockDeclaration); - if (isPropertyInitializedInStaticBlocks(propName, type, staticBlocks, declaration2.parent.pos, current.pos)) { + if (isPropertyInitializedInStaticBlocks(propName2, type, staticBlocks, declaration2.parent.pos, current.pos)) { return true; } } @@ -73804,7 +76789,7 @@ ${lanes.join("\n")} return isString(nameArg) ? unescapeLeadingUnderscores(nameArg) : declarationNameToString(nameArg); } function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if (!isIdentifier17(errorLocation) || errorLocation.escapedText !== name || isTypeReferenceIdentifier(errorLocation) || isInTypeQuery(errorLocation)) { + if (!isIdentifier21(errorLocation) || errorLocation.escapedText !== name || isTypeReferenceIdentifier(errorLocation) || isInTypeQuery(errorLocation)) { return false; } const container = getThisContainer( @@ -73881,14 +76866,14 @@ ${lanes.join("\n")} if (symbol2) { if (isQualifiedName2(parent2)) { Debug.assert(parent2.left === errorLocation, "Should only be resolving left side of qualified name as a namespace"); - const propName = parent2.right.escapedText; - const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol2), propName); + const propName2 = parent2.right.escapedText; + const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol2), propName2); if (propType) { error210( parent2, 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, unescapeLeadingUnderscores(name), - unescapeLeadingUnderscores(propName) + unescapeLeadingUnderscores(propName2) ); return true; } @@ -73971,7 +76956,7 @@ ${lanes.join("\n")} return false; } function maybeMappedType(node, symbol2) { - const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature2(n) ? false : isTypeLiteralNode(n) || "quit"); + const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature3(n) ? false : isTypeLiteralNode2(n) || "quit"); if (container && container.members.length === 1) { const type = getDeclaredTypeOfSymbol(symbol2); return !!(type.flags & 1048576) && allTypesAssignableToKind( @@ -74083,16 +77068,16 @@ ${lanes.join("\n")} return symbol2.declarations && findLast(symbol2.declarations, isAliasSymbolDeclaration); } function isAliasSymbolDeclaration(node) { - return node.kind === 272 || node.kind === 271 || node.kind === 274 && !!node.name || node.kind === 275 || node.kind === 281 || node.kind === 277 || node.kind === 282 || node.kind === 278 && exportAssignmentIsAlias(node) || isBinaryExpression2(node) && getAssignmentDeclarationKind(node) === 2 && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression2(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 && isAliasableOrJsExpression(node.parent.right) || node.kind === 305 || node.kind === 304 && isAliasableOrJsExpression(node.initializer) || node.kind === 261 && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 209 && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); + return node.kind === 272 || node.kind === 271 || node.kind === 274 && !!node.name || node.kind === 275 || node.kind === 281 || node.kind === 277 || node.kind === 282 || node.kind === 278 && exportAssignmentIsAlias(node) || isBinaryExpression4(node) && getAssignmentDeclarationKind(node) === 2 && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression4(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 && isAliasableOrJsExpression(node.parent.right) || node.kind === 305 || node.kind === 304 && isAliasableOrJsExpression(node.initializer) || node.kind === 261 && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 209 && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); } function isAliasableOrJsExpression(e) { - return isAliasableExpression(e) || isFunctionExpression4(e) && isJSConstructor(e); + return isAliasableExpression(e) || isFunctionExpression5(e) && isJSConstructor(e); } function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { const commonJSPropertyAccess = getCommonJSPropertyAccess(node); if (commonJSPropertyAccess) { const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; - return isIdentifier17(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; + return isIdentifier21(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; } if (isVariableDeclaration4(node) || node.moduleReference.kind === 284) { const immediate = resolveExternalModuleName( @@ -74158,7 +77143,7 @@ ${lanes.join("\n")} return resolved; } function isSyntacticDefault(node) { - return isExportAssignment2(node) && !node.isExportEquals || hasSyntacticModifier( + return isExportAssignment3(node) && !node.isExportEquals || hasSyntacticModifier( node, 2048 /* Default */ @@ -74350,7 +77335,7 @@ ${lanes.join("\n")} const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find( (decl) => { var _a22, _b2; - return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a22 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a22.exports) == null ? void 0 : _b2.has( + return !!(isExportDeclaration2(decl) && decl.moduleSpecifier && ((_b2 = (_a22 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a22.exports) == null ? void 0 : _b2.has( "default" /* Default */ ))); @@ -74446,8 +77431,8 @@ ${lanes.join("\n")} var _a3; const moduleSpecifier = getExternalModuleRequireArgument(node) || node.moduleSpecifier; const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier); - const name = !isPropertyAccessExpression10(specifier) && specifier.propertyName || specifier.name; - if (!isIdentifier17(name) && name.kind !== 11) { + const name = !isPropertyAccessExpression12(specifier) && specifier.propertyName || specifier.name; + if (!isIdentifier21(name) && name.kind !== 11) { return void 0; } const nameText = moduleExportNameTextEscaped(name); @@ -74500,7 +77485,7 @@ ${lanes.join("\n")} var _a3; const moduleName = getFullyQualifiedName(moduleSymbol, node); const declarationName = declarationNameToString(name); - const suggestion = isIdentifier17(name) ? getSuggestedSymbolForNonexistentModule(name, targetSymbol) : void 0; + const suggestion = isIdentifier21(name) ? getSuggestedSymbolForNonexistentModule(name, targetSymbol) : void 0; if (suggestion !== void 0) { const suggestionName = symbolToString(suggestion); const diagnostic = error210(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); @@ -74571,7 +77556,7 @@ ${lanes.join("\n")} const commonJSPropertyAccess = getCommonJSPropertyAccess(root); const resolved = getExternalModuleMember(root, commonJSPropertyAccess || node, dontResolveAlias); const name = node.propertyName || node.name; - if (commonJSPropertyAccess && resolved && isIdentifier17(name)) { + if (commonJSPropertyAccess && resolved && isIdentifier21(name)) { return resolveSymbol(getPropertyOfType(getTypeOfSymbol(resolved), name.escapedText), dontResolveAlias); } markSymbolOfAliasDeclarationIfTypeOnly( @@ -74585,7 +77570,7 @@ ${lanes.join("\n")} return resolved; } function getCommonJSPropertyAccess(node) { - if (isVariableDeclaration4(node) && node.initializer && isPropertyAccessExpression10(node.initializer)) { + if (isVariableDeclaration4(node) && node.initializer && isPropertyAccessExpression12(node.initializer)) { return node.initializer; } } @@ -74633,7 +77618,7 @@ ${lanes.join("\n")} return resolved; } function getTargetOfExportAssignment(node, dontResolveAlias) { - const expression = isExportAssignment2(node) ? node.expression : node.right; + const expression = isExportAssignment3(node) ? node.expression : node.right; const resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); markSymbolOfAliasDeclarationIfTypeOnly( node, @@ -74666,7 +77651,7 @@ ${lanes.join("\n")} return getNodeLinks(expression).resolvedSymbol; } function getTargetOfAccessExpression(node, dontRecursivelyResolve) { - if (!(isBinaryExpression2(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64)) { + if (!(isBinaryExpression4(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64)) { return void 0; } return getTargetOfAliasLikeExpression(node.parent.right, dontRecursivelyResolve); @@ -74743,7 +77728,7 @@ ${lanes.join("\n")} } function getSymbolFlags(symbol2, excludeTypeOnlyMeanings, excludeLocalMeanings) { const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol2); - const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration); + const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration2(typeOnlyDeclaration); const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName( typeOnlyDeclaration.moduleSpecifier, typeOnlyDeclaration.moduleSpecifier, @@ -74777,7 +77762,7 @@ ${lanes.join("\n")} return flags; } function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty, exportStarDeclaration, exportStarName) { - if (!aliasDeclaration || isPropertyAccessExpression10(aliasDeclaration)) return false; + if (!aliasDeclaration || isPropertyAccessExpression12(aliasDeclaration)) return false; const sourceSymbol = getSymbolOfDeclaration(aliasDeclaration); if (isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { const links2 = getSymbolLinks(sourceSymbol); @@ -75034,13 +78019,13 @@ ${lanes.join("\n")} return getDeclarationOfJSPrototypeContainer(symbol2); } } - if (host2 && isFunctionExpression4(host2) && isPrototypePropertyAssignment(host2.parent) && isExpressionStatement(host2.parent.parent)) { + if (host2 && isFunctionExpression5(host2) && isPrototypePropertyAssignment(host2.parent) && isExpressionStatement(host2.parent.parent)) { const symbol2 = getSymbolOfDeclaration(host2.parent.left); if (symbol2) { return getDeclarationOfJSPrototypeContainer(symbol2); } } - if (host2 && (isObjectLiteralMethod(host2) || isPropertyAssignment6(host2)) && isBinaryExpression2(host2.parent.parent) && getAssignmentDeclarationKind(host2.parent.parent) === 6) { + if (host2 && (isObjectLiteralMethod(host2) || isPropertyAssignment8(host2)) && isBinaryExpression4(host2.parent.parent) && getAssignmentDeclarationKind(host2.parent.parent) === 6) { const symbol2 = getSymbolOfDeclaration(host2.parent.parent.left); if (symbol2) { return getDeclarationOfJSPrototypeContainer(symbol2); @@ -75105,7 +78090,7 @@ ${lanes.join("\n")} location.initializer, /*requireStringLiteralLikeArgument*/ true - ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, or(isImportDeclaration5, isJSDocImportTag, isExportDeclaration))) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression); + ) ? location.initializer.arguments[0] : void 0) || ((_c = findAncestor(location, isImportCall)) == null ? void 0 : _c.arguments[0]) || ((_d = findAncestor(location, or(isImportDeclaration6, isJSDocImportTag, isExportDeclaration2))) == null ? void 0 : _d.moduleSpecifier) || ((_e = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _e.moduleReference.expression); const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? host.getModeForUsageLocation(currentSourceFile, contextSpecifier) : host.getDefaultResolutionModeForFile(currentSourceFile); const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); const resolvedModule = (_f = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _f.resolvedModule; @@ -75116,7 +78101,7 @@ ${lanes.join("\n")} error210(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { - const importOrExport = ((_g = findAncestor(location, isImportDeclaration5)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_g = findAncestor(location, isImportDeclaration6)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration2)); if (errorNode && importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { error210( errorNode, @@ -75125,7 +78110,7 @@ ${lanes.join("\n")} ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const importOrExport = ((_h = findAncestor(location, isImportDeclaration5)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration6)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration2)); if (errorNode && !((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); error210(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); @@ -75175,7 +78160,7 @@ ${lanes.join("\n")} } if (errorNode && (moduleKind === 100 || moduleKind === 101)) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); - const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration5(l) || isJSDocImportTag(l)); + const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration2(l) || isImportDeclaration6(l) || isJSDocImportTag(l)); if (isSyncImport && sourceFile.impliedNodeFormat === 99 && !hasResolutionModeOverride(overrideHost)) { if (findAncestor(location, isImportEqualsDeclaration)) { error210(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); @@ -75352,7 +78337,7 @@ ${lanes.join("\n")} return symbol2; } const referenceParent = referencingLocation.parent; - const namespaceImport = isImportDeclaration5(referenceParent) && getNamespaceDeclarationNode(referenceParent); + const namespaceImport = isImportDeclaration6(referenceParent) && getNamespaceDeclarationNode(referenceParent); if (namespaceImport || isImportCall(referenceParent)) { const reference = isImportCall(referenceParent) ? referenceParent.arguments[0] : referenceParent.moduleSpecifier; const type = getTypeOfSymbol(symbol2); @@ -75648,7 +78633,7 @@ ${lanes.join("\n")} return getSymbolOfDeclaration(d.parent.parent); } } - if (isClassExpression(d) && isBinaryExpression2(d.parent) && d.parent.operatorToken.kind === 64 && isAccessExpression(d.parent.left) && isEntityNameExpression(d.parent.left.expression)) { + if (isClassExpression(d) && isBinaryExpression4(d.parent) && d.parent.operatorToken.kind === 64 && isAccessExpression(d.parent.left) && isEntityNameExpression(d.parent.left.expression)) { if (isModuleExportsAccessExpression(d.parent.left) || isExportsIdentifier(d.parent.left.expression)) { return getSymbolOfDeclaration(getSourceFileOfNode(d)); } @@ -75700,7 +78685,7 @@ ${lanes.join("\n")} function getVariableDeclarationOfObjectLiteral(symbol2, meaning) { const firstDecl = !!length(symbol2.declarations) && first(symbol2.declarations); if (meaning & 111551 && firstDecl && firstDecl.parent && isVariableDeclaration4(firstDecl.parent)) { - if (isObjectLiteralExpression6(firstDecl) && firstDecl === firstDecl.parent.initializer || isTypeLiteralNode(firstDecl) && firstDecl === firstDecl.parent.type) { + if (isObjectLiteralExpression9(firstDecl) && firstDecl === firstDecl.parent.initializer || isTypeLiteralNode2(firstDecl) && firstDecl === firstDecl.parent.type) { return getSymbolOfDeclaration(firstDecl.parent); } } @@ -76198,7 +79183,7 @@ ${lanes.join("\n")} ) && // import clause without export isDeclarationVisible(anyImportSyntax.parent)) { return addVisibleAlias(declaration, anyImportSyntax); - } else if (isVariableDeclaration4(declaration) && isVariableStatement8(declaration.parent.parent) && !hasSyntacticModifier( + } else if (isVariableDeclaration4(declaration) && isVariableStatement10(declaration.parent.parent) && !hasSyntacticModifier( declaration.parent.parent, 32 /* Export */ @@ -76212,7 +79197,7 @@ ${lanes.join("\n")} ) && isDeclarationVisible(declaration.parent)) { return addVisibleAlias(declaration, declaration); } else if (isBindingElement(declaration)) { - if (symbol2.flags & 2097152 && isInJSFile(declaration) && ((_a3 = declaration.parent) == null ? void 0 : _a3.parent) && isVariableDeclaration4(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement8(declaration.parent.parent.parent.parent) && !hasSyntacticModifier( + if (symbol2.flags & 2097152 && isInJSFile(declaration) && ((_a3 = declaration.parent) == null ? void 0 : _a3.parent) && isVariableDeclaration4(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement10(declaration.parent.parent.parent.parent) && !hasSyntacticModifier( declaration.parent.parent.parent.parent, 32 /* Export */ @@ -76530,7 +79515,7 @@ ${lanes.join("\n")} }, getJsDocPropertyOverride(syntacticContext, jsDocTypeLiteral, jsDocProperty) { const context = syntacticContext; - const name = isIdentifier17(jsDocProperty.name) ? jsDocProperty.name : jsDocProperty.name.right; + const name = isIdentifier21(jsDocProperty.name) ? jsDocProperty.name : jsDocProperty.name.right; const typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode2(context, jsDocTypeLiteral), name.escapedText); const overrideTypeNode = typeViaParent && jsDocProperty.typeExpression && getTypeFromTypeNode2(context, jsDocProperty.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : void 0; return overrideTypeNode; @@ -76559,10 +79544,10 @@ ${lanes.join("\n")} trackComputedName(context, accessExpression) { trackComputedName(accessExpression, context.enclosingDeclaration, context); }, - getModuleSpecifierOverride(syntacticContext, parent2, lit) { + getModuleSpecifierOverride(syntacticContext, parent2, lit2) { const context = syntacticContext; - if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit)) { - let name = lit.text; + if (context.bundled || context.enclosingFile !== getSourceFileOfNode(lit2)) { + let name = lit2.text; const originalName = name; const nodeSymbol = getNodeLinks(parent2).resolvedSymbol; const meaning = parent2.isTypeOf ? 111551 : 788968; @@ -77528,7 +80513,7 @@ ${lanes.join("\n")} const isInstanceType = isClassInstanceSide(type2) ? 788968 : 111551; if (isJSConstructor(symbol2.valueDeclaration)) { return symbolToTypeNode(symbol2, context, isInstanceType); - } else if (!forceExpansion && (symbol2.flags & 32 && !forceClassExpansion && !getBaseTypeVariableOfClass(symbol2) && !(symbol2.valueDeclaration && isClassLike(symbol2.valueDeclaration) && context.flags & 2048 && (!isClassDeclaration3(symbol2.valueDeclaration) || isSymbolAccessible( + } else if (!forceExpansion && (symbol2.flags & 32 && !forceClassExpansion && !getBaseTypeVariableOfClass(symbol2) && !(symbol2.valueDeclaration && isClassLike(symbol2.valueDeclaration) && context.flags & 2048 && (!isClassDeclaration5(symbol2.valueDeclaration) || isSymbolAccessible( symbol2, context.enclosingDeclaration, isInstanceType, @@ -77834,7 +80819,7 @@ ${lanes.join("\n")} let typeArguments = root.typeArguments; let qualifier = root.qualifier; if (qualifier) { - if (isIdentifier17(qualifier)) { + if (isIdentifier21(qualifier)) { if (typeArguments !== getIdentifierTypeArguments(qualifier)) { qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments); } @@ -77860,7 +80845,7 @@ ${lanes.join("\n")} } else { let typeArguments = root.typeArguments; let typeName = root.typeName; - if (isIdentifier17(typeName)) { + if (isIdentifier21(typeName)) { if (typeArguments !== getIdentifierTypeArguments(typeName)) { typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments); } @@ -77884,7 +80869,7 @@ ${lanes.join("\n")} function getAccessStack(ref) { let state = ref.typeName; const ids = []; - while (!isIdentifier17(state)) { + while (!isIdentifier21(state)) { ids.unshift(state.right); state = state.left; } @@ -77916,7 +80901,7 @@ ${lanes.join("\n")} /* ReadonlyKeyword */ )] : void 0, e.name, - (isPropertySignature2(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken( + (isPropertySignature3(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken( 58 /* QuestionToken */ ) : void 0, @@ -78043,9 +81028,9 @@ ${lanes.join("\n")} if (propertySymbol.declarations) { const decl = first(propertySymbol.declarations); if (hasLateBindableName(decl)) { - if (isBinaryExpression2(decl)) { + if (isBinaryExpression4(decl)) { const name = getNameOfDeclaration(decl); - if (name && isElementAccessExpression3(name) && isPropertyAccessEntityNameExpression(name.argumentExpression)) { + if (name && isElementAccessExpression5(name) && isPropertyAccessEntityNameExpression(name.argumentExpression)) { trackComputedName(name.argumentExpression, saveEnclosingDeclaration, context); } } else { @@ -78210,7 +81195,7 @@ ${lanes.join("\n")} /* JSDocPropertyTag */ ); if (jsdocPropertyTag) { - const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment); + const commentText = getTextOfJSDocComment2(jsdocPropertyTag.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); } @@ -78410,7 +81395,7 @@ ${lanes.join("\n")} modifiers, /*asteriskToken*/ void 0, - (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier17) : factory.createIdentifier(""), + (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier21) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, @@ -78420,7 +81405,7 @@ ${lanes.join("\n")} modifiers, /*asteriskToken*/ void 0, - (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier17) : factory.createIdentifier(""), + (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier21) : factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, @@ -78552,7 +81537,7 @@ ${lanes.join("\n")} } else if (context.enclosingDeclaration.parent && getNodeLinks(context.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === kind) { existingFakeScope = context.enclosingDeclaration.parent; } - Debug.assertOptionalNode(existingFakeScope, isBlock4); + Debug.assertOptionalNode(existingFakeScope, isBlock5); const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable(); let newLocals; let oldLocals; @@ -78935,10 +81920,10 @@ ${lanes.join("\n")} const parentSymbol = symbol2; const nextSymbol = chain[index + 1]; if (getCheckFlags(nextSymbol) & 1) { - const params = getTypeParametersOfClassOrInterface( + const params2 = getTypeParametersOfClassOrInterface( parentSymbol.flags & 2097152 ? resolveAlias(parentSymbol) : parentSymbol ); - typeParameterNodes = mapToTypeNodes(map2(params, (t) => getMappedType(t, nextSymbol.links.mapper)), context); + typeParameterNodes = mapToTypeNodes(map2(params2, (t) => getMappedType(t, nextSymbol.links.mapper)), context); } else { typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol2, context); } @@ -79069,22 +82054,22 @@ ${lanes.join("\n")} } } } - const lit = factory.createLiteralTypeNode(factory.createStringLiteral(specifier)); + const lit2 = factory.createLiteralTypeNode(factory.createStringLiteral(specifier)); context.approximateLength += specifier.length + 10; if (!nonRootParts || isEntityName(nonRootParts)) { if (nonRootParts) { - const lastId = isIdentifier17(nonRootParts) ? nonRootParts : nonRootParts.right; + const lastId = isIdentifier21(nonRootParts) ? nonRootParts : nonRootParts.right; setIdentifierTypeArguments( lastId, /*typeArguments*/ void 0 ); } - return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf); + return factory.createImportTypeNode(lit2, attributes, nonRootParts, typeParameterNodes, isTypeOf); } else { const splitNode = getTopmostIndexedAccessType(nonRootParts); const qualifier = splitNode.objectType.typeName; - return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); + return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit2, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); } } const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0); @@ -79094,7 +82079,7 @@ ${lanes.join("\n")} if (isTypeOf) { return factory.createTypeQueryNode(entityName); } else { - const lastId = isIdentifier17(entityName) ? entityName : entityName.right; + const lastId = isIdentifier21(entityName) ? entityName : entityName.right; const lastTypeArgs = getIdentifierTypeArguments(lastId); setIdentifierTypeArguments( lastId, @@ -79321,15 +82306,15 @@ ${lanes.join("\n")} const type = checkExpression(name.expression); return !!(type.flags & 402653316); } - if (isElementAccessExpression3(name)) { + if (isElementAccessExpression5(name)) { const type = checkExpression(name.argumentExpression); return !!(type.flags & 402653316); } - return isStringLiteral10(name); + return isStringLiteral12(name); } function isSingleQuotedStringNamed(d) { const name = getNameOfDeclaration(d); - return !!(name && isStringLiteral10(name) && (name.singleQuote || !nodeIsSynthesized(name) && startsWith(getTextOfNode( + return !!(name && isStringLiteral12(name) && (name.singleQuote || !nodeIsSynthesized(name) && startsWith(getTextOfNode( name, /*includeTrivia*/ false @@ -79463,7 +82448,7 @@ ${lanes.join("\n")} if (!annotatedDeclaration) { return false; } - if ((isPropertySignature2(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) { + if ((isPropertySignature3(annotatedDeclaration) || isPropertyDeclaration(annotatedDeclaration)) && annotatedDeclaration.questionToken) { return getTypeWithFacts( type, 524288 @@ -79760,16 +82745,16 @@ ${lanes.join("\n")} return !!node && node.kind === 80; } function getNamesOfDeclaration(statement) { - if (isVariableStatement8(statement)) { + if (isVariableStatement10(statement)) { return filter(map2(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined); } return filter([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined); } function flattenExportAssignedNamespace(statements) { - const exportAssignment = find(statements, isExportAssignment2); + const exportAssignment = find(statements, isExportAssignment3); const nsIndex = findIndex(statements, isModuleDeclaration); let ns = nsIndex !== -1 ? statements[nsIndex] : void 0; - if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier17(exportAssignment.expression) && isIdentifier17(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) { + if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier21(exportAssignment.expression) && isIdentifier21(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) { const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 32)); const name = ns.name; let body = ns.body; @@ -79808,7 +82793,7 @@ ${lanes.join("\n")} s, 32 /* Export */ - ) || isExportAssignment2(s) || isExportDeclaration(s)); + ) || isExportAssignment3(s) || isExportDeclaration2(s)); forEach(body.statements, (s) => { addResult( s, @@ -79822,9 +82807,9 @@ ${lanes.join("\n")} return statements; } function mergeExportDeclarations(statements) { - const exports2 = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); + const exports2 = filter(statements, (d) => isExportDeclaration2(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports2(d.exportClause)); if (length(exports2) > 1) { - const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause); + const nonExports = filter(statements, (d) => !isExportDeclaration2(d) || !!d.moduleSpecifier || !d.exportClause); statements = [ ...nonExports, factory.createExportDeclaration( @@ -79832,15 +82817,15 @@ ${lanes.join("\n")} void 0, /*isTypeOnly*/ false, - factory.createNamedExports(flatMap(exports2, (e) => cast(e.exportClause, isNamedExports).elements)), + factory.createNamedExports(flatMap(exports2, (e) => cast(e.exportClause, isNamedExports2).elements)), /*moduleSpecifier*/ void 0 ) ]; } - const reexports = filter(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); + const reexports = filter(statements, (d) => isExportDeclaration2(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports2(d.exportClause)); if (length(reexports) > 1) { - const groups = group(reexports, (decl) => isStringLiteral10(decl.moduleSpecifier) ? ">" + decl.moduleSpecifier.text : ">"); + const groups = group(reexports, (decl) => isStringLiteral12(decl.moduleSpecifier) ? ">" + decl.moduleSpecifier.text : ">"); if (groups.length !== reexports.length) { for (const group2 of groups) { if (group2.length > 1) { @@ -79851,7 +82836,7 @@ ${lanes.join("\n")} void 0, /*isTypeOnly*/ false, - factory.createNamedExports(flatMap(group2, (e) => cast(e.exportClause, isNamedExports).elements)), + factory.createNamedExports(flatMap(group2, (e) => cast(e.exportClause, isNamedExports2).elements)), group2[0].moduleSpecifier ) ]; @@ -79862,7 +82847,7 @@ ${lanes.join("\n")} return statements; } function inlineExportModifiers(statements) { - const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause)); + const index = findIndex(statements, (d) => isExportDeclaration2(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports2(d.exportClause)); if (index >= 0) { const exportDecl = statements[index]; const replacements = mapDefined(exportDecl.exportClause.elements, (e) => { @@ -80016,8 +83001,8 @@ ${lanes.join("\n")} if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { textRange = textRange.parent.parent; } - const propertyAccessRequire = (_e = symbol2.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression10); - if (propertyAccessRequire && isBinaryExpression2(propertyAccessRequire.parent) && isIdentifier17(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { + const propertyAccessRequire = (_e = symbol2.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression12); + if (propertyAccessRequire && isBinaryExpression4(propertyAccessRequire.parent) && isIdentifier21(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right; context.approximateLength += 12 + (((_g = alias == null ? void 0 : alias.escapedText) == null ? void 0 : _g.length) ?? 0); addResult( @@ -80096,7 +83081,7 @@ ${lanes.join("\n")} serializeEnum(symbol2, symbolName2, modifierFlags); } if (symbol2.flags & 32) { - if (symbol2.flags & 4 && symbol2.valueDeclaration && isBinaryExpression2(symbol2.valueDeclaration.parent) && isClassExpression(symbol2.valueDeclaration.parent.right)) { + if (symbol2.flags & 4 && symbol2.valueDeclaration && isBinaryExpression4(symbol2.valueDeclaration.parent) && isClassExpression(symbol2.valueDeclaration.parent.right)) { serializeAsAlias(symbol2, getInternalSymbolName(symbol2, symbolName2), modifierFlags); } else { serializeAsClass(symbol2, getInternalSymbolName(symbol2, symbolName2), modifierFlags); @@ -80176,7 +83161,7 @@ ${lanes.join("\n")} if (some(symbol2.declarations, isPartOfParameterDeclaration)) return; Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); getUnusedName(unescapeLeadingUnderscores(symbol2.escapedName), symbol2); - const isExternalImportAlias = !!(symbol2.flags & 2097152) && !some(symbol2.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)); + const isExternalImportAlias = !!(symbol2.flags & 2097152) && !some(symbol2.declarations, (d) => !!findAncestor(d, isExportDeclaration2) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)); deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol2), symbol2); } function isExportingScope(enclosingDeclaration2) { @@ -80190,10 +83175,10 @@ ${lanes.join("\n")} if (additionalModifierFlags & 32 && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { newModifierFlags |= 32; } - if (addingDeclare && !(newModifierFlags & 32) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432)) && (isEnumDeclaration(node) || isVariableStatement8(node) || isFunctionDeclaration2(node) || isClassDeclaration3(node) || isModuleDeclaration(node))) { + if (addingDeclare && !(newModifierFlags & 32) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432)) && (isEnumDeclaration(node) || isVariableStatement10(node) || isFunctionDeclaration3(node) || isClassDeclaration5(node) || isModuleDeclaration(node))) { newModifierFlags |= 128; } - if (additionalModifierFlags & 2048 && (isClassDeclaration3(node) || isInterfaceDeclaration2(node) || isFunctionDeclaration2(node))) { + if (additionalModifierFlags & 2048 && (isClassDeclaration5(node) || isInterfaceDeclaration2(node) || isFunctionDeclaration3(node))) { newModifierFlags |= 2048; } if (newModifierFlags) { @@ -80209,7 +83194,7 @@ ${lanes.join("\n")} const typeParams = getSymbolLinks(symbol2).typeParameters; const typeParamDecls = map2(typeParams, (p) => typeParameterToDeclaration(p, context)); const jsdocAliasDecl = (_a22 = symbol2.declarations) == null ? void 0 : _a22.find(isJSDocTypeAlias); - const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); + const commentText = getTextOfJSDocComment2(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); const restoreFlags = saveRestoreFlags(context); context.flags |= 8388608; const oldEnclosingDecl = context.enclosingDeclaration; @@ -80508,7 +83493,7 @@ ${lanes.join("\n")} } function getSignatureTextRangeLocation(signature) { if (signature.declaration && signature.declaration.parent) { - if (isBinaryExpression2(signature.declaration.parent) && getAssignmentDeclarationKind(signature.declaration.parent) === 5) { + if (isBinaryExpression4(signature.declaration.parent) && getAssignmentDeclarationKind(signature.declaration.parent) === 5) { return signature.declaration.parent; } if (isVariableDeclaration4(signature.declaration.parent) && signature.declaration.parent.parent) { @@ -80518,7 +83503,7 @@ ${lanes.join("\n")} return signature.declaration; } function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) { - const nodeFlags = isIdentifier17(localName) ? 32 : 0; + const nodeFlags = isIdentifier21(localName) ? 32 : 0; const expanding = isExpanding(context); if (length(props)) { context.approximateLength += 14; @@ -80551,7 +83536,7 @@ ${lanes.join("\n")} addingDeclare = oldAddingDeclare; const declarations = results; results = oldResults; - const defaultReplaced = map2(declarations, (d) => isExportAssignment2(d) && !d.isExportEquals && isIdentifier17(d.expression) ? factory.createExportDeclaration( + const defaultReplaced = map2(declarations, (d) => isExportAssignment3(d) && !d.isExportEquals && isIdentifier21(d.expression) ? factory.createExportDeclaration( /*modifiers*/ void 0, /*isTypeOnly*/ @@ -80601,7 +83586,7 @@ ${lanes.join("\n")} context.enclosingDeclaration = e; let expr = e.expression; if (isEntityNameExpression(expr)) { - if (isIdentifier17(expr) && idText(expr) === "") { + if (isIdentifier21(expr) && idText(expr) === "") { return cleanup( /*result*/ void 0 @@ -80725,7 +83710,7 @@ ${lanes.join("\n")} heritageClauses, [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] ), - symbol2.declarations && filter(symbol2.declarations, (d) => isClassDeclaration3(d) || isClassExpression(d))[0] + symbol2.declarations && filter(symbol2.declarations, (d) => isClassDeclaration5(d) || isClassExpression(d))[0] ), modifierFlags ); @@ -80735,15 +83720,15 @@ ${lanes.join("\n")} if (isImportSpecifier(d) || isExportSpecifier(d)) { return moduleExportNameTextUnescaped(d.propertyName || d.name); } - if (isBinaryExpression2(d) || isExportAssignment2(d)) { - const expression = isExportAssignment2(d) ? d.expression : d.right; - if (isPropertyAccessExpression10(expression)) { + if (isBinaryExpression4(d) || isExportAssignment3(d)) { + const expression = isExportAssignment3(d) ? d.expression : d.right; + if (isPropertyAccessExpression12(expression)) { return idText(expression.name); } } if (isAliasSymbolDeclaration(d)) { const name = getNameOfDeclaration(d); - if (name && isIdentifier17(name)) { + if (name && isIdentifier21(name)) { return idText(name); } } @@ -80773,7 +83758,7 @@ ${lanes.join("\n")} if (((_b = (_a22 = node.parent) == null ? void 0 : _a22.parent) == null ? void 0 : _b.kind) === 261) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; - const propertyNameText = propertyName && isIdentifier17(propertyName) ? idText(propertyName) : void 0; + const propertyNameText = propertyName && isIdentifier21(propertyName) ? idText(propertyName) : void 0; context.approximateLength += 24 + localName.length + specifier2.length + ((propertyNameText == null ? void 0 : propertyNameText.length) ?? 0); addResult( factory.createImportDeclaration( @@ -80811,7 +83796,7 @@ ${lanes.join("\n")} } break; case 261: - if (isPropertyAccessExpression10(node.initializer)) { + if (isPropertyAccessExpression12(node.initializer)) { const initializer3 = node.initializer; const uniqueName = factory.createUniqueName(localName); const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); @@ -80879,7 +83864,7 @@ ${lanes.join("\n")} case 274: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = context.bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; - const attributes = isImportDeclaration5(node.parent) ? node.parent.attributes : void 0; + const attributes = isImportDeclaration6(node.parent) ? node.parent.attributes : void 0; const isTypeOnly = isJSDocImportTag(node.parent); context.approximateLength += 14 + localName.length + 3 + (isTypeOnly ? 4 : 0); addResult( @@ -81037,7 +84022,7 @@ ${lanes.join("\n")} true ); if (target && length(target.declarations) && some(target.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(enclosingDeclaration))) { - const expr = aliasDecl && (isExportAssignment2(aliasDecl) || isBinaryExpression2(aliasDecl) ? getExportAssignmentExpression(aliasDecl) : getPropertyAssignmentAliasLikeExpression(aliasDecl)); + const expr = aliasDecl && (isExportAssignment3(aliasDecl) || isBinaryExpression4(aliasDecl) ? getExportAssignmentExpression(aliasDecl) : getPropertyAssignmentAliasLikeExpression(aliasDecl)); const first2 = expr && isEntityNameExpression(expr) ? getFirstNonModuleExportsIdentifier(expr) : void 0; const referenced = first2 && resolveEntityName( first2, @@ -81188,7 +84173,7 @@ ${lanes.join("\n")} } const flag = modifierFlags & ~1024 | (isStatic2 ? 256 : 0); const name = getPropertyNameNodeForSymbol(p, context); - const firstPropertyLikeDecl = (_a22 = p.declarations) == null ? void 0 : _a22.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration4, isPropertySignature2, isBinaryExpression2, isPropertyAccessExpression10)); + const firstPropertyLikeDecl = (_a22 = p.declarations) == null ? void 0 : _a22.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration4, isPropertySignature3, isBinaryExpression4, isPropertyAccessExpression12)); if (p.flags & 98304 && useAccessors) { const result = []; if (p.flags & 65536) { @@ -81196,10 +84181,10 @@ ${lanes.join("\n")} if (d.kind === 179) { return d; } - if (isCallExpression9(d) && isBindableObjectDefinePropertyCall(d)) { + if (isCallExpression12(d) && isBindableObjectDefinePropertyCall(d)) { return forEach(d.arguments[2].properties, (propDecl) => { const id = getNameOfDeclaration(propDecl); - if (!!id && isIdentifier17(id) && idText(id) === "set") { + if (!!id && isIdentifier21(id) && idText(id) === "set") { return propDecl; } }); @@ -81688,7 +84673,7 @@ ${lanes.join("\n")} let declaration = firstDefined(symbol2.declarations, (d) => getNameOfDeclaration(d) ? d : void 0); const name2 = declaration && getNameOfDeclaration(declaration); if (declaration && name2) { - if (isCallExpression9(declaration) && isBindableObjectDefinePropertyCall(declaration)) { + if (isCallExpression12(declaration) && isBindableObjectDefinePropertyCall(declaration)) { return symbolName(symbol2); } if (isComputedPropertyName(name2) && !(getCheckFlags(symbol2) & 4096)) { @@ -82051,9 +85036,9 @@ ${lanes.join("\n")} function getSyntheticElementAccess(node) { const parentAccess = getParentElementAccess(node); if (parentAccess && canHaveFlowNode(parentAccess) && parentAccess.flowNode) { - const propName = getDestructuringPropertyName(node); - if (propName) { - const literal2 = setTextRange(parseNodeFactory.createStringLiteral(propName), node); + const propName2 = getDestructuringPropertyName(node); + if (propName2) { + const literal2 = setTextRange(parseNodeFactory.createStringLiteral(propName2), node); const lhsExpr = isLeftHandSideExpression(parentAccess) ? parentAccess : parseNodeFactory.createParenthesizedExpression(parentAccess); const result = setTextRange(parseNodeFactory.createElementAccessExpression(lhsExpr, literal2), node); setParent(literal2, result); @@ -82224,7 +85209,7 @@ ${lanes.join("\n")} if (isBindingPattern(declaration.parent)) { return getTypeForBindingElement(declaration); } - const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature2(declaration) || isJSDocPropertyTag(declaration); + const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature3(declaration) || isJSDocPropertyTag(declaration); const isOptional = includeOptionality && isOptionalDeclaration(declaration); const declaredType = tryGetTypeFromEffectiveTypeNode(declaration); if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) { @@ -82323,11 +85308,11 @@ ${lanes.join("\n")} return void 0; } function isConstructorDeclaredProperty(symbol2) { - if (symbol2.valueDeclaration && isBinaryExpression2(symbol2.valueDeclaration)) { + if (symbol2.valueDeclaration && isBinaryExpression4(symbol2.valueDeclaration)) { const links = getSymbolLinks(symbol2); if (links.isConstructorDeclaredProperty === void 0) { links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol2) && every(symbol2.declarations, (declaration) => isBinaryExpression2(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 213 || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( + links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol2) && every(symbol2.declarations, (declaration) => isBinaryExpression4(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 213 || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( /*declaredType*/ void 0, declaration, @@ -82427,23 +85412,23 @@ ${lanes.join("\n")} if (symbol2.declarations) { let jsdocType; for (const declaration of symbol2.declarations) { - const expression = isBinaryExpression2(declaration) || isCallExpression9(declaration) ? declaration : isAccessExpression(declaration) ? isBinaryExpression2(declaration.parent) ? declaration.parent : declaration : void 0; + const expression = isBinaryExpression4(declaration) || isCallExpression12(declaration) ? declaration : isAccessExpression(declaration) ? isBinaryExpression4(declaration.parent) ? declaration.parent : declaration : void 0; if (!expression) { continue; } const kind = isAccessExpression(expression) ? getAssignmentDeclarationPropertyAccessKind(expression) : getAssignmentDeclarationKind(expression); - if (kind === 4 || isBinaryExpression2(expression) && isPossiblyAliasedThisProperty(expression, kind)) { + if (kind === 4 || isBinaryExpression4(expression) && isPossiblyAliasedThisProperty(expression, kind)) { if (isDeclarationInConstructor(expression)) { definedInConstructor = true; } else { definedInMethod = true; } } - if (!isCallExpression9(expression)) { + if (!isCallExpression12(expression)) { jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol2, declaration); } if (!jsdocType) { - (types || (types = [])).push(isBinaryExpression2(expression) || isCallExpression9(expression) ? getInitializerTypeFromAssignmentDeclaration(symbol2, resolvedSymbol, expression, kind) : neverType); + (types || (types = [])).push(isBinaryExpression4(expression) || isCallExpression12(expression) ? getInitializerTypeFromAssignmentDeclaration(symbol2, resolvedSymbol, expression, kind) : neverType); } } type = jsdocType; @@ -82478,16 +85463,16 @@ ${lanes.join("\n")} } function getJSContainerObjectType(decl, symbol2, init) { var _a3, _b; - if (!isInJSFile(decl) || !init || !isObjectLiteralExpression6(init) || init.properties.length) { + if (!isInJSFile(decl) || !init || !isObjectLiteralExpression9(init) || init.properties.length) { return void 0; } const exports2 = createSymbolTable(); - while (isBinaryExpression2(decl) || isPropertyAccessExpression10(decl)) { + while (isBinaryExpression4(decl) || isPropertyAccessExpression12(decl)) { const s2 = getSymbolOfNode(decl); if ((_a3 = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a3.size) { mergeSymbolTable(exports2, s2.exports); } - decl = isBinaryExpression2(decl) ? decl.parent : decl.parent.parent; + decl = isBinaryExpression4(decl) ? decl.parent : decl.parent.parent; } const s = getSymbolOfNode(decl); if ((_b = s == null ? void 0 : s.exports) == null ? void 0 : _b.size) { @@ -82529,7 +85514,7 @@ ${lanes.join("\n")} return declaredType; } function getInitializerTypeFromAssignmentDeclaration(symbol2, resolvedSymbol, expression, kind) { - if (isCallExpression9(expression)) { + if (isCallExpression12(expression)) { if (resolvedSymbol) { return getTypeOfSymbol(resolvedSymbol); } @@ -82557,7 +85542,7 @@ ${lanes.join("\n")} if (containsSameNamedThisProperty(expression.left, expression.right)) { return anyType; } - const isDirectExport = kind === 1 && (isPropertyAccessExpression10(expression.left) || isElementAccessExpression3(expression.left)) && (isModuleExportsAccessExpression(expression.left.expression) || isIdentifier17(expression.left.expression) && isExportsIdentifier(expression.left.expression)); + const isDirectExport = kind === 1 && (isPropertyAccessExpression12(expression.left) || isElementAccessExpression5(expression.left)) && (isModuleExportsAccessExpression(expression.left.expression) || isIdentifier21(expression.left.expression) && isExportsIdentifier(expression.left.expression)); const type = resolvedSymbol ? getTypeOfSymbol(resolvedSymbol) : isDirectExport ? getRegularTypeOfLiteralType(checkExpressionCached(expression.right)) : getWidenedLiteralType(checkExpressionCached(expression.right)); if (type.flags & 524288 && kind === 2 && symbol2.escapedName === "export=") { const exportedType = resolveStructuredTypeMembers(type); @@ -82628,7 +85613,7 @@ ${lanes.join("\n")} return type; } function containsSameNamedThisProperty(thisProperty, expression) { - return isPropertyAccessExpression10(thisProperty) && thisProperty.expression.kind === 110 && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); + return isPropertyAccessExpression12(thisProperty) && thisProperty.expression.kind === 110 && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); } function isDeclarationInConstructor(expression) { const thisContainer = getThisContainer( @@ -82644,7 +85629,7 @@ ${lanes.join("\n")} Debug.assert(types.length === declarations.length); return types.filter((_, i) => { const declaration = declarations[i]; - const expression = isBinaryExpression2(declaration) ? declaration : isBinaryExpression2(declaration.parent) ? declaration.parent : void 0; + const expression = isBinaryExpression4(declaration) ? declaration : isBinaryExpression4(declaration.parent) ? declaration.parent : void 0; return expression && isDeclarationInConstructor(expression); }); } @@ -82875,18 +85860,18 @@ ${lanes.join("\n")} let type; if (declaration.kind === 278) { type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); - } else if (isBinaryExpression2(declaration) || isInJSFile(declaration) && (isCallExpression9(declaration) || (isPropertyAccessExpression10(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression2(declaration.parent))) { + } else if (isBinaryExpression4(declaration) || isInJSFile(declaration) && (isCallExpression12(declaration) || (isPropertyAccessExpression12(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression4(declaration.parent))) { type = getWidenedTypeForAssignmentDeclaration(symbol2); - } else if (isPropertyAccessExpression10(declaration) || isElementAccessExpression3(declaration) || isIdentifier17(declaration) || isStringLiteralLike(declaration) || isNumericLiteral3(declaration) || isClassDeclaration3(declaration) || isFunctionDeclaration2(declaration) || isMethodDeclaration(declaration) && !isObjectLiteralMethod(declaration) || isMethodSignature(declaration) || isSourceFile(declaration)) { + } else if (isPropertyAccessExpression12(declaration) || isElementAccessExpression5(declaration) || isIdentifier21(declaration) || isStringLiteralLike(declaration) || isNumericLiteral4(declaration) || isClassDeclaration5(declaration) || isFunctionDeclaration3(declaration) || isMethodDeclaration(declaration) && !isObjectLiteralMethod(declaration) || isMethodSignature(declaration) || isSourceFile(declaration)) { if (symbol2.flags & (16 | 8192 | 32 | 384 | 512)) { return getTypeOfFuncClassEnumModule(symbol2); } - type = isBinaryExpression2(declaration.parent) ? getWidenedTypeForAssignmentDeclaration(symbol2) : tryGetTypeFromEffectiveTypeNode(declaration) || anyType; - } else if (isPropertyAssignment6(declaration)) { + type = isBinaryExpression4(declaration.parent) ? getWidenedTypeForAssignmentDeclaration(symbol2) : tryGetTypeFromEffectiveTypeNode(declaration) || anyType; + } else if (isPropertyAssignment8(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkPropertyAssignment(declaration); } else if (isJsxAttribute(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkJsxAttribute(declaration); - } else if (isShorthandPropertyAssignment3(declaration)) { + } else if (isShorthandPropertyAssignment5(declaration)) { type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation( declaration.name, 0 @@ -82898,7 +85883,7 @@ ${lanes.join("\n")} 0 /* Normal */ ); - } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature2(declaration) || isVariableDeclaration4(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { + } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature3(declaration) || isVariableDeclaration4(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { type = getWidenedTypeForVariableLikeDeclaration( declaration, /*reportErrors*/ @@ -83116,7 +86101,7 @@ ${lanes.join("\n")} /*dontRecursivelyResolve*/ true ); - const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment2(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); + const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment3(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); links.type ?? (links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol2.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol2.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 ? getTypeOfSymbol(targetSymbol) : errorType); if (!popTypeResolution()) { reportCircularityError(exportSymbol ?? symbol2); @@ -83257,7 +86242,7 @@ ${lanes.join("\n")} function getOuterTypeParameters(node, includeThisTypes) { while (true) { node = node.parent; - if (node && isBinaryExpression2(node)) { + if (node && isBinaryExpression4(node)) { const assignmentKind = getAssignmentDeclarationKind(node); if (assignmentKind === 6 || assignmentKind === 3) { const symbol2 = getSymbolOfDeclaration(node.left); @@ -83864,7 +86849,7 @@ ${lanes.join("\n")} continue; } const derived = symbols.get(base.escapedName); - if (!derived || derived.valueDeclaration && isBinaryExpression2(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { + if (!derived || derived.valueDeclaration && isBinaryExpression4(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { symbols.set(base.escapedName, base); symbols.set(base.escapedName, base); } @@ -83900,7 +86885,7 @@ ${lanes.join("\n")} return isLateBindableAST(node) && isTypeUsableAsIndexSignature(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(node.argumentExpression)); } function isLateBindableAST(node) { - if (!isComputedPropertyName(node) && !isElementAccessExpression3(node)) { + if (!isComputedPropertyName(node) && !isElementAccessExpression5(node)) { return false; } const expr = isComputedPropertyName(node) ? node.expression : node.argumentExpression; @@ -83944,8 +86929,8 @@ ${lanes.join("\n")} const links = getNodeLinks(decl); if (!links.resolvedSymbol) { links.resolvedSymbol = decl.symbol; - const declName = isBinaryExpression2(decl) ? decl.left : decl.name; - const type = isElementAccessExpression3(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName); + const declName = isBinaryExpression4(decl) ? decl.left : decl.name; + const type = isElementAccessExpression5(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName); if (isTypeUsableAsPropertyName(type)) { const memberName = getPropertyNameFromType(type); const symbolFlags = decl.symbol.flags; @@ -84036,7 +87021,7 @@ ${lanes.join("\n")} const decls = arrayFrom(assignments.values()); for (const member of decls) { const assignmentKind = getAssignmentDeclarationKind(member); - const isInstanceMember = assignmentKind === 3 || isBinaryExpression2(member) && isPossiblyAliasedThisProperty(member, assignmentKind) || assignmentKind === 9 || assignmentKind === 6; + const isInstanceMember = assignmentKind === 3 || isBinaryExpression4(member) && isPossiblyAliasedThisProperty(member, assignmentKind) || assignmentKind === 9 || assignmentKind === 6; if (isStatic2 === !isInstanceMember) { if (hasLateBindableName(member)) { lateBindMember(symbol2, earlySymbols, lateSymbols, member); @@ -84460,7 +87445,7 @@ ${lanes.join("\n")} const longestCount = longest === left ? leftCount : rightCount; const eitherHasEffectiveRest = hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right); const needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest); - const params = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); + const params2 = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); for (let i = 0; i < longestCount; i++) { let longestParamType = tryGetTypeAtPosition(longest, i); if (longest === right) { @@ -84482,7 +87467,7 @@ ${lanes.join("\n")} isRestParam ? 32768 : isOptional ? 16384 : 0 ); paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; - params[i] = paramSymbol; + params2[i] = paramSymbol; } if (needsExtraRestElement) { const restParamSymbol = createSymbol( @@ -84495,9 +87480,9 @@ ${lanes.join("\n")} if (shorter === right) { restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); } - params[longestCount] = restParamSymbol; + params2[longestCount] = restParamSymbol; } - return params; + return params2; } function combineSignaturesOfUnionMembers(left, right) { const typeParams = left.typeParameters || right.typeParameters; @@ -84507,8 +87492,8 @@ ${lanes.join("\n")} } let flags = (left.flags | right.flags) & (167 & ~1); const declaration = left.declaration; - const params = combineUnionParameters(left, right, paramMapper); - const lastParam = lastOrUndefined(params); + const params2 = combineUnionParameters(left, right, paramMapper); + const lastParam = lastOrUndefined(params2); if (lastParam && getCheckFlags(lastParam) & 32768) { flags |= 1; } @@ -84518,7 +87503,7 @@ ${lanes.join("\n")} declaration, typeParams, thisParam, - params, + params2, /*resolvedReturnType*/ void 0, /*resolvedTypePredicate*/ @@ -84912,8 +87897,8 @@ ${lanes.join("\n")} } function addMemberForKeyTypeWorker(keyType, propNameType) { if (isTypeUsableAsPropertyName(propNameType)) { - const propName = getPropertyNameFromType(propNameType); - const existingProp = members.get(propName); + const propName2 = getPropertyNameFromType(propNameType); + const existingProp = members.get(propName2); if (existingProp) { existingProp.links.nameType = getUnionType([existingProp.links.nameType, propNameType]); existingProp.links.keyType = getUnionType([existingProp.links.keyType, keyType]); @@ -84923,7 +87908,7 @@ ${lanes.join("\n")} const isReadonly = !!(templateModifiers & 1 || !(templateModifiers & 2) && modifiersProp && isReadonlySymbol(modifiersProp)); const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216; const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0; - const prop = createSymbol(4 | (isOptional ? 16777216 : 0), propName, lateFlag | 262144 | (isReadonly ? 8 : 0) | (stripOptional ? 524288 : 0)); + const prop = createSymbol(4 | (isOptional ? 16777216 : 0), propName2, lateFlag | 262144 | (isReadonly ? 8 : 0) | (stripOptional ? 524288 : 0)); prop.links.mappedType = type; prop.links.nameType = propNameType; prop.links.keyType = keyType; @@ -84931,7 +87916,7 @@ ${lanes.join("\n")} prop.links.syntheticOrigin = modifiersProp; prop.declarations = shouldLinkPropDeclarations ? modifiersProp.declarations : void 0; } - members.set(propName, prop); + members.set(propName2, prop); } } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 | 32)) { const indexKeyType = propNameType.flags & (1 | 4) ? stringType : propNameType.flags & (8 | 32) ? numberType : propNameType; @@ -85880,7 +88865,7 @@ ${lanes.join("\n")} for (const node of getEffectiveTypeParameterDeclarations(declaration)) { result = appendIfUnique(result, getDeclaredTypeOfTypeParameter(node.symbol)); } - return (result == null ? void 0 : result.length) ? result : isFunctionDeclaration2(declaration) ? (_a3 = getSignatureOfTypeTag(declaration)) == null ? void 0 : _a3.typeParameters : void 0; + return (result == null ? void 0 : result.length) ? result : isFunctionDeclaration3(declaration) ? (_a3 = getSignatureOfTypeTag(declaration)) == null ? void 0 : _a3.typeParameters : void 0; } function symbolsToArray(symbols) { const result = []; @@ -86034,7 +89019,7 @@ ${lanes.join("\n")} ), getTypeFromTypeNode(thisTag.typeExpression)); } const hostDeclaration = isJSDocSignature(declaration) ? getEffectiveJSDocHost(declaration) : declaration; - const classType = hostDeclaration && isConstructorDeclaration(hostDeclaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(hostDeclaration.parent.symbol)) : void 0; + const classType = hostDeclaration && isConstructorDeclaration2(hostDeclaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(hostDeclaration.parent.symbol)) : void 0; const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1; @@ -86043,7 +89028,7 @@ ${lanes.join("\n")} declaration, 64 /* Abstract */ - ) || isConstructorDeclaration(declaration) && hasSyntacticModifier( + ) || isConstructorDeclaration2(declaration) && hasSyntacticModifier( declaration.parent, 64 /* Abstract */ @@ -86154,7 +89139,7 @@ ${lanes.join("\n")} if (length(tags)) { for (const tag of tags) { const jsDocSignature = tag.typeExpression; - if (jsDocSignature.type === void 0 && !isConstructorDeclaration(decl)) { + if (jsDocSignature.type === void 0 && !isConstructorDeclaration2(decl)) { reportImplicitAny(jsDocSignature, anyType); } result.push(getSignatureFromDeclaration(jsDocSignature)); @@ -86276,7 +89261,7 @@ ${lanes.join("\n")} const typeNode = getEffectiveReturnTypeNode(declaration); if (isJSDocSignature(declaration)) { const root = getJSDocRoot(declaration); - if (root && isConstructorDeclaration(root.parent) && !typeNode) { + if (root && isConstructorDeclaration2(root.parent) && !typeNode) { return getDeclaredTypeOfClassOrInterface(getMergedSymbol(root.parent.parent.symbol)); } } @@ -86461,8 +89446,8 @@ ${lanes.join("\n")} } } } else if (hasLateBindableIndexSignature(declaration)) { - const declName = isBinaryExpression2(declaration) ? declaration.left : declaration.name; - const keyType = isElementAccessExpression3(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName); + const declName = isBinaryExpression4(declaration) ? declaration.left : declaration.name; + const keyType = isElementAccessExpression5(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName); if (findIndexInfo(indexInfos, keyType)) { continue; } @@ -86957,7 +89942,7 @@ ${lanes.join("\n")} return true; } function getIntendedTypeFromJSDocTypeReference(node) { - if (isIdentifier17(node.typeName)) { + if (isIdentifier21(node.typeName)) { const typeArgs = node.typeArguments; switch (node.typeName.escapedText) { case "String": @@ -88500,7 +91485,7 @@ ${lanes.join("\n")} if (isPrivateIdentifier(name)) { return neverType; } - if (isNumericLiteral3(name)) { + if (isNumericLiteral4(name)) { return getRegularTypeOfLiteralType(checkExpression(name)); } if (isComputedPropertyName(name)) { @@ -88752,7 +91737,7 @@ ${lanes.join("\n")} if (symbol2.flags & (16 | 8192)) { const parent2 = findAncestor(node.parent, (n) => !isAccessExpression(n)) || node.parent; if (isCallLikeExpression(parent2)) { - return isCallOrNewExpression(parent2) && isIdentifier17(node) && hasMatchingArgument(parent2, node); + return isCallOrNewExpression(parent2) && isIdentifier21(node) && hasMatchingArgument(parent2, node); } return every(symbol2.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration2(d)); } @@ -88760,16 +91745,16 @@ ${lanes.join("\n")} } function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { const accessExpression = accessNode && accessNode.kind === 213 ? accessNode : void 0; - const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); - if (propName !== void 0) { + const propName2 = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); + if (propName2 !== void 0) { if (accessFlags & 256) { - return getTypeOfPropertyOfContextualType(objectType, propName) || anyType; + return getTypeOfPropertyOfContextualType(objectType, propName2) || anyType; } - const prop = getPropertyOfType(objectType, propName); + const prop = getPropertyOfType(objectType, propName2); if (prop) { if (accessFlags & 64 && accessNode && prop.declarations && isDeprecatedSymbol(prop) && isUncalledFunctionReference(accessNode, prop)) { const deprecatedNode = (accessExpression == null ? void 0 : accessExpression.argumentExpression) ?? (isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode); - addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName); + addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName2); } if (accessExpression) { markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol)); @@ -88787,8 +91772,8 @@ ${lanes.join("\n")} const propType = accessFlags & 4 ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType; } - if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) { - const index = +propName; + if (everyType(objectType, isTupleType) && isNumericLiteralName(propName2)) { + const index = +propName2; if (accessNode && everyType(objectType, (t) => !(t.target.combinedFlags & 12)) && !(accessFlags & 16)) { const indexNode = getIndexNodeForAccessExpression(accessNode); if (isTupleType(objectType)) { @@ -88796,9 +91781,9 @@ ${lanes.join("\n")} error210(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error210(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), unescapeLeadingUnderscores(propName)); + error210(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), unescapeLeadingUnderscores(propName2)); } else { - error210(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + error210(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName2), typeToString(objectType)); } } if (index >= 0) { @@ -88860,19 +91845,19 @@ ${lanes.join("\n")} return getUnionType(append(types, undefinedType)); } } - if (objectType.symbol === globalThisSymbol && propName !== void 0 && globalThisSymbol.exports.has(propName) && globalThisSymbol.exports.get(propName).flags & 418) { - error210(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); + if (objectType.symbol === globalThisSymbol && propName2 !== void 0 && globalThisSymbol.exports.has(propName2) && globalThisSymbol.exports.get(propName2).flags & 418) { + error210(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName2), typeToString(objectType)); } else if (noImplicitAny && !(accessFlags & 128)) { - if (propName !== void 0 && typeHasStaticProperty(propName, objectType)) { + if (propName2 !== void 0 && typeHasStaticProperty(propName2, objectType)) { const typeName = typeToString(objectType); - error210(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); + error210(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName2, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); } else if (getIndexTypeOfType(objectType, numberType)) { error210(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); } else { let suggestion; - if (propName !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName, objectType))) { + if (propName2 !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName2, objectType))) { if (suggestion !== void 0) { - error210(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); + error210(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName2, typeToString(objectType), suggestion); } } else { const suggestion2 = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType); @@ -89111,9 +92096,9 @@ ${lanes.join("\n")} function indexTypeLessThan(indexType, limit) { return everyType(indexType, (t) => { if (t.flags & 384) { - const propName = getPropertyNameFromType(t); - if (isNumericLiteralName(propName)) { - const index = +propName; + const propName2 = getPropertyNameFromType(t); + if (isNumericLiteralName(propName2)) { + const index = +propName2; return index >= 0 && index < limit; } } @@ -89390,7 +92375,7 @@ ${lanes.join("\n")} return links.resolvedType; } function getIdentifierChain(node) { - if (isIdentifier17(node)) { + if (isIdentifier21(node)) { return [node]; } else { return append(getIdentifierChain(node.left), node.right); @@ -89725,15 +92710,15 @@ ${lanes.join("\n")} ); const parent2 = container && container.parent; if (parent2 && (isClassLike(parent2) || parent2.kind === 265)) { - if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { + if (!isStatic(container) && (!isConstructorDeclaration2(container) || isNodeDescendantOf(node, container.body))) { return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; } } - if (parent2 && isObjectLiteralExpression6(parent2) && isBinaryExpression2(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6) { + if (parent2 && isObjectLiteralExpression9(parent2) && isBinaryExpression4(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2.parent.left).parent).thisType; } const host2 = node.flags & 16777216 ? getHostSignatureFromJSDoc(node) : void 0; - if (host2 && isFunctionExpression4(host2) && isBinaryExpression2(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3) { + if (host2 && isFunctionExpression5(host2) && isBinaryExpression4(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3) { return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType; } if (isJSConstructor(container) && isNodeDescendantOf(node, container.body)) { @@ -90624,7 +93609,7 @@ ${lanes.join("\n")} return false; } function elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (isBlock4(node.body)) { + if (isBlock5(node.body)) { return false; } if (some(node.parameters, hasType)) { @@ -90741,7 +93726,7 @@ ${lanes.join("\n")} if (!targetPropType || targetPropType.flags & 8388608) continue; let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType); if (!sourcePropType) continue; - const propName = getPropertyNameFromIndex( + const propName2 = getPropertyNameFromIndex( nameType, /*accessNode*/ void 0 @@ -90772,8 +93757,8 @@ ${lanes.join("\n")} diagnostics.add(diag2); resultObj.errors = [diag2]; } else { - const targetIsOptional = !!(propName && (getPropertyOfType(target, propName) || unknownSymbol).flags & 16777216); - const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216); + const targetIsOptional = !!(propName2 && (getPropertyOfType(target, propName2) || unknownSymbol).flags & 16777216); + const sourceIsOptional = !!(propName2 && (getPropertyOfType(source, propName2) || unknownSymbol).flags & 16777216); targetPropType = removeMissingType(targetPropType, targetIsOptional); sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional); const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); @@ -90834,7 +93819,7 @@ ${lanes.join("\n")} if (!targetPropType) continue; let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType); if (!sourcePropType) continue; - const propName = getPropertyNameFromIndex( + const propName2 = getPropertyNameFromIndex( nameType, /*accessNode*/ void 0 @@ -90865,8 +93850,8 @@ ${lanes.join("\n")} diagnostics.add(diag2); resultObj.errors = [diag2]; } else { - const targetIsOptional = !!(propName && (getPropertyOfType(tupleOrArrayLikeTargetParts, propName) || unknownSymbol).flags & 16777216); - const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216); + const targetIsOptional = !!(propName2 && (getPropertyOfType(tupleOrArrayLikeTargetParts, propName2) || unknownSymbol).flags & 16777216); + const sourceIsOptional = !!(propName2 && (getPropertyOfType(source, propName2) || unknownSymbol).flags & 16777216); targetPropType = removeMissingType(targetPropType, targetIsOptional); sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional); const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); @@ -91047,7 +94032,7 @@ ${lanes.join("\n")} function* generateObjectLiteralElements(node) { if (!length(node.properties)) return; for (const prop of node.properties) { - if (isSpreadAssignment3(prop)) continue; + if (isSpreadAssignment5(prop)) continue; const type = getLiteralTypeFromProperty( getSymbolOfDeclaration(prop), 8576 @@ -91651,8 +94636,8 @@ ${lanes.join("\n")} secondaryRootErrors.unshift([mappedMsg, args[0], args[1]]); } else { const prefix = msg.code === Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : ""; - const params = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "..."; - path = `${prefix}${path}(${params})`; + const params2 = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "..."; + path = `${prefix}${path}(${params2})`; } break; } @@ -92028,13 +95013,13 @@ ${lanes.join("\n")} if (prop.valueDeclaration && isJsxAttribute(prop.valueDeclaration) && getSourceFileOfNode(errorNode) === getSourceFileOfNode(prop.valueDeclaration.name)) { errorNode = prop.valueDeclaration.name; } - const propName = symbolToString(prop); - const suggestionSymbol = getSuggestedSymbolForNonexistentJSXAttribute(propName, errorTarget); + const propName2 = symbolToString(prop); + const suggestionSymbol = getSuggestedSymbolForNonexistentJSXAttribute(propName2, errorTarget); const suggestion = suggestionSymbol ? symbolToString(suggestionSymbol) : void 0; if (suggestion) { - reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(errorTarget), suggestion); + reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName2, typeToString(errorTarget), suggestion); } else { - reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget)); + reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName2, typeToString(errorTarget)); } } else { const objectLiteralDeclaration = ((_a22 = source2.symbol) == null ? void 0 : _a22.declarations) && firstOrUndefined(source2.symbol.declarations); @@ -92044,7 +95029,7 @@ ${lanes.join("\n")} Debug.assertNode(propDeclaration, isObjectLiteralElementLike); const name = propDeclaration.name; errorNode = name; - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { suggestion = getSuggestionForNonexistentProperty(name, errorTarget); } } @@ -92751,10 +95736,10 @@ ${lanes.join("\n")} if (variances === emptyArray) { return 1; } - const params = getSymbolLinks(source2.aliasSymbol).typeParameters; - const minParams = getMinTypeArgumentCount(params); - const sourceTypes = fillMissingTypeArguments(source2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration)); - const targetTypes = fillMissingTypeArguments(target2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration)); + const params2 = getSymbolLinks(source2.aliasSymbol).typeParameters; + const minParams = getMinTypeArgumentCount(params2); + const sourceTypes = fillMissingTypeArguments(source2.aliasTypeArguments, params2, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration)); + const targetTypes = fillMissingTypeArguments(target2.aliasTypeArguments, params2, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration)); const varianceResult = relateVariances(sourceTypes, targetTypes, variances, intersectionState); if (varianceResult !== void 0) { return varianceResult; @@ -93461,7 +96446,7 @@ ${lanes.join("\n")} shouldSkipElaboration = true; } if (props.length === 1) { - const propName = symbolToString( + const propName2 = symbolToString( unmatchedProperty, /*enclosingDeclaration*/ void 0, @@ -93469,9 +96454,9 @@ ${lanes.join("\n")} 4 | 16 /* WriteComputedProps */ ); - reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2)); + reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName2, ...getTypeNamesForErrorDisplay(source2, target2)); if (length(unmatchedProperty.declarations)) { - associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName)); + associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName2)); } if (shouldSkipElaboration && errorInfo) { overrideNextErrorInfo++; @@ -94923,7 +97908,7 @@ ${lanes.join("\n")} break; case 170: const param = declaration; - if (isIdentifier17(param.name)) { + if (isIdentifier21(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName( param, @@ -95381,7 +98366,7 @@ ${lanes.join("\n")} mappingStack.unshift(target.symbol); target = target.type; } - const mappedSource = reduceLeft(mappingStack, (memo, value) => getStringMappingType(value, memo), source); + const mappedSource = reduceLeft(mappingStack, (memo2, value) => getStringMappingType(value, memo2), source); return mappedSource === source && isMemberOfStringMapping(source, target); } return false; @@ -95495,10 +98480,10 @@ ${lanes.join("\n")} } if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) { if (source.aliasTypeArguments) { - const params = getSymbolLinks(source.aliasSymbol).typeParameters; - const minParams = getMinTypeArgumentCount(params); - const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration)); - const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration)); + const params2 = getSymbolLinks(source.aliasSymbol).typeParameters; + const minParams = getMinTypeArgumentCount(params2); + const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params2, minParams, isInJSFile(source.aliasSymbol.valueDeclaration)); + const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params2, minParams, isInJSFile(source.aliasSymbol.valueDeclaration)); inferFromTypeArguments(sourceTypes, targetTypes, getAliasVariances(source.aliasSymbol)); } return; @@ -96265,7 +99250,7 @@ ${lanes.join("\n")} case "BigUint64Array": return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later; case "await": - if (isCallExpression9(node.parent)) { + if (isCallExpression12(node.parent)) { return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; } // falls through @@ -96293,7 +99278,7 @@ ${lanes.join("\n")} return links.resolvedSymbol; } function isInAmbientOrTypeNode(node) { - return !!(node.flags & 33554432 || findAncestor(node, (n) => isInterfaceDeclaration2(n) || isTypeAliasDeclaration2(n) || isTypeLiteralNode(n))); + return !!(node.flags & 33554432 || findAncestor(node, (n) => isInterfaceDeclaration2(n) || isTypeAliasDeclaration2(n) || isTypeLiteralNode2(n))); } function getFlowCacheKey(node, declaredType, initialType, flowContainer) { switch (node.kind) { @@ -96313,12 +99298,12 @@ ${lanes.join("\n")} return left && `${left}.${node.right.escapedText}`; case 212: case 213: - const propName = getAccessedPropertyName(node); - if (propName !== void 0) { + const propName2 = getAccessedPropertyName(node); + if (propName2 !== void 0) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - return key && `${key}.${propName}`; + return key && `${key}.${propName2}`; } - if (isElementAccessExpression3(node) && isIdentifier17(node.argumentExpression)) { + if (isElementAccessExpression5(node) && isIdentifier21(node.argumentExpression)) { const symbol2 = getResolvedSymbol(node.argumentExpression); if (isConstantVariable(symbol2) || isParameterOrMutableLocalVariable(symbol2) && !isSymbolAssigned(symbol2)) { const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); @@ -96342,7 +99327,7 @@ ${lanes.join("\n")} case 236: return isMatchingReference(source, target.expression); case 227: - return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression2(target) && target.operatorToken.kind === 28 && isMatchingReference(source, target.right); + return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression4(target) && target.operatorToken.kind === 28 && isMatchingReference(source, target.right); } switch (source.kind) { case 237: @@ -96367,7 +99352,7 @@ ${lanes.join("\n")} return targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); } } - if (isElementAccessExpression3(source) && isElementAccessExpression3(target) && isIdentifier17(source.argumentExpression) && isIdentifier17(target.argumentExpression)) { + if (isElementAccessExpression5(source) && isElementAccessExpression5(target) && isIdentifier21(source.argumentExpression) && isIdentifier21(target.argumentExpression)) { const symbol2 = getResolvedSymbol(source.argumentExpression); if (symbol2 === getResolvedSymbol(target.argumentExpression) && (isConstantVariable(symbol2) || isParameterOrMutableLocalVariable(symbol2) && !isSymbolAssigned(symbol2))) { return isMatchingReference(source.expression, target.expression); @@ -96377,15 +99362,15 @@ ${lanes.join("\n")} case 167: return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); case 227: - return isBinaryExpression2(source) && source.operatorToken.kind === 28 && isMatchingReference(source.right, target); + return isBinaryExpression4(source) && source.operatorToken.kind === 28 && isMatchingReference(source.right, target); } return false; } function getAccessedPropertyName(access) { - if (isPropertyAccessExpression10(access)) { + if (isPropertyAccessExpression12(access)) { return access.name.escapedText; } - if (isElementAccessExpression3(access)) { + if (isElementAccessExpression5(access)) { return tryGetElementAccessExpressionName(access); } if (isBindingElement(access)) { @@ -97060,7 +100045,7 @@ ${lanes.join("\n")} function isEvolvingArrayOperationTarget(node) { const root = getReferenceRoot(node); const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression10(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 214 && isIdentifier17(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); + const isLengthPushOrUnshift = isPropertyAccessExpression12(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 214 && isIdentifier21(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); const isElementAssignment = parent2.kind === 213 && parent2.expression === root && parent2.parent.kind === 227 && parent2.parent.operatorToken.kind === 64 && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind( getTypeOfExpression(parent2.argumentExpression), 296 @@ -97069,7 +100054,7 @@ ${lanes.join("\n")} return isLengthPushOrUnshift || isElementAssignment; } function isDeclarationWithExplicitTypeAnnotation(node) { - return (isVariableDeclaration4(node) || isPropertyDeclaration(node) || isPropertySignature2(node) || isParameter(node)) && !!(getEffectiveTypeAnnotationNode(node) || isInJSFile(node) && hasInitializer(node) && node.initializer && isFunctionExpressionOrArrowFunction(node.initializer) && getEffectiveReturnTypeNode(node.initializer)); + return (isVariableDeclaration4(node) || isPropertyDeclaration(node) || isPropertySignature3(node) || isParameter(node)) && !!(getEffectiveTypeAnnotationNode(node) || isInJSFile(node) && hasInitializer(node) && node.initializer && isFunctionExpressionOrArrowFunction(node.initializer) && getEffectiveReturnTypeNode(node.initializer)); } function getExplicitTypeOfSymbol(symbol2, diagnostic) { symbol2 = resolveSymbol(symbol2); @@ -97149,7 +100134,7 @@ ${lanes.join("\n")} let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (isBinaryExpression2(node)) { + if (isBinaryExpression4(node)) { const rightType = checkNonNullExpression(node.right); funcType = getSymbolHasInstanceMethodOfObjectType(rightType); } else if (node.parent.kind === 245) { @@ -97335,7 +100320,7 @@ ${lanes.join("\n")} case 80: if (!isThisInTypeQuery(node)) { const symbol2 = getResolvedSymbol(node); - return isConstantVariable(symbol2) || isParameterOrMutableLocalVariable(symbol2) && !isSymbolAssigned(symbol2) || !!symbol2.valueDeclaration && isFunctionExpression4(symbol2.valueDeclaration); + return isConstantVariable(symbol2) || isParameterOrMutableLocalVariable(symbol2) && !isSymbolAssigned(symbol2) || !!symbol2.valueDeclaration && isFunctionExpression5(symbol2.valueDeclaration); } break; case 212: @@ -97742,7 +100727,7 @@ ${lanes.join("\n")} } function getCandidateDiscriminantPropertyAccess(expr) { if (isBindingPattern(reference) || isFunctionExpressionOrArrowFunction(reference) || isObjectLiteralMethod(reference)) { - if (isIdentifier17(expr)) { + if (isIdentifier21(expr)) { const symbol2 = getResolvedSymbol(expr); const declaration = getExportSymbolOfValueSymbolIfExported(symbol2).valueDeclaration; if (declaration && (isBindingElement(declaration) || isParameter(declaration)) && reference === declaration.parent && !declaration.initializer && !declaration.dotDotDotToken) { @@ -97753,7 +100738,7 @@ ${lanes.join("\n")} if (isMatchingReference(reference, expr.expression)) { return expr; } - } else if (isIdentifier17(expr)) { + } else if (isIdentifier21(expr)) { const symbol2 = getResolvedSymbol(expr); if (isConstantVariable(symbol2)) { const declaration = symbol2.valueDeclaration; @@ -97762,7 +100747,7 @@ ${lanes.join("\n")} } if (isBindingElement(declaration) && !declaration.initializer) { const parent2 = declaration.parent.parent; - if (isVariableDeclaration4(parent2) && !parent2.type && parent2.initializer && (isIdentifier17(parent2.initializer) || isAccessExpression(parent2.initializer)) && isMatchingReference(reference, parent2.initializer)) { + if (isVariableDeclaration4(parent2) && !parent2.type && parent2.initializer && (isIdentifier21(parent2.initializer) || isAccessExpression(parent2.initializer)) && isMatchingReference(reference, parent2.initializer)) { return declaration; } } @@ -97786,8 +100771,8 @@ ${lanes.join("\n")} return void 0; } function narrowTypeByDiscriminant(type, access, narrowType2) { - const propName = getAccessedPropertyName(access); - if (propName === void 0) { + const propName2 = getAccessedPropertyName(access); + if (propName2 === void 0) { return type; } const optionalChain = isOptionalChain(access); @@ -97800,14 +100785,14 @@ ${lanes.join("\n")} type, 2097152 /* NEUndefinedOrNull */ - ) : type, propName); + ) : type, propName2); if (!propType) { return type; } propType = removeNullable && optionalChain ? getOptionalType(propType) : propType; const narrowedPropType = narrowType2(propType); return filterType(type, (t) => { - const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType; + const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName2) || unknownType; return !(discriminantType.flags & 131072) && !(narrowedPropType.flags & 131072) && areTypesComparable(narrowedPropType, discriminantType); }); } @@ -97858,9 +100843,9 @@ ${lanes.join("\n")} } return type; } - function isTypePresencePossible(type, propName, assumeTrue) { - const prop = getPropertyOfType(type, propName); - return prop ? !!(prop.flags & 16777216 || getCheckFlags(prop) & 48) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue; + function isTypePresencePossible(type, propName2, assumeTrue) { + const prop = getPropertyOfType(type, propName2); + return prop ? !!(prop.flags & 16777216 || getCheckFlags(prop) & 48) || assumeTrue : !!getApplicableIndexInfoForName(type, propName2) || !assumeTrue; } function narrowTypeByInKeyword(type, nameType, assumeTrue) { const name = getPropertyNameFromType(nameType); @@ -98297,7 +101282,7 @@ ${lanes.join("\n")} ) : neverType)); } function isMatchingConstructorReference(expr) { - return (isPropertyAccessExpression10(expr) && idText(expr.name) === "constructor" || isElementAccessExpression3(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && isMatchingReference(reference, expr.expression); + return (isPropertyAccessExpression12(expr) && idText(expr.name) === "constructor" || isElementAccessExpression5(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && isMatchingReference(reference, expr.expression); } function narrowTypeByConstructor(type, operator, identifier, assumeTrue) { if (assumeTrue ? operator !== 35 && operator !== 37 : operator !== 36 && operator !== 38) { @@ -98439,9 +101424,9 @@ ${lanes.join("\n")} return narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue); } } - if (containsMissingType(type) && isAccessExpression(reference) && isPropertyAccessExpression10(callExpression.expression)) { + if (containsMissingType(type) && isAccessExpression(reference) && isPropertyAccessExpression12(callExpression.expression)) { const callAccess = callExpression.expression; - if (isMatchingReference(reference.expression, getReferenceCandidate(callAccess.expression)) && isIdentifier17(callAccess.name) && callAccess.name.escapedText === "hasOwnProperty" && callExpression.arguments.length === 1) { + if (isMatchingReference(reference.expression, getReferenceCandidate(callAccess.expression)) && isIdentifier21(callAccess.name) && callAccess.name.escapedText === "hasOwnProperty" && callExpression.arguments.length === 1) { const argument = callExpression.arguments[0]; if (isStringLiteralLike(argument) && getAccessedPropertyName(reference) === escapeLeadingUnderscores(argument.text)) { return getTypeWithFacts( @@ -98493,7 +101478,7 @@ ${lanes.join("\n")} return type; } function narrowType(type, expr, assumeTrue) { - if (isExpressionOfOptionalChainRoot(expr) || isBinaryExpression2(expr.parent) && (expr.parent.operatorToken.kind === 61 || expr.parent.operatorToken.kind === 78) && expr.parent.left === expr) { + if (isExpressionOfOptionalChainRoot(expr) || isBinaryExpression4(expr.parent) && (expr.parent.operatorToken.kind === 61 || expr.parent.operatorToken.kind === 78) && expr.parent.left === expr) { return narrowTypeByOptionality(type, expr, assumeTrue); } switch (expr.kind) { @@ -98761,7 +101746,7 @@ ${lanes.join("\n")} )); } function hasContextualTypeWithNoGenericTypes(node, checkMode) { - const contextualType = (isIdentifier17(node) || isPropertyAccessExpression10(node) || isElementAccessExpression3(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 ? getContextualType2( + const contextualType = (isIdentifier21(node) || isPropertyAccessExpression12(node) || isElementAccessExpression5(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 ? getContextualType2( node, 8 /* SkipBindingPatterns */ @@ -98785,7 +101770,7 @@ ${lanes.join("\n")} if (parent2 === void 0) { return "quit"; } - if (isExportAssignment2(parent2)) { + if (isExportAssignment3(parent2)) { return parent2.expression === n && isEntityNameExpression(n); } if (isExportSpecifier(parent2)) { @@ -98798,7 +101783,7 @@ ${lanes.join("\n")} if (!canCollectSymbolAliasAccessabilityData) { return; } - if (location.flags & 33554432 && !isPropertySignature2(location) && !isPropertyDeclaration(location)) { + if (location.flags & 33554432 && !isPropertySignature3(location) && !isPropertyDeclaration(location)) { return; } switch (hint) { @@ -98819,9 +101804,9 @@ ${lanes.join("\n")} case 8: return markDecoratorAliasReferenced(location); case 0: { - if (isIdentifier17(location) && (isExpressionNode(location) || isShorthandPropertyAssignment3(location.parent) || isImportEqualsDeclaration(location.parent) && location.parent.moduleReference === location) && shouldMarkIdentifierAliasReferenced(location)) { + if (isIdentifier21(location) && (isExpressionNode(location) || isShorthandPropertyAssignment5(location.parent) || isImportEqualsDeclaration(location.parent) && location.parent.moduleReference === location) && shouldMarkIdentifierAliasReferenced(location)) { if (isPropertyAccessOrQualifiedName(location.parent)) { - const left = isPropertyAccessExpression10(location.parent) ? location.parent.expression : location.parent.left; + const left = isPropertyAccessExpression12(location.parent) ? location.parent.expression : location.parent.left; if (left !== location) return; } markIdentifierAliasReferenced(location); @@ -98835,7 +101820,7 @@ ${lanes.join("\n")} } return markPropertyAliasReferenced(location); } - if (isExportAssignment2(location)) { + if (isExportAssignment3(location)) { return markExportAssignmentAliasReferenced(location); } if (isJsxOpeningLikeElement(location) || isJsxOpeningFragment(location)) { @@ -98872,8 +101857,8 @@ ${lanes.join("\n")} } } function markPropertyAliasReferenced(location, propSymbol, parentType) { - const left = isPropertyAccessExpression10(location) ? location.expression : location.left; - if (isThisIdentifier(left) || !isIdentifier17(left)) { + const left = isPropertyAccessExpression12(location) ? location.expression : location.left; + if (isThisIdentifier(left) || !isIdentifier21(left)) { return; } const parentSymbol = getResolvedSymbol(left); @@ -98891,7 +101876,7 @@ ${lanes.join("\n")} } let prop = propSymbol; if (!prop && !parentType) { - const right = isPropertyAccessExpression10(location) ? location.name : location.right; + const right = isPropertyAccessExpression12(location) ? location.name : location.right; const lexicallyScopedSymbol = isPrivateIdentifier(right) && lookupSymbolForPrivateIdentifierDeclaration(right.escapedText, right); const assignmentKind = getAssignmentTargetKind(location); const apparentType = getApparentType(assignmentKind !== 0 || isMethodAccessForCall(location) ? getWidenedType(leftType) : leftType); @@ -98903,7 +101888,7 @@ ${lanes.join("\n")} return; } function markExportAssignmentAliasReferenced(location) { - if (isIdentifier17(location.expression)) { + if (isIdentifier21(location.expression)) { const id = location.expression; const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( id, @@ -99233,7 +102218,7 @@ ${lanes.join("\n")} } } getNodeLinks(container).flags |= 512; - while (container && isArrowFunction5(container)) { + while (container && isArrowFunction6(container)) { container = getContainingFunction(container); if (container) { getNodeLinks(container).flags |= 512; @@ -99338,7 +102323,7 @@ ${lanes.join("\n")} const declarationContainer = getControlFlowContainer(declaration); let flowContainer = getControlFlowContainer(node); const isOuterVariable = flowContainer !== declarationContainer; - const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment3(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); + const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment5(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); const isModuleExports = symbol2.flags & 134217728; const typeIsAutomatic = type === autoType || type === autoArrayType; const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 236; @@ -99373,14 +102358,14 @@ ${lanes.join("\n")} var _a3; const parent2 = node.parent; if (parent2) { - if (isPropertyAccessExpression10(parent2) && parent2.expression === node) { + if (isPropertyAccessExpression12(parent2) && parent2.expression === node) { return false; } if (isExportSpecifier(parent2) && parent2.isTypeOnly) { return false; } const greatGrandparent = (_a3 = parent2.parent) == null ? void 0 : _a3.parent; - if (greatGrandparent && isExportDeclaration(greatGrandparent) && greatGrandparent.isTypeOnly) { + if (greatGrandparent && isExportDeclaration2(greatGrandparent) && greatGrandparent.isTypeOnly) { return false; } } @@ -99641,15 +102626,15 @@ ${lanes.join("\n")} } } function getClassNameFromPrototypeMethod(container) { - if (container.kind === 219 && isBinaryExpression2(container.parent) && getAssignmentDeclarationKind(container.parent) === 3) { + if (container.kind === 219 && isBinaryExpression4(container.parent) && getAssignmentDeclarationKind(container.parent) === 3) { return container.parent.left.expression.expression; - } else if (container.kind === 175 && container.parent.kind === 211 && isBinaryExpression2(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6) { + } else if (container.kind === 175 && container.parent.kind === 211 && isBinaryExpression4(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6) { return container.parent.parent.left.expression; - } else if (container.kind === 219 && container.parent.kind === 304 && container.parent.parent.kind === 211 && isBinaryExpression2(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6) { + } else if (container.kind === 219 && container.parent.kind === 304 && container.parent.parent.kind === 211 && isBinaryExpression4(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6) { return container.parent.parent.parent.left.expression; - } else if (container.kind === 219 && isPropertyAssignment6(container.parent) && isIdentifier17(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression6(container.parent.parent) && isCallExpression9(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9) { + } else if (container.kind === 219 && isPropertyAssignment8(container.parent) && isIdentifier21(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression9(container.parent.parent) && isCallExpression12(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9) { return container.parent.parent.parent.arguments[0].expression; - } else if (isMethodDeclaration(container) && isIdentifier17(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression6(container.parent) && isCallExpression9(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9) { + } else if (isMethodDeclaration(container) && isIdentifier21(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression9(container.parent) && isCallExpression12(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9) { return container.parent.parent.arguments[0].expression; } } @@ -99844,7 +102829,7 @@ ${lanes.join("\n")} const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; - if (inJs && isIdentifier17(expression)) { + if (inJs && isIdentifier21(expression)) { const sourceFile = getSourceFileOfNode(parent2); if (sourceFile.commonJsModuleIndicator && getResolvedSymbol(expression) === sourceFile.symbol) { return void 0; @@ -100138,14 +103123,14 @@ ${lanes.join("\n")} if (canHaveSymbol(e) && e.symbol) { return e.symbol; } - if (isIdentifier17(e)) { + if (isIdentifier21(e)) { return getResolvedSymbol(e); } - if (isPropertyAccessExpression10(e)) { + if (isPropertyAccessExpression12(e)) { const lhsType = getTypeOfExpression(e.expression); return isPrivateIdentifier(e.name) ? tryGetPrivateIdentifierPropertyOfType(lhsType, e.name) : getPropertyOfType(lhsType, e.name.escapedText); } - if (isElementAccessExpression3(e)) { + if (isElementAccessExpression5(e)) { const propType = checkExpressionCached(e.argumentExpression); if (!isTypeUsableAsPropertyName(propType)) { return void 0; @@ -100167,7 +103152,7 @@ ${lanes.join("\n")} case 4: const lhsSymbol = getSymbolForExpression(binaryExpression.left); const decl = lhsSymbol && lhsSymbol.valueDeclaration; - if (decl && (isPropertyDeclaration(decl) || isPropertySignature2(decl))) { + if (decl && (isPropertyDeclaration(decl) || isPropertySignature3(decl))) { const overallAnnotation = getEffectiveTypeAnnotationNode(decl); return overallAnnotation && instantiateType(getTypeFromTypeNode(overallAnnotation), getSymbolLinks(lhsSymbol).mapper) || (isPropertyDeclaration(decl) ? decl.initializer && getTypeOfExpression(binaryExpression.left) : void 0); } @@ -100189,7 +103174,7 @@ ${lanes.join("\n")} const overallAnnotation = getEffectiveTypeAnnotationNode(decl2); if (overallAnnotation) { return getTypeFromTypeNode(overallAnnotation); - } else if (isIdentifier17(lhs.expression)) { + } else if (isIdentifier21(lhs.expression)) { const id = lhs.expression; const parentSymbol = resolveName( id, @@ -100236,7 +103221,7 @@ ${lanes.join("\n")} if (kind === 4) { return true; } - if (!isInJSFile(declaration) || kind !== 5 || !isIdentifier17(declaration.left.expression)) { + if (!isInJSFile(declaration) || kind !== 5 || !isIdentifier21(declaration.left.expression)) { return false; } const name = declaration.left.expression.escapedText; @@ -100396,7 +103381,7 @@ ${lanes.join("\n")} } function getContextualTypeForObjectLiteralElement(element, contextFlags) { const objectLiteral = element.parent; - const propertyAssignmentType = isPropertyAssignment6(element) && getContextualTypeForVariableLikeDeclaration(element, contextFlags); + const propertyAssignmentType = isPropertyAssignment8(element) && getContextualTypeForVariableLikeDeclaration(element, contextFlags); if (propertyAssignmentType) { return propertyAssignmentType; } @@ -100434,7 +103419,7 @@ ${lanes.join("\n")} function getSpreadIndices(elements) { let first2, last2; for (let i = 0; i < elements.length; i++) { - if (isSpreadElement3(elements[i])) { + if (isSpreadElement5(elements[i])) { first2 ?? (first2 = i); last2 = i; } @@ -100625,7 +103610,7 @@ ${lanes.join("\n")} /*noReductions*/ true ); - return apparentType.flags & 1048576 && isObjectLiteralExpression6(node) ? discriminateContextualTypeByObjectMembers(node, apparentType) : apparentType.flags & 1048576 && isJsxAttributes(node) ? discriminateContextualTypeByJSXAttributes(node, apparentType) : apparentType; + return apparentType.flags & 1048576 && isObjectLiteralExpression9(node) ? discriminateContextualTypeByObjectMembers(node, apparentType) : apparentType.flags & 1048576 && isJsxAttributes(node) ? discriminateContextualTypeByJSXAttributes(node, apparentType) : apparentType; } } function instantiateContextualType(contextualType, node, contextFlags) { @@ -100955,7 +103940,7 @@ ${lanes.join("\n")} const longestCount = longest === left ? leftCount : rightCount; const eitherHasEffectiveRest = hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right); const needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest); - const params = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); + const params2 = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); for (let i = 0; i < longestCount; i++) { let longestParamType = tryGetTypeAtPosition(longest, i); if (longest === right) { @@ -100977,7 +103962,7 @@ ${lanes.join("\n")} isRestParam ? 32768 : isOptional ? 16384 : 0 ); paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; - params[i] = paramSymbol; + params2[i] = paramSymbol; } if (needsExtraRestElement) { const restParamSymbol = createSymbol( @@ -100990,9 +103975,9 @@ ${lanes.join("\n")} if (shorter === right) { restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); } - params[longestCount] = restParamSymbol; + params2[longestCount] = restParamSymbol; } - return params; + return params2; } function combineSignaturesOfIntersectionMembers(left, right) { const typeParams = left.typeParameters || right.typeParameters; @@ -101002,8 +103987,8 @@ ${lanes.join("\n")} } let flags = (left.flags | right.flags) & (167 & ~1); const declaration = left.declaration; - const params = combineIntersectionParameters(left, right, paramMapper); - const lastParam = lastOrUndefined(params); + const params2 = combineIntersectionParameters(left, right, paramMapper); + const lastParam = lastOrUndefined(params2); if (lastParam && getCheckFlags(lastParam) & 32768) { flags |= 1; } @@ -101013,7 +103998,7 @@ ${lanes.join("\n")} declaration, typeParams, thisParam, - params, + params2, /*resolvedReturnType*/ void 0, /*resolvedTypePredicate*/ @@ -101164,7 +104149,7 @@ ${lanes.join("\n")} } function isSpreadIntoCallOrNew(node) { const parent2 = walkUpParenthesizedExpressions(node.parent); - return isSpreadElement3(parent2) && isCallOrNewExpression(parent2.parent); + return isSpreadElement5(parent2) && isCallOrNewExpression(parent2.parent); } function checkArrayLiteral(node, checkMode, forceTuple) { const elements = node.elements; @@ -101301,7 +104286,7 @@ ${lanes.join("\n")} function checkComputedPropertyName(node) { const links = getNodeLinks(node.expression); if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration2(node.parent.parent)) && isBinaryExpression2(node.expression) && node.expression.operatorToken.kind === 103 && node.parent.kind !== 178 && node.parent.kind !== 179) { + if ((isTypeLiteralNode2(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration2(node.parent.parent)) && isBinaryExpression4(node.expression) && node.expression.operatorToken.kind === 103 && node.parent.kind !== 178 && node.parent.kind !== 179) { return links.resolvedType = errorType; } links.resolvedType = checkExpression(node.expression); @@ -101606,7 +104591,7 @@ ${lanes.join("\n")} return name.includes("-"); } function isJsxIntrinsicTagName(tagName) { - return isIdentifier17(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName); + return isIdentifier21(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName); } function checkJsxAttribute(node, checkMode) { return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType; @@ -101652,7 +104637,7 @@ ${lanes.join("\n")} } if (contextualType) { const prop = getPropertyOfType(contextualType, member.escapedName); - if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier17(attributeDecl.name)) { + if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier21(attributeDecl.name)) { addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText); } } @@ -101817,19 +104802,19 @@ ${lanes.join("\n")} if (!links.resolvedSymbol) { const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node); if (!isErrorType(intrinsicElementsType)) { - if (!isIdentifier17(node.tagName) && !isJsxNamespacedName(node.tagName)) return Debug.fail(); - const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; - const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName); + if (!isIdentifier21(node.tagName) && !isJsxNamespacedName(node.tagName)) return Debug.fail(); + const propName2 = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName2); if (intrinsicProp) { links.jsxFlags |= 1; return links.resolvedSymbol = intrinsicProp; } - const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName))); + const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName2))); if (indexSymbol) { links.jsxFlags |= 2; return links.resolvedSymbol = indexSymbol; } - if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName)) { + if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName2)) { links.jsxFlags |= 2; return links.resolvedSymbol = intrinsicElementsType.symbol; } @@ -102046,8 +105031,8 @@ ${lanes.join("\n")} if (links.jsxFlags & 1) { return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol2) || errorType; } else if (links.jsxFlags & 2) { - const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; - return links.resolvedJsxElementAttributesType = ((_a3 = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a3.type) || errorType; + const propName2 = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + return links.resolvedJsxElementAttributesType = ((_a3 = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName2)) == null ? void 0 : _a3.type) || errorType; } else { return links.resolvedJsxElementAttributesType = errorType; } @@ -102080,9 +105065,9 @@ ${lanes.join("\n")} function instantiateAliasOrInterfaceWithDefaults(managedSym, inJs, ...typeArguments) { const declaredManagedType = getDeclaredTypeOfSymbol(managedSym); if (managedSym.flags & 524288) { - const params = getSymbolLinks(managedSym).typeParameters; - if (length(params) >= typeArguments.length) { - const args = fillMissingTypeArguments(typeArguments, params, typeArguments.length, inJs); + const params2 = getSymbolLinks(managedSym).typeParameters; + if (length(params2) >= typeArguments.length) { + const args = fillMissingTypeArguments(typeArguments, params2, typeArguments.length, inJs); return length(args) === 0 ? declaredManagedType : getTypeAliasInstantiation(managedSym, args); } } @@ -102177,7 +105162,7 @@ ${lanes.join("\n")} } if (isInJSFile(symbol2.valueDeclaration)) { const parent2 = symbol2.valueDeclaration.parent; - return parent2 && isBinaryExpression2(parent2) && getAssignmentDeclarationKind(parent2) === 3; + return parent2 && isBinaryExpression4(parent2) && getAssignmentDeclarationKind(parent2) === 3; } } function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { @@ -102209,7 +105194,7 @@ ${lanes.join("\n")} return false; } } - if (flags & 64 && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { + if (flags & 64 && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern2(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { @@ -102319,7 +105304,7 @@ ${lanes.join("\n")} return; } if (nodeText2 !== void 0 && nodeText2.length < 100) { - if (isIdentifier17(node) && nodeText2 === "undefined") { + if (isIdentifier21(node) && nodeText2 === "undefined") { error210(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); return; } @@ -102373,7 +105358,7 @@ ${lanes.join("\n")} if (nonNullType.flags & 16384) { if (isEntityNameExpression(node)) { const nodeText2 = entityNameToString(node); - if (isIdentifier17(node) && nodeText2 === "undefined") { + if (isIdentifier21(node) && nodeText2 === "undefined") { error210(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); return nonNullType; } @@ -102404,10 +105389,10 @@ ${lanes.join("\n")} } return isCallOrNewExpression(node.parent) && node.parent.expression === node; } - function lookupSymbolForPrivateIdentifierDeclaration(propName, location) { + function lookupSymbolForPrivateIdentifierDeclaration(propName2, location) { for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { const { symbol: symbol2 } = containingClass; - const name = getSymbolNameForPrivateIdentifier(symbol2, propName); + const name = getSymbolNameForPrivateIdentifier(symbol2, propName2); const prop = symbol2.members && symbol2.members.get(name) || symbol2.exports && symbol2.exports.get(name); if (prop) { return prop; @@ -102422,7 +105407,7 @@ ${lanes.join("\n")} if (!isExpressionNode(privId)) { return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); } - const isInOperation = isBinaryExpression2(privId.parent) && privId.parent.operatorToken.kind === 103; + const isInOperation = isBinaryExpression4(privId.parent) && privId.parent.operatorToken.kind === 103; if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId)); } @@ -102571,7 +105556,7 @@ ${lanes.join("\n")} } } else { if (isAnyLike) { - if (isIdentifier17(left) && parentSymbol) { + if (isIdentifier21(left) && parentSymbol) { markLinkedReferences( node, 2, @@ -102626,7 +105611,7 @@ ${lanes.join("\n")} if (compilerOptions.noUncheckedIndexedAccess && getAssignmentTargetKind(node) !== 1) { propType = getUnionType([propType, missingType]); } - if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression10(node)) { + if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression12(node)) { error210(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); } if (indexInfo.declaration && isDeprecatedDeclaration2(indexInfo.declaration)) { @@ -102660,7 +105645,7 @@ ${lanes.join("\n")} false, suggestion.valueDeclaration ); - return !(file2 !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression10(node) && node.expression.kind === 110 && suggestionHasNoExtendsOrDecorators); + return !(file2 !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression12(node) && node.expression.kind === 110 && suggestionHasNoExtendsOrDecorators); } } return false; @@ -102688,7 +105673,7 @@ ${lanes.join("\n")} } } } - } else if (strictNullChecks && prop && prop.valueDeclaration && isPropertyAccessExpression10(prop.valueDeclaration) && getAssignmentDeclarationPropertyAccessKind(prop.valueDeclaration) && getControlFlowContainer(node) === getControlFlowContainer(prop.valueDeclaration)) { + } else if (strictNullChecks && prop && prop.valueDeclaration && isPropertyAccessExpression12(prop.valueDeclaration) && getAssignmentDeclarationPropertyAccessKind(prop.valueDeclaration) && getControlFlowContainer(node) === getControlFlowContainer(prop.valueDeclaration)) { assumeUninitialized = true; } const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); @@ -102774,9 +105759,9 @@ ${lanes.join("\n")} } } if (typeHasStaticProperty(propNode.escapedText, containingType)) { - const propName = declarationNameToString(propNode); + const propName2 = declarationNameToString(propNode); const typeName = typeToString(containingType); - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "." + propName); + errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName2, typeName, typeName + "." + propName2); } else { const promisedType = getPromisedTypeOfPromise(containingType); if (promisedType && getPropertyOfType(promisedType, propNode.escapedText)) { @@ -102811,8 +105796,8 @@ ${lanes.join("\n")} function containerSeemsToBeEmptyDomElement(containingType) { return compilerOptions.lib && !compilerOptions.lib.includes("lib.dom.d.ts") && everyContainedType(containingType, (type) => type.symbol && /^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType); } - function typeHasStaticProperty(propName, containingType) { - const prop = containingType.symbol && getPropertyOfType(getTypeOfSymbol(containingType.symbol), propName); + function typeHasStaticProperty(propName2, containingType) { + const prop = containingType.symbol && getPropertyOfType(getTypeOfSymbol(containingType.symbol), propName2); return prop !== void 0 && !!prop.valueDeclaration && isStatic(prop.valueDeclaration); } function getSuggestedLibForNonExistentName(name) { @@ -102849,7 +105834,7 @@ ${lanes.join("\n")} let props = getPropertiesOfType(containingType); if (typeof name !== "string") { const parent2 = name.parent; - if (isPropertyAccessExpression10(parent2)) { + if (isPropertyAccessExpression12(parent2)) { props = filter(props, (prop) => isValidPropertyAccessForCompletions(parent2, containingType, prop)); } name = idText(name); @@ -103109,7 +106094,7 @@ ${lanes.join("\n")} return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node); } function callLikeExpressionMayHaveTypeArguments(node) { - return isCallOrNewExpression(node) || isTaggedTemplateExpression2(node) || isJsxOpeningLikeElement(node); + return isCallOrNewExpression(node) || isTaggedTemplateExpression4(node) || isJsxOpeningLikeElement(node); } function resolveUntypedCall(node) { if (callLikeExpressionMayHaveTypeArguments(node)) { @@ -103119,7 +106104,7 @@ ${lanes.join("\n")} checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (isBinaryExpression2(node)) { + } else if (isBinaryExpression4(node)) { checkExpression(node.left); } else if (isCallOrNewExpression(node)) { forEach(node.arguments, (argument) => { @@ -103639,7 +106624,7 @@ ${lanes.join("\n")} return void 0; } const thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && !(isNewExpression12(node) || isCallExpression9(node) && isSuperProperty(node.expression))) { + if (thisType && thisType !== voidType && !(isNewExpression15(node) || isCallExpression12(node) && isSuperProperty(node.expression))) { const thisArgumentNode = getThisArgumentOfCall(node); const thisArgumentType = getThisArgumentType(thisArgumentNode); const errorNode = reportErrors2 ? thisArgumentNode || node : void 0; @@ -103813,11 +106798,11 @@ ${lanes.join("\n")} } function getDiagnosticSpanForCallNode(node) { const sourceFile = getSourceFileOfNode(node); - const { start, length: length2 } = getErrorSpanForNode(sourceFile, isPropertyAccessExpression10(node.expression) ? node.expression.name : node.expression); + const { start, length: length2 } = getErrorSpanForNode(sourceFile, isPropertyAccessExpression12(node.expression) ? node.expression.name : node.expression); return { start, length: length2, sourceFile }; } function getDiagnosticForCallNode(node, message, ...args) { - if (isCallExpression9(node)) { + if (isCallExpression12(node)) { const { sourceFile, start, length: length2 } = getDiagnosticSpanForCallNode(node); if ("message" in message) { return createFileDiagnostic(sourceFile, start, length2, message, ...args); @@ -103832,10 +106817,10 @@ ${lanes.join("\n")} } function getErrorNodeForCallNode(callLike) { if (isCallOrNewExpression(callLike)) { - return isPropertyAccessExpression10(callLike.expression) ? callLike.expression.name : callLike.expression; + return isPropertyAccessExpression12(callLike.expression) ? callLike.expression.name : callLike.expression; } - if (isTaggedTemplateExpression2(callLike)) { - return isPropertyAccessExpression10(callLike.tag) ? callLike.tag.name : callLike.tag; + if (isTaggedTemplateExpression4(callLike)) { + return isPropertyAccessExpression12(callLike.tag) ? callLike.tag.name : callLike.tag; } if (isJsxOpeningLikeElement(callLike)) { return callLike.tagName; @@ -103843,7 +106828,7 @@ ${lanes.join("\n")} return callLike; } function isPromiseResolveArityError(node) { - if (!isCallExpression9(node) || !isIdentifier17(node.expression)) return false; + if (!isCallExpression12(node) || !isIdentifier21(node.expression)) return false; const symbol2 = resolveName( node.expression, node.expression.escapedText, @@ -103854,7 +106839,7 @@ ${lanes.join("\n")} false ); const decl = symbol2 == null ? void 0 : symbol2.valueDeclaration; - if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression12(decl.parent.parent) || !isIdentifier17(decl.parent.parent.expression)) { + if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression15(decl.parent.parent) || !isIdentifier21(decl.parent.parent.expression)) { return false; } const globalPromiseSymbol = getGlobalPromiseConstructorSymbol( @@ -104718,7 +107703,7 @@ ${lanes.join("\n")} ); } let headMessage = isCall ? Diagnostics.This_expression_is_not_callable : Diagnostics.This_expression_is_not_constructable; - if (isCallExpression9(errorTarget.parent) && errorTarget.parent.arguments.length === 0) { + if (isCallExpression12(errorTarget.parent) && errorTarget.parent.arguments.length === 0) { const { resolvedSymbol } = getNodeLinks(errorTarget); if (resolvedSymbol && resolvedSymbol.flags & 32768) { headMessage = Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without; @@ -104735,7 +107720,7 @@ ${lanes.join("\n")} if (relatedInfo) { addRelatedInfo(diagnostic, createDiagnosticForNode(errorTarget, relatedInfo)); } - if (isCallExpression9(errorTarget.parent)) { + if (isCallExpression12(errorTarget.parent)) { const { start, length: length2 } = getDiagnosticSpanForCallNode(errorTarget.parent); diagnostic.start = start; diagnostic.length = length2; @@ -104774,7 +107759,7 @@ ${lanes.join("\n")} return resolveUntypedCall(node); } if (!callSignatures.length) { - if (isArrayLiteralExpression5(node.parent)) { + if (isArrayLiteralExpression7(node.parent)) { const diagnostic = createDiagnosticForNode(node.tag, Diagnostics.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked); diagnostics.add(diagnostic); return resolveErrorCall(node); @@ -104832,7 +107817,7 @@ ${lanes.join("\n")} if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) { return resolveUntypedCall(node); } - if (isPotentiallyUncalledDecorator(node, callSignatures) && !isParenthesizedExpression4(node.expression)) { + if (isPotentiallyUncalledDecorator(node, callSignatures) && !isParenthesizedExpression6(node.expression)) { const nodeStr = getTextOfNode( node.expression, /*includeTrivia*/ @@ -105084,10 +108069,10 @@ ${lanes.join("\n")} if (!node || !isInJSFile(node)) { return false; } - const func = isFunctionDeclaration2(node) || isFunctionExpression4(node) ? node : (isVariableDeclaration4(node) || isPropertyAssignment6(node)) && node.initializer && isFunctionExpression4(node.initializer) ? node.initializer : void 0; + const func = isFunctionDeclaration3(node) || isFunctionExpression5(node) ? node : (isVariableDeclaration4(node) || isPropertyAssignment8(node)) && node.initializer && isFunctionExpression5(node.initializer) ? node.initializer : void 0; if (func) { if (getJSDocClassTag(node)) return true; - if (isPropertyAssignment6(walkUpParenthesizedExpressions(func.parent))) return false; + if (isPropertyAssignment8(walkUpParenthesizedExpressions(func.parent))) return false; const symbol2 = getSymbolOfDeclaration(func); return !!((_a3 = symbol2 == null ? void 0 : symbol2.members) == null ? void 0 : _a3.size); } @@ -105137,7 +108122,7 @@ ${lanes.join("\n")} } name = node.parent.name; decl = node.parent; - } else if (isBinaryExpression2(node.parent)) { + } else if (isBinaryExpression4(node.parent)) { const parentNode = node.parent; const parentNodeOperator = node.parent.operatorToken.kind; if (parentNodeOperator === 64 && (allowDeclaration || parentNode.right === node)) { @@ -105147,7 +108132,7 @@ ${lanes.join("\n")} if (isVariableDeclaration4(parentNode.parent) && parentNode.parent.initializer === parentNode) { name = parentNode.parent.name; decl = parentNode.parent; - } else if (isBinaryExpression2(parentNode.parent) && parentNode.parent.operatorToken.kind === 64 && (allowDeclaration || parentNode.parent.right === parentNode)) { + } else if (isBinaryExpression4(parentNode.parent) && parentNode.parent.operatorToken.kind === 64 && (allowDeclaration || parentNode.parent.right === parentNode)) { name = parentNode.parent.left; decl = name; } @@ -105155,7 +108140,7 @@ ${lanes.join("\n")} return void 0; } } - } else if (allowDeclaration && isFunctionDeclaration2(node)) { + } else if (allowDeclaration && isFunctionDeclaration3(node)) { name = node.name; decl = node; } @@ -105172,9 +108157,9 @@ ${lanes.join("\n")} while (parent2 && parent2.kind === 212) { parent2 = parent2.parent; } - if (parent2 && isBinaryExpression2(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64) { + if (parent2 && isBinaryExpression4(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64) { const right = getInitializerOfBinaryExpression(parent2); - return isObjectLiteralExpression6(right) && right; + return isObjectLiteralExpression9(right) && right; } } function checkCallExpression(node, checkMode) { @@ -105263,12 +108248,12 @@ ${lanes.join("\n")} } } function isSymbolOrSymbolForCall(node) { - if (!isCallExpression9(node)) return false; + if (!isCallExpression12(node)) return false; let left = node.expression; - if (isPropertyAccessExpression10(left) && left.name.escapedText === "for") { + if (isPropertyAccessExpression12(left) && left.name.escapedText === "for") { left = left.expression; } - if (!isIdentifier17(left) || left.escapedText !== "Symbol") { + if (!isIdentifier21(left) || left.escapedText !== "Symbol") { return false; } const globalESSymbol = getGlobalESSymbolConstructorSymbol( @@ -105405,7 +108390,7 @@ ${lanes.join("\n")} )) { return false; } - if (!isIdentifier17(node.expression)) return Debug.fail(); + if (!isIdentifier21(node.expression)) return Debug.fail(); const resolvedRequire = resolveName( node.expression, node.expression.escapedText, @@ -105523,7 +108508,7 @@ ${lanes.join("\n")} } function checkAssertionDeferred(node) { const { type } = getAssertionTypeAndExpression(node); - const errNode = isParenthesizedExpression4(node) ? type : node; + const errNode = isParenthesizedExpression6(node) ? type : node; const links = getNodeLinks(node); Debug.assertIsDefined(links.assertionExpressionType); const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType)); @@ -105658,7 +108643,7 @@ ${lanes.join("\n")} } if (node.keywordToken === 102) { if (node.name.escapedText === "defer") { - Debug.assert(!isCallExpression9(node.parent) || node.parent.expression !== node, "Trying to get the type of `import.defer` in `import.defer(...)`"); + Debug.assert(!isCallExpression12(node.parent) || node.parent.expression !== node, "Trying to get the type of `import.defer` in `import.defer(...)`"); return errorType; } return checkImportMetaProperty(node); @@ -105745,7 +108730,7 @@ ${lanes.join("\n")} const restParameter = tryCast(restSymbol == null ? void 0 : restSymbol.valueDeclaration, isParameter); return restParameter ? getTupleElementLabelFromBindingElement(restParameter, index, elementFlags) : `${(restSymbol == null ? void 0 : restSymbol.escapedName) ?? "arg"}_${index}`; } - Debug.assert(isIdentifier17(d.name)); + Debug.assert(isIdentifier21(d.name)); return d.name.escapedText; } function getParameterNameAtPosition(signature, pos, overrideRestType) { @@ -105792,7 +108777,7 @@ ${lanes.join("\n")} const associatedName = associatedNames == null ? void 0 : associatedNames[index]; const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken); if (associatedName) { - Debug.assert(isIdentifier17(associatedName.name)); + Debug.assert(isIdentifier21(associatedName.name)); return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; } return void 0; @@ -105803,10 +108788,10 @@ ${lanes.join("\n")} return void 0; } function getParameterDeclarationIdentifier(symbol2) { - return symbol2.valueDeclaration && isParameter(symbol2.valueDeclaration) && isIdentifier17(symbol2.valueDeclaration.name) && symbol2.valueDeclaration.name; + return symbol2.valueDeclaration && isParameter(symbol2.valueDeclaration) && isIdentifier21(symbol2.valueDeclaration.name) && symbol2.valueDeclaration.name; } function isValidDeclarationForTupleLabel(d) { - return d.kind === 203 || isParameter(d) && d.name && isIdentifier17(d.name); + return d.kind === 203 || isParameter(d) && d.name && isIdentifier21(d.name); } function getNameableDeclarationAtPosition(signature, pos) { const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); @@ -106236,7 +109221,7 @@ ${lanes.join("\n")} } case 170: { const node = parent2; - if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { + if (!isConstructorDeclaration2(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { break; } if (getThisParameter(node.parent) === node) { @@ -106244,8 +109229,8 @@ ${lanes.join("\n")} } const index = getThisParameter(node.parent) ? node.parent.parameters.indexOf(node) - 1 : node.parent.parameters.indexOf(node); Debug.assert(index >= 0); - const targetType = isConstructorDeclaration(node.parent) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent.parent)) : getParentTypeOfClassElement(node.parent); - const keyType = isConstructorDeclaration(node.parent) ? undefinedType : getClassElementPropertyKeyType(node.parent); + const targetType = isConstructorDeclaration2(node.parent) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent.parent)) : getParentTypeOfClassElement(node.parent); + const keyType = isConstructorDeclaration2(node.parent) ? undefinedType : getClassElementPropertyKeyType(node.parent); const indexType = getNumberLiteralType(index); const targetParam = createParameter2("target", targetType); const keyParam = createParameter2("propertyKey", keyType); @@ -106688,7 +109673,7 @@ ${lanes.join("\n")} if (!(returnType.flags & 16)) return void 0; return forEach(func.parameters, (param, i) => { const initType = getTypeOfSymbol(param.symbol); - if (!initType || initType.flags & 16 || !isIdentifier17(param.name) || isSymbolAssigned(param.symbol) || isRestParameter(param)) { + if (!initType || initType.flags & 16 || !isIdentifier21(param.name) || isSymbolAssigned(param.symbol) || isRestParameter(param)) { return; } const trueType2 = checkIfExpressionRefinesParameter(func, expr, param, initType); @@ -106753,7 +109738,7 @@ ${lanes.join("\n")} function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { Debug.assert(node.kind !== 175 || isObjectLiteralMethod(node)); checkNodeDeferred(node); - if (isFunctionExpression4(node)) { + if (isFunctionExpression5(node)) { checkCollisionsForDeclarationName(node, node.name); } if (checkMode && checkMode & 4 && isContextSensitive(node)) { @@ -106873,7 +109858,7 @@ ${lanes.join("\n")} return true; } function isReadonlyAssignmentDeclaration(d) { - if (!isCallExpression9(d)) { + if (!isCallExpression12(d)) { return false; } if (!isBindableObjectDefinePropertyCall(d)) { @@ -106887,7 +109872,7 @@ ${lanes.join("\n")} if (!writableType || writableType === falseType || writableType === regularFalseType) { return true; } - if (writableProp && writableProp.valueDeclaration && isPropertyAssignment6(writableProp.valueDeclaration)) { + if (writableProp && writableProp.valueDeclaration && isPropertyAssignment8(writableProp.valueDeclaration)) { const initializer3 = writableProp.valueDeclaration.initializer; const rawOriginalType = checkExpression(initializer3); if (rawOriginalType === falseType || rawOriginalType === regularFalseType) { @@ -106914,7 +109899,7 @@ ${lanes.join("\n")} return true; } if (symbol2.valueDeclaration) { - const isAssignmentDeclaration2 = isBinaryExpression2(symbol2.valueDeclaration); + const isAssignmentDeclaration2 = isBinaryExpression4(symbol2.valueDeclaration); const isLocalPropertyDeclaration = ctor.parent === symbol2.valueDeclaration.parent; const isLocalParameterProperty = ctor === symbol2.valueDeclaration.parent; const isLocalThisPropertyAssignment = isAssignmentDeclaration2 && ((_a3 = symbol2.parent) == null ? void 0 : _a3.valueDeclaration) === ctor.parent; @@ -106960,7 +109945,7 @@ ${lanes.join("\n")} error210(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); return booleanType; } - if (isPropertyAccessExpression10(expr) && isPrivateIdentifier(expr.name)) { + if (isPropertyAccessExpression12(expr) && isPrivateIdentifier(expr.name)) { error210(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); } const links = getNodeLinks(expr); @@ -107352,7 +110337,7 @@ ${lanes.join("\n")} const nonRestNames = []; if (allProperties) { for (const otherProperty of allProperties) { - if (!isSpreadAssignment3(otherProperty)) { + if (!isSpreadAssignment5(otherProperty)) { nonRestNames.push(otherProperty.name); } } @@ -107646,7 +110631,7 @@ ${lanes.join("\n")} return state; } function maybeCheckExpression(state, node) { - if (isBinaryExpression2(node)) { + if (isBinaryExpression4(node)) { return node; } setLastResult(state, checkExpression(node, state.checkMode)); @@ -107668,15 +110653,15 @@ ${lanes.join("\n")} if (node.operatorToken.kind !== 61) { return; } - if (isBinaryExpression2(node.parent)) { + if (isBinaryExpression4(node.parent)) { const { left, operatorToken } = node.parent; - if (isBinaryExpression2(left) && operatorToken.kind === 57) { + if (isBinaryExpression4(left) && operatorToken.kind === 57) { grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString( 61 /* QuestionQuestionToken */ ), tokenToString(operatorToken.kind)); } - } else if (isBinaryExpression2(node.left)) { + } else if (isBinaryExpression4(node.left)) { const { operatorToken } = node.left; if (operatorToken.kind === 57 || operatorToken.kind === 56) { grammarErrorOnNode(node.left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(operatorToken.kind), tokenToString( @@ -107684,7 +110669,7 @@ ${lanes.join("\n")} /* QuestionQuestionToken */ )); } - } else if (isBinaryExpression2(node.right)) { + } else if (isBinaryExpression4(node.right)) { const { operatorToken } = node.right; if (operatorToken.kind === 56) { grammarErrorOnNode(node.right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString( @@ -107728,7 +110713,7 @@ ${lanes.join("\n")} } } function isNotWithinNullishCoalesceExpression(node) { - return !isBinaryExpression2(node.parent) || node.parent.operatorToken.kind !== 61; + return !isBinaryExpression4(node.parent) || node.parent.operatorToken.kind !== 61; } function getSyntacticNullishnessSemantics(node) { node = skipOuterExpressions(node); @@ -108054,7 +111039,7 @@ ${lanes.join("\n")} return resultType2; } case 64: - const declKind = isBinaryExpression2(left.parent) ? getAssignmentDeclarationKind(left.parent) : 0; + const declKind = isBinaryExpression4(left.parent) ? getAssignmentDeclarationKind(left.parent) : 0; checkAssignmentDeclaration(declKind, rightType); if (isAssignmentDeclaration2(declKind)) { if (!(rightType.flags & 524288) || declKind !== 2 && declKind !== 6 && !isEmptyObjectType(rightType) && !isFunctionObjectType(rightType) && !(getObjectFlags(rightType) & 1)) { @@ -108115,8 +111100,8 @@ ${lanes.join("\n")} } } function isIndirectCall(node) { - return node.parent.kind === 218 && isNumericLiteral3(node.left) && node.left.text === "0" && (isCallExpression9(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 216) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. - (isAccessExpression(node.right) || isIdentifier17(node.right) && node.right.escapedText === "eval"); + return node.parent.kind === 218 && isNumericLiteral4(node.left) && node.left.text === "0" && (isCallExpression12(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 216) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + (isAccessExpression(node.right) || isIdentifier21(node.right) && node.right.escapedText === "eval"); } function checkForDisallowedESSymbolOperand(operator2) { const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint( @@ -108166,7 +111151,7 @@ ${lanes.join("\n")} } if (checkReferenceExpression(left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) { let headMessage; - if (exactOptionalPropertyTypes && isPropertyAccessExpression10(left) && maybeTypeOfKind( + if (exactOptionalPropertyTypes && isPropertyAccessExpression12(left) && maybeTypeOfKind( valueType, 32768 /* Undefined */ @@ -108192,7 +111177,7 @@ ${lanes.join("\n")} case 4: const symbol2 = getSymbolOfNode(left); const init = getAssignedExpandoInitializer(right); - return !!init && isObjectLiteralExpression6(init) && !!((_a3 = symbol2 == null ? void 0 : symbol2.exports) == null ? void 0 : _a3.size); + return !!init && isObjectLiteralExpression9(init) && !!((_a3 = symbol2 == null ? void 0 : symbol2.exports) == null ? void 0 : _a3.size); default: return false; } @@ -108265,7 +111250,7 @@ ${lanes.join("\n")} } } function isGlobalNaN(expr) { - if (isIdentifier17(expr) && expr.escapedText === "NaN") { + if (isIdentifier21(expr) && expr.escapedText === "NaN") { const globalNaNSymbol = getGlobalNaNSymbol(); return !!globalNaNSymbol && globalNaNSymbol === getResolvedSymbol(expr); } @@ -108370,7 +111355,7 @@ ${lanes.join("\n")} } function isTemplateLiteralContext(node) { const parent2 = node.parent; - return isParenthesizedExpression4(parent2) && isTemplateLiteralContext(parent2) || isElementAccessExpression3(parent2) && parent2.argumentExpression === node; + return isParenthesizedExpression6(parent2) && isTemplateLiteralContext(parent2) || isElementAccessExpression5(parent2) && parent2.argumentExpression === node; } function checkTemplateExpression(node) { const texts = [node.head.text]; @@ -108642,7 +111627,7 @@ ${lanes.join("\n")} node, 0 /* None */ - )) || (isParenthesizedExpression4(parent2) || isArrayLiteralExpression5(parent2) || isSpreadElement3(parent2)) && isConstContext(parent2) || (isPropertyAssignment6(parent2) || isShorthandPropertyAssignment3(parent2) || isTemplateSpan(parent2)) && isConstContext(parent2.parent); + )) || (isParenthesizedExpression6(parent2) || isArrayLiteralExpression7(parent2) || isSpreadElement5(parent2)) && isConstContext(parent2) || (isPropertyAssignment8(parent2) || isShorthandPropertyAssignment5(parent2) || isTemplateSpan(parent2)) && isConstContext(parent2.parent); } function checkExpressionForMutableLocation(node, checkMode, forceTuple) { const type = checkExpression(node, checkMode, forceTuple); @@ -108864,7 +111849,7 @@ ${lanes.join("\n")} const type = getQuickTypeOfExpression(expr.expression); return type ? getAwaitedType(type) : void 0; } - if (isCallExpression9(expr) && expr.expression.kind !== 108 && !isRequireCall( + if (isCallExpression12(expr) && expr.expression.kind !== 108 && !isRequireCall( expr, /*requireStringLiteralLikeArgument*/ true @@ -109121,14 +112106,14 @@ ${lanes.join("\n")} if (!(func.kind === 177 && nodeIsPresent(func.body))) { error210(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } - if (func.kind === 177 && isIdentifier17(node.name) && node.name.escapedText === "constructor") { + if (func.kind === 177 && isIdentifier21(node.name) && node.name.escapedText === "constructor") { error210(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); } } if (!node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body) { error210(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); } - if (node.name && isIdentifier17(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new")) { + if (node.name && isIdentifier21(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new")) { if (func.parameters.indexOf(node) !== 0) { error210(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); } @@ -109486,7 +112471,7 @@ ${lanes.join("\n")} } function checkMethodDeclaration(node) { if (!checkGrammarMethod(node)) checkGrammarComputedPropertyName(node.name); - if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier17(node.name) && idText(node.name) === "constructor") { + if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier21(node.name) && idText(node.name) === "constructor") { error210(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); @@ -109596,7 +112581,7 @@ ${lanes.join("\n")} return !!forEachChild22(node, nodeImmediatelyReferencesSuperOrThis); } function checkAccessorDeclaration(node) { - if (isIdentifier17(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { + if (isIdentifier21(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { error210(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); } addLazyDiagnostic(checkAccessorDeclarationDiagnostics); @@ -110212,7 +113197,7 @@ ${lanes.join("\n")} case 278: case 227: const node2 = d; - const expression = isExportAssignment2(node2) ? node2.expression : node2.right; + const expression = isExportAssignment3(node2) ? node2.expression : node2.right; if (!isEntityNameExpression(expression)) { return 1; } @@ -110560,17 +113545,17 @@ ${lanes.join("\n")} const sourceFile = getSourceFileOfNode(decorator); if (!hasParseDiagnostics(sourceFile)) { let node = decorator.expression; - if (isParenthesizedExpression4(node)) { + if (isParenthesizedExpression6(node)) { return false; } let canHaveCallExpression = true; let errorNode; while (true) { - if (isExpressionWithTypeArguments(node) || isNonNullExpression2(node)) { + if (isExpressionWithTypeArguments(node) || isNonNullExpression4(node)) { node = node.expression; continue; } - if (isCallExpression9(node)) { + if (isCallExpression12(node)) { if (!canHaveCallExpression) { errorNode = node; } @@ -110581,7 +113566,7 @@ ${lanes.join("\n")} canHaveCallExpression = false; continue; } - if (isPropertyAccessExpression10(node)) { + if (isPropertyAccessExpression12(node)) { if (node.questionDotToken) { errorNode = node.questionDotToken; } @@ -110589,7 +113574,7 @@ ${lanes.join("\n")} canHaveCallExpression = false; continue; } - if (!isIdentifier17(node)) { + if (!isIdentifier21(node)) { errorNode = node; } break; @@ -110710,7 +113695,7 @@ ${lanes.join("\n")} return void 0; } if (commonEntityName) { - if (!isIdentifier17(commonEntityName) || !isIdentifier17(individualEntityName) || commonEntityName.escapedText !== individualEntityName.escapedText) { + if (!isIdentifier21(commonEntityName) || !isIdentifier21(individualEntityName) || commonEntityName.escapedText !== individualEntityName.escapedText) { return void 0; } } else { @@ -110750,7 +113735,7 @@ ${lanes.join("\n")} 8 /* ESDecorateAndRunInitializers */ ); - if (isClassDeclaration3(node)) { + if (isClassDeclaration5(node)) { if (!node.name) { checkExternalEmitHelpers( firstDecorator, @@ -110861,7 +113846,7 @@ ${lanes.join("\n")} } function checkJSDocThisTag(node) { const host2 = getEffectiveJSDocHost(node); - if (host2 && isArrowFunction5(host2)) { + if (host2 && isArrowFunction6(host2)) { error210(node.tagName, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); } } @@ -110870,13 +113855,13 @@ ${lanes.join("\n")} } function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); - if (!classLike || !isClassDeclaration3(classLike) && !isClassExpression(classLike)) { + if (!classLike || !isClassDeclaration5(classLike) && !isClassExpression(classLike)) { error210(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); } } function checkJSDocAugmentsTag(node) { const classLike = getEffectiveJSDocHost(node); - if (!classLike || !isClassDeclaration3(classLike) && !isClassExpression(classLike)) { + if (!classLike || !isClassDeclaration5(classLike) && !isClassExpression(classLike)) { error210(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); return; } @@ -111017,7 +114002,7 @@ ${lanes.join("\n")} addDiagnostic(declaration, 0, createDiagnosticForNode(node, message, name)); } function isIdentifierThatStartsWithUnderscore(node) { - return isIdentifier17(node) && idText(node).charCodeAt(0) === 95; + return isIdentifier21(node) && idText(node).charCodeAt(0) === 95; } function checkUnusedClassMembers(node, addDiagnostic) { for (const member of node.members) { @@ -111103,7 +114088,7 @@ ${lanes.join("\n")} } function isValidUnusedLocalDeclaration(declaration) { if (isBindingElement(declaration)) { - if (isObjectBindingPattern(declaration.parent)) { + if (isObjectBindingPattern2(declaration.parent)) { return !!(declaration.propertyName && isIdentifierThatStartsWithUnderscore(declaration.name)); } return isIdentifierThatStartsWithUnderscore(declaration.name); @@ -111125,7 +114110,7 @@ ${lanes.join("\n")} } if (isImportedDeclaration(declaration)) { addToGroup(unusedImports, importClauseFromImported(declaration), declaration, getNodeId); - } else if (isBindingElement(declaration) && isObjectBindingPattern(declaration.parent)) { + } else if (isBindingElement(declaration) && isObjectBindingPattern2(declaration.parent)) { const lastElement = last(declaration.parent.elements); if (declaration === lastElement || !last(declaration.parent.elements).dotDotDotToken) { addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); @@ -111342,7 +114327,7 @@ ${lanes.join("\n")} function checkWeakMapSetCollision(node) { const enclosingBlockScope = getEnclosingBlockScopeContainer(node); if (getNodeCheckFlags(enclosingBlockScope) & 1048576) { - Debug.assert(isNamedDeclaration(node) && isIdentifier17(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); + Debug.assert(isNamedDeclaration(node) && isIdentifier21(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText); } } @@ -111360,7 +114345,7 @@ ${lanes.join("\n")} break; } } - } else if (isFunctionExpression4(node)) { + } else if (isFunctionExpression5(node)) { if (getNodeCheckFlags(node) & 2097152) { hasCollision = true; } @@ -111371,7 +114356,7 @@ ${lanes.join("\n")} } } if (hasCollision) { - Debug.assert(isNamedDeclaration(node) && isIdentifier17(node.name), "The target of a Reflect collision check should be an identifier"); + Debug.assert(isNamedDeclaration(node) && isIdentifier21(node.name), "The target of a Reflect collision check should be an identifier"); errorSkippedOn("noEmit", node, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, declarationNameToString(node.name), "Reflect"); } } @@ -111396,7 +114381,7 @@ ${lanes.join("\n")} } const symbol2 = getSymbolOfDeclaration(node); if (symbol2.flags & 1) { - if (!isIdentifier17(node.name)) return Debug.fail(); + if (!isIdentifier21(node.name)) return Debug.fail(); const localDeclarationSymbol = resolveName( node, node.name.escapedText, @@ -111442,11 +114427,11 @@ ${lanes.join("\n")} } } if (isBindingElement(node)) { - if (node.propertyName && isIdentifier17(node.name) && isPartOfParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) { + if (node.propertyName && isIdentifier21(node.name) && isPartOfParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) { potentialUnusedRenamedBindingElementsInTypes.push(node); return; } - if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < LanguageFeatureMinimumTarget.ObjectSpreadRest) { + if (isObjectBindingPattern2(node.parent) && node.dotDotDotToken && languageVersion < LanguageFeatureMinimumTarget.ObjectSpreadRest) { checkExternalEmitHelpers( node, 4 @@ -111537,7 +114522,7 @@ ${lanes.join("\n")} if (node === symbol2.valueDeclaration) { const initializer3 = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); if (initializer3) { - const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression6(initializer3) && (initializer3.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a3 = symbol2.exports) == null ? void 0 : _a3.size); + const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression9(initializer3) && (initializer3.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a3 = symbol2.exports) == null ? void 0 : _a3.size); if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 250) { const initializerType = checkExpressionCached(initializer3); checkTypeAssignableToAndOptionallyElaborate( @@ -111677,7 +114662,7 @@ ${lanes.join("\n")} function bothHelper(condExpr2, body2) { condExpr2 = skipParentheses(condExpr2); helper(condExpr2, body2); - while (isBinaryExpression2(condExpr2) && (condExpr2.operatorToken.kind === 57 || condExpr2.operatorToken.kind === 61)) { + while (isBinaryExpression4(condExpr2) && (condExpr2.operatorToken.kind === 57 || condExpr2.operatorToken.kind === 61)) { condExpr2 = skipParentheses(condExpr2.left); helper(condExpr2, body2); } @@ -111692,11 +114677,11 @@ ${lanes.join("\n")} return; } const type = location === condExpr2 ? condType : checkExpression(location); - if (type.flags & 1024 && isPropertyAccessExpression10(location) && (getNodeLinks(location.expression).resolvedSymbol ?? unknownSymbol).flags & 384) { + if (type.flags & 1024 && isPropertyAccessExpression12(location) && (getNodeLinks(location.expression).resolvedSymbol ?? unknownSymbol).flags & 384) { error210(location, Diagnostics.This_condition_will_always_return_0, !!type.value ? "true" : "false"); return; } - const isPropertyExpressionCast = isPropertyAccessExpression10(location) && isTypeAssertion(location.expression); + const isPropertyExpressionCast = isPropertyAccessExpression12(location) && isTypeAssertion(location.expression); if (!hasTypeFacts( type, 4194304 @@ -111711,12 +114696,12 @@ ${lanes.join("\n")} if (callSignatures.length === 0 && !isPromise) { return; } - const testedNode = isIdentifier17(location) ? location : isPropertyAccessExpression10(location) ? location.name : void 0; + const testedNode = isIdentifier21(location) ? location : isPropertyAccessExpression12(location) ? location.name : void 0; const testedSymbol = testedNode && getSymbolAtLocation(testedNode); if (!testedSymbol && !isPromise) { return; } - const isUsed = testedSymbol && isBinaryExpression2(condExpr2.parent) && isSymbolUsedInBinaryExpressionChain(condExpr2.parent, testedSymbol) || testedSymbol && body2 && isSymbolUsedInConditionBody(condExpr2, body2, testedNode, testedSymbol); + const isUsed = testedSymbol && isBinaryExpression4(condExpr2.parent) && isSymbolUsedInBinaryExpressionChain(condExpr2.parent, testedSymbol) || testedSymbol && body2 && isSymbolUsedInConditionBody(condExpr2, body2, testedNode, testedSymbol); if (!isUsed) { if (isPromise) { errorAndMaybeSuggestAwait( @@ -111734,24 +114719,24 @@ ${lanes.join("\n")} } function isSymbolUsedInConditionBody(expr, body, testedNode, testedSymbol) { return !!forEachChild22(body, function check2(childNode) { - if (isIdentifier17(childNode)) { + if (isIdentifier21(childNode)) { const childSymbol = getSymbolAtLocation(childNode); if (childSymbol && childSymbol === testedSymbol) { - if (isIdentifier17(expr) || isIdentifier17(testedNode) && isBinaryExpression2(testedNode.parent)) { + if (isIdentifier21(expr) || isIdentifier21(testedNode) && isBinaryExpression4(testedNode.parent)) { return true; } let testedExpression = testedNode.parent; let childExpression = childNode.parent; while (testedExpression && childExpression) { - if (isIdentifier17(testedExpression) && isIdentifier17(childExpression) || testedExpression.kind === 110 && childExpression.kind === 110) { + if (isIdentifier21(testedExpression) && isIdentifier21(childExpression) || testedExpression.kind === 110 && childExpression.kind === 110) { return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression); - } else if (isPropertyAccessExpression10(testedExpression) && isPropertyAccessExpression10(childExpression)) { + } else if (isPropertyAccessExpression12(testedExpression) && isPropertyAccessExpression12(childExpression)) { if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) { return false; } childExpression = childExpression.expression; testedExpression = testedExpression.expression; - } else if (isCallExpression9(testedExpression) && isCallExpression9(childExpression)) { + } else if (isCallExpression12(testedExpression) && isCallExpression12(childExpression)) { childExpression = childExpression.expression; testedExpression = testedExpression.expression; } else { @@ -111764,9 +114749,9 @@ ${lanes.join("\n")} }); } function isSymbolUsedInBinaryExpressionChain(node, testedSymbol) { - while (isBinaryExpression2(node) && node.operatorToken.kind === 56) { + while (isBinaryExpression4(node) && node.operatorToken.kind === 56) { const isUsed = forEachChild22(node.right, function visit(child) { - if (isIdentifier17(child)) { + if (isIdentifier21(child)) { const symbol2 = getSymbolAtLocation(child); if (symbol2 && symbol2 === testedSymbol) { return true; @@ -112644,7 +115629,7 @@ ${lanes.join("\n")} const functionFlags = getFunctionFlags(container); if (expr) { const unwrappedExpr = skipParentheses(expr, excludeJSDocTypeAssertions); - if (isConditionalExpression2(unwrappedExpr)) { + if (isConditionalExpression4(unwrappedExpr)) { checkReturnExpression( container, unwrappedReturnType, @@ -112749,7 +115734,7 @@ ${lanes.join("\n")} } function checkThrowStatement(node) { if (!checkGrammarStatementInAmbientContext(node)) { - if (isIdentifier17(node.expression) && !node.expression.escapedText) { + if (isIdentifier21(node.expression) && !node.expression.escapedText) { grammarErrorAfterFirstToken(node, Diagnostics.Line_break_not_permitted_here); } } @@ -112893,7 +115878,7 @@ ${lanes.join("\n")} const parameters = /* @__PURE__ */ new Set(); const excludedParameters = /* @__PURE__ */ new Set(); forEach(node.parameters, ({ name }, index) => { - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { parameters.add(name.escapedText); } if (isBindingPattern(name)) { @@ -112904,12 +115889,12 @@ ${lanes.join("\n")} if (containsArguments) { const lastJSDocParamIndex = jsdocParameters.length - 1; const lastJSDocParam = jsdocParameters[lastJSDocParamIndex]; - if (isJs && lastJSDocParam && isIdentifier17(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) { + if (isJs && lastJSDocParam && isIdentifier21(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) { error210(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); } } else { forEach(jsdocParameters, ({ name, isNameFirst }, index) => { - if (excludedParameters.has(index) || isIdentifier17(name) && parameters.has(name.escapedText)) { + if (excludedParameters.has(index) || isIdentifier21(name) && parameters.has(name.escapedText)) { return; } if (isQualifiedName2(name)) { @@ -113065,7 +116050,7 @@ ${lanes.join("\n")} 4194304 /* SetFunctionName */ ); - if ((isPropertyAssignment6(parent2) || isPropertyDeclaration(parent2) || isBindingElement(parent2)) && isComputedPropertyName(parent2.name)) { + if ((isPropertyAssignment8(parent2) || isPropertyDeclaration(parent2) || isBindingElement(parent2)) && isComputedPropertyName(parent2.name)) { checkExternalEmitHelpers( location, 8388608 @@ -113242,7 +116227,7 @@ ${lanes.join("\n")} if (hasAmbientModifier(member)) { continue; } - if (isConstructorDeclaration(member)) { + if (isConstructorDeclaration2(member)) { forEach(member.parameters, (param) => { if (isParameterPropertyDeclaration(param, member)) { checkExistingMemberForOverrideModifier( @@ -113498,7 +116483,7 @@ ${lanes.join("\n")} const basePropertyFlags = base.flags & 98308; const derivedPropertyFlags = derived.flags & 98308; if (basePropertyFlags && derivedPropertyFlags) { - if ((getCheckFlags(base) & 6 ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 || derived.valueDeclaration && isBinaryExpression2(derived.valueDeclaration)) { + if ((getCheckFlags(base) & 6 ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 || derived.valueDeclaration && isBinaryExpression4(derived.valueDeclaration)) { continue; } const overriddenInstanceProperty = basePropertyFlags !== 4 && derivedPropertyFlags === 4; @@ -113510,8 +116495,8 @@ ${lanes.join("\n")} const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 173 && !d.initializer); if (uninitialized && !(derived.flags & 33554432) && !(baseDeclarationFlags & 64) && !(derivedDeclarationFlags & 64) && !((_e = derived.declarations) == null ? void 0 : _e.some((d) => !!(d.flags & 33554432)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); - const propName = uninitialized.name; - if (uninitialized.exclamationToken || !constructor || !isIdentifier17(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { + const propName2 = uninitialized.name; + if (uninitialized.exclamationToken || !constructor || !isIdentifier21(propName2) || !strictNullChecks || !isPropertyInitializedInConstructor(propName2, type, constructor)) { const errorMessage2 = 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; error210(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); } @@ -113628,12 +116613,12 @@ ${lanes.join("\n")} continue; } if (!isStatic(member) && isPropertyWithoutInitializer(member)) { - const propName = member.name; - if (isIdentifier17(propName) || isPrivateIdentifier(propName) || isComputedPropertyName(propName)) { + const propName2 = member.name; + if (isIdentifier21(propName2) || isPrivateIdentifier(propName2) || isComputedPropertyName(propName2)) { const type = getTypeOfSymbol(getSymbolOfDeclaration(member)); if (!(type.flags & 3 || containsUndefinedType(type))) { - if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) { - error210(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); + if (!constructor || !isPropertyInitializedInConstructor(propName2, type, constructor)) { + error210(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName2)); } } } @@ -113643,10 +116628,10 @@ ${lanes.join("\n")} function isPropertyWithoutInitializer(node) { return node.kind === 173 && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; } - function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { + function isPropertyInitializedInStaticBlocks(propName2, propType, staticBlocks, startPos, endPos) { for (const staticBlock of staticBlocks) { if (staticBlock.pos >= startPos && staticBlock.pos <= endPos) { - const reference = factory.createPropertyAccessExpression(factory.createThis(), propName); + const reference = factory.createPropertyAccessExpression(factory.createThis(), propName2); setParent(reference.expression, reference); setParent(reference, staticBlock); reference.flowNode = staticBlock.returnFlowNode; @@ -113658,8 +116643,8 @@ ${lanes.join("\n")} } return false; } - function isPropertyInitializedInConstructor(propName, propType, constructor) { - const reference = isComputedPropertyName(propName) ? factory.createElementAccessExpression(factory.createThis(), propName.expression) : factory.createPropertyAccessExpression(factory.createThis(), propName); + function isPropertyInitializedInConstructor(propName2, propType, constructor) { + const reference = isComputedPropertyName(propName2) ? factory.createElementAccessExpression(factory.createThis(), propName2.expression) : factory.createPropertyAccessExpression(factory.createThis(), propName2); setParent(reference.expression, reference); setParent(reference, constructor); reference.flowNode = constructor.returnFlowNode; @@ -114010,7 +116995,7 @@ ${lanes.join("\n")} grammarErrorOnNode(node.name, Diagnostics.Only_ambient_modules_can_use_quoted_names); } } - if (isIdentifier17(node.name)) { + if (isIdentifier21(node.name)) { checkCollisionsForDeclarationName(node, node.name); if (!(node.flags & (32 | 2048))) { const sourceFile = getSourceFileOfNode(node); @@ -114145,7 +117130,7 @@ ${lanes.join("\n")} if (!moduleName || nodeIsMissing(moduleName)) { return false; } - if (!isStringLiteral10(moduleName)) { + if (!isStringLiteral12(moduleName)) { error210(moduleName, Diagnostics.String_literal_expected); return false; } @@ -114167,7 +117152,7 @@ ${lanes.join("\n")} const diagnostic = node.attributes.token === 118 ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions; let hasError = false; for (const attr of node.attributes.elements) { - if (!isStringLiteral10(attr.value)) { + if (!isStringLiteral12(attr.value)) { hasError = true; error210(attr.value, diagnostic); } @@ -114219,9 +117204,9 @@ ${lanes.join("\n")} node.kind !== 261 /* VariableDeclaration */ ); - const importDeclaration = findAncestor(node, or(isImportDeclaration5, isImportEqualsDeclaration)); + const importDeclaration = findAncestor(node, or(isImportDeclaration6, isImportEqualsDeclaration)); const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; - const importedIdentifier = unescapeLeadingUnderscores(isIdentifier17(errorNode) ? errorNode.escapedText : symbol2.escapedName); + const importedIdentifier = unescapeLeadingUnderscores(isIdentifier21(errorNode) ? errorNode.escapedText : symbol2.escapedName); error210( errorNode, Diagnostics._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, @@ -114380,7 +117365,7 @@ ${lanes.join("\n")} isImportAttributes2 ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls ); } - const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration5(declaration) ? (_a3 = declaration.importClause) == null ? void 0 : _a3.isTypeOnly : declaration.isTypeOnly); + const isTypeOnly = isJSDocImportTag(declaration) || (isImportDeclaration6(declaration) ? (_a3 = declaration.importClause) == null ? void 0 : _a3.isTypeOnly : declaration.isTypeOnly); if (isTypeOnly) { return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); } @@ -115404,7 +118389,7 @@ ${lanes.join("\n")} } function isNodeUsedDuringClassInitialization(node) { return !!findAncestor(node, (element) => { - if (isConstructorDeclaration(element) && nodeIsPresent(element.body) || isPropertyDeclaration(element)) { + if (isConstructorDeclaration2(element) && nodeIsPresent(element.body) || isPropertyDeclaration(element)) { return true; } else if (isClassLike(element) || isFunctionLikeDeclaration(element)) { return "quit"; @@ -115437,7 +118422,7 @@ ${lanes.join("\n")} case 3: return getSymbolOfNode(entityName.parent); case 5: - if (isPropertyAccessExpression10(entityName.parent) && getLeftmostAccessExpression(entityName.parent) === entityName) { + if (isPropertyAccessExpression12(entityName.parent) && getLeftmostAccessExpression(entityName.parent) === entityName) { return void 0; } // falls through @@ -115695,15 +118680,15 @@ ${lanes.join("\n")} true, getHostSignatureFromJSDoc(name) ); - if (!symbol2 && isIdentifier17(name) && container) { + if (!symbol2 && isIdentifier21(name) && container) { symbol2 = getMergedSymbol(getSymbol2(getExportsOfSymbol(container), name.escapedText, meaning)); } if (symbol2) { return symbol2; } } - const left = isIdentifier17(name) ? container : resolveJSDocMemberName(name.left, ignoreErrors, container); - const right = isIdentifier17(name) ? name.escapedText : name.right.escapedText; + const left = isIdentifier21(name) ? container : resolveJSDocMemberName(name.left, ignoreErrors, container); + const right = isIdentifier21(name) ? name.escapedText : name.right.escapedText; if (left) { const proto = left.flags & 111551 && getPropertyOfType(getTypeOfSymbol(left), "prototype"); const t = proto ? getTypeOfSymbol(proto) : getDeclaredTypeOfSymbol(left); @@ -115790,12 +118775,12 @@ ${lanes.join("\n")} ) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { return resolveExternalModuleName(node, node, ignoreErrors); } - if (isCallExpression9(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { + if (isCallExpression12(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { return getSymbolOfDeclaration(parent2); } // falls through case 9: - const objectType = isElementAccessExpression3(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; + const objectType = isElementAccessExpression5(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); case 90: case 100: @@ -115805,7 +118790,7 @@ ${lanes.join("\n")} case 206: return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; case 95: - return isExportAssignment2(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; + return isExportAssignment3(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; case 102: if (isMetaProperty(node.parent) && node.parent.name.escapedText === "defer") { return void 0; @@ -115814,7 +118799,7 @@ ${lanes.join("\n")} case 105: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; case 104: - if (isBinaryExpression2(node.parent)) { + if (isBinaryExpression4(node.parent)) { const type = getTypeOfExpression(node.parent.right); const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(type); return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol; @@ -115833,7 +118818,7 @@ ${lanes.join("\n")} } } function getIndexInfosAtLocation(node) { - if (isIdentifier17(node) && isPropertyAccessExpression10(node.parent) && node.parent.name === node) { + if (isIdentifier21(node) && isPropertyAccessExpression12(node.parent) && node.parent.name === node) { const keyType = getLiteralTypeFromPropertyName(node); const objectType = getTypeOfExpression(node.parent.expression); const objectTypes = objectType.flags & 1048576 ? objectType.types : [objectType]; @@ -115962,12 +118947,12 @@ ${lanes.join("\n")} return checkDestructuringAssignment(expr, iteratedType || errorType); } if (expr.parent.kind === 304) { - const node2 = cast(expr.parent.parent, isObjectLiteralExpression6); + const node2 = cast(expr.parent.parent, isObjectLiteralExpression9); const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; const propertyIndex = indexOfNode(node2.properties, expr.parent); return checkObjectLiteralDestructuringPropertyAssignment(node2, typeOfParentObjectLiteral, propertyIndex); } - const node = cast(expr.parent, isArrayLiteralExpression5); + const node = cast(expr.parent, isArrayLiteralExpression7); const typeOfArrayLiteral = getTypeOfAssignmentPattern(node) || errorType; const elementType = checkIteratedTypeOrElementType(65, typeOfArrayLiteral, undefinedType, expr.parent) || errorType; return checkArrayLiteralDestructuringElementAssignment(node, typeOfArrayLiteral, node.elements.indexOf(expr), elementType); @@ -116060,11 +119045,11 @@ ${lanes.join("\n")} } function isArgumentsLocalBinding(nodeIn) { if (isGeneratedIdentifier(nodeIn)) return false; - const node = getParseTreeNode(nodeIn, isIdentifier17); + const node = getParseTreeNode(nodeIn, isIdentifier21); if (!node) return false; const parent2 = node.parent; if (!parent2) return false; - const isPropertyName2 = (isPropertyAccessExpression10(parent2) || isPropertyAssignment6(parent2)) && parent2.name === node; + const isPropertyName2 = (isPropertyAccessExpression12(parent2) || isPropertyAssignment8(parent2)) && parent2.name === node; return !isPropertyName2 && getReferencedValueSymbol(node) === argumentsSymbol; } function isNameOfModuleOrEnumDeclaration(node) { @@ -116072,7 +119057,7 @@ ${lanes.join("\n")} } function getReferencedExportContainer(nodeIn, prefixLocals) { var _a3; - const node = getParseTreeNode(nodeIn, isIdentifier17); + const node = getParseTreeNode(nodeIn, isIdentifier21); if (node) { let symbol2 = getReferencedValueSymbol( node, @@ -116105,7 +119090,7 @@ ${lanes.join("\n")} if (specifier) { return specifier; } - const node = getParseTreeNode(nodeIn, isIdentifier17); + const node = getParseTreeNode(nodeIn, isIdentifier21); if (node) { const symbol2 = getReferencedValueOrAliasSymbol(node); if (isNonLocalAlias( @@ -116174,7 +119159,7 @@ ${lanes.join("\n")} } function getReferencedDeclarationWithCollidingName(nodeIn) { if (!isGeneratedIdentifier(nodeIn)) { - const node = getParseTreeNode(nodeIn, isIdentifier17); + const node = getParseTreeNode(nodeIn, isIdentifier21); if (node) { const symbol2 = getReferencedValueSymbol(node); if (symbol2 && isSymbolOfDeclarationWithCollidingName(symbol2)) { @@ -116312,7 +119297,7 @@ ${lanes.join("\n")} ); } function isExpandoFunctionDeclaration(node) { - const declaration = getParseTreeNode(node, (n) => isFunctionDeclaration2(n) || isVariableDeclaration4(n)); + const declaration = getParseTreeNode(node, (n) => isFunctionDeclaration3(n) || isVariableDeclaration4(n)); if (!declaration) { return false; } @@ -116335,7 +119320,7 @@ ${lanes.join("\n")} return !!forEachEntry(getExportsOfSymbol(symbol2), (p) => p.flags & 111551 && isExpandoPropertyDeclaration(p.valueDeclaration)); } function getPropertiesOfContainerFunction(node) { - const declaration = getParseTreeNode(node, isFunctionDeclaration2); + const declaration = getParseTreeNode(node, isFunctionDeclaration3); if (!declaration) { return emptyArray; } @@ -116416,14 +119401,14 @@ ${lanes.join("\n")} forEachNodeRecursively(node2, checkIdentifiers); } function isExpressionNodeOrShorthandPropertyAssignmentName(node2) { - return isExpressionNode(node2) || isShorthandPropertyAssignment3(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2; + return isExpressionNode(node2) || isShorthandPropertyAssignment5(node2.parent) && (node2.parent.objectAssignmentInitializer ?? node2.parent.name) === node2; } function checkSingleIdentifier(node2) { const nodeLinks2 = getNodeLinks(node2); nodeLinks2.calculatedFlags |= 536870912; - if (isIdentifier17(node2)) { + if (isIdentifier21(node2)) { nodeLinks2.calculatedFlags |= 32768 | 16384; - if (isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression10(node2.parent) && node2.parent.name === node2)) { + if (isExpressionNodeOrShorthandPropertyAssignmentName(node2) && !(isPropertyAccessExpression12(node2.parent) && node2.parent.name === node2)) { const s = getResolvedSymbol(node2); if (s && s !== unknownSymbol) { checkIdentifierCalculateNodeCheckFlags(node2, s); @@ -116706,7 +119691,7 @@ ${lanes.join("\n")} } function getReferencedValueDeclaration(referenceIn) { if (!isGeneratedIdentifier(referenceIn)) { - const reference = getParseTreeNode(referenceIn, isIdentifier17); + const reference = getParseTreeNode(referenceIn, isIdentifier21); if (reference) { const symbol2 = getReferencedValueSymbol(reference); if (symbol2) { @@ -116718,7 +119703,7 @@ ${lanes.join("\n")} } function getReferencedValueDeclarations(referenceIn) { if (!isGeneratedIdentifier(referenceIn)) { - const reference = getParseTreeNode(referenceIn, isIdentifier17); + const reference = getParseTreeNode(referenceIn, isIdentifier21); if (reference) { const symbol2 = getReferencedValueSymbol(reference); if (symbol2) { @@ -116932,7 +119917,7 @@ ${lanes.join("\n")} /* ReadonlyKeyword */ ) : void 0), e.name, - (isPropertySignature2(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken( + (isPropertySignature3(e) || isPropertyDeclaration(e) || isMethodSignature(e) || isMethodDeclaration(e) || isGetAccessor(e) || isSetAccessor(e)) && e.questionToken ? factory.createToken( 58 /* QuestionToken */ ) : void 0, @@ -117007,7 +119992,7 @@ ${lanes.join("\n")} } } function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 268 ? tryCast(declaration.name, isStringLiteral10) : getExternalModuleName(declaration); + const specifier = declaration.kind === 268 ? tryCast(declaration.name, isStringLiteral12) : getExternalModuleName(declaration); const moduleSymbol = resolveExternalModuleNameWorker( specifier, specifier, @@ -117315,7 +120300,7 @@ ${lanes.join("\n")} if (isParameter(node) && parameterIsThisKeyword(node)) { return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); } - const blockScopeKind = isVariableStatement8(node) ? node.declarationList.flags & 7 : 0; + const blockScopeKind = isVariableStatement10(node) ? node.declarationList.flags & 7 : 0; let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator; let flags = 0; let sawExportBeforeDecorators = false; @@ -117767,7 +120752,7 @@ ${lanes.join("\n")} } function checkGrammarForUseStrictSimpleParameterList(node) { if (languageVersion >= 3) { - const useStrictDirective = node.body && isBlock4(node.body) && findUseStrictPrologue(node.body.statements); + const useStrictDirective = node.body && isBlock5(node.body) && findUseStrictPrologue(node.body.statements); if (useStrictDirective) { const nonSimpleParameters = getNonSimpleParameters(node.parameters); if (length(nonSimpleParameters)) { @@ -117794,7 +120779,7 @@ ${lanes.join("\n")} return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file2); } function checkGrammarArrowFunction(node, file2) { - if (!isArrowFunction5(node)) { + if (!isArrowFunction6(node)) { return false; } if (node.typeParameters && !(length(node.typeParameters) > 1 || node.typeParameters.hasTrailingComma || node.typeParameters[0].constraint)) { @@ -117973,7 +120958,7 @@ ${lanes.join("\n")} if (prop.kind === 306) { if (inDestructuring) { const expression = skipParentheses(prop.expression); - if (isArrayLiteralExpression5(expression) || isObjectLiteralExpression6(expression)) { + if (isArrayLiteralExpression7(expression) || isObjectLiteralExpression9(expression)) { return grammarErrorOnNode(prop.expression, Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); } } @@ -118079,7 +121064,7 @@ ${lanes.join("\n")} } } function checkGrammarJsxName(node) { - if (isPropertyAccessExpression10(node) && isJsxNamespacedName(node.expression)) { + if (isPropertyAccessExpression12(node) && isJsxNamespacedName(node.expression)) { return grammarErrorOnNode(node.expression, Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names); } if (isJsxNamespacedName(node) && getJSXTransformEnabled(compilerOptions) && !isIntrinsicJsxName(node.namespace.escapedText)) { @@ -118145,7 +121130,7 @@ ${lanes.join("\n")} } } } - if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536) && isIdentifier17(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { + if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536) && isIdentifier21(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); return false; } @@ -118287,7 +121272,7 @@ ${lanes.join("\n")} } } function checkGrammarForInvalidDynamicName(node, message) { - if (isNonBindableDynamicName(node) && !isEntityNameExpression(isElementAccessExpression3(node) ? skipParentheses(node.argumentExpression) : node.expression)) { + if (isNonBindableDynamicName(node) && !isEntityNameExpression(isElementAccessExpression5(node) ? skipParentheses(node.argumentExpression) : node.expression)) { return grammarErrorOnNode(node, message); } } @@ -118393,7 +121378,7 @@ ${lanes.join("\n")} return expr.kind === 10 || expr.kind === 225 && expr.operator === 41 && expr.operand.kind === 10; } function isSimpleLiteralEnumReference(expr) { - if ((isPropertyAccessExpression10(expr) || isElementAccessExpression3(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { + if ((isPropertyAccessExpression12(expr) || isElementAccessExpression5(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { return !!(checkExpressionCached(expr).flags & 1056); } } @@ -118544,7 +121529,7 @@ ${lanes.join("\n")} break; case 102: if (escapedText !== "meta") { - const isCallee = isCallExpression9(node.parent) && node.parent.expression === node; + const isCallee = isCallExpression12(node.parent) && node.parent.expression === node; if (escapedText === "defer") { if (!isCallee) { return grammarErrorAtPos(node, node.end, 0, Diagnostics._0_expected, "("); @@ -118610,11 +121595,11 @@ ${lanes.join("\n")} } } function checkGrammarProperty(node) { - if (isComputedPropertyName(node.name) && isBinaryExpression2(node.name.expression) && node.name.expression.operatorToken.kind === 103) { + if (isComputedPropertyName(node.name) && isBinaryExpression4(node.name.expression) && node.name.expression.operatorToken.kind === 103) { return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); } if (isClassLike(node.parent)) { - if (isStringLiteral10(node.name) && node.name.text === "constructor") { + if (isStringLiteral12(node.name) && node.name.text === "constructor") { return grammarErrorOnNode(node.name, Diagnostics.Classes_may_not_have_a_field_named_constructor); } if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type)) { @@ -118633,15 +121618,15 @@ ${lanes.join("\n")} if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { return true; } - Debug.assertNode(node, isPropertySignature2); + Debug.assertNode(node, isPropertySignature3); if (node.initializer) { return grammarErrorOnNode(node.initializer, Diagnostics.An_interface_property_cannot_have_an_initializer); } - } else if (isTypeLiteralNode(node.parent)) { + } else if (isTypeLiteralNode2(node.parent)) { if (checkGrammarForInvalidDynamicName(node.name, 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)) { return true; } - Debug.assertNode(node, isPropertySignature2); + Debug.assertNode(node, isPropertySignature3); if (node.initializer) { return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); } @@ -118710,7 +121695,7 @@ ${lanes.join("\n")} ); } function checkGrammarBigIntLiteral(node) { - const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression2(node.parent) && isLiteralTypeNode(node.parent.parent); + const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression4(node.parent) && isLiteralTypeNode(node.parent.parent); if (!literalType) { if (!(node.flags & 33554432) && languageVersion < 7) { if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) { @@ -118804,7 +121789,7 @@ ${lanes.join("\n")} if (nodeArguments.length === 0 || nodeArguments.length > 2) { return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments); } - const spreadElement = find(nodeArguments, isSpreadElement3); + const spreadElement = find(nodeArguments, isSpreadElement5); if (spreadElement) { return grammarErrorOnNode(spreadElement, Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element); } @@ -118941,7 +121926,7 @@ ${lanes.join("\n")} switch (name.parent.kind) { case 277: case 282: - return isIdentifier17(name) || name.kind === 11; + return isIdentifier21(name) || name.kind === 11; default: return isDeclarationName(name); } @@ -119336,7 +122321,7 @@ ${lanes.join("\n")} Debug.assert(updated); const declarations = context.endBlockScope(); if (some(declarations)) { - if (isBlock4(updated)) { + if (isBlock5(updated)) { declarations.push(...updated.statements); return context.factory.updateBlock(updated, declarations); } @@ -119372,7 +122357,7 @@ ${lanes.join("\n")} return context.factory.updateQualifiedName( node, Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), - Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier21)) ); }, [ @@ -119392,7 +122377,7 @@ ${lanes.join("\n")} return context.factory.updateTypeParameterDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), nodeVisitor(node.constraint, visitor, isTypeNode), nodeVisitor(node.default, visitor, isTypeNode) ); @@ -119726,7 +122711,7 @@ ${lanes.join("\n")} return context.factory.updateNamedTupleMember( node, tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken, Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); @@ -119948,7 +122933,7 @@ ${lanes.join("\n")} node, nodesVisitor(node.modifiers, visitor, isModifier), tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, - nodeVisitor(node.name, visitor, isIdentifier17), + nodeVisitor(node.name, visitor, isIdentifier21), nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, isTypeNode), @@ -120083,7 +123068,7 @@ ${lanes.join("\n")} return context.factory.updateClassExpression( node, nodesVisitor(node.modifiers, visitor, isModifierLike), - nodeVisitor(node.name, visitor, isIdentifier17), + nodeVisitor(node.name, visitor, isIdentifier21), nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, isHeritageClause), nodesVisitor(node.members, visitor, isClassElement) @@ -120137,7 +123122,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateMetaProperty( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)) ); }, // Misc @@ -120252,7 +123237,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateContinueStatement( node, - nodeVisitor(node.label, visitor, isIdentifier17) + nodeVisitor(node.label, visitor, isIdentifier21) ); }, [ @@ -120261,7 +123246,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateBreakStatement( node, - nodeVisitor(node.label, visitor, isIdentifier17) + nodeVisitor(node.label, visitor, isIdentifier21) ); }, [ @@ -120299,7 +123284,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateLabeledStatement( node, - Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier21)), Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) ); }, @@ -120318,9 +123303,9 @@ ${lanes.join("\n")} ]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateTryStatement( node, - Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock4)), + Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock5)), nodeVisitor(node.catchClause, visitor, isCatchClause), - nodeVisitor(node.finallyBlock, visitor, isBlock4) + nodeVisitor(node.finallyBlock, visitor, isBlock5) ); }, [ @@ -120352,7 +123337,7 @@ ${lanes.join("\n")} node, nodesVisitor(node.modifiers, visitor, isModifier), tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, - nodeVisitor(node.name, visitor, isIdentifier17), + nodeVisitor(node.name, visitor, isIdentifier21), nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, isTypeNode), @@ -120366,7 +123351,7 @@ ${lanes.join("\n")} return context.factory.updateClassDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), - nodeVisitor(node.name, visitor, isIdentifier17), + nodeVisitor(node.name, visitor, isIdentifier21), nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, isHeritageClause), nodesVisitor(node.members, visitor, isClassElement) @@ -120379,7 +123364,7 @@ ${lanes.join("\n")} return context.factory.updateInterfaceDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, isHeritageClause), nodesVisitor(node.members, visitor, isTypeElement) @@ -120392,7 +123377,7 @@ ${lanes.join("\n")} return context.factory.updateTypeAliasDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) ); @@ -120404,7 +123389,7 @@ ${lanes.join("\n")} return context.factory.updateEnumDeclaration( node, nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), nodesVisitor(node.members, visitor, isEnumMember) ); }, @@ -120443,7 +123428,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExportDeclaration( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)) ); }, [ @@ -120454,7 +123439,7 @@ ${lanes.join("\n")} node, nodesVisitor(node.modifiers, visitor, isModifierLike), node.isTypeOnly, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) ); }, @@ -120497,7 +123482,7 @@ ${lanes.join("\n")} return context.factory.updateImportClause( node, node.phaseModifier, - nodeVisitor(node.name, visitor, isIdentifier17), + nodeVisitor(node.name, visitor, isIdentifier21), nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) ); }, @@ -120507,7 +123492,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceImport( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)) ); }, [ @@ -120516,7 +123501,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateNamespaceExport( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)) ); }, [ @@ -120536,7 +123521,7 @@ ${lanes.join("\n")} node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, isModuleExportName), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)) ); }, [ @@ -120641,8 +123626,8 @@ ${lanes.join("\n")} ]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateJsxNamespacedName( node, - Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier17)), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)) + Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier21)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)) ); }, [ @@ -120729,7 +123714,7 @@ ${lanes.join("\n")} return context.factory.updateCatchClause( node, nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration4), - Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock4)) + Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock5)) ); }, // Property assignments @@ -120749,7 +123734,7 @@ ${lanes.join("\n")} ]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { return context.factory.updateShorthandPropertyAssignment( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier17)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier21)), nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) ); }, @@ -121359,7 +124344,7 @@ ${lanes.join("\n")} } function containsDefaultReference(node) { if (!node) return false; - if (!isNamedImports3(node) && !isNamedExports(node)) return false; + if (!isNamedImports4(node) && !isNamedExports2(node)) return false; return some(node.elements, isNamedDefaultReference); } function isNamedDefaultReference(e) { @@ -121385,7 +124370,7 @@ ${lanes.join("\n")} if (!bindings) { return false; } - if (!isNamedImports3(bindings)) return false; + if (!isNamedImports4(bindings)) return false; let defaultRefCount = 0; for (const binding of bindings.elements) { if (isNamedDefaultReference(binding)) { @@ -121395,7 +124380,7 @@ ${lanes.join("\n")} return defaultRefCount > 0 && defaultRefCount !== bindings.elements.length || !!(bindings.elements.length - defaultRefCount) && isDefaultImport(node); } function getImportNeedsImportDefaultHelper(node) { - return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports3(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); + return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports4(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); } function collectExternalModuleInfo(context, sourceFile) { const resolver = context.getEmitResolver(); @@ -121434,7 +124419,7 @@ ${lanes.join("\n")} hasExportStarsToExportValues = true; } else { externalImports.push(node); - if (isNamedExports(node.exportClause)) { + if (isNamedExports2(node.exportClause)) { addExportedNamesForExportDeclaration(node); hasImportDefault || (hasImportDefault = containsDefaultReference(node.exportClause)); } else { @@ -121519,7 +124504,7 @@ ${lanes.join("\n")} } return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames, exportedFunctions, externalHelpersImportDeclaration }; function addExportedNamesForExportDeclaration(node) { - for (const specifier of cast(node.exportClause, isNamedExports).elements) { + for (const specifier of cast(node.exportClause, isNamedExports2).elements) { const specifierNameText = moduleExportNameTextUnescaped(specifier.name); if (!uniqueExports.get(specifierNameText)) { const name = specifier.propertyName || specifier.name; @@ -121542,7 +124527,7 @@ ${lanes.join("\n")} } } function addExportedFunctionDeclaration(node, name, isDefault) { - exportedFunctions.add(getOriginalNode(node, isFunctionDeclaration2)); + exportedFunctions.add(getOriginalNode(node, isFunctionDeclaration3)); if (isDefault) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name ?? context.factory.getDeclarationName(node)); @@ -121666,10 +124651,10 @@ ${lanes.join("\n")} } }; function isSimpleCopiableExpression(expression) { - return isStringLiteralLike(expression) || expression.kind === 9 || isKeyword(expression.kind) || isIdentifier17(expression); + return isStringLiteralLike(expression) || expression.kind === 9 || isKeyword(expression.kind) || isIdentifier21(expression); } function isSimpleInlineableExpression(expression) { - return !isIdentifier17(expression) && isSimpleCopiableExpression(expression); + return !isIdentifier21(expression) && isSimpleCopiableExpression(expression); } function isCompoundAssignment(kind) { return kind >= 65 && kind <= 79; @@ -121875,13 +124860,13 @@ ${lanes.join("\n")} return walkUpLexicalEnvironments(env2, (env22) => getPrivateIdentifier(env22.privateEnv, name)); } function isSimpleParameter(node) { - return !node.initializer && isIdentifier17(node.name); + return !node.initializer && isIdentifier21(node.name); } function isSimpleParameterList(nodes) { return every(nodes, isSimpleParameter); } function rewriteModuleSpecifier(node, compilerOptions) { - if (!node || !isStringLiteral10(node) || !shouldRewriteModuleSpecifier(node.text, compilerOptions)) { + if (!node || !isStringLiteral12(node) || !shouldRewriteModuleSpecifier(node.text, compilerOptions)) { return node; } const updatedText = changeExtension(node.text, getOutputExtension(node.text, compilerOptions)); @@ -121922,7 +124907,7 @@ ${lanes.join("\n")} if (value) { value = visitNode(value, visitor, isExpression); Debug.assert(value); - if (isIdentifier17(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { + if (isIdentifier21(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { value = ensureIdentifier( flattenContext, value, @@ -121961,7 +124946,7 @@ ${lanes.join("\n")} expressions = append(expressions, expression); } function emitBindingOrAssignment(target, value2, location2, original) { - Debug.assertNode(target, createAssignmentCallback ? isIdentifier17 : isExpression); + Debug.assertNode(target, createAssignmentCallback ? isIdentifier21 : isExpression); const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange( context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2), location2 @@ -121974,7 +124959,7 @@ ${lanes.join("\n")} const target = getTargetOfBindingOrAssignmentElement(element); if (isBindingOrAssignmentPattern(target)) { return bindingOrAssignmentPatternAssignsToName(target, escapedName); - } else if (isIdentifier17(target)) { + } else if (isIdentifier21(target)) { return target.escapedText === escapedName; } return false; @@ -122017,7 +125002,7 @@ ${lanes.join("\n")} }; if (isVariableDeclaration4(node)) { let initializer3 = getInitializerOfBindingOrAssignmentElement(node); - if (initializer3 && (isIdentifier17(initializer3) && bindingOrAssignmentElementAssignsToName(node, initializer3.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { + if (initializer3 && (isIdentifier21(initializer3) && bindingOrAssignmentElementAssignsToName(node, initializer3.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { initializer3 = ensureIdentifier( flattenContext, Debug.checkDefined(visitNode(initializer3, flattenContext.visitor, isExpression)), @@ -122251,7 +125236,7 @@ ${lanes.join("\n")} const initializer3 = getInitializerOfBindingOrAssignmentElement(element); if (initializer3 && !isSimpleInlineableExpression(initializer3)) return false; if (isBindingOrAssignmentPattern(target)) return every(getElementsOfBindingOrAssignmentPattern(target), isSimpleBindingOrAssignmentElement); - return isIdentifier17(target); + return isIdentifier21(target); } function createDefaultValueCheck(flattenContext, value, defaultValue, location) { value = ensureIdentifier( @@ -122292,7 +125277,7 @@ ${lanes.join("\n")} } } function ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location) { - if (isIdentifier17(value) && reuseIdentifierExpressions) { + if (isIdentifier21(value) && reuseIdentifierExpressions) { return value; } else { const temp = flattenContext.context.factory.createTempVariable( @@ -122364,7 +125349,7 @@ ${lanes.join("\n")} statement.expression, /*excludeCompoundAssignment*/ true - ) && isIdentifier17(statement.expression.left) && ((_a3 = node.emitNode) == null ? void 0 : _a3.classThis) === statement.expression.left && statement.expression.right.kind === 110; + ) && isIdentifier21(statement.expression.left) && ((_a3 = node.emitNode) == null ? void 0 : _a3.classThis) === statement.expression.left && statement.expression.right.kind === 110; } function classHasClassThisAssignment(node) { var _a3; @@ -122380,7 +125365,7 @@ ${lanes.join("\n")} } const members = factory2.createNodeArray([staticBlock, ...node.members]); setTextRange(members, node.members); - const updatedNode = isClassDeclaration3(node) ? factory2.updateClassDeclaration( + const updatedNode = isClassDeclaration5(node) ? factory2.updateClassDeclaration( node, node.modifiers, node.name, @@ -122400,7 +125385,7 @@ ${lanes.join("\n")} } function getAssignedNameOfIdentifier(factory2, name, expression) { const original = getOriginalNode(skipOuterExpressions(expression)); - if ((isClassDeclaration3(original) || isFunctionDeclaration2(original)) && !original.name && hasSyntacticModifier( + if ((isClassDeclaration5(original) || isFunctionDeclaration3(original)) && !original.name && hasSyntacticModifier( original, 2048 /* Default */ @@ -122419,7 +125404,7 @@ ${lanes.join("\n")} const assignedName2 = factory2.createStringLiteralFromNode(name); return { assignedName: assignedName2, name }; } - if (isPropertyNameLiteral(name.expression) && !isIdentifier17(name.expression)) { + if (isPropertyNameLiteral(name.expression) && !isIdentifier21(name.expression)) { const assignedName2 = factory2.createStringLiteralFromNode(name.expression); return { assignedName: assignedName2, name }; } @@ -122472,7 +125457,7 @@ ${lanes.join("\n")} const trailing = node.members.slice(insertionIndex); const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); setTextRange(members, node.members); - node = isClassDeclaration3(node) ? factory2.updateClassDeclaration( + node = isClassDeclaration5(node) ? factory2.updateClassDeclaration( node, node.modifiers, node.name, @@ -122491,7 +125476,7 @@ ${lanes.join("\n")} return node; } function finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) { - if (ignoreEmptyStringLiteral && isStringLiteral10(assignedName) && isEmptyStringLiteral(assignedName)) { + if (ignoreEmptyStringLiteral && isStringLiteral12(assignedName) && isEmptyStringLiteral(assignedName)) { return expression; } const { factory: factory2 } = context; @@ -122627,7 +125612,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } const { factory: factory2 } = context; - if (isNoSubstitutionTemplateLiteral2(template)) { + if (isNoSubstitutionTemplateLiteral4(template)) { cookedStrings.push(createTemplateCooked(factory2, template)); rawStrings.push(getRawLiteral(factory2, template, currentSourceFile)); } else { @@ -122800,7 +125785,7 @@ ${lanes.join("\n")} } function isElisionBlocked(node) { const parsed = getParseTreeNode(node); - if (parsed === node || isExportAssignment2(node)) { + if (parsed === node || isExportAssignment3(node)) { return false; } if (!parsed || parsed.kind !== node.kind) { @@ -122808,7 +125793,7 @@ ${lanes.join("\n")} } switch (node.kind) { case 273: - Debug.assertNode(parsed, isImportDeclaration5); + Debug.assertNode(parsed, isImportDeclaration6); if (node.importClause !== parsed.importClause) { return true; } @@ -122829,7 +125814,7 @@ ${lanes.join("\n")} } break; case 279: - Debug.assertNode(parsed, isExportDeclaration); + Debug.assertNode(parsed, isExportDeclaration2); if (node.exportClause !== parsed.exportClause) { return true; } @@ -123416,7 +126401,7 @@ ${lanes.join("\n")} return factory2.createIdentifier(""); } else if (isComputedPropertyName(name)) { return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) ? factory2.getGeneratedNameForNode(name) : name.expression; - } else if (isIdentifier17(name)) { + } else if (isIdentifier21(name)) { return factory2.createStringLiteral(idText(name)); } else { return factory2.cloneNode(name); @@ -123524,7 +126509,7 @@ ${lanes.join("\n")} superStatement, factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock4) + visitNode(superStatement.finallyBlock, visitor, isBlock5) )); } else { addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); @@ -123578,7 +126563,7 @@ ${lanes.join("\n")} } function transformParameterWithPropertyAssignment(node) { const name = node.name; - if (!isIdentifier17(name)) { + if (!isIdentifier21(name)) { return void 0; } const propertyName = setParent(setTextRange(factory2.cloneNode(name), name), name.parent); @@ -123823,7 +126808,7 @@ ${lanes.join("\n")} } function visitParenthesizedExpression(node) { const innerExpression = skipOuterExpressions(node.expression, ~(38 | 16)); - if (isAssertionExpression(innerExpression) || isSatisfiesExpression3(innerExpression)) { + if (isAssertionExpression(innerExpression) || isSatisfiesExpression5(innerExpression)) { const expression = visitNode(node.expression, visitor, isExpression); Debug.assert(expression); return factory2.createPartiallyEmittedExpression(expression, node); @@ -124062,7 +127047,7 @@ ${lanes.join("\n")} return true; } function declaredNameInScope(node) { - Debug.assertNode(node.name, isIdentifier17); + Debug.assertNode(node.name, isIdentifier21); return node.name.escapedText; } function addVarForEnumOrModuleDeclaration(statements, node) { @@ -124104,7 +127089,7 @@ ${lanes.join("\n")} if (!shouldEmitModuleDeclaration(node)) { return factory2.createNotEmittedStatement(node); } - Debug.assertNode(node.name, isIdentifier17, "A TypeScript namespace should have an Identifier name."); + Debug.assertNode(node.name, isIdentifier21, "A TypeScript namespace should have an Identifier name."); enableSubstitutionForNamespaceExports(); const statements = []; let emitFlags = 4; @@ -124318,7 +127303,7 @@ ${lanes.join("\n")} return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0; } function visitNamespaceExports(node) { - return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier17))); + return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier21))); } function visitNamedExportBindings(node, allowEmpty) { return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty); @@ -124521,7 +127506,7 @@ ${lanes.join("\n")} node = previousOnSubstituteNode(hint, node); if (hint === 1) { return substituteExpression(node); - } else if (isShorthandPropertyAssignment3(node)) { + } else if (isShorthandPropertyAssignment5(node)) { return substituteShorthandPropertyAssignment(node); } return node; @@ -124600,7 +127585,7 @@ ${lanes.join("\n")} if (getIsolatedModules(compilerOptions)) { return void 0; } - return isPropertyAccessExpression10(node) || isElementAccessExpression3(node) ? resolver.getConstantValue(node) : void 0; + return isPropertyAccessExpression12(node) || isElementAccessExpression5(node) ? resolver.getConstantValue(node) : void 0; } function shouldEmitAliasDeclaration(node) { return compilerOptions.verbatimModuleSyntax || isInJSFile(node) || resolver.isReferencedAliasDeclaration(node); @@ -124923,7 +127908,7 @@ ${lanes.join("\n")} } function injectPendingExpressions(expression) { if (some(pendingExpressions)) { - if (isParenthesizedExpression4(expression)) { + if (isParenthesizedExpression6(expression)) { pendingExpressions.push(expression.expression); expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions(pendingExpressions)); } else { @@ -125211,7 +128196,7 @@ ${lanes.join("\n")} ); } } - if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier17(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { + if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier21(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1) { return visitInvalidSuperProperty(node); @@ -125258,7 +128243,7 @@ ${lanes.join("\n")} ensureDynamicThisIfNeeded(receiver); const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); let expression = createPrivateIdentifierAccess(info, readExpression); - const temp = isPrefixUnaryExpression2(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); + const temp = isPrefixUnaryExpression4(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp); expression = createPrivateIdentifierAssignment( info, @@ -125279,13 +128264,13 @@ ${lanes.join("\n")} const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; if (facts & 1) { const expression = visitInvalidSuperProperty(operand); - return isPrefixUnaryExpression2(node) ? factory2.updatePrefixUnaryExpression(node, expression) : factory2.updatePostfixUnaryExpression(node, expression); + return isPrefixUnaryExpression4(node) ? factory2.updatePrefixUnaryExpression(node, expression) : factory2.updatePostfixUnaryExpression(node, expression); } if (classConstructor && superClassReference) { let setterName; let getterName; - if (isPropertyAccessExpression10(operand)) { - if (isIdentifier17(operand.name)) { + if (isPropertyAccessExpression12(operand)) { + if (isIdentifier21(operand.name)) { getterName = setterName = factory2.createStringLiteralFromNode(operand.name); } } else { @@ -125507,7 +128492,7 @@ ${lanes.join("\n")} ); } if (classConstructor && superClassReference) { - let setterName = isElementAccessExpression3(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier17(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; + let setterName = isElementAccessExpression5(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier21(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; if (setterName) { let expression = visitNode(node.right, visitor, isExpression); if (isCompoundAssignment(node.operatorToken.kind)) { @@ -125707,11 +128692,11 @@ ${lanes.join("\n")} const shouldAlwaysTransformPrivateStaticElements = getInternalEmitFlags(node) & 32; if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldAlwaysTransformPrivateStaticElements) { const name = getNameOfDeclaration(node); - if (name && isIdentifier17(name)) { + if (name && isIdentifier21(name)) { getPrivateIdentifierEnvironment().data.className = name; } else if ((_a3 = node.emitNode) == null ? void 0 : _a3.assignedName) { - if (isStringLiteral10(node.emitNode.assignedName)) { - if (node.emitNode.assignedName.textSourceNode && isIdentifier17(node.emitNode.assignedName.textSourceNode)) { + if (isStringLiteral12(node.emitNode.assignedName)) { + if (node.emitNode.assignedName.textSourceNode && isIdentifier21(node.emitNode.assignedName.textSourceNode)) { getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text); @@ -125981,7 +128966,7 @@ ${lanes.join("\n")} } let members = visitNodes2(node.members, classElementVisitor, isClassElement); let syntheticConstructor; - if (!some(members, isConstructorDeclaration)) { + if (!some(members, isConstructorDeclaration2)) { syntheticConstructor = transformConstructor( /*constructor*/ void 0, @@ -126053,7 +129038,7 @@ ${lanes.join("\n")} ); } function transformConstructor(constructor, container) { - constructor = visitNode(constructor, visitor, isConstructorDeclaration); + constructor = visitNode(constructor, visitor, isConstructorDeclaration2); if (!(lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) || !(lexicalEnvironment.data.facts & 16)) { return constructor; } @@ -126112,7 +129097,7 @@ ${lanes.join("\n")} superStatement, factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock4) + visitNode(superStatement.finallyBlock, visitor, isBlock5) )); } else { addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); @@ -126362,10 +129347,10 @@ ${lanes.join("\n")} return void 0; } let initializer3 = visitNode(property.initializer, visitor, isExpression); - if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier17(propertyName)) { + if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier21(propertyName)) { const localName = factory2.cloneNode(propertyName); if (initializer3) { - if (isParenthesizedExpression4(initializer3) && isCommaExpression(initializer3.expression) && isCallToHelper(initializer3.expression.left, "___runInitializers") && isVoidExpression(initializer3.expression.right) && isNumericLiteral3(initializer3.expression.right.expression)) { + if (isParenthesizedExpression6(initializer3) && isCommaExpression(initializer3.expression) && isCallToHelper(initializer3.expression.left, "___runInitializers") && isVoidExpression(initializer3.expression.right) && isNumericLiteral4(initializer3.expression.right.expression)) { initializer3 = initializer3.expression.left; } initializer3 = factory2.inlineExpressions([initializer3, localName]); @@ -126402,7 +129387,7 @@ ${lanes.join("\n")} const expression = factory2.createAssignment(memberAccess, initializer3); return expression; } else { - const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier17(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName; + const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier21(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName; const descriptor = factory2.createPropertyDescriptor({ value: initializer3, configurable: true, writable: true, enumerable: true }); return factory2.createObjectDefinePropertyCall(receiver, name, descriptor); } @@ -126471,7 +129456,7 @@ ${lanes.join("\n")} ); } function visitInvalidSuperProperty(node) { - return isPropertyAccessExpression10(node) ? factory2.updatePropertyAccessExpression( + return isPropertyAccessExpression12(node) ? factory2.updatePropertyAccessExpression( node, factory2.createVoidZero(), node.name @@ -126501,7 +129486,7 @@ ${lanes.join("\n")} } return factory2.createAssignment(generatedName, expression); } - return inlinable || isIdentifier17(innerExpression) ? void 0 : expression; + return inlinable || isIdentifier21(innerExpression) ? void 0 : expression; } } function startClassLexicalEnvironment() { @@ -126694,7 +129679,7 @@ ${lanes.join("\n")} ); } function visitDestructuringAssignmentTarget(node) { - if (isObjectLiteralExpression6(node) || isArrayLiteralExpression5(node)) { + if (isObjectLiteralExpression9(node) || isArrayLiteralExpression7(node)) { return visitAssignmentPattern(node); } if (isPrivateIdentifierPropertyAccessExpression(node)) { @@ -126704,7 +129689,7 @@ ${lanes.join("\n")} if (facts & 1) { return visitInvalidSuperProperty(node); } else if (classConstructor && superClassReference) { - const name = isElementAccessExpression3(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier17(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0; + const name = isElementAccessExpression5(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier21(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0; if (name) { const temp = factory2.createTempVariable( /*recordTempVariable*/ @@ -126748,7 +129733,7 @@ ${lanes.join("\n")} } function visitArrayAssignmentElement(node) { if (isArrayBindingOrAssignmentElement(node)) { - if (isSpreadElement3(node)) return visitAssignmentRestElement(node); + if (isSpreadElement5(node)) return visitAssignmentRestElement(node); if (!isOmittedExpression(node)) return visitAssignmentElement(node); } return visitEachChild(node, visitor, context); @@ -126784,13 +129769,13 @@ ${lanes.join("\n")} } function visitObjectAssignmentElement(node) { Debug.assertNode(node, isObjectBindingOrAssignmentElement); - if (isSpreadAssignment3(node)) return visitAssignmentRestProperty(node); - if (isShorthandPropertyAssignment3(node)) return visitShorthandAssignmentProperty(node); - if (isPropertyAssignment6(node)) return visitAssignmentProperty(node); + if (isSpreadAssignment5(node)) return visitAssignmentRestProperty(node); + if (isShorthandPropertyAssignment5(node)) return visitShorthandAssignmentProperty(node); + if (isPropertyAssignment8(node)) return visitAssignmentProperty(node); return visitEachChild(node, visitor, context); } function visitAssignmentPattern(node) { - if (isArrayLiteralExpression5(node)) { + if (isArrayLiteralExpression7(node)) { return factory2.updateArrayLiteralExpression( node, visitNodes2(node.elements, visitArrayAssignmentElement, isExpression) @@ -126819,7 +129804,7 @@ ${lanes.join("\n")} } switch (node.kind) { case 219: - if (isArrowFunction5(original) || getEmitFlags(node) & 524288) { + if (isArrowFunction6(original) || getEmitFlags(node) & 524288) { break; } // falls through @@ -127004,7 +129989,7 @@ ${lanes.join("\n")} const numParameters = parameters.length; for (let i = 0; i < numParameters; i++) { const parameter = parameters[i]; - if (i === 0 && isIdentifier17(parameter.name) && parameter.name.escapedText === "this") { + if (i === 0 && isIdentifier21(parameter.name) && parameter.name.escapedText === "this") { continue; } if (parameter.dotDotDotToken) { @@ -127175,7 +130160,7 @@ ${lanes.join("\n")} continue; } const serializedConstituent = serializeTypeNode(typeNode); - if (isIdentifier17(serializedConstituent) && serializedConstituent.escapedText === "Object") { + if (isIdentifier21(serializedConstituent) && serializedConstituent.escapedText === "Object") { return serializedConstituent; } if (serializedType) { @@ -127193,19 +130178,19 @@ ${lanes.join("\n")} // temp vars used in fallback isGeneratedIdentifier(left) ? isGeneratedIdentifier(right) : ( // entity names - isIdentifier17(left) ? isIdentifier17(right) && left.escapedText === right.escapedText : isPropertyAccessExpression10(left) ? isPropertyAccessExpression10(right) && equateSerializedTypeNodes(left.expression, right.expression) && equateSerializedTypeNodes(left.name, right.name) : ( + isIdentifier21(left) ? isIdentifier21(right) && left.escapedText === right.escapedText : isPropertyAccessExpression12(left) ? isPropertyAccessExpression12(right) && equateSerializedTypeNodes(left.expression, right.expression) && equateSerializedTypeNodes(left.name, right.name) : ( // `void 0` - isVoidExpression(left) ? isVoidExpression(right) && isNumericLiteral3(left.expression) && left.expression.text === "0" && isNumericLiteral3(right.expression) && right.expression.text === "0" : ( + isVoidExpression(left) ? isVoidExpression(right) && isNumericLiteral4(left.expression) && left.expression.text === "0" && isNumericLiteral4(right.expression) && right.expression.text === "0" : ( // `"undefined"` or `"function"` in `typeof` checks - isStringLiteral10(left) ? isStringLiteral10(right) && left.text === right.text : ( + isStringLiteral12(left) ? isStringLiteral12(right) && left.text === right.text : ( // used in `typeof` checks for fallback isTypeOfExpression(left) ? isTypeOfExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) : ( // parens in `typeof` checks with temps - isParenthesizedExpression4(left) ? isParenthesizedExpression4(right) && equateSerializedTypeNodes(left.expression, right.expression) : ( + isParenthesizedExpression6(left) ? isParenthesizedExpression6(right) && equateSerializedTypeNodes(left.expression, right.expression) : ( // conditionals used in fallback - isConditionalExpression2(left) ? isConditionalExpression2(right) && equateSerializedTypeNodes(left.condition, right.condition) && equateSerializedTypeNodes(left.whenTrue, right.whenTrue) && equateSerializedTypeNodes(left.whenFalse, right.whenFalse) : ( + isConditionalExpression4(left) ? isConditionalExpression4(right) && equateSerializedTypeNodes(left.condition, right.condition) && equateSerializedTypeNodes(left.whenTrue, right.whenTrue) && equateSerializedTypeNodes(left.whenFalse, right.whenFalse) : ( // logical binary and assignments used in fallback - isBinaryExpression2(left) ? isBinaryExpression2(right) && left.operatorToken.kind === right.operatorToken.kind && equateSerializedTypeNodes(left.left, right.left) && equateSerializedTypeNodes(left.right, right.right) : false + isBinaryExpression4(left) ? isBinaryExpression4(right) && left.operatorToken.kind === right.operatorToken.kind && equateSerializedTypeNodes(left.left, right.left) && equateSerializedTypeNodes(left.right, right.right) : false ) ) ) @@ -127570,7 +130555,7 @@ ${lanes.join("\n")} node, visitNodes2(node.modifiers, modifierVisitor, isModifier), visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ); } function finishClassElement(updated, original) { @@ -127594,7 +130579,7 @@ ${lanes.join("\n")} visitNodes2(node.parameters, visitor, isParameter), /*type*/ void 0, - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ), node ); @@ -127608,7 +130593,7 @@ ${lanes.join("\n")} visitNodes2(node.parameters, visitor, isParameter), /*type*/ void 0, - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ), node ); @@ -127620,7 +130605,7 @@ ${lanes.join("\n")} visitNodes2(node.modifiers, modifierVisitor, isModifier), Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ), node ); @@ -127812,7 +130797,7 @@ ${lanes.join("\n")} return factory2.createIdentifier(""); } else if (isComputedPropertyName(name)) { return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) ? factory2.getGeneratedNameForNode(name) : name.expression; - } else if (isIdentifier17(name)) { + } else if (isIdentifier21(name)) { return factory2.createStringLiteral(idText(name)); } else { return factory2.cloneNode(name); @@ -128158,7 +131143,7 @@ ${lanes.join("\n")} } } function getHelperVariableName(node) { - let declarationName = node.name && isIdentifier17(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name) : node.name && isPrivateIdentifier(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name).slice(1) : node.name && isStringLiteral10(node.name) && isIdentifierText( + let declarationName = node.name && isIdentifier21(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name) : node.name && isPrivateIdentifier(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name).slice(1) : node.name && isStringLiteral12(node.name) && isIdentifierText( node.name.text, 99 /* ESNext */ @@ -128363,7 +131348,7 @@ ${lanes.join("\n")} /* FileLevel */ ); const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression4(unwrapped) && !unwrapped.name || isArrowFunction5(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; + const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression5(unwrapped) && !unwrapped.name || isArrowFunction6(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( extendsElement, @@ -128378,8 +131363,8 @@ ${lanes.join("\n")} enterClass(classInfo2); leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper)); let members = node.members; - members = visitNodes2(members, (node2) => isConstructorDeclaration(node2) ? node2 : classElementVisitor(node2), isClassElement); - members = visitNodes2(members, (node2) => isConstructorDeclaration(node2) ? classElementVisitor(node2) : node2, isClassElement); + members = visitNodes2(members, (node2) => isConstructorDeclaration2(node2) ? node2 : classElementVisitor(node2), isClassElement); + members = visitNodes2(members, (node2) => isConstructorDeclaration2(node2) ? classElementVisitor(node2) : node2, isClassElement); if (pendingExpressions) { let outerThis; for (let expression of pendingExpressions) { @@ -128804,7 +131789,7 @@ ${lanes.join("\n")} superStatement, factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock4) + visitNode(superStatement.finallyBlock, visitor, isBlock5) )); } else { addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); @@ -128844,7 +131829,7 @@ ${lanes.join("\n")} setTextRange(body, node.body); } } - body ?? (body = visitNode(node.body, visitor, isBlock4)); + body ?? (body = visitNode(node.body, visitor, isBlock5)); exitClassElement(); return factory2.updateConstructorDeclaration(node, modifiers, parameters, body); } @@ -128888,13 +131873,13 @@ ${lanes.join("\n")} const statements = isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member) ? isStatic(member) ? classInfo2.staticNonFieldDecorationStatements ?? (classInfo2.staticNonFieldDecorationStatements = []) : classInfo2.nonStaticNonFieldDecorationStatements ?? (classInfo2.nonStaticNonFieldDecorationStatements = []) : isPropertyDeclaration(member) && !isAutoAccessorPropertyDeclaration(member) ? isStatic(member) ? classInfo2.staticFieldDecorationStatements ?? (classInfo2.staticFieldDecorationStatements = []) : classInfo2.nonStaticFieldDecorationStatements ?? (classInfo2.nonStaticFieldDecorationStatements = []) : Debug.fail(); const kind = isGetAccessorDeclaration(member) ? "getter" : isSetAccessorDeclaration(member) ? "setter" : isMethodDeclaration(member) ? "method" : isAutoAccessorPropertyDeclaration(member) ? "accessor" : isPropertyDeclaration(member) ? "field" : Debug.fail(); let propertyName; - if (isIdentifier17(member.name) || isPrivateIdentifier(member.name)) { + if (isIdentifier21(member.name) || isPrivateIdentifier(member.name)) { propertyName = { computed: false, name: member.name }; } else if (isPropertyNameLiteral(member.name)) { propertyName = { computed: true, name: factory2.createStringLiteralFromNode(member.name) }; } else { const expression = member.name.expression; - if (isPropertyNameLiteral(expression) && !isIdentifier17(expression)) { + if (isPropertyNameLiteral(expression) && !isIdentifier21(expression)) { propertyName = { computed: true, name: factory2.createStringLiteralFromNode(expression) }; } else { enterName(); @@ -128981,7 +131966,7 @@ ${lanes.join("\n")} return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); } else { const parameters = visitNodes2(node.parameters, visitor, isParameter); - const body = visitNode(node.body, visitor, isBlock4); + const body = visitNode(node.body, visitor, isBlock5); exitClassElement(); return finishClassElement(factory2.updateMethodDeclaration( node, @@ -129007,7 +131992,7 @@ ${lanes.join("\n")} return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); } else { const parameters = visitNodes2(node.parameters, visitor, isParameter); - const body = visitNode(node.body, visitor, isBlock4); + const body = visitNode(node.body, visitor, isBlock5); exitClassElement(); return finishClassElement(factory2.updateGetAccessorDeclaration( node, @@ -129028,7 +132013,7 @@ ${lanes.join("\n")} return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); } else { const parameters = visitNodes2(node.parameters, visitor, isParameter); - const body = visitNode(node.body, visitor, isBlock4); + const body = visitNode(node.body, visitor, isBlock5); exitClassElement(); return finishClassElement(factory2.updateSetAccessorDeclaration(node, modifiers, name, parameters, body), node); } @@ -129219,7 +132204,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitPropertyAccessExpression(node) { - if (isSuperProperty(node) && isIdentifier17(node.name) && classThis && classSuper) { + if (isSuperProperty(node) && isIdentifier21(node.name) && classThis && classSuper) { const propertyName = factory2.createStringLiteralFromNode(node.name); const superProperty = factory2.createReflectGetCall(classSuper, propertyName, classThis); setOriginalNode(superProperty, node.expression); @@ -129301,7 +132286,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } if (isSuperProperty(node.left) && classThis && classSuper) { - let setterName = isElementAccessExpression3(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier17(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; + let setterName = isElementAccessExpression5(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier21(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; if (setterName) { let expression = visitNode(node.right, visitor, isExpression); if (isCompoundAssignment(node.operatorToken.kind)) { @@ -129356,7 +132341,7 @@ ${lanes.join("\n")} if (node.operator === 46 || node.operator === 47) { const operand = skipParentheses(node.operand); if (isSuperProperty(operand) && classThis && classSuper) { - let setterName = isElementAccessExpression3(operand) ? visitNode(operand.argumentExpression, visitor, isExpression) : isIdentifier17(operand.name) ? factory2.createStringLiteralFromNode(operand.name) : void 0; + let setterName = isElementAccessExpression5(operand) ? visitNode(operand.argumentExpression, visitor, isExpression) : isIdentifier21(operand.name) ? factory2.createStringLiteralFromNode(operand.name) : void 0; if (setterName) { let getterName = setterName; if (!isSimpleInlineableExpression(setterName)) { @@ -129391,7 +132376,7 @@ ${lanes.join("\n")} const name2 = visitNode(node, visitor, isPropertyName); return { referencedName: referencedName2, name: name2 }; } - if (isPropertyNameLiteral(node.expression) && !isIdentifier17(node.expression)) { + if (isPropertyNameLiteral(node.expression) && !isIdentifier21(node.expression)) { const referencedName2 = factory2.createStringLiteralFromNode(node.expression); const name2 = visitNode(node, visitor, isPropertyName); return { referencedName: referencedName2, name: name2 }; @@ -129435,11 +132420,11 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitDestructuringAssignmentTarget(node) { - if (isObjectLiteralExpression6(node) || isArrayLiteralExpression5(node)) { + if (isObjectLiteralExpression9(node) || isArrayLiteralExpression7(node)) { return visitAssignmentPattern(node); } if (isSuperProperty(node) && classThis && classSuper) { - const propertyName = isElementAccessExpression3(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier17(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0; + const propertyName = isElementAccessExpression5(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier21(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0; if (propertyName) { const paramName = factory2.createTempVariable( /*recordTempVariable*/ @@ -129486,7 +132471,7 @@ ${lanes.join("\n")} } function visitArrayAssignmentElement(node) { Debug.assertNode(node, isArrayBindingOrAssignmentElement); - if (isSpreadElement3(node)) return visitAssignmentRestElement(node); + if (isSpreadElement5(node)) return visitAssignmentRestElement(node); if (!isOmittedExpression(node)) return visitAssignmentElement(node); return visitEachChild(node, visitor, context); } @@ -129521,13 +132506,13 @@ ${lanes.join("\n")} } function visitObjectAssignmentElement(node) { Debug.assertNode(node, isObjectBindingOrAssignmentElement); - if (isSpreadAssignment3(node)) return visitAssignmentRestProperty(node); - if (isShorthandPropertyAssignment3(node)) return visitShorthandAssignmentProperty(node); - if (isPropertyAssignment6(node)) return visitAssignmentProperty(node); + if (isSpreadAssignment5(node)) return visitAssignmentRestProperty(node); + if (isShorthandPropertyAssignment5(node)) return visitShorthandAssignmentProperty(node); + if (isPropertyAssignment8(node)) return visitAssignmentProperty(node); return visitEachChild(node, visitor, context); } function visitAssignmentPattern(node) { - if (isArrayLiteralExpression5(node)) { + if (isArrayLiteralExpression7(node)) { const elements = visitNodes2(node.elements, visitArrayAssignmentElement, isExpression); return factory2.updateArrayLiteralExpression(node, elements); } else { @@ -129554,7 +132539,7 @@ ${lanes.join("\n")} function injectPendingExpressionsCommon(pendingExpressions2, expression) { if (some(pendingExpressions2)) { if (expression) { - if (isParenthesizedExpression4(expression)) { + if (isParenthesizedExpression6(expression)) { pendingExpressions2.push(expression.expression); expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions(pendingExpressions2)); } else { @@ -129660,7 +132645,7 @@ ${lanes.join("\n")} node.asteriskToken, "value", visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ) ]); } @@ -129674,7 +132659,7 @@ ${lanes.join("\n")} void 0, "get", [], - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ) ]); } @@ -129688,7 +132673,7 @@ ${lanes.join("\n")} void 0, "set", visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ) ]); } @@ -129983,7 +132968,7 @@ ${lanes.join("\n")} case 220: return doWithContext(1, visitArrowFunction, node); case 212: - if (capturedSuperProperties && isPropertyAccessExpression10(node) && node.expression.kind === 108) { + if (capturedSuperProperties && isPropertyAccessExpression12(node) && node.expression.kind === 108) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); @@ -130242,7 +133227,7 @@ ${lanes.join("\n")} ); } function recordDeclarationName({ name }, names) { - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { names.add(name.escapedText); } else { for (const element of name.elements) { @@ -130270,7 +133255,7 @@ ${lanes.join("\n")} forEach(node.declarations, hoistVariable); } function hoistVariable({ name }) { - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { hoistVariableDeclaration(name); } else { for (const element of name.elements) { @@ -130291,7 +133276,7 @@ ${lanes.join("\n")} return Debug.checkDefined(visitNode(converted, visitor, isExpression)); } function collidesWithParameterName({ name }) { - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { return enclosingFunctionParameterNames.has(name.escapedText); } else { for (const element of name.elements) { @@ -130439,7 +133424,7 @@ ${lanes.join("\n")} Debug.assert(i < outerParameters.length); const originalParameter = node.parameters[i]; const outerParameter = outerParameters[i]; - Debug.assertNode(outerParameter.name, isIdentifier17); + Debug.assertNode(outerParameter.name, isIdentifier21); if (originalParameter.initializer || originalParameter.dotDotDotToken) { Debug.assert(i === outerParameters.length - 1); parameterBindings.push(factory2.createSpreadElement(outerParameter.name)); @@ -130544,7 +133529,7 @@ ${lanes.join("\n")} return result; } function transformAsyncFunctionBodyWorker(body, start) { - if (isBlock4(body)) { + if (isBlock5(body)) { return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start)); } else { return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody))); @@ -130674,7 +133659,7 @@ ${lanes.join("\n")} function substituteCallExpression(node) { const expression = node.expression; if (isSuperProperty(expression)) { - const argumentExpression = isPropertyAccessExpression10(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); + const argumentExpression = isPropertyAccessExpression12(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); return factory2.createCallExpression( factory2.createPropertyAccessExpression(argumentExpression, "call"), /*typeArguments*/ @@ -131059,7 +134044,7 @@ ${lanes.join("\n")} case 216: return visitTaggedTemplateExpression(node); case 212: - if (capturedSuperProperties && isPropertyAccessExpression10(node) && node.expression.kind === 108) { + if (capturedSuperProperties && isPropertyAccessExpression12(node) && node.expression.kind === 108) { capturedSuperProperties.add(node.name.escapedText); } return visitEachChild(node, visitor, context); @@ -131300,7 +134285,7 @@ ${lanes.join("\n")} 1 /* ObjectRest */ ); - let block = visitNode(node.block, visitor, isBlock4); + let block = visitNode(node.block, visitor, isBlock5); if (some(visitedBindings)) { block = factory2.updateBlock(block, [ factory2.createVariableStatement( @@ -131409,7 +134394,7 @@ ${lanes.join("\n")} void 0 ); const statements = [createForOfBindingStatement(factory2, initializerWithoutParens, temp)]; - if (isBlock4(node.statement)) { + if (isBlock5(node.statement)) { addRange(statements, node.statement.statements); bodyLocation = node.statement; statementsLocation = node.statement.statements; @@ -131458,7 +134443,7 @@ ${lanes.join("\n")} let bodyLocation; let statementsLocation; const statement = visitIterationBody(node.statement, visitor, context); - if (isBlock4(statement)) { + if (isBlock5(statement)) { addRange(statements, statement.statements); bodyLocation = statement; statementsLocation = statement.statements; @@ -131483,11 +134468,11 @@ ${lanes.join("\n")} } function transformForAwaitOfStatement(node, outermostLabeledStatement, ancestorFacts) { const expression = visitNode(node.expression, visitor, isExpression); - const iterator = isIdentifier17(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( + const iterator = isIdentifier21(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( /*recordTempVariable*/ void 0 ); - const result = isIdentifier17(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable( + const result = isIdentifier21(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable( /*recordTempVariable*/ void 0 ); @@ -131914,7 +134899,7 @@ ${lanes.join("\n")} let statementOffset = 0; const statements = []; const body = visitNode(node.body, visitor, isConciseBody) ?? factory2.createBlock([]); - if (isBlock4(body)) { + if (isBlock5(body)) { statementOffset = factory2.copyPrologue( body.statements, statements, @@ -132164,7 +135149,7 @@ ${lanes.join("\n")} function substituteCallExpression(node) { const expression = node.expression; if (isSuperProperty(expression)) { - const argumentExpression = isPropertyAccessExpression10(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); + const argumentExpression = isPropertyAccessExpression12(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); return factory2.createCallExpression( factory2.createPropertyAccessExpression(argumentExpression, "call"), /*typeArguments*/ @@ -132236,7 +135221,7 @@ ${lanes.join("\n")} /*recordTempVariable*/ void 0 )), - visitNode(node.block, visitor, isBlock4) + visitNode(node.block, visitor, isBlock5) ); } return visitEachChild(node, visitor, context); @@ -132296,7 +135281,7 @@ ${lanes.join("\n")} function flattenChain(chain) { Debug.assertNotNode(chain, isNonNullChain); const links = [chain]; - while (!chain.questionDotToken && !isTaggedTemplateExpression2(chain)) { + while (!chain.questionDotToken && !isTaggedTemplateExpression4(chain)) { chain = cast(skipPartiallyEmittedExpressions(chain.expression), isOptionalChain); Debug.assertNotNode(chain, isNonNullChain); links.unshift(chain); @@ -132325,7 +135310,7 @@ ${lanes.join("\n")} thisArg = expression; } } - expression = node.kind === 212 ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier17)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); + expression = node.kind === 212 ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier21)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; } function visitNonOptionalCallExpression(node, captureThisArg) { @@ -132337,7 +135322,7 @@ ${lanes.join("\n")} false ); } - if (isParenthesizedExpression4(node.expression) && isOptionalChain(skipParentheses(node.expression))) { + if (isParenthesizedExpression6(node.expression) && isOptionalChain(skipParentheses(node.expression))) { const expression = visitNonOptionalParenthesizedExpression( node.expression, /*captureThisArg*/ @@ -132407,7 +135392,7 @@ ${lanes.join("\n")} thisArg = rightExpression; } } - rightExpression = segment.kind === 212 ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier17)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); + rightExpression = segment.kind === 212 ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier21)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); break; case 214: if (i === 0 && leftThisArg) { @@ -132554,7 +135539,7 @@ ${lanes.join("\n")} propertyAccessTarget, left.expression ); - if (isPropertyAccessExpression10(left)) { + if (isPropertyAccessExpression12(left)) { assignmentTarget = factory2.createPropertyAccessExpression( propertyAccessTarget, left.name @@ -132793,7 +135778,7 @@ ${lanes.join("\n")} /* Const */ ), node.expression, - isBlock4(node.statement) ? factory2.updateBlock(node.statement, [ + isBlock5(node.statement) ? factory2.updateBlock(node.statement, [ usingVarStatement, ...node.statement.statements ]) : factory2.createBlock( @@ -132872,10 +135857,10 @@ ${lanes.join("\n")} const statement = statementsIn[i]; const usingKind = getUsingKind(statement); if (usingKind) { - Debug.assertNode(statement, isVariableStatement8); + Debug.assertNode(statement, isVariableStatement10); const declarations = []; for (let declaration of statement.declarationList.declarations) { - if (!isIdentifier17(declaration.name)) { + if (!isIdentifier21(declaration.name)) { declarations.length = 0; break; } @@ -133084,7 +136069,7 @@ ${lanes.join("\n")} function hoistInitializedVariable(node) { Debug.assertIsDefined(node.initializer); let target; - if (isIdentifier17(node.name)) { + if (isIdentifier21(node.name)) { target = factory2.cloneNode(node.name); setEmitFlags(target, getEmitFlags(target) & ~(32768 | 16384 | 65536)); } else { @@ -133257,7 +136242,7 @@ ${lanes.join("\n")} return getUsingKindOfVariableDeclarationList(node.declarationList); } function getUsingKind(statement) { - return isVariableStatement8(statement) ? getUsingKindOfVariableStatement(statement) : 0; + return isVariableStatement10(statement) ? getUsingKindOfVariableStatement(statement) : 0; } function getUsingKindOfStatements(statements) { let result = 0; @@ -133497,15 +136482,15 @@ ${lanes.join("\n")} } function hasProto(obj) { return obj.properties.some( - (p) => isPropertyAssignment6(p) && (isIdentifier17(p.name) && idText(p.name) === "__proto__" || isStringLiteral10(p.name) && p.name.text === "__proto__") + (p) => isPropertyAssignment8(p) && (isIdentifier21(p.name) && idText(p.name) === "__proto__" || isStringLiteral12(p.name) && p.name.text === "__proto__") ); } function hasKeyAfterPropsSpread(node) { let spread = false; for (const elem of node.attributes.properties) { - if (isJsxSpreadAttribute(elem) && (!isObjectLiteralExpression6(elem.expression) || elem.expression.properties.some(isSpreadAssignment3))) { + if (isJsxSpreadAttribute(elem) && (!isObjectLiteralExpression9(elem.expression) || elem.expression.properties.some(isSpreadAssignment5))) { spread = true; - } else if (spread && isJsxAttribute(elem) && isIdentifier17(elem.name) && elem.name.escapedText === "key") { + } else if (spread && isJsxAttribute(elem) && isIdentifier21(elem.name) && elem.name.escapedText === "key") { return true; } } @@ -133561,7 +136546,7 @@ ${lanes.join("\n")} function visitJsxOpeningLikeElementJSX(node, children, isChild, location) { const tagName = getTagName(node); const childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : void 0; - const keyAttr = find(node.attributes.properties, (p) => !!p.name && isIdentifier17(p.name) && p.name.escapedText === "key"); + const keyAttr = find(node.attributes.properties, (p) => !!p.name && isIdentifier21(p.name) && p.name.escapedText === "key"); const attrs = keyAttr ? filter(node.attributes.properties, (p) => p !== keyAttr) : node.attributes.properties; const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) : factory2.createObjectLiteralExpression(childrenProp ? [childrenProp] : emptyArray); return visitJsxOpeningLikeElementOrFragmentJSX( @@ -133670,7 +136655,7 @@ ${lanes.join("\n")} return element; } function transformJsxSpreadAttributeToProps(node) { - if (isObjectLiteralExpression6(node.expression) && !hasProto(node.expression)) { + if (isObjectLiteralExpression9(node.expression) && !hasProto(node.expression)) { return sameMap(node.expression.properties, (p) => Debug.checkDefined(visitNode(p, visitor, isObjectLiteralElementLike))); } return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); @@ -133691,9 +136676,9 @@ ${lanes.join("\n")} let properties = []; for (const attr of attrs) { if (isJsxSpreadAttribute(attr)) { - if (isObjectLiteralExpression6(attr.expression) && !hasProto(attr.expression)) { + if (isObjectLiteralExpression9(attr.expression) && !hasProto(attr.expression)) { for (const prop of attr.expression.properties) { - if (isSpreadAssignment3(prop)) { + if (isSpreadAssignment5(prop)) { finishObjectLiteralIfNeeded(); expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); continue; @@ -133712,7 +136697,7 @@ ${lanes.join("\n")} properties.push(children); } finishObjectLiteralIfNeeded(); - if (expressions.length && !isObjectLiteralExpression6(expressions[0])) { + if (expressions.length && !isObjectLiteralExpression9(expressions[0])) { expressions.unshift(factory2.createObjectLiteralExpression()); } return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions); @@ -133815,7 +136800,7 @@ ${lanes.join("\n")} return getTagName(node.openingElement); } else { const tagName = node.tagName; - if (isIdentifier17(tagName) && isIntrinsicJsxName(tagName.escapedText)) { + if (isIdentifier21(tagName) && isIntrinsicJsxName(tagName.escapedText)) { return factory2.createStringLiteral(idText(tagName)); } else if (isJsxNamespacedName(tagName)) { return factory2.createStringLiteral(idText(tagName.namespace) + ":" + idText(tagName.name)); @@ -133826,7 +136811,7 @@ ${lanes.join("\n")} } function getAttributeName(node) { const name = node.name; - if (isIdentifier17(name)) { + if (isIdentifier21(name)) { const text = idText(name); return /^[A-Z_]\w*$/i.test(text) ? name : factory2.createStringLiteral(text); } @@ -134130,7 +137115,7 @@ ${lanes.join("\n")} let value; const left = visitNode(node.left, visitor, isExpression); const right = visitNode(node.right, visitor, isExpression); - if (isElementAccessExpression3(left)) { + if (isElementAccessExpression5(left)) { const expressionTemp = factory2.createTempVariable(hoistVariableDeclaration); const argumentExpressionTemp = factory2.createTempVariable(hoistVariableDeclaration); target = setTextRange( @@ -134147,7 +137132,7 @@ ${lanes.join("\n")} ), left ); - } else if (isPropertyAccessExpression10(left)) { + } else if (isPropertyAccessExpression12(left)) { const expressionTemp = factory2.createTempVariable(hoistVariableDeclaration); target = setTextRange( factory2.createPropertyAccessExpression( @@ -134238,11 +137223,11 @@ ${lanes.join("\n")} return (hierarchyFacts & 8192) !== 0 && node.kind === 254 && !node.expression; } function isOrMayContainReturnCompletion(node) { - return node.transformFlags & 4194304 && (isReturnStatement2(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( + return node.transformFlags & 4194304 && (isReturnStatement3(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( node, /*lookInLabeledStatements*/ false - ) || isBlock4(node)); + ) || isBlock5(node)); } function shouldVisitNode(node) { return (node.transformFlags & 1024) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 && isOrMayContainReturnCompletion(node) || isIterationStatement( @@ -134841,7 +137826,7 @@ ${lanes.join("\n")} return block; } function isUninitializedVariableStatement(node) { - return isVariableStatement8(node) && every(node.declarationList.declarations, (decl) => isIdentifier17(decl.name) && !decl.initializer); + return isVariableStatement10(node) && every(node.declarationList.declarations, (decl) => isIdentifier21(decl.name) && !decl.initializer); } function containsSuperCall(node) { if (isSuperCall(node)) { @@ -134925,7 +137910,7 @@ ${lanes.join("\n")} return isGeneratedIdentifier(node) && idText(node) === "_super"; } function isThisCapturingVariableStatement(node) { - return isVariableStatement8(node) && node.declarationList.declarations.length === 1 && isThisCapturingVariableDeclaration(node.declarationList.declarations[0]); + return isVariableStatement10(node) && node.declarationList.declarations.length === 1 && isThisCapturingVariableDeclaration(node.declarationList.declarations[0]); } function isThisCapturingVariableDeclaration(node) { return isVariableDeclaration4(node) && isCapturedThis(node.name) && !!node.initializer; @@ -134938,16 +137923,16 @@ ${lanes.join("\n")} ) && isCapturedThis(node.left); } function isTransformedSuperCall(node) { - return isCallExpression9(node) && isPropertyAccessExpression10(node.expression) && isSyntheticSuper(node.expression.expression) && isIdentifier17(node.expression.name) && (idText(node.expression.name) === "call" || idText(node.expression.name) === "apply") && node.arguments.length >= 1 && node.arguments[0].kind === 110; + return isCallExpression12(node) && isPropertyAccessExpression12(node.expression) && isSyntheticSuper(node.expression.expression) && isIdentifier21(node.expression.name) && (idText(node.expression.name) === "call" || idText(node.expression.name) === "apply") && node.arguments.length >= 1 && node.arguments[0].kind === 110; } function isTransformedSuperCallWithFallback(node) { - return isBinaryExpression2(node) && node.operatorToken.kind === 57 && node.right.kind === 110 && isTransformedSuperCall(node.left); + return isBinaryExpression4(node) && node.operatorToken.kind === 57 && node.right.kind === 110 && isTransformedSuperCall(node.left); } function isImplicitSuperCall(node) { - return isBinaryExpression2(node) && node.operatorToken.kind === 56 && isBinaryExpression2(node.left) && node.left.operatorToken.kind === 38 && isSyntheticSuper(node.left.left) && node.left.right.kind === 106 && isTransformedSuperCall(node.right) && idText(node.right.expression.name) === "apply"; + return isBinaryExpression4(node) && node.operatorToken.kind === 56 && isBinaryExpression4(node.left) && node.left.operatorToken.kind === 38 && isSyntheticSuper(node.left.left) && node.left.right.kind === 106 && isTransformedSuperCall(node.right) && idText(node.right.expression.name) === "apply"; } function isImplicitSuperCallWithFallback(node) { - return isBinaryExpression2(node) && node.operatorToken.kind === 57 && node.right.kind === 110 && isImplicitSuperCall(node.left); + return isBinaryExpression4(node) && node.operatorToken.kind === 57 && node.right.kind === 110 && isImplicitSuperCall(node.left); } function isThisCapturingTransformedSuperCallWithFallback(node) { return isThisCapturingAssignment(node) && isTransformedSuperCallWithFallback(node.right); @@ -135024,7 +138009,7 @@ ${lanes.join("\n")} const canElideThisCapturingVariable = !(original.transformFlags & 16384) && !(hierarchyFacts & 65536) && !(hierarchyFacts & 131072); for (let i = body.statements.length - 1; i > 0; i--) { const statement = body.statements[i]; - if (isReturnStatement2(statement) && statement.expression && isCapturedThis(statement.expression)) { + if (isReturnStatement3(statement) && statement.expression && isCapturedThis(statement.expression)) { const preceding = body.statements[i - 1]; let expression; if (isExpressionStatement(preceding) && isThisCapturingTransformedSuperCallWithFallback(skipOuterExpressions(preceding.expression))) { @@ -135110,7 +138095,7 @@ ${lanes.join("\n")} return factory2.updateBlock(body, visitNodes2(body.statements, elideUnusedThisCaptureWorker, isStatement)); } function injectSuperPresenceCheckWorker(node) { - if (isTransformedSuperCall(node) && node.arguments.length === 2 && isIdentifier17(node.arguments[1]) && idText(node.arguments[1]) === "arguments") { + if (isTransformedSuperCall(node) && node.arguments.length === 2 && isIdentifier21(node.arguments[1]) && idText(node.arguments[1]) === "arguments") { return factory2.createLogicalAnd( factory2.createStrictInequality( createSyntheticSuper(), @@ -135636,7 +138621,7 @@ ${lanes.join("\n")} Debug.assert(propertyName); let e; if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) { - const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier17(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName; + const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier21(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName; e = factory2.createObjectDefinePropertyCall(receiver, name, factory2.createPropertyDescriptor({ value: memberFunction, enumerable: false, writable: true, configurable: true })); } else { const memberName = createMemberAccessForPropertyName( @@ -135928,7 +138913,7 @@ ${lanes.join("\n")} const body = node.body; let statementOffset; resumeLexicalEnvironment(); - if (isBlock4(body)) { + if (isBlock5(body)) { statementOffset = factory2.copyStandardPrologue( body.statements, prologue, @@ -135946,7 +138931,7 @@ ${lanes.join("\n")} /*inConstructorWithSynthesizedSuper*/ false ) || multiLine; - if (isBlock4(body)) { + if (isBlock5(body)) { statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor); statementsLocation = body.statements; addRange(statements, visitNodes2(body.statements, visitor, isStatement, statementOffset)); @@ -135986,7 +138971,7 @@ ${lanes.join("\n")} multiLine = true; } statements.unshift(...prologue); - if (isBlock4(body) && arrayIsEqualTo(statements, body.statements)) { + if (isBlock5(body) && arrayIsEqualTo(statements, body.statements)) { return body; } const block = factory2.createBlock(setTextRange(factory2.createNodeArray(statements), statementsLocation), multiLine); @@ -136371,7 +139356,7 @@ ${lanes.join("\n")} } else { const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock); Debug.assert(statement); - if (isBlock4(statement)) { + if (isBlock5(statement)) { return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements)); } else { statements.push(statement); @@ -136394,7 +139379,7 @@ ${lanes.join("\n")} const expression = visitNode(node.expression, visitor, isExpression); Debug.assert(expression); const counter = factory2.createLoopVariable(); - const rhsReference = isIdentifier17(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( + const rhsReference = isIdentifier21(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( /*recordTempVariable*/ void 0 ); @@ -136458,11 +139443,11 @@ ${lanes.join("\n")} function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) { const expression = visitNode(node.expression, visitor, isExpression); Debug.assert(expression); - const iterator = isIdentifier17(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( + const iterator = isIdentifier21(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( /*recordTempVariable*/ void 0 ); - const result = isIdentifier17(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable( + const result = isIdentifier21(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable( /*recordTempVariable*/ void 0 ); @@ -136958,7 +139943,7 @@ ${lanes.join("\n")} true ), visitor, - isBlock4 + isBlock5 )) ), emitFlags @@ -137000,7 +139985,7 @@ ${lanes.join("\n")} } } Debug.assert(statement); - if (isBlock4(statement)) { + if (isBlock5(statement)) { addRange(statements, statement.statements); } else { statements.push(statement); @@ -137012,7 +139997,7 @@ ${lanes.join("\n")} /*multiLine*/ true ); - if (isBlock4(statement)) setOriginalNode(loopBody, statement); + if (isBlock5(statement)) setOriginalNode(loopBody, statement); const containsYield = (node.statement.transformFlags & 1048576) !== 0; let emitFlags = 1048576; if (currentState.containsLexicalThis) emitFlags |= 16; @@ -137442,7 +140427,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitArrayLiteralExpression(node) { - if (some(node.elements, isSpreadElement3)) { + if (some(node.elements, isSpreadElement5)) { return transformAndSpreadElements( node.elements, /*isArgumentList*/ @@ -137459,7 +140444,7 @@ ${lanes.join("\n")} return visitTypeScriptClassWrapper(node); } const expression = skipOuterExpressions(node.expression); - if (expression.kind === 108 || isSuperProperty(expression) || some(node.arguments, isSpreadElement3)) { + if (expression.kind === 108 || isSuperProperty(expression) || some(node.arguments, isSpreadElement5)) { return visitCallExpressionWithPotentialCapturedThisAssignment( node, /*assignToCapturedThis*/ @@ -137475,23 +140460,23 @@ ${lanes.join("\n")} ); } function visitTypeScriptClassWrapper(node) { - const body = cast(cast(skipOuterExpressions(node.expression), isArrowFunction5).body, isBlock4); - const isVariableStatementWithInitializer = (stmt) => isVariableStatement8(stmt) && !!first(stmt.declarationList.declarations).initializer; + const body = cast(cast(skipOuterExpressions(node.expression), isArrowFunction6).body, isBlock5); + const isVariableStatementWithInitializer = (stmt) => isVariableStatement10(stmt) && !!first(stmt.declarationList.declarations).initializer; const savedConvertedLoopState = convertedLoopState; convertedLoopState = void 0; const bodyStatements = visitNodes2(body.statements, classWrapperStatementVisitor, isStatement); convertedLoopState = savedConvertedLoopState; const classStatements = filter(bodyStatements, isVariableStatementWithInitializer); const remainingStatements = filter(bodyStatements, (stmt) => !isVariableStatementWithInitializer(stmt)); - const varStatement = cast(first(classStatements), isVariableStatement8); + const varStatement = cast(first(classStatements), isVariableStatement10); const variable = varStatement.declarationList.declarations[0]; const initializer3 = skipOuterExpressions(variable.initializer); let aliasAssignment = tryCast(initializer3, isAssignmentExpression); - if (!aliasAssignment && isBinaryExpression2(initializer3) && initializer3.operatorToken.kind === 28) { + if (!aliasAssignment && isBinaryExpression4(initializer3) && initializer3.operatorToken.kind === 28) { aliasAssignment = tryCast(initializer3.left, isAssignmentExpression); } - const call = cast(aliasAssignment ? skipOuterExpressions(aliasAssignment.right) : initializer3, isCallExpression9); - const func = cast(skipOuterExpressions(call.expression), isFunctionExpression4); + const call = cast(aliasAssignment ? skipOuterExpressions(aliasAssignment.right) : initializer3, isCallExpression12); + const func = cast(skipOuterExpressions(call.expression), isFunctionExpression5); const funcStatements = func.body.statements; let classBodyStart = 0; let classBodyEnd = -1; @@ -137508,21 +140493,21 @@ ${lanes.join("\n")} factory2.createExpressionStatement( factory2.createAssignment( aliasAssignment.left, - cast(variable.name, isIdentifier17) + cast(variable.name, isIdentifier21) ) ) ); } - while (!isReturnStatement2(elementAt(funcStatements, classBodyEnd))) { + while (!isReturnStatement3(elementAt(funcStatements, classBodyEnd))) { classBodyEnd--; } addRange(statements, funcStatements, classBodyStart, classBodyEnd); if (classBodyEnd < -1) { addRange(statements, funcStatements, classBodyEnd + 1); } - const returnStatement = tryCast(elementAt(funcStatements, classBodyEnd), isReturnStatement2); + const returnStatement = tryCast(elementAt(funcStatements, classBodyEnd), isReturnStatement3); for (const statement of remainingStatements) { - if (isReturnStatement2(statement) && (returnStatement == null ? void 0 : returnStatement.expression) && !isIdentifier17(returnStatement.expression)) { + if (isReturnStatement3(statement) && (returnStatement == null ? void 0 : returnStatement.expression) && !isIdentifier21(returnStatement.expression)) { statements.push(returnStatement); } else { statements.push(statement); @@ -137621,7 +140606,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitNewExpression(node) { - if (some(node.arguments, isSpreadElement3)) { + if (some(node.arguments, isSpreadElement5)) { const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration); return factory2.createNewExpression( factory2.createFunctionApplyCall( @@ -137672,18 +140657,18 @@ ${lanes.join("\n")} return expression; } function partitionSpread(node) { - return isSpreadElement3(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads; + return isSpreadElement5(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads; } function visitSpanOfSpreads(chunk) { return map2(chunk, visitExpressionOfSpread); } function visitExpressionOfSpread(node) { - Debug.assertNode(node, isSpreadElement3); + Debug.assertNode(node, isSpreadElement5); let expression = visitNode(node.expression, visitor, isExpression); Debug.assert(expression); const isCallToReadHelper = isCallToHelper(expression, "___read"); let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 : 1; - if (compilerOptions.downlevelIteration && kind === 1 && !isArrayLiteralExpression5(expression) && !isCallToReadHelper) { + if (compilerOptions.downlevelIteration && kind === 1 && !isArrayLiteralExpression7(expression) && !isCallToReadHelper) { expression = emitHelpers().createReadHelper( expression, /*count*/ @@ -137839,14 +140824,14 @@ ${lanes.join("\n")} if (hint === 1) { return substituteExpression(node); } - if (isIdentifier17(node)) { + if (isIdentifier21(node)) { return substituteIdentifier(node); } return node; } function substituteIdentifier(node) { if (enabledSubstitutions & 2 && !isInternalName(node)) { - const original = getParseTreeNode(node, isIdentifier17); + const original = getParseTreeNode(node, isIdentifier21); if (original && isNameOfDeclarationWithCollidingName(original)) { return setTextRange(factory2.getGeneratedNameForNode(original), node); } @@ -137931,7 +140916,7 @@ ${lanes.join("\n")} return false; } const expression = callArgument.expression; - return isIdentifier17(expression) && expression.escapedText === "arguments"; + return isIdentifier21(expression) && expression.escapedText === "arguments"; } } function getInstructionName(instruction) { @@ -138323,7 +141308,7 @@ ${lanes.join("\n")} visit(node.right); return factory2.inlineExpressions(pendingExpressions); function visit(node2) { - if (isBinaryExpression2(node2) && node2.operatorToken.kind === 28) { + if (isBinaryExpression4(node2) && node2.operatorToken.kind === 28) { visit(node2.left); visit(node2.right); } else { @@ -138338,7 +141323,7 @@ ${lanes.join("\n")} function visitCommaListExpression(node) { let pendingExpressions = []; for (const elem of node.elements) { - if (isBinaryExpression2(elem) && elem.operatorToken.kind === 28) { + if (isBinaryExpression4(elem) && elem.operatorToken.kind === 28) { pendingExpressions.push(visitCommaExpression(elem)); } else { if (containsYield(elem) && pendingExpressions.length > 0) { @@ -138581,7 +141566,7 @@ ${lanes.join("\n")} } } function transformAndEmitEmbeddedStatement(node) { - if (isBlock4(node)) { + if (isBlock5(node)) { transformAndEmitStatements(node.statements); } else { transformAndEmitStatement(node); @@ -139099,7 +142084,7 @@ ${lanes.join("\n")} return node; } function substituteExpression(node) { - if (isIdentifier17(node)) { + if (isIdentifier21(node)) { return substituteExpressionIdentifier(node); } return node; @@ -139107,7 +142092,7 @@ ${lanes.join("\n")} function substituteExpressionIdentifier(node) { if (!isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(idText(node))) { const original = getOriginalNode(node); - if (isIdentifier17(original) && original.parent) { + if (isIdentifier21(original) && original.parent) { const declaration = resolver.getReferencedValueDeclaration(original); if (declaration) { const name = renamedCatchVariableDeclarations[getOriginalNodeId(declaration)]; @@ -140415,7 +143400,7 @@ ${lanes.join("\n")} return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; } function getAMDImportExpressionForImport(node) { - if (isImportEqualsDeclaration(node) || isExportDeclaration(node) || !getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions)) { + if (isImportEqualsDeclaration(node) || isExportDeclaration2(node) || !getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions)) { return void 0; } const name = getLocalNameForExternalImport(factory2, node, currentSourceFile); @@ -140616,7 +143601,7 @@ ${lanes.join("\n")} ); } function destructuringNeedsFlattening(node) { - if (isObjectLiteralExpression6(node)) { + if (isObjectLiteralExpression9(node)) { for (const elem of node.properties) { switch (elem.kind) { case 304: @@ -140642,9 +143627,9 @@ ${lanes.join("\n")} Debug.assertNever(elem, "Unhandled object member kind"); } } - } else if (isArrayLiteralExpression5(node)) { + } else if (isArrayLiteralExpression7(node)) { for (const elem of node.elements) { - if (isSpreadElement3(elem)) { + if (isSpreadElement5(elem)) { if (destructuringNeedsFlattening(elem.expression)) { return true; } @@ -140652,7 +143637,7 @@ ${lanes.join("\n")} return true; } } - } else if (isIdentifier17(node)) { + } else if (isIdentifier21(node)) { return length(getExports(node)) > (isExportName(node) ? 1 : 0); } return false; @@ -140717,7 +143702,7 @@ ${lanes.join("\n")} const initializer3 = visitNode(node.initializer, discardedValueVisitor, isForInitializer); const expression = visitNode(node.expression, visitor, isExpression); const body = visitIterationBody(node.statement, topLevelNestedVisitor, context); - const mergedBody = isBlock4(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock( + const mergedBody = isBlock5(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock( [...exportStatements, body], /*multiLine*/ true @@ -140745,7 +143730,7 @@ ${lanes.join("\n")} const expression = visitNode(node.expression, visitor, isExpression); let body = visitIterationBody(node.statement, topLevelNestedVisitor, context); if (some(exportStatements)) { - body = isBlock4(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock( + body = isBlock5(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock( [...exportStatements, body], /*multiLine*/ true @@ -140827,7 +143812,7 @@ ${lanes.join("\n")} return factory2.updateCatchClause( node, node.variableDeclaration, - Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock4)) + Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock5)) ); } function visitBlock(node) { @@ -140847,12 +143832,12 @@ ${lanes.join("\n")} return factory2.updatePartiallyEmittedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression)); } function visitPreOrPostfixUnaryExpression(node, valueIsDiscarded) { - if ((node.operator === 46 || node.operator === 47) && isIdentifier17(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { + if ((node.operator === 46 || node.operator === 47) && isIdentifier21(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { const exportedNames = getExports(node.operand); if (exportedNames) { let temp; let expression = visitNode(node.operand, visitor, isExpression); - if (isPrefixUnaryExpression2(node)) { + if (isPrefixUnaryExpression4(node)) { expression = factory2.updatePrefixUnaryExpression(node, expression); } else { expression = factory2.updatePostfixUnaryExpression(node, expression); @@ -140899,7 +143884,7 @@ ${lanes.join("\n")} } const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions); const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression); - const argument = externalModuleName && (!firstArgument || !isStringLiteral10(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument && rewriteOrShim ? isStringLiteral10(firstArgument) ? rewriteModuleSpecifier(firstArgument, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(firstArgument) : firstArgument; + const argument = externalModuleName && (!firstArgument || !isStringLiteral12(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument && rewriteOrShim ? isStringLiteral12(firstArgument) ? rewriteModuleSpecifier(firstArgument, compilerOptions) : emitHelpers().createRewriteRelativeImportExtensionsHelper(firstArgument) : firstArgument; const containsLexicalThis = !!(node.transformFlags & 16384); switch (compilerOptions.module) { case 2: @@ -140914,7 +143899,7 @@ ${lanes.join("\n")} function createImportCallExpressionUMD(arg, containsLexicalThis) { needUMDDynamicImportHelper = true; if (isSimpleCopiableExpression(arg)) { - const argClone = isGeneratedIdentifier(arg) ? arg : isStringLiteral10(arg) ? factory2.createStringLiteralFromNode(arg) : setEmitFlags( + const argClone = isGeneratedIdentifier(arg) ? arg : isStringLiteral12(arg) ? factory2.createStringLiteralFromNode(arg) : setEmitFlags( setTextRange(factory2.cloneNode(arg), arg), 3072 /* NoComments */ @@ -140955,7 +143940,7 @@ ${lanes.join("\n")} } } function createImportCallExpressionAMD(arg, containsLexicalThis) { - const resolve = factory2.createUniqueName("resolve"); + const resolve4 = factory2.createUniqueName("resolve"); const reject = factory2.createUniqueName("reject"); const parameters = [ factory2.createParameterDeclaration( @@ -140964,7 +143949,7 @@ ${lanes.join("\n")} /*dotDotDotToken*/ void 0, /*name*/ - resolve + resolve4 ), factory2.createParameterDeclaration( /*modifiers*/ @@ -140981,7 +143966,7 @@ ${lanes.join("\n")} factory2.createIdentifier("require"), /*typeArguments*/ void 0, - [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve, reject] + [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve4, reject] ) ) ]); @@ -141331,7 +144316,7 @@ ${lanes.join("\n")} return void 0; } const generatedName = factory2.getGeneratedNameForNode(node); - if (node.exportClause && isNamedExports(node.exportClause)) { + if (node.exportClause && isNamedExports2(node.exportClause)) { const statements = []; if (moduleKind !== 2) { statements.push( @@ -141517,7 +144502,7 @@ ${lanes.join("\n")} let modifiers; let removeCommentsOnExpressions = false; for (const variable of node.declarationList.declarations) { - if (isIdentifier17(variable.name) && isLocalName(variable.name)) { + if (isIdentifier21(variable.name) && isLocalName(variable.name)) { if (!modifiers) { modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); } @@ -141539,7 +144524,7 @@ ${lanes.join("\n")} variables = append(variables, variable); } } else if (variable.initializer) { - if (!isBindingPattern(variable.name) && (isArrowFunction5(variable.initializer) || isFunctionExpression4(variable.initializer) || isClassExpression(variable.initializer))) { + if (!isBindingPattern(variable.name) && (isArrowFunction6(variable.initializer) || isFunctionExpression5(variable.initializer) || isClassExpression(variable.initializer))) { const expression = factory2.createAssignment( setTextRange( factory2.createPropertyAccessExpression( @@ -141870,7 +144855,7 @@ ${lanes.join("\n")} } if (hint === 1) { return substituteExpression(node); - } else if (isShorthandPropertyAssignment3(node)) { + } else if (isShorthandPropertyAssignment5(node)) { return substituteShorthandPropertyAssignment(node); } return node; @@ -141901,10 +144886,10 @@ ${lanes.join("\n")} return node; } function substituteCallExpression(node) { - if (isIdentifier17(node.expression)) { + if (isIdentifier21(node.expression)) { const expression = substituteExpressionIdentifier(node.expression); noSubstitution[getNodeId(expression)] = true; - if (!isIdentifier17(expression) && !(getEmitFlags(node.expression) & 8192)) { + if (!isIdentifier21(expression) && !(getEmitFlags(node.expression) & 8192)) { return addInternalEmitFlags( factory2.updateCallExpression( node, @@ -141921,10 +144906,10 @@ ${lanes.join("\n")} return node; } function substituteTaggedTemplateExpression(node) { - if (isIdentifier17(node.tag)) { + if (isIdentifier21(node.tag)) { const tag = substituteExpressionIdentifier(node.tag); noSubstitution[getNodeId(tag)] = true; - if (!isIdentifier17(tag) && !(getEmitFlags(node.tag) & 8192)) { + if (!isIdentifier21(tag) && !(getEmitFlags(node.tag) & 8192)) { return addInternalEmitFlags( factory2.updateTaggedTemplateExpression( node, @@ -141985,7 +144970,7 @@ ${lanes.join("\n")} return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier17(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier21(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -142463,7 +145448,7 @@ ${lanes.join("\n")} case 279: Debug.assert(importVariableName !== void 0); if (entry.exportClause) { - if (isNamedExports(entry.exportClause)) { + if (isNamedExports2(entry.exportClause)) { const properties = []; for (const e of entry.exportClause.elements) { properties.push( @@ -142620,7 +145605,7 @@ ${lanes.join("\n")} visitNodes2(node.parameters, visitor, isParameter), /*type*/ void 0, - visitNode(node.body, visitor, isBlock4) + visitNode(node.body, visitor, isBlock5) ) ); } else { @@ -142878,7 +145863,7 @@ ${lanes.join("\n")} return statement; } function createExportExpression(name, value) { - const exportName = isIdentifier17(name) ? factory2.createStringLiteralFromNode(name) : name; + const exportName = isIdentifier21(name) ? factory2.createStringLiteralFromNode(name) : name; setEmitFlags( value, getEmitFlags(value) | 3072 @@ -143068,7 +146053,7 @@ ${lanes.join("\n")} node = factory2.updateCatchClause( node, node.variableDeclaration, - Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock4)) + Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock5)) ); enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; return node; @@ -143139,7 +146124,7 @@ ${lanes.join("\n")} function visitImportCallExpression(node) { const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions); const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression); - const argument = externalModuleName && (!firstArgument || !isStringLiteral10(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument; + const argument = externalModuleName && (!firstArgument || !isStringLiteral12(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument; return factory2.createCallExpression( factory2.createPropertyAccessExpression( contextObject, @@ -143169,17 +146154,17 @@ ${lanes.join("\n")} true )) { return hasExportedReferenceInDestructuringTarget(node.left); - } else if (isSpreadElement3(node)) { + } else if (isSpreadElement5(node)) { return hasExportedReferenceInDestructuringTarget(node.expression); - } else if (isObjectLiteralExpression6(node)) { + } else if (isObjectLiteralExpression9(node)) { return some(node.properties, hasExportedReferenceInDestructuringTarget); - } else if (isArrayLiteralExpression5(node)) { + } else if (isArrayLiteralExpression7(node)) { return some(node.elements, hasExportedReferenceInDestructuringTarget); - } else if (isShorthandPropertyAssignment3(node)) { + } else if (isShorthandPropertyAssignment5(node)) { return hasExportedReferenceInDestructuringTarget(node.name); - } else if (isPropertyAssignment6(node)) { + } else if (isPropertyAssignment8(node)) { return hasExportedReferenceInDestructuringTarget(node.initializer); - } else if (isIdentifier17(node)) { + } else if (isIdentifier21(node)) { const container = resolver.getReferencedExportContainer(node); return container !== void 0 && container.kind === 308; } else { @@ -143187,12 +146172,12 @@ ${lanes.join("\n")} } } function visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded) { - if ((node.operator === 46 || node.operator === 47) && isIdentifier17(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { + if ((node.operator === 46 || node.operator === 47) && isIdentifier21(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { const exportedNames = getExports(node.operand); if (exportedNames) { let temp; let expression = visitNode(node.operand, visitor, isExpression); - if (isPrefixUnaryExpression2(node)) { + if (isPrefixUnaryExpression4(node)) { expression = factory2.updatePrefixUnaryExpression(node, expression); } else { expression = factory2.updatePostfixUnaryExpression(node, expression); @@ -143344,7 +146329,7 @@ ${lanes.join("\n")} return node; } function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier17(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { + if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier21(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { const exportedNames = getExports(node.left); if (exportedNames) { let expression = node; @@ -143618,7 +146603,7 @@ ${lanes.join("\n")} importRequireStatements = [importStatement, requireStatement]; } const name = importRequireStatements[1].declarationList.declarations[0].name; - Debug.assertNode(name, isIdentifier17); + Debug.assertNode(name, isIdentifier21); return factory2.createCallExpression( factory2.cloneNode(name), /*typeArguments*/ @@ -143768,7 +146753,7 @@ ${lanes.join("\n")} if (node.id && noSubstitution.has(node.id)) { return node; } - if (isIdentifier17(node) && getEmitFlags(node) & 8192) { + if (isIdentifier21(node) && getEmitFlags(node) & 8192) { return substituteHelperName(node); } return node; @@ -143865,7 +146850,7 @@ ${lanes.join("\n")} } } function canProduceDiagnostics(node) { - return isVariableDeclaration4(node) || isPropertyDeclaration(node) || isPropertySignature2(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration2(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration2(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression10(node) || isElementAccessExpression3(node) || isBinaryExpression2(node) || isJSDocTypeAlias(node); + return isVariableDeclaration4(node) || isPropertyDeclaration(node) || isPropertySignature3(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration3(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration2(node) || isConstructorDeclaration2(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression12(node) || isElementAccessExpression5(node) || isBinaryExpression4(node) || isJSDocTypeAlias(node); } function createGetSymbolAccessibilityDiagnosticForNodeName(node) { if (isSetAccessor(node) || isGetAccessor(node)) { @@ -143911,11 +146896,11 @@ ${lanes.join("\n")} } } function createGetSymbolAccessibilityDiagnosticForNode(node) { - if (isVariableDeclaration4(node) || isPropertyDeclaration(node) || isPropertySignature2(node) || isPropertyAccessExpression10(node) || isElementAccessExpression3(node) || isBinaryExpression2(node) || isBindingElement(node) || isConstructorDeclaration(node)) { + if (isVariableDeclaration4(node) || isPropertyDeclaration(node) || isPropertySignature3(node) || isPropertyAccessExpression12(node) || isElementAccessExpression5(node) || isBinaryExpression4(node) || isBindingElement(node) || isConstructorDeclaration2(node)) { return getVariableDeclarationTypeVisibilityError; } else if (isSetAccessor(node) || isGetAccessor(node)) { return getAccessorDeclarationTypeVisibilityError; - } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration2(node) || isIndexSignatureDeclaration(node)) { + } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration3(node) || isIndexSignatureDeclaration(node)) { return getReturnTypeVisibilityError; } else if (isParameter(node)) { if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier( @@ -144104,7 +147089,7 @@ ${lanes.join("\n")} } function getHeritageClauseVisibilityError() { let diagnosticMessage; - if (isClassDeclaration3(node.parent.parent)) { + if (isClassDeclaration5(node.parent.parent)) { diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 119 ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; } else { diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; @@ -144295,11 +147280,11 @@ ${lanes.join("\n")} } } function findNearestDeclaration(node) { - const result = findAncestor(node, (n) => isExportAssignment2(n) || isStatement(n) || isVariableDeclaration4(n) || isPropertyDeclaration(n) || isParameter(n)); + const result = findAncestor(node, (n) => isExportAssignment3(n) || isStatement(n) || isVariableDeclaration4(n) || isPropertyDeclaration(n) || isParameter(n)); if (!result) return void 0; - if (isExportAssignment2(result)) return result; - if (isReturnStatement2(result)) { - return findAncestor(result, (n) => isFunctionLikeDeclaration(n) && !isConstructorDeclaration(n)); + if (isExportAssignment3(result)) return result; + if (isReturnStatement3(result)) { + return findAncestor(result, (n) => isFunctionLikeDeclaration(n) && !isConstructorDeclaration2(n)); } return isStatement(result) ? void 0 : result; } @@ -144318,7 +147303,7 @@ ${lanes.join("\n")} function addParentDeclarationRelatedInfo(node, diag2) { const parentDeclaration = findNearestDeclaration(node); if (parentDeclaration) { - const targetStr = isExportAssignment2(parentDeclaration) || !parentDeclaration.name ? "" : getTextOfNode( + const targetStr = isExportAssignment3(parentDeclaration) || !parentDeclaration.name ? "" : getTextOfNode( parentDeclaration.name, /*includeTrivia*/ false @@ -144390,12 +147375,12 @@ ${lanes.join("\n")} const parentDeclaration = findNearestDeclaration(node); let diag2; if (parentDeclaration) { - const targetStr = isExportAssignment2(parentDeclaration) || !parentDeclaration.name ? "" : getTextOfNode( + const targetStr = isExportAssignment3(parentDeclaration) || !parentDeclaration.name ? "" : getTextOfNode( parentDeclaration.name, /*includeTrivia*/ false ); - const parent2 = findAncestor(node.parent, (n) => isExportAssignment2(n) || (isStatement(n) ? "quit" : !isParenthesizedExpression4(n) && !isTypeAssertionExpression(n) && !isAsExpression4(n))); + const parent2 = findAncestor(node.parent, (n) => isExportAssignment3(n) || (isStatement(n) ? "quit" : !isParenthesizedExpression6(n) && !isTypeAssertionExpression2(n) && !isAsExpression6(n))); if (parentDeclaration === parent2) { diag2 = createDiagnosticForNode(node, diagnosticMessage ?? errorByDeclarationKind[parentDeclaration.kind]); addRelatedInfo(diag2, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); @@ -144480,7 +147465,7 @@ ${lanes.join("\n")} function reportExpandoFunctionErrors(node) { resolver.getPropertiesOfContainerFunction(node).forEach((p) => { if (isExpandoPropertyDeclaration(p.valueDeclaration)) { - const errorTarget = isBinaryExpression2(p.valueDeclaration) ? p.valueDeclaration.left : p.valueDeclaration; + const errorTarget = isBinaryExpression4(p.valueDeclaration) ? p.valueDeclaration.left : p.valueDeclaration; context.addDiagnostic(createDiagnosticForNode( errorTarget, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function @@ -144543,7 +147528,7 @@ ${lanes.join("\n")} } } function errorDeclarationNameWithFallback() { - return errorNameNode ? declarationNameToString(errorNameNode) : errorFallbackNode && getNameOfDeclaration(errorFallbackNode) ? declarationNameToString(getNameOfDeclaration(errorFallbackNode)) : errorFallbackNode && isExportAssignment2(errorFallbackNode) ? errorFallbackNode.isExportEquals ? "export=" : "default" : "(Missing)"; + return errorNameNode ? declarationNameToString(errorNameNode) : errorFallbackNode && getNameOfDeclaration(errorFallbackNode) ? declarationNameToString(getNameOfDeclaration(errorFallbackNode)) : errorFallbackNode && isExportAssignment3(errorFallbackNode) ? errorFallbackNode.isExportEquals ? "export=" : "default" : "(Missing)"; } function reportInaccessibleUniqueSymbolError() { if (errorNameNode || errorFallbackNode) { @@ -144856,7 +147841,7 @@ ${lanes.join("\n")} if (shouldPrintWithInitializer(node)) { return; } - if (!isExportAssignment2(node) && !isBindingElement(node) && node.type && (!isParameter(node) || !resolver.requiresAddingImplicitUndefined(node, enclosingDeclaration))) { + if (!isExportAssignment3(node) && !isBindingElement(node) && node.type && (!isParameter(node) || !resolver.requiresAddingImplicitUndefined(node, enclosingDeclaration))) { return visitNode(node.type, visitDeclarationSubtree, isTypeNode); } const oldErrorNameNode = errorNameNode; @@ -144913,7 +147898,7 @@ ${lanes.join("\n")} if (input.body) { return true; } - const overloadSignatures = (_a3 = input.symbol.declarations) == null ? void 0 : _a3.filter((decl) => isFunctionDeclaration2(decl) && !decl.body); + const overloadSignatures = (_a3 = input.symbol.declarations) == null ? void 0 : _a3.filter((decl) => isFunctionDeclaration3(decl) && !decl.body); return !overloadSignatures || overloadSignatures.indexOf(input) === overloadSignatures.length - 1; } function getBindingNameVisible(elem) { @@ -144926,7 +147911,7 @@ ${lanes.join("\n")} return resolver.isDeclarationVisible(elem); } } - function updateParamsList(node, params, modifierMask) { + function updateParamsList(node, params2, modifierMask) { if (hasEffectiveModifier( node, 2 @@ -144934,11 +147919,11 @@ ${lanes.join("\n")} )) { return factory2.createNodeArray(); } - const newParams = map2(params, (p) => ensureParameter(p, modifierMask)); + const newParams = map2(params2, (p) => ensureParameter(p, modifierMask)); if (!newParams) { return factory2.createNodeArray(); } - return factory2.createNodeArray(newParams, params.hasTrailingComma); + return factory2.createNodeArray(newParams, params2.hasTrailingComma); } function updateAccessorParamsList(input, isPrivate) { let newParams; @@ -144969,15 +147954,15 @@ ${lanes.join("\n")} } return factory2.createNodeArray(newParams || emptyArray); } - function ensureTypeParams(node, params) { + function ensureTypeParams(node, params2) { return hasEffectiveModifier( node, 2 /* Private */ - ) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); + ) ? void 0 : visitNodes2(params2, visitDeclarationSubtree, isTypeParameterDeclaration); } function isEnclosingDeclaration(node) { - return isSourceFile(node) || isTypeAliasDeclaration2(node) || isModuleDeclaration(node) || isClassDeclaration3(node) || isInterfaceDeclaration2(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); + return isSourceFile(node) || isTypeAliasDeclaration2(node) || isModuleDeclaration(node) || isClassDeclaration5(node) || isInterfaceDeclaration2(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); } function checkEntityNameVisibility(entityName, enclosingDeclaration2) { const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2); @@ -145139,12 +148124,12 @@ ${lanes.join("\n")} if (hasDynamicName(input)) { if (isolatedDeclarations) { if (!resolver.isDefinitelyReferenceToGlobalSymbolObject(input.name.expression)) { - if (isClassDeclaration3(input.parent) || isObjectLiteralExpression6(input.parent)) { + if (isClassDeclaration5(input.parent) || isObjectLiteralExpression9(input.parent)) { context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations)); return; } else if ( // Type declarations just need to double-check that the input computed name is an entity name expression - (isInterfaceDeclaration2(input.parent) || isTypeLiteralNode(input.parent)) && !isEntityNameExpression(input.name.expression) + (isInterfaceDeclaration2(input.parent) || isTypeLiteralNode2(input.parent)) && !isEntityNameExpression(input.name.expression) ) { context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); return; @@ -146035,7 +149020,7 @@ ${lanes.join("\n")} return !!stripInternal && !!node && isInternalDeclaration(node, currentSourceFile); } function isScopeMarker2(node) { - return isExportAssignment2(node) || isExportDeclaration(node); + return isExportAssignment3(node) || isExportDeclaration2(node); } function hasScopeMarker2(statements) { return some(statements, isScopeMarker2); @@ -146648,7 +149633,7 @@ ${lanes.join("\n")} } else { if (!configFile) return void 0; const configFileExtensionLess = removeFileExtension(configFile); - buildInfoExtensionLess = options.outDir ? options.rootDir ? resolvePath(options.outDir, getRelativePathFromDirectory( + buildInfoExtensionLess = options.outDir ? options.rootDir ? resolvePath2(options.outDir, getRelativePathFromDirectory( options.rootDir, configFileExtensionLess, /*ignoreCase*/ @@ -146706,7 +149691,7 @@ ${lanes.join("\n")} ]) ? ".cjs" : ".js"; } function getOutputPathWithoutChangingExt(inputFileName, ignoreCase, outputDir, getCommonSourceDirectory2) { - return outputDir ? resolvePath( + return outputDir ? resolvePath2( outputDir, getRelativePathFromDirectory(getCommonSourceDirectory2(), inputFileName, ignoreCase) ) : inputFileName; @@ -147044,7 +150029,7 @@ ${lanes.join("\n")} declarationTransform.dispose(); } function collectLinkedAliases(node) { - if (isExportAssignment2(node)) { + if (isExportAssignment3(node)) { if (node.expression.kind === 80) { resolver.collectLinkedAliases( node.expression, @@ -147067,7 +150052,7 @@ ${lanes.join("\n")} if (isSourceFileJS(file2)) return; forEachChildRecursively(file2, (n) => { if (isImportEqualsDeclaration(n) && !(getSyntacticModifierFlags(n) & 32)) return "skip"; - if (isImportDeclaration5(n)) return "skip"; + if (isImportDeclaration6(n)) return "skip"; resolver.markLinkedReferences(n); }); } @@ -147322,7 +150307,7 @@ ${lanes.join("\n")} Debug.assert(isSourceFile(node), "Expected a SourceFile node."); break; case 2: - Debug.assert(isIdentifier17(node), "Expected an Identifier node."); + Debug.assert(isIdentifier21(node), "Expected an Identifier node."); break; case 1: Debug.assert(isExpression(node), "Expected an Expression node."); @@ -147494,7 +150479,7 @@ ${lanes.join("\n")} pipelineEmit(1, node, parenthesizerRule); } function emitJsxAttributeValue(node) { - pipelineEmit(isStringLiteral10(node) ? 6 : 4, node); + pipelineEmit(isStringLiteral12(node) ? 6 : 4, node); } function beforeEmitNode(node) { if (preserveSourceNewlines && getInternalEmitFlags(node) & 4) { @@ -147575,9 +150560,9 @@ ${lanes.join("\n")} } } if (hint === 0) return emitSourceFile(cast(node, isSourceFile)); - if (hint === 2) return emitIdentifier(cast(node, isIdentifier17)); + if (hint === 2) return emitIdentifier(cast(node, isIdentifier21)); if (hint === 6) return emitLiteral( - cast(node, isStringLiteral10), + cast(node, isStringLiteral12), /*jsxAttributeEscape*/ true ); @@ -148616,7 +151601,7 @@ ${lanes.join("\n")} } function mayNeedDotDotForPropertyAccess(expression) { expression = skipPartiallyEmittedExpressions(expression); - if (isNumericLiteral3(expression)) { + if (isNumericLiteral4(expression)) { const text = getLiteralTextOfNode( expression, /*sourceFile*/ @@ -148721,7 +151706,7 @@ ${lanes.join("\n")} emit(node.equalsGreaterThanToken); } function emitArrowFunctionBody(node) { - if (isBlock4(node.body)) { + if (isBlock5(node.body)) { emitBlockFunctionBody(node.body); } else { writeSpace(); @@ -148851,7 +151836,7 @@ ${lanes.join("\n")} lastSubstitution = void 0; } if (pipelinePhase === pipelineEmitWithComments || pipelinePhase === pipelineEmitWithSourceMaps || pipelinePhase === pipelineEmitWithHint) { - if (isBinaryExpression2(next)) { + if (isBinaryExpression4(next)) { return next; } } @@ -149035,7 +152020,7 @@ ${lanes.join("\n")} function emitDoStatement(node) { emitTokenWithComment(92, node.pos, writeKeyword, node); emitEmbeddedStatement(node, node.statement); - if (isBlock4(node.statement) && !preserveSourceNewlines) { + if (isBlock5(node.statement) && !preserveSourceNewlines) { writeSpace(); } else { writeLineOrSpace(node, node.statement, node.expression); @@ -149151,7 +152136,7 @@ ${lanes.join("\n")} const leadingCommentRanges = getLeadingCommentRanges(currentSourceFile.text, node.pos); if (leadingCommentRanges) { const parseNode = getParseTreeNode(node); - if (parseNode && isParenthesizedExpression4(parseNode.parent)) { + if (parseNode && isParenthesizedExpression6(parseNode.parent)) { return true; } } @@ -149171,7 +152156,7 @@ ${lanes.join("\n")} case 356: if (willEmitLeadingNewLine(node)) { const parseNode = getParseTreeNode(node); - if (parseNode && isParenthesizedExpression4(parseNode)) { + if (parseNode && isParenthesizedExpression6(parseNode)) { const parens = factory.createParenthesizedExpression(node.expression); setOriginalNode(parens, node); setTextRange(parens, parseNode); @@ -150015,7 +153000,7 @@ ${lanes.join("\n")} function emitJSDoc(node) { write("/**"); if (node.comment) { - const text = getTextOfJSDocComment(node.comment); + const text = getTextOfJSDocComment2(node.comment); if (text) { const lines = text.split(/\r\n?|\n/); for (const line of lines) { @@ -150136,10 +153121,10 @@ ${lanes.join("\n")} emitJSDocTagName(tag.tagName); emitJSDocComment(tag.comment); } - function emitJSDocTypeLiteral(lit) { + function emitJSDocTypeLiteral(lit2) { emitList( - lit, - factory.createNodeArray(lit.jsDocPropertyTags), + lit2, + factory.createNodeArray(lit2.jsDocPropertyTags), 33 /* JSDocComment */ ); @@ -150187,7 +153172,7 @@ ${lanes.join("\n")} emit(tagName); } function emitJSDocComment(comment) { - const text = getTextOfJSDocComment(comment); + const text = getTextOfJSDocComment2(comment); if (text) { writeSpace(); write(text); @@ -150448,7 +153433,7 @@ ${lanes.join("\n")} } } function emitEmbeddedStatement(parent2, node) { - if (isBlock4(node) || getEmitFlags(parent2) & 1 || preserveSourceNewlines && !getLeadingLineTerminatorCount( + if (isBlock5(node) || getEmitFlags(parent2) & 1 || preserveSourceNewlines && !getLeadingLineTerminatorCount( parent2, node, 0 @@ -150484,7 +153469,7 @@ ${lanes.join("\n")} if (isFunctionLike(parentNode) && parentNode.typeArguments) { return emitTypeArguments(parentNode, parentNode.typeArguments); } - emitList(parentNode, typeParameters, 53776 | (isArrowFunction5(parentNode) ? 64 : 0)); + emitList(parentNode, typeParameters, 53776 | (isArrowFunction6(parentNode) ? 64 : 0)); } function emitParameters(parentNode, parameters) { emitList( @@ -150496,7 +153481,7 @@ ${lanes.join("\n")} } function canEmitSimpleArrowHead(parentNode, parameters) { const parameter = singleOrUndefined(parameters); - return parameter && parameter.pos === parentNode.pos && isArrowFunction5(parentNode) && !parentNode.type && !some(parentNode.modifiers) && !some(parentNode.typeParameters) && !some(parameter.modifiers) && !parameter.dotDotDotToken && !parameter.questionToken && !parameter.type && !parameter.initializer && isIdentifier17(parameter.name); + return parameter && parameter.pos === parentNode.pos && isArrowFunction6(parentNode) && !parentNode.type && !some(parentNode.modifiers) && !some(parentNode.typeParameters) && !some(parameter.modifiers) && !parameter.dotDotDotToken && !parameter.questionToken && !parameter.type && !parameter.initializer && isIdentifier21(parameter.name); } function emitParametersForArrow(parentNode, parameters) { if (canEmitSimpleArrowHead(parentNode, parameters)) { @@ -150976,7 +153961,7 @@ ${lanes.join("\n")} if (isGeneratedIdentifier(node) || isGeneratedPrivateIdentifier(node)) { return generateName(node); } - if (isStringLiteral10(node) && node.textSourceNode) { + if (isStringLiteral12(node) && node.textSourceNode) { return getTextOfNode2(node.textSourceNode, includeTrivia); } const sourceFile = currentSourceFile; @@ -151000,8 +153985,8 @@ ${lanes.join("\n")} function getLiteralTextOfNode(node, sourceFile = currentSourceFile, neverAsciiEscape, jsxAttributeEscape) { if (node.kind === 11 && node.textSourceNode) { const textSourceNode = node.textSourceNode; - if (isIdentifier17(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral3(textSourceNode) || isJsxNamespacedName(textSourceNode)) { - const text = isNumericLiteral3(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode); + if (isIdentifier21(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral4(textSourceNode) || isJsxNamespacedName(textSourceNode)) { + const text = isNumericLiteral4(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode); return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`; } else { return getLiteralTextOfNode(textSourceNode, getSourceFileOfNode(textSourceNode), neverAsciiEscape, jsxAttributeEscape); @@ -151345,7 +154330,7 @@ ${lanes.join("\n")} } function generateNameForImportOrExportDeclaration(node) { const expr = getExternalModuleName(node); - const baseName = isStringLiteral10(expr) ? makeIdentifierFromModuleName(expr.text) : "module"; + const baseName = isStringLiteral12(expr) ? makeIdentifierFromModuleName(expr.text) : "module"; return makeUniqueName2( baseName, isUniqueName, @@ -151394,7 +154379,7 @@ ${lanes.join("\n")} ); } function generateNameForMethodOrAccessor(node, privateName, prefix, suffix) { - if (isIdentifier17(node.name)) { + if (isIdentifier21(node.name)) { return generateNameCached(node.name, privateName); } return makeTempVariableName( @@ -151481,7 +154466,7 @@ ${lanes.join("\n")} case 1: return makeTempVariableName(0, !!(autoGenerate.flags & 8), isPrivateIdentifier(name), prefix, suffix); case 2: - Debug.assertNode(name, isIdentifier17); + Debug.assertNode(name, isIdentifier21); return makeTempVariableName( 268435456, !!(autoGenerate.flags & 8), @@ -152530,7 +155515,7 @@ ${lanes.join("\n")} } text = ""; } - return text !== void 0 ? createSourceFile2(fileName, text, languageVersionOrOptions, setParentNodes) : void 0; + return text !== void 0 ? createSourceFile5(fileName, text, languageVersionOrOptions, setParentNodes) : void 0; }; } function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) { @@ -152886,7 +155871,7 @@ ${lanes.join("\n")} } function isExclusivelyTypeOnlyImportOrExport(decl) { var _a3; - if (isExportDeclaration(decl)) { + if (isExportDeclaration2(decl)) { return decl.isTypeOnly; } if ((_a3 = decl.importClause) == null ? void 0 : _a3.isTypeOnly) { @@ -152898,7 +155883,7 @@ ${lanes.join("\n")} return getModeForUsageLocationWorker(file2, usage, compilerOptions); } function getModeForUsageLocationWorker(file2, usage, compilerOptions) { - if (isImportDeclaration5(usage.parent) || isExportDeclaration(usage.parent) || isJSDocImportTag(usage.parent)) { + if (isImportDeclaration6(usage.parent) || isExportDeclaration2(usage.parent) || isJSDocImportTag(usage.parent)) { const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); if (isTypeOnly) { const override = getResolutionModeOverride(usage.parent.attributes); @@ -154587,7 +157572,7 @@ ${lanes.join("\n")} if (decoratorIndex >= 0) { if (isParameter(parent2) && !options.experimentalDecorators) { diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here)); - } else if (isClassDeclaration3(parent2)) { + } else if (isClassDeclaration5(parent2)) { const exportIndex = findIndex(parent2.modifiers, isExportModifier); if (exportIndex >= 0) { const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier); @@ -154821,7 +157806,7 @@ ${lanes.join("\n")} function collectModuleReferences(node, inAmbientModule) { if (isAnyImportOrReExport(node)) { const moduleNameExpr = getExternalModuleName(node); - if (moduleNameExpr && isStringLiteral10(moduleNameExpr) && moduleNameExpr.text && (!inAmbientModule || !isExternalModuleNameRelative(moduleNameExpr.text))) { + if (moduleNameExpr && isStringLiteral12(moduleNameExpr) && moduleNameExpr.text && (!inAmbientModule || !isExternalModuleNameRelative(moduleNameExpr.text))) { setParentRecursive( node, /*incremental*/ @@ -155913,10 +158898,10 @@ ${lanes.join("\n")} function createDiagnosticForOptionPathKeyValue(key, valueIndex, message, ...args) { let needCompilerDiagnostic = true; forEachOptionPathsSyntax((pathProp) => { - if (isObjectLiteralExpression6(pathProp.initializer)) { + if (isObjectLiteralExpression9(pathProp.initializer)) { forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => { const initializer3 = keyProps.initializer; - if (isArrayLiteralExpression5(initializer3) && initializer3.elements.length > valueIndex) { + if (isArrayLiteralExpression7(initializer3) && initializer3.elements.length > valueIndex) { programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(options.configFile, initializer3.elements[valueIndex], message, ...args)); needCompilerDiagnostic = false; } @@ -155930,7 +158915,7 @@ ${lanes.join("\n")} function createDiagnosticForOptionPaths(onKey, key, message, ...args) { let needCompilerDiagnostic = true; forEachOptionPathsSyntax((pathProp) => { - if (isObjectLiteralExpression6(pathProp.initializer) && createOptionDiagnosticInObjectLiteralSyntax( + if (isObjectLiteralExpression9(pathProp.initializer) && createOptionDiagnosticInObjectLiteralSyntax( pathProp.initializer, onKey, key, @@ -155973,7 +158958,7 @@ ${lanes.join("\n")} ); } function createDiagnosticForReference(sourceFile, index, message, ...args) { - const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression5(property.initializer) ? property.initializer : void 0); + const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression7(property.initializer) ? property.initializer : void 0); if (referencesSyntax && referencesSyntax.elements.length > index) { programDiagnostics.addConfigDiagnostic(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); } else { @@ -156004,7 +158989,7 @@ ${lanes.join("\n")} function getCompilerOptionsObjectLiteralSyntax() { if (_compilerOptionsObjectLiteralSyntax === void 0) { const compilerOptionsProperty = getCompilerOptionsPropertySyntax(); - _compilerOptionsObjectLiteralSyntax = compilerOptionsProperty ? tryCast(compilerOptionsProperty.initializer, isObjectLiteralExpression6) || false : false; + _compilerOptionsObjectLiteralSyntax = compilerOptionsProperty ? tryCast(compilerOptionsProperty.initializer, isObjectLiteralExpression9) || false : false; } return _compilerOptionsObjectLiteralSyntax || void 0; } @@ -156626,7 +159611,7 @@ ${lanes.join("\n")} ); if (!referenceInfo) return void 0; const { sourceFile, index } = referenceInfo; - const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression5(property.initializer) ? property.initializer : void 0); + const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression7(property.initializer) ? property.initializer : void 0); return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( sourceFile, referencesSyntax.elements[index], @@ -156776,7 +159761,7 @@ ${lanes.join("\n")} if (sourceFile.moduleAugmentations.length) { const checker = program.getTypeChecker(); for (const moduleName of sourceFile.moduleAugmentations) { - if (!isStringLiteral10(moduleName)) continue; + if (!isStringLiteral12(moduleName)) continue; const symbol2 = checker.getSymbolAtLocation(moduleName); if (!symbol2) continue; addReferenceFromAmbientModule(symbol2); @@ -161436,7 +164421,7 @@ ${lanes.join("\n")} return parsed; } function resolveProjectName(state, name) { - return resolveConfigFileProjectName(resolvePath(state.compilerHost.getCurrentDirectory(), name)); + return resolveConfigFileProjectName(resolvePath2(state.compilerHost.getCurrentDirectory(), name)); } function createBuildOrder(state, roots) { const temporaryMarks = /* @__PURE__ */ new Map(); @@ -162441,7 +165426,7 @@ ${lanes.join("\n")} } } } - function build3(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) { + function build4(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) { mark("SolutionBuilder::beforeBuild"); const result = buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences); mark("SolutionBuilder::afterBuild"); @@ -162754,9 +165739,9 @@ ${lanes.join("\n")} function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) { const state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions); return { - build: (project, cancellationToken, writeFile2, getCustomTransformers) => build3(state, project, cancellationToken, writeFile2, getCustomTransformers), + build: (project, cancellationToken, writeFile2, getCustomTransformers) => build4(state, project, cancellationToken, writeFile2, getCustomTransformers), clean: (project) => clean(state, project), - buildReferences: (project, cancellationToken, writeFile2, getCustomTransformers) => build3( + buildReferences: (project, cancellationToken, writeFile2, getCustomTransformers) => build4( state, project, cancellationToken, @@ -164341,7 +167326,7 @@ ${lanes.join("\n")} } if (isJSDocTypeLiteral(node)) { return factory.createTypeLiteralNode(map2(node.jsDocPropertyTags, (t) => { - const name = visitNode(isIdentifier17(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier17); + const name = visitNode(isIdentifier21(t.name) ? t.name : t.name.right, visitExistingNodeTreeSymbols, isIdentifier21); const overrideTypeNode = resolver.getJsDocPropertyOverride(context, node, t); return factory.createPropertySignature( /*modifiers*/ @@ -164358,7 +167343,7 @@ ${lanes.join("\n")} ); })); } - if (isTypeReferenceNode3(node) && isIdentifier17(node.typeName) && node.typeName.escapedText === "") { + if (isTypeReferenceNode3(node) && isIdentifier21(node.typeName) && node.typeName.escapedText === "") { return setOriginalNode(factory.createKeywordTypeNode( 133 /* AnyKeyword */ @@ -164388,7 +167373,7 @@ ${lanes.join("\n")} /*modifiers*/ void 0, visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), - mapDefined(node.parameters, (p, i) => p.name && isIdentifier17(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration( + mapDefined(node.parameters, (p, i) => p.name && isIdentifier21(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration( /*modifiers*/ void 0, getEffectiveDotDotDotForParameter(p), @@ -164484,7 +167469,7 @@ ${lanes.join("\n")} return void 0; } } - if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature2(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) { + if (isFunctionLike(node) && !node.type || isPropertyDeclaration(node) && !node.type && !node.initializer || isPropertySignature3(node) && !node.type && !node.initializer || isParameter(node) && !node.type && !node.initializer) { let visited = visitEachChild2(node, visitExistingNodeTreeSymbols); if (visited === node) { visited = resolver.markNodeReuse(context, factory.cloneNode(node), node); @@ -164545,7 +167530,7 @@ ${lanes.join("\n")} } if (isTypePredicateNode(node)) { let parameterName; - if (isIdentifier17(node.parameterName)) { + if (isIdentifier21(node.parameterName)) { const { node: result, introducesError } = resolver.trackExistingEntityName(context, node.parameterName); if (introducesError) markError(); parameterName = result; @@ -164554,14 +167539,14 @@ ${lanes.join("\n")} } return factory.updateTypePredicateNode(node, factory.cloneNode(node.assertsModifier), parameterName, visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); } - if (isTupleTypeNode(node) || isTypeLiteralNode(node) || isMappedTypeNode(node)) { + if (isTupleTypeNode(node) || isTypeLiteralNode2(node) || isMappedTypeNode(node)) { const visited = visitEachChild2(node, visitExistingNodeTreeSymbols); const clone22 = resolver.markNodeReuse(context, visited === node ? factory.cloneNode(node) : visited, node); const flags = getEmitFlags(clone22); - setEmitFlags(clone22, flags | (context.flags & 1024 && isTypeLiteralNode(node) ? 0 : 1)); + setEmitFlags(clone22, flags | (context.flags & 1024 && isTypeLiteralNode2(node) ? 0 : 1)); return clone22; } - if (isStringLiteral10(node) && !!(context.flags & 268435456) && !node.singleQuote) { + if (isStringLiteral12(node) && !!(context.flags & 268435456) && !node.singleQuote) { const clone22 = factory.cloneNode(node); clone22.singleQuote = true; return clone22; @@ -164626,11 +167611,11 @@ ${lanes.join("\n")} ) : void 0); } function getNameForJSDocFunctionParameter(p, index) { - return p.name && isIdentifier17(p.name) && p.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index}`; + return p.name && isIdentifier21(p.name) && p.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index}`; } - function rewriteModuleSpecifier2(parent2, lit) { - const newName = resolver.getModuleSpecifierOverride(context, parent2, lit); - return newName ? setOriginalNode(factory.createStringLiteral(newName), lit) : lit; + function rewriteModuleSpecifier2(parent2, lit2) { + const newName = resolver.getModuleSpecifierOverride(context, parent2, lit2); + return newName ? setOriginalNode(factory.createStringLiteral(newName), lit2) : lit2; } } } @@ -164843,7 +167828,7 @@ ${lanes.join("\n")} let resultType = failed; if (declaredType) { resultType = syntacticResult(serializeTypeAnnotationOfDeclaration(declaredType, context, node, symbol2, addUndefined)); - } else if (isParameter(node) && node.initializer && isIdentifier17(node.name) && !isContextuallyTyped(node)) { + } else if (isParameter(node) && node.initializer && isIdentifier21(node.name) && !isContextuallyTyped(node)) { resultType = typeFromExpression( node.initializer, context, @@ -165172,7 +168157,7 @@ ${lanes.join("\n")} const oldFlags = context.flags; context.flags |= 4194304; for (const prop of objectLiteral.properties) { - Debug.assert(!isShorthandPropertyAssignment3(prop) && !isSpreadAssignment3(prop)); + Debug.assert(!isShorthandPropertyAssignment5(prop) && !isSpreadAssignment5(prop)); const name = prop.name; let newProp; switch (prop.kind) { @@ -165284,7 +168269,7 @@ ${lanes.join("\n")} ) ); } else { - if (isIdentifier17(name) && name.escapedText === "new") { + if (isIdentifier21(name) && name.escapedText === "new") { name = factory.createStringLiteral("new"); } return factory.createMethodSignature( @@ -165419,7 +168404,7 @@ ${lanes.join("\n")} const flags = getFunctionFlags(declaration); if (flags & 3) return failed; const body = declaration.body; - if (body && isBlock4(body)) { + if (body && isBlock5(body)) { forEachReturnStatement(body, (s) => { if (s.parent !== body) { candidateExpr = void 0; @@ -165438,7 +168423,7 @@ ${lanes.join("\n")} } if (candidateExpr) { if (isContextuallyTyped(candidateExpr)) { - const type = isJSDocTypeAssertion(candidateExpr) ? getJSDocTypeAssertionType(candidateExpr) : isAsExpression4(candidateExpr) || isTypeAssertionExpression(candidateExpr) ? candidateExpr.type : void 0; + const type = isJSDocTypeAssertion(candidateExpr) ? getJSDocTypeAssertionType(candidateExpr) : isAsExpression6(candidateExpr) || isTypeAssertionExpression2(candidateExpr) ? candidateExpr.type : void 0; if (type && !isConstTypeReference(type)) { return syntacticResult(serializeExistingTypeNode(type, context)); } @@ -165450,7 +168435,7 @@ ${lanes.join("\n")} } function isContextuallyTyped(node) { return findAncestor(node.parent, (n) => { - return isCallExpression9(n) || !isFunctionLikeDeclaration(n) && !!getEffectiveTypeAnnotationNode(n) || isJsxElement(n) || isJsxExpression(n); + return isCallExpression12(n) || !isFunctionLikeDeclaration(n) && !!getEffectiveTypeAnnotationNode(n) || isJsxElement(n) || isJsxExpression(n); }); } } @@ -166130,7 +169115,7 @@ ${lanes.join("\n")} const parent2 = node.parent; if (node.kind === 308) { return 1; - } else if (isExportAssignment2(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { + } else if (isExportAssignment3(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { return 7; } else if (isInRightSideOfInternalImportEqualsDeclaration(node)) { return getMeaningFromRightHandSideOfImportEquals(node); @@ -166214,16 +169199,16 @@ ${lanes.join("\n")} return false; } function isCallExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isCallExpression9, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); + return isCalleeWorker(node, isCallExpression12, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); } function isNewExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isNewExpression12, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); + return isCalleeWorker(node, isNewExpression15, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); } function isCallOrNewExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { return isCalleeWorker(node, isCallOrNewExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); } function isTaggedTemplateTag(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isTaggedTemplateExpression2, selectTagOfTaggedTemplateExpression, includeElementAccess, skipPastOuterExpressions); + return isCalleeWorker(node, isTaggedTemplateExpression4, selectTagOfTaggedTemplateExpression, includeElementAccess, skipPastOuterExpressions); } function isDecoratorTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { return isCalleeWorker(node, isDecorator, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); @@ -166263,18 +169248,18 @@ ${lanes.join("\n")} return void 0; } function hasPropertyAccessExpressionWithName(node, funcName) { - if (!isPropertyAccessExpression10(node.expression)) { + if (!isPropertyAccessExpression12(node.expression)) { return false; } return node.expression.name.text === funcName; } function isJumpStatementTarget(node) { var _a3; - return isIdentifier17(node) && ((_a3 = tryCast(node.parent, isBreakOrContinueStatement)) == null ? void 0 : _a3.label) === node; + return isIdentifier21(node) && ((_a3 = tryCast(node.parent, isBreakOrContinueStatement)) == null ? void 0 : _a3.label) === node; } function isLabelOfLabeledStatement(node) { var _a3; - return isIdentifier17(node) && ((_a3 = tryCast(node.parent, isLabeledStatement)) == null ? void 0 : _a3.label) === node; + return isIdentifier21(node) && ((_a3 = tryCast(node.parent, isLabeledStatement)) == null ? void 0 : _a3.label) === node; } function isLabelName(node) { return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); @@ -166289,11 +169274,11 @@ ${lanes.join("\n")} } function isRightSideOfPropertyAccess(node) { var _a3; - return ((_a3 = tryCast(node.parent, isPropertyAccessExpression10)) == null ? void 0 : _a3.name) === node; + return ((_a3 = tryCast(node.parent, isPropertyAccessExpression12)) == null ? void 0 : _a3.name) === node; } function isArgumentExpressionOfElementAccess(node) { var _a3; - return ((_a3 = tryCast(node.parent, isElementAccessExpression3)) == null ? void 0 : _a3.argumentExpression) === node; + return ((_a3 = tryCast(node.parent, isElementAccessExpression5)) == null ? void 0 : _a3.argumentExpression) === node; } function isNameOfModuleDeclaration(node) { var _a3; @@ -166301,7 +169286,7 @@ ${lanes.join("\n")} } function isNameOfFunctionDeclaration(node) { var _a3; - return isIdentifier17(node) && ((_a3 = tryCast(node.parent, isFunctionLike)) == null ? void 0 : _a3.name) === node; + return isIdentifier21(node) && ((_a3 = tryCast(node.parent, isFunctionLike)) == null ? void 0 : _a3.name) === node; } function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { switch (node.parent.kind) { @@ -166432,12 +169417,12 @@ ${lanes.join("\n")} const rightKind = getNodeKind(right); return rightKind === "" ? "const" : rightKind; case 3: - return isFunctionExpression4(right) ? "method" : "property"; + return isFunctionExpression5(right) ? "method" : "property"; case 4: return "property"; // property case 5: - return isFunctionExpression4(right) ? "method" : "property"; + return isFunctionExpression5(right) ? "method" : "property"; case 6: return "local class"; default: { @@ -166655,7 +169640,7 @@ ${lanes.join("\n")} if (isNamedDeclaration(node)) { return node.name; } - if (isClassDeclaration3(node)) { + if (isClassDeclaration5(node)) { const defaultModifier = node.modifiers && find(node.modifiers, isDefaultModifier2); if (defaultModifier) return defaultModifier; } @@ -166668,11 +169653,11 @@ ${lanes.join("\n")} if (isNamedDeclaration(node)) { return node.name; } - if (isFunctionDeclaration2(node)) { + if (isFunctionDeclaration3(node)) { const defaultModifier = find(node.modifiers, isDefaultModifier2); if (defaultModifier) return defaultModifier; } - if (isFunctionExpression4(node)) { + if (isFunctionExpression5(node)) { const functionKeyword = find(node.getChildren(), isFunctionKeyword); if (functionKeyword) return functionKeyword; } @@ -166720,13 +169705,13 @@ ${lanes.join("\n")} return node.importClause.name; } if (node.importClause.namedBindings) { - if (isNamedImports3(node.importClause.namedBindings)) { + if (isNamedImports4(node.importClause.namedBindings)) { const onlyBinding = singleOrUndefined(node.importClause.namedBindings.elements); if (!onlyBinding) { return; } return onlyBinding.name; - } else if (isNamespaceImport4(node.importClause.namedBindings)) { + } else if (isNamespaceImport5(node.importClause.namedBindings)) { return node.importClause.namedBindings.name; } } @@ -166737,7 +169722,7 @@ ${lanes.join("\n")} } function getAdjustedLocationForExportDeclaration(node, forRename) { if (node.exportClause) { - if (isNamedExports(node.exportClause)) { + if (isNamedExports2(node.exportClause)) { const onlyBinding = singleOrUndefined(node.exportClause.elements); if (!onlyBinding) { return; @@ -166758,7 +169743,7 @@ ${lanes.join("\n")} } function getAdjustedLocation(node, forRename) { const { parent: parent2 } = node; - if (isModifier(node) && (forRename || node.kind !== 90) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 86 ? isClassDeclaration3(parent2) || isClassExpression(node) : node.kind === 100 ? isFunctionDeclaration2(parent2) || isFunctionExpression4(node) : node.kind === 120 ? isInterfaceDeclaration2(parent2) : node.kind === 94 ? isEnumDeclaration(parent2) : node.kind === 156 ? isTypeAliasDeclaration2(parent2) : node.kind === 145 || node.kind === 144 ? isModuleDeclaration(parent2) : node.kind === 102 ? isImportEqualsDeclaration(parent2) : node.kind === 139 ? isGetAccessorDeclaration(parent2) : node.kind === 153 && isSetAccessorDeclaration(parent2)) { + if (isModifier(node) && (forRename || node.kind !== 90) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 86 ? isClassDeclaration5(parent2) || isClassExpression(node) : node.kind === 100 ? isFunctionDeclaration3(parent2) || isFunctionExpression5(node) : node.kind === 120 ? isInterfaceDeclaration2(parent2) : node.kind === 94 ? isEnumDeclaration(parent2) : node.kind === 156 ? isTypeAliasDeclaration2(parent2) : node.kind === 145 || node.kind === 144 ? isModuleDeclaration(parent2) : node.kind === 102 ? isImportEqualsDeclaration(parent2) : node.kind === 139 ? isGetAccessorDeclaration(parent2) : node.kind === 153 && isSetAccessorDeclaration(parent2)) { const location = getAdjustedLocationForDeclaration(parent2, forRename); if (location) { return location; @@ -166766,7 +169751,7 @@ ${lanes.join("\n")} } if ((node.kind === 115 || node.kind === 87 || node.kind === 121) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { const decl = parent2.declarations[0]; - if (isIdentifier17(decl.name)) { + if (isIdentifier21(decl.name)) { return decl.name; } } @@ -166777,7 +169762,7 @@ ${lanes.join("\n")} return location; } } - if (isExportDeclaration(parent2) && parent2.isTypeOnly) { + if (isExportDeclaration2(parent2) && parent2.isTypeOnly) { const location = getAdjustedLocationForExportDeclaration(parent2, forRename); if (location) { return location; @@ -166785,34 +169770,34 @@ ${lanes.join("\n")} } } if (node.kind === 130) { - if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport4(parent2) || isNamespaceExport(parent2)) { + if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport5(parent2) || isNamespaceExport(parent2)) { return parent2.name; } - if (isExportDeclaration(parent2) && parent2.exportClause && isNamespaceExport(parent2.exportClause)) { + if (isExportDeclaration2(parent2) && parent2.exportClause && isNamespaceExport(parent2.exportClause)) { return parent2.exportClause.name; } } - if (node.kind === 102 && isImportDeclaration5(parent2)) { + if (node.kind === 102 && isImportDeclaration6(parent2)) { const location = getAdjustedLocationForImportDeclaration(parent2, forRename); if (location) { return location; } } if (node.kind === 95) { - if (isExportDeclaration(parent2)) { + if (isExportDeclaration2(parent2)) { const location = getAdjustedLocationForExportDeclaration(parent2, forRename); if (location) { return location; } } - if (isExportAssignment2(parent2)) { + if (isExportAssignment3(parent2)) { return skipOuterExpressions(parent2.expression); } } if (node.kind === 149 && isExternalModuleReference(parent2)) { return parent2.expression; } - if (node.kind === 161 && (isImportDeclaration5(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { + if (node.kind === 161 && (isImportDeclaration6(parent2) || isExportDeclaration2(parent2)) && parent2.moduleSpecifier) { return parent2.moduleSpecifier; } if ((node.kind === 96 || node.kind === 119) && isHeritageClause(parent2) && parent2.token === node.kind) { @@ -166842,15 +169827,15 @@ ${lanes.join("\n")} return parent2.type.elementType.typeName; } if (!forRename) { - if (node.kind === 105 && isNewExpression12(parent2) || node.kind === 116 && isVoidExpression(parent2) || node.kind === 114 && isTypeOfExpression(parent2) || node.kind === 135 && isAwaitExpression(parent2) || node.kind === 127 && isYieldExpression(parent2) || node.kind === 91 && isDeleteExpression(parent2)) { + if (node.kind === 105 && isNewExpression15(parent2) || node.kind === 116 && isVoidExpression(parent2) || node.kind === 114 && isTypeOfExpression(parent2) || node.kind === 135 && isAwaitExpression(parent2) || node.kind === 127 && isYieldExpression(parent2) || node.kind === 91 && isDeleteExpression(parent2)) { if (parent2.expression) { return skipOuterExpressions(parent2.expression); } } - if ((node.kind === 103 || node.kind === 104) && isBinaryExpression2(parent2) && parent2.operatorToken === node) { + if ((node.kind === 103 || node.kind === 104) && isBinaryExpression4(parent2) && parent2.operatorToken === node) { return skipOuterExpressions(parent2.right); } - if (node.kind === 130 && isAsExpression4(parent2) && isTypeReferenceNode3(parent2.type)) { + if (node.kind === 130 && isAsExpression6(parent2) && isTypeReferenceNode3(parent2.type)) { return parent2.type.typeName; } if (node.kind === 103 && isForInStatement(parent2) || node.kind === 165 && isForOfStatement(parent2)) { @@ -167208,7 +170193,7 @@ ${lanes.join("\n")} true ); } - const signatures = isNewExpression12(called.parent) ? type.getConstructSignatures() : type.getCallSignatures(); + const signatures = isNewExpression15(called.parent) ? type.getConstructSignatures() : type.getCallSignatures(); return signatures.filter((candidate) => !!candidate.typeParameters && candidate.typeParameters.length >= typeArgumentCount); } function getPossibleTypeArgumentsInfo(tokenIn, sourceFile) { @@ -167225,7 +170210,7 @@ ${lanes.join("\n")} if (token && token.kind === 29) { token = findPrecedingToken(token.getFullStart(), sourceFile); } - if (!token || !isIdentifier17(token)) return void 0; + if (!token || !isIdentifier21(token)) return void 0; if (!remainingLessThanTokens) { return isDeclarationName(token) ? void 0 : { called: token, nTypeArguments }; } @@ -167490,7 +170475,7 @@ ${lanes.join("\n")} return node.kind === 156; } function isTypeKeywordTokenOrIdentifier(node) { - return isTypeKeywordToken(node) || isIdentifier17(node) && node.text === "type"; + return isTypeKeywordToken(node) || isIdentifier21(node) && node.text === "type"; } function nodeSeenTracker() { const seen = []; @@ -167585,7 +170570,7 @@ ${lanes.join("\n")} if (preferences.quotePreference && preferences.quotePreference !== "auto") { return preferences.quotePreference === "single" ? 0 : 1; } else { - const firstModuleSpecifier = isFullSourceFile(sourceFile) && sourceFile.imports && find(sourceFile.imports, (n) => isStringLiteral10(n) && !nodeIsSynthesized(n.parent)); + const firstModuleSpecifier = isFullSourceFile(sourceFile) && sourceFile.imports && find(sourceFile.imports, (n) => isStringLiteral12(n) && !nodeIsSynthesized(n.parent)); return firstModuleSpecifier ? quotePreferenceFromString(firstModuleSpecifier, sourceFile) : 1; } } @@ -167613,14 +170598,14 @@ ${lanes.join("\n")} }); } function isModuleSpecifierLike(node) { - return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration5(node.parent) || isJSDocImportTag(node.parent) || isRequireCall( + return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration6(node.parent) || isJSDocImportTag(node.parent) || isRequireCall( node.parent, /*requireStringLiteralLikeArgument*/ false ) && node.parent.arguments[0] === node || isImportCall(node.parent) && node.parent.arguments[0] === node); } function isObjectBindingElementWithoutPropertyName(bindingElement) { - return isBindingElement(bindingElement) && isObjectBindingPattern(bindingElement.parent) && isIdentifier17(bindingElement.name) && !bindingElement.propertyName; + return isBindingElement(bindingElement) && isObjectBindingPattern2(bindingElement.parent) && isIdentifier21(bindingElement.name) && !bindingElement.propertyName; } function getPropertySymbolFromBindingElement(checker, bindingElement) { const typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); @@ -167757,7 +170742,7 @@ ${lanes.join("\n")} } function isFirstDeclarationOfSymbolParameter(symbol2) { const declaration = symbol2.declarations ? firstOrUndefined(symbol2.declarations) : void 0; - return !!findAncestor(declaration, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit"); + return !!findAncestor(declaration, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern2(n) || isArrayBindingPattern(n) ? false : "quit"); } var displayPartWriterCache = /* @__PURE__ */ new Map(); function getDisplayPartWriter(maximumLength) { @@ -168233,7 +171218,7 @@ ${lanes.join("\n")} return idx === -1 ? -1 : idx + 1; } function needsParentheses(expression) { - return isBinaryExpression2(expression) && expression.operatorToken.kind === 28 || isObjectLiteralExpression6(expression) || (isAsExpression4(expression) || isSatisfiesExpression3(expression)) && isObjectLiteralExpression6(expression.expression); + return isBinaryExpression4(expression) && expression.operatorToken.kind === 28 || isObjectLiteralExpression9(expression) || (isAsExpression6(expression) || isSatisfiesExpression5(expression)) && isObjectLiteralExpression9(expression.expression); } function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); @@ -168703,13 +171688,13 @@ ${lanes.join("\n")} function getDefaultLikeExportNameFromDeclaration(symbol2) { return firstDefined(symbol2.declarations, (d) => { var _a3, _b, _c; - if (isExportAssignment2(d)) { - return (_a3 = tryCast(skipOuterExpressions(d.expression), isIdentifier17)) == null ? void 0 : _a3.text; + if (isExportAssignment3(d)) { + return (_a3 = tryCast(skipOuterExpressions(d.expression), isIdentifier21)) == null ? void 0 : _a3.text; } if (isExportSpecifier(d) && d.symbol.flags === 2097152) { - return (_b = tryCast(d.propertyName, isIdentifier17)) == null ? void 0 : _b.text; + return (_b = tryCast(d.propertyName, isIdentifier21)) == null ? void 0 : _b.text; } - const name = (_c = tryCast(getNameOfDeclaration(d), isIdentifier17)) == null ? void 0 : _c.text; + const name = (_c = tryCast(getNameOfDeclaration(d), isIdentifier21)) == null ? void 0 : _c.text; if (name) { return name; } @@ -169804,7 +172789,7 @@ ${lanes.join("\n")} return; } checkForClassificationCancellation(cancellationToken, node.kind); - if (isIdentifier17(node) && !nodeIsMissing(node) && classifiableNames.has(node.escapedText)) { + if (isIdentifier21(node) && !nodeIsMissing(node) && classifiableNames.has(node.escapedText)) { const symbol2 = typeChecker.getSymbolAtLocation(node); const type = symbol2 && classifySymbol(symbol2, getMeaningFromLocation(node), typeChecker); if (type) { @@ -170446,7 +173431,7 @@ ${lanes.join("\n")} case 93: return isIfStatement(node.parent) ? getIfElseOccurrences(node.parent, sourceFile) : void 0; case 107: - return useParent(node.parent, isReturnStatement2, getReturnOccurrences); + return useParent(node.parent, isReturnStatement3, getReturnOccurrences); case 111: return useParent(node.parent, isThrowStatement, getThrowOccurrences); case 113: @@ -170475,7 +173460,7 @@ ${lanes.join("\n")} true ), getLoopBreakContinueOccurrences); case 137: - return getFromAllDeclarations(isConstructorDeclaration, [ + return getFromAllDeclarations(isConstructorDeclaration2, [ 137 /* ConstructorKeyword */ ]); @@ -170496,7 +173481,7 @@ ${lanes.join("\n")} case 147: return void 0; default: - return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement8(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0; + return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement10(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0; } function getFromAllDeclarations(nodeTest, keywords) { return useParent(node.parent, nodeTest, (decl) => { @@ -170583,7 +173568,7 @@ ${lanes.join("\n")} case 242: case 297: case 298: - if (modifierFlag & 64 && isClassDeclaration3(declaration)) { + if (modifierFlag & 64 && isClassDeclaration5(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; @@ -170598,7 +173583,7 @@ ${lanes.join("\n")} case 188: const nodes = container.members; if (modifierFlag & (7 | 8)) { - const constructor = find(container.members, isConstructorDeclaration); + const constructor = find(container.members, isConstructorDeclaration2); if (constructor) { return [...nodes, ...constructor.parameters]; } @@ -170749,7 +173734,7 @@ ${lanes.join("\n")} return void 0; } const keywords = []; - forEachReturnStatement(cast(func.body, isBlock4), (returnStatement2) => { + forEachReturnStatement(cast(func.body, isBlock5), (returnStatement2) => { keywords.push(findChildOfKind(returnStatement2, 107, sourceFile)); }); forEach(aggregateOwnedThrowStatements(func.body), (throwStatement) => { @@ -171120,8 +174105,8 @@ ${lanes.join("\n")} case "include": case "exclude": { const foundExactMatch = updatePaths(property); - if (foundExactMatch || propertyName !== "include" || !isArrayLiteralExpression5(property.initializer)) return; - const includes = mapDefined(property.initializer.elements, (e) => isStringLiteral10(e) ? e.text : void 0); + if (foundExactMatch || propertyName !== "include" || !isArrayLiteralExpression7(property.initializer)) return; + const includes = mapDefined(property.initializer.elements, (e) => isStringLiteral12(e) ? e.text : void 0); if (includes.length === 0) return; const matchers = getFileMatcherPatterns( configDir, @@ -171144,7 +174129,7 @@ ${lanes.join("\n")} updatePaths(property2); } else if (propertyName2 === "paths") { forEachProperty(property2.initializer, (pathsProperty) => { - if (!isArrayLiteralExpression5(pathsProperty.initializer)) return; + if (!isArrayLiteralExpression7(pathsProperty.initializer)) return; for (const e of pathsProperty.initializer.elements) { tryUpdateString(e); } @@ -171155,7 +174140,7 @@ ${lanes.join("\n")} } }); function updatePaths(property) { - const elements = isArrayLiteralExpression5(property.initializer) ? property.initializer.elements : [property.initializer]; + const elements = isArrayLiteralExpression7(property.initializer) ? property.initializer.elements : [property.initializer]; let foundExactMatch = false; for (const element of elements) { foundExactMatch = tryUpdateString(element) || foundExactMatch; @@ -171163,7 +174148,7 @@ ${lanes.join("\n")} return foundExactMatch; } function tryUpdateString(element) { - if (!isStringLiteral10(element)) return false; + if (!isStringLiteral12(element)) return false; const elementFileName = combinePathsSafe(configDir, element.text); const updated = oldToNew(elementFileName); if (updated !== void 0) { @@ -171256,9 +174241,9 @@ ${lanes.join("\n")} return createRange(node.getStart(sourceFile) + 1, node.end - 1); } function forEachProperty(objectLiteral, cb) { - if (!isObjectLiteralExpression6(objectLiteral)) return; + if (!isObjectLiteralExpression9(objectLiteral)) return; for (const property of objectLiteral.properties) { - if (isPropertyAssignment6(property) && isStringLiteral10(property.name)) { + if (isPropertyAssignment8(property) && isStringLiteral12(property.name)) { cb(property, property.name.text); } } @@ -172131,7 +175116,7 @@ ${lanes.join("\n")} if (!name) continue; const module22 = (_a3 = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile)) == null ? void 0 : _a3.resolvedModule; const resolvedFile = module22 && program.getSourceFile(module22.resolvedFileName); - if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment2(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) { + if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment3(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) { diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import)); } } @@ -172146,7 +175131,7 @@ ${lanes.join("\n")} diags.push(createDiagnosticForNode(isVariableDeclaration4(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } else { - if (isVariableStatement8(node) && node.parent === sourceFile && node.declarationList.flags & 2 && node.declarationList.declarations.length === 1) { + if (isVariableStatement10(node) && node.parent === sourceFile && node.declarationList.flags & 2 && node.declarationList.declarations.length === 1) { const init = node.declarationList.declarations[0].initializer; if (init && isRequireCall( init, @@ -172181,7 +175166,7 @@ ${lanes.join("\n")} )); case 245: { const { expression } = statement; - if (!isBinaryExpression2(expression)) return isRequireCall( + if (!isBinaryExpression4(expression)) return isRequireCall( expression, /*requireStringLiteralLikeArgument*/ true @@ -172195,13 +175180,13 @@ ${lanes.join("\n")} }); } function propertyAccessLeftHandSide(node) { - return isPropertyAccessExpression10(node) ? propertyAccessLeftHandSide(node.expression) : node; + return isPropertyAccessExpression12(node) ? propertyAccessLeftHandSide(node.expression) : node; } function importNameForConvertToDefaultImport(node) { switch (node.kind) { case 273: const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 275 && isStringLiteral10(moduleSpecifier) ? importClause.namedBindings.name : void 0; + return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 275 && isStringLiteral12(moduleSpecifier) ? importClause.namedBindings.name : void 0; case 272: return node.name; default: @@ -172211,13 +175196,13 @@ ${lanes.join("\n")} function addConvertToAsyncFunctionDiagnostics(node, checker, diags) { if (isConvertibleFunction(node, checker) && !visitedNestedConvertibleFunctions.has(getKeyFromNode(node))) { diags.push(createDiagnosticForNode( - !node.name && isVariableDeclaration4(node.parent) && isIdentifier17(node.parent.name) ? node.parent.name : node, + !node.name && isVariableDeclaration4(node.parent) && isIdentifier21(node.parent.name) ? node.parent.name : node, Diagnostics.This_may_be_converted_to_an_async_function )); } } function isConvertibleFunction(node, checker) { - return !isAsyncFunction(node) && node.body && isBlock4(node.body) && hasReturnStatementWithPromiseHandler(node.body, checker) && returnsPromise(node, checker); + return !isAsyncFunction(node) && node.body && isBlock5(node.body) && hasReturnStatementWithPromiseHandler(node.body, checker) && returnsPromise(node, checker); } function returnsPromise(node, checker) { const signature = checker.getSignatureFromDeclaration(node); @@ -172225,21 +175210,21 @@ ${lanes.join("\n")} return !!returnType && !!checker.getPromisedTypeOfPromise(returnType); } function getErrorNodeFromCommonJsIndicator(commonJsModuleIndicator) { - return isBinaryExpression2(commonJsModuleIndicator) ? commonJsModuleIndicator.left : commonJsModuleIndicator; + return isBinaryExpression4(commonJsModuleIndicator) ? commonJsModuleIndicator.left : commonJsModuleIndicator; } function hasReturnStatementWithPromiseHandler(body, checker) { return !!forEachReturnStatement(body, (statement) => isReturnStatementWithFixablePromiseHandler(statement, checker)); } function isReturnStatementWithFixablePromiseHandler(node, checker) { - return isReturnStatement2(node) && !!node.expression && isFixablePromiseHandler(node.expression, checker); + return isReturnStatement3(node) && !!node.expression && isFixablePromiseHandler(node.expression, checker); } function isFixablePromiseHandler(node, checker) { if (!isPromiseHandler(node) || !hasSupportedNumberOfArguments(node) || !node.arguments.every((arg) => isFixablePromiseArgument(arg, checker))) { return false; } let currentNode = node.expression.expression; - while (isPromiseHandler(currentNode) || isPropertyAccessExpression10(currentNode)) { - if (isCallExpression9(currentNode)) { + while (isPromiseHandler(currentNode) || isPropertyAccessExpression12(currentNode)) { + if (isCallExpression12(currentNode)) { if (!hasSupportedNumberOfArguments(currentNode) || !currentNode.arguments.every((arg) => isFixablePromiseArgument(arg, checker))) { return false; } @@ -172251,7 +175236,7 @@ ${lanes.join("\n")} return true; } function isPromiseHandler(node) { - return isCallExpression9(node) && (hasPropertyAccessExpressionWithName(node, "then") || hasPropertyAccessExpressionWithName(node, "catch") || hasPropertyAccessExpressionWithName(node, "finally")); + return isCallExpression12(node) && (hasPropertyAccessExpressionWithName(node, "then") || hasPropertyAccessExpressionWithName(node, "catch") || hasPropertyAccessExpressionWithName(node, "finally")); } function hasSupportedNumberOfArguments(node) { const name = node.expression.name.text; @@ -172259,7 +175244,7 @@ ${lanes.join("\n")} if (node.arguments.length > maxArguments) return false; if (node.arguments.length < maxArguments) return true; return maxArguments === 1 || some(node.arguments, (arg) => { - return arg.kind === 106 || isIdentifier17(arg) && arg.text === "undefined"; + return arg.kind === 106 || isIdentifier21(arg) && arg.text === "undefined"; }); } function isFixablePromiseArgument(arg, checker) { @@ -172293,7 +175278,7 @@ ${lanes.join("\n")} } function canBeConvertedToClass(node, checker) { var _a3, _b, _c, _d; - if (isFunctionExpression4(node)) { + if (isFunctionExpression5(node)) { if (isVariableDeclaration4(node.parent) && ((_a3 = node.symbol.members) == null ? void 0 : _a3.size)) { return true; } @@ -172304,7 +175289,7 @@ ${lanes.join("\n")} ); return !!(symbol2 && (((_b = symbol2.exports) == null ? void 0 : _b.size) || ((_c = symbol2.members) == null ? void 0 : _c.size))); } - if (isFunctionDeclaration2(node)) { + if (isFunctionDeclaration3(node)) { return !!((_d = node.symbol.members) == null ? void 0 : _d.size); } return false; @@ -172362,7 +175347,7 @@ interface Symbol { var barebonesLibName = "lib.d.ts"; var barebonesLibSourceFile; function transpileWorker(input, transpileOptions, declaration) { - barebonesLibSourceFile ?? (barebonesLibSourceFile = createSourceFile2(barebonesLibName, barebonesLibContent, { + barebonesLibSourceFile ?? (barebonesLibSourceFile = createSourceFile5(barebonesLibName, barebonesLibContent, { languageVersion: 99 /* Latest */ })); @@ -172413,7 +175398,7 @@ interface Symbol { getDirectories: () => [] }; const inputFileName = transpileOptions.fileName || (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx ? "module.tsx" : "module.ts"); - const sourceFile = createSourceFile2( + const sourceFile = createSourceFile5( inputFileName, input, { @@ -172562,7 +175547,7 @@ interface Symbol { return !!name && (pushLiteral(name, containers) || name.kind === 168 && tryAddComputedPropertyName(name.expression, containers)); } function tryAddComputedPropertyName(expression, containers) { - return pushLiteral(expression, containers) || isPropertyAccessExpression10(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); + return pushLiteral(expression, containers) || isPropertyAccessExpression12(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); } function pushLiteral(node, containers) { return isPropertyNameLiteral(node) && (containers.push(getTextOfIdentifierOrLiteral(node)), true); @@ -172741,7 +175726,7 @@ interface Symbol { if (name === void 0) return false; if (isComputedPropertyName(name)) { const expression = name.expression; - return isEntityNameExpression(expression) || isNumericLiteral3(expression) || isStringOrNumericLiteralLike(expression); + return isEntityNameExpression(expression) || isNumericLiteral4(expression) || isStringOrNumericLiteralLike(expression); } return !!name; } @@ -172799,7 +175784,7 @@ interface Symbol { break; case 306: const { expression } = node; - isIdentifier17(expression) ? addLeafNode(node, expression) : addLeafNode(node); + isIdentifier21(expression) ? addLeafNode(node, expression) : addLeafNode(node); break; case 209: case 304: @@ -172814,7 +175799,7 @@ interface Symbol { } case 263: const nameNode = node.name; - if (nameNode && isIdentifier17(nameNode)) { + if (nameNode && isIdentifier21(nameNode)) { addTrackedEs5Class(nameNode.text); } addNodeWithRecursiveChild(node, node.body); @@ -172846,7 +175831,7 @@ interface Symbol { break; case 278: { const expression2 = node.expression; - const child = isObjectLiteralExpression6(expression2) || isCallExpression9(expression2) ? expression2 : isArrowFunction5(expression2) || isFunctionExpression4(expression2) ? expression2.body : void 0; + const child = isObjectLiteralExpression9(expression2) || isCallExpression12(expression2) ? expression2 : isArrowFunction6(expression2) || isFunctionExpression5(expression2) ? expression2.body : void 0; if (child) { startNode(node); addChildrenRecursively(child); @@ -172879,21 +175864,21 @@ interface Symbol { const prototypeAccess = special === 3 ? assignmentTarget.expression : assignmentTarget; let depth = 0; let className; - if (isIdentifier17(prototypeAccess.expression)) { + if (isIdentifier21(prototypeAccess.expression)) { addTrackedEs5Class(prototypeAccess.expression.text); className = prototypeAccess.expression; } else { [depth, className] = startNestedNodes(binaryExpression, prototypeAccess.expression); } if (special === 6) { - if (isObjectLiteralExpression6(binaryExpression.right)) { + if (isObjectLiteralExpression9(binaryExpression.right)) { if (binaryExpression.right.properties.length > 0) { startNode(binaryExpression, className); forEachChild22(binaryExpression.right, addChildrenRecursively); endNode(); } } - } else if (isFunctionExpression4(binaryExpression.right) || isArrowFunction5(binaryExpression.right)) { + } else if (isFunctionExpression5(binaryExpression.right) || isArrowFunction6(binaryExpression.right)) { addNodeWithRecursiveChild(node, binaryExpression.right, className); } else { startNode(binaryExpression, className); @@ -172921,8 +175906,8 @@ interface Symbol { const binaryExpression = node; const assignmentTarget = binaryExpression.left; const targetFunction = assignmentTarget.expression; - if (isIdentifier17(targetFunction) && getElementOrPropertyAccessName(assignmentTarget) !== "prototype" && trackedEs5Classes && trackedEs5Classes.has(targetFunction.text)) { - if (isFunctionExpression4(binaryExpression.right) || isArrowFunction5(binaryExpression.right)) { + if (isIdentifier21(targetFunction) && getElementOrPropertyAccessName(assignmentTarget) !== "prototype" && trackedEs5Classes && trackedEs5Classes.has(targetFunction.text)) { + if (isFunctionExpression5(binaryExpression.right) || isArrowFunction6(binaryExpression.right)) { addNodeWithRecursiveChild(node, binaryExpression.right, targetFunction); } else if (isBindableStaticAccessExpression(assignmentTarget)) { startNode(binaryExpression, targetFunction); @@ -173030,13 +176015,13 @@ interface Symbol { }; function tryMergeEs5Class(a, b, bIndex, parent2) { function isPossibleConstructor(node) { - return isFunctionExpression4(node) || isFunctionDeclaration2(node) || isVariableDeclaration4(node); + return isFunctionExpression5(node) || isFunctionDeclaration3(node) || isVariableDeclaration4(node); } - const bAssignmentDeclarationKind = isBinaryExpression2(b.node) || isCallExpression9(b.node) ? getAssignmentDeclarationKind(b.node) : 0; - const aAssignmentDeclarationKind = isBinaryExpression2(a.node) || isCallExpression9(a.node) ? getAssignmentDeclarationKind(a.node) : 0; - if (isEs5ClassMember[bAssignmentDeclarationKind] && isEs5ClassMember[aAssignmentDeclarationKind] || isPossibleConstructor(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isPossibleConstructor(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration3(a.node) && isSynthesized(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isClassDeclaration3(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration3(a.node) && isSynthesized(a.node) && isPossibleConstructor(b.node) || isClassDeclaration3(b.node) && isPossibleConstructor(a.node) && isSynthesized(a.node)) { + const bAssignmentDeclarationKind = isBinaryExpression4(b.node) || isCallExpression12(b.node) ? getAssignmentDeclarationKind(b.node) : 0; + const aAssignmentDeclarationKind = isBinaryExpression4(a.node) || isCallExpression12(a.node) ? getAssignmentDeclarationKind(a.node) : 0; + if (isEs5ClassMember[bAssignmentDeclarationKind] && isEs5ClassMember[aAssignmentDeclarationKind] || isPossibleConstructor(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isPossibleConstructor(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration5(a.node) && isSynthesized(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isClassDeclaration5(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration5(a.node) && isSynthesized(a.node) && isPossibleConstructor(b.node) || isClassDeclaration5(b.node) && isPossibleConstructor(a.node) && isSynthesized(a.node)) { let lastANode = a.additionalNodes && lastOrUndefined(a.additionalNodes) || a.node; - if (!isClassDeclaration3(a.node) && !isClassDeclaration3(b.node) || isPossibleConstructor(a.node) || isPossibleConstructor(b.node)) { + if (!isClassDeclaration5(a.node) && !isClassDeclaration5(b.node) || isPossibleConstructor(a.node) || isPossibleConstructor(b.node)) { const ctorFunction = isPossibleConstructor(a.node) ? a.node : isPossibleConstructor(b.node) ? b.node : void 0; if (ctorFunction !== void 0) { const ctorNode = setTextRange( @@ -173185,7 +176170,7 @@ interface Symbol { return cleanText(getModuleName(node)); } if (name) { - const text = isIdentifier17(name) ? name.text : isElementAccessExpression3(name) ? `[${nodeText(name.argumentExpression)}]` : nodeText(name); + const text = isIdentifier21(name) ? name.text : isElementAccessExpression5(name) ? `[${nodeText(name.argumentExpression)}]` : nodeText(name); if (text.length > 0) { return cleanText(text); } @@ -173195,7 +176180,7 @@ interface Symbol { const sourceFile = node; return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; case 278: - return isExportAssignment2(node) && node.isExportEquals ? "export=" : "default"; + return isExportAssignment3(node) && node.isExportEquals ? "export=" : "default"; case 220: case 263: case 219: @@ -173347,15 +176332,15 @@ interface Symbol { return cleanText(declarationNameToString(node.name)); } else if (isVariableDeclaration4(parent2)) { return cleanText(declarationNameToString(parent2.name)); - } else if (isBinaryExpression2(parent2) && parent2.operatorToken.kind === 64) { + } else if (isBinaryExpression4(parent2) && parent2.operatorToken.kind === 64) { return nodeText(parent2.left).replace(whiteSpaceRegex, ""); - } else if (isPropertyAssignment6(parent2)) { + } else if (isPropertyAssignment8(parent2)) { return nodeText(parent2.name); } else if (getSyntacticModifierFlags(node) & 2048) { return "default"; } else if (isClassLike(node)) { return ""; - } else if (isCallExpression9(parent2)) { + } else if (isCallExpression12(parent2)) { let name = getCalledExpressionName(parent2.expression); if (name !== void 0) { name = cleanText(name); @@ -173369,9 +176354,9 @@ interface Symbol { return ""; } function getCalledExpressionName(expr) { - if (isIdentifier17(expr)) { + if (isIdentifier21(expr)) { return expr.text; - } else if (isPropertyAccessExpression10(expr)) { + } else if (isPropertyAccessExpression12(expr)) { const left = getCalledExpressionName(expr.expression); const right = expr.name.text; return left === void 0 ? right : `${left}.${right}`; @@ -173491,7 +176476,7 @@ interface Symbol { } const checker = program.getTypeChecker(); const exportingModuleSymbol = getExportingModuleSymbol(exportNode.parent, checker); - const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment2(exportNode) && !exportNode.isExportEquals ? 2080 : 0); + const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment3(exportNode) && !exportNode.isExportEquals ? 2080 : 0); const wasDefault = !!(flags & 2048); if (!(flags & 32) || !wasDefault && exportingModuleSymbol.exports.has( "default" @@ -173499,7 +176484,7 @@ interface Symbol { )) { return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) }; } - const noSymbolError = (id) => isIdentifier17(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; + const noSymbolError = (id) => isIdentifier21(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; switch (exportNode.kind) { case 263: case 264: @@ -173536,7 +176521,7 @@ interface Symbol { } function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName }, changes, checker) { if (wasDefault) { - if (isExportAssignment2(exportNode) && !exportNode.isExportEquals) { + if (isExportAssignment3(exportNode) && !exportNode.isExportEquals) { const exp = exportNode.expression; const spec = makeExportSpecifier(exp.text, exp.text); changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDeclaration( @@ -173620,7 +176605,7 @@ interface Symbol { changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); } else if (namedBindings.kind === 275) { changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); - const quotePreference = isStringLiteral10(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1; + const quotePreference = isStringLiteral12(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1; const newImport = makeImport( /*defaultImport*/ void 0, @@ -173750,8 +176735,8 @@ interface Symbol { const { file: file2 } = context; const span = getRefactorContextSpan(context); const token = getTokenAtPosition(file2, span.start); - const importDecl = considerPartialSpans ? findAncestor(token, or(isImportDeclaration5, isJSDocImportTag)) : getParentNodeInSpan(token, file2, span); - if (importDecl === void 0 || !(isImportDeclaration5(importDecl) || isJSDocImportTag(importDecl))) return { error: "Selection is not an import declaration." }; + const importDecl = considerPartialSpans ? findAncestor(token, or(isImportDeclaration6, isJSDocImportTag)) : getParentNodeInSpan(token, file2, span); + if (importDecl === void 0 || !(isImportDeclaration6(importDecl) || isJSDocImportTag(importDecl))) return { error: "Selection is not an import declaration." }; const end = span.start + span.length; const nextToken = findNextToken(importDecl, importDecl.parent, file2); if (nextToken && end > nextToken.getStart()) return void 0; @@ -173827,7 +176812,7 @@ interface Symbol { )); }); const importDecl = toConvert.parent.parent; - if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports && isImportDeclaration5(importDecl)) { + if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports && isImportDeclaration6(importDecl)) { changes.insertNodeAfter(sourceFile, importDecl, createImport( importDecl, /*defaultImportName*/ @@ -173840,10 +176825,10 @@ interface Symbol { } } function getRightOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) { - return isPropertyAccessExpression10(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.name : propertyAccessOrQualifiedName.right; + return isPropertyAccessExpression12(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.name : propertyAccessOrQualifiedName.right; } function getLeftOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) { - return isPropertyAccessExpression10(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.expression : propertyAccessOrQualifiedName.left; + return isPropertyAccessExpression12(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.expression : propertyAccessOrQualifiedName.left; } function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConvert, shouldUseDefault = getShouldUseDefault(program, toConvert.parent)) { const checker = program.getTypeChecker(); @@ -173856,7 +176841,7 @@ interface Symbol { toConvertSymbols.add(symbol2); } }); - const preferredName = moduleSpecifier && isStringLiteral10(moduleSpecifier) ? moduleSpecifierToValidIdentifier( + const preferredName = moduleSpecifier && isStringLiteral12(moduleSpecifier) ? moduleSpecifierToValidIdentifier( moduleSpecifier.text, 99 /* ESNext */ @@ -173886,7 +176871,7 @@ interface Symbol { const propertyName = element.propertyName || element.name; ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, (id) => { const access = propertyName.kind === 11 ? factory.createElementAccessExpression(factory.createIdentifier(namespaceImportName), factory.cloneNode(propertyName)) : factory.createPropertyAccessExpression(factory.createIdentifier(namespaceImportName), factory.cloneNode(propertyName)); - if (isShorthandPropertyAssignment3(id.parent)) { + if (isShorthandPropertyAssignment5(id.parent)) { changes.replaceNode(sourceFile, id.parent, factory.createPropertyAssignment(id.text, access)); } else if (isExportSpecifier(id.parent)) { neededNamedImports.add(element); @@ -173900,7 +176885,7 @@ interface Symbol { toConvert, shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)) ); - if (neededNamedImports.size && isImportDeclaration5(importDecl)) { + if (neededNamedImports.size && isImportDeclaration6(importDecl)) { const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.cloneNode(element.propertyName), factory.cloneNode(element.name))); changes.insertNodeAfter(sourceFile, toConvert.parent.parent, createImport( importDecl, @@ -174086,7 +177071,7 @@ interface Symbol { return result; } else if (isParenthesizedTypeNode(selection)) { return flattenTypeLiteralNodeReference(checker, selection.type); - } else if (isTypeLiteralNode(selection)) { + } else if (isTypeLiteralNode2(selection)) { return selection.members; } return void 0; @@ -174104,7 +177089,7 @@ interface Symbol { return { typeParameters: result, affectedTextRange: selectionRange }; function visitor(node) { if (isTypeReferenceNode3(node)) { - if (isIdentifier17(node.typeName)) { + if (isIdentifier21(node.typeName)) { const typeName = node.typeName; const symbol2 = checker.resolveName( typeName.text, @@ -174136,7 +177121,7 @@ interface Symbol { return true; } } else if (isTypeQueryNode(node)) { - if (isIdentifier17(node.exprName)) { + if (isIdentifier21(node.exprName)) { const symbol2 = checker.resolveName( node.exprName.text, node.exprName, @@ -174402,9 +177387,9 @@ interface Symbol { if (!cfg) return; const newFileAbsolutePath = normalizePath(combinePaths(oldFileName, "..", newFileNameWithExtension)); const newFilePath = getRelativePathFromFile(cfg.fileName, newFileAbsolutePath, getCanonicalFileName); - const cfgObject = cfg.statements[0] && tryCast(cfg.statements[0].expression, isObjectLiteralExpression6); - const filesProp = cfgObject && find(cfgObject.properties, (prop) => isPropertyAssignment6(prop) && isStringLiteral10(prop.name) && prop.name.text === "files"); - if (filesProp && isArrayLiteralExpression5(filesProp.initializer)) { + const cfgObject = cfg.statements[0] && tryCast(cfg.statements[0].expression, isObjectLiteralExpression9); + const filesProp = cfgObject && find(cfgObject.properties, (prop) => isPropertyAssignment8(prop) && isStringLiteral12(prop.name) && prop.name.text === "files"); + if (filesProp && isArrayLiteralExpression7(filesProp.initializer)) { changes.insertNodeInListAfter(cfg, last(filesProp.initializer.elements), factory.createStringLiteral(newFilePath), filesProp.initializer.elements); } } @@ -174454,7 +177439,7 @@ interface Symbol { return !!symbol2 && movedSymbols.has(symbol2); }; deleteUnusedImports(sourceFile, importNode, changes, shouldMove); - const pathToTargetFileWithExtension = resolvePath(getDirectoryPath(getNormalizedAbsolutePath(oldFile.fileName, program.getCurrentDirectory())), targetFileName); + const pathToTargetFileWithExtension = resolvePath2(getDirectoryPath(getNormalizedAbsolutePath(oldFile.fileName, program.getCurrentDirectory())), targetFileName); if (getStringComparer(!program.useCaseSensitiveFileNames())(pathToTargetFileWithExtension, sourceFile.fileName) === 0) return; const newModuleSpecifier = ts_moduleSpecifiers_exports.getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.fileName, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host)); const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); @@ -174472,7 +177457,7 @@ interface Symbol { case 272: return node.name; case 261: - return tryCast(node.name, isIdentifier17); + return tryCast(node.name, isIdentifier21); default: return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); } @@ -174486,7 +177471,7 @@ interface Symbol { let needUniqueName = false; const toChange = []; ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(oldImportId, checker, sourceFile, (ref) => { - if (!isPropertyAccessExpression10(ref.parent)) return; + if (!isPropertyAccessExpression12(ref.parent)) return; needUniqueName = needUniqueName || !!checker.resolveName( preferredNewNamespaceName, ref, @@ -174559,13 +177544,13 @@ interface Symbol { return i.kind === 273 ? i.moduleSpecifier : i.kind === 272 ? i.moduleReference.expression : i.initializer.arguments[0]; } function forEachImportInStatement(statement, cb) { - if (isImportDeclaration5(statement)) { - if (isStringLiteral10(statement.moduleSpecifier)) cb(statement); + if (isImportDeclaration6(statement)) { + if (isStringLiteral12(statement.moduleSpecifier)) cb(statement); } else if (isImportEqualsDeclaration(statement)) { if (isExternalModuleReference(statement.moduleReference) && isStringLiteralLike(statement.moduleReference.expression)) { cb(statement); } - } else if (isVariableStatement8(statement)) { + } else if (isVariableStatement10(statement)) { for (const decl of statement.declarationList.declarations) { if (decl.initializer && isRequireCall( decl.initializer, @@ -174598,7 +177583,7 @@ interface Symbol { cb(importOrRequire); } else if (importOrRequire.name.kind === 207) { for (const element of importOrRequire.name.elements) { - if (isIdentifier17(element.name)) { + if (isIdentifier21(element.name)) { cb(element); } } @@ -174656,14 +177641,14 @@ interface Symbol { } } forEachAliasDeclarationInImportOrRequire(importDecl, (i) => { - if (i.name && isIdentifier17(i.name) && isUnused(i.name)) { + if (i.name && isIdentifier21(i.name) && isUnused(i.name)) { changes.delete(sourceFile, i); } }); } function isTopLevelDeclarationStatement(node) { Debug.assert(isSourceFile(node.parent), "Node parent should be a SourceFile"); - return isNonVariableTopLevelDeclaration(node) || isVariableStatement8(node); + return isNonVariableTopLevelDeclaration(node) || isVariableStatement10(node); } function addExport(decl, useEs6Exports) { return useEs6Exports ? [addEs6Export(decl)] : addCommonjsExport(decl); @@ -174716,7 +177701,7 @@ interface Symbol { return [decl.name.text]; // TODO: GH#18217 case 244: - return mapDefined(decl.declarationList.declarations, (d) => isIdentifier17(d.name) ? d.name.text : void 0); + return mapDefined(decl.declarationList.declarations, (d) => isIdentifier21(d.name) ? d.name.text : void 0); case 268: case 267: case 266: @@ -174770,13 +177755,13 @@ interface Symbol { case 208: return name; case 207: { - const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier17(prop.name) || keep(prop.name)); + const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier21(prop.name) || keep(prop.name)); return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; } } } function nameOfTopLevelDeclaration(d) { - return isExpressionStatement(d) ? tryCast(d.expression.left.name, isIdentifier17) : tryCast(d.name, isIdentifier17); + return isExpressionStatement(d) ? tryCast(d.expression.left.name, isIdentifier21) : tryCast(d.name, isIdentifier21); } function getTopLevelDeclarationStatement(d) { switch (d.kind) { @@ -174890,7 +177875,7 @@ interface Symbol { const targetFileImportsFromOldFile = /* @__PURE__ */ new Map(); const jsxNamespaceSymbol = getJsxNamespaceSymbol(containsJsx(toMove)); if (jsxNamespaceSymbol) { - oldImportsNeededByTargetFile.set(jsxNamespaceSymbol, [false, tryCast((_a3 = jsxNamespaceSymbol.declarations) == null ? void 0 : _a3[0], (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport4(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration4(d))]); + oldImportsNeededByTargetFile.set(jsxNamespaceSymbol, [false, tryCast((_a3 = jsxNamespaceSymbol.declarations) == null ? void 0 : _a3[0], (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport5(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration4(d))]); } for (const statement of toMove) { forEachTopLevelDeclaration(statement, (decl) => { @@ -174912,7 +177897,7 @@ interface Symbol { const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol2); oldImportsNeededByTargetFile.set(symbol2, [ prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite, - tryCast(importedDeclaration, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport4(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration4(d)) + tryCast(importedDeclaration, (d) => isImportSpecifier(d) || isImportClause(d) || isNamespaceImport5(d) || isImportEqualsDeclaration(d) || isBindingElement(d) || isVariableDeclaration4(d)) ]); } else if (!movedSymbols.has(symbol2) && every(symbol2.declarations, (decl) => isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile)) { targetFileImportsFromOldFile.set(symbol2, isValidTypeOnlyUseSite); @@ -174962,7 +177947,7 @@ interface Symbol { } function forEachReference(node, checker, enclosingRange, onReference) { node.forEachChild(function cb(node2) { - if (isIdentifier17(node2) && !isDeclarationName(node2)) { + if (isIdentifier21(node2) && !isDeclarationName(node2)) { if (enclosingRange && !rangeContainsRange(enclosingRange, node2)) { return; } @@ -174987,7 +177972,7 @@ interface Symbol { return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); case 245: { const { expression } = statement; - return isBinaryExpression2(expression) && getAssignmentDeclarationKind(expression) === 1 ? cb(statement) : void 0; + return isBinaryExpression4(expression) && getAssignmentDeclarationKind(expression) === 1 ? cb(statement) : void 0; } } } @@ -175060,7 +178045,7 @@ interface Symbol { forEachTopLevelDeclaration(node, (declaration) => { var _a22; const targetDeclarations = canHaveSymbol(declaration) ? (_a22 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a22.declarations : void 0; - const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); + const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration2(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration2) : void 0); if (exportDeclaration && exportDeclaration.moduleSpecifier) { targetToSourceExports.set(exportDeclaration, (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration)); } @@ -175068,7 +178053,7 @@ interface Symbol { } } for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) { - if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { + if (exportDeclaration.exportClause && isNamedExports2(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { const elements = exportDeclaration.exportClause.elements; const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0); if (length(updatedElements) === 0) { @@ -175082,7 +178067,7 @@ interface Symbol { } } } - const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n)); + const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration2(n) && !!n.moduleSpecifier && !removedExports.has(n)); if (lastReExport) { changes.insertNodesBefore( targetFile, @@ -175114,7 +178099,7 @@ interface Symbol { const existingLocals = /* @__PURE__ */ new Set(); for (const moduleSpecifier of sourceFile.imports) { const declaration = importFromModuleSpecifier(moduleSpecifier); - if (isImportDeclaration5(declaration) && declaration.importClause && declaration.importClause.namedBindings && isNamedImports3(declaration.importClause.namedBindings)) { + if (isImportDeclaration6(declaration) && declaration.importClause && declaration.importClause.namedBindings && isNamedImports4(declaration.importClause.namedBindings)) { for (const e of declaration.importClause.namedBindings.elements) { const symbol2 = checker.getSymbolAtLocation(e.propertyName || e.name); if (symbol2) { @@ -175122,7 +178107,7 @@ interface Symbol { } } } - if (isVariableDeclarationInitializedToRequire(declaration.parent) && isObjectBindingPattern(declaration.parent.name)) { + if (isVariableDeclarationInitializedToRequire(declaration.parent) && isObjectBindingPattern2(declaration.parent.name)) { for (const e of declaration.parent.name.elements) { const symbol2 = checker.getSymbolAtLocation(e.propertyName || e.name); if (symbol2) { @@ -175155,7 +178140,7 @@ interface Symbol { return known.substr(0, requested.length) === requested; } function getIdentifierForNode(node, scope, checker, file2) { - return isPropertyAccessExpression10(node) && !isClassLike(scope) && !checker.resolveName( + return isPropertyAccessExpression12(node) && !isClassLike(scope) && !checker.resolveName( node.name.text, node, 111551, @@ -175234,8 +178219,8 @@ interface Symbol { const { references, declaration, replacement } = info; const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { for (const node of references) { - const closestStringIdentifierParent = isStringLiteral10(replacement) && isIdentifier17(node) && walkUpParenthesizedExpressions(node.parent); - if (closestStringIdentifierParent && isTemplateSpan(closestStringIdentifierParent) && !isTaggedTemplateExpression2(closestStringIdentifierParent.parent.parent)) { + const closestStringIdentifierParent = isStringLiteral12(replacement) && isIdentifier21(node) && walkUpParenthesizedExpressions(node.parent); + if (closestStringIdentifierParent && isTemplateSpan(closestStringIdentifierParent) && !isTaggedTemplateExpression4(closestStringIdentifierParent.parent.parent)) { replaceTemplateStringVariableWithLiteral(tracker, file2, closestStringIdentifierParent, replacement); } else { tracker.replaceNode(file2, node, getReplacementExpression(node, replacement)); @@ -175251,10 +178236,10 @@ interface Symbol { const checker = program.getTypeChecker(); const token = getTouchingPropertyName(file2, startPosition); const parent2 = token.parent; - if (!isIdentifier17(token)) { + if (!isIdentifier21(token)) { return void 0; } - if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier17(parent2.name)) { + if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier21(parent2.name)) { if (((_a3 = checker.getMergedSymbol(parent2.symbol).declarations) == null ? void 0 : _a3.length) !== 1) { return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; } @@ -175277,7 +178262,7 @@ interface Symbol { return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; } const declaration = definition.declarations[0]; - if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier17(declaration.name)) { + if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier21(declaration.name)) { return void 0; } if (isDeclarationExported(declaration)) { @@ -175289,16 +178274,16 @@ interface Symbol { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) }; } function isDeclarationExported(declaration) { - const variableStatement = cast(declaration.parent.parent, isVariableStatement8); + const variableStatement = cast(declaration.parent.parent, isVariableStatement10); return some(variableStatement.modifiers, isExportModifier); } function getReferenceNodes(declaration, checker, file2) { const references = []; const cannotInline = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(declaration.name, checker, file2, (ref) => { - if (ts_FindAllReferences_exports.isWriteAccessForReference(ref) && !isShorthandPropertyAssignment3(ref.parent)) { + if (ts_FindAllReferences_exports.isWriteAccessForReference(ref) && !isShorthandPropertyAssignment5(ref.parent)) { return true; } - if (isExportSpecifier(ref.parent) || isExportAssignment2(ref.parent)) { + if (isExportSpecifier(ref.parent) || isExportAssignment3(ref.parent)) { return true; } if (isTypeQueryNode(ref.parent)) { @@ -175317,13 +178302,13 @@ interface Symbol { if (isExpression(parent2) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent2) || needsParentheses(parent2))) { return factory.createParenthesizedExpression(replacement); } - if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression10(parent2))) { + if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression12(parent2))) { return factory.createParenthesizedExpression(replacement); } - if (isPropertyAccessExpression10(parent2) && (isNumericLiteral3(replacement) || isObjectLiteralExpression6(replacement))) { + if (isPropertyAccessExpression12(parent2) && (isNumericLiteral4(replacement) || isObjectLiteralExpression9(replacement))) { return factory.createParenthesizedExpression(replacement); } - if (isIdentifier17(reference) && isShorthandPropertyAssignment3(parent2)) { + if (isIdentifier21(reference) && isShorthandPropertyAssignment5(parent2)) { return factory.createPropertyAssignment(reference, replacement); } return replacement; @@ -175526,7 +178511,7 @@ interface Symbol { ); } function convertParameterToNamedTupleMember(p) { - Debug.assert(isIdentifier17(p.name)); + Debug.assert(isIdentifier21(p.name)); const result = setTextRange( factory.createNamedTupleMember( p.dotDotDotToken, @@ -175599,7 +178584,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } const signatureDecls = decls; - if (some(signatureDecls, (d) => !!d.typeParameters || some(d.parameters, (p) => !!p.modifiers || !isIdentifier17(p.name)))) { + if (some(signatureDecls, (d) => !!d.typeParameters || some(d.parameters, (p) => !!p.modifiers || !isIdentifier21(p.name)))) { return; } const signatures = mapDefined(signatureDecls, (d) => checker.getSignatureFromDeclaration(d)); @@ -175718,7 +178703,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} error: getLocaleSpecificMessage(Diagnostics.Could_not_find_a_containing_arrow_function) }; } - if (!isArrowFunction5(func)) { + if (!isArrowFunction6(func)) { return { error: getLocaleSpecificMessage(Diagnostics.Containing_function_is_not_an_arrow_function) }; @@ -175728,10 +178713,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (refactorKindBeginsWith(addBracesAction.kind, kind) && isExpression(func.body)) { return { func, addBraces: true, expression: func.body }; - } else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock4(func.body) && func.body.statements.length === 1) { + } else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock5(func.body) && func.body.statements.length === 1) { const firstStatement = first(func.body.statements); - if (isReturnStatement2(firstStatement)) { - const expression = firstStatement.expression && isObjectLiteralExpression6(getLeftmostExpression( + if (isReturnStatement3(firstStatement)) { + const expression = firstStatement.expression && isObjectLiteralExpression9(getLeftmostExpression( firstStatement.expression, /*stopAtCallExpressions*/ false @@ -175776,7 +178761,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const possibleActions = []; const errors = []; if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) { - const error210 = selectedVariableDeclaration || isArrowFunction5(func) && isVariableDeclaration4(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); + const error210 = selectedVariableDeclaration || isArrowFunction6(func) && isVariableDeclaration4(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); if (error210) { errors.push({ ...toNamedFunctionAction, notApplicableReason: error210 }); } else { @@ -175784,7 +178769,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) { - const error210 = !selectedVariableDeclaration && isArrowFunction5(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); + const error210 = !selectedVariableDeclaration && isArrowFunction6(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); if (error210) { errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error210 }); } else { @@ -175792,7 +178777,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) { - const error210 = isFunctionExpression4(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); + const error210 = isFunctionExpression5(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); if (error210) { errors.push({ ...toArrowFunctionAction, notApplicableReason: error210 }); } else { @@ -175821,7 +178806,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} edits.push(...getEditInfoForConvertToNamedFunction(context, func, variableInfo)); break; case toArrowFunctionAction.name: - if (!isFunctionExpression4(func)) return void 0; + if (!isFunctionExpression5(func)) return void 0; edits.push(...getEditInfoForConvertToArrowFunction(context, func)); break; default: @@ -175836,7 +178821,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} containsThis = true; return; } - if (!isClassLike(child) && !isFunctionDeclaration2(child) && !isFunctionExpression4(child)) { + if (!isClassLike(child) && !isFunctionDeclaration3(child) && !isFunctionExpression5(child)) { forEachChild22(child, checkThis); } }); @@ -175850,8 +178835,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { selectedVariableDeclaration: true, func }; } const maybeFunc = getContainingFunction(token); - if (maybeFunc && (isFunctionExpression4(maybeFunc) || isArrowFunction5(maybeFunc)) && !rangeContainsRange(maybeFunc.body, token) && !containingThis(maybeFunc.body) && !typeChecker.containsArgumentsReference(maybeFunc)) { - if (isFunctionExpression4(maybeFunc) && isFunctionReferencedInFile(file2, typeChecker, maybeFunc)) return void 0; + if (maybeFunc && (isFunctionExpression5(maybeFunc) || isArrowFunction6(maybeFunc)) && !rangeContainsRange(maybeFunc.body, token) && !containingThis(maybeFunc.body) && !typeChecker.containsArgumentsReference(maybeFunc)) { + if (isFunctionExpression5(maybeFunc) && isFunctionReferencedInFile(file2, typeChecker, maybeFunc)) return void 0; return { selectedVariableDeclaration: false, func: maybeFunc }; } return void 0; @@ -175865,7 +178850,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const variableDeclaration = isVariableDeclaration4(parent2) ? parent2 : first(parent2.declarations); const initializer3 = variableDeclaration.initializer; - if (initializer3 && (isArrowFunction5(initializer3) || isFunctionExpression4(initializer3) && !isFunctionReferencedInFile(sourceFile, typeChecker, initializer3))) { + if (initializer3 && (isArrowFunction6(initializer3) || isFunctionExpression5(initializer3) && !isFunctionReferencedInFile(sourceFile, typeChecker, initializer3))) { return initializer3; } return void 0; @@ -175899,7 +178884,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isVariableDeclaration4(variableDeclaration) || !isVariableDeclarationInVariableStatement(variableDeclaration)) return void 0; const variableDeclarationList = variableDeclaration.parent; const statement = variableDeclarationList.parent; - if (!isVariableDeclarationList(variableDeclarationList) || !isVariableStatement8(statement) || !isIdentifier17(variableDeclaration.name)) return void 0; + if (!isVariableDeclarationList(variableDeclarationList) || !isVariableStatement10(statement) || !isIdentifier21(variableDeclaration.name)) return void 0; return { variableDeclaration, variableDeclarationList, statement, name: variableDeclaration.name }; } function getEditInfoForConvertToAnonymousFunction(context, func) { @@ -175953,7 +178938,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file2, func, newNode)); } function canBeConvertedToExpression(body, head) { - return body.statements.length === 1 && (isReturnStatement2(head) && !!head.expression); + return body.statements.length === 1 && (isReturnStatement3(head) && !!head.expression); } function isFunctionReferencedInFile(sourceFile, typeChecker, node) { return !!node.name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile); @@ -176043,7 +179028,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getGroupedReferences(functionDeclaration, program, cancellationToken) { const functionNames = getFunctionNames(functionDeclaration); - const classNames = isConstructorDeclaration(functionDeclaration) ? getClassNames(functionDeclaration) : []; + const classNames = isConstructorDeclaration2(functionDeclaration) ? getClassNames(functionDeclaration) : []; const names = deduplicate([...functionNames, ...classNames], equateValues); const checker = program.getTypeChecker(); const references = flatMap( @@ -176065,7 +179050,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const groupedReferences2 = { functionCalls: [], declarations: [], classReferences, valid: true }; const functionSymbols = map2(functionNames, getSymbolTargetAtLocation); const classSymbols = map2(classNames, getSymbolTargetAtLocation); - const isConstructor = isConstructorDeclaration(functionDeclaration); + const isConstructor = isConstructorDeclaration2(functionDeclaration); const contextualSymbols = map2(functionNames, (name) => getSymbolForContextualType(name, checker)); for (const entry of referenceEntries) { if (entry.kind === ts_FindAllReferences_exports.EntryKind.Span) { @@ -176122,7 +179107,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} classReferences.accessExpressions.push(accessExpression); continue; } - if (isClassDeclaration3(functionDeclaration.parent)) { + if (isClassDeclaration5(functionDeclaration.parent)) { const type = entryToType(entry); if (type) { classReferences.typeUsages.push(type); @@ -176151,10 +179136,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function entryToImportOrExport(entry) { const node = entry.node; - if (isImportSpecifier(node.parent) || isImportClause(node.parent) || isImportEqualsDeclaration(node.parent) || isNamespaceImport4(node.parent)) { + if (isImportSpecifier(node.parent) || isImportClause(node.parent) || isImportEqualsDeclaration(node.parent) || isNamespaceImport5(node.parent)) { return node; } - if (isExportSpecifier(node.parent) || isExportAssignment2(node.parent)) { + if (isExportSpecifier(node.parent) || isExportAssignment3(node.parent)) { return node; } return void 0; @@ -176180,7 +179165,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; // x.foo(...) case 212: - const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression10); + const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression12); if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); if (callOrNewExpression2 && callOrNewExpression2.expression === propertyAccessExpression) { @@ -176190,7 +179175,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; // x["foo"](...) case 213: - const elementAccessExpression = tryCast(parent2, isElementAccessExpression3); + const elementAccessExpression = tryCast(parent2, isElementAccessExpression5); if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); if (callOrNewExpression2 && callOrNewExpression2.expression === elementAccessExpression) { @@ -176209,14 +179194,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (parent2.kind) { // `C.foo` case 212: - const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression10); + const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression12); if (propertyAccessExpression && propertyAccessExpression.expression === reference) { return propertyAccessExpression; } break; // `C["foo"]` case 213: - const elementAccessExpression = tryCast(parent2, isElementAccessExpression3); + const elementAccessExpression = tryCast(parent2, isElementAccessExpression5); if (elementAccessExpression && elementAccessExpression.expression === reference) { return elementAccessExpression; } @@ -176248,7 +179233,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } function isValidMethodSignature(node) { - return isMethodSignature(node) && (isInterfaceDeclaration2(node.parent) || isTypeLiteralNode(node.parent)); + return isMethodSignature(node) && (isInterfaceDeclaration2(node.parent) || isTypeLiteralNode2(node.parent)); } function isValidFunctionDeclaration(functionDeclaration, checker) { var _a3; @@ -176257,13 +179242,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 263: return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); case 175: - if (isObjectLiteralExpression6(functionDeclaration.parent)) { + if (isObjectLiteralExpression9(functionDeclaration.parent)) { const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); return ((_a3 = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a3.length) === 1 && isSingleImplementation(functionDeclaration, checker); } return isSingleImplementation(functionDeclaration, checker); case 177: - if (isClassDeclaration3(functionDeclaration.parent)) { + if (isClassDeclaration5(functionDeclaration.parent)) { return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); } else { return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); @@ -176300,10 +179285,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const type = checker.getTypeAtLocation(parameterDeclaration); if (!checker.isArrayType(type) && !checker.isTupleType(type)) return false; } - return !parameterDeclaration.modifiers && isIdentifier17(parameterDeclaration.name); + return !parameterDeclaration.modifiers && isIdentifier21(parameterDeclaration.name); } function isValidVariableDeclaration(node) { - return isVariableDeclaration4(node) && isVarConst(node) && isIdentifier17(node.name) && !node.type; + return isVariableDeclaration4(node) && isVarConst(node) && isIdentifier21(node.name) && !node.type; } function hasThisParameter(parameters) { return parameters.length > 0 && isThis(parameters[0].name); @@ -176321,7 +179306,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return parameters; } function createPropertyOrShorthandAssignment(name, initializer3) { - if (isIdentifier17(initializer3) && getTextOfIdentifierOrLiteral(initializer3) === name) { + if (isIdentifier21(initializer3) && getTextOfIdentifierOrLiteral(initializer3) === name) { return factory.createShorthandPropertyAssignment(name); } return factory.createPropertyAssignment(name, initializer3); @@ -176334,7 +179319,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const parameterName = getParameterName(parameters[i]); const property = createPropertyOrShorthandAssignment(parameterName, arg); suppressLeadingAndTrailingTrivia(property.name); - if (isPropertyAssignment6(property)) suppressLeadingAndTrailingTrivia(property.initializer); + if (isPropertyAssignment8(property)) suppressLeadingAndTrailingTrivia(property.initializer); copyComments(arg, property); return property; }); @@ -176526,12 +179511,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file: file2, startPosition } = context; const node = getNodeOrParentOfParentheses(file2, startPosition); const maybeBinary = getParentBinaryExpression(node); - const nodeIsStringLiteral = isStringLiteral10(maybeBinary); + const nodeIsStringLiteral = isStringLiteral12(maybeBinary); const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; if (nodeIsStringLiteral && context.triggerReason !== "invoked") { return emptyArray; } - if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression2(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) { + if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression4(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) { refactorInfo.actions.push(convertStringAction); return [refactorInfo]; } else if (context.preferences.provideRefactorNotApplicableReason) { @@ -176544,7 +179529,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const node = getTokenAtPosition(file2, startPosition); const nestedBinary = getParentBinaryExpression(node); const isNonStringBinary = !treeToArray(nestedBinary).isValidConcatenation; - if (isNonStringBinary && isParenthesizedExpression4(nestedBinary.parent) && isBinaryExpression2(nestedBinary.parent.parent)) { + if (isNonStringBinary && isParenthesizedExpression6(nestedBinary.parent) && isBinaryExpression4(nestedBinary.parent.parent)) { return nestedBinary.parent.parent; } return node; @@ -176586,7 +179571,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; case 229: case 227: - return !(isBinaryExpression2(n.parent) && isNotEqualsOperator(n.parent)); + return !(isBinaryExpression4(n.parent) && isNotEqualsOperator(n.parent)); default: return "quit"; } @@ -176595,11 +179580,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function treeToArray(current) { const loop = (current2) => { - if (!isBinaryExpression2(current2)) { - return { nodes: [current2], operators: [], validOperators: true, hasString: isStringLiteral10(current2) || isNoSubstitutionTemplateLiteral2(current2) }; + if (!isBinaryExpression4(current2)) { + return { nodes: [current2], operators: [], validOperators: true, hasString: isStringLiteral12(current2) || isNoSubstitutionTemplateLiteral4(current2) }; } const { nodes: nodes2, operators: operators2, hasString: leftHasString, validOperators: leftOperatorValid } = loop(current2.left); - if (!(leftHasString || isStringLiteral10(current2.right) || isTemplateExpression2(current2.right))) { + if (!(leftHasString || isStringLiteral12(current2.right) || isTemplateExpression4(current2.right))) { return { nodes: [current2], operators: [], hasString: false, validOperators: true }; } const currentOperatorValid = current2.operatorToken.kind === 40; @@ -176654,7 +179639,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} rawText += escapeRawStringForTemplate(getTextOfNode(node).slice(1, -1)); indexes.push(index); index++; - } else if (isTemplateExpression2(node)) { + } else if (isTemplateExpression4(node)) { text += node.head.text; rawText += getRawTextOfTemplate(node.head); break; @@ -176682,7 +179667,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const [newIndex, subsequentText, rawSubsequentText, stringIndexes] = concatConsecutiveString(i + 1, nodes); i = newIndex - 1; const isLast = i === nodes.length - 1; - if (isTemplateExpression2(currentNode)) { + if (isTemplateExpression4(currentNode)) { const spans = map2(currentNode.templateSpans, (span, index) => { copyExpressionComments(span); const isLastSpan = index === currentNode.templateSpans.length - 1; @@ -176722,7 +179707,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } function getExpressionFromParenthesesOrExpression(node) { - if (isParenthesizedExpression4(node)) { + if (isParenthesizedExpression6(node)) { copyExpressionComments(node); node = node.expression; } @@ -176767,10 +179752,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { edits, renameFilename: void 0, renameLocation: void 0 }; } function isValidExpression(node) { - return isBinaryExpression2(node) || isConditionalExpression2(node); + return isBinaryExpression4(node) || isConditionalExpression4(node); } function isValidStatement(node) { - return isExpressionStatement(node) || isReturnStatement2(node) || isVariableStatement8(node); + return isExpressionStatement(node) || isReturnStatement3(node) || isVariableStatement10(node); } function isValidExpressionOrStatement(node) { return isValidExpression(node) || isValidStatement(node); @@ -176787,7 +179772,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const expression = parent2 && isValidExpressionOrStatement(parent2) ? getExpression(parent2) : void 0; if (!expression) return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; const checker = program.getTypeChecker(); - return isConditionalExpression2(expression) ? getConditionalInfo(expression, checker) : getBinaryInfo(expression); + return isConditionalExpression4(expression) ? getConditionalInfo(expression, checker) : getBinaryInfo(expression); } function getConditionalInfo(expression, checker) { const condition = expression.condition; @@ -176795,9 +179780,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!finalExpression || checker.isNullableType(checker.getTypeAtLocation(finalExpression))) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; } - if ((isPropertyAccessExpression10(condition) || isIdentifier17(condition)) && getMatchingStart(condition, finalExpression.expression)) { + if ((isPropertyAccessExpression12(condition) || isIdentifier21(condition)) && getMatchingStart(condition, finalExpression.expression)) { return { finalExpression, occurrences: [condition], expression }; - } else if (isBinaryExpression2(condition)) { + } else if (isBinaryExpression4(condition)) { const occurrences = getOccurrencesInExpression(finalExpression.expression, condition); return occurrences ? { finalExpression, occurrences, expression } : { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) }; } @@ -176813,7 +179798,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getOccurrencesInExpression(matchTo, expression) { const occurrences = []; - while (isBinaryExpression2(expression) && expression.operatorToken.kind === 56) { + while (isBinaryExpression4(expression) && expression.operatorToken.kind === 56) { const match = getMatchingStart(skipParentheses(matchTo), skipParentheses(expression.right)); if (!match) { break; @@ -176829,31 +179814,31 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return occurrences.length > 0 ? occurrences : void 0; } function getMatchingStart(chain, subchain) { - if (!isIdentifier17(subchain) && !isPropertyAccessExpression10(subchain) && !isElementAccessExpression3(subchain)) { + if (!isIdentifier21(subchain) && !isPropertyAccessExpression12(subchain) && !isElementAccessExpression5(subchain)) { return void 0; } return chainStartsWith(chain, subchain) ? subchain : void 0; } function chainStartsWith(chain, subchain) { - while (isCallExpression9(chain) || isPropertyAccessExpression10(chain) || isElementAccessExpression3(chain)) { + while (isCallExpression12(chain) || isPropertyAccessExpression12(chain) || isElementAccessExpression5(chain)) { if (getTextOfChainNode(chain) === getTextOfChainNode(subchain)) break; chain = chain.expression; } - while (isPropertyAccessExpression10(chain) && isPropertyAccessExpression10(subchain) || isElementAccessExpression3(chain) && isElementAccessExpression3(subchain)) { + while (isPropertyAccessExpression12(chain) && isPropertyAccessExpression12(subchain) || isElementAccessExpression5(chain) && isElementAccessExpression5(subchain)) { if (getTextOfChainNode(chain) !== getTextOfChainNode(subchain)) return false; chain = chain.expression; subchain = subchain.expression; } - return isIdentifier17(chain) && isIdentifier17(subchain) && chain.getText() === subchain.getText(); + return isIdentifier21(chain) && isIdentifier21(subchain) && chain.getText() === subchain.getText(); } function getTextOfChainNode(node) { - if (isIdentifier17(node) || isStringOrNumericLiteralLike(node)) { + if (isIdentifier21(node) || isStringOrNumericLiteralLike(node)) { return node.getText(); } - if (isPropertyAccessExpression10(node)) { + if (isPropertyAccessExpression12(node)) { return getTextOfChainNode(node.name); } - if (isElementAccessExpression3(node)) { + if (isElementAccessExpression5(node)) { return getTextOfChainNode(node.argumentExpression); } return void 0; @@ -176880,7 +179865,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isValidExpression(node)) { return node; } - if (isVariableStatement8(node)) { + if (isVariableStatement10(node)) { const variable = getSingleVariableOfVariableStatement(node); const initializer3 = variable == null ? void 0 : variable.initializer; return initializer3 && isValidExpression(initializer3) ? initializer3 : void 0; @@ -176889,30 +179874,30 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getFinalExpressionInChain(node) { node = skipParentheses(node); - if (isBinaryExpression2(node)) { + if (isBinaryExpression4(node)) { return getFinalExpressionInChain(node.left); - } else if ((isPropertyAccessExpression10(node) || isElementAccessExpression3(node) || isCallExpression9(node)) && !isOptionalChain(node)) { + } else if ((isPropertyAccessExpression12(node) || isElementAccessExpression5(node) || isCallExpression12(node)) && !isOptionalChain(node)) { return node; } return void 0; } function convertOccurrences(checker, toConvert, occurrences) { - if (isPropertyAccessExpression10(toConvert) || isElementAccessExpression3(toConvert) || isCallExpression9(toConvert)) { + if (isPropertyAccessExpression12(toConvert) || isElementAccessExpression5(toConvert) || isCallExpression12(toConvert)) { const chain = convertOccurrences(checker, toConvert.expression, occurrences); const lastOccurrence = occurrences.length > 0 ? occurrences[occurrences.length - 1] : void 0; const isOccurrence = (lastOccurrence == null ? void 0 : lastOccurrence.getText()) === toConvert.expression.getText(); if (isOccurrence) occurrences.pop(); - if (isCallExpression9(toConvert)) { + if (isCallExpression12(toConvert)) { return isOccurrence ? factory.createCallChain(chain, factory.createToken( 29 /* QuestionDotToken */ ), toConvert.typeArguments, toConvert.arguments) : factory.createCallChain(chain, toConvert.questionDotToken, toConvert.typeArguments, toConvert.arguments); - } else if (isPropertyAccessExpression10(toConvert)) { + } else if (isPropertyAccessExpression12(toConvert)) { return isOccurrence ? factory.createPropertyAccessChain(chain, factory.createToken( 29 /* QuestionDotToken */ ), toConvert.name) : factory.createPropertyAccessChain(chain, toConvert.questionDotToken, toConvert.name); - } else if (isElementAccessExpression3(toConvert)) { + } else if (isElementAccessExpression5(toConvert)) { return isOccurrence ? factory.createElementAccessChain(chain, factory.createToken( 29 /* QuestionDotToken */ @@ -176925,10 +179910,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { finalExpression, occurrences, expression } = info; const firstOccurrence = occurrences[occurrences.length - 1]; const convertedChain = convertOccurrences(checker, finalExpression, occurrences); - if (convertedChain && (isPropertyAccessExpression10(convertedChain) || isElementAccessExpression3(convertedChain) || isCallExpression9(convertedChain))) { - if (isBinaryExpression2(expression)) { + if (convertedChain && (isPropertyAccessExpression12(convertedChain) || isElementAccessExpression5(convertedChain) || isCallExpression12(convertedChain))) { + if (isBinaryExpression4(expression)) { changes.replaceNodeRange(sourceFile, firstOccurrence, finalExpression, convertedChain); - } else if (isConditionalExpression2(expression)) { + } else if (isConditionalExpression4(expression)) { changes.replaceNode(sourceFile, expression, factory.createBinaryExpression(convertedChain, factory.createToken( 61 /* QuestionQuestionToken */ @@ -177186,7 +180171,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return { targetRange: { range: statements, facts: rangeFacts, thisNode } }; } - if (isReturnStatement2(start) && !start.expression) { + if (isReturnStatement3(start) && !start.expression) { return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; } const node = refineNode(start); @@ -177196,12 +180181,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return { targetRange: { range: getStatementOrExpressionRange(node), facts: rangeFacts, thisNode } }; function refineNode(node2) { - if (isReturnStatement2(node2)) { + if (isReturnStatement3(node2)) { if (node2.expression) { return node2.expression; } - } else if (isVariableStatement8(node2) || isVariableDeclarationList(node2)) { - const declarations = isVariableStatement8(node2) ? node2.declarationList.declarations : node2.declarations; + } else if (isVariableStatement10(node2) || isVariableDeclarationList(node2)) { + const declarations = isVariableStatement10(node2) ? node2.declarationList.declarations : node2.declarations; let numInitializers = 0; let lastInitializer; for (const declaration of declarations) { @@ -177221,7 +180206,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return node2; } function checkRootNode(node2) { - if (isIdentifier17(isExpressionStatement(node2) ? node2.expression : node2)) { + if (isIdentifier21(isExpressionStatement(node2) ? node2.expression : node2)) { return [createDiagnosticForNode(node2, Messages.cannotExtractIdentifier)]; } return void 0; @@ -177324,7 +180309,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isThis(n)) { rangeFacts |= 8; thisNode = node2; - } else if (isClassLike(n) || isFunctionLike(n) && !isArrowFunction5(n)) { + } else if (isClassLike(n) || isFunctionLike(n) && !isArrowFunction6(n)) { return false; } else { forEachChild22(n, check2); @@ -177441,7 +180426,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } function isScope(node) { - return isArrowFunction5(node) ? isFunctionBody(node.body) : isFunctionLikeDeclaration(node) || isSourceFile(node) || isModuleBlock(node) || isClassLike(node); + return isArrowFunction6(node) ? isFunctionBody(node.body) : isFunctionLikeDeclaration(node) || isSourceFile(node) || isModuleBlock(node) || isClassLike(node); } function collectEnclosingScopes(range) { let current = isReadonlyArray(range.range) ? first(range.range) : range.range; @@ -178060,7 +181045,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { renameFilename, renameLocation, edits }; function transformFunctionInitializerAndType(variableType2, initializer22) { if (variableType2 === void 0) return { variableType: variableType2, initializer: initializer22 }; - if (!isFunctionExpression4(initializer22) && !isArrowFunction5(initializer22) || !!initializer22.typeParameters) return { variableType: variableType2, initializer: initializer22 }; + if (!isFunctionExpression5(initializer22) && !isArrowFunction6(initializer22) || !!initializer22.typeParameters) return { variableType: variableType2, initializer: initializer22 }; const functionType = checker.getTypeAtLocation(node); const functionSignature = singleOrUndefined(checker.getSignaturesOfType( functionType, @@ -178088,7 +181073,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (hasAny) return { variableType: variableType2, initializer: initializer22 }; variableType2 = void 0; - if (isArrowFunction5(initializer22)) { + if (isArrowFunction6(initializer22)) { initializer22 = factory.updateArrowFunction(initializer22, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer22.typeParameters, parameters, initializer22.type || checker.typeToTypeNode( functionSignature.getReturnType(), scope, @@ -178099,7 +181084,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { if (functionSignature && !!functionSignature.thisParameter) { const firstParameter = firstOrUndefined(parameters); - if (!firstParameter || isIdentifier17(firstParameter.name) && firstParameter.name.escapedText !== "this") { + if (!firstParameter || isIdentifier21(firstParameter.name) && firstParameter.name.escapedText !== "this") { const thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node); parameters.splice( 0, @@ -178172,7 +181157,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function transformFunctionBody(body, exposedVariableDeclarations, writes, substitutions, hasReturn2) { const hasWritesOrVariableDeclarations = writes !== void 0 || exposedVariableDeclarations.length > 0; - if (isBlock4(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) { + if (isBlock5(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) { return { body: factory.createBlock( body.statements, /*multiLine*/ @@ -178181,7 +181166,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } let returnValueProperty; let ignoreReturns = false; - const statements = factory.createNodeArray(isBlock4(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]); + const statements = factory.createNodeArray(isBlock5(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]); if (hasWritesOrVariableDeclarations || substitutions.size) { const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice(); if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) { @@ -178205,7 +181190,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ), returnValueProperty: void 0 }; } function visitor(node) { - if (!ignoreReturns && isReturnStatement2(node) && hasWritesOrVariableDeclarations) { + if (!ignoreReturns && isReturnStatement3(node) && hasWritesOrVariableDeclarations) { const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); if (node.expression) { if (!returnValueProperty) { @@ -178248,7 +181233,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getStatementsOrClassElements(scope) { if (isFunctionLikeDeclaration(scope)) { const body = scope.body; - if (isBlock4(body)) { + if (isBlock5(body)) { return body.statements; } } else if (isModuleBlock(scope) || isSourceFile(scope)) { @@ -178261,7 +181246,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return emptyArray; } function getNodeToInsertFunctionBefore(minPos, scope) { - return find(getStatementsOrClassElements(scope), (child) => child.pos >= minPos && isFunctionLikeDeclaration(child) && !isConstructorDeclaration(child)); + return find(getStatementsOrClassElements(scope), (child) => child.pos >= minPos && isFunctionLikeDeclaration(child) && !isConstructorDeclaration2(child)); } function getNodeToInsertPropertyBefore(maxPos, scope) { const members = scope.members; @@ -178351,7 +181336,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isClassLike(scope) && isInJSFile(scope)) { constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToJSClass)); } - if (isArrowFunction5(scope) && !isBlock4(scope.body)) { + if (isArrowFunction6(scope) && !isBlock5(scope.body)) { constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction)); } constantErrorsPerScope.push(constantErrors); @@ -178462,16 +181447,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} 2 /* Write */ ); - } else if (isPropertyAccessExpression10(node) || isElementAccessExpression3(node)) { + } else if (isPropertyAccessExpression12(node) || isElementAccessExpression5(node)) { forEachChild22(node, collectUsages); - } else if (isIdentifier17(node)) { + } else if (isIdentifier21(node)) { if (!node.parent) { return; } if (isQualifiedName2(node.parent) && node !== node.parent.left) { return; } - if (isPropertyAccessExpression10(node.parent) && node !== node.parent.expression) { + if (isPropertyAccessExpression12(node.parent) && node !== node.parent.expression) { return; } recordUsage( @@ -178565,7 +181550,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) { return; } - const sym = isIdentifier17(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node); + const sym = isIdentifier21(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node); if (sym) { const decl = find(visibleDeclarationsInExtractedRange, (d) => d.symbol === sym); if (decl) { @@ -178583,7 +181568,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} forEachChild22(node, checkForUsedDeclarations); } function getSymbolReferencedByIdentifier(identifier) { - return identifier.parent && isShorthandPropertyAssignment3(identifier.parent) && identifier.parent.name === identifier ? checker.getShorthandAssignmentValueSymbol(identifier.parent) : checker.getSymbolAtLocation(identifier); + return identifier.parent && isShorthandPropertyAssignment5(identifier.parent) && identifier.parent.name === identifier ? checker.getShorthandAssignmentValueSymbol(identifier.parent) : checker.getSymbolAtLocation(identifier); } function tryReplaceWithQualifiedNameOrPropertyAccess(symbol2, scopeDecl, isTypeNode2) { if (!symbol2) { @@ -178601,7 +181586,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getExtractableParent(node) { - return findAncestor(node, (node2) => node2.parent && isExtractableExpression(node2) && !isBinaryExpression2(node2.parent)); + return findAncestor(node, (node2) => node2.parent && isExtractableExpression(node2) && !isBinaryExpression4(node2.parent)); } function isExtractableExpression(node) { const { parent: parent2 } = node; @@ -178625,7 +181610,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return isStringLiteralJsxAttribute(node) || (isJsxElement(node) || isJsxSelfClosingElement(node) || isJsxFragment(node)) && (isJsxElement(node.parent) || isJsxFragment(node.parent)); } function isStringLiteralJsxAttribute(node) { - return isStringLiteral10(node) && node.parent && isJsxAttribute(node.parent); + return isStringLiteral12(node) && node.parent && isJsxAttribute(node.parent); } var ts_refactor_generateGetAccessorAndSetAccessor_exports = {}; var actionName = "Generate 'get' and 'set' accessors"; @@ -178645,7 +181630,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!edits) return void 0; const renameFilename = context.file.fileName; const nameNeedRename = info.renameAccessor ? info.accessorName : info.fieldName; - const renameLocationOffset = isIdentifier17(nameNeedRename) ? 0 : -1; + const renameLocationOffset = isIdentifier21(nameNeedRename) ? 0 : -1; const renameLocation = renameLocationOffset + getRenameLocation( edits, renameFilename, @@ -178718,7 +181703,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function doChange7(sourceFile, changes, declaration, typeNode) { const closeParen = findChildOfKind(declaration, 22, sourceFile); - const needParens = isArrowFunction5(declaration) && closeParen === void 0; + const needParens = isArrowFunction6(declaration) && closeParen === void 0; const endNode2 = needParens ? first(declaration.parameters) : closeParen; if (endNode2) { if (needParens) { @@ -178737,7 +181722,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getInfo4(context) { if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind)) return; const token = getTouchingPropertyName(context.file, context.startPosition); - const declaration = findAncestor(token, (n) => isBlock4(n) || n.parent && isArrowFunction5(n.parent) && (n.kind === 39 || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n)); + const declaration = findAncestor(token, (n) => isBlock5(n) || n.parent && isArrowFunction6(n.parent) && (n.kind === 39 || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n)); if (!declaration || !declaration.body || declaration.type) { return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) }; } @@ -178877,7 +181862,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isJsxExpression(node)) { inJSXElement = false; } - if (isIdentifier17(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) { + if (isIdentifier21(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) { let symbol2 = typeChecker.getSymbolAtLocation(node); if (symbol2) { if (symbol2.flags & 2097152) { @@ -178973,7 +181958,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isVariableDeclaration4(decl)) { return (!isSourceFile(decl.parent.parent.parent) || isCatchClause(decl.parent)) && decl.getSourceFile() === sourceFile; - } else if (isFunctionDeclaration2(decl)) { + } else if (isFunctionDeclaration3(decl)) { return !isSourceFile(decl.parent) && decl.getSourceFile() === sourceFile; } return false; @@ -178989,16 +181974,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function inImportClause(node) { const parent2 = node.parent; - return parent2 && (isImportClause(parent2) || isImportSpecifier(parent2) || isNamespaceImport4(parent2)); + return parent2 && (isImportClause(parent2) || isImportSpecifier(parent2) || isNamespaceImport5(parent2)); } function isExpressionInCallExpression(node) { while (isRightSideOfQualifiedNameOrPropertyAccess2(node)) { node = node.parent; } - return isCallExpression9(node.parent) && node.parent.expression === node; + return isCallExpression12(node.parent) && node.parent.expression === node; } function isRightSideOfQualifiedNameOrPropertyAccess2(node) { - return isQualifiedName2(node.parent) && node.parent.right === node || isPropertyAccessExpression10(node.parent) && node.parent.name === node; + return isQualifiedName2(node.parent) && node.parent.right === node || isPropertyAccessExpression12(node.parent) && node.parent.name === node; } var tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ [ @@ -179686,7 +182671,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getDeclarationName(declaration) { const name = getNonAssignedNameOfDeclaration(declaration); - return name && (isComputedPropertyName(name) && isPropertyAccessExpression10(name.expression) ? name.expression.name.text : isPropertyName(name) ? getNameFromPropertyName(name) : void 0); + return name && (isComputedPropertyName(name) && isPropertyAccessExpression12(name.expression) ? name.expression.name.text : isPropertyName(name) ? getNameFromPropertyName(name) : void 0); } function visit(node) { switch (node.kind) { @@ -179755,7 +182740,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 279: const exportDeclaration = node; if (exportDeclaration.exportClause) { - if (isNamedExports(exportDeclaration.exportClause)) { + if (isNamedExports2(exportDeclaration.exportClause)) { forEach(exportDeclaration.exportClause.elements, visit); } else { visit(exportDeclaration.exportClause.name); @@ -179904,7 +182889,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} sourceFile.scriptSnapshot = scriptSnapshot; } function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version22, setNodeParents, scriptKind) { - const sourceFile = createSourceFile2(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind); + const sourceFile = createSourceFile5(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind); setSourceFileFields(sourceFile, scriptSnapshot, version22); return sourceFile; } @@ -180574,7 +183559,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } function getNodeForQuickInfo(node) { - if (isNewExpression12(node.parent) && node.pos === node.parent.pos) { + if (isNewExpression15(node.parent) && node.pos === node.parent.pos) { return node.parent.expression; } if (isNamedTupleMember(node.parent) && node.pos === node.parent.pos) { @@ -180642,7 +183627,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const sourceFile = getValidSourceFile(fileName); const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position)); if (!ts_Rename_exports.nodeIsEligibleForRename(node)) return void 0; - if (isIdentifier17(node) && (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) && isIntrinsicJsxName(node.escapedText)) { + if (isIdentifier21(node) && (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) && isIntrinsicJsxName(node.escapedText)) { const { openingElement, closingElement } = node.parent.parent; return [openingElement, closingElement].map((node2) => { const textSpan = createTextSpanFromNode(node2.tagName, sourceFile); @@ -181414,7 +184399,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function initializeNameTable(sourceFile) { const nameTable = sourceFile.nameTable = /* @__PURE__ */ new Map(); sourceFile.forEachChild(function walk(node) { - if (isIdentifier17(node) && !isTagName(node) && node.escapedText || isStringOrNumericLiteralLike(node) && literalIsName(node)) { + if (isIdentifier21(node) && !isTagName(node) && node.escapedText || isStringOrNumericLiteralLike(node) && literalIsName(node)) { const text = getEscapedTextOfIdentifierOrLiteral(node); nameTable.set(text, nameTable.get(text) === void 0 ? node.pos : -1); } else if (isPrivateIdentifier(node)) { @@ -181434,7 +184419,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getContainingObjectLiteralElement(node) { const element = getContainingObjectLiteralElementWorker(node); - return element && (isObjectLiteralExpression6(element.parent) || isJsxAttributes(element.parent)) ? element : void 0; + return element && (isObjectLiteralExpression9(element.parent) || isJsxAttributes(element.parent)) ? element : void 0; } function getContainingObjectLiteralElementWorker(node) { switch (node.kind) { @@ -181475,7 +184460,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const symbol2 = contextualType.getProperty(name); return symbol2 ? [symbol2] : emptyArray; } - const filteredTypes = isObjectLiteralExpression6(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types; + const filteredTypes = isObjectLiteralExpression9(node.parent) || isJsxAttributes(node.parent) ? filter(contextualType.types, (t) => !checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent)) : contextualType.types; const discriminatedPropertySymbols = mapDefined(filteredTypes, (t) => t.getProperty(name)); if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) { const symbol2 = contextualType.getProperty(name); @@ -182029,19 +185014,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} resolveCallHierarchyDeclaration: () => resolveCallHierarchyDeclaration }); function isNamedExpression(node) { - return (isFunctionExpression4(node) || isClassExpression(node)) && isNamedDeclaration(node); + return (isFunctionExpression5(node) || isClassExpression(node)) && isNamedDeclaration(node); } function isVariableLike2(node) { return isPropertyDeclaration(node) || isVariableDeclaration4(node); } function isAssignedExpression(node) { - return (isFunctionExpression4(node) || isArrowFunction5(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier17(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2) || isPropertyDeclaration(node.parent)); + return (isFunctionExpression5(node) || isArrowFunction6(node) || isClassExpression(node)) && isVariableLike2(node.parent) && node === node.parent.initializer && isIdentifier21(node.parent.name) && (!!(getCombinedNodeFlags(node.parent) & 2) || isPropertyDeclaration(node.parent)); } function isPossibleCallHierarchyDeclaration(node) { - return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration2(node) || isFunctionExpression4(node) || isClassDeclaration3(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node); + return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration3(node) || isFunctionExpression5(node) || isClassDeclaration5(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node); } function isValidCallHierarchyDeclaration(node) { - return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier17(node.name) || isFunctionDeclaration2(node) || isClassDeclaration3(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node); + return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier21(node.name) || isFunctionDeclaration3(node) || isClassDeclaration5(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isAssignedExpression(node); } function getCallHierarchyDeclarationReferenceNode(node) { if (isSourceFile(node)) return node; @@ -182060,7 +185045,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isSourceFile(node)) { return { text: node.fileName, pos: 0, end: 0 }; } - if ((isFunctionDeclaration2(node) || isClassDeclaration3(node)) && !isNamedDeclaration(node)) { + if ((isFunctionDeclaration3(node) || isClassDeclaration5(node)) && !isNamedDeclaration(node)) { const defaultModifier = node.modifiers && find(node.modifiers, isDefaultModifier3); if (defaultModifier) { return { text: "default", pos: defaultModifier.getStart(), end: defaultModifier.getEnd() }; @@ -182076,7 +185061,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { text: `${prefix}static {}`, pos, end }; } const declName = isAssignedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); - let text = isIdentifier17(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0; + let text = isIdentifier21(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0; if (text === void 0) { const typeChecker = program.getTypeChecker(); const symbol2 = typeChecker.getSymbolAtLocation(declName); @@ -182096,7 +185081,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isPropertyDeclaration(node.parent) && isClassLike(node.parent.parent)) { return isClassExpression(node.parent.parent) ? (_a3 = getAssignedName(node.parent.parent)) == null ? void 0 : _a3.getText() : (_b = node.parent.parent.name) == null ? void 0 : _b.getText(); } - if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier17(node.parent.parent.parent.parent.parent.name)) { + if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier21(node.parent.parent.parent.parent.parent.name)) { return node.parent.parent.parent.parent.parent.name.getText(); } return; @@ -182112,7 +185097,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 263: case 264: case 268: - if (isModuleBlock(node.parent) && isIdentifier17(node.parent.parent.name)) { + if (isModuleBlock(node.parent) && isIdentifier21(node.parent.parent.name)) { return node.parent.parent.name.getText(); } } @@ -182121,10 +185106,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node.body) { return node; } - if (isConstructorDeclaration(node)) { + if (isConstructorDeclaration2(node)) { return getFirstConstructorWithBody(node.parent); } - if (isFunctionDeclaration2(node) || isMethodDeclaration(node)) { + if (isFunctionDeclaration3(node) || isMethodDeclaration(node)) { const symbol2 = getSymbolOfCallHierarchyDeclaration(typeChecker, node); if (symbol2 && symbol2.valueDeclaration && isFunctionLikeDeclaration(symbol2.valueDeclaration) && symbol2.valueDeclaration.body) { return symbol2.valueDeclaration; @@ -182186,7 +185171,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } - if (isConstructorDeclaration(location)) { + if (isConstructorDeclaration2(location)) { if (isValidCallHierarchyDeclaration(location.parent)) { return location.parent; } @@ -182297,7 +185282,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function createCallSiteCollector(program, callSites) { function recordCallSite(node) { - const target = isTaggedTemplateExpression2(node) ? node.tag : isJsxOpeningLikeElement(node) ? node.tagName : isAccessExpression(node) ? node : isClassStaticBlockDeclaration(node) ? node : node.expression; + const target = isTaggedTemplateExpression4(node) ? node.tag : isJsxOpeningLikeElement(node) ? node.tagName : isAccessExpression(node) ? node : isClassStaticBlockDeclaration(node) ? node : node.expression; const declaration = resolveCallHierarchyDeclaration(program, target); if (declaration) { const range = createTextRangeFromNode(target, node.getSourceFile()); @@ -182420,7 +185405,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isPropertyDeclaration(member)) { collect(member.initializer); - } else if (isConstructorDeclaration(member) && member.body) { + } else if (isConstructorDeclaration2(member) && member.body) { forEach(member.parameters, collect); collect(member.body); } else if (isClassStaticBlockDeclaration(member)) { @@ -182630,7 +185615,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }) }); function makeChange(changeTracker, sourceFile, assertion) { - const replacement = isAsExpression4(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode( + const replacement = isAsExpression6(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode( 159 /* UnknownKeyword */ )) : factory.createTypeAssertion(factory.createKeywordTypeNode( @@ -182641,7 +185626,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getAssertion(sourceFile, pos) { if (isInJSFile(sourceFile)) return void 0; - return findAncestor(getTokenAtPosition(sourceFile, pos), (n) => isAsExpression4(n) || isTypeAssertionExpression(n)); + return findAncestor(getTokenAtPosition(sourceFile, pos), (n) => isAsExpression6(n) || isTypeAssertionExpression2(n)); } registerCodeFix({ errorCodes: [ @@ -182735,7 +185720,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node.getStart(sourceFile) < span.start || node.getEnd() > textSpanEnd(span)) { return "quit"; } - return (isArrowFunction5(node) || isMethodDeclaration(node) || isFunctionExpression4(node) || isFunctionDeclaration2(node)) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile)); + return (isArrowFunction6(node) || isMethodDeclaration(node) || isFunctionExpression5(node) || isFunctionDeclaration3(node)) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile)); }); return decl; } @@ -182840,7 +185825,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continue; } const declaration = tryCast(symbol2.valueDeclaration, isVariableDeclaration4); - const variableName = declaration && tryCast(declaration.name, isIdentifier17); + const variableName = declaration && tryCast(declaration.name, isIdentifier21); const variableStatement = getAncestor( declaration, 244 @@ -182873,19 +185858,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }; } function getIdentifiersFromErrorSpanExpression(expression, checker) { - if (isPropertyAccessExpression10(expression.parent) && isIdentifier17(expression.parent.expression)) { + if (isPropertyAccessExpression12(expression.parent) && isIdentifier21(expression.parent.expression)) { return { identifiers: [expression.parent.expression], isCompleteFix: true }; } - if (isIdentifier17(expression)) { + if (isIdentifier21(expression)) { return { identifiers: [expression], isCompleteFix: true }; } - if (isBinaryExpression2(expression)) { + if (isBinaryExpression4(expression)) { let sides; let isCompleteFix = true; for (const side of [expression.left, expression.right]) { const type = checker.getTypeAtLocation(side); if (checker.getPromisedTypeOfPromise(type)) { - if (!isIdentifier17(side)) { + if (!isIdentifier21(side)) { isCompleteFix = false; continue; } @@ -182896,7 +185881,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker) { - const errorNode = isPropertyAccessExpression10(reference.parent) ? reference.parent.name : isBinaryExpression2(reference.parent) ? reference.parent : reference; + const errorNode = isPropertyAccessExpression12(reference.parent) ? reference.parent.name : isBinaryExpression4(reference.parent) ? reference.parent : reference; const diagnostic = find(diagnostics, (diagnostic2) => diagnostic2.start === errorNode.getStart(sourceFile) && diagnostic2.start + diagnostic2.length === errorNode.getEnd()); return diagnostic && contains(errorCodes3, diagnostic.code) || // A Promise is usually not correct in a binary expression (it's not valid // in an arithmetic expression and an equality comparison seems unusual), @@ -182908,7 +185893,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} checker.getTypeAtLocation(errorNode).flags & 1; } function isInsideAwaitableBody(node) { - return node.flags & 65536 || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction5(ancestor.parent) && ancestor.parent.body === ancestor || isBlock4(ancestor) && (ancestor.parent.kind === 263 || ancestor.parent.kind === 219 || ancestor.parent.kind === 220 || ancestor.parent.kind === 175)); + return node.flags & 65536 || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction6(ancestor.parent) && ancestor.parent.body === ancestor || isBlock5(ancestor) && (ancestor.parent.kind === 263 || ancestor.parent.kind === 219 || ancestor.parent.kind === 220 || ancestor.parent.kind === 175)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -182923,9 +185908,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } } - if (isBinaryExpression2(insertionSite)) { + if (isBinaryExpression4(insertionSite)) { for (const side of [insertionSite.left, insertionSite.right]) { - if (fixedDeclarations && isIdentifier17(side)) { + if (fixedDeclarations && isIdentifier21(side)) { const symbol2 = checker.getSymbolAtLocation(side); if (symbol2 && fixedDeclarations.has(getSymbolId(symbol2))) { continue; @@ -182935,8 +185920,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const newNode = checker.getPromisedTypeOfPromise(type) ? factory.createAwaitExpression(side) : side; changeTracker.replaceNode(sourceFile, side, newNode); } - } else if (errorCode === propertyAccessCode && isPropertyAccessExpression10(insertionSite.parent)) { - if (fixedDeclarations && isIdentifier17(insertionSite.parent.expression)) { + } else if (errorCode === propertyAccessCode && isPropertyAccessExpression12(insertionSite.parent)) { + if (fixedDeclarations && isIdentifier21(insertionSite.parent.expression)) { const symbol2 = checker.getSymbolAtLocation(insertionSite.parent.expression); if (symbol2 && fixedDeclarations.has(getSymbolId(symbol2))) { return; @@ -182949,7 +185934,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); insertLeadingSemicolonIfNeeded(changeTracker, insertionSite.parent.expression, sourceFile); } else if (contains(callableConstructableErrorCodes, errorCode) && isCallOrNewExpression(insertionSite.parent)) { - if (fixedDeclarations && isIdentifier17(insertionSite)) { + if (fixedDeclarations && isIdentifier21(insertionSite)) { const symbol2 = checker.getSymbolAtLocation(insertionSite); if (symbol2 && fixedDeclarations.has(getSymbolId(symbol2))) { return; @@ -182958,7 +185943,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changeTracker.replaceNode(sourceFile, insertionSite, factory.createParenthesizedExpression(factory.createAwaitExpression(insertionSite))); insertLeadingSemicolonIfNeeded(changeTracker, insertionSite, sourceFile); } else { - if (fixedDeclarations && isVariableDeclaration4(insertionSite.parent) && isIdentifier17(insertionSite.parent.name)) { + if (fixedDeclarations && isVariableDeclaration4(insertionSite.parent) && isIdentifier21(insertionSite.parent.name)) { const symbol2 = checker.getSymbolAtLocation(insertionSite.parent.name); if (symbol2 && !tryAddToSet(fixedDeclarations, getSymbolId(symbol2))) { return; @@ -182997,10 +185982,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const forInitializer = findAncestor(token, (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : "quit"); if (forInitializer) return applyChange(changeTracker, forInitializer, sourceFile, fixedNodes); const parent2 = token.parent; - if (isBinaryExpression2(parent2) && parent2.operatorToken.kind === 64 && isExpressionStatement(parent2.parent)) { + if (isBinaryExpression4(parent2) && parent2.operatorToken.kind === 64 && isExpressionStatement(parent2.parent)) { return applyChange(changeTracker, token, sourceFile, fixedNodes); } - if (isArrayLiteralExpression5(parent2)) { + if (isArrayLiteralExpression7(parent2)) { const checker = program.getTypeChecker(); if (!every(parent2.elements, (element) => arrayElementCouldBeVariableDeclaration(element, checker))) { return; @@ -183034,11 +186019,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function arrayElementCouldBeVariableDeclaration(expression, checker) { - const identifier = isIdentifier17(expression) ? expression : isAssignmentExpression( + const identifier = isIdentifier21(expression) ? expression : isAssignmentExpression( expression, /*excludeCompoundAssignment*/ true - ) && isIdentifier17(expression.left) ? expression.left : void 0; + ) && isIdentifier21(expression.left) ? expression.left : void 0; return !!identifier && !checker.getSymbolAtLocation(identifier); } function isPossiblyPartOfCommaSeperatedInitializer(node) { @@ -183052,13 +186037,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function expressionCouldBeVariableDeclaration(expression, checker) { - if (!isBinaryExpression2(expression)) { + if (!isBinaryExpression4(expression)) { return false; } if (expression.operatorToken.kind === 28) { return every([expression.left, expression.right], (expression2) => expressionCouldBeVariableDeclaration(expression2, checker)); } - return expression.operatorToken.kind === 64 && isIdentifier17(expression.left) && !checker.getSymbolAtLocation(expression.left); + return expression.operatorToken.kind === 64 && isIdentifier21(expression.left) && !checker.getSymbolAtLocation(expression.left); } var fixId5 = "addMissingDeclareProperty"; var errorCodes5 = [ @@ -183080,7 +186065,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { const token = getTokenAtPosition(sourceFile, pos); - if (!isIdentifier17(token)) { + if (!isIdentifier21(token)) { return; } const declaration = token.parent; @@ -183129,7 +186114,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function makeChange7(changeTracker, sourceFile, pos, program, host, preferences) { var _a3, _b, _c; const token = getTokenAtPosition(sourceFile, pos); - const importNode = findAncestor(token, or(isImportDeclaration5, isImportTypeNode)); + const importNode = findAncestor(token, or(isImportDeclaration6, isImportTypeNode)); Debug.assert(!!importNode, "Expected position to be owned by an ImportDeclaration or ImportType."); const useSingleQuotes = getQuotePreference(sourceFile, preferences) === 0; const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importNode); @@ -183273,32 +186258,32 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return checker.getExactOptionalProperties(target); } function shouldUseParentTypeOfProperty(sourceNode, targetNode, checker) { - return isPropertyAccessExpression10(targetNode) && !!checker.getExactOptionalProperties(checker.getTypeAtLocation(targetNode.expression)).length && checker.getTypeAtLocation(sourceNode) === checker.getUndefinedType(); + return isPropertyAccessExpression12(targetNode) && !!checker.getExactOptionalProperties(checker.getTypeAtLocation(targetNode.expression)).length && checker.getTypeAtLocation(sourceNode) === checker.getUndefinedType(); } function getSourceTarget(errorNode, checker) { var _a3; if (!errorNode) { return void 0; - } else if (isBinaryExpression2(errorNode.parent) && errorNode.parent.operatorToken.kind === 64) { + } else if (isBinaryExpression4(errorNode.parent) && errorNode.parent.operatorToken.kind === 64) { return { source: errorNode.parent.right, target: errorNode.parent.left }; } else if (isVariableDeclaration4(errorNode.parent) && errorNode.parent.initializer) { return { source: errorNode.parent.initializer, target: errorNode.parent.name }; - } else if (isCallExpression9(errorNode.parent)) { + } else if (isCallExpression12(errorNode.parent)) { const n = checker.getSymbolAtLocation(errorNode.parent.expression); if (!(n == null ? void 0 : n.valueDeclaration) || !isFunctionLikeKind(n.valueDeclaration.kind)) return void 0; if (!isExpression(errorNode)) return void 0; const i = errorNode.parent.arguments.indexOf(errorNode); if (i === -1) return void 0; const name = n.valueDeclaration.parameters[i].name; - if (isIdentifier17(name)) return { source: errorNode, target: name }; - } else if (isPropertyAssignment6(errorNode.parent) && isIdentifier17(errorNode.parent.name) || isShorthandPropertyAssignment3(errorNode.parent)) { + if (isIdentifier21(name)) return { source: errorNode, target: name }; + } else if (isPropertyAssignment8(errorNode.parent) && isIdentifier21(errorNode.parent.name) || isShorthandPropertyAssignment5(errorNode.parent)) { const parentTarget = getSourceTarget(errorNode.parent.parent, checker); if (!parentTarget) return void 0; const prop = checker.getPropertyOfType(checker.getTypeAtLocation(parentTarget.target), errorNode.parent.name.text); const declaration = (_a3 = prop == null ? void 0 : prop.declarations) == null ? void 0 : _a3[0]; if (!declaration) return void 0; return { - source: isPropertyAssignment6(errorNode.parent) ? errorNode.parent.initializer : errorNode.parent.name, + source: isPropertyAssignment8(errorNode.parent) ? errorNode.parent.initializer : errorNode.parent.name, target: declaration }; } @@ -183307,7 +186292,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function addUndefinedToOptionalProperty(changes, toAdd) { for (const add of toAdd) { const d = add.valueDeclaration; - if (d && (isPropertySignature2(d) || isPropertyDeclaration(d)) && d.type) { + if (d && (isPropertySignature3(d) || isPropertyDeclaration(d)) && d.type) { const t = factory.createUnionTypeNode([ ...d.type.kind === 193 ? d.type.types : [d.type], factory.createTypeReferenceNode("undefined") @@ -183348,7 +186333,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeParameters = getJSDocTypeParameterDeclarations(decl); if (typeParameters.length) changes.insertTypeParameters(sourceFile, decl, typeParameters); } - const needParens = isArrowFunction5(decl) && !findChildOfKind(decl, 21, sourceFile); + const needParens = isArrowFunction6(decl) && !findChildOfKind(decl, 21, sourceFile); if (needParens) changes.insertNodeBefore(sourceFile, first(decl.parameters), factory.createToken( 21 /* OpenParenToken */ @@ -183414,7 +186399,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeNode = factory.createTypeLiteralNode(map2(node.jsDocPropertyTags, (tag) => factory.createPropertySignature( /*modifiers*/ void 0, - isIdentifier17(tag.name) ? tag.name : tag.name.right, + isIdentifier21(tag.name) ? tag.name : tag.name.right, isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken( 58 /* QuestionToken */ @@ -183459,7 +186444,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function transformJSDocTypeReference(node) { let name = node.typeName; let args = node.typeArguments; - if (isIdentifier17(node.typeName)) { + if (isIdentifier21(node.typeName)) { if (isJSDocIndexSignature(node)) { return transformJSDocIndexSignature(node); } @@ -183529,7 +186514,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } const ctorDeclaration = ctorSymbol.valueDeclaration; - if (isFunctionDeclaration2(ctorDeclaration) || isFunctionExpression4(ctorDeclaration)) { + if (isFunctionDeclaration3(ctorDeclaration) || isFunctionExpression5(ctorDeclaration)) { changes.replaceNode(sourceFile, ctorDeclaration, createClassFromFunction(ctorDeclaration)); } else if (isVariableDeclaration4(ctorDeclaration)) { const classDeclaration = createClassFromVariableDeclaration(ctorDeclaration); @@ -183550,7 +186535,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbol2.exports.forEach((member) => { if (member.name === "prototype" && member.declarations) { const firstDeclaration = member.declarations[0]; - if (member.declarations.length === 1 && isPropertyAccessExpression10(firstDeclaration) && isBinaryExpression2(firstDeclaration.parent) && firstDeclaration.parent.operatorToken.kind === 64 && isObjectLiteralExpression6(firstDeclaration.parent.right)) { + if (member.declarations.length === 1 && isPropertyAccessExpression12(firstDeclaration) && isBinaryExpression4(firstDeclaration.parent) && firstDeclaration.parent.operatorToken.kind === 64 && isObjectLiteralExpression9(firstDeclaration.parent.right)) { const prototypes = firstDeclaration.parent.right; createClassElement( prototypes.symbol, @@ -183572,7 +186557,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} var _a3, _b, _c, _d; if (key === "constructor" && member.valueDeclaration) { const prototypeAssignment = (_d = (_c = (_b = (_a3 = symbol2.exports) == null ? void 0 : _a3.get("prototype")) == null ? void 0 : _b.declarations) == null ? void 0 : _c[0]) == null ? void 0 : _d.parent; - if (prototypeAssignment && isBinaryExpression2(prototypeAssignment) && isObjectLiteralExpression6(prototypeAssignment.right) && some(prototypeAssignment.right.properties, isConstructorAssignment)) { + if (prototypeAssignment && isBinaryExpression4(prototypeAssignment) && isObjectLiteralExpression9(prototypeAssignment.right) && some(prototypeAssignment.right.properties, isConstructorAssignment)) { } else { changes.delete(sourceFile, member.valueDeclaration.parent); } @@ -183589,12 +186574,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return memberElements; function shouldConvertDeclaration(_target, source) { if (isAccessExpression(_target)) { - if (isPropertyAccessExpression10(_target) && isConstructorAssignment(_target)) return true; + if (isPropertyAccessExpression12(_target) && isConstructorAssignment(_target)) return true; return isFunctionLike(source); } else { return every(_target.properties, (property) => { if (isMethodDeclaration(property) || isGetOrSetAccessorDeclaration(property)) return true; - if (isPropertyAssignment6(property) && isFunctionExpression4(property.initializer) && !!property.name) return true; + if (isPropertyAssignment8(property) && isFunctionExpression5(property.initializer) && !!property.name) return true; if (isConstructorAssignment(property)) return true; return false; }); @@ -183612,7 +186597,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (some(members, (m) => { const name = getNameOfDeclaration(m); - if (name && isIdentifier17(name) && idText(name) === symbolName(symbol22)) { + if (name && isIdentifier21(name) && idText(name) === symbolName(symbol22)) { return true; } return false; @@ -183634,21 +186619,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )); return; } - if (isAccessExpression(memberDeclaration) && (isFunctionExpression4(assignmentExpr) || isArrowFunction5(assignmentExpr))) { + if (isAccessExpression(memberDeclaration) && (isFunctionExpression5(assignmentExpr) || isArrowFunction6(assignmentExpr))) { const quotePreference = getQuotePreference(sourceFile, preferences); const name = tryGetPropertyName(memberDeclaration, compilerOptions, quotePreference); if (name) { createFunctionLikeExpressionMember(members, assignmentExpr, name); } return; - } else if (isObjectLiteralExpression6(assignmentExpr)) { + } else if (isObjectLiteralExpression9(assignmentExpr)) { forEach( assignmentExpr.properties, (property) => { if (isMethodDeclaration(property) || isGetOrSetAccessorDeclaration(property)) { members.push(property); } - if (isPropertyAssignment6(property) && isFunctionExpression4(property.initializer)) { + if (isPropertyAssignment8(property) && isFunctionExpression5(property.initializer)) { createFunctionLikeExpressionMember(members, property.initializer, property.name); } if (isConstructorAssignment(property)) return; @@ -183658,7 +186643,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } else { if (isSourceFileJS(sourceFile)) return; - if (!isPropertyAccessExpression10(memberDeclaration)) return; + if (!isPropertyAccessExpression12(memberDeclaration)) return; const prop = factory.createPropertyDeclaration( modifiers, memberDeclaration.name, @@ -183673,7 +186658,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } function createFunctionLikeExpressionMember(members2, expression, name) { - if (isFunctionExpression4(expression)) return createFunctionExpressionMember(members2, expression, name); + if (isFunctionExpression5(expression)) return createFunctionExpressionMember(members2, expression, name); else return createArrowFunctionExpressionMember(members2, expression, name); } function createFunctionExpressionMember(members2, functionExpression, name) { @@ -183734,7 +186719,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function createClassFromVariableDeclaration(node) { const initializer3 = node.initializer; - if (!initializer3 || !isFunctionExpression4(initializer3) || !isIdentifier17(node.name)) { + if (!initializer3 || !isFunctionExpression5(initializer3) || !isIdentifier21(node.name)) { return void 0; } const memberElements = createClassElementsFromSymbol(node.symbol); @@ -183794,23 +186779,23 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function isConstructorAssignment(x) { if (!x.name) return false; - if (isIdentifier17(x.name) && x.name.text === "constructor") return true; + if (isIdentifier21(x.name) && x.name.text === "constructor") return true; return false; } function tryGetPropertyName(node, compilerOptions, quotePreference) { - if (isPropertyAccessExpression10(node)) { + if (isPropertyAccessExpression12(node)) { return node.name; } - const propName = node.argumentExpression; - if (isNumericLiteral3(propName)) { - return propName; + const propName2 = node.argumentExpression; + if (isNumericLiteral4(propName2)) { + return propName2; } - if (isStringLiteralLike(propName)) { - return isIdentifierText(propName.text, getEmitScriptTarget(compilerOptions)) ? factory.createIdentifier(propName.text) : isNoSubstitutionTemplateLiteral2(propName) ? factory.createStringLiteral( - propName.text, + if (isStringLiteralLike(propName2)) { + return isIdentifierText(propName2.text, getEmitScriptTarget(compilerOptions)) ? factory.createIdentifier(propName2.text) : isNoSubstitutionTemplateLiteral4(propName2) ? factory.createStringLiteral( + propName2.text, quotePreference === 0 /* Single */ - ) : propName; + ) : propName2; } return void 0; } @@ -183830,7 +186815,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function convertToAsyncFunction(changes, sourceFile, position, checker) { const tokenAtPosition = getTokenAtPosition(sourceFile, position); let functionToConvert; - if (isIdentifier17(tokenAtPosition) && isVariableDeclaration4(tokenAtPosition.parent) && tokenAtPosition.parent.initializer && isFunctionLikeDeclaration(tokenAtPosition.parent.initializer)) { + if (isIdentifier21(tokenAtPosition) && isVariableDeclaration4(tokenAtPosition.parent) && tokenAtPosition.parent.initializer && isFunctionLikeDeclaration(tokenAtPosition.parent.initializer)) { functionToConvert = tokenAtPosition.parent.initializer; } else { functionToConvert = tryCast(getContainingFunction(getTokenAtPosition(sourceFile, position)), canBeConvertedToAsync); @@ -183845,7 +186830,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!returnsPromise(functionToConvertRenamed, checker)) { return; } - const returnStatements = functionToConvertRenamed.body && isBlock4(functionToConvertRenamed.body) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body, checker) : emptyArray; + const returnStatements = functionToConvertRenamed.body && isBlock5(functionToConvertRenamed.body) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body, checker) : emptyArray; const transformer = { checker, synthNamesMap, setOfExpressionsToReturn, isInJSFile: isInJavascript }; if (!returnStatements.length) { return; @@ -183854,7 +186839,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changes.insertModifierAt(sourceFile, pos, 134, { suffix: " " }); for (const returnStatement of returnStatements) { forEachChild22(returnStatement, function visit(node) { - if (isCallExpression9(node)) { + if (isCallExpression12(node)) { const newNodes = transformExpression( node, node, @@ -183906,7 +186891,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return setOfExpressionsToReturn; } function isPromiseReturningCallExpression(node, checker, name) { - if (!isCallExpression9(node)) return false; + if (!isCallExpression12(node)) return false; const isExpressionOfName = hasPropertyAccessExpressionWithName(node, name); const nodeType = isExpressionOfName && checker.getTypeAtLocation(node); return !!(nodeType && checker.getPromisedTypeOfPromise(nodeType)); @@ -183939,7 +186924,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const identsToRenameMap = /* @__PURE__ */ new Map(); const collidingSymbolMap = createMultiMap(); forEachChild22(nodeToRename, function visit(node) { - if (!isIdentifier17(node)) { + if (!isIdentifier21(node)) { forEachChild22(node, visit); return; } @@ -183950,7 +186935,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const symbolIdString = getSymbolId(symbol2).toString(); if (lastCallSignature && !isParameter(node.parent) && !isFunctionLikeDeclaration(node.parent) && !synthNamesMap.has(symbolIdString)) { const firstParameter = firstOrUndefined(lastCallSignature.parameters); - const ident = (firstParameter == null ? void 0 : firstParameter.valueDeclaration) && isParameter(firstParameter.valueDeclaration) && tryCast(firstParameter.valueDeclaration.name, isIdentifier17) || factory.createUniqueName( + const ident = (firstParameter == null ? void 0 : firstParameter.valueDeclaration) && isParameter(firstParameter.valueDeclaration) && tryCast(firstParameter.valueDeclaration.name, isIdentifier21) || factory.createUniqueName( "result", 16 /* Optimistic */ @@ -183979,7 +186964,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*includeTrivia*/ true, (original) => { - if (isBindingElement(original) && isIdentifier17(original.name) && isObjectBindingPattern(original.parent)) { + if (isBindingElement(original) && isIdentifier21(original.name) && isObjectBindingPattern2(original.parent)) { const symbol2 = checker.getSymbolAtLocation(original.name); const renameInfo = symbol2 && identsToRenameMap.get(String(getSymbolId(symbol2))); if (renameInfo && renameInfo.text !== (original.name || original.propertyName).getText()) { @@ -183990,7 +186975,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} original.initializer ); } - } else if (isIdentifier17(original)) { + } else if (isIdentifier21(original)) { const symbol2 = checker.getSymbolAtLocation(original); const renameInfo = symbol2 && identsToRenameMap.get(String(getSymbolId(symbol2))); if (renameInfo) { @@ -184022,19 +187007,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isPromiseReturningCallExpression(node, transformer.checker, "finally")) { return transformFinally(node, elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName); } - if (isPropertyAccessExpression10(node)) { + if (isPropertyAccessExpression12(node)) { return transformExpression(returnContextNode, node.expression, transformer, hasContinuation, continuationArgName); } const nodeType = transformer.checker.getTypeAtLocation(node); if (nodeType && transformer.checker.getPromisedTypeOfPromise(nodeType)) { - Debug.assertNode(getOriginalNode(node).parent, isPropertyAccessExpression10); + Debug.assertNode(getOriginalNode(node).parent, isPropertyAccessExpression12); return transformPromiseExpressionOfPropertyAccess(returnContextNode, node, transformer, hasContinuation, continuationArgName); } return silentFail(); } function isNullOrUndefined2({ checker }, node) { if (node.kind === 106) return true; - if (isIdentifier17(node) && !isGeneratedIdentifier(node) && idText(node) === "undefined") { + if (isIdentifier21(node) && !isGeneratedIdentifier(node) && idText(node) === "undefined") { const symbol2 = checker.getSymbolAtLocation(node); return !symbol2 || checker.isUndefinedSymbol(symbol2); } @@ -184321,11 +187306,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 220: { const funcBody = func.body; const returnType2 = (_a3 = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a3.getReturnType(); - if (isBlock4(funcBody)) { + if (isBlock5(funcBody)) { let refactoredStmts = []; let seenReturnStatement = false; for (const statement of funcBody.statements) { - if (isReturnStatement2(statement)) { + if (isReturnStatement3(statement)) { seenReturnStatement = true; if (isReturnStatementWithFixablePromiseHandler(statement, transformer.checker)) { refactoredStmts = refactoredStmts.concat(transformReturnStatementWithFixablePromiseHandler(transformer, statement, hasContinuation, continuationArgName)); @@ -184391,7 +187376,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function removeReturns(stmts, prevArgName, transformer, seenReturnStatement) { const ret = []; for (const stmt of stmts) { - if (isReturnStatement2(stmt)) { + if (isReturnStatement3(stmt)) { if (stmt.expression) { const possiblyAwaitedExpression = isPromiseTypedExpression(stmt.expression, transformer.checker) ? factory.createAwaitExpression(stmt.expression) : stmt.expression; if (prevArgName === void 0) { @@ -184444,7 +187429,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function transformReturnStatementWithFixablePromiseHandler(transformer, innerRetStmt, hasContinuation, continuationArgName) { let innerCbBody = []; forEachChild22(innerRetStmt, function visit(node) { - if (isCallExpression9(node)) { + if (isCallExpression12(node)) { const temp = transformExpression(node, node, transformer, hasContinuation, continuationArgName); innerCbBody = innerCbBody.concat(temp); if (innerCbBody.length > 0) { @@ -184464,9 +187449,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const param = funcNode.parameters[0].name; name = getMappedBindingNameOrDefault(param); } - } else if (isIdentifier17(funcNode)) { + } else if (isIdentifier21(funcNode)) { name = getMapEntryOrDefault(funcNode); - } else if (isPropertyAccessExpression10(funcNode) && isIdentifier17(funcNode.name)) { + } else if (isPropertyAccessExpression12(funcNode) && isIdentifier21(funcNode.name)) { name = getMapEntryOrDefault(funcNode.name); } if (!name || "identifier" in name && name.identifier.text === "undefined") { @@ -184474,7 +187459,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return name; function getMappedBindingNameOrDefault(bindingName) { - if (isIdentifier17(bindingName)) return getMapEntryOrDefault(bindingName); + if (isIdentifier21(bindingName)) return getMapEntryOrDefault(bindingName); const elements = flatMap(bindingName.elements, (element) => { if (isOmittedExpression(element)) return []; return [getMappedBindingNameOrDefault(element.name)]; @@ -184590,13 +187575,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} convertExportsAccesses(sourceFile, exports2, changes); let moduleExportsChangedToDefault = false; let useSitesToUnqualify; - for (const statement of filter(sourceFile.statements, isVariableStatement8)) { + for (const statement of filter(sourceFile.statements, isVariableStatement10)) { const newUseSites = convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); if (newUseSites) { copyEntries(newUseSites, useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map())); } } - for (const statement of filter(sourceFile.statements, (s) => !isVariableStatement8(s))) { + for (const statement of filter(sourceFile.statements, (s) => !isVariableStatement10(s))) { const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports2, useSitesToUnqualify, quotePreference); moduleExportsChangedToDefault = moduleExportsChangedToDefault || moduleExportsChanged; } @@ -184632,11 +187617,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function forEachExportReference(sourceFile, cb) { sourceFile.forEachChild(function recur(node) { - if (isPropertyAccessExpression10(node) && isExportsOrModuleExportsOrAlias(sourceFile, node.expression) && isIdentifier17(node.name)) { + if (isPropertyAccessExpression12(node) && isExportsOrModuleExportsOrAlias(sourceFile, node.expression) && isIdentifier21(node.name)) { const { parent: parent2 } = node; cb( node, - isBinaryExpression2(parent2) && parent2.left === node && parent2.operatorToken.kind === 64 + isBinaryExpression4(parent2) && parent2.left === node && parent2.operatorToken.kind === 64 /* EqualsToken */ ); } @@ -184695,7 +187680,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )) { foundImport = true; return convertSingleImport(name, initializer3.arguments[0], checker, identifiers, target, quotePreference); - } else if (isPropertyAccessExpression10(initializer3) && isRequireCall( + } else if (isPropertyAccessExpression12(initializer3) && isRequireCall( initializer3.expression, /*requireStringLiteralLikeArgument*/ true @@ -184744,14 +187729,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertAssignment(sourceFile, checker, assignment, changes, exports2, useSitesToUnqualify) { const { left, right } = assignment; - if (!isPropertyAccessExpression10(left)) { + if (!isPropertyAccessExpression12(left)) { return false; } if (isExportsOrModuleExportsOrAlias(sourceFile, left)) { if (isExportsOrModuleExportsOrAlias(sourceFile, right)) { changes.delete(sourceFile, assignment.parent); } else { - const replacement = isObjectLiteralExpression6(right) ? tryChangeModuleExportsObject(right, useSitesToUnqualify) : isRequireCall( + const replacement = isObjectLiteralExpression9(right) ? tryChangeModuleExportsObject(right, useSitesToUnqualify) : isRequireCall( right, /*requireStringLiteralLikeArgument*/ true @@ -184780,9 +187765,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 306: return void 0; case 304: - return !isIdentifier17(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); + return !isIdentifier21(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); case 175: - return !isIdentifier17(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken( + return !isIdentifier21(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken( 95 /* ExportKeyword */ )], prop, useSitesToUnqualify); @@ -184848,7 +187833,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sourceFile, changes) { const name = left.name.text; - if ((isFunctionExpression4(right) || isArrowFunction5(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) { + if ((isFunctionExpression5(right) || isArrowFunction6(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) { changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken( 95 /* ExportKeyword */ @@ -184916,7 +187901,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { switch (name.kind) { case 207: { - const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier17(e.propertyName) || !isIdentifier17(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); + const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier21(e.propertyName) || !isIdentifier21(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); if (importSpecifiers) { return convertedImports([makeImport( /*defaultImport*/ @@ -184962,7 +187947,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continue; } const { parent: parent2 } = use; - if (isPropertyAccessExpression10(parent2)) { + if (isPropertyAccessExpression12(parent2)) { const { name: { text: propertyName } } = parent2; if (propertyName === "default") { needDefaultImport = true; @@ -185008,7 +187993,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return map22; } function forEachFreeIdentifier(node, cb) { - if (isIdentifier17(node) && isFreeIdentifier(node)) cb(node); + if (isIdentifier21(node) && isFreeIdentifier(node)) cb(node); node.forEachChild((child) => forEachFreeIdentifier(child, cb)); } function isFreeIdentifier(node) { @@ -185113,16 +188098,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }, fixIds: [fixId12], getAllCodeActions: (context) => codeFixAll(context, errorCodes13, (changes, diag2) => { - const q = getQualifiedName(diag2.file, diag2.start); - if (q) { - doChange10(changes, diag2.file, q); + const q2 = getQualifiedName(diag2.file, diag2.start); + if (q2) { + doChange10(changes, diag2.file, q2); } }) }); function getQualifiedName(sourceFile, pos) { const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos), isQualifiedName2); Debug.assert(!!qualifiedName, "Expected position to be owned by a qualified name."); - return isIdentifier17(qualifiedName.left) ? qualifiedName : void 0; + return isIdentifier21(qualifiedName.left) ? qualifiedName : void 0; } function doChange10(changeTracker, sourceFile, qualifiedName) { const rightText = qualifiedName.right.text; @@ -185223,7 +188208,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const declaration = getDeclaration2(context.sourceFile, context.span.start); if (declaration) { const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration)); - const importDeclarationChanges = declaration.kind === 277 && isImportDeclaration5(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; + const importDeclarationChanges = declaration.kind === 277 && isImportDeclaration6(declaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; const mainAction = createCodeFixAction( fixId14, changes, @@ -185249,7 +188234,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 273 && !fixedImportDeclarations.has(errorDeclaration)) { doChange11(changes, diag2.file, errorDeclaration); fixedImportDeclarations.add(errorDeclaration); - } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 277 && isImportDeclaration5(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { + } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 277 && isImportDeclaration6(errorDeclaration.parent.parent.parent) && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent); fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 277) { @@ -185260,7 +188245,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getDeclaration2(sourceFile, pos) { const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); - return isImportSpecifier(parent2) || isImportDeclaration5(parent2) && parent2.importClause ? parent2 : void 0; + return isImportSpecifier(parent2) || isImportDeclaration6(parent2) && parent2.importClause ? parent2 : void 0; } function canConvertImportDeclarationForSpecifier(specifier, sourceFile, program) { if (specifier.parent.parent.name) { @@ -185562,11 +188547,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getInfo5(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - if (isIdentifier17(token)) { - const propertySignature = cast(token.parent.parent, isPropertySignature2); + if (isIdentifier21(token)) { + const propertySignature = cast(token.parent.parent, isPropertySignature3); const propertyName = token.getText(sourceFile); return { - container: cast(propertySignature.parent, isTypeLiteralNode), + container: cast(propertySignature.parent, isTypeLiteralNode2), typeNode: propertySignature.type, constraint: propertyName, name: propertyName === "K" ? "P" : "K" @@ -185638,7 +188623,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const implementedTypeSymbols = checker.getPropertiesOfType(implementedType); const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and(symbolPointsToNonPrivateMember, (symbol2) => !maybeHeritageClauseSymbol.has(symbol2.escapedName))); const classType = checker.getTypeAtLocation(classDeclaration); - const constructor = find(classDeclaration.members, (m) => isConstructorDeclaration(m)); + const constructor = find(classDeclaration.members, (m) => isConstructorDeclaration2(m)); if (!classType.getNumberIndexType()) { createMissingIndexSignatureDeclaration( implementedType, @@ -185819,7 +188804,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} preferences ); if (fix) { - const localName = ((_b = tryCast(referenceImport == null ? void 0 : referenceImport.name, isIdentifier17)) == null ? void 0 : _b.text) ?? symbolName2; + const localName = ((_b = tryCast(referenceImport == null ? void 0 : referenceImport.name, isIdentifier21)) == null ? void 0 : _b.text) ?? symbolName2; let addAsTypeOnly; let propertyName; if (referenceImport && isTypeOnlyImportDeclaration(referenceImport) && (fix.kind === 3 || fix.kind === 2) && fix.addAsTypeOnly === 1) { @@ -185866,7 +188851,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} compilerOptions ); addAsTypeOnly = addAsTypeOnly === 1 && isTypeOnlyImportDeclaration(referenceImport) ? 2 : 1; - const importKind = isImportDeclaration5(referenceImport) ? isDefaultImport(referenceImport) ? 1 : 2 : isImportSpecifier(referenceImport) ? 0 : isImportClause(referenceImport) && !!referenceImport.name ? 1 : 2; + const importKind = isImportDeclaration6(referenceImport) ? isDefaultImport(referenceImport) ? 1 : 2 : isImportSpecifier(referenceImport) ? 0 : isImportClause(referenceImport) && !!referenceImport.name ? 1 : 2; const exportInfo = [{ symbol: symbolAlias, moduleSymbol, @@ -186085,7 +189070,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let importSpecifiersToRemoveWhileAdding; if (removeExisting.size) { Debug.assert(isFullSourceFile(sourceFile), "Cannot remove imports from a future source file"); - const importDeclarationsWithRemovals = new Set(mapDefined([...removeExisting], (d) => findAncestor(d, isImportDeclaration5))); + const importDeclarationsWithRemovals = new Set(mapDefined([...removeExisting], (d) => findAncestor(d, isImportDeclaration6))); const variableDeclarationsWithRemovals = new Set(mapDefined([...removeExisting], (d) => findAncestor(d, isVariableDeclarationInitializedToRequire))); const emptyImportDeclarations = [...importDeclarationsWithRemovals].filter( (d) => { @@ -186094,8 +189079,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // nothing added to the import declaration !addToExisting.has(d.importClause) && // no default, or default is being removed (!((_a22 = d.importClause) == null ? void 0 : _a22.name) || removeExisting.has(d.importClause)) && // no namespace import, or namespace import is being removed - (!tryCast((_b2 = d.importClause) == null ? void 0 : _b2.namedBindings, isNamespaceImport4) || removeExisting.has(d.importClause.namedBindings)) && // no named imports, or all named imports are being removed - (!tryCast((_c = d.importClause) == null ? void 0 : _c.namedBindings, isNamedImports3) || every(d.importClause.namedBindings.elements, (e) => removeExisting.has(e))) + (!tryCast((_b2 = d.importClause) == null ? void 0 : _b2.namedBindings, isNamespaceImport5) || removeExisting.has(d.importClause.namedBindings)) && // no named imports, or all named imports are being removed + (!tryCast((_c = d.importClause) == null ? void 0 : _c.namedBindings, isNamedImports4) || every(d.importClause.namedBindings.elements, (e) => removeExisting.has(e))) ); } ); @@ -186135,7 +189120,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } for (const declaration of removeExisting) { - const importDeclaration = findAncestor(declaration, isImportDeclaration5); + const importDeclaration = findAncestor(declaration, isImportDeclaration6); if (importDeclaration && emptyImportDeclarations.indexOf(importDeclaration) === -1 && namedBindingsToDelete.indexOf(importDeclaration) === -1) { if (declaration.kind === 274) { changeTracker.delete(sourceFile, declaration.name); @@ -186198,7 +189183,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCombinedVerbatimImports() { if (!verbatimImports.size) return void 0; - const importDeclarations = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isImportDeclaration5))); + const importDeclarations = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isImportDeclaration6))); const requireStatements = new Set(mapDefined([...verbatimImports], (d) => findAncestor(d, isRequireVariableStatement))); return [ ...mapDefined([...verbatimImports], (d) => d.kind === 272 ? getSynthesizedDeepClone( @@ -186223,7 +189208,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} d.importClause, d.importClause.phaseModifier, verbatimImports.has(d.importClause) ? d.importClause.name : void 0, - verbatimImports.has(d.importClause.namedBindings) ? d.importClause.namedBindings : ((_a3 = tryCast(d.importClause.namedBindings, isNamedImports3)) == null ? void 0 : _a3.elements.some((e) => verbatimImports.has(e))) ? factory.updateNamedImports( + verbatimImports.has(d.importClause.namedBindings) ? d.importClause.namedBindings : ((_a3 = tryCast(d.importClause.namedBindings, isNamedImports4)) == null ? void 0 : _a3.elements.some((e) => verbatimImports.has(e))) ? factory.updateNamedImports( d.importClause.namedBindings, d.importClause.namedBindings.elements.filter((e) => verbatimImports.has(e)) ) : void 0 @@ -186433,12 +189418,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} var _a3, _b, _c; switch (declaration.kind) { case 261: - return (_a3 = tryCast(declaration.name, isIdentifier17)) == null ? void 0 : _a3.text; + return (_a3 = tryCast(declaration.name, isIdentifier21)) == null ? void 0 : _a3.text; case 272: return declaration.name.text; case 352: case 273: - return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport4)) == null ? void 0 : _c.name.text; + return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport5)) == null ? void 0 : _c.name.text; default: return Debug.assertNever(declaration); } @@ -186659,7 +189644,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let info; if (errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) { info = getFixesInfoForUMDImport(context, symbolToken); - } else if (!isIdentifier17(symbolToken)) { + } else if (!isIdentifier21(symbolToken)) { return void 0; } else if (errorCode === Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) { const symbolName2 = single(getSymbolNamesToImport(context.sourceFile, context.program.getTypeChecker(), symbolToken, context.program.getCompilerOptions())); @@ -186761,11 +189746,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ).fixes; return fixes.map((fix) => { var _a3; - return { fix, symbolName: symbolName2, errorIdentifierText: (_a3 = tryCast(token, isIdentifier17)) == null ? void 0 : _a3.text }; + return { fix, symbolName: symbolName2, errorIdentifierText: (_a3 = tryCast(token, isIdentifier21)) == null ? void 0 : _a3.text }; }); } function getUmdSymbol(token, checker) { - const umdSymbol = isIdentifier17(token) ? checker.getSymbolAtLocation(token) : void 0; + const umdSymbol = isIdentifier21(token) ? checker.getSymbolAtLocation(token) : void 0; if (isUMDExportSymbol(umdSymbol)) return umdSymbol; const { parent: parent2 } = token; if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) { @@ -187004,7 +189989,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getModuleSpecifierText(promotedDeclaration) { var _a3, _b; - return promotedDeclaration.kind === 272 ? ((_b = tryCast((_a3 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a3.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral10).text; + return promotedDeclaration.kind === 272 ? ((_b = tryCast((_a3 = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a3.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral12).text; } function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, preferences) { const compilerOptions = program.getCompilerOptions(); @@ -187059,7 +190044,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } if (convertExistingToTypeOnly) { - const namedImports = tryCast(importClause.namedBindings, isNamedImports3); + const namedImports = tryCast(importClause.namedBindings, isNamedImports4); if (namedImports && namedImports.elements.length > 1) { const sortState = ts_OrganizeImports_exports.getNamedImportSpecifierComparerWithDetection(importClause.parent, preferences, sourceFile); if (sortState.isSorted !== false && aliasDeclaration.kind === 277 && namedImports.elements.indexOf(aliasDeclaration) !== 0) { @@ -187114,7 +190099,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} (i) => (i == null ? void 0 : i.addAsTypeOnly) === 4 /* NotAllowed */ ); - const existingSpecifiers = clause.namedBindings && ((_a3 = tryCast(clause.namedBindings, isNamedImports3)) == null ? void 0 : _a3.elements); + const existingSpecifiers = clause.namedBindings && ((_a3 = tryCast(clause.namedBindings, isNamedImports4)) == null ? void 0 : _a3.elements); if (defaultImport) { Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one"); changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), factory.createIdentifier(defaultImport.name), { suffix: ", " }); @@ -187365,7 +190350,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0) return; let declaration = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length)); if (declaration === void 0) return; - if (isIdentifier17(declaration) && isTypeParameterDeclaration(declaration.parent)) { + if (isIdentifier21(declaration) && isTypeParameterDeclaration(declaration.parent)) { declaration = declaration.parent; } if (isTypeParameterDeclaration(declaration)) { @@ -187605,7 +190590,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } function getPropertyAccessExpression(sourceFile, pos) { - return cast(getTokenAtPosition(sourceFile, pos).parent, isPropertyAccessExpression10); + return cast(getTokenAtPosition(sourceFile, pos).parent, isPropertyAccessExpression12); } var fixId20 = "fixImplicitThis"; var errorCodes23 = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code]; @@ -187634,7 +190619,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*includeClassComputedPropertyName*/ false ); - if (!isFunctionDeclaration2(fn) && !isFunctionExpression4(fn)) return void 0; + if (!isFunctionDeclaration3(fn) && !isFunctionExpression5(fn)) return void 0; if (!isSourceFile(getThisContainer( fn, /*includeArrowFunctions*/ @@ -187645,7 +190630,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 100, sourceFile)); const { name } = fn; const body = Debug.checkDefined(fn.body); - if (isFunctionExpression4(fn)) { + if (isFunctionExpression5(fn)) { if (name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(name, checker, sourceFile, body)) { return void 0; } @@ -187723,10 +190708,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getInfo7(sourceFile, pos, program) { var _a3, _b; const token = getTokenAtPosition(sourceFile, pos); - if (isIdentifier17(token)) { - const importDeclaration = findAncestor(token, isImportDeclaration5); + if (isIdentifier21(token)) { + const importDeclaration = findAncestor(token, isImportDeclaration6); if (importDeclaration === void 0) return void 0; - const moduleSpecifier = isStringLiteral10(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier : void 0; + const moduleSpecifier = isStringLiteral12(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier : void 0; if (moduleSpecifier === void 0) return void 0; const resolvedModule = (_a3 = program.getResolvedModuleFromModuleSpecifier(moduleSpecifier, sourceFile)) == null ? void 0 : _a3.resolvedModule; if (resolvedModule === void 0) return void 0; @@ -187764,11 +190749,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function tryGetExportDeclaration(sourceFile, isTypeOnly) { - const predicate = (node) => isExportDeclaration(node) && (isTypeOnly && node.isTypeOnly || !node.isTypeOnly); + const predicate = (node) => isExportDeclaration2(node) && (isTypeOnly && node.isTypeOnly || !node.isTypeOnly); return findLast(sourceFile.statements, predicate); } function updateExport(changes, program, sourceFile, node, names) { - const namedExports = node.exportClause && isNamedExports(node.exportClause) ? node.exportClause.elements : factory.createNodeArray([]); + const namedExports = node.exportClause && isNamedExports2(node.exportClause) ? node.exportClause.elements : factory.createNodeArray([]); const allowTypeModifier = !node.isTypeOnly && !!(getIsolatedModules(program.getCompilerOptions()) || find(namedExports, (e) => e.isTypeOnly)); changes.replaceNode( sourceFile, @@ -187819,7 +190804,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return firstOrUndefined(symbol2.declarations); } const declaration = symbol2.valueDeclaration; - const variableStatement = isVariableDeclaration4(declaration) ? tryCast(declaration.parent.parent, isVariableStatement8) : void 0; + const variableStatement = isVariableDeclaration4(declaration) ? tryCast(declaration.parent.parent, isVariableStatement10) : void 0; return variableStatement && length(variableStatement.declarationList.declarations) === 1 ? variableStatement : declaration; } var fixId22 = "fixIncorrectNamedTupleSyntax"; @@ -187919,14 +190904,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if ((errorCode === Diagnostics.No_overload_matches_this_call.code || errorCode === Diagnostics.Type_0_is_not_assignable_to_type_1.code) && !isJsxAttribute(parent2)) return void 0; const checker = context.program.getTypeChecker(); let suggestedSymbol; - if (isPropertyAccessExpression10(parent2) && parent2.name === node) { + if (isPropertyAccessExpression12(parent2) && parent2.name === node) { Debug.assert(isMemberName(node), "Expected an identifier for spelling (property access)"); let containingType = checker.getTypeAtLocation(parent2.expression); if (parent2.flags & 64) { containingType = checker.getNonNullableType(containingType); } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); - } else if (isBinaryExpression2(parent2) && parent2.operatorToken.kind === 103 && parent2.left === node && isPrivateIdentifier(node)) { + } else if (isBinaryExpression4(parent2) && parent2.operatorToken.kind === 103 && parent2.left === node && isPrivateIdentifier(node)) { const receiverType = checker.getTypeAtLocation(parent2.right); suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, receiverType); } else if (isQualifiedName2(parent2) && parent2.right === node) { @@ -187935,14 +190920,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(parent2.right, symbol2); } } else if (isImportSpecifier(parent2) && parent2.name === node) { - Debug.assertNode(node, isIdentifier17, "Expected an identifier for spelling (import)"); - const importDeclaration = findAncestor(node, isImportDeclaration5); + Debug.assertNode(node, isIdentifier21, "Expected an identifier for spelling (import)"); + const importDeclaration = findAncestor(node, isImportDeclaration6); const resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(context, importDeclaration, sourceFile); if (resolvedSourceFile && resolvedSourceFile.symbol) { suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(node, resolvedSourceFile.symbol); } } else if (isJsxAttribute(parent2) && parent2.name === node) { - Debug.assertNode(node, isIdentifier17, "Expected an identifier for JSX attribute"); + Debug.assertNode(node, isIdentifier21, "Expected an identifier for JSX attribute"); const tag = findAncestor(node, isJsxOpeningLikeElement); const props = checker.getContextualTypeForArgumentAtIndex(tag, 0); suggestedSymbol = checker.getSuggestedSymbolForNonexistentJSXAttribute(node, props); @@ -187963,7 +190948,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function doChange18(changes, sourceFile, node, suggestedSymbol, target) { const suggestion = symbolName(suggestedSymbol); - if (!isIdentifierText(suggestion, target) && isPropertyAccessExpression10(node.parent)) { + if (!isIdentifierText(suggestion, target) && isPropertyAccessExpression12(node.parent)) { const valDecl = suggestedSymbol.valueDeclaration; if (valDecl && isNamedDeclaration(valDecl) && isPrivateIdentifier(valDecl.name)) { changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion)); @@ -188013,7 +190998,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (info.kind === 0) { return append( [getActionForfixAddReturnStatement(context, info.expression, info.statement)], - isArrowFunction5(info.declaration) ? getActionForFixRemoveBracesFromArrowFunctionBody(context, info.declaration, info.expression, info.commentSource) : void 0 + isArrowFunction6(info.declaration) ? getActionForFixRemoveBracesFromArrowFunctionBody(context, info.declaration, info.expression, info.commentSource) : void 0 ); } else { return [getActionForfixWrapTheBlockWithParen(context, info.declaration, info.expression)]; @@ -188027,7 +191012,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} addReturnStatement(changes, diag2.file, info.expression, info.statement); break; case fixRemoveBracesFromArrowFunctionBody: - if (!isArrowFunction5(info.declaration)) return void 0; + if (!isArrowFunction6(info.declaration)) return void 0; removeBlockBodyBrace( changes, diag2.file, @@ -188039,7 +191024,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); break; case fixIdWrapTheBlockWithParen: - if (!isArrowFunction5(info.declaration)) return void 0; + if (!isArrowFunction6(info.declaration)) return void 0; wrapBlockWithParen(changes, diag2.file, info.declaration, info.expression); break; default: @@ -188061,7 +191046,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } function getFixInfo(checker, declaration, expectType, isFunctionType) { - if (!declaration.body || !isBlock4(declaration.body) || length(declaration.body.statements) !== 1) return void 0; + if (!declaration.body || !isBlock5(declaration.body) || length(declaration.body.statements) !== 1) return void 0; const firstStatement = first(declaration.body.statements); if (isExpressionStatement(firstStatement) && checkFixedAssignableTo(checker, declaration, checker.getTypeAtLocation(firstStatement.expression), expectType, isFunctionType)) { return { @@ -188075,7 +191060,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const node = factory.createObjectLiteralExpression([factory.createPropertyAssignment(firstStatement.label, firstStatement.statement.expression)]); const nodeType = createObjectTypeFromLabeledExpression(checker, firstStatement.label, firstStatement.statement.expression); if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) { - return isArrowFunction5(declaration) ? { + return isArrowFunction6(declaration) ? { declaration, kind: 1, expression: node, @@ -188089,7 +191074,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} commentSource: firstStatement.statement.expression }; } - } else if (isBlock4(firstStatement) && length(firstStatement.statements) === 1) { + } else if (isBlock5(firstStatement) && length(firstStatement.statements) === 1) { const firstBlockStatement = first(firstStatement.statements); if (isLabeledStatement(firstBlockStatement) && isExpressionStatement(firstBlockStatement.statement)) { const node = factory.createObjectLiteralExpression([factory.createPropertyAssignment(firstBlockStatement.label, firstBlockStatement.statement.expression)]); @@ -188158,7 +191143,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false ); case Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code: - if (!declaration || !isCallExpression9(declaration.parent) || !declaration.body) return void 0; + if (!declaration || !isCallExpression12(declaration.parent) || !declaration.body) return void 0; const pos = declaration.parent.arguments.indexOf(declaration); if (pos === -1) return void 0; const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos); @@ -188312,7 +191297,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } }); typeDeclToMembers.forEach((infos, declaration) => { - const supers = isTypeLiteralNode(declaration) ? void 0 : getAllSupers(declaration, checker); + const supers = isTypeLiteralNode2(declaration) ? void 0 : getAllSupers(declaration, checker); for (const info of infos) { if (supers == null ? void 0 : supers.some((superClassOrInterface) => { const superInfos = typeDeclToMembers.get(superClassOrInterface); @@ -188322,7 +191307,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (call && !isPrivateIdentifier(token)) { addMethodDeclaration(context, changes, call, token, modifierFlags & 256, parentDeclaration, declSourceFile); } else { - if (isJSFile && !isInterfaceDeclaration2(parentDeclaration) && !isTypeLiteralNode(parentDeclaration)) { + if (isJSFile && !isInterfaceDeclaration2(parentDeclaration) && !isTypeLiteralNode2(parentDeclaration)) { addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256)); } else { const typeNode = getTypeNode2(checker, parentDeclaration, token); @@ -188347,13 +191332,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const token = getTokenAtPosition(sourceFile, tokenPos); const parent2 = token.parent; if (errorCode === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) { - if (!(token.kind === 19 && isObjectLiteralExpression6(parent2) && isCallExpression9(parent2.parent))) return void 0; + if (!(token.kind === 19 && isObjectLiteralExpression9(parent2) && isCallExpression12(parent2.parent))) return void 0; const argIndex = findIndex(parent2.parent.arguments, (arg) => arg === parent2); if (argIndex < 0) return void 0; const signature = checker.getResolvedSignature(parent2.parent); if (!(signature && signature.declaration && signature.parameters[argIndex])) return void 0; const param = signature.parameters[argIndex].valueDeclaration; - if (!(param && isParameter(param) && isIdentifier17(param.name))) return void 0; + if (!(param && isParameter(param) && isIdentifier21(param.name))) return void 0; const properties = arrayFrom(checker.getUnmatchedProperties( checker.getTypeAtLocation(parent2), checker.getParameterType(signature, argIndex).getNonNullableType(), @@ -188365,10 +191350,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!length(properties)) return void 0; return { kind: 3, token: param.name, identifier: param.name.text, properties, parentDeclaration: parent2 }; } - if (token.kind === 19 || isSatisfiesExpression3(parent2) || isReturnStatement2(parent2)) { - const expression = (isSatisfiesExpression3(parent2) || isReturnStatement2(parent2)) && parent2.expression ? parent2.expression : parent2; - if (isObjectLiteralExpression6(expression)) { - const targetType = isSatisfiesExpression3(parent2) ? checker.getTypeFromTypeNode(parent2.type) : checker.getContextualType(expression) || checker.getTypeAtLocation(expression); + if (token.kind === 19 || isSatisfiesExpression5(parent2) || isReturnStatement3(parent2)) { + const expression = (isSatisfiesExpression5(parent2) || isReturnStatement3(parent2)) && parent2.expression ? parent2.expression : parent2; + if (isObjectLiteralExpression9(expression)) { + const targetType = isSatisfiesExpression5(parent2) ? checker.getTypeFromTypeNode(parent2.type) : checker.getContextualType(expression) || checker.getTypeAtLocation(expression); const properties = arrayFrom(checker.getUnmatchedProperties( checker.getTypeAtLocation(parent2), targetType.getNonNullableType(), @@ -188378,11 +191363,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false )); if (!length(properties)) return void 0; - return { kind: 3, token: parent2, identifier: void 0, properties, parentDeclaration: expression, indentation: isReturnStatement2(expression.parent) || isYieldExpression(expression.parent) ? 0 : void 0 }; + return { kind: 3, token: parent2, identifier: void 0, properties, parentDeclaration: expression, indentation: isReturnStatement3(expression.parent) || isYieldExpression(expression.parent) ? 0 : void 0 }; } } if (!isMemberName(token)) return void 0; - if (isIdentifier17(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression6(parent2.initializer)) { + if (isIdentifier21(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression9(parent2.initializer)) { const targetType = (_a3 = checker.getContextualType(token) || checker.getTypeAtLocation(token)) == null ? void 0 : _a3.getNonNullableType(); const properties = arrayFrom(checker.getUnmatchedProperties( checker.getTypeAtLocation(parent2.initializer), @@ -188395,13 +191380,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!length(properties)) return void 0; return { kind: 3, token, identifier: token.text, properties, parentDeclaration: parent2.initializer }; } - if (isIdentifier17(token) && isJsxOpeningLikeElement(token.parent)) { + if (isIdentifier21(token) && isJsxOpeningLikeElement(token.parent)) { const target = getEmitScriptTarget(program.getCompilerOptions()); const attributes = getUnmatchedAttributes(checker, target, token.parent); if (!length(attributes)) return void 0; return { kind: 4, token, attributes, parentDeclaration: token.parent }; } - if (isIdentifier17(token)) { + if (isIdentifier21(token)) { const type = (_b = checker.getContextualType(token)) == null ? void 0 : _b.getNonNullableType(); if (type && getObjectFlags(type) & 16) { const signature = firstOrUndefined(checker.getSignaturesOfType( @@ -188412,15 +191397,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (signature === void 0) return void 0; return { kind: 5, token, signature, sourceFile, parentDeclaration: findScope(token) }; } - if (isCallExpression9(parent2) && parent2.expression === token) { + if (isCallExpression12(parent2) && parent2.expression === token) { return { kind: 2, token, call: parent2, sourceFile, modifierFlags: 0, parentDeclaration: findScope(token) }; } } - if (!isPropertyAccessExpression10(parent2)) return void 0; + if (!isPropertyAccessExpression12(parent2)) return void 0; const leftExpressionType = skipConstraint(checker.getTypeAtLocation(parent2.expression)); const symbol2 = leftExpressionType.symbol; if (!symbol2 || !symbol2.declarations) return void 0; - if (isIdentifier17(token) && isCallExpression9(parent2.parent)) { + if (isIdentifier21(token) && isCallExpression12(parent2.parent)) { const moduleDeclaration = find(symbol2.declarations, isModuleDeclaration); const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile(); if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) { @@ -188434,14 +191419,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const classDeclaration = find(symbol2.declarations, isClassLike); if (!classDeclaration && isPrivateIdentifier(token)) return void 0; - const declaration = classDeclaration || find(symbol2.declarations, (d) => isInterfaceDeclaration2(d) || isTypeLiteralNode(d)); + const declaration = classDeclaration || find(symbol2.declarations, (d) => isInterfaceDeclaration2(d) || isTypeLiteralNode2(d)); if (declaration && !isSourceFileFromLibrary(program, declaration.getSourceFile())) { - const makeStatic = !isTypeLiteralNode(declaration) && (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol2); + const makeStatic = !isTypeLiteralNode2(declaration) && (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol2); if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration2(declaration))) return void 0; const declSourceFile = declaration.getSourceFile(); - const modifierFlags = isTypeLiteralNode(declaration) ? 0 : (makeStatic ? 256 : 0) | (startsWithUnderscore(token.text) ? 2 : 0); + const modifierFlags = isTypeLiteralNode2(declaration) ? 0 : (makeStatic ? 256 : 0) | (startsWithUnderscore(token.text) ? 2 : 0); const isJSFile = isSourceFileJS(declSourceFile); - const call = tryCast(parent2.parent, isCallExpression9); + const call = tryCast(parent2.parent, isCallExpression12); return { kind: 0, token, call, modifierFlags, parentDeclaration: declaration, declSourceFile, isJSFile }; } const enumDeclaration = find(symbol2.declarations, isEnumDeclaration); @@ -188454,7 +191439,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return info.isJSFile ? singleElementArray(createActionForAddMissingMemberInJavascriptFile(context, info)) : createActionsForAddMissingMemberInTypeScriptFile(context, info); } function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) { - if (isInterfaceDeclaration2(parentDeclaration) || isTypeLiteralNode(parentDeclaration)) { + if (isInterfaceDeclaration2(parentDeclaration) || isTypeLiteralNode2(parentDeclaration)) { return void 0; } const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256))); @@ -188678,7 +191663,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (functionDeclaration === void 0) { Debug.fail("fixMissingFunctionDeclaration codefix got unexpected error."); } - isReturnStatement2(info.parentDeclaration) ? changes.insertNodeBefore( + isReturnStatement3(info.parentDeclaration) ? changes.insertNodeBefore( info.sourceFile, info.parentDeclaration, functionDeclaration, @@ -188852,7 +191837,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return factory.createIdentifier("undefined"); } function isObjectLiteralType(type) { - return type.flags & 524288 && (getObjectFlags(type) & 128 || type.symbol && tryCast(singleOrUndefined(type.symbol.declarations), isTypeLiteralNode)); + return type.flags & 524288 && (getObjectFlags(type) & 128 || type.symbol && tryCast(singleOrUndefined(type.symbol.declarations), isTypeLiteralNode2)); } function getUnmatchedAttributes(checker, target, source) { const attrsType = checker.getContextualType(source.attributes); @@ -188879,10 +191864,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) && !(targetProp.flags & 16777216 || getCheckFlags(targetProp) & 48 || seenNames.has(targetProp.escapedName))); } function tryGetContainingMethodDeclaration(node, callExpression) { - if (isTypeLiteralNode(node)) { + if (isTypeLiteralNode2(node)) { return void 0; } - const declaration = findAncestor(callExpression, (n) => isMethodDeclaration(n) || isConstructorDeclaration(n)); + const declaration = findAncestor(callExpression, (n) => isMethodDeclaration(n) || isConstructorDeclaration2(n)); return declaration && declaration.parent === node ? declaration : void 0; } function createPropertyNameFromSymbol(symbol2, target, quotePreference, checker) { @@ -188911,7 +191896,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function findScope(node) { if (findAncestor(node, isJsxExpression)) { - const returnStatement = findAncestor(node.parent, isReturnStatement2); + const returnStatement = findAncestor(node.parent, isReturnStatement3); if (returnStatement) return returnStatement; } return getSourceFileOfNode(node); @@ -188943,7 +191928,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getAllCodeActions: (context) => codeFixAll(context, errorCodes29, (changes, diag2) => addMissingNewOperator(changes, context.sourceFile, diag2)) }); function addMissingNewOperator(changes, sourceFile, span) { - const call = cast(findAncestorMatchingSpan2(sourceFile, span), isCallExpression9); + const call = cast(findAncestorMatchingSpan2(sourceFile, span), isCallExpression12); const newExpression = factory.createNewExpression(call.expression, call.typeArguments, call.arguments); changes.replaceNode(sourceFile, call, newExpression); } @@ -189007,7 +191992,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getInfo11(sourceFile, program, pos) { const token = getTokenAtPosition(sourceFile, pos); - const callExpression = findAncestor(token, isCallExpression9); + const callExpression = findAncestor(token, isCallExpression12); if (callExpression === void 0 || length(callExpression.arguments) === 0) { return void 0; } @@ -189042,7 +192027,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} pos2++; continue; } - const name2 = expr && isIdentifier17(expr) ? expr.text : `p${paramIndex++}`; + const name2 = expr && isIdentifier21(expr) ? expr.text : `p${paramIndex++}`; const typeNode = typeToTypeNode(checker, type2, nonOverloadDeclaration); append(newParameters, { pos: i, @@ -189076,7 +192061,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (name) { return name; } - if (isVariableDeclaration4(node.parent) && isIdentifier17(node.parent.name) || isPropertyDeclaration(node.parent) || isParameter(node.parent)) { + if (isVariableDeclaration4(node.parent) && isIdentifier21(node.parent.name) || isPropertyDeclaration(node.parent) || isParameter(node.parent)) { return node.parent.name; } } @@ -189254,7 +192239,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { type: "install package", file: fileName, packageName }; } function tryGetImportedPackageName(sourceFile, pos) { - const moduleSpecifierText = tryCast(getTokenAtPosition(sourceFile, pos), isStringLiteral10); + const moduleSpecifierText = tryCast(getTokenAtPosition(sourceFile, pos), isStringLiteral12); if (!moduleSpecifierText) return void 0; const moduleName = moduleSpecifierText.text; const { packageName } = parsePackageName(moduleName); @@ -189343,7 +192328,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (token.kind !== 110) return void 0; const constructor = getContainingFunction(token); const superCall = findSuperCall(constructor.body); - return superCall && !superCall.expression.arguments.some((arg) => isPropertyAccessExpression10(arg) && arg.expression === token) ? { constructor, superCall } : void 0; + return superCall && !superCall.expression.arguments.some((arg) => isPropertyAccessExpression12(arg) && arg.expression === token) ? { constructor, superCall } : void 0; } function findSuperCall(n) { return isExpressionStatement(n) && isSuperCall(n.expression) ? n : isFunctionLike(n) ? void 0 : forEachChild22(n, findSuperCall); @@ -189363,7 +192348,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getNode(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); + Debug.assert(isConstructorDeclaration2(token.parent), "token should be at the constructor declaration"); return token.parent; } function doChange21(changes, sourceFile, ctr) { @@ -189433,7 +192418,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0) return; const token = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length)); if (token === void 0) return; - if (isExpression(token) && isBinaryExpression2(token.parent)) { + if (isExpression(token) && isBinaryExpression4(token.parent)) { return { suggestion: getSuggestion(related.messageText), expression: token.parent, arg: token }; } return void 0; @@ -189513,7 +192498,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changes.replaceNode(sourceFile, node, factory.createPropertyAssignment(node.name, node.objectAssignmentInitializer)); } function getProperty2(sourceFile, pos) { - return cast(getTokenAtPosition(sourceFile, pos).parent, isShorthandPropertyAssignment3); + return cast(getTokenAtPosition(sourceFile, pos).parent, isShorthandPropertyAssignment5); } var fixId31 = "extendsInterfaceBecomesImplements"; var errorCodes38 = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code]; @@ -189585,7 +192570,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getInfo13(sourceFile, pos, diagCode) { const node = getTokenAtPosition(sourceFile, pos); - if (isIdentifier17(node) || isPrivateIdentifier(node)) { + if (isIdentifier21(node) || isPrivateIdentifier(node)) { return { node, className: diagCode === didYouMeanStaticMemberCode ? getContainingClass(node).name.text : void 0 }; } } @@ -189697,11 +192682,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const tags = getJSDocTags(signature); const names = /* @__PURE__ */ new Set(); for (const tag of tags) { - if (isJSDocParameterTag(tag) && isIdentifier17(tag.name)) { + if (isJSDocParameterTag(tag) && isIdentifier21(tag.name)) { names.add(tag.name.escapedText); } } - const parameterName = firstDefined(signature.parameters, (p) => isIdentifier17(p.name) && !names.has(p.name.escapedText) ? p.name.getText(sourceFile) : void 0); + const parameterName = firstDefined(signature.parameters, (p) => isIdentifier21(p.name) && !names.has(p.name.escapedText) ? p.name.getText(sourceFile) : void 0); if (parameterName === void 0) return void 0; const newJSDocParameterTag = factory.updateJSDocParameterTag( jsDocParameterTag, @@ -189717,7 +192702,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getInfo14(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - if (token.parent && isJSDocParameterTag(token.parent) && isIdentifier17(token.parent.name)) { + if (token.parent && isJSDocParameterTag(token.parent) && isIdentifier21(token.parent.name)) { const jsDocParameterTag = token.parent; const jsDocHost = getJSDocHost(jsDocParameterTag); const signature = getHostSignatureFromJSDoc(jsDocParameterTag); @@ -189748,7 +192733,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fixIds: [fixId33] }); function getImportDeclaration(sourceFile, program, start) { - const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier17); + const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier21); if (!identifier || identifier.parent.kind !== 184) return; const checker = program.getTypeChecker(); const symbol2 = checker.getSymbolAtLocation(identifier); @@ -189823,7 +192808,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [createCodeFixAction(fixName3, deletion, [Diagnostics.Remove_unused_declaration_for_Colon_0, token.getText(sourceFile)], fixIdDeleteImports, Diagnostics.Delete_all_unused_imports)]; } } - if (isObjectBindingPattern(token.parent) || isArrayBindingPattern(token.parent)) { + if (isObjectBindingPattern2(token.parent) || isArrayBindingPattern(token.parent)) { if (isParameter(token.parent.parent)) { const elements = token.parent.elements; const diagnostic = [ @@ -189843,7 +192828,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteEntireVariableStatement(t, sourceFile, token.parent)), Diagnostics.Remove_variable_statement) ]; } - if (isIdentifier17(token) && isFunctionDeclaration2(token.parent)) { + if (isIdentifier21(token) && isFunctionDeclaration3(token.parent)) { return [createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteFunctionLikeDeclaration(t, sourceFile, token.parent)), [Diagnostics.Remove_unused_declaration_for_Colon_0, token.getText(sourceFile)])]; } const result = []; @@ -189911,7 +192896,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} changes.delete(sourceFile, token); } else if (token.kind === 30) { deleteTypeParameters(changes, sourceFile, token); - } else if (isObjectBindingPattern(token.parent)) { + } else if (isObjectBindingPattern2(token.parent)) { if (token.parent.parent.initializer) { break; } else if (!isParameter(token.parent.parent) || isNotProvidedArguments(token.parent.parent, checker, sourceFiles)) { @@ -189921,7 +192906,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} break; } else if (canDeleteEntireVariableStatement(sourceFile, token)) { deleteEntireVariableStatement(changes, sourceFile, token.parent); - } else if (isIdentifier17(token) && isFunctionDeclaration2(token.parent)) { + } else if (isIdentifier21(token) && isFunctionDeclaration3(token.parent)) { deleteFunctionLikeDeclaration(changes, sourceFile, token.parent); } else { tryDeleteDeclaration( @@ -189965,7 +192950,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return token.kind === 102 || token.kind === 80 && (token.parent.kind === 277 || token.parent.kind === 274); } function tryGetFullImport(token) { - return token.kind === 102 ? tryCast(token.parent, isImportDeclaration5) : void 0; + return token.kind === 102 ? tryCast(token.parent, isImportDeclaration6) : void 0; } function canDeleteEntireVariableStatement(sourceFile, token) { return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; @@ -189999,11 +192984,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (token.kind === 140) { token = cast(token.parent, isInferTypeNode).typeParameter.name; } - if (isIdentifier17(token) && canPrefix(token)) { + if (isIdentifier21(token) && canPrefix(token)) { changes.replaceNode(sourceFile, token, factory.createIdentifier(`_${token.text}`)); if (isParameter(token.parent)) { getJSDocParameterTags(token.parent).forEach((tag) => { - if (isIdentifier17(tag.name)) { + if (isIdentifier21(tag.name)) { changes.replaceNode(sourceFile, tag.name, factory.createIdentifier(`_${tag.name.text}`)); } }); @@ -190028,9 +193013,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryDeleteDeclaration(sourceFile, token, changes, checker, sourceFiles, program, cancellationToken, isFixAll) { tryDeleteDeclarationWorker(token, changes, sourceFile, checker, sourceFiles, program, cancellationToken, isFixAll); - if (isIdentifier17(token)) { + if (isIdentifier21(token)) { ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(token, checker, sourceFile, (ref) => { - if (isPropertyAccessExpression10(ref.parent) && ref.parent.name === ref) ref = ref.parent; + if (isPropertyAccessExpression12(ref.parent) && ref.parent.name === ref) ref = ref.parent; if (!isFixAll && mayDeleteExpression(ref)) { changes.delete(sourceFile, ref.parent.parent); } @@ -190041,7 +193026,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { parent: parent2 } = token; if (isParameter(parent2)) { tryDeleteParameter(changes, sourceFile, parent2, checker, sourceFiles, program, cancellationToken, isFixAll); - } else if (!(isFixAll && isIdentifier17(token) && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(token, checker, sourceFile))) { + } else if (!(isFixAll && isIdentifier21(token) && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(token, checker, sourceFile))) { const node = isImportClause(parent2) ? token : isComputedPropertyName(parent2) ? parent2.parent : parent2; Debug.assert(node !== sourceFile, "should not delete whole source file"); changes.delete(sourceFile, node); @@ -190049,7 +193034,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryDeleteParameter(changes, sourceFile, parameter, checker, sourceFiles, program, cancellationToken, isFixAll = false) { if (mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll)) { - if (parameter.modifiers && parameter.modifiers.length > 0 && (!isIdentifier17(parameter.name) || ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(parameter.name, checker, sourceFile))) { + if (parameter.modifiers && parameter.modifiers.length > 0 && (!isIdentifier21(parameter.name) || ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(parameter.name, checker, sourceFile))) { for (const modifier of parameter.modifiers) { if (isModifier(modifier)) { changes.deleteModifier(sourceFile, modifier); @@ -190076,8 +193061,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} for (const entry of entries) { for (const reference of entry.references) { if (reference.kind === ts_FindAllReferences_exports.EntryKind.Node) { - const isSuperCall2 = isSuperKeyword(reference.node) && isCallExpression9(reference.node.parent) && reference.node.parent.arguments.length > index; - const isSuperMethodCall = isPropertyAccessExpression10(reference.node.parent) && isSuperKeyword(reference.node.parent.expression) && isCallExpression9(reference.node.parent.parent) && reference.node.parent.parent.arguments.length > index; + const isSuperCall2 = isSuperKeyword(reference.node) && isCallExpression12(reference.node.parent) && reference.node.parent.arguments.length > index; + const isSuperMethodCall = isPropertyAccessExpression12(reference.node.parent) && isSuperKeyword(reference.node.parent.expression) && isCallExpression12(reference.node.parent.parent) && reference.node.parent.parent.arguments.length > index; const isOverriddenMethod = (isMethodDeclaration(reference.node.parent) || isMethodSignature(reference.node.parent)) && reference.node.parent !== parameter.parent && reference.node.parent.parameters.length > index; if (isSuperCall2 || isSuperMethodCall || isOverriddenMethod) return false; } @@ -190103,16 +193088,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isCallbackLike(checker, sourceFile, name) { - return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier17(reference) && isCallExpression9(reference.parent) && reference.parent.arguments.includes(reference)); + return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier21(reference) && isCallExpression12(reference.parent) && reference.parent.arguments.includes(reference)); } function isLastParameter(func, parameter, isFixAll) { const parameters = func.parameters; const index = parameters.indexOf(parameter); Debug.assert(index !== -1, "The parameter should already be in the list"); - return isFixAll ? parameters.slice(index + 1).every((p) => isIdentifier17(p.name) && !p.symbol.isReferenced) : index === parameters.length - 1; + return isFixAll ? parameters.slice(index + 1).every((p) => isIdentifier21(p.name) && !p.symbol.isReferenced) : index === parameters.length - 1; } function mayDeleteExpression(node) { - return (isBinaryExpression2(node.parent) && node.parent.left === node || (isPostfixUnaryExpression(node.parent) || isPrefixUnaryExpression2(node.parent)) && node.parent.operand === node) && isExpressionStatement(node.parent.parent); + return (isBinaryExpression4(node.parent) && node.parent.left === node || (isPostfixUnaryExpression(node.parent) || isPrefixUnaryExpression4(node.parent)) && node.parent.operand === node) && isExpressionStatement(node.parent.parent); } function deleteFunctionLikeDeclaration(changes, sourceFile, node) { const declarations = node.symbol.declarations; @@ -190148,12 +193133,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); Debug.fail("Token and statement should start at the same point. " + logData); } - const container = (isBlock4(statement.parent) ? statement.parent : statement).parent; - if (!isBlock4(statement.parent) || statement === first(statement.parent.statements)) { + const container = (isBlock5(statement.parent) ? statement.parent : statement).parent; + if (!isBlock5(statement.parent) || statement === first(statement.parent.statements)) { switch (container.kind) { case 246: if (container.elseStatement) { - if (isBlock4(statement.parent)) { + if (isBlock5(statement.parent)) { break; } else { changes.replaceNode(sourceFile, statement, factory.createBlock(emptyArray)); @@ -190167,7 +193152,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } } - if (isBlock4(statement.parent)) { + if (isBlock5(statement.parent)) { const end = start + length2; const lastStatement = Debug.checkDefined(lastWhere(sliceAfter(statement.parent.statements, statement), (s) => s.pos < end), "Some statement should be last"); changes.deleteNodeRange(sourceFile, statement, lastStatement); @@ -190323,14 +193308,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCallName(sourceFile, start) { const token = getTokenAtPosition(sourceFile, start); - if (isPropertyAccessExpression10(token.parent)) { + if (isPropertyAccessExpression12(token.parent)) { let current = token.parent; - while (isPropertyAccessExpression10(current.parent)) { + while (isPropertyAccessExpression12(current.parent)) { current = current.parent; } return current.name; } - if (isIdentifier17(token)) { + if (isIdentifier21(token)) { return token; } return void 0; @@ -190438,7 +193423,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); const expandoFunction = findExpandoFunction(nodeWithDiag); if (expandoFunction) { - if (isFunctionDeclaration2(expandoFunction)) { + if (isFunctionDeclaration3(expandoFunction)) { return createNamespaceForExpandoProperties(expandoFunction); } return fixIsolatedDeclarationError(expandoFunction); @@ -190504,7 +193489,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [Diagnostics.Annotate_types_of_properties_expando_function_in_a_namespace]; } function needsParenthesizedExpressionForAssertion(node) { - return !isEntityNameExpression(node) && !isCallExpression9(node) && !isObjectLiteralExpression6(node) && !isArrayLiteralExpression5(node); + return !isEntityNameExpression(node) && !isCallExpression12(node) && !isObjectLiteralExpression9(node) && !isArrayLiteralExpression7(node); } function createAsExpression(node, type) { if (needsParenthesizedExpressionForAssertion(node)) { @@ -190526,7 +193511,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const targetNode = findBestFittingNode(nodeWithDiag, span); if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; const isExpressionTarget = isExpression(targetNode); - const isShorthandPropertyAssignmentTarget = isShorthandPropertyAssignment3(targetNode); + const isShorthandPropertyAssignmentTarget = isShorthandPropertyAssignment5(targetNode); if (!isShorthandPropertyAssignmentTarget && isDeclaration(targetNode)) { return void 0; } @@ -190539,7 +193524,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isExpressionTarget && (findAncestor(targetNode, isHeritageClause) || findAncestor(targetNode, isTypeNode))) { return void 0; } - if (isSpreadElement3(targetNode)) { + if (isSpreadElement5(targetNode)) { return void 0; } const variableDeclaration = findAncestor(targetNode, isVariableDeclaration4); @@ -190583,7 +193568,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; const isExpressionTarget = isExpression(targetNode); if (!isExpressionTarget) return; - if (isArrayLiteralExpression5(targetNode)) { + if (isArrayLiteralExpression7(targetNode)) { changeTracker.replaceNode( sourceFile, targetNode, @@ -190591,7 +193576,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); return [Diagnostics.Mark_array_literal_as_const]; } - const parentPropertyAssignment = findAncestor(targetNode, isPropertyAssignment6); + const parentPropertyAssignment = findAncestor(targetNode, isPropertyAssignment8); if (parentPropertyAssignment) { if (parentPropertyAssignment === targetNode.parent && isEntityNameExpression(targetNode)) return; const tempName = factory.createUniqueName( @@ -190601,7 +193586,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); let replacementTarget = targetNode; let initializationNode = targetNode; - if (isSpreadElement3(replacementTarget)) { + if (isSpreadElement5(replacementTarget)) { replacementTarget = walkUpParenthesizedExpressions(replacementTarget.parent); if (isConstAssertion2(replacementTarget.parent)) { initializationNode = replacementTarget = replacementTarget.parent; @@ -190650,7 +193635,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const expandoDeclaration = findAncestor(node, (n) => isStatement(n) ? "quit" : isExpandoPropertyDeclaration(n)); if (expandoDeclaration && isExpandoPropertyDeclaration(expandoDeclaration)) { let assignmentTarget = expandoDeclaration; - if (isBinaryExpression2(assignmentTarget)) { + if (isBinaryExpression4(assignmentTarget)) { assignmentTarget = assignmentTarget.left; if (!isExpandoPropertyDeclaration(assignmentTarget)) return void 0; } @@ -190663,7 +193648,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isFunctionExpressionOrArrowFunction(fn) && isVariableDeclaration4(fn.parent)) { return fn.parent; } - if (isFunctionDeclaration2(fn)) { + if (isFunctionDeclaration3(fn)) { return fn; } } @@ -190803,7 +193788,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!enclosingVariableDeclaration.initializer) return void 0; let baseExpr; const newNodes = []; - if (!isIdentifier17(enclosingVariableDeclaration.initializer)) { + if (!isIdentifier21(enclosingVariableDeclaration.initializer)) { const tempHolderForReturn = factory.createUniqueName( "dest", 16 @@ -190864,7 +193849,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const name = bindingElement.element.name; if (isArrayBindingPattern(name)) { addArrayBindingPatterns(name, bindingElements, bindingElement); - } else if (isObjectBindingPattern(name)) { + } else if (isObjectBindingPattern2(name)) { addObjectBindingPatterns(name, bindingElements, bindingElement); } else { const { typeNode } = inferType(name); @@ -190872,7 +193857,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (bindingElement.element.initializer) { const propertyName = (_a3 = bindingElement.element) == null ? void 0 : _a3.propertyName; const tempName = factory.createUniqueName( - propertyName && isIdentifier17(propertyName) ? propertyName.text : "temp", + propertyName && isIdentifier21(propertyName) ? propertyName.text : "temp", 16 /* Optimistic */ ); @@ -191086,7 +194071,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} name, isConstContext, (n) => n.elements, - isSpreadElement3, + isSpreadElement5, factory.createSpreadElement, (props) => factory.createArrayLiteralExpression( props, @@ -191103,7 +194088,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} name, isConstContext, (n) => n.properties, - isSpreadAssignment3, + isSpreadAssignment5, factory.createSpreadAssignment, (props) => factory.createObjectLiteralExpression( props, @@ -191188,7 +194173,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isParameter(node)) { return emptyInferenceResult; } - if (isShorthandPropertyAssignment3(node)) { + if (isShorthandPropertyAssignment5(node)) { return { typeNode: createTypeOfFromEntityNameExpression(node.name), mutatedTarget: false @@ -191203,20 +194188,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isConstAssertion2(node)) { return relativeType(node.expression); } - if (isArrayLiteralExpression5(node)) { + if (isArrayLiteralExpression7(node)) { const variableDecl = findAncestor(node, isVariableDeclaration4); - const partName = variableDecl && isIdentifier17(variableDecl.name) ? variableDecl.name.text : void 0; + const partName = variableDecl && isIdentifier21(variableDecl.name) ? variableDecl.name.text : void 0; return typeFromArraySpreadElements(node, partName); } - if (isObjectLiteralExpression6(node)) { + if (isObjectLiteralExpression9(node)) { const variableDecl = findAncestor(node, isVariableDeclaration4); - const partName = variableDecl && isIdentifier17(variableDecl.name) ? variableDecl.name.text : void 0; + const partName = variableDecl && isIdentifier21(variableDecl.name) ? variableDecl.name.text : void 0; return typeFromObjectSpreadAssignment(node, partName); } if (isVariableDeclaration4(node) && node.initializer) { return relativeType(node.initializer); } - if (isConditionalExpression2(node)) { + if (isConditionalExpression4(node)) { const { typeNode: trueType, mutatedTarget: mTrue } = relativeType(node.whenTrue); if (!trueType) return emptyInferenceResult; const { typeNode: falseType, mutatedTarget: mFalse } = relativeType(node.whenFalse); @@ -191294,7 +194279,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function findAncestorWithMissingType(node) { return findAncestor(node, (n) => { - return canHaveTypeAnnotation.has(n.kind) && (!isObjectBindingPattern(n) && !isArrayBindingPattern(n) || isVariableDeclaration4(n.parent)); + return canHaveTypeAnnotation.has(n.kind) && (!isObjectBindingPattern2(n) && !isArrayBindingPattern(n) || isVariableDeclaration4(n.parent)); }); } function findBestFittingNode(node, span) { @@ -191304,7 +194289,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} while (node.parent.pos === node.pos && node.parent.end === node.end) { node = node.parent; } - if (isIdentifier17(node) && hasInitializer(node.parent) && node.parent.initializer) { + if (isIdentifier21(node) && hasInitializer(node.parent) && node.parent.initializer) { return node.parent.initializer; } return node; @@ -191547,12 +194532,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // Variable and Property declarations case Diagnostics.Member_0_implicitly_has_an_1_type.code: case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: - if (isVariableDeclaration4(parent2) && markSeen(parent2) || isPropertyDeclaration(parent2) || isPropertySignature2(parent2)) { + if (isVariableDeclaration4(parent2) && markSeen(parent2) || isPropertyDeclaration(parent2) || isPropertySignature3(parent2)) { annotateVariableDeclaration(changes, importAdder, sourceFile, parent2, program, host, cancellationToken); importAdder.writeFixes(changes); return parent2; } - if (isPropertyAccessExpression10(parent2)) { + if (isPropertyAccessExpression12(parent2)) { const type = inferTypeForVariableFromUsage(parent2.name, program, cancellationToken); const typeNode = getTypeNodeIfAccessible(type, parent2, program, host); if (typeNode) { @@ -191603,7 +194588,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // Get Accessor declarations case Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: case Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: - if (isGetAccessorDeclaration(containingFunction) && isIdentifier17(containingFunction.name)) { + if (isGetAccessorDeclaration(containingFunction) && isIdentifier21(containingFunction.name)) { annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); declaration = containingFunction; } @@ -191629,12 +194614,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return declaration; } function annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) { - if (isIdentifier17(declaration.name)) { + if (isIdentifier21(declaration.name)) { annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); } } function annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { - if (!isIdentifier17(parameterDeclaration.name)) { + if (!isIdentifier21(parameterDeclaration.name)) { return; } const parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken); @@ -191642,7 +194627,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isInJSFile(containingFunction)) { annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host); } else { - const needParens = isArrowFunction5(containingFunction) && !findChildOfKind(containingFunction, 21, sourceFile); + const needParens = isArrowFunction6(containingFunction) && !findChildOfKind(containingFunction, 21, sourceFile); if (needParens) changes.insertNodeBefore(sourceFile, first(containingFunction.parameters), factory.createToken( 21 /* OpenParenToken */ @@ -191685,7 +194670,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { const param = firstOrUndefined(setAccessorDeclaration.parameters); - if (param && isIdentifier17(setAccessorDeclaration.name) && isIdentifier17(param.name)) { + if (param && isIdentifier21(setAccessorDeclaration.name) && isIdentifier21(param.name)) { let type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); if (type === program.getTypeChecker().getAnyType()) { type = inferTypeForVariableFromUsage(param.name, program, cancellationToken); @@ -191701,7 +194686,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); if (typeNode) { if (isInJSFile(sourceFile) && declaration.kind !== 172) { - const parent2 = isVariableDeclaration4(declaration) ? tryCast(declaration.parent.parent, isVariableStatement8) : declaration; + const parent2 = isVariableDeclaration4(declaration) ? tryCast(declaration.parent.parent, isVariableStatement10) : declaration; if (!parent2) { return; } @@ -191744,7 +194729,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const inferences = mapDefined(parameterInferences, (inference) => { const param = inference.declaration; - if (param.initializer || getJSDocType(param) || !isIdentifier17(param.name)) { + if (param.initializer || getJSDocType(param) || !isIdentifier21(param.name)) { return; } const typeNode = inference.type && getTypeNodeIfAccessible(inference.type, param, program, host); @@ -191761,8 +194746,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!inferences.length) { return; } - if (isArrowFunction5(signature) || isFunctionExpression4(signature)) { - const needParens = isArrowFunction5(signature) && !findChildOfKind(signature, 21, sourceFile); + if (isArrowFunction6(signature) || isFunctionExpression5(signature)) { + const needParens = isArrowFunction6(signature) && !findChildOfKind(signature, 21, sourceFile); if (needParens) { changes.insertNodeBefore(sourceFile, first(signature.parameters), factory.createToken( 21 @@ -191805,7 +194790,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getReferences(token, program, cancellationToken) { - return mapDefined(ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, token, program, program.getSourceFiles(), cancellationToken), (entry) => entry.kind !== ts_FindAllReferences_exports.EntryKind.Span ? tryCast(entry.node, isIdentifier17) : void 0); + return mapDefined(ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, token, program, program.getSourceFiles(), cancellationToken), (entry) => entry.kind !== ts_FindAllReferences_exports.EntryKind.Span ? tryCast(entry.node, isIdentifier21) : void 0); } function inferTypeForVariableFromUsage(token, program, cancellationToken) { const references = getReferences(token, program, cancellationToken); @@ -191815,7 +194800,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const references = getFunctionReferences(func, sourceFile, program, cancellationToken); return references && inferTypeFromReferences(program, references, cancellationToken).parameters(func) || func.parameters.map((p) => ({ declaration: p, - type: isIdentifier17(p.name) ? inferTypeForVariableFromUsage(p.name, program, cancellationToken) : program.getTypeChecker().getAnyType() + type: isIdentifier21(p.name) ? inferTypeForVariableFromUsage(p.name, program, cancellationToken) : program.getTypeChecker().getAnyType() })); } function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { @@ -191827,7 +194812,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 220: case 219: const parent2 = containingFunction.parent; - searchToken = (isVariableDeclaration4(parent2) || isPropertyDeclaration(parent2)) && isIdentifier17(parent2.name) ? parent2.name : containingFunction.name; + searchToken = (isVariableDeclaration4(parent2) || isPropertyDeclaration(parent2)) && isIdentifier21(parent2.name) ? parent2.name : containingFunction.name; break; case 263: case 175: @@ -191934,7 +194919,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} types.push(checker.getBaseTypeOfLiteralType(call.argumentTypes[parameterIndex])); } } - if (isIdentifier17(parameter.name)) { + if (isIdentifier21(parameter.name)) { const inferred = inferTypesFromReferencesSingle(getReferences(parameter.name, program, cancellationToken)); types.push(...isRest ? mapDefined(inferred, checker.getElementTypeOfArrayType) : inferred); } @@ -192024,7 +195009,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function inferTypeFromExpressionStatement(node, usage) { - addCandidateType(usage, isCallExpression9(node) ? checker.getVoidType() : checker.getAnyType()); + addCandidateType(usage, isCallExpression12(node) ? checker.getVoidType() : checker.getAnyType()); } function inferTypeFromPrefixUnaryExpression(node, usage) { switch (node.operator) { @@ -192712,7 +195697,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { Debug.assertNode(accessor, isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); const parameter = getSetAccessorValueParameter(accessor); - const parameterName = parameter && isIdentifier17(parameter.name) ? idText(parameter.name) : void 0; + const parameterName = parameter && isIdentifier21(parameter.name) ? idText(parameter.name) : void 0; addClassElement(factory.createSetAccessorDeclaration( modifiers, createName(declarationName), @@ -192781,7 +195766,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !!(context.program.getCompilerOptions().noImplicitOverride && declaration && hasAbstractModifier(declaration)); } function createName(node) { - if (isIdentifier17(node) && node.escapedText === "constructor") { + if (isIdentifier21(node) && node.escapedText === "constructor") { return factory.createComputedPropertyName(factory.createStringLiteral( idText(node), quotePreference === 0 @@ -192901,17 +195886,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /* QuestionToken */ ) : void 0; const asteriskToken = signatureDeclaration.asteriskToken; - if (isFunctionExpression4(signatureDeclaration)) { - return factory.updateFunctionExpression(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier17), typeParameters, parameters, type, body ?? signatureDeclaration.body); + if (isFunctionExpression5(signatureDeclaration)) { + return factory.updateFunctionExpression(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier21), typeParameters, parameters, type, body ?? signatureDeclaration.body); } - if (isArrowFunction5(signatureDeclaration)) { + if (isArrowFunction6(signatureDeclaration)) { return factory.updateArrowFunction(signatureDeclaration, modifiers, typeParameters, parameters, type, signatureDeclaration.equalsGreaterThanToken, body ?? signatureDeclaration.body); } if (isMethodDeclaration(signatureDeclaration)) { return factory.updateMethodDeclaration(signatureDeclaration, modifiers, asteriskToken, name ?? factory.createIdentifier(""), questionToken, typeParameters, parameters, type, body); } - if (isFunctionDeclaration2(signatureDeclaration)) { - return factory.updateFunctionDeclaration(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier17), typeParameters, parameters, type, body ?? signatureDeclaration.body); + if (isFunctionDeclaration3(signatureDeclaration)) { + return factory.updateFunctionDeclaration(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier21), typeParameters, parameters, type, body ?? signatureDeclaration.body); } return void 0; } @@ -192923,7 +195908,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const isJs = isInJSFile(contextNode); const { typeArguments, arguments: args, parent: parent2 } = call; const contextualType = isJs ? void 0 : checker.getContextualType(call); - const names = map2(args, (arg) => isIdentifier17(arg) ? arg.text : isPropertyAccessExpression10(arg) && isIdentifier17(arg.name) ? arg.name.text : void 0); + const names = map2(args, (arg) => isIdentifier21(arg) ? arg.text : isPropertyAccessExpression12(arg) && isIdentifier21(arg.name) ? arg.name.text : void 0); const instanceTypes = isJs ? [] : map2(args, (arg) => checker.getTypeAtLocation(arg)); const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters( checker, @@ -192985,7 +195970,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) : type ); case 263: - Debug.assert(typeof name === "string" || isIdentifier17(name), "Unexpected name"); + Debug.assert(typeof name === "string" || isIdentifier21(name), "Unexpected name"); return factory.createFunctionDeclaration( modifiers, asteriskToken, @@ -193295,7 +196280,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } const compilerOptions = compilerOptionsProperty.initializer; - if (!isObjectLiteralExpression6(compilerOptions)) { + if (!isObjectLiteralExpression9(compilerOptions)) { return; } for (const [optionName, optionValue] of options) { @@ -193314,7 +196299,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return factory.createPropertyAssignment(factory.createStringLiteral(name), initializer3); } function findJsonProperty(obj, name) { - return find(obj.properties, (p) => isPropertyAssignment6(p) && !!p.name && isStringLiteral10(p.name) && p.name.text === name); + return find(obj.properties, (p) => isPropertyAssignment8(p) && !!p.name && isStringLiteral12(p.name) && p.name.text === name); } function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) { let symbols; @@ -193410,17 +196395,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return changeTracker.getChanges(); } function isConvertibleName(name) { - return isIdentifier17(name) || isStringLiteral10(name); + return isIdentifier21(name) || isStringLiteral12(name); } function isAcceptedDeclaration(node) { - return isParameterPropertyDeclaration(node, node.parent) || isPropertyDeclaration(node) || isPropertyAssignment6(node); + return isParameterPropertyDeclaration(node, node.parent) || isPropertyDeclaration(node) || isPropertyAssignment8(node); } function createPropertyName(name, originalName) { - return isIdentifier17(originalName) ? factory.createIdentifier(name) : factory.createStringLiteral(name); + return isIdentifier21(originalName) ? factory.createIdentifier(name) : factory.createStringLiteral(name); } function createAccessorAccessExpression(fieldName, isStatic2, container) { const leftHead = isStatic2 ? container.name : factory.createThis(); - return isIdentifier17(fieldName) ? factory.createPropertyAccessExpression(leftHead, fieldName) : factory.createElementAccessExpression(leftHead, factory.createStringLiteralFromNode(fieldName)); + return isIdentifier21(fieldName) ? factory.createPropertyAccessExpression(leftHead, fieldName) : factory.createElementAccessExpression(leftHead, factory.createStringLiteralFromNode(fieldName)); } function prepareModifierFlagsForAccessor(modifierFlags) { modifierFlags &= ~8; @@ -193541,22 +196526,22 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function updateFieldDeclaration(changeTracker, file2, declaration, type, fieldName, modifiers) { if (isPropertyDeclaration(declaration)) { updatePropertyDeclaration(changeTracker, file2, declaration, type, fieldName, modifiers); - } else if (isPropertyAssignment6(declaration)) { + } else if (isPropertyAssignment8(declaration)) { updatePropertyAssignmentDeclaration(changeTracker, file2, declaration, fieldName); } else { - changeTracker.replaceNode(file2, declaration, factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier17), declaration.questionToken, declaration.type, declaration.initializer)); + changeTracker.replaceNode(file2, declaration, factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier21), declaration.questionToken, declaration.type, declaration.initializer)); } } function insertAccessor(changeTracker, file2, accessor, declaration, container) { - isParameterPropertyDeclaration(declaration, declaration.parent) ? changeTracker.insertMemberAtStart(file2, container, accessor) : isPropertyAssignment6(declaration) ? changeTracker.insertNodeAfterComma(file2, declaration, accessor) : changeTracker.insertNodeAfter(file2, declaration, accessor); + isParameterPropertyDeclaration(declaration, declaration.parent) ? changeTracker.insertMemberAtStart(file2, container, accessor) : isPropertyAssignment8(declaration) ? changeTracker.insertNodeAfterComma(file2, declaration, accessor) : changeTracker.insertNodeAfter(file2, declaration, accessor); } function updateReadonlyPropertyInitializerStatementConstructor(changeTracker, file2, constructor, fieldName, originalName) { if (!constructor.body) return; constructor.body.forEachChild(function recur(node) { - if (isElementAccessExpression3(node) && node.expression.kind === 110 && isStringLiteral10(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { + if (isElementAccessExpression5(node) && node.expression.kind === 110 && isStringLiteral12(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file2, node.argumentExpression, factory.createStringLiteral(fieldName)); } - if (isPropertyAccessExpression10(node) && node.expression.kind === 110 && node.name.text === originalName && isWriteAccess(node)) { + if (isPropertyAccessExpression12(node) && node.expression.kind === 110 && node.name.text === originalName && isWriteAccess(node)) { changeTracker.replaceNode(file2, node.name, factory.createIdentifier(fieldName)); } if (!isFunctionLike(node) && !isClassLike(node)) { @@ -193714,7 +196699,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getInfo17(sourceFile, pos) { const token = getTokenAtPosition(sourceFile, pos); - if (isIdentifier17(token) && isPropertyDeclaration(token.parent)) { + if (isIdentifier21(token) && isPropertyDeclaration(token.parent)) { const type = getEffectiveTypeAnnotationNode(token.parent); if (type) { return { type, prop: token.parent, isJs: isInJSFile(token.parent) }; @@ -193879,16 +196864,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const decl = cast(parent2.parent, isVariableDeclaration4); const quotePreference = getQuotePreference(sourceFile, preferences); - const defaultImportName = tryCast(decl.name, isIdentifier17); - const namedImports = isObjectBindingPattern(decl.name) ? tryCreateNamedImportsFromObjectBindingPattern(decl.name) : void 0; + const defaultImportName = tryCast(decl.name, isIdentifier21); + const namedImports = isObjectBindingPattern2(decl.name) ? tryCreateNamedImportsFromObjectBindingPattern(decl.name) : void 0; if (defaultImportName || namedImports) { const moduleSpecifier = first(parent2.arguments); return { allowSyntheticDefaults: getAllowSyntheticDefaultImports(program.getCompilerOptions()), defaultImportName, namedImports, - statement: cast(decl.parent.parent, isVariableStatement8), - moduleSpecifier: isNoSubstitutionTemplateLiteral2(moduleSpecifier) ? factory.createStringLiteral( + statement: cast(decl.parent.parent, isVariableStatement10), + moduleSpecifier: isNoSubstitutionTemplateLiteral4(moduleSpecifier) ? factory.createStringLiteral( moduleSpecifier.text, quotePreference === 0 /* Single */ @@ -193899,13 +196884,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function tryCreateNamedImportsFromObjectBindingPattern(node) { const importSpecifiers = []; for (const element of node.elements) { - if (!isIdentifier17(element.name) || element.initializer) { + if (!isIdentifier21(element.name) || element.initializer) { return void 0; } importSpecifiers.push(factory.createImportSpecifier( /*isTypeOnly*/ false, - tryCast(element.propertyName, isIdentifier17), + tryCast(element.propertyName, isIdentifier21), element.name )); } @@ -193932,11 +196917,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getInfo19(sourceFile, pos) { const name = getTokenAtPosition(sourceFile, pos); - if (!isIdentifier17(name)) return void 0; + if (!isIdentifier21(name)) return void 0; const { parent: parent2 } = name; if (isImportEqualsDeclaration(parent2) && isExternalModuleReference(parent2.moduleReference)) { return { importNode: parent2, name, moduleSpecifier: parent2.moduleReference.expression }; - } else if (isNamespaceImport4(parent2) && isImportDeclaration5(parent2.parent.parent)) { + } else if (isNamespaceImport5(parent2) && isImportDeclaration6(parent2.parent.parent)) { const importNode = parent2.parent.parent; return { importNode, name, moduleSpecifier: importNode.moduleSpecifier }; } @@ -193968,7 +196953,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } }); function makeChange10(changeTracker, sourceFile, span) { - const numericLiteral = tryCast(getTokenAtPosition(sourceFile, span.start), isNumericLiteral3); + const numericLiteral = tryCast(getTokenAtPosition(sourceFile, span.start), isNumericLiteral4); if (!numericLiteral) { return; } @@ -194029,9 +197014,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const lessThanToken = getTokenAtPosition(sourceFile, pos); const firstJsxElementOrOpenElement = lessThanToken.parent; let binaryExpr = firstJsxElementOrOpenElement.parent; - if (!isBinaryExpression2(binaryExpr)) { + if (!isBinaryExpression4(binaryExpr)) { binaryExpr = binaryExpr.parent; - if (!isBinaryExpression2(binaryExpr)) return void 0; + if (!isBinaryExpression4(binaryExpr)) return void 0; } if (!nodeIsMissing(binaryExpr.operatorToken)) return void 0; return binaryExpr; @@ -194044,12 +197029,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const children = []; let current = node; while (true) { - if (isBinaryExpression2(current) && nodeIsMissing(current.operatorToken) && current.operatorToken.kind === 28) { + if (isBinaryExpression4(current) && nodeIsMissing(current.operatorToken) && current.operatorToken.kind === 28) { children.push(current.left); if (isJsxChild(current.right)) { children.push(current.right); return children; - } else if (isBinaryExpression2(current.right)) { + } else if (isBinaryExpression4(current.right)) { current = current.right; continue; } else return void 0; @@ -194110,7 +197095,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const mappedTypeParameter = factory.createTypeParameterDeclaration( /*modifiers*/ void 0, - cast(parameter.name, isIdentifier17), + cast(parameter.name, isIdentifier21), parameter.type ); const mappedIntersectionType = factory.createMappedTypeNode( @@ -194140,7 +197125,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} registerCodeFix({ errorCodes: errorCodes62, getCodeActions(context) { - const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression9); + const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression12); if (!callExpression) { return void 0; } @@ -194179,14 +197164,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } let expressionToReplace = awaitExpression; - const hasSurroundingParens = isParenthesizedExpression4(awaitExpression.parent); + const hasSurroundingParens = isParenthesizedExpression6(awaitExpression.parent); if (hasSurroundingParens) { const leftMostExpression = getLeftmostExpression( awaitExpression.expression, /*stopAtCallExpressions*/ false ); - if (isIdentifier17(leftMostExpression)) { + if (isIdentifier21(leftMostExpression)) { const precedingToken = findPrecedingToken(awaitExpression.parent.pos, sourceFile); if (precedingToken && precedingToken.kind !== 105) { expressionToReplace = awaitExpression.parent; @@ -194213,7 +197198,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }) }); function getImportDeclaration2(sourceFile, span) { - return findAncestor(getTokenAtPosition(sourceFile, span.start), isImportDeclaration5); + return findAncestor(getTokenAtPosition(sourceFile, span.start), isImportDeclaration6); } function splitTypeOnlyImport(changes, importDeclaration, context) { if (!importDeclaration) { @@ -194326,7 +197311,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function getInfo22(sourceFile, pos, _) { const node = getTokenAtPosition(sourceFile, pos); - return node.kind === 27 && node.parent && (isObjectLiteralExpression6(node.parent) || isArrayLiteralExpression5(node.parent)) ? { node } : void 0; + return node.kind === 27 && node.parent && (isObjectLiteralExpression9(node.parent) || isArrayLiteralExpression7(node.parent)) ? { node } : void 0; } function doChange41(changes, sourceFile, { node }) { const newNode = factory.createToken( @@ -194356,11 +197341,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); function makeChange13(changes, sourceFile, span, program, seen) { const node = getTokenAtPosition(sourceFile, span.start); - if (!isIdentifier17(node) || !isCallExpression9(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0) return; + if (!isIdentifier21(node) || !isCallExpression12(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0) return; const checker = program.getTypeChecker(); const symbol2 = checker.getSymbolAtLocation(node); const decl = symbol2 == null ? void 0 : symbol2.valueDeclaration; - if (!decl || !isParameter(decl) || !isNewExpression12(decl.parent.parent)) return; + if (!decl || !isParameter(decl) || !isNewExpression15(decl.parent.parent)) return; if (seen == null ? void 0 : seen.has(decl)) return; seen == null ? void 0 : seen.add(decl); const typeArguments = getEffectiveTypeArguments(decl.parent.parent); @@ -194393,9 +197378,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getEffectiveTypeArguments(node) { var _a3; if (isInJSFile(node)) { - if (isParenthesizedExpression4(node.parent)) { + if (isParenthesizedExpression6(node.parent)) { const jsDocType = (_a3 = getJSDocTypeTag(node.parent)) == null ? void 0 : _a3.typeExpression.type; - if (jsDocType && isTypeReferenceNode3(jsDocType) && isIdentifier17(jsDocType.typeName) && idText(jsDocType.typeName) === "Promise") { + if (jsDocType && isTypeReferenceNode3(jsDocType) && isIdentifier21(jsDocType.typeName) && idText(jsDocType.typeName) === "Promise") { return jsDocType.typeArguments; } } @@ -194583,7 +197568,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const compilerOptions = program.getCompilerOptions(); const checker = program.getTypeChecker(); const incompleteCompletionsCache = preferences.allowIncompleteCompletions ? (_a3 = host.getIncompleteCompletionsCache) == null ? void 0 : _a3.call(host) : void 0; - if (incompleteCompletionsCache && completionKind === 3 && previousToken && isIdentifier17(previousToken)) { + if (incompleteCompletionsCache && completionKind === 3 && previousToken && isIdentifier21(previousToken)) { const incompleteContinuation = continuePreviousIncompleteResponse(incompleteCompletionsCache, sourceFile, previousToken, program, host, preferences, cancellationToken, position); if (incompleteContinuation) { return incompleteContinuation; @@ -194761,7 +197746,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (getJSDocParameterTags(param).length) { return void 0; } - if (isIdentifier17(param.name)) { + if (isIdentifier21(param.name)) { const tabstopCounter = { tabstop: 1 }; const paramName = param.name.text; let displayText = getJSDocParamAnnotation( @@ -194864,7 +197849,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return patternWorker(path, pattern, initializer3, dotDotDotToken, { tabstop: 1 }); function patternWorker(path2, pattern2, initializer22, dotDotDotToken2, counter) { - if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) { + if (isObjectBindingPattern2(pattern2) && !dotDotDotToken2) { const oldTabstop = counter.tabstop; const childCounter = { tabstop: oldTabstop }; const rootParam = getJSDocParamAnnotation( @@ -194912,7 +197897,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ]; } function elementWorker(path2, element, counter) { - if (!element.propertyName && isIdentifier17(element.name) || isIdentifier17(element.name)) { + if (!element.propertyName && isIdentifier21(element.name) || isIdentifier21(element.name)) { const propertyName = element.propertyName ? tryGetTextOfPropertyName(element.propertyName) : element.name.text; if (!propertyName) { return void 0; @@ -195293,7 +198278,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; case 197: const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); - return exp && (isIdentifier17(exp) ? exp : factory.createParenthesizedExpression(exp)); + return exp && (isIdentifier21(exp) ? exp : factory.createParenthesizedExpression(exp)); case 187: return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); case 206: @@ -195302,7 +198287,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } function entityNameToExpression(entityName, languageVersion, quotePreference) { - if (isIdentifier17(entityName)) { + if (isIdentifier21(entityName)) { return entityName; } const unescapedName = unescapeLeadingUnderscores(entityName.right.escapedText); @@ -195462,7 +198447,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} hasAction = true; } if (completionKind === 0 && contextToken && ((_a3 = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a3.kind) !== 28) { - if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment3(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment6)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment3(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { + if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment5(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment8)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment5(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { source = "ObjectLiteralMemberWithComma/"; hasAction = true; } @@ -195737,7 +198722,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isModifier(node)) { return node.kind; } - if (isIdentifier17(node)) { + if (isIdentifier21(node)) { const originalKeywordKind = identifierToKeywordKind(node); if (originalKeywordKind && isModifierKind(originalKeywordKind)) { return originalKeywordKind; @@ -196182,7 +199167,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function shouldIncludeSymbol(symbol2, symbolToSortTextMap2) { var _a3; let allFlags = symbol2.flags; - if (location.parent && isExportAssignment2(location.parent)) { + if (location.parent && isExportAssignment3(location.parent)) { return true; } if (closestSymbolDeclaration && tryCast(closestSymbolDeclaration, isVariableDeclaration4)) { @@ -196513,7 +199498,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} host, program, formatContext, - previousToken && isIdentifier17(previousToken) ? previousToken.getStart(sourceFile) : position, + previousToken && isIdentifier21(previousToken) ? previousToken.getStart(sourceFile) : position, preferences, cancellationToken ); @@ -196565,7 +199550,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return isJsxExpression(parent2) && !isJsxElement(parent2.parent) && !isJsxFragment(parent2.parent) ? checker.getContextualTypeForJsxAttribute(parent2.parent) : void 0; default: const argInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(previousToken, position, sourceFile, checker); - return argInfo ? checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression2(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? ( + return argInfo ? checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression4(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? ( // completion at `x ===/**/` should be for the right side checker.getTypeAtLocation(parent2.left) ) : checker.getContextualType( @@ -196701,7 +199686,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} propertyAccessToConvert = parent2; node = propertyAccessToConvert.expression; const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); - if (nodeIsMissing(leftmostAccessExpression) || (isCallExpression9(node) || isFunctionLike(node)) && node.end === contextToken.pos && node.getChildCount(sourceFile) && last(node.getChildren(sourceFile)).kind !== 22) { + if (nodeIsMissing(leftmostAccessExpression) || (isCallExpression12(node) || isFunctionLike(node)) && node.end === contextToken.pos && node.getChildCount(sourceFile) && last(node.getChildren(sourceFile)).kind !== 22) { return void 0; } break; @@ -196887,7 +199872,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const isImportType = isLiteralImportTypeNode(node); const isTypeLocation = isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); - if (isEntityName(node) || isImportType || isPropertyAccessExpression10(node)) { + if (isEntityName(node) || isImportType || isPropertyAccessExpression12(node)) { const isNamespaceName = isModuleDeclaration(node.parent); if (isNamespaceName) { isNewIdentifierLocation = true; @@ -197090,7 +200075,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getLeftMostName(e) { - return isIdentifier17(e) ? e : isPropertyAccessExpression10(e) ? getLeftMostName(e.expression) : void 0; + return isIdentifier21(e) ? e : isPropertyAccessExpression12(e) ? getLeftMostName(e.expression) : void 0; } function tryGetGlobalSymbols() { const result = tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() || tryGetObjectLikeCompletionSymbols() || tryGetImportCompletionSymbols() || tryGetImportOrExportClauseCompletionSymbols() || tryGetImportAttributesCompletionSymbols() || tryGetLocalNamedExportCompletionSymbols() || tryGetConstructorCompletion() || tryGetClassLikeCompletionSymbols() || tryGetJsxCompletionSymbols() || (getGlobalCompletions(), 1); @@ -197228,7 +200213,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } flags |= 1; const isAfterTypeOnlyImportSpecifierModifier = previousToken === contextToken && importStatementCompletion; - const lowerCaseTokenText = isAfterTypeOnlyImportSpecifierModifier ? "" : previousToken && isIdentifier17(previousToken) ? previousToken.text.toLowerCase() : ""; + const lowerCaseTokenText = isAfterTypeOnlyImportSpecifierModifier ? "" : previousToken && isIdentifier21(previousToken) ? previousToken.text.toLowerCase() : ""; const moduleSpecifierCache = (_a3 = host.getModuleSpecifierCache) == null ? void 0 : _a3.call(host); const exportInfo = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken); const packageJsonAutoImportProvider = (_b = host.getPackageJsonAutoImportProvider) == null ? void 0 : _b.call(host); @@ -197640,7 +200625,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function tryGetLocalNamedExportCompletionSymbols() { var _a3; - const namedExports = contextToken && (contextToken.kind === 19 || contextToken.kind === 28) ? tryCast(contextToken.parent, isNamedExports) : void 0; + const namedExports = contextToken && (contextToken.kind === 19 || contextToken.kind === 28) ? tryCast(contextToken.parent, isNamedExports2) : void 0; if (!namedExports) { return 0; } @@ -197702,7 +200687,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return 1; } function isConstructorParameterCompletion(node2) { - return !!node2.parent && isParameter(node2.parent) && isConstructorDeclaration(node2.parent.parent) && (isParameterPropertyModifier(node2.kind) || isDeclarationName(node2)); + return !!node2.parent && isParameter(node2.parent) && isConstructorDeclaration2(node2.parent.parent) && (isParameterPropertyModifier(node2.kind) || isDeclarationName(node2)); } function tryGetConstructorLikeCompletionContainer(contextToken2) { if (contextToken2) { @@ -197710,7 +200695,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (contextToken2.kind) { case 21: case 28: - return isConstructorDeclaration(contextToken2.parent) ? contextToken2.parent : void 0; + return isConstructorDeclaration2(contextToken2.parent) ? contextToken2.parent : void 0; default: if (isConstructorParameterCompletion(contextToken2)) { return parent2.parent; @@ -197826,7 +200811,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 125: case 123: case 124: - return containingNodeKind === 170 && !isConstructorDeclaration(parent2.parent); + return containingNodeKind === 170 && !isConstructorDeclaration2(parent2.parent); case 130: return containingNodeKind === 277 || containingNodeKind === 282 || containingNodeKind === 275; case 139: @@ -197864,7 +200849,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } if (isConstructorParameterCompletion(contextToken2)) { - if (!isIdentifier17(contextToken2) || isParameterPropertyModifier(keywordForNode(contextToken2)) || isCurrentlyEditingNode(contextToken2)) { + if (!isIdentifier21(contextToken2) || isParameterPropertyModifier(keywordForNode(contextToken2)) || isCurrentlyEditingNode(contextToken2)) { return false; } } @@ -197902,7 +200887,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return true; } } - return isDeclarationName(contextToken2) && !isShorthandPropertyAssignment3(contextToken2.parent) && !isJsxAttribute(contextToken2.parent) && !((isClassLike(contextToken2.parent) || isInterfaceDeclaration2(contextToken2.parent) || isTypeParameterDeclaration(contextToken2.parent)) && (contextToken2 !== previousToken || position > previousToken.end)); + return isDeclarationName(contextToken2) && !isShorthandPropertyAssignment5(contextToken2.parent) && !isJsxAttribute(contextToken2.parent) && !((isClassLike(contextToken2.parent) || isInterfaceDeclaration2(contextToken2.parent) || isTypeParameterDeclaration(contextToken2.parent)) && (contextToken2 !== previousToken || position > previousToken.end)); } function isPreviousPropertyDeclarationTerminated(contextToken2, position2) { return contextToken2.kind !== 64 && (contextToken2.kind === 27 || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); @@ -197934,7 +200919,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continue; } let existingName; - if (isSpreadAssignment3(m)) { + if (isSpreadAssignment5(m)) { setMembersDeclaredBySpreadAssignment(m, membersDeclaredBySpreadAssignment); } else if (isBindingElement(m) && m.propertyName) { if (m.propertyName.kind === 80) { @@ -198059,36 +201044,36 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 19: // const x = { | case 28: - if (isObjectLiteralExpression6(parent2) || isObjectBindingPattern(parent2)) { + if (isObjectLiteralExpression9(parent2) || isObjectBindingPattern2(parent2)) { return parent2; } break; case 42: - return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression6) : void 0; + return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression9) : void 0; case 134: - return tryCast(parent2.parent, isObjectLiteralExpression6); + return tryCast(parent2.parent, isObjectLiteralExpression9); case 80: - if (contextToken.text === "async" && isShorthandPropertyAssignment3(contextToken.parent)) { + if (contextToken.text === "async" && isShorthandPropertyAssignment5(contextToken.parent)) { return contextToken.parent.parent; } else { - if (isObjectLiteralExpression6(contextToken.parent.parent) && (isSpreadAssignment3(contextToken.parent) || isShorthandPropertyAssignment3(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) { + if (isObjectLiteralExpression9(contextToken.parent.parent) && (isSpreadAssignment5(contextToken.parent) || isShorthandPropertyAssignment5(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) { return contextToken.parent.parent; } - const ancestorNode2 = findAncestor(parent2, isPropertyAssignment6); - if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression6(ancestorNode2.parent)) { + const ancestorNode2 = findAncestor(parent2, isPropertyAssignment8); + if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression9(ancestorNode2.parent)) { return ancestorNode2.parent; } } break; default: - if (((_a3 = parent2.parent) == null ? void 0 : _a3.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression6(parent2.parent.parent)) { + if (((_a3 = parent2.parent) == null ? void 0 : _a3.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression9(parent2.parent.parent)) { return parent2.parent.parent; } - if (isSpreadAssignment3(parent2) && isObjectLiteralExpression6(parent2.parent)) { + if (isSpreadAssignment5(parent2) && isObjectLiteralExpression9(parent2.parent)) { return parent2.parent; } - const ancestorNode = findAncestor(parent2, isPropertyAssignment6); - if (contextToken.kind !== 59 && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression6(ancestorNode.parent)) { + const ancestorNode = findAncestor(parent2, isPropertyAssignment8); + if (contextToken.kind !== 59 && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression9(ancestorNode.parent)) { return ancestorNode.parent; } } @@ -198255,7 +201240,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return kind === 134 || kind === 135 || kind === 160 || kind === 130 || kind === 152 || kind === 156 || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); } function keywordForNode(node) { - return isIdentifier17(node) ? identifierToKeywordKind(node) ?? 0 : node.kind; + return isIdentifier21(node) ? identifierToKeywordKind(node) ?? 0 : node.kind; } function getContextualKeywords(contextToken, position) { const entries = []; @@ -198264,7 +201249,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const parent2 = contextToken.parent; const tokenLine = file2.getLineAndCharacterOfPosition(contextToken.end).line; const currentLine = file2.getLineAndCharacterOfPosition(position).line; - if ((isImportDeclaration5(parent2) || isExportDeclaration(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) { + if ((isImportDeclaration6(parent2) || isExportDeclaration2(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) { entries.push({ name: tokenToString( 132 @@ -198336,7 +201321,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } if (!contextToken) return void 0; - if (location.kind === 137 || isIdentifier17(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { + if (location.kind === 137 || isIdentifier21(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { return findAncestor(contextToken, isClassLike); } switch (contextToken.kind) { @@ -198356,7 +201341,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return location; } const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword; - return isValidKeyword(contextToken.kind) || contextToken.kind === 42 || isIdentifier17(contextToken) && isValidKeyword( + return isValidKeyword(contextToken.kind) || contextToken.kind === 42 || isIdentifier21(contextToken) && isValidKeyword( identifierToKeywordKind(contextToken) ?? 0 /* Unknown */ ) ? contextToken.parent.parent : void 0; @@ -198369,14 +201354,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const parent2 = node.parent; switch (node.kind) { case 19: - if (isTypeLiteralNode(parent2)) { + if (isTypeLiteralNode2(parent2)) { return parent2; } break; case 27: case 28: case 80: - if (parent2.kind === 172 && isTypeLiteralNode(parent2.parent)) { + if (parent2.kind === 172 && isTypeLiteralNode2(parent2.parent)) { return parent2.parent; } break; @@ -198414,7 +201399,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case "#": return !!contextToken && isPrivateIdentifier(contextToken) && !!getContainingClass(contextToken); case "<": - return !!contextToken && contextToken.kind === 30 && (!isBinaryExpression2(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); + return !!contextToken && contextToken.kind === 30 && (!isBinaryExpression4(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); case "/": return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 && isJsxClosingElement(contextToken.parent)); case " ": @@ -198471,7 +201456,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return type; } const parent2 = walkUpParenthesizedExpressions(node.parent); - if (isBinaryExpression2(parent2) && parent2.operatorToken.kind === 64 && node === parent2.left) { + if (isBinaryExpression4(parent2) && parent2.operatorToken.kind === 64 && node === parent2.left) { return typeChecker.getTypeAtLocation(parent2); } if (isExpression(parent2)) { @@ -198488,7 +201473,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} isKeywordOnlyCompletion, keywordCompletion, isNewIdentifierLocation: !!(candidate || keywordCompletion === 156), - isTopLevelTypeOnly: !!((_b = (_a3 = tryCast(candidate, isImportDeclaration5)) == null ? void 0 : _a3.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly), + isTopLevelTypeOnly: !!((_b = (_a3 = tryCast(candidate, isImportDeclaration6)) == null ? void 0 : _a3.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly), couldBeTypeOnlyImportSpecifier: !!candidate && couldBeTypeOnlyImportSpecifier(candidate, contextToken), replacementSpan: getSingleLineReplacementSpanForImportCompletionNode(candidate) }; @@ -198496,7 +201481,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const parent2 = contextToken.parent; if (isImportEqualsDeclaration(parent2)) { const lastToken = parent2.getLastToken(sourceFile); - if (isIdentifier17(contextToken) && lastToken !== contextToken) { + if (isIdentifier21(contextToken) && lastToken !== contextToken) { keywordCompletion = 161; isKeywordOnlyCompletion = true; return void 0; @@ -198507,7 +201492,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (couldBeTypeOnlyImportSpecifier(parent2, contextToken) && canCompleteFromNamedBindings(parent2.parent)) { return parent2; } - if (isNamedImports3(parent2) || isNamespaceImport4(parent2)) { + if (isNamedImports4(parent2) || isNamespaceImport5(parent2)) { if (!parent2.parent.isTypeOnly && (contextToken.kind === 19 || contextToken.kind === 102 || contextToken.kind === 28)) { keywordCompletion = 156; } @@ -198521,7 +201506,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return void 0; } - if (isExportDeclaration(parent2) && contextToken.kind === 42 || isNamedExports(parent2) && contextToken.kind === 20) { + if (isExportDeclaration2(parent2) && contextToken.kind === 42 || isNamedExports2(parent2) && contextToken.kind === 20) { isKeywordOnlyCompletion = true; keywordCompletion = 161; return void 0; @@ -198530,7 +201515,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} keywordCompletion = 156; return contextToken; } - if (isImportKeyword(contextToken) && isImportDeclaration5(parent2)) { + if (isImportKeyword(contextToken) && isImportDeclaration6(parent2)) { keywordCompletion = 156; return isModuleSpecifierMissingOrEmpty(parent2.moduleSpecifier) ? parent2 : void 0; } @@ -198540,7 +201525,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getSingleLineReplacementSpanForImportCompletionNode(node) { var _a3; if (!node) return void 0; - const top = findAncestor(node, or(isImportDeclaration5, isImportEqualsDeclaration, isJSDocImportTag)) ?? node; + const top = findAncestor(node, or(isImportDeclaration6, isImportEqualsDeclaration, isJSDocImportTag)) ?? node; const sourceFile = top.getSourceFile(); if (rangeIsOnSingleLine(top, sourceFile)) { return createTextSpanFromNode(top, sourceFile); @@ -198561,7 +201546,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getPotentiallyInvalidImportSpecifier(namedBindings) { var _a3; return find( - (_a3 = tryCast(namedBindings, isNamedImports3)) == null ? void 0 : _a3.elements, + (_a3 = tryCast(namedBindings, isNamedImports4)) == null ? void 0 : _a3.elements, (e) => { var _a22; return !e.propertyName && isStringANonContextualKeyword(e.name.text) && ((_a22 = findPrecedingToken(e.name.pos, namedBindings.getSourceFile(), namedBindings)) == null ? void 0 : _a22.kind) !== 28; @@ -198575,7 +201560,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!isModuleSpecifierMissingOrEmpty(namedBindings.parent.parent.moduleSpecifier) || namedBindings.parent.name) { return false; } - if (isNamedImports3(namedBindings)) { + if (isNamedImports4(namedBindings)) { const invalidNamedImport = getPotentiallyInvalidImportSpecifier(namedBindings); const validImports = invalidNamedImport ? namedBindings.elements.indexOf(invalidNamedImport) : namedBindings.elements.length; return validImports < 2; @@ -198611,7 +201596,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } function isArrowFunctionBody(node) { - return node.parent && isArrowFunction5(node.parent) && (node.parent.body === node || // const a = () => /**/; + return node.parent && isArrowFunction6(node.parent) && (node.parent.body === node || // const a = () => /**/; node.kind === 39); } function symbolCanBeReferencedAtTypeLocation(symbol2, checker, seenModules = /* @__PURE__ */ new Set()) { @@ -198863,7 +201848,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return fromUnionableLiteralType(grandParent); } case 304: - if (isObjectLiteralExpression6(parent2.parent) && parent2.name === node) { + if (isObjectLiteralExpression9(parent2.parent) && parent2.name === node) { return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); } return fromContextualType() || fromContextualType( @@ -198986,7 +201971,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getAlreadyUsedTypesInStringLiteralUnion(union2, current) { - return mapDefined(union2.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral10(type.literal) ? type.literal.text : void 0); + return mapDefined(union2.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral12(type.literal) ? type.literal.text : void 0); } function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { let isNewIdentifier = false; @@ -199157,7 +202142,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fragment = "." + directorySeparator; } fragment = ensureTrailingDirectorySeparator(fragment); - const absolutePath = resolvePath(scriptDirectory, fragment); + const absolutePath = resolvePath2(scriptDirectory, fragment); const baseDirectory = hasTrailingDirectorySeparator(absolutePath) ? absolutePath : getDirectoryPath(absolutePath); if (!moduleSpecifierIsRelative) { const packageJsonPath = findPackageJson(baseDirectory, host); @@ -199522,7 +202507,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (parsed === void 0 || isString(parsed)) { return void 0; } - const normalizedPrefix = resolvePath(parsed.prefix); + const normalizedPrefix = resolvePath2(parsed.prefix); const normalizedPrefixDirectory = hasTrailingDirectorySeparator(parsed.prefix) ? normalizedPrefix : getDirectoryPath(normalizedPrefix); const normalizedPrefixBase = hasTrailingDirectorySeparator(parsed.prefix) ? "" : getBaseFileName(normalizedPrefix); const fragmentHasPath = containsSlash(fragment); @@ -199725,7 +202710,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return fragment.includes(directorySeparator); } function isRequireCallArgument(node) { - return isCallExpression9(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier17(node.parent.expression) && node.parent.expression.escapedText === "require"; + return isCallExpression12(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier21(node.parent.expression) && node.parent.expression.escapedText === "require"; } var ts_FindAllReferences_exports = {}; __export2(ts_FindAllReferences_exports, { @@ -199980,7 +202965,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } if (decl.kind === 279) { - if (decl.exportClause && isNamedExports(decl.exportClause)) { + if (decl.exportClause && isNamedExports2(decl.exportClause)) { searchForNamedImport(decl.exportClause); } return; @@ -200037,9 +203022,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function findNamespaceReExports(sourceFileLike, name, checker) { const namespaceImportSymbol = checker.getSymbolAtLocation(name); return !!forEachPossibleImportOrExportStatement(sourceFileLike, (statement) => { - if (!isExportDeclaration(statement)) return; + if (!isExportDeclaration2(statement)) return; const { exportClause, moduleSpecifier } = statement; - return !moduleSpecifier && exportClause && isNamedExports(exportClause) && exportClause.elements.some((element) => checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol); + return !moduleSpecifier && exportClause && isNamedExports2(exportClause) && exportClause.elements.some((element) => checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol); }); } function findModuleReferences(program, sourceFiles, searchModuleSymbol) { @@ -200105,7 +203090,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 279: case 273: { const decl = statement; - if (decl.moduleSpecifier && isStringLiteral10(decl.moduleSpecifier)) { + if (decl.moduleSpecifier && isStringLiteral12(decl.moduleSpecifier)) { action(decl, decl.moduleSpecifier); } break; @@ -200129,7 +203114,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const grandparent = parent2.parent; if (symbol2.exportSymbol) { if (parent2.kind === 212) { - return ((_a3 = symbol2.declarations) == null ? void 0 : _a3.some((d) => d === parent2)) && isBinaryExpression2(grandparent) ? getSpecialPropertyExport( + return ((_a3 = symbol2.declarations) == null ? void 0 : _a3.some((d) => d === parent2)) && isBinaryExpression4(grandparent) ? getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ false @@ -200159,17 +203144,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} 0 /* Named */ ); - } else if (isExportAssignment2(parent2)) { + } else if (isExportAssignment3(parent2)) { return getExportAssignmentExport(parent2); - } else if (isExportAssignment2(grandparent)) { + } else if (isExportAssignment3(grandparent)) { return getExportAssignmentExport(grandparent); - } else if (isBinaryExpression2(parent2)) { + } else if (isBinaryExpression4(parent2)) { return getSpecialPropertyExport( parent2, /*useLhsSymbol*/ true ); - } else if (isBinaryExpression2(grandparent)) { + } else if (isBinaryExpression4(grandparent)) { return getSpecialPropertyExport( grandparent, /*useLhsSymbol*/ @@ -200237,9 +203222,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return checker.getImmediateAliasedSymbol(importedSymbol); } const decl = Debug.checkDefined(importedSymbol.valueDeclaration); - if (isExportAssignment2(decl)) { + if (isExportAssignment3(decl)) { return (_a3 = tryCast(decl.expression, canHaveSymbol)) == null ? void 0 : _a3.symbol; - } else if (isBinaryExpression2(decl)) { + } else if (isBinaryExpression4(decl)) { return (_b = tryCast(decl.right, canHaveSymbol)) == null ? void 0 : _b.symbol; } else if (isSourceFile(decl)) { return decl.symbol; @@ -200249,7 +203234,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getExportNode(parent2, node) { const declaration = isVariableDeclaration4(parent2) ? parent2 : isBindingElement(parent2) ? walkUpBindingElementsAndPatterns(parent2) : void 0; if (declaration) { - return parent2.name !== node ? void 0 : isCatchClause(declaration.parent) ? void 0 : isVariableStatement8(declaration.parent.parent) ? declaration.parent.parent : void 0; + return parent2.name !== node ? void 0 : isCatchClause(declaration.parent) ? void 0 : isVariableStatement10(declaration.parent.parent) ? declaration.parent.parent : void 0; } else { return parent2; } @@ -200282,9 +203267,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} for (const declaration of symbol2.declarations) { if (isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) { return checker.getExportSpecifierLocalTargetSymbol(declaration) || symbol2; - } else if (isPropertyAccessExpression10(declaration) && isModuleExportsAccessExpression(declaration.expression) && !isPrivateIdentifier(declaration.name)) { + } else if (isPropertyAccessExpression12(declaration) && isModuleExportsAccessExpression(declaration.expression) && !isPrivateIdentifier(declaration.name)) { return checker.getSymbolAtLocation(declaration); - } else if (isShorthandPropertyAssignment3(declaration) && isBinaryExpression2(declaration.parent.parent) && getAssignmentDeclarationKind(declaration.parent.parent) === 2) { + } else if (isShorthandPropertyAssignment5(declaration) && isBinaryExpression4(declaration.parent.parent) && getAssignmentDeclarationKind(declaration.parent.parent) === 2) { return checker.getExportSpecifierLocalTargetSymbol(declaration.name); } } @@ -200346,9 +203331,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return getContextNode(node); } if (!node.parent) return void 0; - if (!isDeclaration(node.parent) && !isExportAssignment2(node.parent)) { + if (!isDeclaration(node.parent) && !isExportAssignment3(node.parent)) { if (isInJSFile(node)) { - const binaryExpression = isBinaryExpression2(node.parent) ? node.parent : isAccessExpression(node.parent) && isBinaryExpression2(node.parent.parent) && node.parent.parent.left === node.parent ? node.parent.parent : void 0; + const binaryExpression = isBinaryExpression4(node.parent) ? node.parent : isAccessExpression(node.parent) && isBinaryExpression4(node.parent.parent) && node.parent.parent.left === node.parent ? node.parent.parent : void 0; if (binaryExpression && getAssignmentDeclarationKind(binaryExpression) !== 0) { return getContextNode(binaryExpression); } @@ -200368,7 +203353,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return propertyName ? getContextNode(propertyName.parent) : void 0; } if (node.parent.name === node || // node is name of declaration, use parent - isConstructorDeclaration(node.parent) || isExportAssignment2(node.parent) || // Property name of the import export specifier or binding pattern, use parent + isConstructorDeclaration2(node.parent) || isExportAssignment3(node.parent) || // Property name of the import export specifier or binding pattern, use parent (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export node.kind === 90 && hasSyntacticModifier( node.parent, @@ -200383,7 +203368,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!node) return void 0; switch (node.kind) { case 261: - return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement8(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; + return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement10(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; case 209: return getContextNode(node.parent.parent); case 277: @@ -200405,7 +203390,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 304: case 305: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( - findAncestor(node.parent, (node2) => isBinaryExpression2(node2) || isForInOrOfStatement(node2)) + findAncestor(node.parent, (node2) => isBinaryExpression4(node2) || isForInOrOfStatement(node2)) ) : node; case 256: return { @@ -200450,7 +203435,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )); } function isDefinitionForReference(node) { - return node.kind === 90 || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 137 && isConstructorDeclaration(node.parent); + return node.kind === 90 || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 137 && isConstructorDeclaration2(node.parent); } function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) { const node = getTouchingPropertyName(sourceFile, position); @@ -200643,11 +203628,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getPrefixAndSuffixText(entry, originalNode, checker, quotePreference) { - if (entry.kind !== 0 && (isIdentifier17(originalNode) || isStringLiteralLike(originalNode))) { + if (entry.kind !== 0 && (isIdentifier21(originalNode) || isStringLiteralLike(originalNode))) { const { node, kind } = entry; const parent2 = node.parent; const name = originalNode.text; - const isShorthandAssignment = isShorthandPropertyAssignment3(parent2); + const isShorthandAssignment = isShorthandPropertyAssignment5(parent2); if (isShorthandAssignment || isObjectBindingElementWithoutPropertyName(parent2) && parent2.name === node && parent2.dotDotDotToken === void 0) { const prefixColon = { prefixText: name + ": " }; const suffixColon = { suffixText: ": " + name }; @@ -200659,7 +203644,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isShorthandAssignment) { const grandParent = parent2.parent; - if (isObjectLiteralExpression6(grandParent) && isBinaryExpression2(grandParent.parent) && isModuleExportsAccessExpression(grandParent.parent.left)) { + if (isObjectLiteralExpression9(grandParent) && isBinaryExpression4(grandParent.parent) && isModuleExportsAccessExpression(grandParent.parent.left)) { return prefixColon; } return suffixColon; @@ -200673,7 +203658,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return originalNode === entry.node || checker.getSymbolAtLocation(originalNode) === checker.getSymbolAtLocation(entry.node) ? { prefixText: name + " as " } : { suffixText: " as " + name }; } } - if (entry.kind !== 0 && isNumericLiteral3(entry.node) && isAccessExpression(entry.node.parent)) { + if (entry.kind !== 0 && isNumericLiteral4(entry.node) && isAccessExpression(entry.node.parent)) { const quote2 = getQuoteFromPreference(quotePreference); return { prefixText: quote2, suffixText: quote2 }; } @@ -200765,8 +203750,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isDeclarationOfSymbol(node, target) { var _a3; if (!target) return false; - const source = getDeclarationFromName(node) || (node.kind === 90 ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 137 && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); - const commonjsSource = source && isBinaryExpression2(source) ? source.left : void 0; + const source = getDeclarationFromName(node) || (node.kind === 90 ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 137 && isConstructorDeclaration2(node.parent) ? node.parent.parent : void 0); + const commonjsSource = source && isBinaryExpression4(source) ? source.left : void 0; return !!(source && ((_a3 = target.declarations) == null ? void 0 : _a3.some((d) => d === source || d === commonjsSource))); } function declarationIsWriteAccess(decl) { @@ -200855,7 +203840,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } const checker = program.getTypeChecker(); - const symbol2 = checker.getSymbolAtLocation(isConstructorDeclaration(node) && node.parent.name || node); + const symbol2 = checker.getSymbolAtLocation(isConstructorDeclaration2(node) && node.parent.name || node); if (!symbol2) { if (!options.implementations && isStringLiteralLike(node)) { if (isModuleSpecifierLike(node)) { @@ -201057,7 +204042,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} for (const decl of exported.declarations) { const sourceFile = decl.getSourceFile(); if (sourceFilesSet.has(sourceFile.fileName)) { - const node = isBinaryExpression2(decl) && isPropertyAccessExpression10(decl.left) ? decl.left.expression : isExportAssignment2(decl) ? Debug.checkDefined(findChildOfKind(decl, 95, sourceFile)) : getNameOfDeclaration(decl) || decl; + const node = isBinaryExpression4(decl) && isPropertyAccessExpression12(decl.left) ? decl.left.expression : isExportAssignment3(decl) ? Debug.checkDefined(findChildOfKind(decl, 95, sourceFile)) : getNameOfDeclaration(decl) || decl; references.push(nodeEntry(node)); } } @@ -201193,7 +204178,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (symbol2.flags & 33554432) return void 0; Debug.fail(`Unexpected symbol at ${Debug.formatSyntaxKind(node.kind)}: ${Debug.formatSymbol(symbol2)}`); } - return isTypeLiteralNode(decl.parent) && isUnionTypeNode2(decl.parent.parent) ? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol2.name) : void 0; + return isTypeLiteralNode2(decl.parent) && isUnionTypeNode2(decl.parent.parent) ? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol2.name) : void 0; }); } let SpecialSearchKind; @@ -201329,15 +204314,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} cb(importLocation); } for (const singleReference of singleReferences) { - if (isIdentifier17(singleReference) && isImportTypeNode(singleReference.parent)) { + if (isIdentifier21(singleReference) && isImportTypeNode(singleReference.parent)) { cb(singleReference); } } for (const indirectUser of indirectUsers) { for (const node of getPossibleSymbolReferenceNodes(indirectUser, isDefaultExport ? "default" : exportName)) { const symbol2 = checker.getSymbolAtLocation(node); - const hasExportAssignmentDeclaration = some(symbol2 == null ? void 0 : symbol2.declarations, (d) => tryCast(d, isExportAssignment2) ? true : false); - if (isIdentifier17(node) && !isImportOrExportSpecifier(node.parent) && (symbol2 === exportSymbol || hasExportAssignmentDeclaration)) { + const hasExportAssignmentDeclaration = some(symbol2 == null ? void 0 : symbol2.declarations, (d) => tryCast(d, isExportAssignment3) ? true : false); + if (isIdentifier21(node) && !isImportOrExportSpecifier(node.parent) && (symbol2 === exportSymbol || hasExportAssignmentDeclaration)) { cb(node); } } @@ -201347,7 +204332,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function shouldAddSingleReference(singleRef, state) { if (!hasMatchingMeaning(singleRef, state)) return false; if (state.options.use !== 2) return true; - if (!isIdentifier17(singleRef) && !isImportOrExportSpecifier(singleRef.parent)) return false; + if (!isIdentifier21(singleRef) && !isImportOrExportSpecifier(singleRef.parent)) return false; return !(isImportOrExportSpecifier(singleRef.parent) && moduleExportNameIsDefault(singleRef)); } function searchForImportedSymbol(symbol2, state) { @@ -201410,7 +204395,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } scope = container; - if (isFunctionExpression4(scope)) { + if (isFunctionExpression5(scope)) { let next; while (next = getNextJSDocCommentLocation(scope)) { scope = next; @@ -201427,7 +204412,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const symbol2 = isParameterPropertyDeclaration(definition.parent, definition.parent.parent) ? first(checker.getSymbolsOfParameterPropertyDeclaration(definition.parent, definition.text)) : checker.getSymbolAtLocation(definition); if (!symbol2) return void 0; for (const token of getPossibleSymbolReferenceNodes(sourceFile, symbol2.name, searchContainer)) { - if (!isIdentifier17(token) || token === definition || token.escapedText !== definition.escapedText) continue; + if (!isIdentifier21(token) || token === definition || token.escapedText !== definition.escapedText) continue; const referenceSymbol = checker.getSymbolAtLocation(token); if (referenceSymbol === symbol2 || checker.getShorthandAssignmentValueSymbol(token.parent) === symbol2 || isExportSpecifier(token.parent) && getLocalSymbolForExportSpecifier(token, referenceSymbol, token.parent, checker) === symbol2) { const res = cb(token); @@ -201460,13 +204445,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } Core2.getTopMostDeclarationNamesInFile = getTopMostDeclarationNamesInFile; function someSignatureUsage(signature, sourceFiles, checker, cb) { - if (!signature.name || !isIdentifier17(signature.name)) return false; + if (!signature.name || !isIdentifier21(signature.name)) return false; const symbol2 = Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); for (const sourceFile of sourceFiles) { for (const name of getPossibleSymbolReferenceNodes(sourceFile, symbol2.name)) { - if (!isIdentifier17(name) || name === signature.name || name.escapedText !== signature.name.escapedText) continue; + if (!isIdentifier21(name) || name === signature.name || name.escapedText !== signature.name.escapedText) continue; const called = climbPastPropertyAccess(name); - const call = isCallExpression9(called.parent) && called.parent.expression === called ? called.parent : void 0; + const call = isCallExpression12(called.parent) && called.parent.expression === called ? called.parent : void 0; const referenceSymbol = checker.getSymbolAtLocation(name); if (referenceSymbol && checker.getRootSymbols(referenceSymbol).some((s) => s === symbol2)) { if (cb(name, call)) { @@ -201532,7 +204517,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 15: case 11: { const str = node; - return str.text.length === searchSymbolName.length && (isLiteralNameOfPropertyDeclarationOrIndexAccess(str) || isNameOfModuleDeclaration(node) || isExpressionOfExternalModuleImportEqualsDeclaration(node) || isCallExpression9(node.parent) && isBindableObjectDefinePropertyCall(node.parent) && node.parent.arguments[1] === node || isImportOrExportSpecifier(node.parent)); + return str.text.length === searchSymbolName.length && (isLiteralNameOfPropertyDeclarationOrIndexAccess(str) || isNameOfModuleDeclaration(node) || isExpressionOfExternalModuleImportEqualsDeclaration(node) || isCallExpression12(node.parent) && isBindableObjectDefinePropertyCall(node.parent) && node.parent.arguments[1] === node || isImportOrExportSpecifier(node.parent)); } case 9: return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length; @@ -201865,7 +204850,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { addIfImplementation(body); } - } else if (isAssertionExpression(typeHavingNode) || isSatisfiesExpression3(typeHavingNode)) { + } else if (isAssertionExpression(typeHavingNode) || isSatisfiesExpression5(typeHavingNode)) { addIfImplementation(typeHavingNode.expression); } } @@ -201874,7 +204859,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getContainingNodeIfInHeritageClause(node) { - return isIdentifier17(node) || isPropertyAccessExpression10(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration2)) : void 0; + return isIdentifier21(node) || isPropertyAccessExpression12(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration2)) : void 0; } function isImplementationExpression(node) { switch (node.kind) { @@ -202041,7 +205026,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); } } else { - return isNoSubstitutionTemplateLiteral2(ref) && !rangeIsOnSingleLine(ref, sourceFile) ? void 0 : nodeEntry( + return isNoSubstitutionTemplateLiteral4(ref) && !rangeIsOnSingleLine(ref, sourceFile) ? void 0 : nodeEntry( ref, 2 /* StringLiteral */ @@ -202056,7 +205041,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }]; } function isStringLiteralPropertyReference(node, checker) { - if (isPropertySignature2(node.parent)) { + if (isPropertySignature3(node.parent)) { return checker.getPropertyOfType(checker.getTypeAtLocation(node.parent.parent), node.text); } } @@ -202332,7 +205317,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const { parent: parent2 } = node; const typeChecker = program.getTypeChecker(); - if (node.kind === 164 || isIdentifier17(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { + if (node.kind === 164 || isIdentifier21(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { const def = getDefinitionFromOverriddenMember(typeChecker, node); if (def !== void 0 || node.kind !== 164) { return def || emptyArray; @@ -202431,8 +205416,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration, failedAliasResolution); let declarationFilter = (d) => d !== calledDeclaration; if (typeChecker.getRootSymbols(symbol2).some((s) => symbolMatchesSignature(s, calledDeclaration))) { - if (!isConstructorDeclaration(calledDeclaration)) return [sigInfo]; - declarationFilter = (d) => d !== calledDeclaration && (isClassDeclaration3(d) || isClassExpression(d)); + if (!isConstructorDeclaration2(calledDeclaration)) return [sigInfo]; + declarationFilter = (d) => d !== calledDeclaration && (isClassDeclaration5(d) || isClassExpression(d)); } const defs = getDefinitionFromSymbol(typeChecker, symbol2, node, failedAliasResolution, declarationFilter) || emptyArray; return node.kind === 108 ? [sigInfo, ...defs] : [...defs, sigInfo]; @@ -202450,7 +205435,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )) : emptyArray; return concatenate(definitions, getDefinitionFromObjectLiteralElement(typeChecker, node)); } - if (isPropertyName(node) && isBindingElement(parent2) && isObjectBindingPattern(parent2.parent) && node === (parent2.propertyName || parent2.name)) { + if (isPropertyName(node) && isBindingElement(parent2) && isObjectBindingPattern2(parent2.parent) && node === (parent2.propertyName || parent2.name)) { const name = getNameFromPropertyName(node); const type = typeChecker.getTypeAtLocation(parent2.parent); return name === void 0 ? emptyArray : flatMap(type.isUnion() ? type.types : [type], (t) => { @@ -202532,7 +205517,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let resolution; if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && (resolution = program.getResolvedModuleFromModuleSpecifier(node, sourceFile))) { const verifiedFileName = (_b = resolution.resolvedModule) == null ? void 0 : _b.resolvedFileName; - const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text); + const fileName = verifiedFileName || resolvePath2(getDirectoryPath(sourceFile.fileName), node.text); return { file: program.getSourceFile(fileName), fileName, @@ -202747,7 +205732,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!signatureDeclarations) { return void 0; } - const declarations = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike); + const declarations = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration2 : isFunctionLike); const declarationsWithBody = declarations.filter((d) => !!d.body); return declarations.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol2, node)) : [createDefinitionInfo( last(declarations), @@ -202935,7 +205920,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} visitVariableLikeDeclaration(node); } else if (preferences.includeInlayEnumMemberValueHints && isEnumMember(node)) { visitEnumMember(node); - } else if (shouldShowParameterNameHints(preferences) && (isCallExpression9(node) || isNewExpression12(node))) { + } else if (shouldShowParameterNameHints(preferences) && (isCallExpression12(node) || isNewExpression15(node))) { visitCallOrNewExpression(node); } else { if (preferences.includeInlayFunctionParameterTypeHints && isFunctionLikeDeclaration(node) && hasContextSensitiveParameters(node)) { @@ -202948,7 +205933,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return forEachChild22(node, visitor); } function isSignatureSupportingReturnAnnotation(node) { - return isArrowFunction5(node) || isFunctionExpression4(node) || isFunctionDeclaration2(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); + return isArrowFunction6(node) || isFunctionExpression5(node) || isFunctionDeclaration3(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); } function addParameterHints(text, parameter, position, isFirstVariadicArgument) { let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`; @@ -203033,7 +206018,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continue; } let spreadArgs = 0; - if (isSpreadElement3(arg)) { + if (isSpreadElement5(arg)) { const spreadType = checker.getTypeAtLocation(arg.expression); if (checker.isTupleType(spreadType)) { const { elementFlags, fixedLength } = spreadType.target; @@ -203064,10 +206049,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function identifierOrAccessExpressionPostfixMatchesParameterName(expr, parameterName) { - if (isIdentifier17(expr)) { + if (isIdentifier21(expr)) { return expr.text === parameterName; } - if (isPropertyAccessExpression10(expr)) { + if (isPropertyAccessExpression12(expr)) { return expr.name.text === parameterName; } return false; @@ -203087,7 +206072,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} switch (node.kind) { case 225: { const operand = node.operand; - return isLiteralExpression(operand) || isIdentifier17(operand) && isInfinityOrNaNString(operand.escapedText); + return isLiteralExpression(operand) || isIdentifier21(operand) && isInfinityOrNaNString(operand.escapedText); } case 112: case 97: @@ -203103,7 +206088,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return isLiteralExpression(node); } function visitFunctionDeclarationLikeForReturnType(decl) { - if (isArrowFunction5(decl)) { + if (isArrowFunction6(decl)) { if (!findChildOfKind(decl, 21, file2)) { return; } @@ -203262,7 +206247,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } switch (node2.kind) { case 80: - Debug.assertNode(node2, isIdentifier17); + Debug.assertNode(node2, isIdentifier21); const identifierText = idText(node2); const name = node2.symbol && node2.symbol.declarations && node2.symbol.declarations.length && getNameOfDeclaration(node2.symbol.declarations[0]); if (name) { @@ -203347,7 +206332,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } break; case 188: - Debug.assertNode(node2, isTypeLiteralNode); + Debug.assertNode(node2, isTypeLiteralNode2); parts.push({ text: "{" }); if (node2.members.length) { parts.push({ text: " " }); @@ -203496,7 +206481,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } break; case 172: - Debug.assertNode(node2, isPropertySignature2); + Debug.assertNode(node2, isPropertySignature3); if ((_a3 = node2.modifiers) == null ? void 0 : _a3.length) { visitDisplayPartList(node2.modifiers, " "); parts.push({ text: " " }); @@ -203560,7 +206545,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} parts.push({ text: "]" }); break; case 207: - Debug.assertNode(node2, isObjectBindingPattern); + Debug.assertNode(node2, isObjectBindingPattern2); parts.push({ text: "{" }); if (node2.elements.length) { parts.push({ text: " " }); @@ -203574,7 +206559,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} visitForDisplayParts(node2.name); break; case 225: - Debug.assertNode(node2, isPrefixUnaryExpression2); + Debug.assertNode(node2, isPrefixUnaryExpression4); parts.push({ text: tokenToString(node2.operator) }); visitForDisplayParts(node2.operand); break; @@ -203671,7 +206656,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function isHintableDeclaration(node) { if ((isPartOfParameterDeclaration(node) || isVariableDeclaration4(node) && isVarConst(node)) && node.initializer) { const initializer3 = skipParentheses(node.initializer); - return !(isHintableLiteral(initializer3) || isNewExpression12(initializer3) || isObjectLiteralExpression6(initializer3) || isAssertionExpression(initializer3)); + return !(isHintableLiteral(initializer3) || isNewExpression15(initializer3) || isObjectLiteralExpression9(initializer3) || isAssertionExpression(initializer3)); } return true; } @@ -203977,7 +206962,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }; } function getJSDocParameterNameCompletions(tag) { - if (!isIdentifier17(tag.name)) { + if (!isIdentifier21(tag.name)) { return emptyArray; } const nameThusFar = tag.name.text; @@ -203985,9 +206970,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const fn = jsdoc.parent; if (!isFunctionLike(fn)) return []; return mapDefined(fn.parameters, (param) => { - if (!isIdentifier17(param.name)) return void 0; + if (!isIdentifier21(param.name)) return void 0; const name = param.name.text; - if (jsdoc.tags.some((t) => t !== tag && isJSDocParameterTag(t) && isIdentifier17(t.name) && t.name.escapedText === name) || nameThusFar !== void 0 && !startsWith(name, nameThusFar)) { + if (jsdoc.tags.some((t) => t !== tag && isJSDocParameterTag(t) && isIdentifier21(t.name) && t.name.escapedText === name) || nameThusFar !== void 0 && !startsWith(name, nameThusFar)) { return void 0; } return { name, kind: "parameter", kindModifiers: "", sortText: ts_Completions_exports.SortText.LocationPriority }; @@ -204101,13 +207086,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } case 173: const init = commentOwner.initializer; - if (init && (isFunctionExpression4(init) || isArrowFunction5(init))) { + if (init && (isFunctionExpression5(init) || isArrowFunction6(init))) { return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; } } } function hasReturn(node, options) { - return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction5(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock4(node.body) && !!forEachReturnStatement(node.body, (n) => n)); + return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction6(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock5(node.body) && !!forEachReturnStatement(node.body, (n) => n)); } function getRightHandSideOfAssignment(rightHandSide) { while (rightHandSide.kind === 218) { @@ -204118,7 +207103,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 220: return rightHandSide; case 232: - return find(rightHandSide.members, isConstructorDeclaration); + return find(rightHandSide.members, isConstructorDeclaration2); } } var ts_MapCode_exports = {}; @@ -204145,7 +207130,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function parse3(sourceFile, content) { const nodeKinds = [ { - parse: () => createSourceFile2( + parse: () => createSourceFile5( "__mapcode_content_nodes.ts", content, sourceFile.languageVersion, @@ -204156,7 +207141,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} body: (sf) => sf.statements }, { - parse: () => createSourceFile2( + parse: () => createSourceFile5( "__mapcode_class_content_nodes.ts", `class __class { ${content} @@ -204250,7 +207235,7 @@ ${content} for (const location of focusLocations) { const scope = findAncestor( getTokenAtPosition(originalFile, location.start), - (block) => or(isBlock4, isSourceFile)(block) && some(block.statements, (origStmt) => changes.some((newStmt) => matchNode(newStmt, origStmt))) + (block) => or(isBlock5, isSourceFile)(block) && some(block.statements, (origStmt) => changes.some((newStmt) => matchNode(newStmt, origStmt))) ); if (scope) { const start = scope.statements.find((stmt) => changes.some((node) => matchNode(node, stmt))); @@ -204271,7 +207256,7 @@ ${content} for (const location of focusLocations) { const block = findAncestor( getTokenAtPosition(originalFile, location.start), - isBlock4 + isBlock5 ); if (block) { scopeStatements = block.statements; @@ -204342,7 +207327,7 @@ ${content} const shouldSort = mode === "SortAndCombine" || mode === "All"; const shouldCombine = shouldSort; const shouldRemove = mode === "RemoveUnused" || mode === "All"; - const topLevelImportDecls = sourceFile.statements.filter(isImportDeclaration5); + const topLevelImportDecls = sourceFile.statements.filter(isImportDeclaration6); const topLevelImportGroupDecls = groupByNewlineContiguous(sourceFile, topLevelImportDecls); const { comparersToTest, typeOrdersToTest } = getDetectionLists(preferences); const defaultComparer = comparersToTest[0]; @@ -204368,10 +207353,10 @@ ${content} } for (const ambientModule of sourceFile.statements.filter(isAmbientModule)) { if (!ambientModule.body) continue; - const ambientModuleImportGroupDecls = groupByNewlineContiguous(sourceFile, ambientModule.body.statements.filter(isImportDeclaration5)); + const ambientModuleImportGroupDecls = groupByNewlineContiguous(sourceFile, ambientModule.body.statements.filter(isImportDeclaration6)); ambientModuleImportGroupDecls.forEach((importGroupDecl) => organizeImportsWorker(importGroupDecl, comparer)); if (mode !== "RemoveUnused") { - const ambientModuleExportDecls = ambientModule.body.statements.filter(isExportDeclaration); + const ambientModuleExportDecls = ambientModule.body.statements.filter(isExportDeclaration2); organizeExportsWorker(ambientModuleExportDecls, comparer.namedImportComparer); } } @@ -204488,7 +207473,7 @@ ${content} let i = 0; let groupIndex = 0; while (i < len) { - if (isExportDeclaration(statements[i])) { + if (isExportDeclaration2(statements[i])) { if (topLevelExportGroups[groupIndex] === void 0) { topLevelExportGroups[groupIndex] = []; } @@ -204497,7 +207482,7 @@ ${content} topLevelExportGroups[groupIndex].push(exportDecl); i++; } else { - while (i < len && isExportDeclaration(statements[i])) { + while (i < len && isExportDeclaration2(statements[i])) { topLevelExportGroups[groupIndex].push(statements[i++]); } groupIndex++; @@ -204526,7 +207511,7 @@ ${content} name = void 0; } if (namedBindings) { - if (isNamespaceImport4(namedBindings)) { + if (isNamespaceImport5(namedBindings)) { if (!isDeclarationUsed(namedBindings.name)) { namedBindings = void 0; } @@ -204577,7 +207562,7 @@ ${content} group2.defaultImports.push(importDeclaration); } if (namedBindings) { - if (isNamespaceImport4(namedBindings)) { + if (isNamespaceImport5(namedBindings)) { group2.namespaceImports.push(importDeclaration); } else { group2.namedImports.push(importDeclaration); @@ -204708,7 +207693,7 @@ ${content} continue; } const newExportSpecifiers = []; - newExportSpecifiers.push(...flatMap(exportGroup2, (i) => i.exportClause && isNamedExports(i.exportClause) ? i.exportClause.elements : emptyArray)); + newExportSpecifiers.push(...flatMap(exportGroup2, (i) => i.exportClause && isNamedExports2(i.exportClause) ? i.exportClause.elements : emptyArray)); const sortedExportSpecifiers = toSorted(newExportSpecifiers, specifierComparer); const exportDecl = exportGroup2[0]; coalescedExports.push( @@ -204716,7 +207701,7 @@ ${content} exportDecl, exportDecl.modifiers, exportDecl.isTypeOnly, - exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), + exportDecl.exportClause && (isNamedExports2(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, exportDecl.attributes ) @@ -204783,8 +207768,8 @@ ${content} } } function hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier) { - const moduleSpecifierText = isStringLiteral10(moduleSpecifier) && moduleSpecifier.text; - return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral10(moduleName) && moduleName.text === moduleSpecifierText); + const moduleSpecifierText = isStringLiteral12(moduleSpecifier) && moduleSpecifier.text; + return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral12(moduleName) && moduleName.text === moduleSpecifierText); } function getNewImportSpecifiers(namedImports) { return flatMap(namedImports, (namedImport) => map2(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && moduleExportNameTextEscaped(importSpecifier.name) === moduleExportNameTextEscaped(importSpecifier.propertyName) ? factory.updateImportSpecifier( @@ -204797,7 +207782,7 @@ ${content} } function tryGetNamedBindingElements(namedImport) { var _a3; - return ((_a3 = namedImport.importClause) == null ? void 0 : _a3.namedBindings) && isNamedImports3(namedImport.importClause.namedBindings) ? namedImport.importClause.namedBindings.elements : void 0; + return ((_a3 = namedImport.importClause) == null ? void 0 : _a3.namedBindings) && isNamedImports4(namedImport.importClause.namedBindings) ? namedImport.importClause.namedBindings.elements : void 0; } function detectModuleSpecifierCaseBySort(importDeclsByGroup, comparersToTest) { const moduleSpecifiersByGroup = []; @@ -204810,7 +207795,7 @@ ${content} let bothNamedImports = false; const importDeclsWithNamed = originalGroups.filter((i) => { var _a3, _b; - const namedImports = (_b = tryCast((_a3 = i.importClause) == null ? void 0 : _a3.namedBindings, isNamedImports3)) == null ? void 0 : _b.elements; + const namedImports = (_b = tryCast((_a3 = i.importClause) == null ? void 0 : _a3.namedBindings, isNamedImports4)) == null ? void 0 : _b.elements; if (!(namedImports == null ? void 0 : namedImports.length)) return false; if (!bothNamedImports && namedImports.some((n) => n.isTypeOnly) && namedImports.some((n) => !n.isTypeOnly)) { bothNamedImports = true; @@ -204820,7 +207805,7 @@ ${content} if (importDeclsWithNamed.length === 0) return; const namedImportsByDecl = importDeclsWithNamed.map((importDecl) => { var _a3, _b; - return (_b = tryCast((_a3 = importDecl.importClause) == null ? void 0 : _a3.namedBindings, isNamedImports3)) == null ? void 0 : _b.elements; + return (_b = tryCast((_a3 = importDecl.importClause) == null ? void 0 : _a3.namedBindings, isNamedImports4)) == null ? void 0 : _b.elements; }).filter((elements) => elements !== void 0); if (!bothNamedImports || typesToTest.length === 0) { const sortState = detectCaseSensitivityBySort(namedImportsByDecl.map((i) => i.map((n) => n.name.text)), comparersToTest); @@ -204951,7 +207936,7 @@ ${content} isSorted = isDetectedSorted; specifierComparer = getNamedImportSpecifierComparer({ organizeImportsTypeOrder: typeOrder }, namedImportComparer); } else if (sourceFile) { - const detectFromFile = detectNamedImportOrganizationBySort(sourceFile.statements.filter(isImportDeclaration5), comparersToTest, typeOrdersToTest); + const detectFromFile = detectNamedImportOrganizationBySort(sourceFile.statements.filter(isImportDeclaration6), comparersToTest, typeOrdersToTest); if (detectFromFile) { const { namedImportComparer, typeOrder, isSorted: isDetectedSorted } = detectFromFile; isSorted = isDetectedSorted; @@ -205027,13 +208012,13 @@ ${content} var _a3; if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (isDeclaration(n2) || isVariableStatement8(n2) || isReturnStatement2(n2) || isCallOrNewExpression(n2) || n2.kind === 1) { + if (isDeclaration(n2) || isVariableStatement10(n2) || isReturnStatement3(n2) || isCallOrNewExpression(n2) || n2.kind === 1) { addOutliningForLeadingCommentsForNode(n2, sourceFile, cancellationToken, out); } - if (isFunctionLike(n2) && isBinaryExpression2(n2.parent) && isPropertyAccessExpression10(n2.parent.left)) { + if (isFunctionLike(n2) && isBinaryExpression4(n2.parent) && isPropertyAccessExpression12(n2.parent.left)) { addOutliningForLeadingCommentsForNode(n2.parent.left, sourceFile, cancellationToken, out); } - if (isBlock4(n2) || isModuleBlock(n2)) { + if (isBlock5(n2) || isModuleBlock(n2)) { addOutliningForLeadingCommentsForPos(n2.statements.end, sourceFile, cancellationToken, out); } if (isClassLike(n2) || isInterfaceDeclaration2(n2)) { @@ -205042,7 +208027,7 @@ ${content} const span = getOutliningSpanForNode(n2, sourceFile); if (span) out.push(span); depthRemaining--; - if (isCallExpression9(n2)) { + if (isCallExpression12(n2)) { depthRemaining++; visitNode3(n2.expression); depthRemaining--; @@ -205294,7 +208279,7 @@ ${content} ); } function spanForArrowFunction(node) { - if (isBlock4(node.body) || isParenthesizedExpression4(node.body) || positionsAreOnSameLine(node.body.getFullStart(), node.body.getEnd(), sourceFile)) { + if (isBlock5(node.body) || isParenthesizedExpression6(node.body) || positionsAreOnSameLine(node.body.getFullStart(), node.body.getEnd(), sourceFile)) { return void 0; } const textSpan = createTextSpanFromBounds(node.body.getFullStart(), node.body.getEnd()); @@ -205347,18 +208332,18 @@ ${content} /* Code */ ); } - function spanForObjectOrArrayLiteral(node, open = 19) { + function spanForObjectOrArrayLiteral(node, open2 = 19) { return spanForNode( node, /*autoCollapse*/ false, /*useFullStart*/ - !isArrayLiteralExpression5(node.parent) && !isCallExpression9(node.parent), - open + !isArrayLiteralExpression7(node.parent) && !isCallExpression12(node.parent), + open2 ); } - function spanForNode(hintSpanNode, autoCollapse = false, useFullStart = true, open = 19, close = open === 19 ? 20 : 24) { - const openToken = findChildOfKind(n, open, sourceFile); + function spanForNode(hintSpanNode, autoCollapse = false, useFullStart = true, open2 = 19, close = open2 === 19 ? 20 : 24) { + const openToken = findChildOfKind(n, open2, sourceFile); const closeToken = findChildOfKind(n, close, sourceFile); return openToken && closeToken && spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse, useFullStart); } @@ -205438,7 +208423,7 @@ ${content} if (declarations.some((declaration) => isDefinedInLibraryFile(program, declaration))) { return getRenameInfoError(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); } - if (isIdentifier17(node) && node.escapedText === "default" && symbol2.parent && symbol2.parent.flags & 1536) { + if (isIdentifier21(node) && node.escapedText === "default" && symbol2.parent && symbol2.parent.flags & 1536) { return void 0; } if (isStringLiteralLike(node) && tryGetImportFromModuleSpecifier(node)) { @@ -205598,7 +208583,7 @@ ${content} } case 1: { const { called } = invocation; - if (onlyUseSyntacticOwners && !containsPrecedingToken(startingToken, sourceFile, isIdentifier17(called) ? called.parent : called)) { + if (onlyUseSyntacticOwners && !containsPrecedingToken(startingToken, sourceFile, isIdentifier21(called) ? called.parent : called)) { return void 0; } const candidates = getPossibleGenericSignatures(called, argumentCount, checker); @@ -205631,7 +208616,7 @@ ${content} function createJSSignatureHelpItems(argumentInfo, program, cancellationToken) { if (argumentInfo.invocation.kind === 2) return void 0; const expression = getExpressionFromInvocation(argumentInfo.invocation); - const name = isPropertyAccessExpression10(expression) ? expression.name.text : void 0; + const name = isPropertyAccessExpression12(expression) ? expression.name.text : void 0; const typeChecker = program.getTypeChecker(); return name === void 0 ? void 0 : firstDefined(program.getSourceFiles(), (sourceFile) => firstDefined(sourceFile.getNamedDeclarations().get(name), (declaration) => { const type = declaration.symbol && typeChecker.getTypeOfSymbolAtLocation(declaration.symbol, declaration); @@ -205699,7 +208684,7 @@ ${content} const { list, argumentIndex, argumentCount, argumentsSpan } = info; const isTypeParameterList = !!parent2.typeArguments && parent2.typeArguments.pos === list.pos; return { isTypeParameterList, invocation: { kind: 0, node: invocation }, argumentsSpan, argumentIndex, argumentCount }; - } else if (isNoSubstitutionTemplateLiteral2(node) && isTaggedTemplateExpression2(parent2)) { + } else if (isNoSubstitutionTemplateLiteral4(node) && isTaggedTemplateExpression4(parent2)) { if (isInsideTemplateLiteral(node, position, sourceFile)) { return getArgumentListInfoForTemplate( parent2, @@ -205718,7 +208703,7 @@ ${content} ); const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); - } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression2(parent2.parent.parent)) { + } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression4(parent2.parent.parent)) { const templateSpan = parent2; const tagExpression = parent2.parent.parent; if (isTemplateTail(node) && !isInsideTemplateLiteral(node, position, sourceFile)) { @@ -205757,10 +208742,10 @@ ${content} return tryGetParameterInfo(node, position, sourceFile, checker) || getImmediatelyContainingArgumentInfo(node, position, sourceFile, checker); } function getHighestBinary(b) { - return isBinaryExpression2(b.parent) ? getHighestBinary(b.parent) : b; + return isBinaryExpression4(b.parent) ? getHighestBinary(b.parent) : b; } function countBinaryExpressionParameters(b) { - return isBinaryExpression2(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2; + return isBinaryExpression4(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2; } function tryGetParameterInfo(startingToken, position, sourceFile, checker) { const node = getAdjustedNode(startingToken); @@ -205782,7 +208767,7 @@ ${content} case 28: return node; default: - return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit"); + return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern2(n) || isArrayBindingPattern(n) ? false : "quit"); } } function getContextualSignatureLocationInfo(node, sourceFile, position, checker) { @@ -205848,7 +208833,7 @@ ${content} } return argumentIndex; } - if (isSpreadElement3(child)) { + if (isSpreadElement5(child)) { argumentIndex += getSpreadElementCount(child, checker); skipComma = true; continue; @@ -205880,7 +208865,7 @@ ${content} return spanIndex + 1; } function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { - const argumentCount = isNoSubstitutionTemplateLiteral2(tagExpression.template) ? 1 : tagExpression.template.templateSpans.length + 1; + const argumentCount = isNoSubstitutionTemplateLiteral4(tagExpression.template) ? 1 : tagExpression.template.templateSpans.length + 1; if (argumentIndex !== 0) { Debug.assertLessThan(argumentIndex, argumentCount); } @@ -205920,7 +208905,7 @@ ${content} return createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); } function getContainingArgumentInfo(node, position, sourceFile, checker, isManuallyInvoked) { - for (let n = node; !isSourceFile(n) && (isManuallyInvoked || !isBlock4(n)); n = n.parent) { + for (let n = node; !isSourceFile(n) && (isManuallyInvoked || !isBlock5(n)); n = n.parent) { Debug.assert(rangeContainsRange(n.parent, n), "Not a subspan", () => `Child: ${Debug.formatSyntaxKind(n.kind)}, parent: ${Debug.formatSyntaxKind(n.parent.kind)}`); const argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker); if (argumentInfo) { @@ -206051,9 +209036,9 @@ ${content} const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer)); const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : []; return checker.getExpandedParameters(candidateSignature).map((paramList) => { - const params = factory.createNodeArray([...thisParameter, ...map2(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]); + const params2 = factory.createNodeArray([...thisParameter, ...map2(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]); const parameterParts = mapToDisplayParts((writer) => { - printer.writeList(2576, params, sourceFile, writer); + printer.writeList(2576, params2, sourceFile, writer); }); return { isVariadic: false, parameters, prefix: [punctuationPart( 30 @@ -206140,7 +209125,7 @@ ${content} if (isFunctionBody(node) && isFunctionLikeDeclaration(parentNode) && !positionsAreOnSameLine(node.getStart(sourceFile), node.getEnd(), sourceFile)) { pushSelectionRange(node.getStart(sourceFile), node.getEnd()); } - if (isBlock4(node) || isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node) || prevNode && isTemplateHead(prevNode) || isVariableDeclarationList(node) && isVariableStatement8(parentNode) || isSyntaxList(node) && isVariableDeclarationList(parentNode) || isVariableDeclaration4(node) && isSyntaxList(parentNode) && children.length === 1 || isJSDocTypeExpression(node) || isJSDocSignature(node) || isJSDocTypeLiteral(node)) { + if (isBlock5(node) || isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node) || prevNode && isTemplateHead(prevNode) || isVariableDeclarationList(node) && isVariableStatement10(parentNode) || isSyntaxList(node) && isVariableDeclarationList(parentNode) || isVariableDeclaration4(node) && isSyntaxList(parentNode) && children.length === 1 || isJSDocTypeExpression(node) || isJSDocSignature(node) || isJSDocTypeLiteral(node)) { parentNode = node; break; } @@ -206162,7 +209147,7 @@ ${content} } } pushSelectionRange(start, end); - if (isStringLiteral10(node) || isTemplateLiteral(node)) { + if (isStringLiteral12(node) || isTemplateLiteral(node)) { pushSelectionRange(start + 1, end - 1); } parentNode = node; @@ -206204,7 +209189,7 @@ ${content} } return false; } - var isImport2 = or(isImportDeclaration5, isImportEqualsDeclaration); + var isImport2 = or(isImportDeclaration6, isImportEqualsDeclaration); function getSelectionChildren(node) { var _a3; if (isSourceFile(node)) { @@ -206244,7 +209229,7 @@ ${content} closeBraceToken ]; } - if (isPropertySignature2(node)) { + if (isPropertySignature3(node)) { const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); const firstJSDocChild = ((_a3 = children[0]) == null ? void 0 : _a3.kind) === 321 ? children[0] : void 0; const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; @@ -206512,12 +209497,12 @@ ${content} callExpressionLike = location; } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { callExpressionLike = location.parent; - } else if (location.parent && (isJsxOpeningLikeElement(location.parent) || isTaggedTemplateExpression2(location.parent)) && isFunctionLike(symbol2.valueDeclaration)) { + } else if (location.parent && (isJsxOpeningLikeElement(location.parent) || isTaggedTemplateExpression4(location.parent)) && isFunctionLike(symbol2.valueDeclaration)) { callExpressionLike = location.parent; } if (callExpressionLike) { signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 215 || isCallExpression9(callExpressionLike) && callExpressionLike.expression.kind === 108; + const useConstructSignatures = callExpressionLike.kind === 215 || isCallExpression12(callExpressionLike) && callExpressionLike.expression.kind === 108; const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { signature = allSignatures.length ? allSignatures[0] : void 0; @@ -206985,7 +209970,7 @@ ${content} } if (isTransientSymbol(symbol2) && symbol2.links.target && isTransientSymbol(symbol2.links.target) && symbol2.links.target.links.tupleLabelDeclaration) { const labelDecl = symbol2.links.target.links.tupleLabelDeclaration; - Debug.assertNode(labelDecl.name, isIdentifier17); + Debug.assertNode(labelDecl.name, isIdentifier21); displayParts.push(spacePart()); displayParts.push(punctuationPart( 21 @@ -207034,11 +210019,11 @@ ${content} } } } - if (documentation.length === 0 && isIdentifier17(location) && symbol2.valueDeclaration && isBindingElement(symbol2.valueDeclaration)) { + if (documentation.length === 0 && isIdentifier21(location) && symbol2.valueDeclaration && isBindingElement(symbol2.valueDeclaration)) { const declaration = symbol2.valueDeclaration; const parent2 = declaration.parent; const name = declaration.propertyName || declaration.name; - if (isIdentifier17(name) && isObjectBindingPattern(parent2)) { + if (isIdentifier21(name) && isObjectBindingPattern2(parent2)) { const propertyName = getTextOfIdentifierOrLiteral(name); const objectType = typeChecker.getTypeAtLocation(parent2); documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => { @@ -207202,7 +210187,7 @@ ${content} prefixNextMeaning(); if (symbolKind2) { pushSymbolKind(symbolKind2); - if (symbol22 && !some(symbol22.declarations, (d) => isArrowFunction5(d) || (isFunctionExpression4(d) || isClassExpression(d)) && !d.name)) { + if (symbol22 && !some(symbol22.declarations, (d) => isArrowFunction6(d) || (isFunctionExpression5(d) || isClassExpression(d)) && !d.name)) { displayParts.push(spacePart()); addFullSymbolName(symbol22); } @@ -207265,8 +210250,8 @@ ${content} } function writeTypeParametersOfSymbol(symbol22, enclosingDeclaration2) { const typeParameterParts = mapToDisplayParts((writer) => { - const params = typeChecker.symbolToTypeParameterDeclarations(symbol22, enclosingDeclaration2, symbolDisplayNodeBuilderFlags); - getPrinter().writeList(53776, params, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer); + const params2 = typeChecker.symbolToTypeParameterDeclarations(symbol22, enclosingDeclaration2, symbolDisplayNodeBuilderFlags); + getPrinter().writeList(53776, params2, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer); }); addRange(displayParts, typeParameterParts); } @@ -207482,7 +210467,7 @@ ${content} return !!candidate && !!node.parent && (candidate.kind === 28 || candidate.kind === 27 && node.parent.kind === 211); } function isThisTypeAnnotatable(containingFunction) { - return isFunctionExpression4(containingFunction) || isFunctionDeclaration2(containingFunction); + return isFunctionExpression5(containingFunction) || isFunctionDeclaration3(containingFunction); } var ChangeTracker = class _ChangeTracker { /** Public for tests only. Other callers should use `ChangeTracker.with`. */ @@ -207715,7 +210700,7 @@ ${content} if (isFunctionLike(node)) { endNode2 = findChildOfKind(node, 22, sourceFile); if (!endNode2) { - if (!isArrowFunction5(node)) return false; + if (!isArrowFunction6(node)) return false; endNode2 = first(node.parameters); } } else { @@ -207740,7 +210725,7 @@ ${content} return { suffix: ", " }; } else if (isParameter(before)) { return isParameter(inserted) ? { suffix: ", " } : {}; - } else if (isStringLiteral10(before) && isImportDeclaration5(before.parent) || isNamedImports3(before)) { + } else if (isStringLiteral12(before) && isImportDeclaration6(before.parent) || isNamedImports4(before)) { return { suffix: ", " }; } else if (isImportSpecifier(before)) { return { suffix: "," + (blankLineBetween ? this.newLineCharacter : " ") }; @@ -207828,8 +210813,8 @@ ${content} if (isFirstInsertion) { this.classesWithNodesInsertedAtStart.set(getNodeId(node), { node, sourceFile }); } - const insertTrailingComma = isObjectLiteralExpression6(node) && (!isJsonSourceFile(sourceFile) || !isEmpty); - const insertLeadingComma = isObjectLiteralExpression6(node) && isJsonSourceFile(sourceFile) && isEmpty && !isFirstInsertion; + const insertTrailingComma = isObjectLiteralExpression9(node) && (!isJsonSourceFile(sourceFile) || !isEmpty); + const insertLeadingComma = isObjectLiteralExpression9(node) && isJsonSourceFile(sourceFile) && isEmpty && !isFirstInsertion; return { indentation, prefix: (insertLeadingComma ? "," : "") + this.newLineCharacter, @@ -208081,7 +211066,7 @@ ${options.prefix}` : "\n" : options.prefix case 342: { const oldParam = oldTag; const newParam = newTag; - return isIdentifier17(oldParam.name) && isIdentifier17(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( + return isIdentifier21(oldParam.name) && isIdentifier21(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( /*tagName*/ void 0, newParam.name, @@ -208149,12 +211134,12 @@ ${options.prefix}` : "\n" : options.prefix return end; } function getClassOrObjectBraceEnds(cls, sourceFile) { - const open = findChildOfKind(cls, 19, sourceFile); + const open2 = findChildOfKind(cls, 19, sourceFile); const close = findChildOfKind(cls, 20, sourceFile); - return [open == null ? void 0 : open.end, close == null ? void 0 : close.end]; + return [open2 == null ? void 0 : open2.end, close == null ? void 0 : close.end]; } function getMembersOrProperties(node) { - return isObjectLiteralExpression6(node) ? node.properties : node.members; + return isObjectLiteralExpression9(node) ? node.properties : node.members; } var changesToText; ((changesToText2) => { @@ -208185,7 +211170,7 @@ ${options.prefix}` : "\n" : options.prefix changesToText2.newFileChanges = newFileChanges; function newFileChangesWorker(scriptKind, insertions, newLineCharacter, formatContext) { const nonFormattedText = flatMap(insertions, (insertion) => insertion.statements.map((s) => s === 4 ? "" : getNonformattedText(s, insertion.oldFile, newLineCharacter).text)).join(newLineCharacter); - const sourceFile = createSourceFile2( + const sourceFile = createSourceFile5( "any file name", nonFormattedText, { @@ -208554,7 +211539,7 @@ ${options.prefix}` : "\n" : options.prefix return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); } function needSemicolonBetween(a, b) { - return (isPropertySignature2(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 168 || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); + return (isPropertySignature3(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 168 || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); } var deleteDeclaration; ((_deleteDeclaration) => { @@ -208562,7 +211547,7 @@ ${options.prefix}` : "\n" : options.prefix switch (node.kind) { case 170: { const oldFunction = node.parent; - if (isArrowFunction5(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21, sourceFile)) { + if (isArrowFunction6(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21, sourceFile)) { changes.replaceNodeWithText(sourceFile, node, "()"); } else { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); @@ -208627,7 +211612,7 @@ ${options.prefix}` : "\n" : options.prefix deleteNode(changes, sourceFile, node); } else if (isImportClause(node.parent) && node.parent.name === node) { deleteDefaultImport(changes, sourceFile, node.parent); - } else if (isCallExpression9(node.parent) && contains(node.parent.arguments, node)) { + } else if (isCallExpression12(node.parent) && contains(node.parent.arguments, node)) { deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); } else { deleteNode(changes, sourceFile, node); @@ -210915,7 +213900,7 @@ ${options.prefix}` : "\n" : options.prefix return false; } if (context.contextNode.kind === 265 || context.contextNode.kind === 266) { - return !isPropertySignature2(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21; + return !isPropertySignature3(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21; } if (isPropertyDeclaration(context.currentTokenParent)) { return !context.currentTokenParent.initializer; @@ -210926,7 +213911,7 @@ ${options.prefix}` : "\n" : options.prefix return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); } function isNotPropertyAccessOnIntegerLiteral(context) { - return !isPropertyAccessExpression10(context.contextNode) || !isNumericLiteral3(context.contextNode.expression) || context.contextNode.expression.getText().includes("."); + return !isPropertyAccessExpression12(context.contextNode) || !isNumericLiteral4(context.contextNode.expression) || context.contextNode.expression.getText().includes("."); } function getFormatContext(options, host) { return { options, getRules: getRulesMap(), host }; @@ -212314,7 +215299,7 @@ ${options.prefix}` : "\n" : options.prefix return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } function isArgumentAndStartLineOverlapsExpressionBeingCalled(parent2, child, childStartLine, sourceFile) { - if (!(isCallExpression9(parent2) && contains(parent2.arguments, child))) { + if (!(isCallExpression12(parent2) && contains(parent2.arguments, child))) { return false; } const expressionOfCallExpressionEnd = parent2.expression.getEnd(); @@ -212333,7 +215318,7 @@ ${options.prefix}` : "\n" : options.prefix } SmartIndenter2.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement; function childIsUnindentedBranchOfConditionalExpression(parent2, child, childStartLine, sourceFile) { - if (isConditionalExpression2(parent2) && (child === parent2.whenTrue || child === parent2.whenFalse)) { + if (isConditionalExpression4(parent2) && (child === parent2.whenTrue || child === parent2.whenFalse)) { const conditionEndLine = getLineAndCharacterOfPosition(sourceFile, parent2.condition.end).line; if (child === parent2.whenTrue) { return childStartLine === conditionEndLine; @@ -212637,7 +215622,7 @@ ${options.prefix}` : "\n" : options.prefix forEachChild22(enclosingNode, function checkNameResolution(node) { var _a3; if (shouldProvidePasteEdits) return; - if (isIdentifier17(node) && rangeContainsPosition(range, node.getStart(sourceFile))) { + if (isIdentifier21(node) && rangeContainsPosition(range, node.getStart(sourceFile))) { const resolvedSymbol = checker.resolveName( node.text, node, @@ -212725,7 +215710,7 @@ ${options.prefix}` : "\n" : options.prefix ); if (!enclosingNode) return; forEachChild22(enclosingNode, function importUnresolvedIdentifiers(node) { - const isImportCandidate = isIdentifier17(node) && rangeContainsPosition(range, node.getStart(updatedFile)) && !(updatedProgram == null ? void 0 : updatedProgram.getTypeChecker().resolveName( + const isImportCandidate = isIdentifier21(node) && rangeContainsPosition(range, node.getStart(updatedFile)) && !(updatedProgram == null ? void 0 : updatedProgram.getTypeChecker().resolveName( node.text, node, -1, @@ -212763,8 +215748,8 @@ ${options.prefix}` : "\n" : options.prefix const startToken = getTokenAtPosition(sourceFile, pos); const endToken = findTokenOnLeftOfPosition(sourceFile, pos) ?? getTokenAtPosition(sourceFile, end); return { - pos: isIdentifier17(startToken) && pos <= startToken.getStart(sourceFile) ? startToken.getFullStart() : pos, - end: isIdentifier17(endToken) && end === endToken.getEnd() ? ts_textChanges_exports.getAdjustedEndPosition(sourceFile, endToken, {}) : end + pos: isIdentifier21(startToken) && pos <= startToken.getStart(sourceFile) ? startToken.getFullStart() : pos, + end: isIdentifier21(endToken) && end === endToken.getEnd() ? ts_textChanges_exports.getAdjustedEndPosition(sourceFile, endToken, {}) : end }; } var ts_exports2 = {}; @@ -212859,7 +215844,7 @@ ${options.prefix}` : "\n" : options.prefix NodeBuilderFlags: () => NodeBuilderFlags, NodeCheckFlags: () => NodeCheckFlags, NodeFactoryFlags: () => NodeFactoryFlags, - NodeFlags: () => NodeFlags3, + NodeFlags: () => NodeFlags5, NodeResolutionFeatures: () => NodeResolutionFeatures, ObjectFlags: () => ObjectFlags, OperationCanceledException: () => OperationCanceledException, @@ -212887,9 +215872,9 @@ ${options.prefix}` : "\n" : options.prefix Rename: () => ts_Rename_exports, ScriptElementKind: () => ScriptElementKind, ScriptElementKindModifier: () => ScriptElementKindModifier, - ScriptKind: () => ScriptKind, + ScriptKind: () => ScriptKind2, ScriptSnapshot: () => ScriptSnapshot, - ScriptTarget: () => ScriptTarget2, + ScriptTarget: () => ScriptTarget5, SemanticClassificationFormat: () => SemanticClassificationFormat, SemanticMeaning: () => SemanticMeaning, SemicolonPreference: () => SemicolonPreference, @@ -212907,7 +215892,7 @@ ${options.prefix}` : "\n" : options.prefix SymbolDisplayPartKind: () => SymbolDisplayPartKind, SymbolFlags: () => SymbolFlags, SymbolFormatFlags: () => SymbolFormatFlags, - SyntaxKind: () => SyntaxKind8, + SyntaxKind: () => SyntaxKind10, Ternary: () => Ternary, ThrottledCancellationToken: () => ThrottledCancellationToken, TokenClass: () => TokenClass, @@ -213185,7 +216170,7 @@ ${options.prefix}` : "\n" : options.prefix createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, createSortedArray: () => createSortedArray, - createSourceFile: () => createSourceFile2, + createSourceFile: () => createSourceFile5, createSourceMapGenerator: () => createSourceMapGenerator, createSourceMapSource: () => createSourceMapSource, createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, @@ -213779,7 +216764,7 @@ ${options.prefix}` : "\n" : options.prefix getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState, getTextOfConstantValue: () => getTextOfConstantValue, getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral, - getTextOfJSDocComment: () => getTextOfJSDocComment, + getTextOfJSDocComment: () => getTextOfJSDocComment2, getTextOfJsxAttributeName: () => getTextOfJsxAttributeName, getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName, getTextOfNode: () => getTextOfNode, @@ -213906,11 +216891,11 @@ ${options.prefix}` : "\n" : options.prefix isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement, isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern, isArrayBindingPattern: () => isArrayBindingPattern, - isArrayLiteralExpression: () => isArrayLiteralExpression5, + isArrayLiteralExpression: () => isArrayLiteralExpression7, isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern, isArrayTypeNode: () => isArrayTypeNode2, - isArrowFunction: () => isArrowFunction5, - isAsExpression: () => isAsExpression4, + isArrowFunction: () => isArrowFunction6, + isAsExpression: () => isAsExpression6, isAssertClause: () => isAssertClause, isAssertEntry: () => isAssertEntry, isAssertionExpression: () => isAssertionExpression, @@ -213927,7 +216912,7 @@ ${options.prefix}` : "\n" : options.prefix isAwaitExpression: () => isAwaitExpression, isAwaitKeyword: () => isAwaitKeyword, isBigIntLiteral: () => isBigIntLiteral, - isBinaryExpression: () => isBinaryExpression2, + isBinaryExpression: () => isBinaryExpression4, isBinaryLogicalOperator: () => isBinaryLogicalOperator, isBinaryOperatorToken: () => isBinaryOperatorToken, isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, @@ -213940,7 +216925,7 @@ ${options.prefix}` : "\n" : options.prefix isBindingOrAssignmentElement: () => isBindingOrAssignmentElement, isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern, isBindingPattern: () => isBindingPattern, - isBlock: () => isBlock4, + isBlock: () => isBlock5, isBlockLike: () => isBlockLike, isBlockOrCatchScoped: () => isBlockOrCatchScoped, isBlockScope: () => isBlockScope, @@ -213953,7 +216938,7 @@ ${options.prefix}` : "\n" : options.prefix isBuilderProgram: () => isBuilderProgram, isBundle: () => isBundle, isCallChain: () => isCallChain, - isCallExpression: () => isCallExpression9, + isCallExpression: () => isCallExpression12, isCallExpressionTarget: () => isCallExpressionTarget, isCallLikeExpression: () => isCallLikeExpression, isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression, @@ -213970,7 +216955,7 @@ ${options.prefix}` : "\n" : options.prefix isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, isCircularBuildOrder: () => isCircularBuildOrder, - isClassDeclaration: () => isClassDeclaration3, + isClassDeclaration: () => isClassDeclaration5, isClassElement: () => isClassElement, isClassExpression: () => isClassExpression, isClassInstanceProperty: () => isClassInstanceProperty, @@ -213992,12 +216977,12 @@ ${options.prefix}` : "\n" : options.prefix isComputedNonLiteralName: () => isComputedNonLiteralName, isComputedPropertyName: () => isComputedPropertyName, isConciseBody: () => isConciseBody, - isConditionalExpression: () => isConditionalExpression2, + isConditionalExpression: () => isConditionalExpression4, isConditionalTypeNode: () => isConditionalTypeNode, isConstAssertion: () => isConstAssertion, isConstTypeReference: () => isConstTypeReference, isConstructSignatureDeclaration: () => isConstructSignatureDeclaration, - isConstructorDeclaration: () => isConstructorDeclaration, + isConstructorDeclaration: () => isConstructorDeclaration2, isConstructorTypeNode: () => isConstructorTypeNode, isContextualKeyword: () => isContextualKeyword, isContinueStatement: () => isContinueStatement, @@ -214031,7 +217016,7 @@ ${options.prefix}` : "\n" : options.prefix isEffectiveExternalModule: () => isEffectiveExternalModule, isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, isElementAccessChain: () => isElementAccessChain, - isElementAccessExpression: () => isElementAccessExpression3, + isElementAccessExpression: () => isElementAccessExpression5, isEmittedFileOfProgram: () => isEmittedFileOfProgram, isEmptyArrayLiteral: () => isEmptyArrayLiteral, isEmptyBindingElement: () => isEmptyBindingElement, @@ -214050,8 +217035,8 @@ ${options.prefix}` : "\n" : options.prefix isExcludedFile: () => isExcludedFile, isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration, - isExportAssignment: () => isExportAssignment2, - isExportDeclaration: () => isExportDeclaration, + isExportAssignment: () => isExportAssignment3, + isExportDeclaration: () => isExportDeclaration2, isExportModifier: () => isExportModifier, isExportName: () => isExportName, isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration, @@ -214087,8 +217072,8 @@ ${options.prefix}` : "\n" : options.prefix isFullSourceFile: () => isFullSourceFile, isFunctionBlock: () => isFunctionBlock, isFunctionBody: () => isFunctionBody, - isFunctionDeclaration: () => isFunctionDeclaration2, - isFunctionExpression: () => isFunctionExpression4, + isFunctionDeclaration: () => isFunctionDeclaration3, + isFunctionExpression: () => isFunctionExpression5, isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction, isFunctionLike: () => isFunctionLike, isFunctionLikeDeclaration: () => isFunctionLikeDeclaration, @@ -214109,7 +217094,7 @@ ${options.prefix}` : "\n" : options.prefix isHeritageClause: () => isHeritageClause, isHoistedFunction: () => isHoistedFunction, isHoistedVariableStatement: () => isHoistedVariableStatement, - isIdentifier: () => isIdentifier17, + isIdentifier: () => isIdentifier21, isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword, isIdentifierName: () => isIdentifierName, isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode, @@ -214126,7 +217111,7 @@ ${options.prefix}` : "\n" : options.prefix isImportAttributes: () => isImportAttributes, isImportCall: () => isImportCall, isImportClause: () => isImportClause, - isImportDeclaration: () => isImportDeclaration5, + isImportDeclaration: () => isImportDeclaration6, isImportEqualsDeclaration: () => isImportEqualsDeclaration, isImportKeyword: () => isImportKeyword, isImportMeta: () => isImportMeta, @@ -214305,20 +217290,20 @@ ${options.prefix}` : "\n" : options.prefix isNamedEvaluation: () => isNamedEvaluation, isNamedEvaluationSource: () => isNamedEvaluationSource, isNamedExportBindings: () => isNamedExportBindings, - isNamedExports: () => isNamedExports, + isNamedExports: () => isNamedExports2, isNamedImportBindings: () => isNamedImportBindings, - isNamedImports: () => isNamedImports3, + isNamedImports: () => isNamedImports4, isNamedImportsOrExports: () => isNamedImportsOrExports, isNamedTupleMember: () => isNamedTupleMember, isNamespaceBody: () => isNamespaceBody, isNamespaceExport: () => isNamespaceExport, isNamespaceExportDeclaration: () => isNamespaceExportDeclaration, - isNamespaceImport: () => isNamespaceImport4, + isNamespaceImport: () => isNamespaceImport5, isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, - isNewExpression: () => isNewExpression12, + isNewExpression: () => isNewExpression15, isNewExpressionTarget: () => isNewExpressionTarget, isNewScopeNode: () => isNewScopeNode, - isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral2, + isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral4, isNodeArray: () => isNodeArray, isNodeArrayMultiLine: () => isNodeArrayMultiLine, isNodeDescendantOf: () => isNodeDescendantOf, @@ -214330,20 +217315,20 @@ ${options.prefix}` : "\n" : options.prefix isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, isNonNullAccess: () => isNonNullAccess, isNonNullChain: () => isNonNullChain, - isNonNullExpression: () => isNonNullExpression2, + isNonNullExpression: () => isNonNullExpression4, isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, isNotEmittedStatement: () => isNotEmittedStatement, isNullishCoalesce: () => isNullishCoalesce, isNumber: () => isNumber, - isNumericLiteral: () => isNumericLiteral3, + isNumericLiteral: () => isNumericLiteral4, isNumericLiteralName: () => isNumericLiteralName, isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName, isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement, isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern, - isObjectBindingPattern: () => isObjectBindingPattern, + isObjectBindingPattern: () => isObjectBindingPattern2, isObjectLiteralElement: () => isObjectLiteralElement, isObjectLiteralElementLike: () => isObjectLiteralElementLike, - isObjectLiteralExpression: () => isObjectLiteralExpression6, + isObjectLiteralExpression: () => isObjectLiteralExpression9, isObjectLiteralMethod: () => isObjectLiteralMethod, isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, isObjectTypeDeclaration: () => isObjectTypeDeclaration, @@ -214361,7 +217346,7 @@ ${options.prefix}` : "\n" : options.prefix isParameter: () => isParameter, isParameterPropertyDeclaration: () => isParameterPropertyDeclaration, isParameterPropertyModifier: () => isParameterPropertyModifier, - isParenthesizedExpression: () => isParenthesizedExpression4, + isParenthesizedExpression: () => isParenthesizedExpression6, isParenthesizedTypeNode: () => isParenthesizedTypeNode, isParseTreeNode: () => isParseTreeNode, isPartOfParameterDeclaration: () => isPartOfParameterDeclaration, @@ -214375,7 +217360,7 @@ ${options.prefix}` : "\n" : options.prefix isPlusToken: () => isPlusToken, isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition, isPostfixUnaryExpression: () => isPostfixUnaryExpression, - isPrefixUnaryExpression: () => isPrefixUnaryExpression2, + isPrefixUnaryExpression: () => isPrefixUnaryExpression4, isPrimitiveLiteralValue: () => isPrimitiveLiteralValue, isPrivateIdentifier: () => isPrivateIdentifier, isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, @@ -214385,14 +217370,14 @@ ${options.prefix}` : "\n" : options.prefix isPrologueDirective: () => isPrologueDirective, isPropertyAccessChain: () => isPropertyAccessChain, isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression, - isPropertyAccessExpression: () => isPropertyAccessExpression10, + isPropertyAccessExpression: () => isPropertyAccessExpression12, isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName, isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode, - isPropertyAssignment: () => isPropertyAssignment6, + isPropertyAssignment: () => isPropertyAssignment8, isPropertyDeclaration: () => isPropertyDeclaration, isPropertyName: () => isPropertyName, isPropertyNameLiteral: () => isPropertyNameLiteral, - isPropertySignature: () => isPropertySignature2, + isPropertySignature: () => isPropertySignature3, isPrototypeAccess: () => isPrototypeAccess, isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, isPunctuation: () => isPunctuation, @@ -214412,7 +217397,7 @@ ${options.prefix}` : "\n" : options.prefix isRequireVariableStatement: () => isRequireVariableStatement, isRestParameter: () => isRestParameter, isRestTypeNode: () => isRestTypeNode, - isReturnStatement: () => isReturnStatement2, + isReturnStatement: () => isReturnStatement3, isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression, @@ -214422,13 +217407,13 @@ ${options.prefix}` : "\n" : options.prefix isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName, isRootedDiskPath: () => isRootedDiskPath, isSameEntityName: () => isSameEntityName, - isSatisfiesExpression: () => isSatisfiesExpression3, + isSatisfiesExpression: () => isSatisfiesExpression5, isSemicolonClassElement: () => isSemicolonClassElement, isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, - isShorthandPropertyAssignment: () => isShorthandPropertyAssignment3, + isShorthandPropertyAssignment: () => isShorthandPropertyAssignment5, isSideEffectImport: () => isSideEffectImport, isSignedNumericLiteral: () => isSignedNumericLiteral, isSimpleCopiableExpression: () => isSimpleCopiableExpression, @@ -214443,8 +217428,8 @@ ${options.prefix}` : "\n" : options.prefix isSourceFileNotJson: () => isSourceFileNotJson, isSourceMapping: () => isSourceMapping, isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, - isSpreadAssignment: () => isSpreadAssignment3, - isSpreadElement: () => isSpreadElement3, + isSpreadAssignment: () => isSpreadAssignment5, + isSpreadElement: () => isSpreadElement5, isStatement: () => isStatement, isStatementButNotDeclaration: () => isStatementButNotDeclaration, isStatementOrBlock: () => isStatementOrBlock, @@ -214455,7 +217440,7 @@ ${options.prefix}` : "\n" : options.prefix isStringANonContextualKeyword: () => isStringANonContextualKeyword, isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, isStringDoubleQuoted: () => isStringDoubleQuoted, - isStringLiteral: () => isStringLiteral10, + isStringLiteral: () => isStringLiteral12, isStringLiteralLike: () => isStringLiteralLike, isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression, isStringLiteralOrTemplate: () => isStringLiteralOrTemplate, @@ -214471,9 +217456,9 @@ ${options.prefix}` : "\n" : options.prefix isSyntheticExpression: () => isSyntheticExpression, isSyntheticReference: () => isSyntheticReference, isTagName: () => isTagName, - isTaggedTemplateExpression: () => isTaggedTemplateExpression2, + isTaggedTemplateExpression: () => isTaggedTemplateExpression4, isTaggedTemplateTag: () => isTaggedTemplateTag, - isTemplateExpression: () => isTemplateExpression2, + isTemplateExpression: () => isTemplateExpression4, isTemplateHead: () => isTemplateHead, isTemplateLiteral: () => isTemplateLiteral, isTemplateLiteralKind: () => isTemplateLiteralKind, @@ -214505,12 +217490,12 @@ ${options.prefix}` : "\n" : options.prefix isTupleTypeNode: () => isTupleTypeNode, isTypeAlias: () => isTypeAlias, isTypeAliasDeclaration: () => isTypeAliasDeclaration2, - isTypeAssertionExpression: () => isTypeAssertionExpression, + isTypeAssertionExpression: () => isTypeAssertionExpression2, isTypeDeclaration: () => isTypeDeclaration, isTypeElement: () => isTypeElement, isTypeKeyword: () => isTypeKeyword, isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, - isTypeLiteralNode: () => isTypeLiteralNode, + isTypeLiteralNode: () => isTypeLiteralNode2, isTypeNode: () => isTypeNode, isTypeNodeKind: () => isTypeNodeKind, isTypeOfExpression: () => isTypeOfExpression, @@ -214544,7 +217529,7 @@ ${options.prefix}` : "\n" : options.prefix isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, isVariableDeclarationList: () => isVariableDeclarationList, isVariableLike: () => isVariableLike, - isVariableStatement: () => isVariableStatement8, + isVariableStatement: () => isVariableStatement10, isVoidExpression: () => isVoidExpression, isWatchSet: () => isWatchSet, isWhileStatement: () => isWhileStatement, @@ -214756,7 +217741,7 @@ ${options.prefix}` : "\n" : options.prefix resolveModuleName: () => resolveModuleName, resolveModuleNameFromCache: () => resolveModuleNameFromCache, resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson, - resolvePath: () => resolvePath, + resolvePath: () => resolvePath2, resolveProjectReferencePath: () => resolveProjectReferencePath, resolveTripleslashReference: () => resolveTripleslashReference, resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, @@ -225250,7 +228235,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const ls = project.getLanguageService(); const program = ls.getProgram(); const initialNode = getTouchingPropertyName(program.getSourceFile(file2), position); - if ((isStringLiteralLike(initialNode) || isIdentifier17(initialNode)) && isAccessExpression(initialNode.parent)) { + if ((isStringLiteralLike(initialNode) || isIdentifier21(initialNode)) && isAccessExpression(initialNode.parent)) { return forEachNameInAccessChainWalkingLeft(initialNode, (nameInChain) => { var _a22; if (nameInChain === initialNode) return void 0; @@ -227699,8 +230684,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range installPackage(options) { this.packageInstallId++; const request = { kind: "installPackage", ...options, id: this.packageInstallId }; - const promise2 = new Promise((resolve, reject) => { - (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve, reject }); + const promise2 = new Promise((resolve4, reject) => { + (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve4, reject }); }); this.installer.send(request); return promise2; @@ -227972,9 +230957,9 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range }; } })({ get exports() { - return ts25; + return ts29; }, set exports(v) { - ts25 = v; + ts29 = v; if (typeof module !== "undefined" && module.exports) { module.exports = v; } @@ -227982,11 +230967,231 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range } }); +// node_modules/@intentius/chant/src/fold/foldable-helpers.ts +var FOLDABLE_AUTHORING_HELPERS, HELPER_NAMES; +var init_foldable_helpers = __esm({ + "node_modules/@intentius/chant/src/fold/foldable-helpers.ts"() { + FOLDABLE_AUTHORING_HELPERS = [ + { + name: "phase", + module: "components/component.ts, op/builders.ts", + note: "Returns a plain `{ phase, steps, parallel? }` / `{ name, steps, parallel? }` object literal built from its arguments. No state, no I/O." + }, + { + name: "gate", + module: "components/component.ts, op/builders.ts", + note: "Returns a plain `{ kind: 'gate', signalName, ... }` object literal built from its arguments." + }, + { + name: "activity", + module: "op/builders.ts", + note: "Returns a plain `{ kind: 'activity', fn, args?, profile? }` object literal built from its arguments." + }, + { + name: "stackOutput", + module: "components/component.ts, stack-output.ts", + note: "Component form returns a plain `{ stackOutput: { stack, name } }` literal. Cross-stack form derives a `StackOutput` from a real `AttrRef`/`Intrinsic` and throws on anything else \u2014 so a fold that only has a symbolic reference fails loudly into run-fallback rather than producing a wrong output." + }, + { + name: "output", + module: "lexicon-output.ts", + note: "Constructs a `LexiconOutput` from a real `AttrRef`/`Intrinsic` and a name. Pure, but identity-sensitive: it reads through the ref's `WeakRef` to its parent entity. Only folds when the ref argument revives to a REAL live reference (see fold-import.ts's `requireLiveRefs`); a symbolic `{ __attrRef }` envelope is rejected, not silently wrapped." + } + ]; + HELPER_NAMES = new Set(FOLDABLE_AUTHORING_HELPERS.map((h) => h.name)); + } +}); + +// node_modules/@intentius/chant/src/fold/subset.ts +var ts, SUPPORTED_BINARY_OPERATORS, SUPPORTED_UNARY_OPERATORS; +var init_subset = __esm({ + "node_modules/@intentius/chant/src/fold/subset.ts"() { + ts = __toESM(require_typescript(), 1); + init_foldable_helpers(); + init_lexicon(); + SUPPORTED_BINARY_OPERATORS = /* @__PURE__ */ new Set([ + ts.SyntaxKind.AmpersandAmpersandToken, + ts.SyntaxKind.BarBarToken, + ts.SyntaxKind.QuestionQuestionToken, + ts.SyntaxKind.PlusToken, + ts.SyntaxKind.MinusToken, + ts.SyntaxKind.AsteriskToken, + ts.SyntaxKind.SlashToken, + ts.SyntaxKind.EqualsEqualsEqualsToken, + ts.SyntaxKind.ExclamationEqualsEqualsToken, + ts.SyntaxKind.GreaterThanToken, + ts.SyntaxKind.LessThanToken, + ts.SyntaxKind.GreaterThanEqualsToken, + ts.SyntaxKind.LessThanEqualsToken + ]); + SUPPORTED_UNARY_OPERATORS = /* @__PURE__ */ new Set([ + ts.SyntaxKind.ExclamationToken, + ts.SyntaxKind.MinusToken + ]); + } +}); + +// node_modules/@intentius/chant/src/fold/fold.ts +var ts2; +var init_fold = __esm({ + "node_modules/@intentius/chant/src/fold/fold.ts"() { + ts2 = __toESM(require_typescript(), 1); + init_lexicon(); + init_subset(); + init_foldable_helpers(); + } +}); + +// node_modules/@intentius/chant/src/discovery/fold-import.ts +var ts3; +var init_fold_import = __esm({ + "node_modules/@intentius/chant/src/discovery/fold-import.ts"() { + ts3 = __toESM(require_typescript(), 1); + init_declarable(); + init_composite(); + init_utils(); + init_intrinsic(); + init_fold(); + init_foldable_helpers(); + init_subset(); + init_import(); + } +}); + +// node_modules/@intentius/chant/src/discovery/index.ts +var init_discovery = __esm({ + "node_modules/@intentius/chant/src/discovery/index.ts"() { + init_files(); + init_import(); + init_collect(); + init_resolve(); + init_graph(); + init_fold_import(); + init_provenance(); + init_build_params(); + init_params(); + } +}); + +// node_modules/@intentius/chant/src/discovery/cache.ts +var init_cache = __esm({ + "node_modules/@intentius/chant/src/discovery/cache.ts"() { + } +}); + +// node_modules/@intentius/chant/src/child-project.ts +var init_child_project = __esm({ + "node_modules/@intentius/chant/src/child-project.ts"() { + } +}); + +// node_modules/@intentius/chant/src/discovery/entity-wire-codec.ts +var init_entity_wire_codec = __esm({ + "node_modules/@intentius/chant/src/discovery/entity-wire-codec.ts"() { + init_declarable(); + init_attrref(); + init_intrinsic(); + init_utils(); + init_lexicon_output(); + init_child_project(); + } +}); + +// node_modules/@intentius/chant/src/discovery/entity-wire.ts +var init_entity_wire = __esm({ + "node_modules/@intentius/chant/src/discovery/entity-wire.ts"() { + init_entity_wire_codec(); + init_discovery(); + init_entity_wire_codec(); + } +}); + +// node_modules/@intentius/chant/src/build.ts +var init_build = __esm({ + "node_modules/@intentius/chant/src/build.ts"() { + init_errors3(); + init_lexicon_output(); + init_utils(); + init_child_project(); + init_discovery(); + init_entity_wire(); + init_graph(); + init_sort(); + } +}); + +// node_modules/@intentius/chant/src/graph-ir.ts +var init_graph_ir = __esm({ + "node_modules/@intentius/chant/src/graph-ir.ts"() { + init_utils(); + init_declarable(); + init_lexicon_output(); + init_provenance(); + init_intrinsic(); + } +}); + +// node_modules/@intentius/chant/src/graph-detail.ts +var init_graph_detail = __esm({ + "node_modules/@intentius/chant/src/graph-detail.ts"() { + } +}); + +// node_modules/@intentius/chant/src/graph-mermaid.ts +var init_graph_mermaid = __esm({ + "node_modules/@intentius/chant/src/graph-mermaid.ts"() { + } +}); + +// node_modules/@intentius/chant/src/graph-dot.ts +var init_graph_dot = __esm({ + "node_modules/@intentius/chant/src/graph-dot.ts"() { + } +}); + +// node_modules/@intentius/chant/src/graph-layout.ts +var init_graph_layout = __esm({ + "node_modules/@intentius/chant/src/graph-layout.ts"() { + } +}); + +// node_modules/@intentius/chant/src/graph-lens.ts +var init_graph_lens = __esm({ + "node_modules/@intentius/chant/src/graph-lens.ts"() { + } +}); + +// node_modules/@intentius/chant/src/detectLexicon.ts +import { readFile } from "node:fs/promises"; +async function detectLexicons(files) { + const detectedLexicons = /* @__PURE__ */ new Set(); + for (const file2 of files) { + let content; + try { + content = await readFile(file2, "utf-8"); + } catch (error51) { + continue; + } + const regex = /(?:import|export)\s+[\s\S]*?\s+from\s+['"]@intentius\/chant-lexicon-([a-z][\w-]*)['"]/g; + for (const match of content.matchAll(regex)) { + detectedLexicons.add(match[1]); + } + } + if (detectedLexicons.size === 0) { + throw new Error("No lexicon detected in infrastructure files"); + } + return Array.from(detectedLexicons); +} +var init_detectLexicon = __esm({ + "node_modules/@intentius/chant/src/detectLexicon.ts"() { + } +}); + // node_modules/@intentius/chant/src/lint/parser.ts -var ts; +var ts4; var init_parser = __esm({ "node_modules/@intentius/chant/src/lint/parser.ts"() { - ts = __toESM(require_typescript(), 1); + ts4 = __toESM(require_typescript(), 1); } }); @@ -227997,193 +231202,195 @@ var init_rule = __esm({ }); // node_modules/@intentius/chant/src/lint/rules/flat-declarations.ts -var ts2; +var ts5; var init_flat_declarations = __esm({ "node_modules/@intentius/chant/src/lint/rules/flat-declarations.ts"() { - ts2 = __toESM(require_typescript(), 1); + ts5 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/export-required.ts -var ts3; +var ts6; var init_export_required = __esm({ "node_modules/@intentius/chant/src/lint/rules/export-required.ts"() { - ts3 = __toESM(require_typescript(), 1); + ts6 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/file-declarable-limit.ts -var ts4; +var ts7; var init_file_declarable_limit = __esm({ "node_modules/@intentius/chant/src/lint/rules/file-declarable-limit.ts"() { - ts4 = __toESM(require_typescript(), 1); + ts7 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/single-concern-file.ts -var ts5; +var ts8; var init_single_concern_file = __esm({ "node_modules/@intentius/chant/src/lint/rules/single-concern-file.ts"() { - ts5 = __toESM(require_typescript(), 1); + ts8 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/declarable-naming-convention.ts -var ts6; +var ts9; var init_declarable_naming_convention = __esm({ "node_modules/@intentius/chant/src/lint/rules/declarable-naming-convention.ts"() { - ts6 = __toESM(require_typescript(), 1); + ts9 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/no-unused-declarable-import.ts -var ts7; +var ts10; var init_no_unused_declarable_import = __esm({ "node_modules/@intentius/chant/src/lint/rules/no-unused-declarable-import.ts"() { - ts7 = __toESM(require_typescript(), 1); + ts10 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/no-redundant-value-cast.ts -var ts8; +var ts11; var init_no_redundant_value_cast = __esm({ "node_modules/@intentius/chant/src/lint/rules/no-redundant-value-cast.ts"() { - ts8 = __toESM(require_typescript(), 1); + ts11 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/no-unused-declarable.ts -var ts9; +var ts12; var init_no_unused_declarable = __esm({ "node_modules/@intentius/chant/src/lint/rules/no-unused-declarable.ts"() { - ts9 = __toESM(require_typescript(), 1); + ts12 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/no-cyclic-declarable-ref.ts -var ts10; +var ts13; var init_no_cyclic_declarable_ref = __esm({ "node_modules/@intentius/chant/src/lint/rules/no-cyclic-declarable-ref.ts"() { - ts10 = __toESM(require_typescript(), 1); + ts13 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/no-redundant-type-import.ts -var ts11; +var ts14; var init_no_redundant_type_import = __esm({ "node_modules/@intentius/chant/src/lint/rules/no-redundant-type-import.ts"() { - ts11 = __toESM(require_typescript(), 1); + ts14 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/no-string-ref.ts -var ts12; +var ts15; var init_no_string_ref = __esm({ "node_modules/@intentius/chant/src/lint/rules/no-string-ref.ts"() { - ts12 = __toESM(require_typescript(), 1); + ts15 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/composite-scope.ts -var ts13; +var ts16; var init_composite_scope = __esm({ "node_modules/@intentius/chant/src/lint/rules/composite-scope.ts"() { - ts13 = __toESM(require_typescript(), 1); + ts16 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/evl001-non-literal-expression.ts -var ts14; +var ts17; var init_evl001_non_literal_expression = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl001-non-literal-expression.ts"() { - ts14 = __toESM(require_typescript(), 1); + ts17 = __toESM(require_typescript(), 1); init_composite_scope(); + init_subset(); } }); // node_modules/@intentius/chant/src/lint/rules/evl002-control-flow-resource.ts -var ts15, CONTROL_FLOW_KINDS; +var ts18, CONTROL_FLOW_KINDS; var init_evl002_control_flow_resource = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl002-control-flow-resource.ts"() { - ts15 = __toESM(require_typescript(), 1); + ts18 = __toESM(require_typescript(), 1); CONTROL_FLOW_KINDS = /* @__PURE__ */ new Set([ - ts15.SyntaxKind.IfStatement, - ts15.SyntaxKind.ForStatement, - ts15.SyntaxKind.ForInStatement, - ts15.SyntaxKind.ForOfStatement, - ts15.SyntaxKind.WhileStatement, - ts15.SyntaxKind.DoStatement, - ts15.SyntaxKind.SwitchStatement, - ts15.SyntaxKind.TryStatement + ts18.SyntaxKind.IfStatement, + ts18.SyntaxKind.ForStatement, + ts18.SyntaxKind.ForInStatement, + ts18.SyntaxKind.ForOfStatement, + ts18.SyntaxKind.WhileStatement, + ts18.SyntaxKind.DoStatement, + ts18.SyntaxKind.SwitchStatement, + ts18.SyntaxKind.TryStatement ]); } }); // node_modules/@intentius/chant/src/lint/rules/evl003-dynamic-property-access.ts -var ts16; +var ts19; var init_evl003_dynamic_property_access = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl003-dynamic-property-access.ts"() { - ts16 = __toESM(require_typescript(), 1); + ts19 = __toESM(require_typescript(), 1); + init_subset(); } }); // node_modules/@intentius/chant/src/lint/rules/evl004-spread-non-const.ts -var ts17; +var ts20; var init_evl004_spread_non_const = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl004-spread-non-const.ts"() { - ts17 = __toESM(require_typescript(), 1); + ts20 = __toESM(require_typescript(), 1); init_composite_scope(); } }); // node_modules/@intentius/chant/src/lint/rules/evl005-resource-block-body.ts -var ts18; +var ts21; var init_evl005_resource_block_body = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl005-resource-block-body.ts"() { - ts18 = __toESM(require_typescript(), 1); + ts21 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/evl007-invalid-siblings.ts -var ts19; +var ts22; var init_evl007_invalid_siblings = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl007-invalid-siblings.ts"() { - ts19 = __toESM(require_typescript(), 1); + ts22 = __toESM(require_typescript(), 1); } }); // node_modules/@intentius/chant/src/lint/rules/evl009-composite-no-constant.ts -var ts20; +var ts23; var init_evl009_composite_no_constant = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl009-composite-no-constant.ts"() { - ts20 = __toESM(require_typescript(), 1); + ts23 = __toESM(require_typescript(), 1); init_composite_scope(); } }); // node_modules/@intentius/chant/src/lint/rules/evl010-composite-no-transform.ts -var ts21; +var ts24; var init_evl010_composite_no_transform = __esm({ "node_modules/@intentius/chant/src/lint/rules/evl010-composite-no-transform.ts"() { - ts21 = __toESM(require_typescript(), 1); + ts24 = __toESM(require_typescript(), 1); init_composite_scope(); } }); // node_modules/@intentius/chant/src/lint/rules/cor017-composite-name-match.ts -var ts22; +var ts25; var init_cor017_composite_name_match = __esm({ "node_modules/@intentius/chant/src/lint/rules/cor017-composite-name-match.ts"() { - ts22 = __toESM(require_typescript(), 1); + ts25 = __toESM(require_typescript(), 1); init_composite_scope(); } }); // node_modules/@intentius/chant/src/lint/rules/cor018-composite-prefer-lexicon-type.ts -var ts23; +var ts26; var init_cor018_composite_prefer_lexicon_type = __esm({ "node_modules/@intentius/chant/src/lint/rules/cor018-composite-prefer-lexicon-type.ts"() { - ts23 = __toESM(require_typescript(), 1); + ts26 = __toESM(require_typescript(), 1); init_composite_scope(); } }); @@ -228244,45 +231451,45 @@ function collectNodes(root, predicate) { if (predicate(node)) { results.push(node); } - ts24.forEachChild(node, visit); + ts27.forEachChild(node, visit); } visit(root); return results; } function selectResource(sf) { - return collectNodes(sf, (node) => ts24.isNewExpression(node)); + return collectNodes(sf, (node) => ts27.isNewExpression(node)); } function selectAnyResource(sf) { return selectResource(sf); } function selectStringLiteral(sf) { - return collectNodes(sf, (node) => ts24.isStringLiteral(node)); + return collectNodes(sf, (node) => ts27.isStringLiteral(node)); } function selectExportName(sf) { return collectNodes(sf, (node) => { - if (ts24.isVariableStatement(node)) { - return node.modifiers?.some((m) => m.kind === ts24.SyntaxKind.ExportKeyword) ?? false; + if (ts27.isVariableStatement(node)) { + return node.modifiers?.some((m) => m.kind === ts27.SyntaxKind.ExportKeyword) ?? false; } - if (ts24.isFunctionDeclaration(node) || ts24.isClassDeclaration(node)) { - return node.modifiers?.some((m) => m.kind === ts24.SyntaxKind.ExportKeyword) ?? false; + if (ts27.isFunctionDeclaration(node) || ts27.isClassDeclaration(node)) { + return node.modifiers?.some((m) => m.kind === ts27.SyntaxKind.ExportKeyword) ?? false; } return false; }); } function selectImportSource(sf) { return collectNodes(sf, (node) => { - if (ts24.isImportDeclaration(node)) { + if (ts27.isImportDeclaration(node)) { return true; } return false; }); } function selectProperty(sf) { - return collectNodes(sf, (node) => ts24.isPropertyAssignment(node)); + return collectNodes(sf, (node) => ts27.isPropertyAssignment(node)); } function selectResourceType(sf) { return collectNodes(sf, (node) => { - if (ts24.isNewExpression(node) && node.typeArguments && node.typeArguments.length > 0) { + if (ts27.isNewExpression(node) && node.typeArguments && node.typeArguments.length > 0) { return true; } return false; @@ -228290,16 +231497,16 @@ function selectResourceType(sf) { } function selectExportedConst(sf) { return collectNodes(sf, (node) => { - if (!ts24.isVariableStatement(node)) return false; - const hasExport = node.modifiers?.some((m) => m.kind === ts24.SyntaxKind.ExportKeyword) ?? false; + if (!ts27.isVariableStatement(node)) return false; + const hasExport = node.modifiers?.some((m) => m.kind === ts27.SyntaxKind.ExportKeyword) ?? false; if (!hasExport) return false; - return node.declarationList.flags === ts24.NodeFlags.Const || (node.declarationList.flags & ts24.NodeFlags.Const) !== 0; + return node.declarationList.flags === ts27.NodeFlags.Const || (node.declarationList.flags & ts27.NodeFlags.Const) !== 0; }); } -var ts24, selectorRegistry, builtins; +var ts27, selectorRegistry, builtins; var init_selectors = __esm({ "node_modules/@intentius/chant/src/lint/selectors.ts"() { - ts24 = __toESM(require_typescript(), 1); + ts27 = __toESM(require_typescript(), 1); selectorRegistry = /* @__PURE__ */ new Map(); builtins = [ ["resource", selectResource], @@ -228340,6 +231547,92 @@ var init_post_synth = __esm({ } }); +// node_modules/@intentius/chant/src/runtime-adapter.ts +import { dirname as dirname7 } from "path"; +import { fileURLToPath } from "url"; +function moduleDir(importMetaUrl) { + return dirname7(fileURLToPath(importMetaUrl)); +} +var init_runtime_adapter = __esm({ + "node_modules/@intentius/chant/src/runtime-adapter.ts"() { + } +}); + +// node_modules/@intentius/chant/src/lint/presets/strict.json +var strict_default; +var init_strict = __esm({ + "node_modules/@intentius/chant/src/lint/presets/strict.json"() { + strict_default = { + rules: { + COR001: "error", + COR002: "error", + COR003: "warning", + COR004: "warning", + COR005: "warning", + COR006: "error", + COR007: "warning", + COR008: "error", + COR009: "warning", + COR010: "warning", + COR011: "error", + COR012: "warning", + COR013: "info", + COR014: "warning", + COR015: "warning", + COMP001: "error", + COMP002: "error", + COMP003: "error", + COMP004: "error", + COMP005: "error", + COMP006: "error", + COMP007: "warning" + } + }; + } +}); + +// node_modules/@intentius/chant/src/lint/config.ts +import { join as join7, dirname as dirname8, resolve as resolve3 } from "path"; +var BUILTIN_PRESETS, SeveritySchema, RuleConfigSchema, LintConfigSchema, DEFAULT_CONFIG; +var init_config2 = __esm({ + "node_modules/@intentius/chant/src/lint/config.ts"() { + init_zod(); + init_config_sandbox(); + init_runtime_adapter(); + init_strict(); + init_project_root(); + BUILTIN_PRESETS = { + "@intentius/chant/lint/presets/strict": resolve3(moduleDir(import.meta.url), "presets/strict.json"), + "@intentius/chant/lint/presets/relaxed": resolve3(moduleDir(import.meta.url), "presets/relaxed.json") + }; + SeveritySchema = external_exports.enum(["off", "error", "warning", "info"]); + RuleConfigSchema = external_exports.union([ + SeveritySchema, + external_exports.tuple([SeveritySchema, external_exports.record(external_exports.string(), external_exports.unknown())]) + ]); + LintConfigSchema = external_exports.object({ + rules: external_exports.record(external_exports.string(), RuleConfigSchema).optional(), + extends: external_exports.array(external_exports.string()).optional(), + overrides: external_exports.array(external_exports.object({ + files: external_exports.array(external_exports.string()), + rules: external_exports.record(external_exports.string(), RuleConfigSchema) + })).optional(), + plugins: external_exports.array(external_exports.string()).optional(), + policies: external_exports.array(external_exports.string()).optional() + }); + DEFAULT_CONFIG = { + rules: { ...strict_default.rules }, + extends: [] + }; + } +}); + +// node_modules/@intentius/chant/src/lint/policy-import.ts +var init_policy_import = __esm({ + "node_modules/@intentius/chant/src/lint/policy-import.ts"() { + } +}); + // node_modules/@intentius/chant/src/lint/policy.ts var init_policy = __esm({ "node_modules/@intentius/chant/src/lint/policy.ts"() { @@ -228347,6 +231640,8 @@ var init_policy = __esm({ init_plugins(); init_build(); init_post_synth(); + init_config2(); + init_policy_import(); } }); @@ -228357,11 +231652,11 @@ var init_rule_loader = __esm({ }); // node_modules/@intentius/chant/src/lint/discover.ts -import { createRequire } from "module"; +import { createRequire as createRequire2 } from "module"; var init_discover = __esm({ "node_modules/@intentius/chant/src/lint/discover.ts"() { try { - const _req = createRequire(import.meta.url); + const _req = createRequire2(import.meta.url); const { register } = _req("tsx/cjs/api"); register(); } catch { @@ -228381,9 +231676,27 @@ var init_generator = __esm({ } }); -// node_modules/@intentius/chant/src/runtime-adapter.ts -var init_runtime_adapter = __esm({ - "node_modules/@intentius/chant/src/runtime-adapter.ts"() { +// node_modules/@intentius/chant/src/observation.ts +var init_observation = __esm({ + "node_modules/@intentius/chant/src/observation.ts"() { + } +}); + +// node_modules/@intentius/chant/src/apply.ts +var init_apply = __esm({ + "node_modules/@intentius/chant/src/apply.ts"() { + } +}); + +// node_modules/@intentius/chant/src/deep-observation.ts +var init_deep_observation = __esm({ + "node_modules/@intentius/chant/src/deep-observation.ts"() { + } +}); + +// node_modules/@intentius/chant/src/owner-chain.ts +var init_owner_chain = __esm({ + "node_modules/@intentius/chant/src/owner-chain.ts"() { } }); @@ -228409,7 +231722,14 @@ var init_lexicon_schema = __esm({ name: external_exports.string().min(1, "intrinsic name must not be empty"), description: external_exports.string().optional(), outputKey: external_exports.string().optional(), - isTag: external_exports.boolean().optional() + // Required (chant #1067) — no silent default for whether an intrinsic + // folds. See IntrinsicDef.isTag in ../lexicon.ts for the history. + isTag: external_exports.boolean(), + // chant #1044 — optional and default-off on purpose: absent means "this + // intrinsic's plain-call form does not fold", which is what every + // registration written before #1044 means. Only an explicit `true` opts a + // call into folding. See IntrinsicDef.foldsAsCall in ../lexicon.ts. + foldsAsCall: external_exports.boolean().optional() }); semverRegex = /^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?(\+[a-zA-Z0-9.]+)?$/; LexiconManifestSchema = external_exports.object({ @@ -228500,10 +231820,44 @@ var init_generate = __esm({ } }); +// node_modules/@intentius/chant/src/codegen/docs-file-markers.ts +var init_docs_file_markers = __esm({ + "node_modules/@intentius/chant/src/codegen/docs-file-markers.ts"() { + } +}); + +// node_modules/@intentius/chant/src/codegen/docs-rule-scanning.ts +var init_docs_rule_scanning = __esm({ + "node_modules/@intentius/chant/src/codegen/docs-rule-scanning.ts"() { + init_docs_file_markers(); + } +}); + +// node_modules/@intentius/chant/src/okf.ts +var init_okf = __esm({ + "node_modules/@intentius/chant/src/okf.ts"() { + init_graph_ir(); + init_lexicon_output(); + init_provenance(); + init_yaml(); + } +}); + +// node_modules/@intentius/chant/src/codegen/okf-lexicon.ts +var ts28; +var init_okf_lexicon = __esm({ + "node_modules/@intentius/chant/src/codegen/okf-lexicon.ts"() { + ts28 = __toESM(require_typescript(), 1); + init_okf(); + } +}); + // node_modules/@intentius/chant/src/codegen/package.ts var init_package = __esm({ "node_modules/@intentius/chant/src/codegen/package.ts"() { init_lexicon_integrity(); + init_docs_rule_scanning(); + init_okf_lexicon(); } }); @@ -228520,23 +231874,17 @@ var init_coverage = __esm({ } }); +// node_modules/@intentius/chant/src/codegen/surface-snapshot.ts +var init_surface_snapshot = __esm({ + "node_modules/@intentius/chant/src/codegen/surface-snapshot.ts"() { + } +}); + // node_modules/@intentius/chant/src/codegen/validate.ts var init_validate = __esm({ "node_modules/@intentius/chant/src/codegen/validate.ts"() { init_coverage(); - } -}); - -// node_modules/@intentius/chant/src/codegen/docs-file-markers.ts -var init_docs_file_markers = __esm({ - "node_modules/@intentius/chant/src/codegen/docs-file-markers.ts"() { - } -}); - -// node_modules/@intentius/chant/src/codegen/docs-rule-scanning.ts -var init_docs_rule_scanning = __esm({ - "node_modules/@intentius/chant/src/codegen/docs-rule-scanning.ts"() { - init_docs_file_markers(); + init_surface_snapshot(); } }); @@ -228550,6 +231898,7 @@ var init_docs_sidebar = __esm({ var init_docs_sections = __esm({ "node_modules/@intentius/chant/src/codegen/docs-sections.ts"() { init_docs_file_markers(); + init_lexicon(); } }); @@ -228564,6 +231913,30 @@ var init_docs = __esm({ } }); +// node_modules/@intentius/chant/src/codegen/lexicon-regen.ts +var init_lexicon_regen = __esm({ + "node_modules/@intentius/chant/src/codegen/lexicon-regen.ts"() { + init_surface_snapshot(); + } +}); + +// node_modules/@intentius/chant/src/codegen/rolling-upgrade.ts +var init_rolling_upgrade = __esm({ + "node_modules/@intentius/chant/src/codegen/rolling-upgrade.ts"() { + init_surface_snapshot(); + init_lexicon_regen(); + } +}); + +// node_modules/@intentius/chant/src/codegen/pinned-upgrade.ts +var init_pinned_upgrade = __esm({ + "node_modules/@intentius/chant/src/codegen/pinned-upgrade.ts"() { + init_lexicon_regen(); + init_fetch(); + init_lexicon(); + } +}); + // node_modules/@intentius/chant/src/runtime.ts function createResource(type, lexicon, attrMap) { const ResourceClass = function(props, attributes) { @@ -228602,6 +231975,8 @@ var init_resource_attributes = __esm({ var init_stack_output = __esm({ "node_modules/@intentius/chant/src/stack-output.ts"() { init_declarable(); + init_intrinsic(); + init_utils(); } }); @@ -228644,12 +232019,84 @@ var init_digest = __esm({ } }); +// node_modules/@intentius/chant/src/lifecycle/observation-baseline.ts +var init_observation_baseline = __esm({ + "node_modules/@intentius/chant/src/lifecycle/observation-baseline.ts"() { + init_git(); + init_utils(); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/deep-diff.ts +var init_deep_diff = __esm({ + "node_modules/@intentius/chant/src/lifecycle/deep-diff.ts"() { + init_deep_observation(); + init_observation_baseline(); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/deep-observe.ts +var init_deep_observe = __esm({ + "node_modules/@intentius/chant/src/lifecycle/deep-observe.ts"() { + init_deep_observation(); + init_observation(); + init_deep_diff(); + } +}); + +// node_modules/@intentius/chant/src/op/activity-runtime.ts +var init_activity_runtime = __esm({ + "node_modules/@intentius/chant/src/op/activity-runtime.ts"() { + } +}); + +// node_modules/@intentius/chant/src/op/emulator-lifecycle.ts +import { exec } from "node:child_process"; +import { promisify } from "node:util"; +var execAsync; +var init_emulator_lifecycle = __esm({ + "node_modules/@intentius/chant/src/op/emulator-lifecycle.ts"() { + init_activity_runtime(); + execAsync = promisify(exec); + } +}); + +// node_modules/@intentius/chant/src/live-endpoint.ts +var init_live_endpoint = __esm({ + "node_modules/@intentius/chant/src/live-endpoint.ts"() { + init_config(); + init_emulator_lifecycle(); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/identity.ts +var init_identity = __esm({ + "node_modules/@intentius/chant/src/lifecycle/identity.ts"() { + } +}); + +// node_modules/@intentius/chant/src/lifecycle/observe.ts +var init_observe = __esm({ + "node_modules/@intentius/chant/src/lifecycle/observe.ts"() { + init_build(); + init_observation(); + init_live_endpoint(); + init_identity(); + init_declarable(); + } +}); + // node_modules/@intentius/chant/src/lifecycle/snapshot.ts var init_snapshot = __esm({ "node_modules/@intentius/chant/src/lifecycle/snapshot.ts"() { + init_deep_observe(); init_digest(); + init_observe(); init_git(); init_utils(); + init_observation(); + init_deep_observation(); + init_declarable(); } }); @@ -228663,18 +232110,80 @@ var init_live_diff = __esm({ var init_change_set = __esm({ "node_modules/@intentius/chant/src/lifecycle/change-set.ts"() { init_live_diff(); + init_observation(); } }); // node_modules/@intentius/chant/src/lifecycle/affected.ts import { execFile } from "node:child_process"; -import { promisify } from "node:util"; +import { promisify as promisify2 } from "node:util"; var execFileAsync; var init_affected = __esm({ "node_modules/@intentius/chant/src/lifecycle/affected.ts"() { init_build(); init_post_synth(); - execFileAsync = promisify(execFile); + execFileAsync = promisify2(execFile); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/release-ledger.ts +var init_release_ledger = __esm({ + "node_modules/@intentius/chant/src/lifecycle/release-ledger.ts"() { + init_utils(); + init_git(); + } +}); + +// node_modules/@intentius/chant/src/components/verbs/reproducibility.ts +var init_reproducibility = __esm({ + "node_modules/@intentius/chant/src/components/verbs/reproducibility.ts"() { + } +}); + +// node_modules/@intentius/chant/src/components/verbs/build-archive.ts +var init_build_archive = __esm({ + "node_modules/@intentius/chant/src/components/verbs/build-archive.ts"() { + init_reproducibility(); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/build-ledger.ts +var init_build_ledger = __esm({ + "node_modules/@intentius/chant/src/lifecycle/build-ledger.ts"() { + init_build_archive(); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/build-ledger-store.ts +var init_build_ledger_store = __esm({ + "node_modules/@intentius/chant/src/lifecycle/build-ledger-store.ts"() { + init_utils(); + init_git(); + } +}); + +// node_modules/@intentius/chant/src/components/verbs/process-runner.ts +import { exec as exec2 } from "node:child_process"; +import { promisify as promisify3 } from "node:util"; +var execAsync2; +var init_process_runner = __esm({ + "node_modules/@intentius/chant/src/components/verbs/process-runner.ts"() { + execAsync2 = promisify3(exec2); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/oras-referrer-lookup.ts +var init_oras_referrer_lookup = __esm({ + "node_modules/@intentius/chant/src/lifecycle/oras-referrer-lookup.ts"() { + init_process_runner(); + } +}); + +// node_modules/@intentius/chant/src/lifecycle/status.ts +var init_status = __esm({ + "node_modules/@intentius/chant/src/lifecycle/status.ts"() { + init_release_ledger(); + init_observation(); } }); @@ -228686,8 +232195,16 @@ var init_lifecycle = __esm({ init_digest(); init_snapshot(); init_live_diff(); + init_deep_diff(); + init_deep_observe(); + init_observation_baseline(); init_change_set(); init_affected(); + init_release_ledger(); + init_build_ledger(); + init_build_ledger_store(); + init_oras_referrer_lookup(); + init_status(); } }); @@ -228707,6 +232224,12 @@ var init_builders = __esm({ } }); +// node_modules/@intentius/chant/src/op/emulator-freshness.ts +var init_emulator_freshness = __esm({ + "node_modules/@intentius/chant/src/op/emulator-freshness.ts"() { + } +}); + // node_modules/@intentius/chant/src/op/discover.ts var init_discover2 = __esm({ "node_modules/@intentius/chant/src/op/discover.ts"() { @@ -228740,6 +232263,9 @@ var init_op = __esm({ "node_modules/@intentius/chant/src/op/index.ts"() { init_builders(); init_resource(); + init_activity_runtime(); + init_emulator_lifecycle(); + init_emulator_freshness(); init_discover2(); init_activity_registry(); init_local_executor(); @@ -228753,6 +232279,7 @@ var init_src = __esm({ init_declarable(); init_composite(); init_provenance(); + init_build_params(); init_intrinsic(); init_types(); init_errors3(); @@ -228771,6 +232298,7 @@ var init_src = __esm({ init_discovery(); init_cache(); init_build(); + init_env(); init_graph_ir(); init_graph_detail(); init_graph_mermaid(); @@ -228778,6 +232306,7 @@ var init_src = __esm({ init_graph_layout(); init_graph_lens(); init_detectLexicon(); + init_fold(); init_parser(); init_rule(); init_rules(); @@ -228791,6 +232320,10 @@ var init_src = __esm({ init_parser2(); init_generator(); init_lexicon(); + init_observation(); + init_apply(); + init_deep_observation(); + init_owner_chain(); init_lexicon_integrity(); init_lexicon_manifest(); init_lexicon_schema(); @@ -228805,6 +232338,10 @@ var init_src = __esm({ init_coverage(); init_validate(); init_docs(); + init_surface_snapshot(); + init_lexicon_regen(); + init_rolling_upgrade(); + init_pinned_upgrade(); init_runtime(); init_runtime_adapter(); init_resource_attributes(); @@ -228818,6 +232355,35 @@ var init_src = __esm({ } }); +// node_modules/@intentius/chant/src/cli/command-group.ts +var RESERVED_COMMAND_NAMES; +var init_command_group = __esm({ + "node_modules/@intentius/chant/src/cli/command-group.ts"() { + RESERVED_COMMAND_NAMES = /* @__PURE__ */ new Set([ + "build", + "lint", + "list", + "describe", + "import", + "audit", + "migrate", + "carve", + "init", + "update", + "doctor", + "dev", + "run", + "graph", + "vendor", + "lifecycle", + "lc", + "components", + "emulator", + "serve" + ]); + } +}); + // node_modules/@intentius/chant/src/cli/conflict-check.ts function checkConflicts(plugins) { const conflicts = []; @@ -228878,20 +232444,39 @@ function checkConflicts(plugins) { warnings.push({ type: "mcp-resource", key: uri, plugins: owners }); } } + const commandGroupNames = /* @__PURE__ */ new Map(); + for (const plugin of plugins) { + const group = plugin.commands?.(); + if (!group) continue; + const existing = commandGroupNames.get(group.name) ?? []; + existing.push(plugin.name); + commandGroupNames.set(group.name, existing); + } + for (const [name, owners] of commandGroupNames) { + if (owners.length > 1 || RESERVED_COMMAND_NAMES.has(name)) { + conflicts.push({ type: "command-group-name", key: name, plugins: owners }); + } + } return { conflicts, warnings }; } var init_conflict_check = __esm({ "node_modules/@intentius/chant/src/cli/conflict-check.ts"() { + init_command_group(); } }); // node_modules/@intentius/chant/src/cli/plugins.ts var plugins_exports = {}; __export(plugins_exports, { + collectBuildRootContributors: () => collectBuildRootContributors, loadPlugin: () => loadPlugin, loadPlugins: () => loadPlugins, + resolveLexiconVersions: () => resolveLexiconVersions, resolveProjectLexicons: () => resolveProjectLexicons }); +import { createRequire as createRequire3 } from "node:module"; +import { dirname as dirname9, join as join8 } from "node:path"; +import { existsSync as existsSync5, readFileSync as readFileSync4 } from "node:fs"; async function loadPlugin(lexiconName) { const packageName = `@intentius/chant-lexicon-${lexiconName}`; const mod = await import(packageName); @@ -228916,6 +232501,34 @@ async function loadPlugin(lexiconName) { } throw new Error(`Package ${packageName} does not export a LexiconPlugin or Serializer`); } +function resolveLexiconVersions(lexiconNames) { + const require_ = createRequire3(import.meta.url); + const versions = {}; + for (const name of lexiconNames) { + const packageName = `@intentius/chant-lexicon-${name}`; + try { + let dir = dirname9(require_.resolve(packageName)); + for (let depth = 0; depth < 10; depth++) { + const candidate = join8(dir, "package.json"); + if (existsSync5(candidate)) { + const pkg = JSON.parse(readFileSync4(candidate, "utf-8")); + if (pkg.name === packageName && pkg.version) { + versions[name] = pkg.version; + break; + } + } + const parent = dirname9(dir); + if (parent === dir) break; + dir = parent; + } + } catch { + } + } + return versions; +} +function collectBuildRootContributors(plugins, config2, projectRoot) { + return (plugins ?? []).filter((plugin) => typeof plugin.buildRoots === "function").map((plugin) => () => plugin.buildRoots({ projectRoot, config: config2 })); +} async function loadPlugins(lexiconNames) { const plugins = []; for (const name of lexiconNames) { @@ -228941,12 +232554,12 @@ ${details}` return plugins; } async function resolveProjectLexicons(projectPath) { - const { config: config2 } = await loadChantConfig(projectPath); + const { config: config2 } = await loadChantConfigUpward(projectPath); if (config2.lexicons && config2.lexicons.length > 0) { return config2.lexicons; } - const discoveryResult = await discover(projectPath); - return detectLexicons(discoveryResult.sourceFiles); + const files = await findInfraFiles(projectPath); + return detectLexicons(files); } var init_plugins = __esm({ "node_modules/@intentius/chant/src/cli/plugins.ts"() { @@ -228966,8 +232579,8 @@ __export(discover_exports, { isCandidatePath: () => isCandidatePath, loadAuditPlugins: () => loadAuditPlugins }); -import { readdirSync, readFileSync, statSync } from "fs"; -import { basename, join as join3, relative as relative2 } from "path"; +import { readdirSync, readFileSync as readFileSync5, statSync as statSync2 } from "fs"; +import { basename, join as join9, relative as relative2 } from "path"; async function loadAuditPlugins(names = AUDIT_LEXICONS) { const { loadPlugin: loadPlugin2 } = await Promise.resolve().then(() => (init_plugins(), plugins_exports)); const plugins = []; @@ -228991,15 +232604,15 @@ function walkFiles(dir, out) { if (out.length >= MAX_WALK_FILES) return; if (e.name.startsWith(".") && e.isDirectory() && !WALK_DOT_DIRS.has(e.name)) continue; if (WALK_SKIP.has(e.name)) continue; - const full = join3(dir, e.name); + const full = join9(dir, e.name); if (e.isDirectory()) walkFiles(full, out); else out.push(full); } } function readSafe(full) { try { - if (statSync(full).size > MAX_FILE_BYTES) return void 0; - return readFileSync(full, "utf-8"); + if (statSync2(full).size > MAX_FILE_BYTES) return void 0; + return readFileSync5(full, "utf-8"); } catch { return void 0; } @@ -229170,7 +232783,7 @@ var init_discover3 = __esm({ }); // src/cli.ts -import { readFileSync as readFileSync2, writeFileSync } from "node:fs"; +import { readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs"; import { pathToFileURL } from "node:url"; // src/config/load.ts @@ -229269,8 +232882,8 @@ function normalizeTeams(raw, field) { if (raw === void 0) return void 0; const obj = assertObject(raw, field); const result = {}; - for (const [slug, teamRaw] of Object.entries(obj)) { - result[slug] = normalizeTeamConfig(teamRaw, `${field}.${slug}`); + for (const [slug2, teamRaw] of Object.entries(obj)) { + result[slug2] = normalizeTeamConfig(teamRaw, `${field}.${slug2}`); } return result; } @@ -229482,6 +233095,7 @@ function buildProtectionBody(desired, live) { } var branchProtectionCycle = { name: "branch-protection", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -229602,6 +233216,7 @@ function buildOrgPatchBody(desired) { } var orgSettingsCycle = { name: "org-settings", + verb: "org-unit", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, _scope, budget) { if (budget.exhausted) { @@ -229690,6 +233305,7 @@ function buildRepoPatchBody(desired) { } var repoSettingsCycle = { name: "repo-settings", + verb: "org-unit", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -229778,6 +233394,7 @@ async function listOrgMembers(client, orgLogin, role, budget) { } var membershipCycle = { name: "membership", + verb: "membership", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, _scope, budget) { if (budget.exhausted) { @@ -229844,15 +233461,15 @@ function mapTeamRepoPermission(repo) { if (p.triage) return "triage"; return "pull"; } -async function fetchTeamMembers(client, org, slug, budget) { +async function fetchTeamMembers(client, org, slug2, budget) { const maintainers = await paginate( client, - (page) => `/orgs/${org}/teams/${slug}/members?role=maintainer&per_page=${PER_PAGE2}&page=${page}`, + (page) => `/orgs/${org}/teams/${slug2}/members?role=maintainer&per_page=${PER_PAGE2}&page=${page}`, budget ); const members = await paginate( client, - (page) => `/orgs/${org}/teams/${slug}/members?role=member&per_page=${PER_PAGE2}&page=${page}`, + (page) => `/orgs/${org}/teams/${slug2}/members?role=member&per_page=${PER_PAGE2}&page=${page}`, budget ); return [ @@ -229860,17 +233477,17 @@ async function fetchTeamMembers(client, org, slug, budget) { ...members.map((m) => ({ login: m.login, role: "member" })) ]; } -async function fetchTeamRepos(client, org, slug, budget) { +async function fetchTeamRepos(client, org, slug2, budget) { const repos = await paginate( client, - (page) => `/orgs/${org}/teams/${slug}/repos?per_page=${PER_PAGE2}&page=${page}`, + (page) => `/orgs/${org}/teams/${slug2}/repos?per_page=${PER_PAGE2}&page=${page}`, budget ); return repos.map((r) => ({ name: r.name, permission: mapTeamRepoPermission(r) })); } -async function buildTeamBody(client, org, slug, desired, includeName, budget) { +async function buildTeamBody(client, org, slug2, desired, includeName, budget) { const body = {}; - if (includeName) body.name = slug; + if (includeName) body.name = slug2; if (desired.description !== void 0) body.description = desired.description; if (desired.privacy !== void 0) body.privacy = desired.privacy; if (desired.parentTeamSlug !== void 0) { @@ -229896,6 +233513,7 @@ function splitKey(key, resourceType) { } var teamsCycle = { name: "teams", + verb: "membership", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -229947,41 +233565,41 @@ var teamsCycle = { } }; async function applyTeam(client, entry, org, budget) { - const slug = entry.key; + const slug2 = entry.key; if (entry.kind === "delete") { budget.use(1); - await client.request("DELETE", `/orgs/${org}/teams/${slug}`); + await client.request("DELETE", `/orgs/${org}/teams/${slug2}`); return; } const desired = entry.after; if (entry.kind === "create") { - const body2 = await buildTeamBody(client, org, slug, desired, true, budget); + const body2 = await buildTeamBody(client, org, slug2, desired, true, budget); budget.use(1); await client.request("POST", `/orgs/${org}/teams`, body2); for (const m of desired.members ?? []) { budget.use(1); await client.request( "PUT", - `/orgs/${org}/teams/${slug}/memberships/${encodeURIComponent(m.login)}`, + `/orgs/${org}/teams/${slug2}/memberships/${encodeURIComponent(m.login)}`, { role: m.role ?? "member" } ); } for (const r of desired.repos ?? []) { budget.use(1); - await client.request("PUT", `/orgs/${org}/teams/${slug}/repos/${org}/${r.name}`, { + await client.request("PUT", `/orgs/${org}/teams/${slug2}/repos/${org}/${r.name}`, { permission: r.permission }); } return; } - const body = await buildTeamBody(client, org, slug, desired, false, budget); + const body = await buildTeamBody(client, org, slug2, desired, false, budget); if (Object.keys(body).length === 0) return; budget.use(1); - await client.request("PATCH", `/orgs/${org}/teams/${slug}`, body); + await client.request("PATCH", `/orgs/${org}/teams/${slug2}`, body); } async function applyTeamMember(client, entry, org, budget) { - const [slug, login] = splitKey(entry.key, "team-member"); - const path = `/orgs/${org}/teams/${slug}/memberships/${encodeURIComponent(login)}`; + const [slug2, login] = splitKey(entry.key, "team-member"); + const path = `/orgs/${org}/teams/${slug2}/memberships/${encodeURIComponent(login)}`; if (entry.kind === "delete") { budget.use(1); await client.request("DELETE", path); @@ -229992,8 +233610,8 @@ async function applyTeamMember(client, entry, org, budget) { await client.request("PUT", path, { role: after.role ?? "member" }); } async function applyTeamRepo(client, entry, org, budget) { - const [slug, repo] = splitKey(entry.key, "team-repo"); - const path = `/orgs/${org}/teams/${slug}/repos/${org}/${repo}`; + const [slug2, repo] = splitKey(entry.key, "team-repo"); + const path = `/orgs/${org}/teams/${slug2}/repos/${org}/${repo}`; if (entry.kind === "delete") { budget.use(1); await client.request("DELETE", path); @@ -230083,6 +233701,7 @@ async function applyRuleset(client, entry, basePath, budget) { } var rulesetsCycle = { name: "rulesets", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -230199,6 +233818,7 @@ function buildSecurityAnalysisBody(desired) { } var securityFeaturesCycle = { name: "security-features", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -230310,6 +233930,7 @@ async function fetchRepoEnvironments(client, org, repo, budget) { } var environmentsCycle = { name: "environments", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -230474,6 +234095,7 @@ async function applyVariable(client, entry, org, budget) { } var secretsVariablesCycle = { name: "secrets-variables", + verb: "secret-material", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -230562,6 +234184,7 @@ async function fetchDependabot(client, org, repo, budget) { } var dependencyHygieneCycle = { name: "dependency-hygiene", + verb: "policy-guardrail", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, scope, budget) { if (budget.exhausted) { @@ -230630,6 +234253,7 @@ async function listOrgRepoNames(client, orgLogin, budget) { } var repoBaselineCycle = { name: "repo-baseline", + verb: "org-unit", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, _scope, budget) { if (budget.exhausted) { @@ -230694,6 +234318,7 @@ function mapTokenGrant(raw) { } var tokenGovernanceCycle = { name: "token-governance", + verb: "identity-assignment", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, _scope, budget) { if (budget.exhausted) { @@ -230759,6 +234384,7 @@ function mapTokenRequest(raw) { } var tokenApprovalCycle = { name: "token-approval", + verb: "identity-assignment", // ── Part 2: fetchLive ────────────────────────────────────────────────────── async fetchLive(client, orgLogin, _scope, budget) { if (budget.exhausted) { @@ -230895,16 +234521,63 @@ async function defaultBranch(host, owner, repo, doFetch, headers, ms) { } async function listTree(host, owner, repo, ref, doFetch, headers, ms) { if (host.kind === "gitlab") { + if ("PRIVATE-TOKEN" in headers) { + const out2 = []; + const seen = /* @__PURE__ */ new Set(); + const addPath = (p) => { + if (typeof p === "string" && !seen.has(p)) { + seen.add(p); + out2.push({ path: p, type: "blob" }); + } + }; + const SEARCH_TERMS = [ + "AWSTemplateFormatVersion", + // CloudFormation + "deploymentTemplate", + // Azure ARM ($schema substring) + "cnrm.cloud.google.com", + // GCP Config Connector + "apiVersion: v2", + // Helm Chart.yaml + "stages:", + // GitLab CI — root file + non-canonical includes (#520) + "FROM ", + // Dockerfiles (content-based; space avoids false matches) + "services:", + // Docker Compose + "apiVersion" + // k8s manifests (broad; runs last) + ]; + for (const term of SEARCH_TERMS) { + for (let page = 1; page <= 3; page++) { + const url3 = `${host.api}/projects/${projectId(owner, repo)}/search?scope=blobs&search=${encodeURIComponent(term)}&per_page=100&page=${page}&ref=${encodeURIComponent(ref)}`; + const { body: body2 } = await getJsonAt(url3, headers, doFetch, ms); + if (!Array.isArray(body2) || body2.length === 0) break; + for (const e of body2) addPath(e.path); + if (body2.length < 100) break; + } + } + return out2; + } const out = []; - const MAX_PAGES = 20; - for (let page = 1; page <= MAX_PAGES; page++) { - const url3 = `${host.api}/projects/${projectId(owner, repo)}/repository/tree?recursive=true&per_page=100&page=${page}&ref=${encodeURIComponent(ref)}`; - const { body: body2 } = await getJsonAt(url3, headers, doFetch, ms); - if (!Array.isArray(body2) || body2.length === 0) break; - for (const e of body2) { - if (e.type === "blob") out.push({ path: e.path, type: "blob" }); - } - if (body2.length < 100) break; + const queue = [""]; + const MAX_DIRS = 30; + const MAX_BLOBS = 200; + let dirs = 0; + while (queue.length > 0 && dirs < MAX_DIRS && out.length < MAX_BLOBS) { + const dir = queue.shift(); + dirs++; + const pathParam = dir ? `&path=${encodeURIComponent(dir)}` : ""; + for (let page = 1; page <= 5; page++) { + const url3 = `${host.api}/projects/${projectId(owner, repo)}/repository/tree?per_page=100&page=${page}&ref=${encodeURIComponent(ref)}${pathParam}`; + const { body: body2 } = await getJsonAt(url3, headers, doFetch, ms); + if (!Array.isArray(body2) || body2.length === 0) break; + for (const e of body2) { + if (e.type === "blob") out.push({ path: e.path, type: "blob" }); + else if (e.type === "tree") queue.push(e.path); + } + if (body2.length < 100) break; + } } return out; } @@ -231089,510 +234762,19 @@ function auditLexicon(lexicon, files, checks) { } // node_modules/@intentius/chant/src/audit/catalog.ts -var SCORECARD_TOKEN = { - name: "OSSF Scorecard \u2014 Token-Permissions", - url: "https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions" -}; -var GH_TOKEN = { - name: "GitHub \u2014 Automatic token authentication", - url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication" -}; -var SCORECARD_PINNED = { - name: "OSSF Scorecard \u2014 Pinned-Dependencies", - url: "https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies" -}; -var GH_THIRD_PARTY = { - name: "GitHub \u2014 Using third-party actions", - url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions" -}; -var GH_INJECTION = { - name: "GitHub \u2014 Understanding the risk of script injections", - url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections" -}; -var GH_PWN = { - name: "GitHub Security Lab \u2014 Preventing pwn requests", - url: "https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/" -}; -var GH_SECRETS = { - name: "GitHub \u2014 Using secrets in GitHub Actions", - url: "https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions" -}; -var GH_OIDC = { - name: "GitHub \u2014 Security hardening with OpenID Connect", - url: "https://docs.github.com/en/actions/concepts/security/openid-connect" -}; -var K8S_PSS = { - name: "Kubernetes \u2014 Pod Security Standards", - url: "https://kubernetes.io/docs/concepts/security/pod-security-standards/" -}; -var K8S_SECRETS = { - name: "Kubernetes \u2014 Good practices for Secrets", - url: "https://kubernetes.io/docs/concepts/security/secrets-good-practices/" -}; -var DOCKER_SEC = { - name: "Docker \u2014 Security best practices", - url: "https://docs.docker.com/develop/security-best-practices/" -}; -var AWS_SEC = { - name: "AWS \u2014 Security Pillar (Well-Architected)", - url: "https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html" -}; -var AZ_SEC = { - name: "Microsoft Cloud Security Benchmark", - url: "https://learn.microsoft.com/en-us/security/benchmark/azure/" -}; -var GCP_SEC = { - name: "Google Cloud \u2014 Security best practices", - url: "https://cloud.google.com/security/best-practices" -}; function meta3(id, tier, fixKind, title, remediation, authority) { const category = authority && authority.length > 0 ? "security" : RULE_CATEGORY[id] ?? "best-practice"; return { id, tier, fixKind, category, title, remediation, authority, yamlBased: true }; } var M = "merge-worthy"; -var R = "report-only"; -var D = "deterministic"; var G = "guidance"; var RULE_CATEGORY = { - ARGO002: "correctness", - ARGO003: "correctness", - ARGO005: "best-practice", - AZR010: "best-practice", - AZR011: "correctness", - AZR012: "best-practice", - AZR013: "correctness", - AZR014: "security", - AZR015: "security", - AZR016: "best-practice", - AZR017: "best-practice", - AZR018: "best-practice", - AZR019: "security", - AZR020: "best-practice", - AZR021: "security", - AZR022: "security", - AZR023: "best-practice", - AZR024: "best-practice", - AZR025: "best-practice", - AZR026: "best-practice", - AZR027: "security", - AZR028: "best-practice", - AZR029: "security", COR020: "correctness", - DKRD001: "best-practice", - DKRD002: "best-practice", - DKRD003: "security", - DKRD010: "best-practice", - DKRD011: "best-practice", - DKRD012: "security", - EXT001: "correctness", - GHA006: "correctness", - GHA009: "correctness", - GHA011: "correctness", - GHA013: "security", - GHA017: "security", - GHA018: "security", - GHA019: "correctness", - GHA021: "security", - GHA022: "best-practice", - GHA023: "best-practice", - GHA024: "best-practice", - GHA025: "security", - GHA026: "best-practice", - GHA027: "best-practice", - GHA028: "correctness", - GHA029: "security", - GHA030: "security", - GHA031: "security", - GHA032: "security", - GHA033: "security", - GHA034: "security", - GHA035: "security", - GHA036: "security", - GHA037: "security", - GHA038: "security", - GHA039: "security", - GHA040: "security", - GHA041: "security", - GHA042: "security", - GHA043: "security", - GHA044: "security", - GHA045: "security", - GHA046: "correctness", - GHA047: "correctness", - GHA048: "correctness", - GHA049: "security", - GHA050: "security", - GHA051: "best-practice", - GHA052: "security", - GHA053: "security", - GHA054: "security", - GHA055: "best-practice", - GHA056: "best-practice", - GHA057: "security", - GHA058: "best-practice", - WAW010: "best-practice", - WAW011: "best-practice", - WAW013: "correctness", - WAW014: "best-practice", - WAW015: "correctness", - WAW016: "best-practice", - WAW017: "best-practice", - WAW018: "security", - WAW019: "security", - WAW020: "security", - WAW021: "security", - WAW022: "best-practice", - WAW023: "best-practice", - WAW024: "best-practice", - WAW025: "security", - WAW026: "security", - WAW027: "best-practice", - WAW028: "security", - WAW029: "correctness", - WAW030: "best-practice", - WAW031: "best-practice", - WAW032: "security", - WAW033: "correctness", - WAW034: "best-practice", - WAW035: "best-practice", - WAW036: "correctness", - WAW037: "correctness", - WFJ010: "correctness", - WFJ011: "correctness", - WGC101: "security", - WGC102: "security", - WGC103: "best-practice", - WGC104: "security", - WGC105: "security", - WGC106: "best-practice", - WGC107: "best-practice", - WGC108: "best-practice", - WGC109: "security", - WGC110: "security", - WGC111: "correctness", - WGC112: "correctness", - WGC113: "best-practice", - WGC201: "best-practice", - WGC202: "security", - WGC203: "security", - WGC204: "best-practice", - WGC301: "best-practice", - WGC302: "best-practice", - WGC303: "best-practice", - WGC401: "correctness", - WGC402: "correctness", - WGC403: "correctness", - WGL010: "correctness", - WGL011: "correctness", - WGL012: "best-practice", - WGL013: "correctness", - WGL014: "correctness", - WGL015: "correctness", - WGL016: "security", - WGL017: "security", - WGL018: "best-practice", - WGL019: "best-practice", - WGL020: "correctness", - WGL021: "best-practice", - WGL022: "best-practice", - WGL023: "best-practice", - WGL024: "best-practice", - WGL025: "best-practice", - WGL026: "security", - WGL027: "correctness", - WGL028: "best-practice", - WGL029: "security", - WGL030: "security", - WGL031: "security", - WGL032: "security", - WGL033: "security", - WGL034: "security", - WGL035: "security", - WGL036: "security", - WGL037: "security", - WGL038: "security", - WGL039: "security", - WGL040: "security", - WGL041: "correctness", - WGL042: "best-practice", - WGL043: "security", - WGL044: "security", - WGL045: "security", - WGL046: "security", - WGL047: "security", - WGL048: "best-practice", - WHM005: "best-practice", - WHM101: "correctness", - WHM102: "best-practice", - WHM103: "correctness", - WHM104: "best-practice", - WHM105: "best-practice", - WHM201: "best-practice", - WHM202: "best-practice", - WHM203: "best-practice", - WHM204: "best-practice", - WHM301: "best-practice", - WHM302: "best-practice", - WHM401: "security", - WHM402: "security", - WHM403: "security", - WHM404: "security", - WHM405: "best-practice", - WHM406: "best-practice", - WHM407: "security", - WHM501: "best-practice", - WHM502: "correctness", - WK8005: "security", - WK8006: "best-practice", - WK8041: "security", - WK8042: "security", - WK8101: "correctness", - WK8102: "best-practice", - WK8103: "correctness", - WK8104: "best-practice", - WK8105: "best-practice", - WK8201: "best-practice", - WK8202: "security", - WK8203: "security", - WK8204: "security", - WK8205: "security", - WK8207: "security", - WK8208: "security", - WK8209: "security", - WK8301: "best-practice", - WK8302: "best-practice", - WK8303: "best-practice", - WK8304: "best-practice", - WK8305: "correctness", - WK8306: "correctness", - WK8401: "correctness", - WK8402: "best-practice", - WK8403: "best-practice" + EXT001: "correctness" }; var RULE_CATALOG = { - // ── GitHub Actions (GHA) ─────────────────────────────────────────── - GHA006: meta3("GHA006", R, G, "Duplicate workflow name", "Give each workflow a unique `name:`."), - GHA009: meta3("GHA009", M, G, "Empty matrix dimension", "Remove the empty matrix axis or give it values; an empty axis produces zero jobs."), - GHA011: meta3("GHA011", M, G, "needs references a non-existent job", "Fix the `needs:` target to name a real job."), - GHA013: meta3("GHA013", M, G, "Missing job permissions on a sensitive trigger", "Add an explicit least-privilege `permissions:` block to jobs under `pull_request_target`/`workflow_dispatch`.", [SCORECARD_TOKEN, GH_TOKEN]), - GHA017: meta3("GHA017", M, D, "No explicit permissions block", "Add a top-level `permissions: { contents: read }` and widen only where a job needs it.", [SCORECARD_TOKEN, GH_TOKEN]), - GHA018: meta3("GHA018", M, G, "pull_request_target checks out untrusted code", "Don't check out / run PR head code under `pull_request_target`; split into a privileged + unprivileged workflow.", [GH_PWN]), - GHA019: meta3("GHA019", M, G, "Circular needs chain", "Break the cycle in the job dependency graph."), - GHA021: meta3("GHA021", M, D, "actions/checkout not pinned to a SHA", "Pin `actions/checkout` to a full 40-char commit SHA.", [SCORECARD_PINNED, GH_THIRD_PARTY]), - GHA022: meta3("GHA022", R, G, "Job without timeout-minutes", "Add `timeout-minutes:` to bound runaway jobs."), - GHA023: meta3("GHA023", R, G, "Deprecated ::set-output", "Replace `::set-output` with `$GITHUB_OUTPUT`."), - GHA024: meta3("GHA024", R, G, "Missing concurrency block", "Add a `concurrency:` group to deploy workflows."), - GHA025: meta3("GHA025", M, G, "Unrestricted pull_request_target", "Gate `pull_request_target` jobs and avoid running untrusted code with elevated scope.", [GH_PWN]), - GHA026: meta3("GHA026", R, G, "Secret used without environment protection", "Move secret-consuming jobs behind a protected `environment:`."), - GHA027: meta3("GHA027", R, G, "Cleanup step without if: always()", "Add `if: always()` to cleanup steps."), - GHA028: meta3("GHA028", M, G, "Workflow with no triggers", "Add an `on:` trigger; the workflow never runs without one."), - GHA029: meta3("GHA029", M, D, "Action not pinned to a commit SHA", "Pin the action to a full commit SHA instead of a tag/branch.", [SCORECARD_PINNED, GH_THIRD_PARTY]), - GHA030: meta3("GHA030", M, D, "Container image not pinned to a digest", "Pin the image to an immutable `@sha256:` digest.", [SCORECARD_PINNED]), - GHA031: meta3("GHA031", M, G, "Possible action impersonation", "Verify the action owner/slug; it resembles a well-known action.", [SCORECARD_PINNED]), - GHA032: meta3("GHA032", M, G, "Archived/abandoned or vulnerable action", "Replace the archived action or one with a disclosed security issue."), - GHA033: meta3("GHA033", M, D, "Blanket write-all permissions", "Replace `write-all` with the specific scopes the jobs need (default `contents: read`).", [SCORECARD_TOKEN, GH_TOKEN]), - GHA034: meta3("GHA034", M, G, "Write permissions granted workflow-wide", "Move write scopes to the single job that needs them; keep the workflow least-privilege.", [SCORECARD_TOKEN, GH_TOKEN]), - GHA035: meta3("GHA035", M, G, "Elevated token on an untrusted-code trigger", "Drop the elevated `permissions:` on triggers that can run untrusted code.", [GH_PWN, SCORECARD_TOKEN]), - GHA036: meta3("GHA036", M, G, "Untrusted input interpolated into run:", 'Pass untrusted `${{ }}` values via an `env:` var and reference `"$VAR"`, never inline in the script.', [GH_INJECTION]), - GHA037: meta3("GHA037", M, G, "Untrusted input written to GITHUB_ENV/GITHUB_PATH", "Don't write untrusted input to `$GITHUB_ENV`/`$GITHUB_PATH`; sanitize or avoid.", [GH_INJECTION]), - GHA038: meta3("GHA038", M, G, "workflow_run checks out untrusted code in a privileged context", "Avoid checking out untrusted code under `workflow_run`; treat it as privileged.", [GH_PWN]), - GHA039: meta3("GHA039", M, G, "Auth gate on a spoofable author field", "Gate on a non-spoofable identity, not a commit-author field.", [GH_PWN]), - GHA040: meta3("GHA040", M, G, "Self-hosted runner on an untrusted-code trigger", "Don't run untrusted-code triggers on self-hosted runners.", [GH_PWN]), - GHA041: meta3("GHA041", M, G, "Blanket secrets: inherit", "Pass only the specific secrets the reusable workflow needs.", [GH_SECRETS]), - GHA042: meta3("GHA042", M, G, "Entire secrets context passed", "Pass named secrets instead of the whole `secrets` context.", [GH_SECRETS]), - GHA043: meta3("GHA043", M, G, "Secret consumed without an environment gate", "Put secret-consuming jobs behind a protected environment.", [GH_SECRETS]), - GHA044: meta3("GHA044", M, G, "Hardcoded registry/container credential", "Remove the hardcoded credential, move it to a secret, and rotate it (responsible disclosure first).", [GH_SECRETS]), - GHA045: meta3("GHA045", M, G, "Secret interpolated into run:", "Reference secrets via `env:`, not inline in the shell command.", [GH_INJECTION, GH_SECRETS]), - GHA046: meta3("GHA046", M, G, "Constant/unsound guard condition", "Fix the always-true/false `if:` \u2014 it may neutralize a security gate."), - GHA047: meta3("GHA047", M, G, "Ineffective contains() guard (reversed args)", "Swap the `contains()` arguments so the guard actually filters."), - GHA048: meta3("GHA048", M, G, "Obfuscated guard condition", "Simplify the indirect `if:` so its effect is reviewable."), - GHA049: meta3("GHA049", M, G, "Persisted checkout credentials reachable by an artifact", "Use `persist-credentials: false` or exclude `.git` from uploaded artifacts.", [GH_SECRETS]), - GHA050: meta3("GHA050", M, G, "Cache populated in a privileged context", "Don't populate caches from untrusted code paths (poisoning risk).", [GH_PWN]), - GHA051: meta3("GHA051", R, G, "Long-lived token instead of OIDC", "Migrate publish/release to OIDC short-lived credentials."), - GHA052: meta3("GHA052", M, G, "Software piped to a shell without verification", "Verify a checksum/signature before executing fetched scripts.", [SCORECARD_PINNED]), - GHA053: meta3("GHA053", M, G, "Re-enables unsafe set-env/add-path", "Remove `ACTIONS_ALLOW_UNSECURE_COMMANDS`; use `$GITHUB_ENV`/`$GITHUB_PATH`.", [GH_INJECTION]), - GHA054: meta3("GHA054", M, G, "Feature with a known security footgun", "Replace the flagged feature with the safe alternative."), - GHA055: meta3("GHA055", R, G, "Runtime install of a tool already on the runner", "Drop the redundant install to save time."), - GHA056: meta3("GHA056", R, G, "Workflow without a name", "Add a `name:` to the workflow."), - GHA057: meta3("GHA057", M, G, "Dependency update can execute untrusted code", "Disable the option that lets dependency updates run external code.", [GH_PWN]), - GHA058: meta3("GHA058", R, G, "Dependency update has no cooldown window", "Add a cooldown so new releases aren't merged instantly."), - // ── GitLab CI (WGL) ──────────────────────────────────────────────── - WGL010: meta3("WGL010", M, G, "Job references an undefined stage", "Add the stage to `stages:` or fix the job's `stage:`."), - WGL011: meta3("WGL011", M, G, "Job rules always evaluate to never", "Fix the `rules:` so the job can run; it is currently unreachable."), - WGL012: meta3("WGL012", R, G, "Deprecated property", "Replace the deprecated GitLab CI property."), - WGL013: meta3("WGL013", M, G, "Invalid needs target", "Fix the dangling/self `needs:` reference."), - WGL014: meta3("WGL014", M, G, "Invalid extends target", "Point `extends:` at a template that exists in the pipeline."), - WGL015: meta3("WGL015", M, G, "Circular needs chain", "Break the cycle in the job dependency graph."), - WGL016: meta3("WGL016", M, G, "Hardcoded secret in variables", "Move the secret out of `variables:` into a masked/protected CI variable and rotate it.", [GH_SECRETS]), - WGL017: meta3("WGL017", M, G, "Insecure (non-HTTPS) registry", "Use an HTTPS registry endpoint."), - WGL018: meta3("WGL018", R, G, "Missing job timeout", "Add a `timeout:` to bound long-running jobs."), - WGL019: meta3("WGL019", R, G, "Missing retry on deploy job", "Add a `retry:` strategy to deploy jobs."), - WGL020: meta3("WGL020", M, G, "Duplicate job names", "Rename so each job resolves to a unique name."), - WGL021: meta3("WGL021", R, G, "Unused global variable", "Remove the unused global `variables:` entry."), - WGL022: meta3("WGL022", R, G, "Missing artifacts expiry", "Add `expire_in:` to artifacts to avoid disk bloat."), - WGL023: meta3("WGL023", R, G, "Overly broad rules (when: always)", "Add real conditions to the job's `rules:`."), - WGL024: meta3("WGL024", R, G, "Manual job without allow_failure", "Add `allow_failure: true` so a manual job doesn't block the pipeline."), - WGL025: meta3("WGL025", R, G, "Cache without a key", "Add a `cache.key` to avoid cross-job cache collisions."), - WGL026: meta3("WGL026", M, G, "Privileged DinD service without TLS", "Set `DOCKER_TLS_CERTDIR` for privileged Docker-in-Docker services."), - WGL027: meta3("WGL027", M, G, "Empty script", "Give the job a non-empty `script:`; it currently does nothing."), - WGL028: meta3("WGL028", R, G, "Redundant needs", "Drop `needs:` already implied by stage ordering."), - WGL029: meta3("WGL029", M, G, "include/component resolved by a moving ref", "Pin `include:project`/component to a tag or commit SHA, not a branch.", [SCORECARD_PINNED]), - WGL030: meta3("WGL030", M, G, "Insecure or mutable include:remote", "Use HTTPS and pin the remote include to an immutable ref.", [SCORECARD_PINNED]), - WGL031: meta3("WGL031", M, D, "Container image not pinned to a digest", "Pin the image to an immutable `@sha256:` digest.", [SCORECARD_PINNED]), - WGL032: meta3("WGL032", M, G, "Possible include/component impersonation", "Verify the include source; it resembles a well-known project.", [SCORECARD_PINNED]), - WGL033: meta3("WGL033", M, G, "OIDC id_token without a scoped audience", "Set a specific `aud:` on the OIDC id_token.", [GH_OIDC]), - WGL034: meta3("WGL034", M, G, "OIDC id_token mintable from a merge-request pipeline", "Restrict OIDC token minting to protected pipelines.", [GH_OIDC, GH_PWN]), - WGL035: meta3("WGL035", M, G, "Untrusted CI variable interpolated into a script", "Pass untrusted variables via the environment and quote them; don't inline.", [GH_INJECTION]), - WGL036: meta3("WGL036", M, G, "Privileged service reachable from merge-request pipelines", "Block privileged/DinD services on merge-request pipelines.", [GH_PWN]), - WGL037: meta3("WGL037", M, G, "Security gate on an untrusted ref regex", "Don't gate security decisions on a regex over an untrusted ref variable.", [GH_PWN]), - WGL038: meta3("WGL038", M, G, "Secret reachable from a merge-request pipeline", "Scope secret-like variables to protected branches/pipelines.", [GH_SECRETS, GH_PWN]), - WGL039: meta3("WGL039", M, G, "Secret printed to job logs", "Stop echoing the secret-like variable; mask it.", [GH_SECRETS]), - WGL040: meta3("WGL040", M, G, "Hardcoded credential in a registry login", "Move the credential to a masked CI variable and rotate it.", [GH_SECRETS]), - WGL041: meta3("WGL041", M, G, "Tautological rules:if condition", "Fix the always-true `rules:if`; it may neutralize a gate."), - WGL042: meta3("WGL042", R, G, "Unreachable rules after an unconditional match", "Remove the dead `rules:` entries after the catch-all."), - WGL043: meta3("WGL043", M, G, "Match-anything regex gate in rules:if", "Tighten the regex; a match-anything gate is no gate.", [GH_PWN]), - WGL044: meta3("WGL044", M, G, "Public artifacts expose build output", "Mark sensitive artifacts non-public (`public: false`)."), - WGL045: meta3("WGL045", M, G, "Artifact path may capture a credential file", "Narrow the artifact path so it can't capture credential files.", [GH_SECRETS]), - WGL046: meta3("WGL046", M, G, "Cache populated in a merge-request pipeline", "Don't populate caches from merge-request pipelines (poisoning risk).", [GH_PWN]), - WGL047: meta3("WGL047", M, G, "Software piped to a shell without verification", "Verify a checksum/signature before executing fetched scripts.", [SCORECARD_PINNED]), - WGL048: meta3("WGL048", R, G, "Pipeline without workflow:name", "Add a `workflow:name` for clearer pipeline naming."), - // ── Forgejo (WFJ) ────────────────────────────────────────────────── - WFJ010: meta3("WFJ010", M, G, "Unresolved action reference on Forgejo", "Use an action reference Forgejo can resolve (full URL or a mirrored action)."), - WFJ011: meta3("WFJ011", M, G, "GitHub-hosted runner label with no Forgejo equivalent", "Use a runner label your Forgejo instance provides."), - // ── Kubernetes (WK8 / ARGO) ──────────────────────────────────────── - ARGO002: meta3("ARGO002", M, G, "Argo Application references an undeclared AppProject", "Declare the named AppProject or reference an existing project."), - ARGO003: meta3("ARGO003", M, G, "Argo Application targets an unregistered cluster", "Point spec.destination at a registered cluster or the in-cluster target."), - ARGO005: meta3("ARGO005", R, G, "Argo source.path may not resolve", "Ensure the source path exists under the build root."), - WK8005: meta3("WK8005", M, G, "Hardcoded secret in env var", "Use a secretKeyRef instead of a literal value, and rotate the secret.", [K8S_SECRETS]), - WK8006: meta3("WK8006", M, G, "Image uses :latest or no tag", "Pin the image to an explicit version tag (ideally a digest).", [SCORECARD_PINNED]), - WK8041: meta3("WK8041", M, G, "Hardcoded API key in env var", "Move the key to a Secret and rotate it.", [K8S_SECRETS]), - WK8042: meta3("WK8042", M, G, "Private key stored in a ConfigMap", "Store private keys in a Secret, not a ConfigMap.", [K8S_SECRETS]), - WK8101: meta3("WK8101", M, G, "Deployment selector does not match template labels", "Align spec.selector with the pod template labels."), - WK8102: meta3("WK8102", R, G, "Resource missing metadata labels", "Add metadata labels for filtering and tooling."), - WK8103: meta3("WK8103", M, G, "Container missing name", "Add the required container `name`."), - WK8104: meta3("WK8104", R, G, "Container ports not named", "Name ports for clearer Service/NetworkPolicy config."), - WK8105: meta3("WK8105", R, G, "imagePullPolicy not explicit", "Set imagePullPolicy explicitly to avoid surprising defaults."), - WK8201: meta3("WK8201", R, G, "Container missing resource limits", "Set CPU and memory limits."), - WK8202: meta3("WK8202", M, G, "Privileged container", "Remove privileged: true; grant only the specific capabilities needed.", [K8S_PSS]), - WK8203: meta3("WK8203", M, G, "Root filesystem is writable", "Set readOnlyRootFilesystem: true.", [K8S_PSS]), - WK8204: meta3("WK8204", M, G, "Container may run as root", "Set runAsNonRoot: true (and a non-zero runAsUser).", [K8S_PSS]), - WK8205: meta3("WK8205", M, G, "Capabilities not dropped", "drop: [ALL] and add back only what is required.", [K8S_PSS]), - WK8207: meta3("WK8207", M, G, "Pod uses host network", "Remove hostNetwork; it bypasses network isolation.", [K8S_PSS]), - WK8208: meta3("WK8208", M, G, "Pod shares host PID namespace", "Remove hostPID.", [K8S_PSS]), - WK8209: meta3("WK8209", M, G, "Pod shares host IPC namespace", "Remove hostIPC.", [K8S_PSS]), - WK8301: meta3("WK8301", R, G, "Container missing probes", "Add liveness and readiness probes."), - WK8302: meta3("WK8302", R, G, "Deployment has a single replica", "Use replicas >= 2 for availability."), - WK8303: meta3("WK8303", R, G, "No PodDisruptionBudget for an HA Deployment", "Add a PDB to protect availability during disruptions."), - WK8304: meta3("WK8304", R, G, "SSL redirect without a certificate", "Provide a certificate and HTTPS listen-ports for the ssl-redirect annotation."), - WK8305: meta3("WK8305", M, G, "Ingress backend port does not match the Service", "Point the Ingress backend at a declared Service port."), - WK8306: meta3("WK8306", M, G, "Container command starts with a flag", "The first command element should be a binary, not a flag."), - WK8401: meta3("WK8401", M, G, "shmSize exceeds the container memory limit", "Lower shmSize or raise the memory limit so the pod can schedule."), - WK8402: meta3("WK8402", R, G, "RayCluster missing spec.rayVersion", "Set spec.rayVersion so KubeRay picks the right autoscaler image."), - WK8403: meta3("WK8403", R, G, "rayVersion does not match the head image tag", "Align spec.rayVersion with the Ray version in the head container image."), - // ── Docker (DKRD) ────────────────────────────────────────────────── - DKRD001: meta3("DKRD001", M, G, "Service uses :latest or untagged image", "Pin the image to an explicit version tag (ideally a digest).", [SCORECARD_PINNED]), - DKRD002: meta3("DKRD002", R, G, "Named volume declared but unused", "Remove the unused volume or mount it in a service."), - DKRD003: meta3("DKRD003", M, G, "Service exposes SSH (port 22)", "Don't expose SSH from a container; use exec/ephemeral access instead.", [DOCKER_SEC]), - DKRD010: meta3("DKRD010", R, G, "apt-get install without --no-install-recommends", "Add --no-install-recommends to keep images small."), - DKRD011: meta3("DKRD011", R, G, "ADD used where COPY would do", "Prefer COPY unless fetching a URL or extracting an archive."), - DKRD012: meta3("DKRD012", M, G, "No USER instruction \u2014 container runs as root", "Add a non-root USER instruction.", [DOCKER_SEC]), - // ── AWS CloudFormation (WAW / COR / EXT) ─────────────────────────── COR020: meta3("COR020", M, G, "Circular resource dependency", "Break the dependency cycle between resources."), - EXT001: meta3("EXT001", M, G, "Extension constraint violation", "Fix the cross-property constraint flagged by the cfn-lint extension schema."), - WAW010: meta3("WAW010", R, G, "Redundant DependsOn", "Remove DependsOn already implied by a Ref/GetAtt."), - WAW011: meta3("WAW011", R, G, "Deprecated Lambda runtime", "Upgrade to a supported Lambda runtime."), - WAW013: meta3("WAW013", M, G, "Child stack exports nothing", "Add stackOutput() exports the parent can reference."), - WAW014: meta3("WAW014", R, G, "Nested stack outputs never referenced", "Reference the outputs or split into a separate build."), - WAW015: meta3("WAW015", M, G, "Circular dependency between nested stacks", "Break the cycle between nested stacks."), - WAW016: meta3("WAW016", R, G, "Deprecated property", "Replace the deprecated CloudFormation property."), - WAW017: meta3("WAW017", R, G, "Missing tags on a taggable resource", "Add tags for cost allocation and compliance."), - WAW018: meta3("WAW018", M, G, "S3 bucket missing public access block", "Add a PublicAccessBlockConfiguration blocking all public access.", [AWS_SEC]), - WAW019: meta3("WAW019", M, G, "Security group allows unrestricted ingress on a sensitive port", "Restrict the CIDR on SSH/RDP/database ports to known sources.", [AWS_SEC]), - WAW020: meta3("WAW020", M, G, "IAM policy uses a wildcard Action", "Scope the policy to specific actions (least privilege).", [AWS_SEC]), - WAW021: meta3("WAW021", M, G, "RDS storage not encrypted", "Enable StorageEncrypted for encryption at rest.", [AWS_SEC]), - WAW022: meta3("WAW022", R, G, "Lambda has no VpcConfig", "Consider a VpcConfig for network isolation if the function needs VPC resources."), - WAW023: meta3("WAW023", R, G, "CloudFront has no WAF web ACL", "Consider attaching a WAF web ACL."), - WAW024: meta3("WAW024", R, G, "ALB access logging disabled", "Enable access logging for audit trails."), - WAW025: meta3("WAW025", M, G, "SNS topic not encrypted", "Set KmsMasterKeyId for encryption at rest.", [AWS_SEC]), - WAW026: meta3("WAW026", M, G, "SQS queue not encrypted", "Enable SqsManagedSseEnabled or set KmsMasterKeyId.", [AWS_SEC]), - WAW027: meta3("WAW027", R, G, "DynamoDB point-in-time recovery disabled", "Enable PITR for recovery."), - WAW028: meta3("WAW028", M, G, "EBS volume not encrypted", "Enable encryption at rest.", [AWS_SEC]), - WAW029: meta3("WAW029", M, G, "Invalid DependsOn target", "Fix the dangling/self DependsOn reference."), - WAW030: meta3("WAW030", R, G, "Missing DependsOn for a known ordering pattern", "Add the DependsOn the pattern requires."), - WAW031: meta3("WAW031", R, G, "EKS Addon missing ServiceAccountRoleArn", "Set ServiceAccountRoleArn (IRSA) for addons that need it."), - WAW032: meta3("WAW032", M, G, "EFS transit encryption disabled on Fargate", "Enable transit encryption for the EFS volume.", [AWS_SEC]), - WAW033: meta3("WAW033", M, G, "Solr heap exceeds Fargate task memory", "Lower SOLR_HEAP or raise task memory."), - WAW034: meta3("WAW034", R, G, "Fargate Solr task under-provisioned", "Allocate >= 2048MB for the Solr task."), - WAW035: meta3("WAW035", R, G, "Solr container missing nofile ulimit", "Set a nofile ulimit >= 65535."), - WAW036: meta3("WAW036", M, G, "Non-ASCII characters in resource properties", "Remove non-ASCII characters rejected at changeset time."), - WAW037: meta3("WAW037", M, G, "Null values in resource properties", "Fix the invalid AttrRef producing null property values."), - // ── Azure ARM (AZR) ──────────────────────────────────────────────── - AZR010: meta3("AZR010", R, G, "Redundant dependsOn", "Remove dependsOn already implied by reference()/resourceId()."), - AZR011: meta3("AZR011", M, G, "Missing or invalid apiVersion", "Set a valid YYYY-MM-DD apiVersion on every resource."), - AZR012: meta3("AZR012", R, G, "Deprecated API version", "Move to a current apiVersion."), - AZR013: meta3("AZR013", M, G, "Resource missing location", "Add the required location property."), - AZR014: meta3("AZR014", M, G, "Storage account allows public blob access", "Set allowBlobPublicAccess to false.", [AZ_SEC]), - AZR015: meta3("AZR015", M, G, "Storage account missing encryption", "Enable encryption services for data at rest.", [AZ_SEC]), - AZR016: meta3("AZR016", R, G, "Key Vault soft-delete not enabled", "Enable soft-delete."), - AZR017: meta3("AZR017", R, G, "Key Vault purge protection not enabled", "Enable purge protection."), - AZR018: meta3("AZR018", R, G, "SQL Server missing auditing", "Enable auditing for compliance and threat detection."), - AZR019: meta3("AZR019", M, G, "SQL database missing TDE", "Enable Transparent Data Encryption.", [AZ_SEC]), - AZR020: meta3("AZR020", R, G, "App Service missing managed identity", "Enable a system- or user-assigned identity."), - AZR021: meta3("AZR021", M, G, "App Service not HTTPS-only", "Set httpsOnly to true.", [AZ_SEC]), - AZR022: meta3("AZR022", M, G, "App Service min TLS below 1.2", "Set minTlsVersion to 1.2+.", [AZ_SEC]), - AZR023: meta3("AZR023", R, G, "VM not using a managed disk", "Use a managed disk."), - AZR024: meta3("AZR024", R, G, "VM missing boot diagnostics", "Enable boot diagnostics."), - AZR025: meta3("AZR025", R, G, "AKS cluster missing RBAC", "Enable Kubernetes RBAC."), - AZR026: meta3("AZR026", R, G, "AKS cluster missing network policy", "Configure a networkPolicy."), - AZR027: meta3("AZR027", M, G, "Container Registry admin user enabled", "Disable the admin user; use Azure AD / service principals.", [AZ_SEC]), - AZR028: meta3("AZR028", R, G, "Network interface missing NSG", "Associate an NSG to control traffic."), - AZR029: meta3("AZR029", M, G, "Managed disk missing encryption", "Enable encryption for data at rest.", [AZ_SEC]), - // ── GCP Config Connector (WGC) ───────────────────────────────────── - WGC101: meta3("WGC101", M, G, "Storage/SQL without encryption configuration", "Configure encryption (e.g. a CMEK key) for data at rest.", [GCP_SEC]), - WGC102: meta3("WGC102", M, G, "Public IAM member (allUsers/allAuthenticatedUsers)", "Remove allUsers/allAuthenticatedUsers bindings.", [GCP_SEC]), - WGC103: meta3("WGC103", R, G, "Missing project-id annotation", "Add the cnrm.cloud.google.com/project-id annotation."), - WGC104: meta3("WGC104", M, G, "Bucket without uniform bucket-level access", "Enable uniformBucketLevelAccess.", [GCP_SEC]), - WGC105: meta3("WGC105", M, G, "Cloud SQL open to 0.0.0.0/0", "Restrict authorizedNetworks to known sources.", [GCP_SEC]), - WGC106: meta3("WGC106", R, G, "Missing deletion-policy annotation", "Add the cnrm.cloud.google.com/deletion-policy annotation."), - WGC107: meta3("WGC107", R, G, "Bucket versioning disabled", "Enable object versioning."), - WGC108: meta3("WGC108", R, G, "Cloud SQL backups disabled", "Enable backup configuration."), - WGC109: meta3("WGC109", M, G, "Firewall open to 0.0.0.0/0", "Restrict sourceRanges to known sources.", [GCP_SEC]), - WGC110: meta3("WGC110", M, G, "KMS key without rotation", "Set a rotationPeriod on the CryptoKey.", [GCP_SEC]), - WGC111: meta3("WGC111", M, G, "Reference to an undefined resource", "Point the reference at a resource in the output."), - WGC112: meta3("WGC112", M, G, "Missing or invalid apiVersion", "Set a valid cnrm.cloud.google.com apiVersion."), - WGC113: meta3("WGC113", R, G, "Alpha API version", "Move to a beta/GA API version."), - WGC201: meta3("WGC201", R, G, "Missing managed-by label", "Add the app.kubernetes.io/managed-by label."), - WGC202: meta3("WGC202", M, G, "Cluster without Workload Identity", "Enable Workload Identity on the ContainerCluster.", [GCP_SEC]), - WGC203: meta3("WGC203", M, G, "Node pool uses broad cloud-platform scope", "Use narrowly-scoped OAuth scopes instead of cloud-platform.", [GCP_SEC]), - WGC204: meta3("WGC204", R, G, "Compute instance without Shielded VM", "Enable Shielded VM configuration."), - WGC301: meta3("WGC301", R, G, "No IAMAuditConfig found", "Configure audit logging via IAMAuditConfig."), - WGC302: meta3("WGC302", R, G, "No Service (enabled APIs) found", "Declare the GCP APIs you depend on."), - WGC303: meta3("WGC303", R, G, "No VPC Service Controls perimeter", "Consider an AccessContextManager ServicePerimeter."), - WGC401: meta3("WGC401", M, G, "Unknown field in resource spec", "Remove the unknown spec field."), - WGC402: meta3("WGC402", M, G, "Missing required spec field", "Add the required spec field."), - WGC403: meta3("WGC403", M, G, "Spec field has wrong type/structure", "Fix the field's type/structure."), - // ── Helm (WHM) ───────────────────────────────────────────────────── - WHM005: meta3("WHM005", R, G, "Sub-chart wrapper with no templates", "Deploy the upstream chart directly instead of an empty wrapper."), - WHM101: meta3("WHM101", M, G, "Chart.yaml missing required fields", "Set apiVersion (v2), name, and version in Chart.yaml."), - WHM102: meta3("WHM102", R, G, "Missing values.schema.json", "Add a values.schema.json to validate values."), - WHM103: meta3("WHM103", M, G, "Invalid Go template syntax", "Fix the unbalanced template braces."), - WHM104: meta3("WHM104", R, G, "Missing NOTES.txt", "Add templates/NOTES.txt for application charts."), - WHM105: meta3("WHM105", R, G, "Missing _helpers.tpl", "Add templates/_helpers.tpl."), - WHM201: meta3("WHM201", R, G, "Missing standard Helm labels", "Add the recommended app.kubernetes.io labels."), - WHM202: meta3("WHM202", R, G, "Hook weights undefined", "Define hook weights when multiple hooks exist."), - WHM203: meta3("WHM203", R, G, "Undocumented values", "Document values via schema or comments."), - WHM204: meta3("WHM204", R, G, "Dependencies pinned, not ranged", "Use semver ranges for chart dependencies."), - WHM301: meta3("WHM301", R, G, "No Helm test", "Add at least one Helm test for application charts."), - WHM302: meta3("WHM302", R, G, "Container resources not set", "Set limits/requests via values or defaults."), - WHM401: meta3("WHM401", M, G, "Container image uses :latest or no tag", "Pin the image to an explicit version tag.", [SCORECARD_PINNED]), - WHM402: meta3("WHM402", M, G, "Container may run as root", "Set runAsNonRoot in the security context.", [K8S_PSS]), - WHM403: meta3("WHM403", M, G, "Root filesystem writable", "Set readOnlyRootFilesystem.", [K8S_PSS]), - WHM404: meta3("WHM404", M, G, "Privileged container", "Remove privileged mode.", [K8S_PSS]), - WHM405: meta3("WHM405", R, G, "Resource specs missing cpu/memory", "Set cpu and memory in limits/requests."), - WHM406: meta3("WHM406", R, G, "CRDs in crds/ are never upgraded", "Manage CRD upgrades outside Helm or via a separate chart."), - WHM407: meta3("WHM407", M, G, "Inline Secret data", "Use ExternalSecret/SealedSecret instead of inline Secret data.", [K8S_SECRETS]), - WHM501: meta3("WHM501", R, G, "Unused values key", "Remove values defined but never referenced."), - WHM502: meta3("WHM502", M, G, "Deprecated/invalid Kubernetes API version", "Update to a supported apiVersion.") + EXT001: meta3("EXT001", M, G, "Extension constraint violation", "Fix the cross-property constraint flagged by the cfn-lint extension schema.") }; // node_modules/@intentius/chant/src/audit/proof.ts @@ -231657,7 +234839,7 @@ function narrowWriteAll(content) { return { patched: content.replace(re, "permissions:\n contents: read"), changed: true }; } function proveFix(checkId, content, opts = {}) { - const cat = RULE_CATALOG[checkId]; + const cat = (opts.catalog ?? RULE_CATALOG)[checkId]; if (cat && cat.fixKind !== "deterministic") { return notApplied(checkId, "guidance", cat.remediation || "Manual fix required."); } @@ -231788,8 +234970,8 @@ var SUPERSEDED_BY = { WGL021: ["WGL016"] // "unused variable" is noise when the var is a flagged hardcoded secret }; -function metaFor(id) { - return RULE_CATALOG[id] ?? { +function metaFor(id, catalog = RULE_CATALOG) { + return catalog[id] ?? { id, tier: "report-only", fixKind: "guidance", @@ -231816,7 +234998,7 @@ function byFile(items) { function clusterName(m) { return m.authority?.[0]?.name ?? "General hardening"; } -function buildQuickWins(findings, contents, proveOpts) { +function buildQuickWins(findings, contents, proveOpts, catalog = RULE_CATALOG) { const out = []; for (const [file2, group] of byFile(findings)) { const ids = [...new Set(group.map((f) => f.checkId))].sort(); @@ -231826,10 +235008,10 @@ function buildQuickWins(findings, contents, proveOpts) { let patched = original; if (original !== void 0) { for (const id of ids) { - const res = proveFix(id, patched ?? original, proveOpts); + const res = proveFix(id, patched ?? original, { ...proveOpts, catalog }); if (res.applied && res.patched !== void 0) { patched = res.patched; - addressed.push(metaFor(id)); + addressed.push(metaFor(id, catalog)); } else if (res.reason === "needs-input") { needsInput.push(...group.filter((f) => f.checkId === id)); } @@ -231872,7 +235054,8 @@ function buildClusters(findings) { }); } function buildReportModel(findings, opts = {}) { - const enriched = findings.map((f) => ({ ...f, meta: metaFor(f.checkId) })); + const catalog = opts.catalog ?? RULE_CATALOG; + const enriched = findings.map((f) => ({ ...f, meta: metaFor(f.checkId, catalog) })); const contents = new Map((opts.files ?? []).map((f) => [f.path, f.content])); const mergeWorthy = enriched.filter((f) => f.meta.tier === "merge-worthy"); const quickWinFindings = mergeWorthy.filter((f) => f.meta.fixKind === "deterministic"); @@ -231899,7 +235082,7 @@ function buildReportModel(findings, opts = {}) { }; return { counts, - quickWins: buildQuickWins(quickWinFindings, contents, { resolveSha: opts.resolveSha, resolveDigest: opts.resolveDigest }), + quickWins: buildQuickWins(quickWinFindings, contents, { resolveSha: opts.resolveSha, resolveDigest: opts.resolveDigest }, catalog), needsReview: buildClusters(needsReviewFindings), reportOnly: [...reportOnly].sort(sortFindings), findings: [...shown].sort(sortFindings) @@ -232813,12 +235996,12 @@ function editDistance(a, b, max) { } return prev[b.length]; } -function nearestLookAlike(slug) { - if (KNOWN.has(slug)) return void 0; +function nearestLookAlike(slug2) { + if (KNOWN.has(slug2)) return void 0; let best; let bestDist = 3; for (const known of KNOWN) { - const d = editDistance(slug, known, 2); + const d = editDistance(slug2, known, 2); if (d >= 1 && d <= 2 && d < bestDist) { best = known; bestDist = d; @@ -233828,7 +237011,7 @@ function slugFromUrl(url2) { var DETECTORS = [{ name: "github" }]; var checksProvider = async (lexicon) => lexicon === "github" ? postSynthChecks : []; async function auditOneRepo(repoUrl, token, opts) { - const slug = slugFromUrl(repoUrl); + const slug2 = slugFromUrl(repoUrl); try { const files = await fetchRepoFiles(repoUrl, { token, @@ -233840,11 +237023,11 @@ async function auditOneRepo(repoUrl, token, opts) { const model = buildReportModel(findings, { files: inputs.map((i) => ({ path: i.path, content: i.content })) }); - return { repoUrl, slug, scanned: files.length, model }; + return { repoUrl, slug: slug2, scanned: files.length, model }; } catch (err) { return { repoUrl, - slug, + slug: slug2, scanned: 0, model: buildReportModel([]), error: err instanceof Error ? err.message : String(err) @@ -234398,7 +237581,7 @@ async function main(argv = process.argv.slice(2)) { } let rawConfig; try { - const text = readFileSync2(args.config, "utf-8"); + const text = readFileSync6(args.config, "utf-8"); rawConfig = parseConfigFile(args.config, text); } catch (err) { die(3, `failed to read config file "${args.config}": ${errMsg2(err)}`); @@ -234644,7 +237827,7 @@ async function runAudit(argv) { } let rawConfig; try { - const text = readFileSync2(auditArgs.config, "utf-8"); + const text = readFileSync6(auditArgs.config, "utf-8"); rawConfig = parseConfigFile(auditArgs.config, text); } catch (err) { die(3, `failed to read config file "${auditArgs.config}": ${errMsg2(err)}`); @@ -234711,7 +237894,7 @@ async function runReport(argv) { } let rawConfig; try { - const text = readFileSync2(reportArgs.config, "utf-8"); + const text = readFileSync6(reportArgs.config, "utf-8"); rawConfig = parseConfigFile(reportArgs.config, text); } catch (err) { die(3, `failed to read config file "${reportArgs.config}": ${errMsg2(err)}`); @@ -234811,7 +237994,7 @@ async function runReport(argv) { process.stdout.write(renderComplianceReport(report)); if (reportArgs.out) { try { - writeFileSync(reportArgs.out, complianceArtifact(report), "utf-8"); + writeFileSync3(reportArgs.out, complianceArtifact(report), "utf-8"); process.stdout.write(`wrote artifact: ${reportArgs.out} `); } catch (err) {