energy-state-analyzer 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","mappings":";o4BAMA,MAAAA,EAAAC,EAAAC,EAAA,MACAC,EAAAF,EAAAC,EAAA,OACME,OAAEA,EAAMC,SAAEA,GAAaH,EAAQ,IAErCI,EAAAJ,EAAA,KAEAK,EAAAL,EAAA,KACAM,EAAAN,EAAA,KACAO,EAAAP,EAAA,IACAQ,EAAAR,EAAA,KACAS,EAAAT,EAAA,KAEA,SAASU,IACLC,QAAQC,MAAM,mLAClB,CAgCA,SAASC,EAAsDC,EAA6BC,GACxF,QAAiCC,IAA7BF,EAASG,sBAA4DD,IAA3BF,EAASI,cAGvD,MAAO,IACAH,EACHE,gBAAiBH,EAASG,iBAAmBF,EAASE,gBACtDC,cAAeJ,EAASI,eAAiBH,EAASG,cAE1D,EAmBAC,iBACI,MAAMC,EA3DV,SAAmBC,GACf,MACMC,EAAQC,IACV,MAAMC,EAAQH,EAAKI,QAAQ,KAAKF,KAChC,OAAkB,IAAXC,EAAeE,OAAOL,EAAKG,EAAQ,SAAMR,GAGpD,MAAO,CACHW,SAPaN,EAAKO,KAAKC,IAAQA,EAAIC,WAAW,OAQ9CC,QAAS,CACLd,gBAAiBK,EAAK,kBACtBJ,cAAeI,EAAK,iBAExBU,WAAY,CACRf,gBAAiBK,EAAK,qBACtBJ,cAAeI,EAAK,oBAExBW,UAAW,CACPhB,gBAAiBK,EAAK,oBACtBJ,cAAeI,EAAK,mBAGhC,CAqCmBY,CAAUC,QAAQd,KAAKe,MAAM,KACtCT,SAAEA,GAAaP,EAEhBO,IACDjB,IACAyB,QAAQE,KAAK,IAGjB,MAAMC,GAAU,EAAA9B,EAAA+B,wBAAuBZ,GAClCW,IACD3B,QAAQC,MAAM,0BAA0Be,KACxCjB,IACAyB,QAAQE,KAAK,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,eAAAe,KAAA2J,EAAA6K,GCCA3tB,oBAAA40C,EAAArwC,IACA0+B,OAAAgS,aACAz9B,OAAAG,eAAApT,EAAA0+B,OAAAgS,YAAA,CAAuDnmC,MAAA,WAEvD0I,OAAAG,eAAApT,EAAA,cAAgDuK,OAAA,KCFhD,IAAAomC,oBAAAl1C,oBAAA","sources":["webpack://energy-state-analyzer/./src/cli.ts","webpack://energy-state-analyzer/./src/core/analyze.ts","webpack://energy-state-analyzer/./src/core/detectors/cognitive.ts","webpack://energy-state-analyzer/./src/core/detectors/coherence.ts","webpack://energy-state-analyzer/./src/core/detectors/cyclomatic.ts","webpack://energy-state-analyzer/./src/core/detectors/inversion.ts","webpack://energy-state-analyzer/./src/core/detectors/logicalControlFlow.ts","webpack://energy-state-analyzer/./src/core/detectors/magicNumber.ts","webpack://energy-state-analyzer/./src/core/detectors/magicString.ts","webpack://energy-state-analyzer/./src/core/detectors/matchOpportunity.ts","webpack://energy-state-analyzer/./src/core/detectors/nesting.ts","webpack://energy-state-analyzer/./src/core/detectors/opaqueBoolean.ts","webpack://energy-state-analyzer/./src/core/detectors/parameterCount.ts","webpack://energy-state-analyzer/./src/core/detectors/primitiveObsession.ts","webpack://energy-state-analyzer/./src/core/position.ts","webpack://energy-state-analyzer/./src/languages/fsharp.ts","webpack://energy-state-analyzer/./src/languages/index.ts","webpack://energy-state-analyzer/./src/languages/python.ts","webpack://energy-state-analyzer/./src/languages/typescript.ts","webpack://energy-state-analyzer/./src/types.ts","webpack://energy-state-analyzer/external node-commonjs \"fs\"","webpack://energy-state-analyzer/external node-commonjs \"fs/promises\"","webpack://energy-state-analyzer/external node-commonjs \"path\"","webpack://energy-state-analyzer/./node_modules/web-tree-sitter/web-tree-sitter.cjs","webpack://energy-state-analyzer/webpack/bootstrap","webpack://energy-state-analyzer/webpack/runtime/create fake namespace object","webpack://energy-state-analyzer/webpack/runtime/define property getters","webpack://energy-state-analyzer/webpack/runtime/hasOwnProperty shorthand","webpack://energy-state-analyzer/webpack/runtime/make namespace object","webpack://energy-state-analyzer/webpack/startup"],"sourcesContent":["#!/usr/bin/env node\n// Headless entry point: run the same detectors the extension uses, without\n// vscode, so an external process (e.g. an AI coding agent) can gate on\n// complexity without opening an editor.\n//\n// decision: exits 1 when any medium-or-high violation is found, not just high — CI/agent gating wants a single boolean signal, and severity is already visible in the emitted JSON for anyone who wants to discriminate further\nimport * as fs from 'fs';\nimport * as path from 'path';\nconst { Parser, Language } = require('web-tree-sitter');\n\nimport { analyzeSource, AnalyzeThresholds } from './core/analyze';\nimport { LanguageAdapter } from './core/language';\nimport { DEFAULT_NESTING_THRESHOLDS } from './core/detectors/nesting';\nimport { DEFAULT_CYCLOMATIC_THRESHOLDS } from './core/detectors/cyclomatic';\nimport { DEFAULT_COGNITIVE_THRESHOLDS } from './core/detectors/cognitive';\nimport { resolveLanguageForFile } from './languages';\nimport { EnergyViolation, SEVERITY } from './types';\n\nfunction printUsage(): void {\n console.error('Usage: energy-state-cli <file.py|.fs|.fsx|.ts> [--medium-nesting N] [--high-nesting N] [--medium-cyclomatic N] [--high-cyclomatic N] [--medium-cognitive N] [--high-cognitive N]');\n}\n\nfunction parseArgs(argv: string[]) {\n const filePath = argv.find(arg => !arg.startsWith('--'));\n const flag = (name: string): number | undefined => {\n const index = argv.indexOf(`--${name}`);\n return index !== -1 ? Number(argv[index + 1]) : undefined;\n };\n\n return {\n filePath,\n nesting: {\n mediumThreshold: flag('medium-nesting'),\n highThreshold: flag('high-nesting')\n },\n cyclomatic: {\n mediumThreshold: flag('medium-cyclomatic'),\n highThreshold: flag('high-cyclomatic')\n },\n cognitive: {\n mediumThreshold: flag('medium-cognitive'),\n highThreshold: flag('high-cognitive')\n }\n };\n}\n\ntype ThresholdOverride = { mediumThreshold?: number; highThreshold?: number };\n\n// decision: returns undefined (not the detector's own default) when neither flag was passed —\n// analyzeSource already falls back to each detector's own DEFAULT_*_THRESHOLDS when its entry is\n// undefined, so resolving the default here too would just be a second place that default could\n// drift out of sync with the detector module that owns it\nfunction resolveThresholdOverride<T extends ThresholdOverride>(override: ThresholdOverride, defaults: T): T | undefined {\n if (override.mediumThreshold === undefined && override.highThreshold === undefined) {\n return undefined;\n }\n return {\n ...defaults,\n mediumThreshold: override.mediumThreshold ?? defaults.mediumThreshold,\n highThreshold: override.highThreshold ?? defaults.highThreshold\n };\n}\n\nfunction buildThresholds(parsed: ReturnType<typeof parseArgs>): AnalyzeThresholds {\n return {\n nesting: resolveThresholdOverride(parsed.nesting, DEFAULT_NESTING_THRESHOLDS),\n cyclomatic: resolveThresholdOverride(parsed.cyclomatic, DEFAULT_CYCLOMATIC_THRESHOLDS),\n cognitive: resolveThresholdOverride(parsed.cognitive, DEFAULT_COGNITIVE_THRESHOLDS)\n };\n}\n\nasync function loadParser(adapter: LanguageAdapter) {\n await Parser.init();\n const parser = new Parser();\n const grammarPath = path.join(__dirname, '..', adapter.grammarPath);\n const grammar = await Language.load(grammarPath);\n parser.setLanguage(grammar);\n return parser;\n}\n\nasync function main(): Promise<void> {\n const parsed = parseArgs(process.argv.slice(2));\n const { filePath } = parsed;\n\n if (!filePath) {\n printUsage();\n process.exit(2);\n }\n\n const adapter = resolveLanguageForFile(filePath);\n if (!adapter) {\n console.error(`Unsupported file type: ${filePath}`);\n printUsage();\n process.exit(2);\n }\n\n const sourceCode = fs.readFileSync(filePath, 'utf8');\n const parser = await loadParser(adapter);\n const tree = parser.parse(sourceCode);\n\n const violations: EnergyViolation[] = analyzeSource(sourceCode, tree, adapter, filePath, buildThresholds(parsed));\n\n console.log(JSON.stringify(violations, null, 2));\n\n const hasBlockingViolation = violations.some(v => v.severity === SEVERITY.HIGH || v.severity === SEVERITY.MEDIUM);\n process.exit(hasBlockingViolation ? 1 : 0);\n}\n\nmain().catch(error => {\n console.error('energy-state-cli failed:', error);\n process.exit(1);\n});\n","import { EnergyViolation } from '../types';\nimport { createPositionLookup } from './position';\nimport { LanguageAdapter } from './language';\nimport { analyzeNesting, NestingThresholds, DEFAULT_NESTING_THRESHOLDS } from './detectors/nesting';\nimport { analyzeFunctionComplexity, CyclomaticThresholds, DEFAULT_CYCLOMATIC_THRESHOLDS } from './detectors/cyclomatic';\nimport { analyzeCognitiveComplexity, CognitiveThresholds, DEFAULT_COGNITIVE_THRESHOLDS } from './detectors/cognitive';\nimport { analyzeFileCoherence, CoherenceThresholds, DEFAULT_COHERENCE_THRESHOLDS } from './detectors/coherence';\nimport { analyzeMagicNumbers, MagicNumberOptions, DEFAULT_MAGIC_NUMBER_OPTIONS } from './detectors/magicNumber';\nimport { analyzeMagicStrings, MagicStringOptions, DEFAULT_MAGIC_STRING_OPTIONS } from './detectors/magicString';\nimport { analyzeParameterCount } from './detectors/parameterCount';\nimport { analyzeInversionOpportunities } from './detectors/inversion';\nimport { analyzePrimitiveObsession } from './detectors/primitiveObsession';\nimport { analyzeMatchOpportunities, MatchOpportunityThresholds, DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS } from './detectors/matchOpportunity';\nimport { analyzeLogicalControlFlow } from './detectors/logicalControlFlow';\nimport { analyzeOpaqueBooleanLiteral } from './detectors/opaqueBoolean';\n\nexport interface AnalyzeThresholds {\n nesting?: NestingThresholds;\n cyclomatic?: CyclomaticThresholds;\n cognitive?: CognitiveThresholds;\n coherence?: CoherenceThresholds;\n matchOpportunity?: MatchOpportunityThresholds;\n magicNumber?: MagicNumberOptions;\n magicString?: MagicStringOptions;\n}\n\n// Language-agnostic entry point: runs every detector over an already-parsed\n// tree-sitter tree.\n//\n// decision: runs every detector unconditionally except where a detector exposes its own\n// enabled flag (currently magicNumber/magicString) — a caller-selected subset would let the\n// extension and the CLI (cli.ts) drift on which violations exist for the same file, but a\n// per-detector on/off default that both entry points inherit identically does not\n// reintroduce that drift\n// invariant: this module and everything it calls must not import vscode — used by both the VS Code extension (per keystroke) and the headless CLI (per file)\nexport function analyzeSource(\n sourceText: string,\n tree: any,\n language: LanguageAdapter,\n fileName: string,\n thresholds: AnalyzeThresholds = {}\n): EnergyViolation[] {\n const positions = createPositionLookup(sourceText);\n const violations: EnergyViolation[] = [];\n\n violations.push(...analyzeNesting(tree, positions, language, thresholds.nesting ?? DEFAULT_NESTING_THRESHOLDS));\n violations.push(...analyzeFunctionComplexity(tree, positions, language, thresholds.cyclomatic ?? DEFAULT_CYCLOMATIC_THRESHOLDS));\n violations.push(...analyzeCognitiveComplexity(tree, positions, language, thresholds.cognitive ?? DEFAULT_COGNITIVE_THRESHOLDS));\n violations.push(...analyzeFileCoherence(tree, fileName, language, thresholds.coherence ?? DEFAULT_COHERENCE_THRESHOLDS));\n violations.push(...analyzeMagicNumbers(tree, positions, language, thresholds.magicNumber ?? DEFAULT_MAGIC_NUMBER_OPTIONS));\n violations.push(...analyzeMagicStrings(tree, positions, language, thresholds.magicString ?? DEFAULT_MAGIC_STRING_OPTIONS));\n violations.push(...analyzeParameterCount(tree, positions, language));\n violations.push(...analyzeInversionOpportunities(tree, positions, language));\n violations.push(...analyzePrimitiveObsession(tree, positions, language));\n violations.push(...analyzeMatchOpportunities(tree, positions, language, thresholds.matchOpportunity ?? DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS));\n violations.push(...analyzeLogicalControlFlow(tree, positions, language));\n violations.push(...analyzeOpaqueBooleanLiteral(tree, positions, language));\n\n return violations;\n}\n","import { ComplexityHotspot, EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// Cognitive complexity (SonarSource): unlike cyclomatic complexity, every\n// decision point is weighted by how deeply it is nested, and early-return\n// guard clauses are not penalized. This tracks how hard code is to *read*,\n// not just how many paths it has.\n//\n// decision: implements a simplified subset of the SonarSource spec rather than the full algorithm, acceptable for a first pass:\n// assumption: `for`/`while` `else` clauses (where a grammar has them) are scored like `if`/`else`, even though they aren't really a decision point\n// assumption: boolean operator chain merging (\"a and b and c\" = one increment) only checks the immediate parent's operator, not the full chain direction\n// assumption: recursive calls to the enclosing function are not specially detected\n// assumption: match/switch-like constructs and try/except are scored once as a whole, not per-case — see each LanguageAdapter for exact node-type mapping\nexport function calculateCognitiveComplexity(\n functionNode: any,\n language: LanguageAdapter,\n onContribution?: (node: any, amount: number) => void\n): number {\n let score = 0;\n const { nodeTypes } = language;\n\n function add(node: any, amount: number) {\n score += amount;\n onContribution?.(node, amount);\n }\n\n function walkNested(node: any, nesting: number) {\n for (const child of node.children) {\n walk(child, language.entersNestedScope(child) ? nesting + 1 : nesting);\n }\n }\n\n function walk(node: any, nesting: number) {\n const booleanOperator = language.getBooleanOperator(node);\n if (booleanOperator) {\n const parentOperator = language.getBooleanOperator(node.parent);\n if (parentOperator !== booleanOperator) {\n add(node, 1);\n }\n for (const child of node.children) {\n walk(child, nesting);\n }\n return;\n }\n\n if (language.cognitiveNestedDecisionTypes.includes(node.type)) {\n add(node, 1 + nesting);\n walkNested(node, nesting);\n return;\n }\n\n if (node.type === nodeTypes.elseClause) {\n add(node, 1); // flat: no extra nesting increment for the else itself\n walkNested(node, nesting);\n return;\n }\n\n if (node.type === nodeTypes.conditionalExpression) { // ternary: \"a if cond else b\"\n add(node, 1 + nesting);\n for (const child of node.children) {\n walk(child, nesting + 1);\n }\n return;\n }\n\n if (language.isFunctionDefinition(node)) {\n // invariant: only the structural nesting increment for a nested named function/method counts here — its body is scored as its own separate violation by analyzeCognitiveComplexity's traversal, never folded into the enclosing function's score\n add(node, 1 + nesting);\n return;\n }\n\n if (node.type === nodeTypes.lambda) {\n // decision: attributes a lambda's body complexity to the enclosing function instead of scoring it separately, since lambdas aren't analyzed as their own function (see LanguageAdapter docs)\n add(node, 1 + nesting);\n walkNested(node, nesting);\n return;\n }\n\n for (const child of node.children || []) {\n walk(child, nesting);\n }\n }\n\n for (const child of functionNode.children) {\n walk(child, 0);\n }\n\n return score;\n}\n\n// Re-runs the same walk used for scoring, but records where each point of\n// score comes from so callers can render a per-line heatmap across the\n// function body instead of a single flat highlight.\nexport function findCognitiveHotspots(functionNode: any, positions: PositionLookup, language: LanguageAdapter): ComplexityHotspot[] {\n const hotspots: ComplexityHotspot[] = [];\n calculateCognitiveComplexity(functionNode, language, (node, amount) => {\n hotspots.push({ line: positions.toPosition(node.startIndex).line, weight: amount });\n });\n return hotspots;\n}\n\nexport interface CognitiveThresholds {\n mediumThreshold: number;\n highThreshold: number;\n}\n\nexport const DEFAULT_COGNITIVE_THRESHOLDS: CognitiveThresholds = {\n mediumThreshold: 15,\n highThreshold: 25\n};\n\nexport function analyzeCognitiveComplexity(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: CognitiveThresholds = DEFAULT_COGNITIVE_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const complexity = calculateCognitiveComplexity(node, language);\n if (complexity > thresholds.mediumThreshold) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.COGNITIVE,\n severity: complexity > thresholds.highThreshold ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `High cognitive complexity: ${complexity}. This function is hard to read; consider flattening nesting or extracting functions.`,\n hotspots: findCognitiveHotspots(node, positions, language)\n });\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { LanguageAdapter } from '../language';\n\nexport interface CoherenceThresholds {\n // decision: gates file-coherence sprawl detection on large-function count, not raw function count — languages like F# idiomatically have many small functions per module, so what matters is functions large enough to carry real complexity\n largeFunctionLines: number;\n // Number of large functions (per largeFunctionLines) a file can contain\n // before it's flagged.\n maxLargeFunctions: number;\n // Share (0-1) of a file's functions that must share a leading name word (e.g. all\n // `extractX`/`extractY`) for the file to be treated as one coherent domain broken into many\n // small steps, rather than a grab-bag of unrelated helpers, and skip the raw function-count\n // sprawl check below.\n singleDomainNameShare: number;\n}\n\nexport const DEFAULT_COHERENCE_THRESHOLDS: CoherenceThresholds = {\n largeFunctionLines: 20,\n maxLargeFunctions: 5,\n singleDomainNameShare: 0.7\n};\n\nfunction lineCount(node: any): number {\n return node.endPosition.row - node.startPosition.row + 1;\n}\n\n// decision: a raw function name is a weak signal on its own, but a *dominant leading word*\n// shared across most of a file's functions (extractFoo/extractBar/extractBaz) is a cheap,\n// AST-only proxy for \"this file is one coherent domain factored into many small steps\" —\n// exactly the case the function-count sprawl check below would otherwise misflag, since it\n// can't tell that apart from an actual grab-bag of unrelated helpers by count alone\nfunction leadingNameWord(node: any): string | null {\n const nameNode = node.children?.find((c: any) => c.type === 'identifier');\n if (!nameNode?.text) {\n return null;\n }\n const match = /^[a-z]+/.exec(nameNode.text);\n return match ? match[0] : nameNode.text.toLowerCase();\n}\n\nfunction looksLikeSingleDomain(functions: any[], minShare: number): boolean {\n const leadingWords = functions.map(leadingNameWord).filter((word): word is string => word !== null);\n if (leadingWords.length === 0) {\n return false;\n }\n\n const wordCounts = new Map<string, number>();\n for (const word of leadingWords) {\n wordCounts.set(word, (wordCounts.get(word) ?? 0) + 1);\n }\n\n const dominantWordCount = Math.max(...wordCounts.values());\n return dominantWordCount / leadingWords.length >= minShare;\n}\n\nfunction collectFunctionsAndImports(tree: any, language: LanguageAdapter): { functions: any[]; imports: string[] } {\n const functions: any[] = [];\n const imports: string[] = [];\n const { nodeTypes } = language;\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n functions.push(node);\n } else if (node.type === nodeTypes.importStatement || node.type === nodeTypes.importFromStatement) {\n imports.push(node.text || '');\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return { functions, imports };\n}\n\n// decision: the raw function-count trigger (8/12) and its severity escalation (15) are\n// deliberately not part of CoherenceThresholds like largeFunctionLines/maxLargeFunctions are —\n// they're secondary heuristics tuned around the utils-file naming proxy, not a threshold users\n// are expected to retune independently\nconst UTILS_FILE_FUNCTION_THRESHOLD = 8;\nconst GENERIC_FUNCTION_COUNT_THRESHOLD = 12;\nconst HIGH_FUNCTION_COUNT_THRESHOLD = 15;\nconst LARGE_FUNCTION_SEVERITY_MULTIPLIER = 1.5;\nconst IMPORT_COUNT_THRESHOLD = 10;\nconst HIGH_IMPORT_COUNT_THRESHOLD = 15;\n\n// Flag files with too many unrelated functions (utils/helpers sprawl)\n// decision: lowers the flagging threshold from 12 to 8 functions when the filename itself signals a grab-bag module (util/helper/common) — the name is treated as a proxy for \"already known to lack a single responsibility\"\nfunction checkFunctionCountSprawl(functions: any[], fileName: string, thresholds: CoherenceThresholds): EnergyViolation | null {\n if (functions.length <= UTILS_FILE_FUNCTION_THRESHOLD) {\n return null;\n }\n\n const baseName = fileName.split('/').pop() || '';\n const isUtilsFile = baseName.includes('util') || baseName.includes('helper') || baseName.includes('common');\n // decision: an explicit utils/helper/common filename overrides the naming-cohesion signal — a module that already admits to being a grab-bag in its own name doesn't get to argue its way out via consistent prefixes\n const singleDomain = !isUtilsFile && looksLikeSingleDomain(functions, thresholds.singleDomainNameShare);\n\n if (!isUtilsFile && (functions.length <= GENERIC_FUNCTION_COUNT_THRESHOLD || singleDomain)) {\n return null;\n }\n\n return {\n line: 0,\n column: 0,\n type: VIOLATION_TYPE.COHERENCE,\n severity: functions.length > HIGH_FUNCTION_COUNT_THRESHOLD ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `File coherence warning: ${functions.length} functions in one file. Consider splitting by domain.`\n };\n}\n\n// Flag files with too many large functions, regardless of total function count - a module with\n// 30 small functions is fine, one with 6 sprawling ones isn't.\nfunction checkLargeFunctionSprawl(functions: any[], thresholds: CoherenceThresholds): EnergyViolation | null {\n const largeFunctions = functions.filter(fn => lineCount(fn) > thresholds.largeFunctionLines);\n if (largeFunctions.length <= thresholds.maxLargeFunctions) {\n return null;\n }\n\n return {\n line: 0,\n column: 0,\n type: VIOLATION_TYPE.COHERENCE,\n severity: largeFunctions.length > thresholds.maxLargeFunctions * LARGE_FUNCTION_SEVERITY_MULTIPLIER ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `${largeFunctions.length} functions exceed ${thresholds.largeFunctionLines} lines. Large functions carry more complexity than function count alone suggests.`\n };\n}\n\n// Flag excessive imports (another sign of incoherence)\nfunction checkImportSprawl(imports: string[]): EnergyViolation | null {\n if (imports.length <= IMPORT_COUNT_THRESHOLD) {\n return null;\n }\n\n return {\n line: 0,\n column: 0,\n type: VIOLATION_TYPE.COHERENCE,\n severity: imports.length > HIGH_IMPORT_COUNT_THRESHOLD ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `Import sprawl: ${imports.length} imports suggest this file does too much.`\n };\n}\n\n// The \"Utils/Helpers Sprawl\" detector - detects files losing coherence\nexport function analyzeFileCoherence(\n tree: any,\n fileName: string,\n language: LanguageAdapter,\n thresholds: CoherenceThresholds = DEFAULT_COHERENCE_THRESHOLDS\n): EnergyViolation[] {\n const { functions, imports } = collectFunctionsAndImports(tree, language);\n\n return [\n checkFunctionCountSprawl(functions, fileName, thresholds),\n checkLargeFunctionSprawl(functions, thresholds),\n checkImportSprawl(imports)\n ].filter((violation): violation is EnergyViolation => violation !== null);\n}\n","import { ComplexityHotspot, EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// Cyclomatic complexity: counts independent paths through a function.\n// Every decision point (if/loop/except/boolean operator/ternary) adds 1,\n// regardless of how deeply it is nested.\nexport function calculateCyclomaticComplexity(functionNode: any, language: LanguageAdapter): number {\n let complexity = 1; // Base complexity\n\n function countDecisionPoints(node: any, isRoot: boolean) {\n if (language.decisionNodeTypes.includes(node.type) || language.getBooleanOperator(node) !== null || language.isTryElseClause(node)) {\n complexity++;\n }\n\n // invariant: a nested named function/method's decision points are never counted toward the enclosing function's complexity — it is scored as its own separate violation by analyzeFunctionComplexity's traversal\n if (!isRoot && language.isFunctionDefinition(node)) {\n return;\n }\n\n for (const child of node.children) {\n countDecisionPoints(child, false);\n }\n }\n\n countDecisionPoints(functionNode, true);\n return complexity;\n}\n\n// Locates every decision point in a function and weights it by nesting\n// depth, so callers can render a per-line heatmap showing where the\n// complexity actually piles up (the metric itself stays flat/unweighted).\nexport function findCyclomaticHotspots(functionNode: any, positions: PositionLookup, language: LanguageAdapter): ComplexityHotspot[] {\n const hotspots: ComplexityHotspot[] = [];\n\n function walk(node: any, depth: number, isRoot: boolean) {\n let nextDepth = depth;\n if (language.decisionNodeTypes.includes(node.type) || language.getBooleanOperator(node) !== null || language.isTryElseClause(node)) {\n const line = positions.toPosition(node.startIndex).line;\n hotspots.push({ line, weight: 1 + depth });\n nextDepth = depth + 1;\n }\n\n // invariant: mirrors calculateCyclomaticComplexity's traversal exactly — a nested named function/method is hotspotted separately as its own violation, never folded into this one\n if (!isRoot && language.isFunctionDefinition(node)) {\n return;\n }\n\n for (const child of node.children) {\n walk(child, nextDepth, false);\n }\n }\n\n walk(functionNode, 0, true);\n return hotspots;\n}\n\nexport interface CyclomaticThresholds {\n mediumThreshold: number;\n highThreshold: number;\n}\n\nexport const DEFAULT_CYCLOMATIC_THRESHOLDS: CyclomaticThresholds = {\n mediumThreshold: 10,\n highThreshold: 15\n};\n\nexport function analyzeFunctionComplexity(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: CyclomaticThresholds = DEFAULT_CYCLOMATIC_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const complexity = calculateCyclomaticComplexity(node, language);\n if (complexity > thresholds.mediumThreshold) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.COMPLEXITY,\n severity: complexity > thresholds.highThreshold ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `High cyclomatic complexity: ${complexity}. Consider breaking down this function.`,\n hotspots: findCyclomaticHotspots(node, positions, language)\n });\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// The \"Inversion Opportunity\" detector - finds patterns that could benefit from early returns\nexport function analyzeInversionOpportunities(tree: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n const { nodeTypes } = language;\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n analyzeFunction(node);\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n function analyzeFunction(functionNode: any) {\n // Find the function body\n const body = functionNode.children.find((child: any) => child.type === nodeTypes.block);\n if (!body) { return; }\n\n // Look for patterns that could benefit from inversion\n //\n // decision: filters on isNamed, not just a non-comment/non-blank text check - grammars\n // with an explicit block wrapper (e.g. TS's statement_block) include the literal '{'/'}'\n // tokens in .children, and those pass a text?.trim() check same as a real statement would.\n // Without this, `statements[0]` on such grammars is always the '{' token, never the\n // function's actual first statement, so Pattern 1 below can never match.\n const statements = body.children.filter((child: any) =>\n child.isNamed && child.type !== nodeTypes.comment && child.text?.trim()\n );\n\n // Pattern 1: Single large if-statement dominating the function\n if (statements.length >= 1) {\n const firstStatement = statements[0];\n if (firstStatement.type === nodeTypes.ifStatement) {\n const ifBody = firstStatement.children.find((child: any) => child.type === nodeTypes.block);\n if (ifBody && ifBody.children.length > 2) {\n // Check if this if-statement contains most of the function logic\n const totalLines = functionNode.endIndex - functionNode.startIndex;\n const ifLines = ifBody.endIndex - ifBody.startIndex;\n const ratio = ifLines / totalLines;\n\n // decision: flags only when the if-body spans more than half the function — below that, the if is a fragment rather than the function's dominant structure\n if (ratio > 0.5) {\n const position = positions.toPosition(firstStatement.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.INVERSION,\n severity: SEVERITY.MEDIUM,\n message: 'Consider inverting this condition and using early return for cleaner flow.'\n });\n }\n }\n }\n }\n\n // Pattern 2: Nested validation checks that could be guard clauses\n analyzeNestedValidation(body);\n\n // Pattern 3: Multiple nested if-statements that could be flattened\n analyzeNestedIfs(body);\n }\n\n function analyzeNestedValidation(body: any) {\n // Look for patterns like: if (valid) { if (moreValid) { if (evenMoreValid) { ... } } }\n // decision: caps the validation-chain walk at 4 levels — deep chains beyond that are already caught by analyzeNestedIfs, so this loop only needs to bound its own work\n let currentNode = body;\n let nestingLevel = 0;\n const validationChecks: any[] = [];\n\n while (currentNode && nestingLevel < 4) {\n // decision: matches against language.nestingControlTypes rather than the\n // nodeTypes.ifStatement/forStatement/whileStatement trio directly — TypeScript's\n // `for...of`/`for...in` parses as its own for_in_statement node, distinct from\n // nodeTypes.forStatement's plain `for_statement`, and nestingControlTypes is the\n // per-language set that already accounts for that (bug found by running this\n // detector on its own source: a sibling for-of loop went unseen by the old filter,\n // making its lone if-sibling look like the only statement in this body and get\n // mistaken for a validation-chain step)\n const statements = currentNode.children?.filter((child: any) =>\n language.nestingControlTypes.includes(child.type)\n ) || [];\n\n if (statements.length === 1 && statements[0].type === nodeTypes.ifStatement) {\n const ifStatement = statements[0];\n validationChecks.push(ifStatement);\n\n // Check if this looks like a validation (no else clause, simple condition)\n const hasElse = ifStatement.children.some((child: any) => child.type === nodeTypes.elseClause);\n if (!hasElse) {\n const ifBody = ifStatement.children.find((child: any) => child.type === nodeTypes.block);\n currentNode = ifBody;\n nestingLevel++;\n } else {\n break;\n }\n } else {\n break;\n }\n }\n\n // decision: suggests guard clauses starting at 2 chained validation checks — a single nested if is normal control flow, not yet a pattern worth restructuring\n if (validationChecks.length >= 2) {\n const firstCheck = validationChecks[0];\n const position = positions.toPosition(firstCheck.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.INVERSION,\n severity: SEVERITY.MEDIUM,\n message: `Found ${validationChecks.length} nested validation checks. Consider using guard clauses with early returns.`\n });\n }\n }\n\n function analyzeNestedIfs(body: any) {\n // Count deeply nested if statements that could be flattened\n let maxNesting = 0;\n let nestedIfLocation: any = null;\n\n function countNesting(node: any, currentDepth: number = 0) {\n // invariant: never descends into a nested function/method's body — that function is\n // walked as its own separate analyzeFunction call once traverse() reaches it, so\n // counting its if-nesting here too would both double-report the same location and\n // misattribute nesting depth to the wrong enclosing function (mirrors the same rule\n // in cognitive.ts's walk())\n if (language.isFunctionDefinition(node)) {\n return;\n }\n\n if (node.type === nodeTypes.ifStatement) {\n if (currentDepth > maxNesting) {\n maxNesting = currentDepth;\n nestedIfLocation = node;\n }\n currentDepth++;\n }\n\n for (const child of node.children || []) {\n countNesting(child, currentDepth);\n }\n }\n\n countNesting(body);\n\n // decision: flags if-nesting at 3+ levels here, one level below analyzeNesting's depth>3 threshold — this detector targets flattenable if-chains specifically, so it can fire earlier than the general nesting detector\n if (maxNesting >= 3 && nestedIfLocation) {\n const position = positions.toPosition(nestedIfLocation.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.INVERSION,\n severity: SEVERITY.MEDIUM,\n message: `Deep if-nesting (${maxNesting} levels). Consider inverting conditions or extracting functions.`\n });\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// The \"Logical Operator as Control Flow\" detector: flags `condition && doSomething();` (or\n// `condition || fallback();`) used as a standalone statement.\n//\n// decision: this is legal in every language the LanguageAdapter grammar reports an\n// expressionStatement for (Python's bare `and`/`or` expression statement included, not just\n// TS/JS's `&&`/`||`) and it already counts toward cyclomatic complexity via\n// getBooleanOperator (see cyclomatic.ts) — this detector exists only to name the *readability*\n// cost separately: an if hidden as an expression is invisible to anyone skimming for branches,\n// and can't grow past a single consequent expression without becoming unreadable.\nexport function analyzeLogicalControlFlow(tree: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n const { nodeTypes } = language;\n\n function traverse(node: any) {\n const operator = language.getBooleanOperator(node);\n if (operator !== null && node.parent?.type === nodeTypes.expressionStatement) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.LOGICAL_CONTROL_FLOW,\n severity: SEVERITY.LOW,\n message: operator === 'and'\n ? \"If-statement disguised as '&&'. Consider an explicit if-statement instead.\"\n : \"If-statement disguised as '||'. Consider an explicit if-statement instead.\"\n });\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface MagicNumberOptions {\n enabled: boolean;\n // Numeric literals that never carry hidden meaning worth naming (loop\n // bounds, unit steps) — checked against the literal's signed value.\n allowlist: number[];\n}\n\nexport const DEFAULT_MAGIC_NUMBER_OPTIONS: MagicNumberOptions = {\n enabled: true,\n allowlist: [0, 1, -1, 2]\n};\n\n// The \"Magic Number\" detector: numbers don't get an interpolation-style escape hatch the way\n// strings do, so this stays broad (any significant literal outside a named binding) and leans\n// on the allowlist plus a few structural exemptions (index position, default parameter value)\n// to keep it from flagging the common idioms where a bare number isn't actually magic.\nexport function analyzeMagicNumbers(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n options: MagicNumberOptions = DEFAULT_MAGIC_NUMBER_OPTIONS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n if (!options.enabled) {\n return violations;\n }\n const { nodeTypes } = language;\n\n function isInConstantContext(node: any): boolean {\n // decision: uses a heuristic (assignment at module level, optionally wrapped in `export`) rather than resolving actual scope — cheap to check per-node and sufficient because idiomatic module-level constants are the common case this is meant to exempt\n let parent = node.parent;\n while (parent) {\n if (parent.type === nodeTypes.assignment) {\n // decision: F# has no separate node type for \"function definition\" vs \"plain\n // value binding\" (both are function_or_value_defn), so a literal deep inside a\n // function's body would otherwise match this ancestor and be wrongly treated as\n // the function's own \"named constant\" value. Once the nearest assignment-shaped\n // ancestor is actually a function, the literal is computed logic, not a binding.\n if (language.isFunctionDefinition(parent)) {\n return false;\n }\n // decision: Python wraps every top-level `name = value` in an\n // `expression_statement` between the assignment and the module root (unlike\n // TS's `lexical_declaration`, which sits directly under `program`) — unwrap it\n // before checking against module/export so `MAX_RETRIES = 5` at module scope\n // is still recognized as a constant binding.\n let grandparent = parent.parent;\n if (grandparent?.type === nodeTypes.expressionStatement) {\n grandparent = grandparent.parent;\n }\n if (grandparent?.type === nodeTypes.module) {\n // decision: F#'s `declaration_expression` node type is reused both for the\n // true module root and for wrapping a nested `let` binding's continuation\n // inside a function body (there's no separate node type for \"this let is\n // the function's actual last expression\" vs \"this let is module-level\") — so\n // matching nodeTypes.module here isn't enough on its own; this also has to\n // rule out an enclosing function definition somewhere further up\n return !hasEnclosingFunction(parent);\n }\n if (nodeTypes.exportStatement && grandparent?.type === nodeTypes.exportStatement\n && grandparent.parent?.type === nodeTypes.module) {\n return true;\n }\n }\n parent = parent.parent;\n }\n return false;\n }\n\n function hasEnclosingFunction(assignmentNode: any): boolean {\n let ancestor = assignmentNode.parent;\n while (ancestor) {\n if (language.isFunctionDefinition(ancestor)) {\n return true;\n }\n ancestor = ancestor.parent;\n }\n return false;\n }\n\n function isIndexPosition(node: any): boolean {\n return !!node.parent && language.subscriptNodeTypes.includes(node.parent.type);\n }\n\n // decision: a plain `-` unary parent isn't its own node type across every grammar, so this\n // checks the structural shape (a 2-child parent whose first child is a literal `-` token)\n // instead of adding another per-language adapter hook for something this mechanical\n function signedValue(node: any, rawValue: number): number {\n const parent = node.parent;\n const isNegated = parent?.children?.length === 2 && parent.children[0]?.text === '-';\n return isNegated ? -rawValue : rawValue;\n }\n\n function traverse(node: any) {\n if (node.type === nodeTypes.integerLiteral || node.type === nodeTypes.floatLiteral) {\n // decision: always parseFloat, even for integerLiteral nodes — TS has no separate\n // floatLiteral node type (both map to nodeTypes.integerLiteral), so parseInt would\n // silently truncate a literal like `1.08` down to `1` and match the allowlist\n const rawValue = parseFloat(node.text);\n // decision: skips non-numeric text outright rather than falling through to the\n // allowlist/exemption checks — F#'s float grammar nests a `float`-typed fragment\n // node (digits/'.'/digits) inside its own `float`-typed literal, and TS's\n // `predefined_type` keyword token for the `number` annotation shares nodeTypes'\n // 'number' node type with the actual numeric-literal node; neither is a real value\n if (!Number.isNaN(rawValue)) {\n const value = signedValue(node, rawValue);\n\n const isExempt = options.allowlist.includes(value)\n || isInConstantContext(node)\n || isIndexPosition(node)\n || language.isDefaultParameterValue(node);\n\n if (!isExempt) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.MAGIC,\n severity: SEVERITY.LOW,\n message: `Magic number: ${node.text}. Consider extracting to a named constant.`\n });\n }\n }\n // A literal's own children (if any) are fragments of the same value, not\n // separate literals — never descend into them.\n return;\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface MagicStringOptions {\n enabled: boolean;\n // Only flag a string once it recurs at a decision point at least this many times across\n // the file — mirrors Sonar's S1192, and cuts single-use false positives further.\n minDuplicates: number;\n // Literal contents that are never worth naming regardless of how often they recur.\n allowlist: string[];\n}\n\nexport const DEFAULT_MAGIC_STRING_OPTIONS: MagicStringOptions = {\n enabled: true,\n minDuplicates: 2,\n allowlist: ['', 'utf-8', '__main__']\n};\n\n// The \"Magic String\" detector: unlike numbers, strings get a narrow scope — only literals\n// standing at a decision point (compared, checked for membership, or used as a dict/object\n// key) are candidates, since that's where an unnamed string actually risks a silent typo. Any\n// other string (a message, a docstring, an interpolated template) is left alone entirely.\nexport function analyzeMagicStrings(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n options: MagicStringOptions = DEFAULT_MAGIC_STRING_OPTIONS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n if (!options.enabled) {\n return violations;\n }\n const { nodeTypes } = language;\n\n function isDocstring(node: any): boolean {\n return node.parent?.type === nodeTypes.expressionStatement;\n }\n\n function stripQuotes(text: string): string {\n return text.length >= 2 ? text.slice(1, -1) : text;\n }\n\n function isEqualityComparisonOperand(node: any): boolean {\n // decision: also checks the grandparent, not just the parent — F#'s grammar wraps a\n // literal operand in an intermediate `const` node before it reaches the\n // `infix_expression`, so the comparison node itself sits one level further up than in\n // Python/TS. Checking the parent alone would silently drop every F# string comparison.\n const candidates = [node.parent, node.parent?.parent].filter(Boolean);\n // decision: compares node identity by `.id`, not `===` — web-tree-sitter mints a fresh\n // JS wrapper object on every `.children`/`.parent` access, so two accessors that reach\n // the same underlying tree node are not reference-equal even though `.id` matches\n return candidates.some(candidate =>\n language.getEqualityComparisons(candidate).some(({ left, right }) => left.id === node.id || right.id === node.id));\n }\n\n function isMembershipOperand(node: any, content: string): boolean {\n const container = node.parent?.parent;\n if (!container) {\n return false;\n }\n return language.getMembershipComparisons(container).some(({ values }) => values.includes(content));\n }\n\n function isKeyOrIndexPosition(node: any): boolean {\n return !!node.parent && language.subscriptNodeTypes.includes(node.parent.type);\n }\n\n function isDecisionPoint(node: any, content: string): boolean {\n return isEqualityComparisonOperand(node) || isMembershipOperand(node, content) || isKeyOrIndexPosition(node);\n }\n\n function isExempt(node: any, content: string): boolean {\n return isDocstring(node)\n || language.isFormattedOrInterpolatedString(node)\n || options.allowlist.includes(content)\n || content.length <= 1;\n }\n\n interface Candidate { node: any; content: string; }\n const candidates: Candidate[] = [];\n\n function traverse(node: any) {\n if (node.type === nodeTypes.stringLiteral) {\n const content = stripQuotes(node.text);\n if (isDecisionPoint(node, content) && !isExempt(node, content)) {\n candidates.push({ node, content });\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n\n const byContent = new Map<string, Candidate[]>();\n for (const candidate of candidates) {\n const group = byContent.get(candidate.content) ?? [];\n group.push(candidate);\n byContent.set(candidate.content, group);\n }\n\n for (const [content, group] of byContent) {\n if (group.length < options.minDuplicates) {\n continue;\n }\n const first = group[0].node;\n const position = positions.toPosition(first.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.MAGIC,\n severity: SEVERITY.LOW,\n message: `Magic string: \"${content}\" is compared/keyed against directly ${group.length} time(s). Consider extracting to a named constant or enum.`\n });\n }\n\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface MatchOpportunityThresholds {\n minBranches: number;\n}\n\nexport const DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS: MatchOpportunityThresholds = {\n minBranches: 3\n};\n\nfunction stripQuotes(text: string): string {\n return text.slice(1, -1);\n}\n\n// Walks an if-statement/if-expression node and returns every branch in the\n// same chain, in source order: the node itself, then either its flat elif\n// siblings (Python/F#, via getElseIfBranches) or — when there are none — the\n// chain of `else if`-nested if-statements (TypeScript's shape, where each\n// continuation sits one level inside an else_clause).\nfunction collectChainBranches(ifNode: any, language: LanguageAdapter): any[] {\n const branches = [ifNode];\n\n const flatSiblings = language.getElseIfBranches(ifNode);\n if (flatSiblings.length > 0) {\n branches.push(...flatSiblings);\n return branches;\n }\n\n let current = ifNode;\n while (true) {\n const elseClause = current.children?.find((c: any) => c.type === language.nodeTypes.elseClause);\n if (!elseClause) { break; }\n const nestedIf = elseClause.children?.find((c: any) => c.type === language.nodeTypes.ifStatement);\n if (!nestedIf) { break; }\n branches.push(nestedIf);\n current = nestedIf;\n }\n return branches;\n}\n\n// Collects every {variable, literal value} pair a single branch's own\n// condition/guard compares, without wandering into its consequence body or\n// into the next branch in the chain.\n//\n// decision: stops recursion at nodeTypes.block/elseClause and at any other\n// branch of the same chain, rather than resolving \"the condition\" via a\n// grammar-specific field name — this project's LanguageAdapter otherwise\n// avoids per-grammar field lookups (see language.ts), and a bounded scan\n// keeps that consistent at the cost of also scanning a branch's own\n// consequence when a grammar has no block wrapper (F#), matching the same\n// whole-subtree-scan tradeoff already accepted by primitiveObsession.ts\nfunction collectBranchDiscriminants(branchNode: any, otherBranches: Set<any>, language: LanguageAdapter): Array<{ variable: string; value: string }> {\n const { nodeTypes } = language;\n const found: Array<{ variable: string; value: string }> = [];\n\n function isVariableRef(node: any): boolean {\n return language.variableReferenceNodeTypes.includes(node.type);\n }\n\n function isLiteral(node: any): boolean {\n return node.type === nodeTypes.stringLiteral || node.type === nodeTypes.integerLiteral || node.type === nodeTypes.floatLiteral;\n }\n\n function literalValue(node: any): string {\n return node.type === nodeTypes.stringLiteral ? stripQuotes(node.text) : node.text;\n }\n\n function walk(node: any) {\n if (otherBranches.has(node) || node.type === nodeTypes.block || node.type === nodeTypes.elseClause) {\n return;\n }\n\n for (const { left, right } of language.getEqualityComparisons(node)) {\n if (isVariableRef(left) && isLiteral(right)) {\n found.push({ variable: left.text, value: literalValue(right) });\n } else if (isVariableRef(right) && isLiteral(left)) {\n found.push({ variable: right.text, value: literalValue(left) });\n }\n }\n for (const { left, values } of language.getMembershipComparisons(node)) {\n if (isVariableRef(left)) {\n values.forEach(value => found.push({ variable: left.text, value }));\n }\n }\n\n for (const child of node.children || []) {\n walk(child);\n }\n }\n\n walk(branchNode);\n return found;\n}\n\n// The \"Match Opportunity\" detector: an if/elif/elif chain (or TS's nested\n// `else if`) with enough branches, all discriminating on equality/membership\n// checks against the same single variable, is a natural fit for Python's\n// `match`, TypeScript's `switch`, or F#'s `match` — those give exhaustiveness\n// hints and one comparison site instead of N.\n//\n// decision: requires every branch to carry its own literal comparison against\n// the same variable — a chain with an unconditional catch-all `else` still\n// qualifies (the else itself contributes no discriminant and isn't a\n// \"branch\" for this check), but a chain mixing unrelated conditions across\n// branches does not, since match/switch can't express that dispatch anyway\nexport function analyzeMatchOpportunities(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: MatchOpportunityThresholds = DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n const { nodeTypes } = language;\n const consumed = new Set<any>();\n\n function traverse(node: any) {\n if (node.type === nodeTypes.ifStatement && !consumed.has(node)) {\n analyzeChain(node);\n }\n\n for (const child of node.children || []) {\n traverse(child);\n }\n }\n\n function analyzeChain(topIfNode: any) {\n const branches = collectChainBranches(topIfNode, language);\n branches.slice(1).forEach(branch => consumed.add(branch));\n\n if (branches.length < thresholds.minBranches) {\n return;\n }\n\n const perBranchDiscriminants = branches.map(branch =>\n collectBranchDiscriminants(branch, new Set(branches.filter(b => b !== branch)), language)\n );\n\n if (perBranchDiscriminants.some(discriminants => discriminants.length === 0)) {\n return;\n }\n\n const candidateVariables = perBranchDiscriminants[0].map(d => d.variable);\n const commonVariable = candidateVariables.find(variable =>\n perBranchDiscriminants.every(discriminants => discriminants.some(d => d.variable === variable))\n );\n if (!commonVariable) {\n return;\n }\n\n const position = positions.toPosition(topIfNode.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.MATCH_OPPORTUNITY,\n severity: SEVERITY.LOW,\n message: `This ${branches.length}-way if/elif chain all branch on '${commonVariable}'. Consider a match/switch statement for clearer, exhaustiveness-checked dispatch.`\n });\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface NestingThresholds {\n mediumThreshold: number;\n highThreshold: number;\n}\n\n// decision: default medium threshold of 3 is the point where tracking active conditions starts to strain working memory; high threshold of 5 escalates severity for the deepest offenders\nexport const DEFAULT_NESTING_THRESHOLDS: NestingThresholds = {\n mediumThreshold: 3,\n highThreshold: 5\n};\n\nexport function analyzeNesting(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: NestingThresholds = DEFAULT_NESTING_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any, depth: number = 0) {\n if (language.nestingControlTypes.includes(node.type)) {\n if (depth > thresholds.mediumThreshold) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.NESTING,\n severity: depth > thresholds.highThreshold ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `Excessive nesting depth: ${depth}. Consider extracting.`\n });\n }\n depth++;\n }\n\n for (const child of node.children) {\n traverse(child, depth);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// The \"Opaque Boolean Literal\" detector: a bare `true`/`false` passed positionally\n// into a call gives the reader no information about what it means without tracing\n// into the callee's signature — unlike primitive-obsession's swap-risk check, this\n// doesn't need a second adjacent parameter to be a problem; one opaque literal is\n// enough. Naming it at the call site (whatever the language allows: a keyword\n// argument, an object-literal field, F#'s named-argument syntax) fixes the\n// readability problem even where it isn't enforced by the type checker — see\n// isPositionalCallArgument's per-language doc for how each grammar distinguishes\n// labeled from positional.\nfunction buildViolation(node: any, positions: PositionLookup): EnergyViolation {\n const position = positions.toPosition(node.startIndex);\n return {\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.OPAQUE_BOOLEAN,\n severity: SEVERITY.LOW,\n message: `Opaque boolean literal: a bare '${node.text}' passed positionally tells the reader nothing without checking the callee's signature. Name it at the call site (a keyword argument, an object-literal field, or F#'s named-argument syntax) — or better, split into two clearly named functions (e.g. enableX()/disableX()) or use an enum.`\n };\n}\n\nexport function analyzeOpaqueBooleanLiteral(tree: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isBooleanLiteral(node) && language.isPositionalCallArgument(node)) {\n violations.push(buildViolation(node, positions));\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// decision: does a level-by-level (breadth-first) search rather than a depth-first one — finds a function's own parameters node even when nested a level below the function node itself (e.g. F#'s argument_patterns sits inside function_declaration_left), while still stopping before it can reach a nested function's parameters\n// shared with primitiveObsession.ts's parameter-swap-risk check — same structural problem, same fix\nexport function findParametersNode(node: any, parametersType: string): any {\n for (const child of node.children) {\n if (child.type === parametersType) {\n return child;\n }\n }\n for (const child of node.children) {\n const found = findParametersNode(child, parametersType);\n if (found) {\n return found;\n }\n }\n return undefined;\n}\n\n// The \"Parameter Explosion\" detector\nexport function analyzeParameterCount(tree: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const params = findParametersNode(node, language.nodeTypes.parameters);\n if (params) {\n const paramCount = params.children.filter((child: any) =>\n language.parameterChildTypes.includes(child.type)\n ).length;\n\n // decision: flags past 5 parameters (medium) and 8 (high) — beyond ~5, callers typically can no longer recall argument order/meaning without checking the signature\n if (paramCount > 5) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.PARAMETERS,\n severity: paramCount > 8 ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `Parameter explosion: ${paramCount} parameters. Consider using objects or builder pattern.`\n });\n }\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\nimport { findParametersNode } from './parameterCount';\n\ninterface TypedParam {\n name: string;\n type: string;\n node: any;\n keywordOnly: boolean;\n}\n\n// Sub-check A (\"parameter swap risk\"): two adjacent parameters sharing the\n// same unqualified primitive type are indistinguishable at the call site —\n// nothing stops a caller passing them in the wrong order.\n//\n// decision: a pair is suppressed only when BOTH params sit past a\n// keywordOnlyBoundaryTypes marker (Python's bare `*` / `*args`) — the signature\n// itself must make positional calls impossible, not just \"some call sites happen\n// to use keywords\". A signature that still allows positional calls will\n// eventually get one.\n// known gap: Python's `**kwargs` dict-splatting can reintroduce positional-style\n// swap risk even past a keyword-only boundary (a caller building the dict by\n// hand can still transpose the values) — not worth detecting, left undocumented\n// in code but called out here for future readers.\nfunction findParameterCollisions(paramsNode: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n let keywordOnly = false;\n const typed: TypedParam[] = [];\n for (const n of paramsNode.children) {\n if (language.keywordOnlyBoundaryTypes.includes(n.type)) {\n keywordOnly = true;\n continue;\n }\n const extracted = language.extractTypedParameter(n);\n if (extracted) {\n typed.push({ ...extracted, node: n, keywordOnly });\n }\n }\n\n for (let i = 0; i < typed.length - 1; i++) {\n const a = typed[i];\n const b = typed[i + 1];\n if (a.type !== b.type || !language.primitiveTypeNames.has(a.type)) {\n continue;\n }\n if (a.keywordOnly && b.keywordOnly) {\n continue;\n }\n const position = positions.toPosition(a.node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.PRIMITIVE_OBSESSION,\n severity: SEVERITY.MEDIUM,\n message: `Primitive obsession: consecutive parameters '${a.name}: ${a.type}' and '${b.name}: ${b.type}' share the same primitive type — a caller can swap them and nothing will complain. Consider ${language.distinctTypeAdvice} so the type checker catches it.`\n });\n }\n return violations;\n}\n\nfunction stripQuotes(text: string): string {\n return text.slice(1, -1);\n}\n\n// Sub-check B (\"stringly-typed control flow\"): a variable repeatedly\n// compared against distinct string literals is a de facto enum encoded as\n// strings — no exhaustiveness checking, no typo protection at the type level.\n//\n// assumption: scoped to one function body at a time — the same variable name reused\n// across unrelated functions (e.g. two functions both naming a parameter `status`) does\n// not accumulate into a single false positive\nfunction findStringlyTypedControlFlow(functionNode: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const { nodeTypes } = language;\n const valuesByVariable = new Map<string, Set<string>>();\n const firstOccurrence = new Map<string, any>();\n\n function isVariableRef(node: any): boolean {\n return language.variableReferenceNodeTypes.includes(node.type);\n }\n\n function record(varNode: any, values: string[]) {\n const key = varNode.text;\n if (!valuesByVariable.has(key)) {\n valuesByVariable.set(key, new Set());\n firstOccurrence.set(key, varNode);\n }\n const set = valuesByVariable.get(key)!;\n values.forEach(v => set.add(v));\n }\n\n function traverse(node: any) {\n for (const { left, right } of language.getEqualityComparisons(node)) {\n if (isVariableRef(left) && right.type === nodeTypes.stringLiteral) {\n record(left, [stripQuotes(right.text)]);\n } else if (isVariableRef(right) && left.type === nodeTypes.stringLiteral) {\n record(right, [stripQuotes(left.text)]);\n }\n }\n for (const { left, values } of language.getMembershipComparisons(node)) {\n if (isVariableRef(left) && values.length > 0) {\n record(left, values);\n }\n }\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(functionNode);\n\n const violations: EnergyViolation[] = [];\n for (const [key, values] of valuesByVariable) {\n if (values.size >= 3) {\n const node = firstOccurrence.get(key);\n const position = positions.toPosition(node.startIndex);\n const sample = Array.from(values).slice(0, 4);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.PRIMITIVE_OBSESSION,\n severity: SEVERITY.LOW,\n message: `Stringly-typed control flow: '${key}' is compared against ${values.size} distinct string literals (${sample.join(', ')}${values.size > sample.length ? ', …' : ''}). Consider an Enum or Literal type to catch typos and get exhaustiveness checking.`\n });\n }\n }\n return violations;\n}\n\n// The \"Primitive Obsession\" detector: strings and numbers standing in for\n// what should be a distinct, validated type. Both sub-checks are driven\n// entirely through LanguageAdapter hooks (extractTypedParameter,\n// primitiveTypeNames, getEqualityComparisons, getMembershipComparisons,\n// variableReferenceNodeTypes), so Python/TypeScript/F# all run the same\n// traversal logic below.\nexport function analyzePrimitiveObsession(tree: any, positions: PositionLookup, language: LanguageAdapter): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const paramsNode = findParametersNode(node, language.nodeTypes.parameters);\n if (paramsNode) {\n violations.push(...findParameterCollisions(paramsNode, positions, language));\n }\n violations.push(...findStringlyTypedControlFlow(node, positions, language));\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","// Offset-to-line/column conversion that doesn't depend on vscode.TextDocument,\n// so detectors can run both inside the extension and in a headless CLI.\n//\n// decision: binary-searches precomputed line-start offsets instead of using vscode.TextDocument.positionAt — keeps detectors host-independent (see cli.ts)\n\nexport interface Position {\n line: number;\n column: number;\n}\n\nexport interface PositionLookup {\n toPosition(offset: number): Position;\n}\n\nexport function createPositionLookup(sourceText: string): PositionLookup {\n const lineStartOffsets: number[] = [0];\n for (let i = 0; i < sourceText.length; i++) {\n if (sourceText[i] === '\\n') {\n lineStartOffsets.push(i + 1);\n }\n }\n\n return {\n toPosition(offset: number): Position {\n let low = 0;\n let high = lineStartOffsets.length - 1;\n while (low < high) {\n const mid = Math.ceil((low + high) / 2);\n if (lineStartOffsets[mid] <= offset) {\n low = mid;\n } else {\n high = mid - 1;\n }\n }\n return { line: low, column: offset - lineStartOffsets[low] };\n }\n };\n}\n","import { LanguageAdapter } from '../core/language';\n\n// tree-sitter-fsharp has no block/body wrapper node — an if/for/while's\n// branches are direct expression children of the construct itself (there's\n// no equivalent of Python's `block` or TypeScript's `statement_block`), and\n// `else` isn't a distinct node type either (an else-if chain is just a\n// nested if_expression in the `else` position). Boolean operators (&&/||)\n// aren't their own node type: they're an `infix_expression` whose `infix_op`\n// child's text happens to be \"&&\" or \"||\", same shape as `+`/`-`/etc.\n//\n// decision: checks for a function_declaration_left child in isFunctionDefinition rather than matching function_or_value_defn alone — that node type also covers plain `let`/`let!` bindings (via value_declaration_left), and without the check every nested `let`/`let!` inside a function body (e.g. inside a MailboxProcessor `actor { let! msg = ... }`) would be misidentified as its own nested closure\n// invariant: a nested let/let! binding never inflates the enclosing function's cognitive complexity or nesting depth — only bindings with a function_declaration_left child count as a function\n//\n// assumption: any literal that is the direct value of a `let` binding (top-level or nested) is already named and not flagged as a magic value — broader than Python's module-only rule, since function_or_value_defn -> declaration_expression looks identical at every scope, but still aligned with the detector's intent that `let NAME = ...` IS F#'s idiomatic way to name a constant\nexport const FSHARP: LanguageAdapter = {\n id: 'fsharp',\n grammarPath: 'grammars/tree-sitter-fsharp.wasm',\n nodeTypes: {\n block: null,\n parameters: 'argument_patterns',\n ifStatement: 'if_expression',\n elseClause: null,\n forStatement: 'for_expression',\n whileStatement: 'while_expression',\n conditionalExpression: null, // ternary-position `if` reuses if_expression, already covered\n lambda: 'fun_expression',\n importStatement: 'import_decl', // `open X`\n importFromStatement: null,\n expressionStatement: null, // F# has no string-literal docstring convention\n assignment: 'function_or_value_defn',\n module: 'declaration_expression',\n exportStatement: null,\n comment: 'line_comment',\n integerLiteral: 'int',\n floatLiteral: 'float',\n stringLiteral: 'string'\n },\n isFunctionDefinition(node: any): boolean {\n return node?.type === 'function_or_value_defn'\n && node.children?.some((child: any) => child.type === 'function_declaration_left');\n },\n parameterChildTypes: ['long_identifier', 'typed_pattern'],\n decisionNodeTypes: [\n 'if_expression', 'elif_expression', 'for_expression', 'while_expression',\n 'try_expression', 'match_expression'\n ],\n cognitiveNestedDecisionTypes: [\n 'if_expression', 'elif_expression', 'for_expression', 'while_expression',\n 'try_expression', 'match_expression'\n ],\n nestingControlTypes: ['if_expression', 'elif_expression', 'for_expression', 'while_expression', 'match_expression'],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'infix_expression') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === 'infix_op');\n if (opToken?.text === '&&') {\n return 'and';\n }\n if (opToken?.text === '||') {\n return 'or';\n }\n return null;\n },\n // No block wrapper exists, so every child of a decision point is nested content.\n entersNestedScope(): boolean {\n return true;\n },\n // F#'s try_expression has no else-branch construct.\n isTryElseClause(): boolean {\n return false;\n },\n // long_identifier_or_op's own .text is already the bare (possibly dotted) name, so\n // it's used as-is rather than unwrapped down to a leaf identifier.\n variableReferenceNodeTypes: ['long_identifier_or_op'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'typed_pattern') {\n return null;\n }\n const patternNode = node.children.find((c: any) => c.type === 'identifier_pattern');\n const typeNode = node.children.find((c: any) => c.type === 'simple_type');\n if (!patternNode || !typeNode) {\n return null;\n }\n return { name: patternNode.text, type: typeNode.text };\n },\n primitiveTypeNames: new Set(['string', 'int', 'float', 'bool']),\n // F#'s named-argument syntax is optional at the call site, so it doesn't prevent a\n // future positional call — not a valid swap-risk mitigation. See language.ts's field doc.\n keywordOnlyBoundaryTypes: [],\n distinctTypeAdvice: 'a single-case union type',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'infix_expression') {\n return [];\n }\n const opToken = node.children.find((c: any) => c.type === 'infix_op');\n if (!opToken || opToken.text !== '=') {\n return [];\n }\n const operands = node.children.filter((c: any) => c.type !== 'infix_op');\n if (operands.length !== 2) {\n return [];\n }\n const [left, rawRight] = operands;\n // Literals are wrapped in a `const` node; unwrap so callers can compare\n // .type against nodeTypes.stringLiteral directly, same as Python/TS.\n const right = (rawRight.type === 'const' && rawRight.children?.length === 1)\n ? rawRight.children[0]\n : rawRight;\n return [{ left, right }];\n },\n // F# has no `x in (a, b, c)`-style membership construct; repeated equality checks\n // (e.g. an elif chain) still accumulate via getEqualityComparisons.\n getMembershipComparisons(): Array<{ left: any; values: string[] }> {\n return [];\n },\n getElseIfBranches(node: any): any[] {\n return node?.children?.filter((c: any) => c.type === 'elif_expression') ?? [];\n },\n // F# indexes via `.[i]` rather than a dedicated subscript node — left unmodeled rather\n // than guessed at with a fragile node-type match.\n subscriptNodeTypes: [],\n // F# also has interpolated ($\"...\") strings, but they aren't distinguished from plain\n // strings here — a known gap, same tradeoff as leaving callNodeTypes unmodeled above.\n isFormattedOrInterpolatedString(): boolean {\n return false;\n },\n isDefaultParameterValue(): boolean {\n return false;\n },\n // A bool literal parses as a `const` node wrapping a `bool` child (its .text is\n // already \"true\"/\"false\", same as Python/TS's dedicated literal node types).\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'const' && node.children?.length === 1 && node.children[0]?.type === 'bool';\n },\n // F# has no dedicated call-expression or argument-list node — curried application\n // (`f true`) and paren-tuple application (`f(true, x)`) both parse as\n // application_expression, and named-argument syntax (`retries = true`) reuses the\n // same infix_expression node the primitive-obsession detector treats as equality\n // elsewhere in this grammar. Three shapes count as \"positional\":\n // 1. curried: `application_expression(callee, true)` — the literal is the\n // argument (not callee) child of an application_expression directly.\n // 2. paren, single arg: `f(true)` — same shape as (1), the parens contribute no\n // extra node.\n // 3. paren, multiple args: `f(true, x)` — the literal is a direct element of a\n // `tuple_expression` that is itself an application_expression's argument.\n // A named argument's literal sits one level deeper, inside `infix_expression`\n // (case 1/2's `application_expression` child, or case 3's `tuple_expression`\n // element) — never a direct child of either, so it never matches below without a\n // separate \"is labeled\" check.\n isPositionalCallArgument(node: any): boolean {\n const parent = node?.parent;\n if (parent?.type === 'application_expression') {\n // Guard against the literal being the callee itself — never true in\n // practice (a bool can't be applied to arguments), kept for safety.\n return parent.children?.[0]?.id !== node.id;\n }\n return parent?.type === 'tuple_expression' && parent.parent?.type === 'application_expression';\n }\n};\n","import { LanguageAdapter } from '../core/language';\nimport { PYTHON } from './python';\nimport { FSHARP } from './fsharp';\nimport { TYPESCRIPT } from './typescript';\n\n// decision: keys LANGUAGES by vscode languageId rather than file extension — the extension host already resolves languageId, and resolveLanguageForFile below provides the file-extension equivalent for the CLI\nexport const LANGUAGES: Record<string, LanguageAdapter> = {\n python: PYTHON,\n fsharp: FSHARP,\n typescript: TYPESCRIPT\n};\n\nconst EXTENSION_TO_LANGUAGE_ID: Record<string, string> = {\n '.py': 'python',\n '.fs': 'fsharp',\n '.fsx': 'fsharp',\n '.fsi': 'fsharp',\n '.ts': 'typescript'\n};\n\nexport function resolveLanguageForFile(fileName: string): LanguageAdapter | undefined {\n const dotIndex = fileName.lastIndexOf('.');\n if (dotIndex === -1) {\n return undefined;\n }\n const extension = fileName.slice(dotIndex).toLowerCase();\n const languageId = EXTENSION_TO_LANGUAGE_ID[extension];\n return languageId ? LANGUAGES[languageId] : undefined;\n}\n","import { LanguageAdapter } from '../core/language';\n\nexport const PYTHON: LanguageAdapter = {\n id: 'python',\n grammarPath: 'grammars/tree-sitter-python.wasm',\n nodeTypes: {\n block: 'block',\n parameters: 'parameters',\n ifStatement: 'if_statement',\n elseClause: 'else_clause',\n forStatement: 'for_statement',\n whileStatement: 'while_statement',\n conditionalExpression: 'conditional_expression',\n lambda: 'lambda',\n importStatement: 'import_statement',\n importFromStatement: 'import_from_statement',\n expressionStatement: 'expression_statement',\n assignment: 'assignment',\n module: 'module',\n exportStatement: null,\n comment: 'comment',\n integerLiteral: 'integer',\n floatLiteral: 'float',\n stringLiteral: 'string'\n },\n isFunctionDefinition(node: any): boolean {\n return node?.type === 'function_definition';\n },\n parameterChildTypes: ['identifier', 'default_parameter'],\n decisionNodeTypes: [\n 'if_statement', 'elif_clause', 'while_statement', 'for_statement',\n 'except_clause', 'conditional_expression', 'match_statement'\n ],\n cognitiveNestedDecisionTypes: [\n 'if_statement', 'elif_clause', 'for_statement', 'while_statement', 'except_clause', 'match_statement'\n ],\n nestingControlTypes: ['if_statement', 'for_statement', 'while_statement', 'with_statement', 'match_statement'],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'boolean_operator') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === 'and' || c.type === 'or');\n return opToken ? (opToken.type as 'and' | 'or') : null;\n },\n entersNestedScope(node: any): boolean {\n return node?.type === 'block';\n },\n // decision: `else_clause` is shared by if/for/while/try in tree-sitter-python, but only a\n // try's else is a real decision point (mirrors ruff's C901: a non-vacuous try-else adds 1).\n // if/for/while's else already scores 0 via decisionNodeTypes, matching how plain `else`\n // (as opposed to `elif`) is excluded there — this predicate exists to avoid conflating\n // try's else with those.\n isTryElseClause(node: any): boolean {\n return node?.type === 'else_clause' && node?.parent?.type === 'try_statement';\n },\n variableReferenceNodeTypes: ['identifier', 'attribute'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'typed_parameter' && node?.type !== 'typed_default_parameter') {\n return null;\n }\n const nameNode = node.children.find((c: any) => c.type === 'identifier');\n const typeNode = node.children.find((c: any) => c.type === 'type');\n if (!nameNode || !typeNode) {\n return null;\n }\n return { name: nameNode.text, type: typeNode.text };\n },\n primitiveTypeNames: new Set(['str', 'int', 'float', 'bool', 'bytes']),\n keywordOnlyBoundaryTypes: ['keyword_separator', 'list_splat_pattern'],\n distinctTypeAdvice: 'NewType or a dataclass',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'comparison_operator') {\n return [];\n }\n const results: Array<{ left: any; right: any }> = [];\n const children = node.children;\n for (let i = 1; i < children.length - 1; i++) {\n if (children[i].type === '==') {\n results.push({ left: children[i - 1], right: children[i + 1] });\n }\n }\n return results;\n },\n // decision: only Python gets this — TS's equivalent is a `.includes()` call expression\n // (not a comparison node) and F# has no direct construct; both still accumulate distinct\n // literals across separate equality comparisons via getEqualityComparisons.\n getMembershipComparisons(node: any): Array<{ left: any; values: string[] }> {\n if (node?.type !== 'comparison_operator') {\n return [];\n }\n const results: Array<{ left: any; values: string[] }> = [];\n const children = node.children;\n for (let i = 1; i < children.length - 1; i++) {\n if (children[i].type !== 'in') {\n continue;\n }\n const left = children[i - 1];\n const right = children[i + 1];\n if (right.type !== 'tuple' && right.type !== 'list' && right.type !== 'set') {\n continue;\n }\n const values: string[] = [];\n let allStrings = true;\n for (const child of right.children) {\n if (!child.isNamed) {\n continue;\n }\n if (child.type !== 'string') {\n allStrings = false;\n break;\n }\n values.push(child.text.slice(1, -1));\n }\n if (allStrings && values.length > 0) {\n results.push({ left, values });\n }\n }\n return results;\n },\n getElseIfBranches(node: any): any[] {\n return node?.children?.filter((c: any) => c.type === 'elif_clause') ?? [];\n },\n subscriptNodeTypes: ['subscript'],\n isFormattedOrInterpolatedString(node: any): boolean {\n if (node?.children?.some((c: any) => c.type === 'interpolation')) {\n // f-string\n return true;\n }\n // decision: compares node identity by `.id`, not `===` — web-tree-sitter mints a fresh\n // JS wrapper object on every `.children`/`.parent` access, so two accessors that reach\n // the same underlying tree node are not reference-equal even though `.id` matches\n const parent = node?.parent;\n if (parent?.type === 'binary_operator' && parent.children?.[0]?.id === node.id\n && parent.children?.some((c: any) => c.type === '%')) {\n // \"%s\" % value\n return true;\n }\n if (parent?.type === 'attribute' && parent.children?.[0]?.id === node.id) {\n const methodName = parent.children?.find((c: any) => c.type === 'identifier');\n if (methodName?.text === 'format' && parent.parent?.type === 'call') {\n return true;\n }\n }\n return false;\n },\n isDefaultParameterValue(node: any): boolean {\n const parent = node?.parent;\n return (parent?.type === 'default_parameter' || parent?.type === 'typed_default_parameter')\n && parent.children?.[parent.children.length - 1]?.id === node.id;\n },\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'true' || node?.type === 'false';\n },\n // A keyword argument (`retries=True`) wraps the literal in its own `keyword_argument`\n // node, so a labeled boolean's parent is never `argument_list` directly.\n isPositionalCallArgument(node: any): boolean {\n return node?.parent?.type === 'argument_list' && node.parent.parent?.type === 'call';\n }\n};\n","import { LanguageAdapter } from '../core/language';\n\n// tree-sitter-typescript is structurally close to Python's grammar: real\n// block/body nodes, a distinct else_clause, and and/or (&&/||) each get\n// their own node type as the operator-token child of a binary_expression.\n//\n// decision: treats arrow functions (`(x) => x + 1`) as `lambda`, matching Python's `lambda` — they add structural nesting in cognitive complexity but aren't analyzed by parameter-count/complexity/coherence themselves (same limitation Python already has for its own lambdas); only named `function_declaration`s and class `method_definition`s count as \"a function\" for those detectors\n//\n// tradeoff: accepts a slightly higher cognitive-complexity score for `else if` chains (else_clause's flat +1 plus the nested if's `1 + nesting`) instead of unwrapping single-if else-clauses specially — TypeScript's `else if` parses as `else_clause` wrapping a nested `if_statement`, unlike Python's flat elif sibling\nexport const TYPESCRIPT: LanguageAdapter = {\n id: 'typescript',\n grammarPath: 'grammars/tree-sitter-typescript.wasm',\n nodeTypes: {\n block: 'statement_block',\n parameters: 'formal_parameters',\n ifStatement: 'if_statement',\n elseClause: 'else_clause',\n forStatement: 'for_statement',\n whileStatement: 'while_statement',\n conditionalExpression: 'ternary_expression',\n lambda: 'arrow_function',\n importStatement: 'import_statement',\n importFromStatement: null, // import_statement already covers every import form\n expressionStatement: 'expression_statement',\n assignment: 'lexical_declaration',\n module: 'program',\n exportStatement: 'export_statement',\n comment: 'comment',\n integerLiteral: 'number', // TS doesn't distinguish int/float, both are \"number\"\n floatLiteral: null,\n stringLiteral: 'string'\n },\n isFunctionDefinition(node: any): boolean {\n return node?.type === 'function_declaration' || node?.type === 'method_definition';\n },\n parameterChildTypes: ['required_parameter', 'optional_parameter'],\n decisionNodeTypes: [\n 'if_statement', 'for_statement', 'for_in_statement', 'while_statement',\n 'catch_clause', 'ternary_expression'\n ],\n cognitiveNestedDecisionTypes: [\n 'if_statement', 'for_statement', 'for_in_statement', 'while_statement', 'catch_clause'\n ],\n nestingControlTypes: ['if_statement', 'for_statement', 'for_in_statement', 'while_statement'],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'binary_expression') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === '&&' || c.type === '||');\n if (!opToken) {\n return null;\n }\n return opToken.type === '&&' ? 'and' : 'or';\n },\n entersNestedScope(node: any): boolean {\n return node?.type === 'statement_block';\n },\n // JS/TS try/catch has no else-branch construct.\n isTryElseClause(): boolean {\n return false;\n },\n variableReferenceNodeTypes: ['identifier', 'member_expression'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'required_parameter' && node?.type !== 'optional_parameter') {\n return null;\n }\n const nameNode = node.children.find((c: any) => c.type === 'identifier');\n const typeAnnotation = node.children.find((c: any) => c.type === 'type_annotation');\n if (!nameNode || !typeAnnotation) {\n return null;\n }\n // type_annotation's children are [':', <the actual type node>]\n const typeNode = typeAnnotation.children.find((c: any) => c.type !== ':');\n if (!typeNode) {\n return null;\n }\n return { name: nameNode.text, type: typeNode.text };\n },\n primitiveTypeNames: new Set(['string', 'number', 'boolean']),\n // TS has no enforced-keyword-only parameter syntax — see language.ts's field doc.\n keywordOnlyBoundaryTypes: [],\n distinctTypeAdvice: 'a branded/nominal type (e.g. a tagged type alias)',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'binary_expression') {\n return [];\n }\n const opToken = node.children.find((c: any) => c.type === '===' || c.type === '==');\n if (!opToken) {\n return [];\n }\n const operands = node.children.filter((c: any) => c !== opToken);\n if (operands.length !== 2) {\n return [];\n }\n return [{ left: operands[0], right: operands[1] }];\n },\n // TS's set-membership idiom is `[...].includes(x)`, a call_expression rather than a\n // comparison node — not modeled here; repeated equality checks still accumulate via\n // getEqualityComparisons.\n getMembershipComparisons(): Array<{ left: any; values: string[] }> {\n return [];\n },\n // `else if` has no flat elif node in this grammar — it's a nested if_statement one\n // level inside else_clause, which the match-opportunity detector walks itself.\n getElseIfBranches(): any[] {\n return [];\n },\n subscriptNodeTypes: ['subscript_expression'],\n // TS has no node type where an interpolated/formatted string still shares\n // stringLiteral's node type — template literals parse as `template_string`,\n // which the traversal never visits as a string literal in the first place.\n isFormattedOrInterpolatedString(): boolean {\n return false;\n },\n isDefaultParameterValue(node: any): boolean {\n // decision: compares node identity by `.id`, not `===` — see the matching comment in\n // python.ts's isFormattedOrInterpolatedString for why\n // decision: a parameter with a default value (`x: number = 1`) still parses as\n // `required_parameter`, not `optional_parameter` (that node type is reserved for `x?:\n // number`) — so this checks for the `=` child rather than trusting the parameter's own\n // node type to signal \"has a default\"\n const parent = node?.parent;\n if (parent?.type !== 'required_parameter' && parent?.type !== 'optional_parameter') {\n return false;\n }\n return parent.children?.some((c: any) => c.type === '=')\n && parent.children?.[parent.children.length - 1]?.id === node.id;\n },\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'true' || node?.type === 'false';\n },\n // An object-literal field (`{ retries: true }`) wraps the literal in `pair` inside\n // `object`, so a labeled boolean's parent is never `arguments` directly.\n isPositionalCallArgument(node: any): boolean {\n return node?.parent?.type === 'arguments' && node.parent.parent?.type === 'call_expression';\n }\n};\n","// Shared types for energy violation detectors (cyclomatic.ts, cognitive.ts, extension.ts)\n\nexport const SEVERITY = {\n LOW: 'low' as const,\n MEDIUM: 'medium' as const,\n HIGH: 'high' as const\n};\n\nexport const VIOLATION_TYPE = {\n NESTING: 'nesting' as const,\n COMPLEXITY: 'complexity' as const,\n COGNITIVE: 'cognitive' as const,\n NAMING: 'naming' as const,\n COHERENCE: 'coherence' as const,\n MAGIC: 'magic' as const,\n PARAMETERS: 'parameters' as const,\n INVERSION: 'inversion' as const,\n PRIMITIVE_OBSESSION: 'primitive-obsession' as const,\n MATCH_OPPORTUNITY: 'match-opportunity' as const,\n LOGICAL_CONTROL_FLOW: 'logical-control-flow' as const,\n OPAQUE_BOOLEAN: 'opaque-boolean' as const\n};\n\n// decision: reports per-line weighted hotspots (nesting depth for cognitive, decision density for cyclomatic) alongside the flat complexity score — lets callers paint a progressive heatmap across the function body instead of a single flat highlight, so the worst lines stand out visually\nexport interface ComplexityHotspot {\n line: number;\n weight: number;\n}\n\nexport interface EnergyViolation {\n line: number;\n column: number;\n type: 'nesting' | 'complexity' | 'cognitive' | 'naming' | 'coherence' | 'magic' | 'parameters' | 'inversion' | 'primitive-obsession' | 'match-opportunity' | 'logical-control-flow' | 'opaque-boolean';\n severity: 'low' | 'medium' | 'high';\n message: string;\n hotspots?: ComplexityHotspot[];\n}\n","module.exports = require(\"fs\");","module.exports = require(\"fs/promises\");","module.exports = require(\"path\");","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n for (var name2 in all)\n __defProp(target, name2, { get: all[name2], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// lib/web-tree-sitter.cjs\nvar require_web_tree_sitter = __commonJS({\n \"lib/web-tree-sitter.cjs\"(exports, module) {\n \"use strict\";\n var Module = (() => {\n var _scriptName = typeof document != \"undefined\" ? document.currentScript?.src : void 0;\n return async function(moduleArg = {}) {\n var moduleRtn;\n var Module = moduleArg;\n var ENVIRONMENT_IS_WEB = typeof window == \"object\";\n var ENVIRONMENT_IS_WORKER = typeof WorkerGlobalScope != \"undefined\";\n var ENVIRONMENT_IS_NODE = typeof process == \"object\" && process.versions?.node && process.type != \"renderer\";\n Module.currentQueryProgressCallback = null;\n Module.currentProgressCallback = null;\n Module.currentLogCallback = null;\n Module.currentParseCallback = null;\n var arguments_ = [];\n var thisProgram = \"./this.program\";\n var quit_ = /* @__PURE__ */ __name((status, toThrow) => {\n throw toThrow;\n }, \"quit_\");\n if (typeof __filename != \"undefined\") {\n _scriptName = __filename;\n } else if (ENVIRONMENT_IS_WORKER) {\n _scriptName = self.location.href;\n }\n var scriptDirectory = \"\";\n function locateFile(path) {\n if (Module[\"locateFile\"]) {\n return Module[\"locateFile\"](path, scriptDirectory);\n }\n return scriptDirectory + path;\n }\n __name(locateFile, \"locateFile\");\n var readAsync, readBinary;\n if (ENVIRONMENT_IS_NODE) {\n var fs = require(\"fs\");\n scriptDirectory = __dirname + \"/\";\n readBinary = /* @__PURE__ */ __name((filename) => {\n filename = isFileURI(filename) ? new URL(filename) : filename;\n var ret = fs.readFileSync(filename);\n return ret;\n }, \"readBinary\");\n readAsync = /* @__PURE__ */ __name(async (filename, binary2 = true) => {\n filename = isFileURI(filename) ? new URL(filename) : filename;\n var ret = fs.readFileSync(filename, binary2 ? void 0 : \"utf8\");\n return ret;\n }, \"readAsync\");\n if (process.argv.length > 1) {\n thisProgram = process.argv[1].replace(/\\\\/g, \"/\");\n }\n arguments_ = process.argv.slice(2);\n quit_ = /* @__PURE__ */ __name((status, toThrow) => {\n process.exitCode = status;\n throw toThrow;\n }, \"quit_\");\n } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n try {\n scriptDirectory = new URL(\".\", _scriptName).href;\n } catch {\n }\n {\n if (ENVIRONMENT_IS_WORKER) {\n readBinary = /* @__PURE__ */ __name((url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.responseType = \"arraybuffer\";\n xhr.send(null);\n return new Uint8Array(\n /** @type{!ArrayBuffer} */\n xhr.response\n );\n }, \"readBinary\");\n }\n readAsync = /* @__PURE__ */ __name(async (url) => {\n if (isFileURI(url)) {\n return new Promise((resolve, reject) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = () => {\n if (xhr.status == 200 || xhr.status == 0 && xhr.response) {\n resolve(xhr.response);\n return;\n }\n reject(xhr.status);\n };\n xhr.onerror = reject;\n xhr.send(null);\n });\n }\n var response = await fetch(url, {\n credentials: \"same-origin\"\n });\n if (response.ok) {\n return response.arrayBuffer();\n }\n throw new Error(response.status + \" : \" + response.url);\n }, \"readAsync\");\n }\n } else {\n }\n var out = console.log.bind(console);\n var err = console.error.bind(console);\n var dynamicLibraries = [];\n var wasmBinary;\n var ABORT = false;\n var EXITSTATUS;\n var isFileURI = /* @__PURE__ */ __name((filename) => filename.startsWith(\"file://\"), \"isFileURI\");\n var readyPromiseResolve, readyPromiseReject;\n var wasmMemory;\n var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\n var HEAP64, HEAPU64;\n var HEAP_DATA_VIEW;\n var runtimeInitialized = false;\n function updateMemoryViews() {\n var b = wasmMemory.buffer;\n Module[\"HEAP8\"] = HEAP8 = new Int8Array(b);\n Module[\"HEAP16\"] = HEAP16 = new Int16Array(b);\n Module[\"HEAPU8\"] = HEAPU8 = new Uint8Array(b);\n Module[\"HEAPU16\"] = HEAPU16 = new Uint16Array(b);\n Module[\"HEAP32\"] = HEAP32 = new Int32Array(b);\n Module[\"HEAPU32\"] = HEAPU32 = new Uint32Array(b);\n Module[\"HEAPF32\"] = HEAPF32 = new Float32Array(b);\n Module[\"HEAPF64\"] = HEAPF64 = new Float64Array(b);\n Module[\"HEAP64\"] = HEAP64 = new BigInt64Array(b);\n Module[\"HEAPU64\"] = HEAPU64 = new BigUint64Array(b);\n Module[\"HEAP_DATA_VIEW\"] = HEAP_DATA_VIEW = new DataView(b);\n LE_HEAP_UPDATE();\n }\n __name(updateMemoryViews, \"updateMemoryViews\");\n function initMemory() {\n if (Module[\"wasmMemory\"]) {\n wasmMemory = Module[\"wasmMemory\"];\n } else {\n var INITIAL_MEMORY = Module[\"INITIAL_MEMORY\"] || 33554432;\n wasmMemory = new WebAssembly.Memory({\n \"initial\": INITIAL_MEMORY / 65536,\n // In theory we should not need to emit the maximum if we want \"unlimited\"\n // or 4GB of memory, but VMs error on that atm, see\n // https://github.com/emscripten-core/emscripten/issues/14130\n // And in the pthreads case we definitely need to emit a maximum. So\n // always emit one.\n \"maximum\": 32768\n });\n }\n updateMemoryViews();\n }\n __name(initMemory, \"initMemory\");\n var __RELOC_FUNCS__ = [];\n function preRun() {\n if (Module[\"preRun\"]) {\n if (typeof Module[\"preRun\"] == \"function\") Module[\"preRun\"] = [Module[\"preRun\"]];\n while (Module[\"preRun\"].length) {\n addOnPreRun(Module[\"preRun\"].shift());\n }\n }\n callRuntimeCallbacks(onPreRuns);\n }\n __name(preRun, \"preRun\");\n function initRuntime() {\n runtimeInitialized = true;\n callRuntimeCallbacks(__RELOC_FUNCS__);\n wasmExports[\"__wasm_call_ctors\"]();\n callRuntimeCallbacks(onPostCtors);\n }\n __name(initRuntime, \"initRuntime\");\n function preMain() {\n }\n __name(preMain, \"preMain\");\n function postRun() {\n if (Module[\"postRun\"]) {\n if (typeof Module[\"postRun\"] == \"function\") Module[\"postRun\"] = [Module[\"postRun\"]];\n while (Module[\"postRun\"].length) {\n addOnPostRun(Module[\"postRun\"].shift());\n }\n }\n callRuntimeCallbacks(onPostRuns);\n }\n __name(postRun, \"postRun\");\n function abort(what) {\n Module[\"onAbort\"]?.(what);\n what = \"Aborted(\" + what + \")\";\n err(what);\n ABORT = true;\n what += \". Build with -sASSERTIONS for more info.\";\n var e = new WebAssembly.RuntimeError(what);\n readyPromiseReject?.(e);\n throw e;\n }\n __name(abort, \"abort\");\n var wasmBinaryFile;\n function findWasmBinary() {\n return locateFile(\"web-tree-sitter.wasm\");\n }\n __name(findWasmBinary, \"findWasmBinary\");\n function getBinarySync(file) {\n if (file == wasmBinaryFile && wasmBinary) {\n return new Uint8Array(wasmBinary);\n }\n if (readBinary) {\n return readBinary(file);\n }\n throw \"both async and sync fetching of the wasm failed\";\n }\n __name(getBinarySync, \"getBinarySync\");\n async function getWasmBinary(binaryFile) {\n if (!wasmBinary) {\n try {\n var response = await readAsync(binaryFile);\n return new Uint8Array(response);\n } catch {\n }\n }\n return getBinarySync(binaryFile);\n }\n __name(getWasmBinary, \"getWasmBinary\");\n async function instantiateArrayBuffer(binaryFile, imports) {\n try {\n var binary2 = await getWasmBinary(binaryFile);\n var instance2 = await WebAssembly.instantiate(binary2, imports);\n return instance2;\n } catch (reason) {\n err(`failed to asynchronously prepare wasm: ${reason}`);\n abort(reason);\n }\n }\n __name(instantiateArrayBuffer, \"instantiateArrayBuffer\");\n async function instantiateAsync(binary2, binaryFile, imports) {\n if (!binary2 && !isFileURI(binaryFile) && !ENVIRONMENT_IS_NODE) {\n try {\n var response = fetch(binaryFile, {\n credentials: \"same-origin\"\n });\n var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);\n return instantiationResult;\n } catch (reason) {\n err(`wasm streaming compile failed: ${reason}`);\n err(\"falling back to ArrayBuffer instantiation\");\n }\n }\n return instantiateArrayBuffer(binaryFile, imports);\n }\n __name(instantiateAsync, \"instantiateAsync\");\n function getWasmImports() {\n return {\n \"env\": wasmImports,\n \"wasi_snapshot_preview1\": wasmImports,\n \"GOT.mem\": new Proxy(wasmImports, GOTHandler),\n \"GOT.func\": new Proxy(wasmImports, GOTHandler)\n };\n }\n __name(getWasmImports, \"getWasmImports\");\n async function createWasm() {\n function receiveInstance(instance2, module2) {\n wasmExports = instance2.exports;\n wasmExports = relocateExports(wasmExports, 1024);\n var metadata2 = getDylinkMetadata(module2);\n if (metadata2.neededDynlibs) {\n dynamicLibraries = metadata2.neededDynlibs.concat(dynamicLibraries);\n }\n mergeLibSymbols(wasmExports, \"main\");\n LDSO.init();\n loadDylibs();\n __RELOC_FUNCS__.push(wasmExports[\"__wasm_apply_data_relocs\"]);\n assignWasmExports(wasmExports);\n return wasmExports;\n }\n __name(receiveInstance, \"receiveInstance\");\n function receiveInstantiationResult(result2) {\n return receiveInstance(result2[\"instance\"], result2[\"module\"]);\n }\n __name(receiveInstantiationResult, \"receiveInstantiationResult\");\n var info2 = getWasmImports();\n if (Module[\"instantiateWasm\"]) {\n return new Promise((resolve, reject) => {\n Module[\"instantiateWasm\"](info2, (mod, inst) => {\n resolve(receiveInstance(mod, inst));\n });\n });\n }\n wasmBinaryFile ??= findWasmBinary();\n var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info2);\n var exports2 = receiveInstantiationResult(result);\n return exports2;\n }\n __name(createWasm, \"createWasm\");\n class ExitStatus {\n static {\n __name(this, \"ExitStatus\");\n }\n name = \"ExitStatus\";\n constructor(status) {\n this.message = `Program terminated with exit(${status})`;\n this.status = status;\n }\n }\n var GOT = {};\n var currentModuleWeakSymbols = /* @__PURE__ */ new Set([]);\n var GOTHandler = {\n get(obj, symName) {\n var rtn = GOT[symName];\n if (!rtn) {\n rtn = GOT[symName] = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": true\n });\n }\n if (!currentModuleWeakSymbols.has(symName)) {\n rtn.required = true;\n }\n return rtn;\n }\n };\n var LE_ATOMICS_NATIVE_BYTE_ORDER = [];\n var LE_HEAP_LOAD_F32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getFloat32(byteOffset, true), \"LE_HEAP_LOAD_F32\");\n var LE_HEAP_LOAD_F64 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getFloat64(byteOffset, true), \"LE_HEAP_LOAD_F64\");\n var LE_HEAP_LOAD_I16 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getInt16(byteOffset, true), \"LE_HEAP_LOAD_I16\");\n var LE_HEAP_LOAD_I32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getInt32(byteOffset, true), \"LE_HEAP_LOAD_I32\");\n var LE_HEAP_LOAD_I64 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getBigInt64(byteOffset, true), \"LE_HEAP_LOAD_I64\");\n var LE_HEAP_LOAD_U32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getUint32(byteOffset, true), \"LE_HEAP_LOAD_U32\");\n var LE_HEAP_STORE_F32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setFloat32(byteOffset, value, true), \"LE_HEAP_STORE_F32\");\n var LE_HEAP_STORE_F64 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setFloat64(byteOffset, value, true), \"LE_HEAP_STORE_F64\");\n var LE_HEAP_STORE_I16 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setInt16(byteOffset, value, true), \"LE_HEAP_STORE_I16\");\n var LE_HEAP_STORE_I32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setInt32(byteOffset, value, true), \"LE_HEAP_STORE_I32\");\n var LE_HEAP_STORE_I64 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setBigInt64(byteOffset, value, true), \"LE_HEAP_STORE_I64\");\n var LE_HEAP_STORE_U32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setUint32(byteOffset, value, true), \"LE_HEAP_STORE_U32\");\n var callRuntimeCallbacks = /* @__PURE__ */ __name((callbacks) => {\n while (callbacks.length > 0) {\n callbacks.shift()(Module);\n }\n }, \"callRuntimeCallbacks\");\n var onPostRuns = [];\n var addOnPostRun = /* @__PURE__ */ __name((cb) => onPostRuns.push(cb), \"addOnPostRun\");\n var onPreRuns = [];\n var addOnPreRun = /* @__PURE__ */ __name((cb) => onPreRuns.push(cb), \"addOnPreRun\");\n var UTF8Decoder = typeof TextDecoder != \"undefined\" ? new TextDecoder() : void 0;\n var findStringEnd = /* @__PURE__ */ __name((heapOrArray, idx, maxBytesToRead, ignoreNul) => {\n var maxIdx = idx + maxBytesToRead;\n if (ignoreNul) return maxIdx;\n while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;\n return idx;\n }, \"findStringEnd\");\n var UTF8ArrayToString = /* @__PURE__ */ __name((heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {\n var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul);\n if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n }\n var str = \"\";\n while (idx < endPtr) {\n var u0 = heapOrArray[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n var u1 = heapOrArray[idx++] & 63;\n if ((u0 & 224) == 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n var u2 = heapOrArray[idx++] & 63;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n return str;\n }, \"UTF8ArrayToString\");\n var getDylinkMetadata = /* @__PURE__ */ __name((binary2) => {\n var offset = 0;\n var end = 0;\n function getU8() {\n return binary2[offset++];\n }\n __name(getU8, \"getU8\");\n function getLEB() {\n var ret = 0;\n var mul = 1;\n while (1) {\n var byte = binary2[offset++];\n ret += (byte & 127) * mul;\n mul *= 128;\n if (!(byte & 128)) break;\n }\n return ret;\n }\n __name(getLEB, \"getLEB\");\n function getString() {\n var len = getLEB();\n offset += len;\n return UTF8ArrayToString(binary2, offset - len, len);\n }\n __name(getString, \"getString\");\n function getStringList() {\n var count2 = getLEB();\n var rtn = [];\n while (count2--) rtn.push(getString());\n return rtn;\n }\n __name(getStringList, \"getStringList\");\n function failIf(condition, message) {\n if (condition) throw new Error(message);\n }\n __name(failIf, \"failIf\");\n if (binary2 instanceof WebAssembly.Module) {\n var dylinkSection = WebAssembly.Module.customSections(binary2, \"dylink.0\");\n failIf(dylinkSection.length === 0, \"need dylink section\");\n binary2 = new Uint8Array(dylinkSection[0]);\n end = binary2.length;\n } else {\n var int32View = new Uint32Array(new Uint8Array(binary2.subarray(0, 24)).buffer);\n var magicNumberFound = int32View[0] == 1836278016 || int32View[0] == 6386541;\n failIf(!magicNumberFound, \"need to see wasm magic number\");\n failIf(binary2[8] !== 0, \"need the dylink section to be first\");\n offset = 9;\n var section_size = getLEB();\n end = offset + section_size;\n var name2 = getString();\n failIf(name2 !== \"dylink.0\");\n }\n var customSection = {\n neededDynlibs: [],\n tlsExports: /* @__PURE__ */ new Set(),\n weakImports: /* @__PURE__ */ new Set(),\n runtimePaths: []\n };\n var WASM_DYLINK_MEM_INFO = 1;\n var WASM_DYLINK_NEEDED = 2;\n var WASM_DYLINK_EXPORT_INFO = 3;\n var WASM_DYLINK_IMPORT_INFO = 4;\n var WASM_DYLINK_RUNTIME_PATH = 5;\n var WASM_SYMBOL_TLS = 256;\n var WASM_SYMBOL_BINDING_MASK = 3;\n var WASM_SYMBOL_BINDING_WEAK = 1;\n while (offset < end) {\n var subsectionType = getU8();\n var subsectionSize = getLEB();\n if (subsectionType === WASM_DYLINK_MEM_INFO) {\n customSection.memorySize = getLEB();\n customSection.memoryAlign = getLEB();\n customSection.tableSize = getLEB();\n customSection.tableAlign = getLEB();\n } else if (subsectionType === WASM_DYLINK_NEEDED) {\n customSection.neededDynlibs = getStringList();\n } else if (subsectionType === WASM_DYLINK_EXPORT_INFO) {\n var count = getLEB();\n while (count--) {\n var symname = getString();\n var flags2 = getLEB();\n if (flags2 & WASM_SYMBOL_TLS) {\n customSection.tlsExports.add(symname);\n }\n }\n } else if (subsectionType === WASM_DYLINK_IMPORT_INFO) {\n var count = getLEB();\n while (count--) {\n var modname = getString();\n var symname = getString();\n var flags2 = getLEB();\n if ((flags2 & WASM_SYMBOL_BINDING_MASK) == WASM_SYMBOL_BINDING_WEAK) {\n customSection.weakImports.add(symname);\n }\n }\n } else if (subsectionType === WASM_DYLINK_RUNTIME_PATH) {\n customSection.runtimePaths = getStringList();\n } else {\n offset += subsectionSize;\n }\n }\n return customSection;\n }, \"getDylinkMetadata\");\n function getValue(ptr, type = \"i8\") {\n if (type.endsWith(\"*\")) type = \"*\";\n switch (type) {\n case \"i1\":\n return HEAP8[ptr];\n case \"i8\":\n return HEAP8[ptr];\n case \"i16\":\n return LE_HEAP_LOAD_I16((ptr >> 1) * 2);\n case \"i32\":\n return LE_HEAP_LOAD_I32((ptr >> 2) * 4);\n case \"i64\":\n return LE_HEAP_LOAD_I64((ptr >> 3) * 8);\n case \"float\":\n return LE_HEAP_LOAD_F32((ptr >> 2) * 4);\n case \"double\":\n return LE_HEAP_LOAD_F64((ptr >> 3) * 8);\n case \"*\":\n return LE_HEAP_LOAD_U32((ptr >> 2) * 4);\n default:\n abort(`invalid type for getValue: ${type}`);\n }\n }\n __name(getValue, \"getValue\");\n var newDSO = /* @__PURE__ */ __name((name2, handle2, syms) => {\n var dso = {\n refcount: Infinity,\n name: name2,\n exports: syms,\n global: true\n };\n LDSO.loadedLibsByName[name2] = dso;\n if (handle2 != void 0) {\n LDSO.loadedLibsByHandle[handle2] = dso;\n }\n return dso;\n }, \"newDSO\");\n var LDSO = {\n loadedLibsByName: {},\n loadedLibsByHandle: {},\n init() {\n newDSO(\"__main__\", 0, wasmImports);\n }\n };\n var ___heap_base = 78240;\n var alignMemory = /* @__PURE__ */ __name((size, alignment) => Math.ceil(size / alignment) * alignment, \"alignMemory\");\n var getMemory = /* @__PURE__ */ __name((size) => {\n if (runtimeInitialized) {\n return _calloc(size, 1);\n }\n var ret = ___heap_base;\n var end = ret + alignMemory(size, 16);\n ___heap_base = end;\n GOT[\"__heap_base\"].value = end;\n return ret;\n }, \"getMemory\");\n var isInternalSym = /* @__PURE__ */ __name((symName) => [\"__cpp_exception\", \"__c_longjmp\", \"__wasm_apply_data_relocs\", \"__dso_handle\", \"__tls_size\", \"__tls_align\", \"__set_stack_limits\", \"_emscripten_tls_init\", \"__wasm_init_tls\", \"__wasm_call_ctors\", \"__start_em_asm\", \"__stop_em_asm\", \"__start_em_js\", \"__stop_em_js\"].includes(symName) || symName.startsWith(\"__em_js__\"), \"isInternalSym\");\n var uleb128EncodeWithLen = /* @__PURE__ */ __name((arr) => {\n const n = arr.length;\n return [n % 128 | 128, n >> 7, ...arr];\n }, \"uleb128EncodeWithLen\");\n var wasmTypeCodes = {\n \"i\": 127,\n // i32\n \"p\": 127,\n // i32\n \"j\": 126,\n // i64\n \"f\": 125,\n // f32\n \"d\": 124,\n // f64\n \"e\": 111\n };\n var generateTypePack = /* @__PURE__ */ __name((types) => uleb128EncodeWithLen(Array.from(types, (type) => {\n var code = wasmTypeCodes[type];\n return code;\n })), \"generateTypePack\");\n var convertJsFunctionToWasm = /* @__PURE__ */ __name((func2, sig) => {\n var bytes = Uint8Array.of(\n 0,\n 97,\n 115,\n 109,\n // magic (\"\\0asm\")\n 1,\n 0,\n 0,\n 0,\n // version: 1\n 1,\n ...uleb128EncodeWithLen([\n 1,\n // count: 1\n 96,\n // param types\n ...generateTypePack(sig.slice(1)),\n // return types (for now only supporting [] if `void` and single [T] otherwise)\n ...generateTypePack(sig[0] === \"v\" ? \"\" : sig[0])\n ]),\n // The rest of the module is static\n 2,\n 7,\n // import section\n // (import \"e\" \"f\" (func 0 (type 0)))\n 1,\n 1,\n 101,\n 1,\n 102,\n 0,\n 0,\n 7,\n 5,\n // export section\n // (export \"f\" (func 0 (type 0)))\n 1,\n 1,\n 102,\n 0,\n 0\n );\n var module2 = new WebAssembly.Module(bytes);\n var instance2 = new WebAssembly.Instance(module2, {\n \"e\": {\n \"f\": func2\n }\n });\n var wrappedFunc = instance2.exports[\"f\"];\n return wrappedFunc;\n }, \"convertJsFunctionToWasm\");\n var wasmTableMirror = [];\n var wasmTable = new WebAssembly.Table({\n \"initial\": 31,\n \"element\": \"anyfunc\"\n });\n var getWasmTableEntry = /* @__PURE__ */ __name((funcPtr) => {\n var func2 = wasmTableMirror[funcPtr];\n if (!func2) {\n wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr);\n }\n return func2;\n }, \"getWasmTableEntry\");\n var updateTableMap = /* @__PURE__ */ __name((offset, count) => {\n if (functionsInTableMap) {\n for (var i2 = offset; i2 < offset + count; i2++) {\n var item = getWasmTableEntry(i2);\n if (item) {\n functionsInTableMap.set(item, i2);\n }\n }\n }\n }, \"updateTableMap\");\n var functionsInTableMap;\n var getFunctionAddress = /* @__PURE__ */ __name((func2) => {\n if (!functionsInTableMap) {\n functionsInTableMap = /* @__PURE__ */ new WeakMap();\n updateTableMap(0, wasmTable.length);\n }\n return functionsInTableMap.get(func2) || 0;\n }, \"getFunctionAddress\");\n var freeTableIndexes = [];\n var getEmptyTableSlot = /* @__PURE__ */ __name(() => {\n if (freeTableIndexes.length) {\n return freeTableIndexes.pop();\n }\n return wasmTable[\"grow\"](1);\n }, \"getEmptyTableSlot\");\n var setWasmTableEntry = /* @__PURE__ */ __name((idx, func2) => {\n wasmTable.set(idx, func2);\n wasmTableMirror[idx] = wasmTable.get(idx);\n }, \"setWasmTableEntry\");\n var addFunction = /* @__PURE__ */ __name((func2, sig) => {\n var rtn = getFunctionAddress(func2);\n if (rtn) {\n return rtn;\n }\n var ret = getEmptyTableSlot();\n try {\n setWasmTableEntry(ret, func2);\n } catch (err2) {\n if (!(err2 instanceof TypeError)) {\n throw err2;\n }\n var wrapped = convertJsFunctionToWasm(func2, sig);\n setWasmTableEntry(ret, wrapped);\n }\n functionsInTableMap.set(func2, ret);\n return ret;\n }, \"addFunction\");\n var updateGOT = /* @__PURE__ */ __name((exports2, replace) => {\n for (var symName in exports2) {\n if (isInternalSym(symName)) {\n continue;\n }\n var value = exports2[symName];\n GOT[symName] ||= new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": true\n });\n if (replace || GOT[symName].value == 0) {\n if (typeof value == \"function\") {\n GOT[symName].value = addFunction(value);\n } else if (typeof value == \"number\") {\n GOT[symName].value = value;\n } else {\n err(`unhandled export type for '${symName}': ${typeof value}`);\n }\n }\n }\n }, \"updateGOT\");\n var relocateExports = /* @__PURE__ */ __name((exports2, memoryBase2, replace) => {\n var relocated = {};\n for (var e in exports2) {\n var value = exports2[e];\n if (typeof value == \"object\") {\n value = value.value;\n }\n if (typeof value == \"number\") {\n value += memoryBase2;\n }\n relocated[e] = value;\n }\n updateGOT(relocated, replace);\n return relocated;\n }, \"relocateExports\");\n var isSymbolDefined = /* @__PURE__ */ __name((symName) => {\n var existing = wasmImports[symName];\n if (!existing || existing.stub) {\n return false;\n }\n return true;\n }, \"isSymbolDefined\");\n var dynCall = /* @__PURE__ */ __name((sig, ptr, args2 = [], promising = false) => {\n var func2 = getWasmTableEntry(ptr);\n var rtn = func2(...args2);\n function convert(rtn2) {\n return rtn2;\n }\n __name(convert, \"convert\");\n return convert(rtn);\n }, \"dynCall\");\n var stackSave = /* @__PURE__ */ __name(() => _emscripten_stack_get_current(), \"stackSave\");\n var stackRestore = /* @__PURE__ */ __name((val) => __emscripten_stack_restore(val), \"stackRestore\");\n var createInvokeFunction = /* @__PURE__ */ __name((sig) => (ptr, ...args2) => {\n var sp = stackSave();\n try {\n return dynCall(sig, ptr, args2);\n } catch (e) {\n stackRestore(sp);\n if (e !== e + 0) throw e;\n _setThrew(1, 0);\n if (sig[0] == \"j\") return 0n;\n }\n }, \"createInvokeFunction\");\n var resolveGlobalSymbol = /* @__PURE__ */ __name((symName, direct = false) => {\n var sym;\n if (isSymbolDefined(symName)) {\n sym = wasmImports[symName];\n } else if (symName.startsWith(\"invoke_\")) {\n sym = wasmImports[symName] = createInvokeFunction(symName.split(\"_\")[1]);\n }\n return {\n sym,\n name: symName\n };\n }, \"resolveGlobalSymbol\");\n var onPostCtors = [];\n var addOnPostCtor = /* @__PURE__ */ __name((cb) => onPostCtors.push(cb), \"addOnPostCtor\");\n var UTF8ToString = /* @__PURE__ */ __name((ptr, maxBytesToRead, ignoreNul) => ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : \"\", \"UTF8ToString\");\n var loadWebAssemblyModule = /* @__PURE__ */ __name((binary, flags, libName, localScope, handle) => {\n var metadata = getDylinkMetadata(binary);\n function loadModule() {\n var memAlign = Math.pow(2, metadata.memoryAlign);\n var memoryBase = metadata.memorySize ? alignMemory(getMemory(metadata.memorySize + memAlign), memAlign) : 0;\n var tableBase = metadata.tableSize ? wasmTable.length : 0;\n if (handle) {\n HEAP8[handle + 8] = 1;\n LE_HEAP_STORE_U32((handle + 12 >> 2) * 4, memoryBase);\n LE_HEAP_STORE_I32((handle + 16 >> 2) * 4, metadata.memorySize);\n LE_HEAP_STORE_U32((handle + 20 >> 2) * 4, tableBase);\n LE_HEAP_STORE_I32((handle + 24 >> 2) * 4, metadata.tableSize);\n }\n if (metadata.tableSize) {\n wasmTable.grow(metadata.tableSize);\n }\n var moduleExports;\n function resolveSymbol(sym) {\n var resolved = resolveGlobalSymbol(sym).sym;\n if (!resolved && localScope) {\n resolved = localScope[sym];\n }\n if (!resolved) {\n resolved = moduleExports[sym];\n }\n return resolved;\n }\n __name(resolveSymbol, \"resolveSymbol\");\n var proxyHandler = {\n get(stubs, prop) {\n switch (prop) {\n case \"__memory_base\":\n return memoryBase;\n case \"__table_base\":\n return tableBase;\n }\n if (prop in wasmImports && !wasmImports[prop].stub) {\n var res = wasmImports[prop];\n return res;\n }\n if (!(prop in stubs)) {\n var resolved;\n stubs[prop] = (...args2) => {\n resolved ||= resolveSymbol(prop);\n return resolved(...args2);\n };\n }\n return stubs[prop];\n }\n };\n var proxy = new Proxy({}, proxyHandler);\n currentModuleWeakSymbols = metadata.weakImports;\n var info = {\n \"GOT.mem\": new Proxy({}, GOTHandler),\n \"GOT.func\": new Proxy({}, GOTHandler),\n \"env\": proxy,\n \"wasi_snapshot_preview1\": proxy\n };\n function postInstantiation(module, instance) {\n updateTableMap(tableBase, metadata.tableSize);\n moduleExports = relocateExports(instance.exports, memoryBase);\n if (!flags.allowUndefined) {\n reportUndefinedSymbols();\n }\n function addEmAsm(addr, body) {\n var args = [];\n var arity = 0;\n for (; arity < 16; arity++) {\n if (body.indexOf(\"$\" + arity) != -1) {\n args.push(\"$\" + arity);\n } else {\n break;\n }\n }\n args = args.join(\",\");\n var func = `(${args}) => { ${body} };`;\n ASM_CONSTS[start] = eval(func);\n }\n __name(addEmAsm, \"addEmAsm\");\n if (\"__start_em_asm\" in moduleExports) {\n var start = moduleExports[\"__start_em_asm\"];\n var stop = moduleExports[\"__stop_em_asm\"];\n while (start < stop) {\n var jsString = UTF8ToString(start);\n addEmAsm(start, jsString);\n start = HEAPU8.indexOf(0, start) + 1;\n }\n }\n function addEmJs(name, cSig, body) {\n var jsArgs = [];\n cSig = cSig.slice(1, -1);\n if (cSig != \"void\") {\n cSig = cSig.split(\",\");\n for (var i in cSig) {\n var jsArg = cSig[i].split(\" \").pop();\n jsArgs.push(jsArg.replace(\"*\", \"\"));\n }\n }\n var func = `(${jsArgs}) => ${body};`;\n moduleExports[name] = eval(func);\n }\n __name(addEmJs, \"addEmJs\");\n for (var name in moduleExports) {\n if (name.startsWith(\"__em_js__\")) {\n var start = moduleExports[name];\n var jsString = UTF8ToString(start);\n var parts = jsString.split(\"<::>\");\n addEmJs(name.replace(\"__em_js__\", \"\"), parts[0], parts[1]);\n delete moduleExports[name];\n }\n }\n var applyRelocs = moduleExports[\"__wasm_apply_data_relocs\"];\n if (applyRelocs) {\n if (runtimeInitialized) {\n applyRelocs();\n } else {\n __RELOC_FUNCS__.push(applyRelocs);\n }\n }\n var init = moduleExports[\"__wasm_call_ctors\"];\n if (init) {\n if (runtimeInitialized) {\n init();\n } else {\n addOnPostCtor(init);\n }\n }\n return moduleExports;\n }\n __name(postInstantiation, \"postInstantiation\");\n if (flags.loadAsync) {\n return (async () => {\n var instance2;\n if (binary instanceof WebAssembly.Module) {\n instance2 = new WebAssembly.Instance(binary, info);\n } else {\n ({ module: binary, instance: instance2 } = await WebAssembly.instantiate(binary, info));\n }\n return postInstantiation(binary, instance2);\n })();\n }\n var module = binary instanceof WebAssembly.Module ? binary : new WebAssembly.Module(binary);\n var instance = new WebAssembly.Instance(module, info);\n return postInstantiation(module, instance);\n }\n __name(loadModule, \"loadModule\");\n flags = {\n ...flags,\n rpath: {\n parentLibPath: libName,\n paths: metadata.runtimePaths\n }\n };\n if (flags.loadAsync) {\n return metadata.neededDynlibs.reduce((chain, dynNeeded) => chain.then(() => loadDynamicLibrary(dynNeeded, flags, localScope)), Promise.resolve()).then(loadModule);\n }\n metadata.neededDynlibs.forEach((needed) => loadDynamicLibrary(needed, flags, localScope));\n return loadModule();\n }, \"loadWebAssemblyModule\");\n var mergeLibSymbols = /* @__PURE__ */ __name((exports2, libName2) => {\n for (var [sym, exp] of Object.entries(exports2)) {\n const setImport = /* @__PURE__ */ __name((target) => {\n if (!isSymbolDefined(target)) {\n wasmImports[target] = exp;\n }\n }, \"setImport\");\n setImport(sym);\n const main_alias = \"__main_argc_argv\";\n if (sym == \"main\") {\n setImport(main_alias);\n }\n if (sym == main_alias) {\n setImport(\"main\");\n }\n }\n }, \"mergeLibSymbols\");\n var asyncLoad = /* @__PURE__ */ __name(async (url) => {\n var arrayBuffer = await readAsync(url);\n return new Uint8Array(arrayBuffer);\n }, \"asyncLoad\");\n function loadDynamicLibrary(libName2, flags2 = {\n global: true,\n nodelete: true\n }, localScope2, handle2) {\n var dso = LDSO.loadedLibsByName[libName2];\n if (dso) {\n if (!flags2.global) {\n if (localScope2) {\n Object.assign(localScope2, dso.exports);\n }\n } else if (!dso.global) {\n dso.global = true;\n mergeLibSymbols(dso.exports, libName2);\n }\n if (flags2.nodelete && dso.refcount !== Infinity) {\n dso.refcount = Infinity;\n }\n dso.refcount++;\n if (handle2) {\n LDSO.loadedLibsByHandle[handle2] = dso;\n }\n return flags2.loadAsync ? Promise.resolve(true) : true;\n }\n dso = newDSO(libName2, handle2, \"loading\");\n dso.refcount = flags2.nodelete ? Infinity : 1;\n dso.global = flags2.global;\n function loadLibData() {\n if (handle2) {\n var data = LE_HEAP_LOAD_U32((handle2 + 28 >> 2) * 4);\n var dataSize = LE_HEAP_LOAD_U32((handle2 + 32 >> 2) * 4);\n if (data && dataSize) {\n var libData = HEAP8.slice(data, data + dataSize);\n return flags2.loadAsync ? Promise.resolve(libData) : libData;\n }\n }\n var libFile = locateFile(libName2);\n if (flags2.loadAsync) {\n return asyncLoad(libFile);\n }\n if (!readBinary) {\n throw new Error(`${libFile}: file not found, and synchronous loading of external files is not available`);\n }\n return readBinary(libFile);\n }\n __name(loadLibData, \"loadLibData\");\n function getExports() {\n if (flags2.loadAsync) {\n return loadLibData().then((libData) => loadWebAssemblyModule(libData, flags2, libName2, localScope2, handle2));\n }\n return loadWebAssemblyModule(loadLibData(), flags2, libName2, localScope2, handle2);\n }\n __name(getExports, \"getExports\");\n function moduleLoaded(exports2) {\n if (dso.global) {\n mergeLibSymbols(exports2, libName2);\n } else if (localScope2) {\n Object.assign(localScope2, exports2);\n }\n dso.exports = exports2;\n }\n __name(moduleLoaded, \"moduleLoaded\");\n if (flags2.loadAsync) {\n return getExports().then((exports2) => {\n moduleLoaded(exports2);\n return true;\n });\n }\n moduleLoaded(getExports());\n return true;\n }\n __name(loadDynamicLibrary, \"loadDynamicLibrary\");\n var reportUndefinedSymbols = /* @__PURE__ */ __name(() => {\n for (var [symName, entry] of Object.entries(GOT)) {\n if (entry.value == 0) {\n var value = resolveGlobalSymbol(symName, true).sym;\n if (!value && !entry.required) {\n continue;\n }\n if (typeof value == \"function\") {\n entry.value = addFunction(value, value.sig);\n } else if (typeof value == \"number\") {\n entry.value = value;\n } else {\n throw new Error(`bad export type for '${symName}': ${typeof value}`);\n }\n }\n }\n }, \"reportUndefinedSymbols\");\n var runDependencies = 0;\n var dependenciesFulfilled = null;\n var removeRunDependency = /* @__PURE__ */ __name((id) => {\n runDependencies--;\n Module[\"monitorRunDependencies\"]?.(runDependencies);\n if (runDependencies == 0) {\n if (dependenciesFulfilled) {\n var callback = dependenciesFulfilled;\n dependenciesFulfilled = null;\n callback();\n }\n }\n }, \"removeRunDependency\");\n var addRunDependency = /* @__PURE__ */ __name((id) => {\n runDependencies++;\n Module[\"monitorRunDependencies\"]?.(runDependencies);\n }, \"addRunDependency\");\n var loadDylibs = /* @__PURE__ */ __name(async () => {\n if (!dynamicLibraries.length) {\n reportUndefinedSymbols();\n return;\n }\n addRunDependency(\"loadDylibs\");\n for (var lib of dynamicLibraries) {\n await loadDynamicLibrary(lib, {\n loadAsync: true,\n global: true,\n nodelete: true,\n allowUndefined: true\n });\n }\n reportUndefinedSymbols();\n removeRunDependency(\"loadDylibs\");\n }, \"loadDylibs\");\n var noExitRuntime = true;\n function setValue(ptr, value, type = \"i8\") {\n if (type.endsWith(\"*\")) type = \"*\";\n switch (type) {\n case \"i1\":\n HEAP8[ptr] = value;\n break;\n case \"i8\":\n HEAP8[ptr] = value;\n break;\n case \"i16\":\n LE_HEAP_STORE_I16((ptr >> 1) * 2, value);\n break;\n case \"i32\":\n LE_HEAP_STORE_I32((ptr >> 2) * 4, value);\n break;\n case \"i64\":\n LE_HEAP_STORE_I64((ptr >> 3) * 8, BigInt(value));\n break;\n case \"float\":\n LE_HEAP_STORE_F32((ptr >> 2) * 4, value);\n break;\n case \"double\":\n LE_HEAP_STORE_F64((ptr >> 3) * 8, value);\n break;\n case \"*\":\n LE_HEAP_STORE_U32((ptr >> 2) * 4, value);\n break;\n default:\n abort(`invalid type for setValue: ${type}`);\n }\n }\n __name(setValue, \"setValue\");\n var ___memory_base = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": false\n }, 1024);\n var ___stack_high = 78240;\n var ___stack_low = 12704;\n var ___stack_pointer = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": true\n }, 78240);\n var ___table_base = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": false\n }, 1);\n var __abort_js = /* @__PURE__ */ __name(() => abort(\"\"), \"__abort_js\");\n __abort_js.sig = \"v\";\n var getHeapMax = /* @__PURE__ */ __name(() => (\n // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate\n // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side\n // for any code that deals with heap sizes, which would require special\n // casing all heap size related code to treat 0 specially.\n 2147483648\n ), \"getHeapMax\");\n var growMemory = /* @__PURE__ */ __name((size) => {\n var oldHeapSize = wasmMemory.buffer.byteLength;\n var pages = (size - oldHeapSize + 65535) / 65536 | 0;\n try {\n wasmMemory.grow(pages);\n updateMemoryViews();\n return 1;\n } catch (e) {\n }\n }, \"growMemory\");\n var _emscripten_resize_heap = /* @__PURE__ */ __name((requestedSize) => {\n var oldSize = HEAPU8.length;\n requestedSize >>>= 0;\n var maxHeapSize = getHeapMax();\n if (requestedSize > maxHeapSize) {\n return false;\n }\n for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536));\n var replacement = growMemory(newSize);\n if (replacement) {\n return true;\n }\n }\n return false;\n }, \"_emscripten_resize_heap\");\n _emscripten_resize_heap.sig = \"ip\";\n var _fd_close = /* @__PURE__ */ __name((fd) => 52, \"_fd_close\");\n _fd_close.sig = \"ii\";\n var INT53_MAX = 9007199254740992;\n var INT53_MIN = -9007199254740992;\n var bigintToI53Checked = /* @__PURE__ */ __name((num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num), \"bigintToI53Checked\");\n function _fd_seek(fd, offset, whence, newOffset) {\n offset = bigintToI53Checked(offset);\n return 70;\n }\n __name(_fd_seek, \"_fd_seek\");\n _fd_seek.sig = \"iijip\";\n var printCharBuffers = [null, [], []];\n var printChar = /* @__PURE__ */ __name((stream, curr) => {\n var buffer = printCharBuffers[stream];\n if (curr === 0 || curr === 10) {\n (stream === 1 ? out : err)(UTF8ArrayToString(buffer));\n buffer.length = 0;\n } else {\n buffer.push(curr);\n }\n }, \"printChar\");\n var _fd_write = /* @__PURE__ */ __name((fd, iov, iovcnt, pnum) => {\n var num = 0;\n for (var i2 = 0; i2 < iovcnt; i2++) {\n var ptr = LE_HEAP_LOAD_U32((iov >> 2) * 4);\n var len = LE_HEAP_LOAD_U32((iov + 4 >> 2) * 4);\n iov += 8;\n for (var j = 0; j < len; j++) {\n printChar(fd, HEAPU8[ptr + j]);\n }\n num += len;\n }\n LE_HEAP_STORE_U32((pnum >> 2) * 4, num);\n return 0;\n }, \"_fd_write\");\n _fd_write.sig = \"iippp\";\n function _tree_sitter_log_callback(isLexMessage, messageAddress) {\n if (Module.currentLogCallback) {\n const message = UTF8ToString(messageAddress);\n Module.currentLogCallback(message, isLexMessage !== 0);\n }\n }\n __name(_tree_sitter_log_callback, \"_tree_sitter_log_callback\");\n function _tree_sitter_parse_callback(inputBufferAddress, index, row, column, lengthAddress) {\n const INPUT_BUFFER_SIZE = 10 * 1024;\n const string = Module.currentParseCallback(index, {\n row,\n column\n });\n if (typeof string === \"string\") {\n setValue(lengthAddress, string.length, \"i32\");\n stringToUTF16(string, inputBufferAddress, INPUT_BUFFER_SIZE);\n } else {\n setValue(lengthAddress, 0, \"i32\");\n }\n }\n __name(_tree_sitter_parse_callback, \"_tree_sitter_parse_callback\");\n function _tree_sitter_progress_callback(currentOffset, hasError) {\n if (Module.currentProgressCallback) {\n return Module.currentProgressCallback({\n currentOffset,\n hasError\n });\n }\n return false;\n }\n __name(_tree_sitter_progress_callback, \"_tree_sitter_progress_callback\");\n function _tree_sitter_query_progress_callback(currentOffset) {\n if (Module.currentQueryProgressCallback) {\n return Module.currentQueryProgressCallback({\n currentOffset\n });\n }\n return false;\n }\n __name(_tree_sitter_query_progress_callback, \"_tree_sitter_query_progress_callback\");\n var runtimeKeepaliveCounter = 0;\n var keepRuntimeAlive = /* @__PURE__ */ __name(() => noExitRuntime || runtimeKeepaliveCounter > 0, \"keepRuntimeAlive\");\n var _proc_exit = /* @__PURE__ */ __name((code) => {\n EXITSTATUS = code;\n if (!keepRuntimeAlive()) {\n Module[\"onExit\"]?.(code);\n ABORT = true;\n }\n quit_(code, new ExitStatus(code));\n }, \"_proc_exit\");\n _proc_exit.sig = \"vi\";\n var exitJS = /* @__PURE__ */ __name((status, implicit) => {\n EXITSTATUS = status;\n _proc_exit(status);\n }, \"exitJS\");\n var handleException = /* @__PURE__ */ __name((e) => {\n if (e instanceof ExitStatus || e == \"unwind\") {\n return EXITSTATUS;\n }\n quit_(1, e);\n }, \"handleException\");\n var lengthBytesUTF8 = /* @__PURE__ */ __name((str) => {\n var len = 0;\n for (var i2 = 0; i2 < str.length; ++i2) {\n var c = str.charCodeAt(i2);\n if (c <= 127) {\n len++;\n } else if (c <= 2047) {\n len += 2;\n } else if (c >= 55296 && c <= 57343) {\n len += 4;\n ++i2;\n } else {\n len += 3;\n }\n }\n return len;\n }, \"lengthBytesUTF8\");\n var stringToUTF8Array = /* @__PURE__ */ __name((str, heap, outIdx, maxBytesToWrite) => {\n if (!(maxBytesToWrite > 0)) return 0;\n var startIdx = outIdx;\n var endIdx = outIdx + maxBytesToWrite - 1;\n for (var i2 = 0; i2 < str.length; ++i2) {\n var u = str.codePointAt(i2);\n if (u <= 127) {\n if (outIdx >= endIdx) break;\n heap[outIdx++] = u;\n } else if (u <= 2047) {\n if (outIdx + 1 >= endIdx) break;\n heap[outIdx++] = 192 | u >> 6;\n heap[outIdx++] = 128 | u & 63;\n } else if (u <= 65535) {\n if (outIdx + 2 >= endIdx) break;\n heap[outIdx++] = 224 | u >> 12;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n } else {\n if (outIdx + 3 >= endIdx) break;\n heap[outIdx++] = 240 | u >> 18;\n heap[outIdx++] = 128 | u >> 12 & 63;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n i2++;\n }\n }\n heap[outIdx] = 0;\n return outIdx - startIdx;\n }, \"stringToUTF8Array\");\n var stringToUTF8 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite), \"stringToUTF8\");\n var stackAlloc = /* @__PURE__ */ __name((sz) => __emscripten_stack_alloc(sz), \"stackAlloc\");\n var stringToUTF8OnStack = /* @__PURE__ */ __name((str) => {\n var size = lengthBytesUTF8(str) + 1;\n var ret = stackAlloc(size);\n stringToUTF8(str, ret, size);\n return ret;\n }, \"stringToUTF8OnStack\");\n var AsciiToString = /* @__PURE__ */ __name((ptr) => {\n var str = \"\";\n while (1) {\n var ch = HEAPU8[ptr++];\n if (!ch) return str;\n str += String.fromCharCode(ch);\n }\n }, \"AsciiToString\");\n var stringToUTF16 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => {\n maxBytesToWrite ??= 2147483647;\n if (maxBytesToWrite < 2) return 0;\n maxBytesToWrite -= 2;\n var startPtr = outPtr;\n var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;\n for (var i2 = 0; i2 < numCharsToWrite; ++i2) {\n var codeUnit = str.charCodeAt(i2);\n LE_HEAP_STORE_I16((outPtr >> 1) * 2, codeUnit);\n outPtr += 2;\n }\n LE_HEAP_STORE_I16((outPtr >> 1) * 2, 0);\n return outPtr - startPtr;\n }, \"stringToUTF16\");\n LE_ATOMICS_NATIVE_BYTE_ORDER = new Int8Array(new Int16Array([1]).buffer)[0] === 1 ? [\n /* little endian */\n ((x) => x),\n ((x) => x),\n void 0,\n ((x) => x)\n ] : [\n /* big endian */\n ((x) => x),\n ((x) => ((x & 65280) << 8 | (x & 255) << 24) >> 16),\n void 0,\n ((x) => x >> 24 & 255 | x >> 8 & 65280 | (x & 65280) << 8 | (x & 255) << 24)\n ];\n function LE_HEAP_UPDATE() {\n HEAPU16.unsigned = ((x) => x & 65535);\n HEAPU32.unsigned = ((x) => x >>> 0);\n }\n __name(LE_HEAP_UPDATE, \"LE_HEAP_UPDATE\");\n {\n initMemory();\n if (Module[\"noExitRuntime\"]) noExitRuntime = Module[\"noExitRuntime\"];\n if (Module[\"print\"]) out = Module[\"print\"];\n if (Module[\"printErr\"]) err = Module[\"printErr\"];\n if (Module[\"dynamicLibraries\"]) dynamicLibraries = Module[\"dynamicLibraries\"];\n if (Module[\"wasmBinary\"]) wasmBinary = Module[\"wasmBinary\"];\n if (Module[\"arguments\"]) arguments_ = Module[\"arguments\"];\n if (Module[\"thisProgram\"]) thisProgram = Module[\"thisProgram\"];\n if (Module[\"preInit\"]) {\n if (typeof Module[\"preInit\"] == \"function\") Module[\"preInit\"] = [Module[\"preInit\"]];\n while (Module[\"preInit\"].length > 0) {\n Module[\"preInit\"].shift()();\n }\n }\n }\n Module[\"setValue\"] = setValue;\n Module[\"getValue\"] = getValue;\n Module[\"UTF8ToString\"] = UTF8ToString;\n Module[\"stringToUTF8\"] = stringToUTF8;\n Module[\"lengthBytesUTF8\"] = lengthBytesUTF8;\n Module[\"AsciiToString\"] = AsciiToString;\n Module[\"stringToUTF16\"] = stringToUTF16;\n Module[\"loadWebAssemblyModule\"] = loadWebAssemblyModule;\n Module[\"LE_HEAP_STORE_I64\"] = LE_HEAP_STORE_I64;\n var ASM_CONSTS = {};\n var _malloc, _calloc, _realloc, _free, _ts_range_edit, _memcmp, _ts_language_symbol_count, _ts_language_state_count, _ts_language_abi_version, _ts_language_name, _ts_language_field_count, _ts_language_next_state, _ts_language_symbol_name, _ts_language_symbol_for_name, _strncmp, _ts_language_symbol_type, _ts_language_field_name_for_id, _ts_lookahead_iterator_new, _ts_lookahead_iterator_delete, _ts_lookahead_iterator_reset_state, _ts_lookahead_iterator_reset, _ts_lookahead_iterator_next, _ts_lookahead_iterator_current_symbol, _ts_point_edit, _ts_parser_delete, _ts_parser_reset, _ts_parser_set_language, _ts_parser_set_included_ranges, _ts_query_new, _ts_query_delete, _iswspace, _iswalnum, _ts_query_pattern_count, _ts_query_capture_count, _ts_query_string_count, _ts_query_capture_name_for_id, _ts_query_capture_quantifier_for_id, _ts_query_string_value_for_id, _ts_query_predicates_for_pattern, _ts_query_start_byte_for_pattern, _ts_query_end_byte_for_pattern, _ts_query_is_pattern_rooted, _ts_query_is_pattern_non_local, _ts_query_is_pattern_guaranteed_at_step, _ts_query_disable_capture, _ts_query_disable_pattern, _ts_tree_copy, _ts_tree_delete, _ts_init, _ts_parser_new_wasm, _ts_parser_enable_logger_wasm, _ts_parser_parse_wasm, _ts_parser_included_ranges_wasm, _ts_language_type_is_named_wasm, _ts_language_type_is_visible_wasm, _ts_language_metadata_wasm, _ts_language_supertypes_wasm, _ts_language_subtypes_wasm, _ts_tree_root_node_wasm, _ts_tree_root_node_with_offset_wasm, _ts_tree_edit_wasm, _ts_tree_included_ranges_wasm, _ts_tree_get_changed_ranges_wasm, _ts_tree_cursor_new_wasm, _ts_tree_cursor_copy_wasm, _ts_tree_cursor_delete_wasm, _ts_tree_cursor_reset_wasm, _ts_tree_cursor_reset_to_wasm, _ts_tree_cursor_goto_first_child_wasm, _ts_tree_cursor_goto_last_child_wasm, _ts_tree_cursor_goto_first_child_for_index_wasm, _ts_tree_cursor_goto_first_child_for_position_wasm, _ts_tree_cursor_goto_next_sibling_wasm, _ts_tree_cursor_goto_previous_sibling_wasm, _ts_tree_cursor_goto_descendant_wasm, _ts_tree_cursor_goto_parent_wasm, _ts_tree_cursor_current_node_type_id_wasm, _ts_tree_cursor_current_node_state_id_wasm, _ts_tree_cursor_current_node_is_named_wasm, _ts_tree_cursor_current_node_is_missing_wasm, _ts_tree_cursor_current_node_id_wasm, _ts_tree_cursor_start_position_wasm, _ts_tree_cursor_end_position_wasm, _ts_tree_cursor_start_index_wasm, _ts_tree_cursor_end_index_wasm, _ts_tree_cursor_current_field_id_wasm, _ts_tree_cursor_current_depth_wasm, _ts_tree_cursor_current_descendant_index_wasm, _ts_tree_cursor_current_node_wasm, _ts_node_symbol_wasm, _ts_node_field_name_for_child_wasm, _ts_node_field_name_for_named_child_wasm, _ts_node_children_by_field_id_wasm, _ts_node_first_child_for_byte_wasm, _ts_node_first_named_child_for_byte_wasm, _ts_node_grammar_symbol_wasm, _ts_node_child_count_wasm, _ts_node_named_child_count_wasm, _ts_node_child_wasm, _ts_node_named_child_wasm, _ts_node_child_by_field_id_wasm, _ts_node_next_sibling_wasm, _ts_node_prev_sibling_wasm, _ts_node_next_named_sibling_wasm, _ts_node_prev_named_sibling_wasm, _ts_node_descendant_count_wasm, _ts_node_parent_wasm, _ts_node_child_with_descendant_wasm, _ts_node_descendant_for_index_wasm, _ts_node_named_descendant_for_index_wasm, _ts_node_descendant_for_position_wasm, _ts_node_named_descendant_for_position_wasm, _ts_node_start_point_wasm, _ts_node_end_point_wasm, _ts_node_start_index_wasm, _ts_node_end_index_wasm, _ts_node_to_string_wasm, _ts_node_children_wasm, _ts_node_named_children_wasm, _ts_node_descendants_of_type_wasm, _ts_node_is_named_wasm, _ts_node_has_changes_wasm, _ts_node_has_error_wasm, _ts_node_is_error_wasm, _ts_node_is_missing_wasm, _ts_node_is_extra_wasm, _ts_node_parse_state_wasm, _ts_node_next_parse_state_wasm, _ts_query_matches_wasm, _ts_query_captures_wasm, _memset, _memcpy, _memmove, _iswalpha, _iswblank, _iswdigit, _iswlower, _iswupper, _iswxdigit, _memchr, _strlen, _strcmp, _strncat, _strncpy, _towlower, _towupper, _setThrew, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, ___wasm_apply_data_relocs;\n function assignWasmExports(wasmExports2) {\n Module[\"_malloc\"] = _malloc = wasmExports2[\"malloc\"];\n Module[\"_calloc\"] = _calloc = wasmExports2[\"calloc\"];\n Module[\"_realloc\"] = _realloc = wasmExports2[\"realloc\"];\n Module[\"_free\"] = _free = wasmExports2[\"free\"];\n Module[\"_ts_range_edit\"] = _ts_range_edit = wasmExports2[\"ts_range_edit\"];\n Module[\"_memcmp\"] = _memcmp = wasmExports2[\"memcmp\"];\n Module[\"_ts_language_symbol_count\"] = _ts_language_symbol_count = wasmExports2[\"ts_language_symbol_count\"];\n Module[\"_ts_language_state_count\"] = _ts_language_state_count = wasmExports2[\"ts_language_state_count\"];\n Module[\"_ts_language_abi_version\"] = _ts_language_abi_version = wasmExports2[\"ts_language_abi_version\"];\n Module[\"_ts_language_name\"] = _ts_language_name = wasmExports2[\"ts_language_name\"];\n Module[\"_ts_language_field_count\"] = _ts_language_field_count = wasmExports2[\"ts_language_field_count\"];\n Module[\"_ts_language_next_state\"] = _ts_language_next_state = wasmExports2[\"ts_language_next_state\"];\n Module[\"_ts_language_symbol_name\"] = _ts_language_symbol_name = wasmExports2[\"ts_language_symbol_name\"];\n Module[\"_ts_language_symbol_for_name\"] = _ts_language_symbol_for_name = wasmExports2[\"ts_language_symbol_for_name\"];\n Module[\"_strncmp\"] = _strncmp = wasmExports2[\"strncmp\"];\n Module[\"_ts_language_symbol_type\"] = _ts_language_symbol_type = wasmExports2[\"ts_language_symbol_type\"];\n Module[\"_ts_language_field_name_for_id\"] = _ts_language_field_name_for_id = wasmExports2[\"ts_language_field_name_for_id\"];\n Module[\"_ts_lookahead_iterator_new\"] = _ts_lookahead_iterator_new = wasmExports2[\"ts_lookahead_iterator_new\"];\n Module[\"_ts_lookahead_iterator_delete\"] = _ts_lookahead_iterator_delete = wasmExports2[\"ts_lookahead_iterator_delete\"];\n Module[\"_ts_lookahead_iterator_reset_state\"] = _ts_lookahead_iterator_reset_state = wasmExports2[\"ts_lookahead_iterator_reset_state\"];\n Module[\"_ts_lookahead_iterator_reset\"] = _ts_lookahead_iterator_reset = wasmExports2[\"ts_lookahead_iterator_reset\"];\n Module[\"_ts_lookahead_iterator_next\"] = _ts_lookahead_iterator_next = wasmExports2[\"ts_lookahead_iterator_next\"];\n Module[\"_ts_lookahead_iterator_current_symbol\"] = _ts_lookahead_iterator_current_symbol = wasmExports2[\"ts_lookahead_iterator_current_symbol\"];\n Module[\"_ts_point_edit\"] = _ts_point_edit = wasmExports2[\"ts_point_edit\"];\n Module[\"_ts_parser_delete\"] = _ts_parser_delete = wasmExports2[\"ts_parser_delete\"];\n Module[\"_ts_parser_reset\"] = _ts_parser_reset = wasmExports2[\"ts_parser_reset\"];\n Module[\"_ts_parser_set_language\"] = _ts_parser_set_language = wasmExports2[\"ts_parser_set_language\"];\n Module[\"_ts_parser_set_included_ranges\"] = _ts_parser_set_included_ranges = wasmExports2[\"ts_parser_set_included_ranges\"];\n Module[\"_ts_query_new\"] = _ts_query_new = wasmExports2[\"ts_query_new\"];\n Module[\"_ts_query_delete\"] = _ts_query_delete = wasmExports2[\"ts_query_delete\"];\n Module[\"_iswspace\"] = _iswspace = wasmExports2[\"iswspace\"];\n Module[\"_iswalnum\"] = _iswalnum = wasmExports2[\"iswalnum\"];\n Module[\"_ts_query_pattern_count\"] = _ts_query_pattern_count = wasmExports2[\"ts_query_pattern_count\"];\n Module[\"_ts_query_capture_count\"] = _ts_query_capture_count = wasmExports2[\"ts_query_capture_count\"];\n Module[\"_ts_query_string_count\"] = _ts_query_string_count = wasmExports2[\"ts_query_string_count\"];\n Module[\"_ts_query_capture_name_for_id\"] = _ts_query_capture_name_for_id = wasmExports2[\"ts_query_capture_name_for_id\"];\n Module[\"_ts_query_capture_quantifier_for_id\"] = _ts_query_capture_quantifier_for_id = wasmExports2[\"ts_query_capture_quantifier_for_id\"];\n Module[\"_ts_query_string_value_for_id\"] = _ts_query_string_value_for_id = wasmExports2[\"ts_query_string_value_for_id\"];\n Module[\"_ts_query_predicates_for_pattern\"] = _ts_query_predicates_for_pattern = wasmExports2[\"ts_query_predicates_for_pattern\"];\n Module[\"_ts_query_start_byte_for_pattern\"] = _ts_query_start_byte_for_pattern = wasmExports2[\"ts_query_start_byte_for_pattern\"];\n Module[\"_ts_query_end_byte_for_pattern\"] = _ts_query_end_byte_for_pattern = wasmExports2[\"ts_query_end_byte_for_pattern\"];\n Module[\"_ts_query_is_pattern_rooted\"] = _ts_query_is_pattern_rooted = wasmExports2[\"ts_query_is_pattern_rooted\"];\n Module[\"_ts_query_is_pattern_non_local\"] = _ts_query_is_pattern_non_local = wasmExports2[\"ts_query_is_pattern_non_local\"];\n Module[\"_ts_query_is_pattern_guaranteed_at_step\"] = _ts_query_is_pattern_guaranteed_at_step = wasmExports2[\"ts_query_is_pattern_guaranteed_at_step\"];\n Module[\"_ts_query_disable_capture\"] = _ts_query_disable_capture = wasmExports2[\"ts_query_disable_capture\"];\n Module[\"_ts_query_disable_pattern\"] = _ts_query_disable_pattern = wasmExports2[\"ts_query_disable_pattern\"];\n Module[\"_ts_tree_copy\"] = _ts_tree_copy = wasmExports2[\"ts_tree_copy\"];\n Module[\"_ts_tree_delete\"] = _ts_tree_delete = wasmExports2[\"ts_tree_delete\"];\n Module[\"_ts_init\"] = _ts_init = wasmExports2[\"ts_init\"];\n Module[\"_ts_parser_new_wasm\"] = _ts_parser_new_wasm = wasmExports2[\"ts_parser_new_wasm\"];\n Module[\"_ts_parser_enable_logger_wasm\"] = _ts_parser_enable_logger_wasm = wasmExports2[\"ts_parser_enable_logger_wasm\"];\n Module[\"_ts_parser_parse_wasm\"] = _ts_parser_parse_wasm = wasmExports2[\"ts_parser_parse_wasm\"];\n Module[\"_ts_parser_included_ranges_wasm\"] = _ts_parser_included_ranges_wasm = wasmExports2[\"ts_parser_included_ranges_wasm\"];\n Module[\"_ts_language_type_is_named_wasm\"] = _ts_language_type_is_named_wasm = wasmExports2[\"ts_language_type_is_named_wasm\"];\n Module[\"_ts_language_type_is_visible_wasm\"] = _ts_language_type_is_visible_wasm = wasmExports2[\"ts_language_type_is_visible_wasm\"];\n Module[\"_ts_language_metadata_wasm\"] = _ts_language_metadata_wasm = wasmExports2[\"ts_language_metadata_wasm\"];\n Module[\"_ts_language_supertypes_wasm\"] = _ts_language_supertypes_wasm = wasmExports2[\"ts_language_supertypes_wasm\"];\n Module[\"_ts_language_subtypes_wasm\"] = _ts_language_subtypes_wasm = wasmExports2[\"ts_language_subtypes_wasm\"];\n Module[\"_ts_tree_root_node_wasm\"] = _ts_tree_root_node_wasm = wasmExports2[\"ts_tree_root_node_wasm\"];\n Module[\"_ts_tree_root_node_with_offset_wasm\"] = _ts_tree_root_node_with_offset_wasm = wasmExports2[\"ts_tree_root_node_with_offset_wasm\"];\n Module[\"_ts_tree_edit_wasm\"] = _ts_tree_edit_wasm = wasmExports2[\"ts_tree_edit_wasm\"];\n Module[\"_ts_tree_included_ranges_wasm\"] = _ts_tree_included_ranges_wasm = wasmExports2[\"ts_tree_included_ranges_wasm\"];\n Module[\"_ts_tree_get_changed_ranges_wasm\"] = _ts_tree_get_changed_ranges_wasm = wasmExports2[\"ts_tree_get_changed_ranges_wasm\"];\n Module[\"_ts_tree_cursor_new_wasm\"] = _ts_tree_cursor_new_wasm = wasmExports2[\"ts_tree_cursor_new_wasm\"];\n Module[\"_ts_tree_cursor_copy_wasm\"] = _ts_tree_cursor_copy_wasm = wasmExports2[\"ts_tree_cursor_copy_wasm\"];\n Module[\"_ts_tree_cursor_delete_wasm\"] = _ts_tree_cursor_delete_wasm = wasmExports2[\"ts_tree_cursor_delete_wasm\"];\n Module[\"_ts_tree_cursor_reset_wasm\"] = _ts_tree_cursor_reset_wasm = wasmExports2[\"ts_tree_cursor_reset_wasm\"];\n Module[\"_ts_tree_cursor_reset_to_wasm\"] = _ts_tree_cursor_reset_to_wasm = wasmExports2[\"ts_tree_cursor_reset_to_wasm\"];\n Module[\"_ts_tree_cursor_goto_first_child_wasm\"] = _ts_tree_cursor_goto_first_child_wasm = wasmExports2[\"ts_tree_cursor_goto_first_child_wasm\"];\n Module[\"_ts_tree_cursor_goto_last_child_wasm\"] = _ts_tree_cursor_goto_last_child_wasm = wasmExports2[\"ts_tree_cursor_goto_last_child_wasm\"];\n Module[\"_ts_tree_cursor_goto_first_child_for_index_wasm\"] = _ts_tree_cursor_goto_first_child_for_index_wasm = wasmExports2[\"ts_tree_cursor_goto_first_child_for_index_wasm\"];\n Module[\"_ts_tree_cursor_goto_first_child_for_position_wasm\"] = _ts_tree_cursor_goto_first_child_for_position_wasm = wasmExports2[\"ts_tree_cursor_goto_first_child_for_position_wasm\"];\n Module[\"_ts_tree_cursor_goto_next_sibling_wasm\"] = _ts_tree_cursor_goto_next_sibling_wasm = wasmExports2[\"ts_tree_cursor_goto_next_sibling_wasm\"];\n Module[\"_ts_tree_cursor_goto_previous_sibling_wasm\"] = _ts_tree_cursor_goto_previous_sibling_wasm = wasmExports2[\"ts_tree_cursor_goto_previous_sibling_wasm\"];\n Module[\"_ts_tree_cursor_goto_descendant_wasm\"] = _ts_tree_cursor_goto_descendant_wasm = wasmExports2[\"ts_tree_cursor_goto_descendant_wasm\"];\n Module[\"_ts_tree_cursor_goto_parent_wasm\"] = _ts_tree_cursor_goto_parent_wasm = wasmExports2[\"ts_tree_cursor_goto_parent_wasm\"];\n Module[\"_ts_tree_cursor_current_node_type_id_wasm\"] = _ts_tree_cursor_current_node_type_id_wasm = wasmExports2[\"ts_tree_cursor_current_node_type_id_wasm\"];\n Module[\"_ts_tree_cursor_current_node_state_id_wasm\"] = _ts_tree_cursor_current_node_state_id_wasm = wasmExports2[\"ts_tree_cursor_current_node_state_id_wasm\"];\n Module[\"_ts_tree_cursor_current_node_is_named_wasm\"] = _ts_tree_cursor_current_node_is_named_wasm = wasmExports2[\"ts_tree_cursor_current_node_is_named_wasm\"];\n Module[\"_ts_tree_cursor_current_node_is_missing_wasm\"] = _ts_tree_cursor_current_node_is_missing_wasm = wasmExports2[\"ts_tree_cursor_current_node_is_missing_wasm\"];\n Module[\"_ts_tree_cursor_current_node_id_wasm\"] = _ts_tree_cursor_current_node_id_wasm = wasmExports2[\"ts_tree_cursor_current_node_id_wasm\"];\n Module[\"_ts_tree_cursor_start_position_wasm\"] = _ts_tree_cursor_start_position_wasm = wasmExports2[\"ts_tree_cursor_start_position_wasm\"];\n Module[\"_ts_tree_cursor_end_position_wasm\"] = _ts_tree_cursor_end_position_wasm = wasmExports2[\"ts_tree_cursor_end_position_wasm\"];\n Module[\"_ts_tree_cursor_start_index_wasm\"] = _ts_tree_cursor_start_index_wasm = wasmExports2[\"ts_tree_cursor_start_index_wasm\"];\n Module[\"_ts_tree_cursor_end_index_wasm\"] = _ts_tree_cursor_end_index_wasm = wasmExports2[\"ts_tree_cursor_end_index_wasm\"];\n Module[\"_ts_tree_cursor_current_field_id_wasm\"] = _ts_tree_cursor_current_field_id_wasm = wasmExports2[\"ts_tree_cursor_current_field_id_wasm\"];\n Module[\"_ts_tree_cursor_current_depth_wasm\"] = _ts_tree_cursor_current_depth_wasm = wasmExports2[\"ts_tree_cursor_current_depth_wasm\"];\n Module[\"_ts_tree_cursor_current_descendant_index_wasm\"] = _ts_tree_cursor_current_descendant_index_wasm = wasmExports2[\"ts_tree_cursor_current_descendant_index_wasm\"];\n Module[\"_ts_tree_cursor_current_node_wasm\"] = _ts_tree_cursor_current_node_wasm = wasmExports2[\"ts_tree_cursor_current_node_wasm\"];\n Module[\"_ts_node_symbol_wasm\"] = _ts_node_symbol_wasm = wasmExports2[\"ts_node_symbol_wasm\"];\n Module[\"_ts_node_field_name_for_child_wasm\"] = _ts_node_field_name_for_child_wasm = wasmExports2[\"ts_node_field_name_for_child_wasm\"];\n Module[\"_ts_node_field_name_for_named_child_wasm\"] = _ts_node_field_name_for_named_child_wasm = wasmExports2[\"ts_node_field_name_for_named_child_wasm\"];\n Module[\"_ts_node_children_by_field_id_wasm\"] = _ts_node_children_by_field_id_wasm = wasmExports2[\"ts_node_children_by_field_id_wasm\"];\n Module[\"_ts_node_first_child_for_byte_wasm\"] = _ts_node_first_child_for_byte_wasm = wasmExports2[\"ts_node_first_child_for_byte_wasm\"];\n Module[\"_ts_node_first_named_child_for_byte_wasm\"] = _ts_node_first_named_child_for_byte_wasm = wasmExports2[\"ts_node_first_named_child_for_byte_wasm\"];\n Module[\"_ts_node_grammar_symbol_wasm\"] = _ts_node_grammar_symbol_wasm = wasmExports2[\"ts_node_grammar_symbol_wasm\"];\n Module[\"_ts_node_child_count_wasm\"] = _ts_node_child_count_wasm = wasmExports2[\"ts_node_child_count_wasm\"];\n Module[\"_ts_node_named_child_count_wasm\"] = _ts_node_named_child_count_wasm = wasmExports2[\"ts_node_named_child_count_wasm\"];\n Module[\"_ts_node_child_wasm\"] = _ts_node_child_wasm = wasmExports2[\"ts_node_child_wasm\"];\n Module[\"_ts_node_named_child_wasm\"] = _ts_node_named_child_wasm = wasmExports2[\"ts_node_named_child_wasm\"];\n Module[\"_ts_node_child_by_field_id_wasm\"] = _ts_node_child_by_field_id_wasm = wasmExports2[\"ts_node_child_by_field_id_wasm\"];\n Module[\"_ts_node_next_sibling_wasm\"] = _ts_node_next_sibling_wasm = wasmExports2[\"ts_node_next_sibling_wasm\"];\n Module[\"_ts_node_prev_sibling_wasm\"] = _ts_node_prev_sibling_wasm = wasmExports2[\"ts_node_prev_sibling_wasm\"];\n Module[\"_ts_node_next_named_sibling_wasm\"] = _ts_node_next_named_sibling_wasm = wasmExports2[\"ts_node_next_named_sibling_wasm\"];\n Module[\"_ts_node_prev_named_sibling_wasm\"] = _ts_node_prev_named_sibling_wasm = wasmExports2[\"ts_node_prev_named_sibling_wasm\"];\n Module[\"_ts_node_descendant_count_wasm\"] = _ts_node_descendant_count_wasm = wasmExports2[\"ts_node_descendant_count_wasm\"];\n Module[\"_ts_node_parent_wasm\"] = _ts_node_parent_wasm = wasmExports2[\"ts_node_parent_wasm\"];\n Module[\"_ts_node_child_with_descendant_wasm\"] = _ts_node_child_with_descendant_wasm = wasmExports2[\"ts_node_child_with_descendant_wasm\"];\n Module[\"_ts_node_descendant_for_index_wasm\"] = _ts_node_descendant_for_index_wasm = wasmExports2[\"ts_node_descendant_for_index_wasm\"];\n Module[\"_ts_node_named_descendant_for_index_wasm\"] = _ts_node_named_descendant_for_index_wasm = wasmExports2[\"ts_node_named_descendant_for_index_wasm\"];\n Module[\"_ts_node_descendant_for_position_wasm\"] = _ts_node_descendant_for_position_wasm = wasmExports2[\"ts_node_descendant_for_position_wasm\"];\n Module[\"_ts_node_named_descendant_for_position_wasm\"] = _ts_node_named_descendant_for_position_wasm = wasmExports2[\"ts_node_named_descendant_for_position_wasm\"];\n Module[\"_ts_node_start_point_wasm\"] = _ts_node_start_point_wasm = wasmExports2[\"ts_node_start_point_wasm\"];\n Module[\"_ts_node_end_point_wasm\"] = _ts_node_end_point_wasm = wasmExports2[\"ts_node_end_point_wasm\"];\n Module[\"_ts_node_start_index_wasm\"] = _ts_node_start_index_wasm = wasmExports2[\"ts_node_start_index_wasm\"];\n Module[\"_ts_node_end_index_wasm\"] = _ts_node_end_index_wasm = wasmExports2[\"ts_node_end_index_wasm\"];\n Module[\"_ts_node_to_string_wasm\"] = _ts_node_to_string_wasm = wasmExports2[\"ts_node_to_string_wasm\"];\n Module[\"_ts_node_children_wasm\"] = _ts_node_children_wasm = wasmExports2[\"ts_node_children_wasm\"];\n Module[\"_ts_node_named_children_wasm\"] = _ts_node_named_children_wasm = wasmExports2[\"ts_node_named_children_wasm\"];\n Module[\"_ts_node_descendants_of_type_wasm\"] = _ts_node_descendants_of_type_wasm = wasmExports2[\"ts_node_descendants_of_type_wasm\"];\n Module[\"_ts_node_is_named_wasm\"] = _ts_node_is_named_wasm = wasmExports2[\"ts_node_is_named_wasm\"];\n Module[\"_ts_node_has_changes_wasm\"] = _ts_node_has_changes_wasm = wasmExports2[\"ts_node_has_changes_wasm\"];\n Module[\"_ts_node_has_error_wasm\"] = _ts_node_has_error_wasm = wasmExports2[\"ts_node_has_error_wasm\"];\n Module[\"_ts_node_is_error_wasm\"] = _ts_node_is_error_wasm = wasmExports2[\"ts_node_is_error_wasm\"];\n Module[\"_ts_node_is_missing_wasm\"] = _ts_node_is_missing_wasm = wasmExports2[\"ts_node_is_missing_wasm\"];\n Module[\"_ts_node_is_extra_wasm\"] = _ts_node_is_extra_wasm = wasmExports2[\"ts_node_is_extra_wasm\"];\n Module[\"_ts_node_parse_state_wasm\"] = _ts_node_parse_state_wasm = wasmExports2[\"ts_node_parse_state_wasm\"];\n Module[\"_ts_node_next_parse_state_wasm\"] = _ts_node_next_parse_state_wasm = wasmExports2[\"ts_node_next_parse_state_wasm\"];\n Module[\"_ts_query_matches_wasm\"] = _ts_query_matches_wasm = wasmExports2[\"ts_query_matches_wasm\"];\n Module[\"_ts_query_captures_wasm\"] = _ts_query_captures_wasm = wasmExports2[\"ts_query_captures_wasm\"];\n Module[\"_memset\"] = _memset = wasmExports2[\"memset\"];\n Module[\"_memcpy\"] = _memcpy = wasmExports2[\"memcpy\"];\n Module[\"_memmove\"] = _memmove = wasmExports2[\"memmove\"];\n Module[\"_iswalpha\"] = _iswalpha = wasmExports2[\"iswalpha\"];\n Module[\"_iswblank\"] = _iswblank = wasmExports2[\"iswblank\"];\n Module[\"_iswdigit\"] = _iswdigit = wasmExports2[\"iswdigit\"];\n Module[\"_iswlower\"] = _iswlower = wasmExports2[\"iswlower\"];\n Module[\"_iswupper\"] = _iswupper = wasmExports2[\"iswupper\"];\n Module[\"_iswxdigit\"] = _iswxdigit = wasmExports2[\"iswxdigit\"];\n Module[\"_memchr\"] = _memchr = wasmExports2[\"memchr\"];\n Module[\"_strlen\"] = _strlen = wasmExports2[\"strlen\"];\n Module[\"_strcmp\"] = _strcmp = wasmExports2[\"strcmp\"];\n Module[\"_strncat\"] = _strncat = wasmExports2[\"strncat\"];\n Module[\"_strncpy\"] = _strncpy = wasmExports2[\"strncpy\"];\n Module[\"_towlower\"] = _towlower = wasmExports2[\"towlower\"];\n Module[\"_towupper\"] = _towupper = wasmExports2[\"towupper\"];\n _setThrew = wasmExports2[\"setThrew\"];\n __emscripten_stack_restore = wasmExports2[\"_emscripten_stack_restore\"];\n __emscripten_stack_alloc = wasmExports2[\"_emscripten_stack_alloc\"];\n _emscripten_stack_get_current = wasmExports2[\"emscripten_stack_get_current\"];\n ___wasm_apply_data_relocs = wasmExports2[\"__wasm_apply_data_relocs\"];\n }\n __name(assignWasmExports, \"assignWasmExports\");\n var wasmImports = {\n /** @export */\n __heap_base: ___heap_base,\n /** @export */\n __indirect_function_table: wasmTable,\n /** @export */\n __memory_base: ___memory_base,\n /** @export */\n __stack_high: ___stack_high,\n /** @export */\n __stack_low: ___stack_low,\n /** @export */\n __stack_pointer: ___stack_pointer,\n /** @export */\n __table_base: ___table_base,\n /** @export */\n _abort_js: __abort_js,\n /** @export */\n emscripten_resize_heap: _emscripten_resize_heap,\n /** @export */\n fd_close: _fd_close,\n /** @export */\n fd_seek: _fd_seek,\n /** @export */\n fd_write: _fd_write,\n /** @export */\n memory: wasmMemory,\n /** @export */\n tree_sitter_log_callback: _tree_sitter_log_callback,\n /** @export */\n tree_sitter_parse_callback: _tree_sitter_parse_callback,\n /** @export */\n tree_sitter_progress_callback: _tree_sitter_progress_callback,\n /** @export */\n tree_sitter_query_progress_callback: _tree_sitter_query_progress_callback\n };\n function callMain(args2 = []) {\n var entryFunction = resolveGlobalSymbol(\"main\").sym;\n if (!entryFunction) return;\n args2.unshift(thisProgram);\n var argc = args2.length;\n var argv = stackAlloc((argc + 1) * 4);\n var argv_ptr = argv;\n args2.forEach((arg) => {\n LE_HEAP_STORE_U32((argv_ptr >> 2) * 4, stringToUTF8OnStack(arg));\n argv_ptr += 4;\n });\n LE_HEAP_STORE_U32((argv_ptr >> 2) * 4, 0);\n try {\n var ret = entryFunction(argc, argv);\n exitJS(\n ret,\n /* implicit = */\n true\n );\n return ret;\n } catch (e) {\n return handleException(e);\n }\n }\n __name(callMain, \"callMain\");\n function run(args2 = arguments_) {\n if (runDependencies > 0) {\n dependenciesFulfilled = run;\n return;\n }\n preRun();\n if (runDependencies > 0) {\n dependenciesFulfilled = run;\n return;\n }\n function doRun() {\n Module[\"calledRun\"] = true;\n if (ABORT) return;\n initRuntime();\n preMain();\n readyPromiseResolve?.(Module);\n Module[\"onRuntimeInitialized\"]?.();\n var noInitialRun = Module[\"noInitialRun\"] || false;\n if (!noInitialRun) callMain(args2);\n postRun();\n }\n __name(doRun, \"doRun\");\n if (Module[\"setStatus\"]) {\n Module[\"setStatus\"](\"Running...\");\n setTimeout(() => {\n setTimeout(() => Module[\"setStatus\"](\"\"), 1);\n doRun();\n }, 1);\n } else {\n doRun();\n }\n }\n __name(run, \"run\");\n var wasmExports;\n wasmExports = await createWasm();\n run();\n if (runtimeInitialized) {\n moduleRtn = Module;\n } else {\n moduleRtn = new Promise((resolve, reject) => {\n readyPromiseResolve = resolve;\n readyPromiseReject = reject;\n });\n }\n return moduleRtn;\n };\n })();\n if (typeof exports === \"object\" && typeof module === \"object\") {\n module.exports = Module;\n module.exports.default = Module;\n } else if (typeof define === \"function\" && define[\"amd\"])\n define([], () => Module);\n }\n});\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n CaptureQuantifier: () => CaptureQuantifier,\n Edit: () => Edit,\n LANGUAGE_VERSION: () => LANGUAGE_VERSION,\n Language: () => Language,\n LookaheadIterator: () => LookaheadIterator,\n MIN_COMPATIBLE_VERSION: () => MIN_COMPATIBLE_VERSION,\n Node: () => Node,\n Parser: () => Parser,\n Query: () => Query,\n Tree: () => Tree,\n TreeCursor: () => TreeCursor\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/edit.ts\nvar Edit = class {\n static {\n __name(this, \"Edit\");\n }\n /** The start position of the change. */\n startPosition;\n /** The end position of the change before the edit. */\n oldEndPosition;\n /** The end position of the change after the edit. */\n newEndPosition;\n /** The start index of the change. */\n startIndex;\n /** The end index of the change before the edit. */\n oldEndIndex;\n /** The end index of the change after the edit. */\n newEndIndex;\n constructor({\n startIndex,\n oldEndIndex,\n newEndIndex,\n startPosition,\n oldEndPosition,\n newEndPosition\n }) {\n this.startIndex = startIndex >>> 0;\n this.oldEndIndex = oldEndIndex >>> 0;\n this.newEndIndex = newEndIndex >>> 0;\n this.startPosition = startPosition;\n this.oldEndPosition = oldEndPosition;\n this.newEndPosition = newEndPosition;\n }\n /**\n * Edit a point and index to keep it in-sync with source code that has been edited.\n *\n * This function updates a single point's byte offset and row/column position\n * based on an edit operation. This is useful for editing points without\n * requiring a tree or node instance.\n */\n editPoint(point, index) {\n let newIndex = index;\n const newPoint = { ...point };\n if (index >= this.oldEndIndex) {\n newIndex = this.newEndIndex + (index - this.oldEndIndex);\n const originalRow = point.row;\n newPoint.row = this.newEndPosition.row + (point.row - this.oldEndPosition.row);\n newPoint.column = originalRow === this.oldEndPosition.row ? this.newEndPosition.column + (point.column - this.oldEndPosition.column) : point.column;\n } else if (index > this.startIndex) {\n newIndex = this.newEndIndex;\n newPoint.row = this.newEndPosition.row;\n newPoint.column = this.newEndPosition.column;\n }\n return { point: newPoint, index: newIndex };\n }\n /**\n * Edit a range to keep it in-sync with source code that has been edited.\n *\n * This function updates a range's start and end positions based on an edit\n * operation. This is useful for editing ranges without requiring a tree\n * or node instance.\n */\n editRange(range) {\n const newRange = {\n startIndex: range.startIndex,\n startPosition: { ...range.startPosition },\n endIndex: range.endIndex,\n endPosition: { ...range.endPosition }\n };\n if (range.endIndex >= this.oldEndIndex) {\n if (range.endIndex !== Number.MAX_SAFE_INTEGER) {\n newRange.endIndex = this.newEndIndex + (range.endIndex - this.oldEndIndex);\n newRange.endPosition = {\n row: this.newEndPosition.row + (range.endPosition.row - this.oldEndPosition.row),\n column: range.endPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.endPosition.column - this.oldEndPosition.column) : range.endPosition.column\n };\n if (newRange.endIndex < this.newEndIndex) {\n newRange.endIndex = Number.MAX_SAFE_INTEGER;\n newRange.endPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER };\n }\n }\n } else if (range.endIndex > this.startIndex) {\n newRange.endIndex = this.startIndex;\n newRange.endPosition = { ...this.startPosition };\n }\n if (range.startIndex >= this.oldEndIndex) {\n newRange.startIndex = this.newEndIndex + (range.startIndex - this.oldEndIndex);\n newRange.startPosition = {\n row: this.newEndPosition.row + (range.startPosition.row - this.oldEndPosition.row),\n column: range.startPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.startPosition.column - this.oldEndPosition.column) : range.startPosition.column\n };\n if (newRange.startIndex < this.newEndIndex) {\n newRange.startIndex = Number.MAX_SAFE_INTEGER;\n newRange.startPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER };\n }\n } else if (range.startIndex > this.startIndex) {\n newRange.startIndex = this.startIndex;\n newRange.startPosition = { ...this.startPosition };\n }\n return newRange;\n }\n};\n\n// src/constants.ts\nvar SIZE_OF_SHORT = 2;\nvar SIZE_OF_INT = 4;\nvar SIZE_OF_CURSOR = 4 * SIZE_OF_INT;\nvar SIZE_OF_NODE = 5 * SIZE_OF_INT;\nvar SIZE_OF_POINT = 2 * SIZE_OF_INT;\nvar SIZE_OF_RANGE = 2 * SIZE_OF_INT + 2 * SIZE_OF_POINT;\nvar ZERO_POINT = { row: 0, column: 0 };\nvar INTERNAL = /* @__PURE__ */ Symbol(\"INTERNAL\");\nfunction assertInternal(x) {\n if (x !== INTERNAL) throw new Error(\"Illegal constructor\");\n}\n__name(assertInternal, \"assertInternal\");\nfunction isPoint(point) {\n return !!point && typeof point.row === \"number\" && typeof point.column === \"number\";\n}\n__name(isPoint, \"isPoint\");\nfunction setModule(module2) {\n C = module2;\n}\n__name(setModule, \"setModule\");\nvar C;\n\n// src/lookahead_iterator.ts\nvar LookaheadIterator = class {\n static {\n __name(this, \"LookaheadIterator\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n language;\n /** @internal */\n constructor(internal, address, language) {\n assertInternal(internal);\n this[0] = address;\n this.language = language;\n }\n /** Get the current symbol of the lookahead iterator. */\n get currentTypeId() {\n return C._ts_lookahead_iterator_current_symbol(this[0]);\n }\n /** Get the current symbol name of the lookahead iterator. */\n get currentType() {\n return this.language.types[this.currentTypeId] || \"ERROR\";\n }\n /** Delete the lookahead iterator, freeing its resources. */\n delete() {\n C._ts_lookahead_iterator_delete(this[0]);\n this[0] = 0;\n }\n /**\n * Reset the lookahead iterator.\n *\n * This returns `true` if the language was set successfully and `false`\n * otherwise.\n */\n reset(language, stateId) {\n if (C._ts_lookahead_iterator_reset(this[0], language[0], stateId)) {\n this.language = language;\n return true;\n }\n return false;\n }\n /**\n * Reset the lookahead iterator to another state.\n *\n * This returns `true` if the iterator was reset to the given state and\n * `false` otherwise.\n */\n resetState(stateId) {\n return Boolean(C._ts_lookahead_iterator_reset_state(this[0], stateId));\n }\n /**\n * Returns an iterator that iterates over the symbols of the lookahead iterator.\n *\n * The iterator will yield the current symbol name as a string for each step\n * until there are no more symbols to iterate over.\n */\n [Symbol.iterator]() {\n return {\n next: /* @__PURE__ */ __name(() => {\n if (C._ts_lookahead_iterator_next(this[0])) {\n return { done: false, value: this.currentType };\n }\n return { done: true, value: \"\" };\n }, \"next\")\n };\n }\n};\n\n// src/tree.ts\nfunction getText(tree, startIndex, endIndex, startPosition) {\n const length = endIndex - startIndex;\n let result = tree.textCallback(startIndex, startPosition);\n if (result) {\n startIndex += result.length;\n while (startIndex < endIndex) {\n const string = tree.textCallback(startIndex, startPosition);\n if (string && string.length > 0) {\n startIndex += string.length;\n result += string;\n } else {\n break;\n }\n }\n if (startIndex > endIndex) {\n result = result.slice(0, length);\n }\n }\n return result ?? \"\";\n}\n__name(getText, \"getText\");\nvar Tree = class _Tree {\n static {\n __name(this, \"Tree\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n textCallback;\n /** The language that was used to parse the syntax tree. */\n language;\n /** @internal */\n constructor(internal, address, language, textCallback) {\n assertInternal(internal);\n this[0] = address;\n this.language = language;\n this.textCallback = textCallback;\n }\n /** Create a shallow copy of the syntax tree. This is very fast. */\n copy() {\n const address = C._ts_tree_copy(this[0]);\n return new _Tree(INTERNAL, address, this.language, this.textCallback);\n }\n /** Delete the syntax tree, freeing its resources. */\n delete() {\n C._ts_tree_delete(this[0]);\n this[0] = 0;\n }\n /** Get the root node of the syntax tree. */\n get rootNode() {\n C._ts_tree_root_node_wasm(this[0]);\n return unmarshalNode(this);\n }\n /**\n * Get the root node of the syntax tree, but with its position shifted\n * forward by the given offset.\n */\n rootNodeWithOffset(offsetBytes, offsetExtent) {\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, offsetBytes, \"i32\");\n marshalPoint(address + SIZE_OF_INT, offsetExtent);\n C._ts_tree_root_node_with_offset_wasm(this[0]);\n return unmarshalNode(this);\n }\n /**\n * Edit the syntax tree to keep it in sync with source code that has been\n * edited.\n *\n * You must describe the edit both in terms of byte offsets and in terms of\n * row/column coordinates.\n */\n edit(edit) {\n marshalEdit(edit);\n C._ts_tree_edit_wasm(this[0]);\n }\n /** Create a new {@link TreeCursor} starting from the root of the tree. */\n walk() {\n return this.rootNode.walk();\n }\n /**\n * Compare this old edited syntax tree to a new syntax tree representing\n * the same document, returning a sequence of ranges whose syntactic\n * structure has changed.\n *\n * For this to work correctly, this syntax tree must have been edited such\n * that its ranges match up to the new tree. Generally, you'll want to\n * call this method right after calling one of the [`Parser::parse`]\n * functions. Call it on the old tree that was passed to parse, and\n * pass the new tree that was returned from `parse`.\n */\n getChangedRanges(other) {\n if (!(other instanceof _Tree)) {\n throw new TypeError(\"Argument must be a Tree\");\n }\n C._ts_tree_get_changed_ranges_wasm(this[0], other[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalRange(address);\n address += SIZE_OF_RANGE;\n }\n C._free(buffer);\n }\n return result;\n }\n /** Get the included ranges that were used to parse the syntax tree. */\n getIncludedRanges() {\n C._ts_tree_included_ranges_wasm(this[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalRange(address);\n address += SIZE_OF_RANGE;\n }\n C._free(buffer);\n }\n return result;\n }\n};\n\n// src/tree_cursor.ts\nvar TreeCursor = class _TreeCursor {\n static {\n __name(this, \"TreeCursor\");\n }\n /** @internal */\n // @ts-expect-error: never read\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n // @ts-expect-error: never read\n [1] = 0;\n // Internal handle for Wasm\n /** @internal */\n // @ts-expect-error: never read\n [2] = 0;\n // Internal handle for Wasm\n /** @internal */\n // @ts-expect-error: never read\n [3] = 0;\n // Internal handle for Wasm\n /** @internal */\n tree;\n /** @internal */\n constructor(internal, tree) {\n assertInternal(internal);\n this.tree = tree;\n unmarshalTreeCursor(this);\n }\n /** Creates a deep copy of the tree cursor. This allocates new memory. */\n copy() {\n const copy = new _TreeCursor(INTERNAL, this.tree);\n C._ts_tree_cursor_copy_wasm(this.tree[0]);\n unmarshalTreeCursor(copy);\n return copy;\n }\n /** Delete the tree cursor, freeing its resources. */\n delete() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_delete_wasm(this.tree[0]);\n this[0] = this[1] = this[2] = 0;\n }\n /** Get the tree cursor's current {@link Node}. */\n get currentNode() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_current_node_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get the numerical field id of this tree cursor's current node.\n *\n * See also {@link TreeCursor#currentFieldName}.\n */\n get currentFieldId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_field_id_wasm(this.tree[0]);\n }\n /** Get the field name of this tree cursor's current node. */\n get currentFieldName() {\n return this.tree.language.fields[this.currentFieldId];\n }\n /**\n * Get the depth of the cursor's current node relative to the original\n * node that the cursor was constructed with.\n */\n get currentDepth() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_depth_wasm(this.tree[0]);\n }\n /**\n * Get the index of the cursor's current node out of all of the\n * descendants of the original node that the cursor was constructed with.\n */\n get currentDescendantIndex() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0]);\n }\n /** Get the type of the cursor's current node. */\n get nodeType() {\n return this.tree.language.types[this.nodeTypeId] || \"ERROR\";\n }\n /** Get the type id of the cursor's current node. */\n get nodeTypeId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0]);\n }\n /** Get the state id of the cursor's current node. */\n get nodeStateId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0]);\n }\n /** Get the id of the cursor's current node. */\n get nodeId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_id_wasm(this.tree[0]);\n }\n /**\n * Check if the cursor's current node is *named*.\n *\n * Named nodes correspond to named rules in the grammar, whereas\n * *anonymous* nodes correspond to string literals in the grammar.\n */\n get nodeIsNamed() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if the cursor's current node is *missing*.\n *\n * Missing nodes are inserted by the parser in order to recover from\n * certain kinds of syntax errors.\n */\n get nodeIsMissing() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0]) === 1;\n }\n /** Get the string content of the cursor's current node. */\n get nodeText() {\n marshalTreeCursor(this);\n const startIndex = C._ts_tree_cursor_start_index_wasm(this.tree[0]);\n const endIndex = C._ts_tree_cursor_end_index_wasm(this.tree[0]);\n C._ts_tree_cursor_start_position_wasm(this.tree[0]);\n const startPosition = unmarshalPoint(TRANSFER_BUFFER);\n return getText(this.tree, startIndex, endIndex, startPosition);\n }\n /** Get the start position of the cursor's current node. */\n get startPosition() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_start_position_wasm(this.tree[0]);\n return unmarshalPoint(TRANSFER_BUFFER);\n }\n /** Get the end position of the cursor's current node. */\n get endPosition() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_end_position_wasm(this.tree[0]);\n return unmarshalPoint(TRANSFER_BUFFER);\n }\n /** Get the start index of the cursor's current node. */\n get startIndex() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_start_index_wasm(this.tree[0]);\n }\n /** Get the end index of the cursor's current node. */\n get endIndex() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_end_index_wasm(this.tree[0]);\n }\n /**\n * Move this cursor to the first child of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there were no children.\n */\n gotoFirstChild() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the last child of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there were no children.\n *\n * Note that this function may be slower than\n * {@link TreeCursor#gotoFirstChild} because it needs to\n * iterate through all the children to compute the child's position.\n */\n gotoLastChild() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the parent of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there was no parent node (the cursor was already on the\n * root node).\n *\n * Note that the node the cursor was constructed with is considered the root\n * of the cursor, and the cursor cannot walk outside this node.\n */\n gotoParent() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the next sibling of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there was no next sibling node.\n *\n * Note that the node the cursor was constructed with is considered the root\n * of the cursor, and the cursor cannot walk outside this node.\n */\n gotoNextSibling() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the previous sibling of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there was no previous sibling node.\n *\n * Note that this function may be slower than\n * {@link TreeCursor#gotoNextSibling} due to how node\n * positions are stored. In the worst case, this will need to iterate\n * through all the children up to the previous sibling node to recalculate\n * its position. Also note that the node the cursor was constructed with is\n * considered the root of the cursor, and the cursor cannot walk outside this node.\n */\n gotoPreviousSibling() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move the cursor to the node that is the nth descendant of\n * the original node that the cursor was constructed with, where\n * zero represents the original node itself.\n */\n gotoDescendant(goalDescendantIndex) {\n marshalTreeCursor(this);\n C._ts_tree_cursor_goto_descendant_wasm(this.tree[0], goalDescendantIndex);\n unmarshalTreeCursor(this);\n }\n /**\n * Move this cursor to the first child of its current node that contains or\n * starts after the given byte offset.\n *\n * This returns `true` if the cursor successfully moved to a child node, and returns\n * `false` if no such child was found.\n */\n gotoFirstChildForIndex(goalIndex) {\n marshalTreeCursor(this);\n C.setValue(TRANSFER_BUFFER + SIZE_OF_CURSOR, goalIndex, \"i32\");\n const result = C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the first child of its current node that contains or\n * starts after the given byte offset.\n *\n * This returns the index of the child node if one was found, and returns\n * `null` if no such child was found.\n */\n gotoFirstChildForPosition(goalPosition) {\n marshalTreeCursor(this);\n marshalPoint(TRANSFER_BUFFER + SIZE_OF_CURSOR, goalPosition);\n const result = C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Re-initialize this tree cursor to start at the original node that the\n * cursor was constructed with.\n */\n reset(node) {\n marshalNode(node);\n marshalTreeCursor(this, TRANSFER_BUFFER + SIZE_OF_NODE);\n C._ts_tree_cursor_reset_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n }\n /**\n * Re-initialize a tree cursor to the same position as another cursor.\n *\n * Unlike {@link TreeCursor#reset}, this will not lose parent\n * information and allows reusing already created cursors.\n */\n resetTo(cursor) {\n marshalTreeCursor(this, TRANSFER_BUFFER);\n marshalTreeCursor(cursor, TRANSFER_BUFFER + SIZE_OF_CURSOR);\n C._ts_tree_cursor_reset_to_wasm(this.tree[0], cursor.tree[0]);\n unmarshalTreeCursor(this);\n }\n};\n\n// src/node.ts\nvar Node = class {\n static {\n __name(this, \"Node\");\n }\n /** @internal */\n // @ts-expect-error: never read\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n _children;\n /** @internal */\n _namedChildren;\n /** @internal */\n constructor(internal, {\n id,\n tree,\n startIndex,\n startPosition,\n other\n }) {\n assertInternal(internal);\n this[0] = other;\n this.id = id;\n this.tree = tree;\n this.startIndex = startIndex;\n this.startPosition = startPosition;\n }\n /**\n * The numeric id for this node that is unique.\n *\n * Within a given syntax tree, no two nodes have the same id. However:\n *\n * * If a new tree is created based on an older tree, and a node from the old tree is reused in\n * the process, then that node will have the same id in both trees.\n *\n * * A node not marked as having changes does not guarantee it was reused.\n *\n * * If a node is marked as having changed in the old tree, it will not be reused.\n */\n id;\n /** The byte index where this node starts. */\n startIndex;\n /** The position where this node starts. */\n startPosition;\n /** The tree that this node belongs to. */\n tree;\n /** Get this node's type as a numerical id. */\n get typeId() {\n marshalNode(this);\n return C._ts_node_symbol_wasm(this.tree[0]);\n }\n /**\n * Get the node's type as a numerical id as it appears in the grammar,\n * ignoring aliases.\n */\n get grammarId() {\n marshalNode(this);\n return C._ts_node_grammar_symbol_wasm(this.tree[0]);\n }\n /** Get this node's type as a string. */\n get type() {\n return this.tree.language.types[this.typeId] || \"ERROR\";\n }\n /**\n * Get this node's symbol name as it appears in the grammar, ignoring\n * aliases as a string.\n */\n get grammarType() {\n return this.tree.language.types[this.grammarId] || \"ERROR\";\n }\n /**\n * Check if this node is *named*.\n *\n * Named nodes correspond to named rules in the grammar, whereas\n * *anonymous* nodes correspond to string literals in the grammar.\n */\n get isNamed() {\n marshalNode(this);\n return C._ts_node_is_named_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node is *extra*.\n *\n * Extra nodes represent things like comments, which are not required\n * by the grammar, but can appear anywhere.\n */\n get isExtra() {\n marshalNode(this);\n return C._ts_node_is_extra_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node represents a syntax error.\n *\n * Syntax errors represent parts of the code that could not be incorporated\n * into a valid syntax tree.\n */\n get isError() {\n marshalNode(this);\n return C._ts_node_is_error_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node is *missing*.\n *\n * Missing nodes are inserted by the parser in order to recover from\n * certain kinds of syntax errors.\n */\n get isMissing() {\n marshalNode(this);\n return C._ts_node_is_missing_wasm(this.tree[0]) === 1;\n }\n /** Check if this node has been edited. */\n get hasChanges() {\n marshalNode(this);\n return C._ts_node_has_changes_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node represents a syntax error or contains any syntax\n * errors anywhere within it.\n */\n get hasError() {\n marshalNode(this);\n return C._ts_node_has_error_wasm(this.tree[0]) === 1;\n }\n /** Get the byte index where this node ends. */\n get endIndex() {\n marshalNode(this);\n return C._ts_node_end_index_wasm(this.tree[0]);\n }\n /** Get the position where this node ends. */\n get endPosition() {\n marshalNode(this);\n C._ts_node_end_point_wasm(this.tree[0]);\n return unmarshalPoint(TRANSFER_BUFFER);\n }\n /** Get the string content of this node. */\n get text() {\n return getText(this.tree, this.startIndex, this.endIndex, this.startPosition);\n }\n /** Get this node's parse state. */\n get parseState() {\n marshalNode(this);\n return C._ts_node_parse_state_wasm(this.tree[0]);\n }\n /** Get the parse state after this node. */\n get nextParseState() {\n marshalNode(this);\n return C._ts_node_next_parse_state_wasm(this.tree[0]);\n }\n /** Check if this node is equal to another node. */\n equals(other) {\n return this.tree === other.tree && this.id === other.id;\n }\n /**\n * Get the node's child at the given index, where zero represents the first child.\n *\n * This method is fairly fast, but its cost is technically log(n), so if\n * you might be iterating over a long list of children, you should use\n * {@link Node#children} instead.\n */\n child(index) {\n marshalNode(this);\n C._ts_node_child_wasm(this.tree[0], index);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's *named* child at the given index.\n *\n * See also {@link Node#isNamed}.\n * This method is fairly fast, but its cost is technically log(n), so if\n * you might be iterating over a long list of children, you should use\n * {@link Node#namedChildren} instead.\n */\n namedChild(index) {\n marshalNode(this);\n C._ts_node_named_child_wasm(this.tree[0], index);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's child with the given numerical field id.\n *\n * See also {@link Node#childForFieldName}. You can\n * convert a field name to an id using {@link Language#fieldIdForName}.\n */\n childForFieldId(fieldId) {\n marshalNode(this);\n C._ts_node_child_by_field_id_wasm(this.tree[0], fieldId);\n return unmarshalNode(this.tree);\n }\n /**\n * Get the first child with the given field name.\n *\n * If multiple children may have the same field name, access them using\n * {@link Node#childrenForFieldName}.\n */\n childForFieldName(fieldName) {\n const fieldId = this.tree.language.fields.indexOf(fieldName);\n if (fieldId !== -1) return this.childForFieldId(fieldId);\n return null;\n }\n /** Get the field name of this node's child at the given index. */\n fieldNameForChild(index) {\n marshalNode(this);\n const address = C._ts_node_field_name_for_child_wasm(this.tree[0], index);\n if (!address) return null;\n return C.AsciiToString(address);\n }\n /** Get the field name of this node's named child at the given index. */\n fieldNameForNamedChild(index) {\n marshalNode(this);\n const address = C._ts_node_field_name_for_named_child_wasm(this.tree[0], index);\n if (!address) return null;\n return C.AsciiToString(address);\n }\n /**\n * Get an array of this node's children with a given field name.\n *\n * See also {@link Node#children}.\n */\n childrenForFieldName(fieldName) {\n const fieldId = this.tree.language.fields.indexOf(fieldName);\n if (fieldId !== -1 && fieldId !== 0) return this.childrenForFieldId(fieldId);\n return [];\n }\n /**\n * Get an array of this node's children with a given field id.\n *\n * See also {@link Node#childrenForFieldName}.\n */\n childrenForFieldId(fieldId) {\n marshalNode(this);\n C._ts_node_children_by_field_id_wasm(this.tree[0], fieldId);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n C._free(buffer);\n }\n return result;\n }\n /** Get the node's first child that contains or starts after the given byte offset. */\n firstChildForIndex(index) {\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, index, \"i32\");\n C._ts_node_first_child_for_byte_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the node's first named child that contains or starts after the given byte offset. */\n firstNamedChildForIndex(index) {\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, index, \"i32\");\n C._ts_node_first_named_child_for_byte_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get this node's number of children. */\n get childCount() {\n marshalNode(this);\n return C._ts_node_child_count_wasm(this.tree[0]);\n }\n /**\n * Get this node's number of *named* children.\n *\n * See also {@link Node#isNamed}.\n */\n get namedChildCount() {\n marshalNode(this);\n return C._ts_node_named_child_count_wasm(this.tree[0]);\n }\n /** Get this node's first child. */\n get firstChild() {\n return this.child(0);\n }\n /**\n * Get this node's first named child.\n *\n * See also {@link Node#isNamed}.\n */\n get firstNamedChild() {\n return this.namedChild(0);\n }\n /** Get this node's last child. */\n get lastChild() {\n return this.child(this.childCount - 1);\n }\n /**\n * Get this node's last named child.\n *\n * See also {@link Node#isNamed}.\n */\n get lastNamedChild() {\n return this.namedChild(this.namedChildCount - 1);\n }\n /**\n * Iterate over this node's children.\n *\n * If you're walking the tree recursively, you may want to use the\n * {@link TreeCursor} APIs directly instead.\n */\n get children() {\n if (!this._children) {\n marshalNode(this);\n C._ts_node_children_wasm(this.tree[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n this._children = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n this._children[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n C._free(buffer);\n }\n }\n return this._children;\n }\n /**\n * Iterate over this node's named children.\n *\n * See also {@link Node#children}.\n */\n get namedChildren() {\n if (!this._namedChildren) {\n marshalNode(this);\n C._ts_node_named_children_wasm(this.tree[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n this._namedChildren = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n this._namedChildren[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n C._free(buffer);\n }\n }\n return this._namedChildren;\n }\n /**\n * Get the descendants of this node that are the given type, or in the given types array.\n *\n * The types array should contain node type strings, which can be retrieved from {@link Language#types}.\n *\n * Additionally, a `startPosition` and `endPosition` can be passed in to restrict the search to a byte range.\n */\n descendantsOfType(types, startPosition = ZERO_POINT, endPosition = ZERO_POINT) {\n if (!Array.isArray(types)) types = [types];\n const symbols = [];\n const typesBySymbol = this.tree.language.types;\n for (const node_type of types) {\n if (node_type == \"ERROR\") {\n symbols.push(65535);\n }\n }\n for (let i2 = 0, n = typesBySymbol.length; i2 < n; i2++) {\n if (types.includes(typesBySymbol[i2])) {\n symbols.push(i2);\n }\n }\n const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length);\n for (let i2 = 0, n = symbols.length; i2 < n; i2++) {\n C.setValue(symbolsAddress + i2 * SIZE_OF_INT, symbols[i2], \"i32\");\n }\n marshalNode(this);\n C._ts_node_descendants_of_type_wasm(\n this.tree[0],\n symbolsAddress,\n symbols.length,\n startPosition.row,\n startPosition.column,\n endPosition.row,\n endPosition.column\n );\n const descendantCount = C.getValue(TRANSFER_BUFFER, \"i32\");\n const descendantAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(descendantCount);\n if (descendantCount > 0) {\n let address = descendantAddress;\n for (let i2 = 0; i2 < descendantCount; i2++) {\n result[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n }\n C._free(descendantAddress);\n C._free(symbolsAddress);\n return result;\n }\n /** Get this node's next sibling. */\n get nextSibling() {\n marshalNode(this);\n C._ts_node_next_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get this node's previous sibling. */\n get previousSibling() {\n marshalNode(this);\n C._ts_node_prev_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's next *named* sibling.\n *\n * See also {@link Node#isNamed}.\n */\n get nextNamedSibling() {\n marshalNode(this);\n C._ts_node_next_named_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's previous *named* sibling.\n *\n * See also {@link Node#isNamed}.\n */\n get previousNamedSibling() {\n marshalNode(this);\n C._ts_node_prev_named_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the node's number of descendants, including one for the node itself. */\n get descendantCount() {\n marshalNode(this);\n return C._ts_node_descendant_count_wasm(this.tree[0]);\n }\n /**\n * Get this node's immediate parent.\n * Prefer {@link Node#childWithDescendant} for iterating over this node's ancestors.\n */\n get parent() {\n marshalNode(this);\n C._ts_node_parent_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get the node that contains `descendant`.\n *\n * Note that this can return `descendant` itself.\n */\n childWithDescendant(descendant) {\n marshalNode(this);\n marshalNode(descendant, 1);\n C._ts_node_child_with_descendant_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest node within this node that spans the given byte range. */\n descendantForIndex(start2, end = start2) {\n if (typeof start2 !== \"number\" || typeof end !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, start2, \"i32\");\n C.setValue(address + SIZE_OF_INT, end, \"i32\");\n C._ts_node_descendant_for_index_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest named node within this node that spans the given byte range. */\n namedDescendantForIndex(start2, end = start2) {\n if (typeof start2 !== \"number\" || typeof end !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, start2, \"i32\");\n C.setValue(address + SIZE_OF_INT, end, \"i32\");\n C._ts_node_named_descendant_for_index_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest node within this node that spans the given point range. */\n descendantForPosition(start2, end = start2) {\n if (!isPoint(start2) || !isPoint(end)) {\n throw new Error(\"Arguments must be {row, column} objects\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n marshalPoint(address, start2);\n marshalPoint(address + SIZE_OF_POINT, end);\n C._ts_node_descendant_for_position_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest named node within this node that spans the given point range. */\n namedDescendantForPosition(start2, end = start2) {\n if (!isPoint(start2) || !isPoint(end)) {\n throw new Error(\"Arguments must be {row, column} objects\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n marshalPoint(address, start2);\n marshalPoint(address + SIZE_OF_POINT, end);\n C._ts_node_named_descendant_for_position_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Create a new {@link TreeCursor} starting from this node.\n *\n * Note that the given node is considered the root of the cursor,\n * and the cursor cannot walk outside this node.\n */\n walk() {\n marshalNode(this);\n C._ts_tree_cursor_new_wasm(this.tree[0]);\n return new TreeCursor(INTERNAL, this.tree);\n }\n /**\n * Edit this node to keep it in-sync with source code that has been edited.\n *\n * This function is only rarely needed. When you edit a syntax tree with\n * the {@link Tree#edit} method, all of the nodes that you retrieve from\n * the tree afterward will already reflect the edit. You only need to\n * use {@link Node#edit} when you have a specific {@link Node} instance that\n * you want to keep and continue to use after an edit.\n */\n edit(edit) {\n if (this.startIndex >= edit.oldEndIndex) {\n this.startIndex = edit.newEndIndex + (this.startIndex - edit.oldEndIndex);\n let subbedPointRow;\n let subbedPointColumn;\n if (this.startPosition.row > edit.oldEndPosition.row) {\n subbedPointRow = this.startPosition.row - edit.oldEndPosition.row;\n subbedPointColumn = this.startPosition.column;\n } else {\n subbedPointRow = 0;\n subbedPointColumn = this.startPosition.column;\n if (this.startPosition.column >= edit.oldEndPosition.column) {\n subbedPointColumn = this.startPosition.column - edit.oldEndPosition.column;\n }\n }\n if (subbedPointRow > 0) {\n this.startPosition.row += subbedPointRow;\n this.startPosition.column = subbedPointColumn;\n } else {\n this.startPosition.column += subbedPointColumn;\n }\n } else if (this.startIndex > edit.startIndex) {\n this.startIndex = edit.newEndIndex;\n this.startPosition.row = edit.newEndPosition.row;\n this.startPosition.column = edit.newEndPosition.column;\n }\n }\n /** Get the S-expression representation of this node. */\n toString() {\n marshalNode(this);\n const address = C._ts_node_to_string_wasm(this.tree[0]);\n const result = C.AsciiToString(address);\n C._free(address);\n return result;\n }\n};\n\n// src/marshal.ts\nfunction unmarshalCaptures(query, tree, address, patternIndex, result) {\n for (let i2 = 0, n = result.length; i2 < n; i2++) {\n const captureIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const node = unmarshalNode(tree, address);\n address += SIZE_OF_NODE;\n result[i2] = { patternIndex, name: query.captureNames[captureIndex], node };\n }\n return address;\n}\n__name(unmarshalCaptures, \"unmarshalCaptures\");\nfunction marshalNode(node, index = 0) {\n let address = TRANSFER_BUFFER + index * SIZE_OF_NODE;\n C.setValue(address, node.id, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node.startIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node.startPosition.row, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node.startPosition.column, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node[0], \"i32\");\n}\n__name(marshalNode, \"marshalNode\");\nfunction unmarshalNode(tree, address = TRANSFER_BUFFER) {\n const id = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n if (id === 0) return null;\n const index = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const row = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const column = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const other = C.getValue(address, \"i32\");\n const result = new Node(INTERNAL, {\n id,\n tree,\n startIndex: index,\n startPosition: { row, column },\n other\n });\n return result;\n}\n__name(unmarshalNode, \"unmarshalNode\");\nfunction marshalTreeCursor(cursor, address = TRANSFER_BUFFER) {\n C.setValue(address + 0 * SIZE_OF_INT, cursor[0], \"i32\");\n C.setValue(address + 1 * SIZE_OF_INT, cursor[1], \"i32\");\n C.setValue(address + 2 * SIZE_OF_INT, cursor[2], \"i32\");\n C.setValue(address + 3 * SIZE_OF_INT, cursor[3], \"i32\");\n}\n__name(marshalTreeCursor, \"marshalTreeCursor\");\nfunction unmarshalTreeCursor(cursor) {\n cursor[0] = C.getValue(TRANSFER_BUFFER + 0 * SIZE_OF_INT, \"i32\");\n cursor[1] = C.getValue(TRANSFER_BUFFER + 1 * SIZE_OF_INT, \"i32\");\n cursor[2] = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, \"i32\");\n cursor[3] = C.getValue(TRANSFER_BUFFER + 3 * SIZE_OF_INT, \"i32\");\n}\n__name(unmarshalTreeCursor, \"unmarshalTreeCursor\");\nfunction marshalPoint(address, point) {\n C.setValue(address, point.row, \"i32\");\n C.setValue(address + SIZE_OF_INT, point.column, \"i32\");\n}\n__name(marshalPoint, \"marshalPoint\");\nfunction unmarshalPoint(address) {\n const result = {\n row: C.getValue(address, \"i32\") >>> 0,\n column: C.getValue(address + SIZE_OF_INT, \"i32\") >>> 0\n };\n return result;\n}\n__name(unmarshalPoint, \"unmarshalPoint\");\nfunction marshalRange(address, range) {\n marshalPoint(address, range.startPosition);\n address += SIZE_OF_POINT;\n marshalPoint(address, range.endPosition);\n address += SIZE_OF_POINT;\n C.setValue(address, range.startIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, range.endIndex, \"i32\");\n address += SIZE_OF_INT;\n}\n__name(marshalRange, \"marshalRange\");\nfunction unmarshalRange(address) {\n const result = {};\n result.startPosition = unmarshalPoint(address);\n address += SIZE_OF_POINT;\n result.endPosition = unmarshalPoint(address);\n address += SIZE_OF_POINT;\n result.startIndex = C.getValue(address, \"i32\") >>> 0;\n address += SIZE_OF_INT;\n result.endIndex = C.getValue(address, \"i32\") >>> 0;\n return result;\n}\n__name(unmarshalRange, \"unmarshalRange\");\nfunction marshalEdit(edit, address = TRANSFER_BUFFER) {\n marshalPoint(address, edit.startPosition);\n address += SIZE_OF_POINT;\n marshalPoint(address, edit.oldEndPosition);\n address += SIZE_OF_POINT;\n marshalPoint(address, edit.newEndPosition);\n address += SIZE_OF_POINT;\n C.setValue(address, edit.startIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, edit.oldEndIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, edit.newEndIndex, \"i32\");\n address += SIZE_OF_INT;\n}\n__name(marshalEdit, \"marshalEdit\");\nfunction unmarshalLanguageMetadata(address) {\n const major_version = C.getValue(address, \"i32\");\n const minor_version = C.getValue(address += SIZE_OF_INT, \"i32\");\n const patch_version = C.getValue(address += SIZE_OF_INT, \"i32\");\n return { major_version, minor_version, patch_version };\n}\n__name(unmarshalLanguageMetadata, \"unmarshalLanguageMetadata\");\n\n// src/language.ts\nvar LANGUAGE_FUNCTION_REGEX = /^tree_sitter_\\w+$/;\nvar Language = class _Language {\n static {\n __name(this, \"Language\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /**\n * A list of all node types in the language. The index of each type in this\n * array is its node type id.\n */\n types;\n /**\n * A list of all field names in the language. The index of each field name in\n * this array is its field id.\n */\n fields;\n /** @internal */\n constructor(internal, address) {\n assertInternal(internal);\n this[0] = address;\n this.types = new Array(C._ts_language_symbol_count(this[0]));\n for (let i2 = 0, n = this.types.length; i2 < n; i2++) {\n if (C._ts_language_symbol_type(this[0], i2) < 2) {\n this.types[i2] = C.UTF8ToString(C._ts_language_symbol_name(this[0], i2));\n }\n }\n this.fields = new Array(C._ts_language_field_count(this[0]) + 1);\n for (let i2 = 0, n = this.fields.length; i2 < n; i2++) {\n const fieldName = C._ts_language_field_name_for_id(this[0], i2);\n if (fieldName !== 0) {\n this.fields[i2] = C.UTF8ToString(fieldName);\n } else {\n this.fields[i2] = null;\n }\n }\n }\n /**\n * Gets the name of the language.\n */\n get name() {\n const ptr = C._ts_language_name(this[0]);\n if (ptr === 0) return null;\n return C.UTF8ToString(ptr);\n }\n /**\n * Gets the ABI version of the language.\n */\n get abiVersion() {\n return C._ts_language_abi_version(this[0]);\n }\n /**\n * Get the metadata for this language. This information is generated by the\n * CLI, and relies on the language author providing the correct metadata in\n * the language's `tree-sitter.json` file.\n */\n get metadata() {\n C._ts_language_metadata_wasm(this[0]);\n const length = C.getValue(TRANSFER_BUFFER, \"i32\");\n if (length === 0) return null;\n return unmarshalLanguageMetadata(TRANSFER_BUFFER + SIZE_OF_INT);\n }\n /**\n * Gets the number of fields in the language.\n */\n get fieldCount() {\n return this.fields.length - 1;\n }\n /**\n * Gets the number of states in the language.\n */\n get stateCount() {\n return C._ts_language_state_count(this[0]);\n }\n /**\n * Get the field id for a field name.\n */\n fieldIdForName(fieldName) {\n const result = this.fields.indexOf(fieldName);\n return result !== -1 ? result : null;\n }\n /**\n * Get the field name for a field id.\n */\n fieldNameForId(fieldId) {\n return this.fields[fieldId] ?? null;\n }\n /**\n * Get the node type id for a node type name.\n */\n idForNodeType(type, named) {\n const typeLength = C.lengthBytesUTF8(type);\n const typeAddress = C._malloc(typeLength + 1);\n C.stringToUTF8(type, typeAddress, typeLength + 1);\n const result = C._ts_language_symbol_for_name(this[0], typeAddress, typeLength, named ? 1 : 0);\n C._free(typeAddress);\n return result || null;\n }\n /**\n * Gets the number of node types in the language.\n */\n get nodeTypeCount() {\n return C._ts_language_symbol_count(this[0]);\n }\n /**\n * Get the node type name for a node type id.\n */\n nodeTypeForId(typeId) {\n const name2 = C._ts_language_symbol_name(this[0], typeId);\n return name2 ? C.UTF8ToString(name2) : null;\n }\n /**\n * Check if a node type is named.\n *\n * @see {@link https://tree-sitter.github.io/tree-sitter/using-parsers/2-basic-parsing.html#named-vs-anonymous-nodes}\n */\n nodeTypeIsNamed(typeId) {\n return C._ts_language_type_is_named_wasm(this[0], typeId) ? true : false;\n }\n /**\n * Check if a node type is visible.\n */\n nodeTypeIsVisible(typeId) {\n return C._ts_language_type_is_visible_wasm(this[0], typeId) ? true : false;\n }\n /**\n * Get the supertypes ids of this language.\n *\n * @see {@link https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types.html?highlight=supertype#supertype-nodes}\n */\n get supertypes() {\n C._ts_language_supertypes_wasm(this[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = C.getValue(address, \"i16\");\n address += SIZE_OF_SHORT;\n }\n }\n return result;\n }\n /**\n * Get the subtype ids for a given supertype node id.\n */\n subtypes(supertype) {\n C._ts_language_subtypes_wasm(this[0], supertype);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = C.getValue(address, \"i16\");\n address += SIZE_OF_SHORT;\n }\n }\n return result;\n }\n /**\n * Get the next state id for a given state id and node type id.\n */\n nextState(stateId, typeId) {\n return C._ts_language_next_state(this[0], stateId, typeId);\n }\n /**\n * Create a new lookahead iterator for this language and parse state.\n *\n * This returns `null` if state is invalid for this language.\n *\n * Iterating {@link LookaheadIterator} will yield valid symbols in the given\n * parse state. Newly created lookahead iterators will return the `ERROR`\n * symbol from {@link LookaheadIterator#currentType}.\n *\n * Lookahead iterators can be useful for generating suggestions and improving\n * syntax error diagnostics. To get symbols valid in an `ERROR` node, use the\n * lookahead iterator on its first leaf node state. For `MISSING` nodes, a\n * lookahead iterator created on the previous non-extra leaf node may be\n * appropriate.\n */\n lookaheadIterator(stateId) {\n const address = C._ts_lookahead_iterator_new(this[0], stateId);\n if (address) return new LookaheadIterator(INTERNAL, address, this);\n return null;\n }\n /**\n * Load a language from a WebAssembly module.\n * The module can be provided as a path to a file or as a buffer.\n */\n static async load(input) {\n let binary2;\n if (input instanceof Uint8Array) {\n binary2 = input;\n } else if (globalThis.process?.versions.node) {\n const fs2 = await import(\"fs/promises\");\n binary2 = await fs2.readFile(input);\n } else {\n const response = await fetch(input);\n if (!response.ok) {\n const body2 = await response.text();\n throw new Error(`Language.load failed with status ${response.status}.\n\n${body2}`);\n }\n const retryResp = response.clone();\n try {\n binary2 = await WebAssembly.compileStreaming(response);\n } catch (reason) {\n console.error(\"wasm streaming compile failed:\", reason);\n console.error(\"falling back to ArrayBuffer instantiation\");\n binary2 = new Uint8Array(await retryResp.arrayBuffer());\n }\n }\n const mod = await C.loadWebAssemblyModule(binary2, { loadAsync: true });\n const symbolNames = Object.keys(mod);\n const functionName = symbolNames.find((key) => LANGUAGE_FUNCTION_REGEX.test(key) && !key.includes(\"external_scanner_\"));\n if (!functionName) {\n console.log(`Couldn't find language function in Wasm file. Symbols:\n${JSON.stringify(symbolNames, null, 2)}`);\n throw new Error(\"Language.load failed: no language function found in Wasm file\");\n }\n const languageAddress = mod[functionName]();\n return new _Language(INTERNAL, languageAddress);\n }\n};\n\n// src/bindings.ts\nvar import_web_tree_sitter = __toESM(require_web_tree_sitter(), 1);\nvar Module2 = null;\nasync function initializeBinding(moduleOptions) {\n return Module2 ??= await (0, import_web_tree_sitter.default)(moduleOptions);\n}\n__name(initializeBinding, \"initializeBinding\");\nfunction checkModule() {\n return !!Module2;\n}\n__name(checkModule, \"checkModule\");\n\n// src/parser.ts\nvar TRANSFER_BUFFER;\nvar LANGUAGE_VERSION;\nvar MIN_COMPATIBLE_VERSION;\nvar Parser = class {\n static {\n __name(this, \"Parser\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n [1] = 0;\n // Internal handle for Wasm\n /** @internal */\n logCallback = null;\n /** The parser's current language. */\n language = null;\n /**\n * This must always be called before creating a Parser.\n *\n * You can optionally pass in options to configure the Wasm module, the most common\n * one being `locateFile` to help the module find the `.wasm` file.\n */\n static async init(moduleOptions) {\n setModule(await initializeBinding(moduleOptions));\n TRANSFER_BUFFER = C._ts_init();\n LANGUAGE_VERSION = C.getValue(TRANSFER_BUFFER, \"i32\");\n MIN_COMPATIBLE_VERSION = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n }\n /**\n * Create a new parser.\n */\n constructor() {\n this.initialize();\n }\n /** @internal */\n initialize() {\n if (!checkModule()) {\n throw new Error(\"cannot construct a Parser before calling `init()`\");\n }\n C._ts_parser_new_wasm();\n this[0] = C.getValue(TRANSFER_BUFFER, \"i32\");\n this[1] = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n }\n /** Delete the parser, freeing its resources. */\n delete() {\n C._ts_parser_delete(this[0]);\n C._free(this[1]);\n this[0] = 0;\n this[1] = 0;\n }\n /**\n * Set the language that the parser should use for parsing.\n *\n * If the language was not successfully assigned, an error will be thrown.\n * This happens if the language was generated with an incompatible\n * version of the Tree-sitter CLI. Check the language's version using\n * {@link Language#version} and compare it to this library's\n * {@link LANGUAGE_VERSION} and {@link MIN_COMPATIBLE_VERSION} constants.\n */\n setLanguage(language) {\n let address;\n if (!language) {\n address = 0;\n this.language = null;\n } else if (language.constructor === Language) {\n address = language[0];\n const version = C._ts_language_abi_version(address);\n if (version < MIN_COMPATIBLE_VERSION || LANGUAGE_VERSION < version) {\n throw new Error(\n `Incompatible language version ${version}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${LANGUAGE_VERSION}.`\n );\n }\n this.language = language;\n } else {\n throw new Error(\"Argument must be a Language\");\n }\n C._ts_parser_set_language(this[0], address);\n return this;\n }\n /**\n * Parse a slice of UTF8 text.\n *\n * @param {string | ParseCallback} callback - The UTF8-encoded text to parse or a callback function.\n *\n * @param {Tree | null} [oldTree] - A previous syntax tree parsed from the same document. If the text of the\n * document has changed since `oldTree` was created, then you must edit `oldTree` to match\n * the new text using {@link Tree#edit}.\n *\n * @param {ParseOptions} [options] - Options for parsing the text.\n * This can be used to set the included ranges, or a progress callback.\n *\n * @returns {Tree | null} A {@link Tree} if parsing succeeded, or `null` if:\n * - The parser has not yet had a language assigned with {@link Parser#setLanguage}.\n * - The progress callback returned true.\n */\n parse(callback, oldTree, options) {\n if (typeof callback === \"string\") {\n C.currentParseCallback = (index) => callback.slice(index);\n } else if (typeof callback === \"function\") {\n C.currentParseCallback = callback;\n } else {\n throw new Error(\"Argument must be a string or a function\");\n }\n if (options?.progressCallback) {\n C.currentProgressCallback = options.progressCallback;\n } else {\n C.currentProgressCallback = null;\n }\n if (this.logCallback) {\n C.currentLogCallback = this.logCallback;\n C._ts_parser_enable_logger_wasm(this[0], 1);\n } else {\n C.currentLogCallback = null;\n C._ts_parser_enable_logger_wasm(this[0], 0);\n }\n let rangeCount = 0;\n let rangeAddress = 0;\n if (options?.includedRanges) {\n rangeCount = options.includedRanges.length;\n rangeAddress = C._calloc(rangeCount, SIZE_OF_RANGE);\n let address = rangeAddress;\n for (let i2 = 0; i2 < rangeCount; i2++) {\n marshalRange(address, options.includedRanges[i2]);\n address += SIZE_OF_RANGE;\n }\n }\n const treeAddress = C._ts_parser_parse_wasm(\n this[0],\n this[1],\n oldTree ? oldTree[0] : 0,\n rangeAddress,\n rangeCount\n );\n if (!treeAddress) {\n C.currentParseCallback = null;\n C.currentLogCallback = null;\n C.currentProgressCallback = null;\n return null;\n }\n if (!this.language) {\n throw new Error(\"Parser must have a language to parse\");\n }\n const result = new Tree(INTERNAL, treeAddress, this.language, C.currentParseCallback);\n C.currentParseCallback = null;\n C.currentLogCallback = null;\n C.currentProgressCallback = null;\n return result;\n }\n /**\n * Instruct the parser to start the next parse from the beginning.\n *\n * If the parser previously failed because of a callback, \n * then by default, it will resume where it left off on the\n * next call to {@link Parser#parse} or other parsing functions.\n * If you don't want to resume, and instead intend to use this parser to\n * parse some other document, you must call `reset` first.\n */\n reset() {\n C._ts_parser_reset(this[0]);\n }\n /** Get the ranges of text that the parser will include when parsing. */\n getIncludedRanges() {\n C._ts_parser_included_ranges_wasm(this[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalRange(address);\n address += SIZE_OF_RANGE;\n }\n C._free(buffer);\n }\n return result;\n }\n /** Set the logging callback that a parser should use during parsing. */\n setLogger(callback) {\n if (!callback) {\n this.logCallback = null;\n } else if (typeof callback !== \"function\") {\n throw new Error(\"Logger callback must be a function\");\n } else {\n this.logCallback = callback;\n }\n return this;\n }\n /** Get the parser's current logger. */\n getLogger() {\n return this.logCallback;\n }\n};\n\n// src/query.ts\nvar PREDICATE_STEP_TYPE_CAPTURE = 1;\nvar PREDICATE_STEP_TYPE_STRING = 2;\nvar QUERY_WORD_REGEX = /[\\w-]+/g;\nvar CaptureQuantifier = {\n Zero: 0,\n ZeroOrOne: 1,\n ZeroOrMore: 2,\n One: 3,\n OneOrMore: 4\n};\nvar isCaptureStep = /* @__PURE__ */ __name((step) => step.type === \"capture\", \"isCaptureStep\");\nvar isStringStep = /* @__PURE__ */ __name((step) => step.type === \"string\", \"isStringStep\");\nvar QueryErrorKind = {\n Syntax: 1,\n NodeName: 2,\n FieldName: 3,\n CaptureName: 4,\n PatternStructure: 5\n};\nvar QueryError = class _QueryError extends Error {\n constructor(kind, info2, index, length) {\n super(_QueryError.formatMessage(kind, info2));\n this.kind = kind;\n this.info = info2;\n this.index = index;\n this.length = length;\n this.name = \"QueryError\";\n }\n static {\n __name(this, \"QueryError\");\n }\n /** Formats an error message based on the error kind and info */\n static formatMessage(kind, info2) {\n switch (kind) {\n case QueryErrorKind.NodeName:\n return `Bad node name '${info2.word}'`;\n case QueryErrorKind.FieldName:\n return `Bad field name '${info2.word}'`;\n case QueryErrorKind.CaptureName:\n return `Bad capture name @${info2.word}`;\n case QueryErrorKind.PatternStructure:\n return `Bad pattern structure at offset ${info2.suffix}`;\n case QueryErrorKind.Syntax:\n return `Bad syntax at offset ${info2.suffix}`;\n }\n }\n};\nfunction parseAnyPredicate(steps, index, operator, textPredicates) {\n if (steps.length !== 3) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected 2, got ${steps.length - 1}`\n );\n }\n if (!isCaptureStep(steps[1])) {\n throw new Error(\n `First argument of \\`#${operator}\\` predicate must be a capture. Got \"${steps[1].value}\"`\n );\n }\n const isPositive = operator === \"eq?\" || operator === \"any-eq?\";\n const matchAll = !operator.startsWith(\"any-\");\n if (isCaptureStep(steps[2])) {\n const captureName1 = steps[1].name;\n const captureName2 = steps[2].name;\n textPredicates[index].push((captures) => {\n const nodes1 = [];\n const nodes2 = [];\n for (const c of captures) {\n if (c.name === captureName1) nodes1.push(c.node);\n if (c.name === captureName2) nodes2.push(c.node);\n }\n const compare = /* @__PURE__ */ __name((n1, n2, positive) => {\n return positive ? n1.text === n2.text : n1.text !== n2.text;\n }, \"compare\");\n return matchAll ? nodes1.every((n1) => nodes2.some((n2) => compare(n1, n2, isPositive))) : nodes1.some((n1) => nodes2.some((n2) => compare(n1, n2, isPositive)));\n });\n } else {\n const captureName = steps[1].name;\n const stringValue = steps[2].value;\n const matches = /* @__PURE__ */ __name((n) => n.text === stringValue, \"matches\");\n const doesNotMatch = /* @__PURE__ */ __name((n) => n.text !== stringValue, \"doesNotMatch\");\n textPredicates[index].push((captures) => {\n const nodes = [];\n for (const c of captures) {\n if (c.name === captureName) nodes.push(c.node);\n }\n const test = isPositive ? matches : doesNotMatch;\n return matchAll ? nodes.every(test) : nodes.some(test);\n });\n }\n}\n__name(parseAnyPredicate, \"parseAnyPredicate\");\nfunction parseMatchPredicate(steps, index, operator, textPredicates) {\n if (steps.length !== 3) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected 2, got ${steps.length - 1}.`\n );\n }\n if (steps[1].type !== \"capture\") {\n throw new Error(\n `First argument of \\`#${operator}\\` predicate must be a capture. Got \"${steps[1].value}\".`\n );\n }\n if (steps[2].type !== \"string\") {\n throw new Error(\n `Second argument of \\`#${operator}\\` predicate must be a string. Got @${steps[2].name}.`\n );\n }\n const isPositive = operator === \"match?\" || operator === \"any-match?\";\n const matchAll = !operator.startsWith(\"any-\");\n const captureName = steps[1].name;\n const regex = new RegExp(steps[2].value);\n textPredicates[index].push((captures) => {\n const nodes = [];\n for (const c of captures) {\n if (c.name === captureName) nodes.push(c.node.text);\n }\n const test = /* @__PURE__ */ __name((text, positive) => {\n return positive ? regex.test(text) : !regex.test(text);\n }, \"test\");\n if (nodes.length === 0) return !isPositive;\n return matchAll ? nodes.every((text) => test(text, isPositive)) : nodes.some((text) => test(text, isPositive));\n });\n}\n__name(parseMatchPredicate, \"parseMatchPredicate\");\nfunction parseAnyOfPredicate(steps, index, operator, textPredicates) {\n if (steps.length < 2) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected at least 1. Got ${steps.length - 1}.`\n );\n }\n if (steps[1].type !== \"capture\") {\n throw new Error(\n `First argument of \\`#${operator}\\` predicate must be a capture. Got \"${steps[1].value}\".`\n );\n }\n const isPositive = operator === \"any-of?\";\n const captureName = steps[1].name;\n const stringSteps = steps.slice(2);\n if (!stringSteps.every(isStringStep)) {\n throw new Error(\n `Arguments to \\`#${operator}\\` predicate must be strings.\".`\n );\n }\n const values = stringSteps.map((s) => s.value);\n textPredicates[index].push((captures) => {\n const nodes = [];\n for (const c of captures) {\n if (c.name === captureName) nodes.push(c.node.text);\n }\n if (nodes.length === 0) return !isPositive;\n return nodes.every((text) => values.includes(text)) === isPositive;\n });\n}\n__name(parseAnyOfPredicate, \"parseAnyOfPredicate\");\nfunction parseIsPredicate(steps, index, operator, assertedProperties, refutedProperties) {\n if (steps.length < 2 || steps.length > 3) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`\n );\n }\n if (!steps.every(isStringStep)) {\n throw new Error(\n `Arguments to \\`#${operator}\\` predicate must be strings.\".`\n );\n }\n const properties = operator === \"is?\" ? assertedProperties : refutedProperties;\n if (!properties[index]) properties[index] = {};\n properties[index][steps[1].value] = steps[2]?.value ?? null;\n}\n__name(parseIsPredicate, \"parseIsPredicate\");\nfunction parseSetDirective(steps, index, setProperties) {\n if (steps.length < 2 || steps.length > 3) {\n throw new Error(`Wrong number of arguments to \\`#set!\\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`);\n }\n if (!steps.every(isStringStep)) {\n throw new Error(`Arguments to \\`#set!\\` predicate must be strings.\".`);\n }\n if (!setProperties[index]) setProperties[index] = {};\n setProperties[index][steps[1].value] = steps[2]?.value ?? null;\n}\n__name(parseSetDirective, \"parseSetDirective\");\nfunction parsePattern(index, stepType, stepValueId, captureNames, stringValues, steps, textPredicates, predicates, setProperties, assertedProperties, refutedProperties) {\n if (stepType === PREDICATE_STEP_TYPE_CAPTURE) {\n const name2 = captureNames[stepValueId];\n steps.push({ type: \"capture\", name: name2 });\n } else if (stepType === PREDICATE_STEP_TYPE_STRING) {\n steps.push({ type: \"string\", value: stringValues[stepValueId] });\n } else if (steps.length > 0) {\n if (steps[0].type !== \"string\") {\n throw new Error(\"Predicates must begin with a literal value\");\n }\n const operator = steps[0].value;\n switch (operator) {\n case \"any-not-eq?\":\n case \"not-eq?\":\n case \"any-eq?\":\n case \"eq?\":\n parseAnyPredicate(steps, index, operator, textPredicates);\n break;\n case \"any-not-match?\":\n case \"not-match?\":\n case \"any-match?\":\n case \"match?\":\n parseMatchPredicate(steps, index, operator, textPredicates);\n break;\n case \"not-any-of?\":\n case \"any-of?\":\n parseAnyOfPredicate(steps, index, operator, textPredicates);\n break;\n case \"is?\":\n case \"is-not?\":\n parseIsPredicate(steps, index, operator, assertedProperties, refutedProperties);\n break;\n case \"set!\":\n parseSetDirective(steps, index, setProperties);\n break;\n default:\n predicates[index].push({ operator, operands: steps.slice(1) });\n }\n steps.length = 0;\n }\n}\n__name(parsePattern, \"parsePattern\");\nvar Query = class {\n static {\n __name(this, \"Query\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n exceededMatchLimit;\n /** @internal */\n textPredicates;\n /** The names of the captures used in the query. */\n captureNames;\n /** The quantifiers of the captures used in the query. */\n captureQuantifiers;\n /**\n * The other user-defined predicates associated with the given index.\n *\n * This includes predicates with operators other than:\n * - `match?`\n * - `eq?` and `not-eq?`\n * - `any-of?` and `not-any-of?`\n * - `is?` and `is-not?`\n * - `set!`\n */\n predicates;\n /** The properties for predicates with the operator `set!`. */\n setProperties;\n /** The properties for predicates with the operator `is?`. */\n assertedProperties;\n /** The properties for predicates with the operator `is-not?`. */\n refutedProperties;\n /** The maximum number of in-progress matches for this cursor. */\n matchLimit;\n /**\n * Create a new query from a string containing one or more S-expression\n * patterns.\n *\n * The query is associated with a particular language, and can only be run\n * on syntax nodes parsed with that language. References to Queries can be\n * shared between multiple threads.\n *\n * @link {@see https://tree-sitter.github.io/tree-sitter/using-parsers/queries}\n */\n constructor(language, source) {\n const sourceLength = C.lengthBytesUTF8(source);\n const sourceAddress = C._malloc(sourceLength + 1);\n C.stringToUTF8(source, sourceAddress, sourceLength + 1);\n const address = C._ts_query_new(\n language[0],\n sourceAddress,\n sourceLength,\n TRANSFER_BUFFER,\n TRANSFER_BUFFER + SIZE_OF_INT\n );\n if (!address) {\n const errorId = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const errorByte = C.getValue(TRANSFER_BUFFER, \"i32\");\n const errorIndex = C.UTF8ToString(sourceAddress, errorByte).length;\n const suffix = source.slice(errorIndex, errorIndex + 100).split(\"\\n\")[0];\n const word = suffix.match(QUERY_WORD_REGEX)?.[0] ?? \"\";\n C._free(sourceAddress);\n switch (errorId) {\n case QueryErrorKind.Syntax:\n throw new QueryError(QueryErrorKind.Syntax, { suffix: `${errorIndex}: '${suffix}'...` }, errorIndex, 0);\n case QueryErrorKind.NodeName:\n throw new QueryError(errorId, { word }, errorIndex, word.length);\n case QueryErrorKind.FieldName:\n throw new QueryError(errorId, { word }, errorIndex, word.length);\n case QueryErrorKind.CaptureName:\n throw new QueryError(errorId, { word }, errorIndex, word.length);\n case QueryErrorKind.PatternStructure:\n throw new QueryError(errorId, { suffix: `${errorIndex}: '${suffix}'...` }, errorIndex, 0);\n }\n }\n const stringCount = C._ts_query_string_count(address);\n const captureCount = C._ts_query_capture_count(address);\n const patternCount = C._ts_query_pattern_count(address);\n const captureNames = new Array(captureCount);\n const captureQuantifiers = new Array(patternCount);\n const stringValues = new Array(stringCount);\n for (let i2 = 0; i2 < captureCount; i2++) {\n const nameAddress = C._ts_query_capture_name_for_id(\n address,\n i2,\n TRANSFER_BUFFER\n );\n const nameLength = C.getValue(TRANSFER_BUFFER, \"i32\");\n captureNames[i2] = C.UTF8ToString(nameAddress, nameLength);\n }\n for (let i2 = 0; i2 < patternCount; i2++) {\n const captureQuantifiersArray = new Array(captureCount);\n for (let j = 0; j < captureCount; j++) {\n const quantifier = C._ts_query_capture_quantifier_for_id(address, i2, j);\n captureQuantifiersArray[j] = quantifier;\n }\n captureQuantifiers[i2] = captureQuantifiersArray;\n }\n for (let i2 = 0; i2 < stringCount; i2++) {\n const valueAddress = C._ts_query_string_value_for_id(\n address,\n i2,\n TRANSFER_BUFFER\n );\n const nameLength = C.getValue(TRANSFER_BUFFER, \"i32\");\n stringValues[i2] = C.UTF8ToString(valueAddress, nameLength);\n }\n const setProperties = new Array(patternCount);\n const assertedProperties = new Array(patternCount);\n const refutedProperties = new Array(patternCount);\n const predicates = new Array(patternCount);\n const textPredicates = new Array(patternCount);\n for (let i2 = 0; i2 < patternCount; i2++) {\n const predicatesAddress = C._ts_query_predicates_for_pattern(address, i2, TRANSFER_BUFFER);\n const stepCount = C.getValue(TRANSFER_BUFFER, \"i32\");\n predicates[i2] = [];\n textPredicates[i2] = [];\n const steps = new Array();\n let stepAddress = predicatesAddress;\n for (let j = 0; j < stepCount; j++) {\n const stepType = C.getValue(stepAddress, \"i32\");\n stepAddress += SIZE_OF_INT;\n const stepValueId = C.getValue(stepAddress, \"i32\");\n stepAddress += SIZE_OF_INT;\n parsePattern(\n i2,\n stepType,\n stepValueId,\n captureNames,\n stringValues,\n steps,\n textPredicates,\n predicates,\n setProperties,\n assertedProperties,\n refutedProperties\n );\n }\n Object.freeze(textPredicates[i2]);\n Object.freeze(predicates[i2]);\n Object.freeze(setProperties[i2]);\n Object.freeze(assertedProperties[i2]);\n Object.freeze(refutedProperties[i2]);\n }\n C._free(sourceAddress);\n this[0] = address;\n this.captureNames = captureNames;\n this.captureQuantifiers = captureQuantifiers;\n this.textPredicates = textPredicates;\n this.predicates = predicates;\n this.setProperties = setProperties;\n this.assertedProperties = assertedProperties;\n this.refutedProperties = refutedProperties;\n this.exceededMatchLimit = false;\n }\n /** Delete the query, freeing its resources. */\n delete() {\n C._ts_query_delete(this[0]);\n this[0] = 0;\n }\n /**\n * Iterate over all of the matches in the order that they were found.\n *\n * Each match contains the index of the pattern that matched, and a list of\n * captures. Because multiple patterns can match the same set of nodes,\n * one match may contain captures that appear *before* some of the\n * captures from a previous match.\n *\n * @param {Node} node - The node to execute the query on.\n *\n * @param {QueryOptions} options - Options for query execution.\n */\n matches(node, options = {}) {\n const startPosition = options.startPosition ?? ZERO_POINT;\n const endPosition = options.endPosition ?? ZERO_POINT;\n const startIndex = options.startIndex ?? 0;\n const endIndex = options.endIndex ?? 0;\n const startContainingPosition = options.startContainingPosition ?? ZERO_POINT;\n const endContainingPosition = options.endContainingPosition ?? ZERO_POINT;\n const startContainingIndex = options.startContainingIndex ?? 0;\n const endContainingIndex = options.endContainingIndex ?? 0;\n const matchLimit = options.matchLimit ?? 4294967295;\n const maxStartDepth = options.maxStartDepth ?? 4294967295;\n const progressCallback = options.progressCallback;\n if (typeof matchLimit !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n this.matchLimit = matchLimit;\n if (endIndex !== 0 && startIndex > endIndex) {\n throw new Error(\"`startIndex` cannot be greater than `endIndex`\");\n }\n if (endPosition !== ZERO_POINT && (startPosition.row > endPosition.row || startPosition.row === endPosition.row && startPosition.column > endPosition.column)) {\n throw new Error(\"`startPosition` cannot be greater than `endPosition`\");\n }\n if (endContainingIndex !== 0 && startContainingIndex > endContainingIndex) {\n throw new Error(\"`startContainingIndex` cannot be greater than `endContainingIndex`\");\n }\n if (endContainingPosition !== ZERO_POINT && (startContainingPosition.row > endContainingPosition.row || startContainingPosition.row === endContainingPosition.row && startContainingPosition.column > endContainingPosition.column)) {\n throw new Error(\"`startContainingPosition` cannot be greater than `endContainingPosition`\");\n }\n if (progressCallback) {\n C.currentQueryProgressCallback = progressCallback;\n }\n marshalNode(node);\n C._ts_query_matches_wasm(\n this[0],\n node.tree[0],\n startPosition.row,\n startPosition.column,\n endPosition.row,\n endPosition.column,\n startIndex,\n endIndex,\n startContainingPosition.row,\n startContainingPosition.column,\n endContainingPosition.row,\n endContainingPosition.column,\n startContainingIndex,\n endContainingIndex,\n matchLimit,\n maxStartDepth\n );\n const rawCount = C.getValue(TRANSFER_BUFFER, \"i32\");\n const startAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const didExceedMatchLimit = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, \"i32\");\n const result = new Array(rawCount);\n this.exceededMatchLimit = Boolean(didExceedMatchLimit);\n let filteredCount = 0;\n let address = startAddress;\n for (let i2 = 0; i2 < rawCount; i2++) {\n const patternIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captureCount = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captures = new Array(captureCount);\n address = unmarshalCaptures(this, node.tree, address, patternIndex, captures);\n if (this.textPredicates[patternIndex].every((p) => p(captures))) {\n result[filteredCount] = { patternIndex, captures };\n const setProperties = this.setProperties[patternIndex];\n result[filteredCount].setProperties = setProperties;\n const assertedProperties = this.assertedProperties[patternIndex];\n result[filteredCount].assertedProperties = assertedProperties;\n const refutedProperties = this.refutedProperties[patternIndex];\n result[filteredCount].refutedProperties = refutedProperties;\n filteredCount++;\n }\n }\n result.length = filteredCount;\n C._free(startAddress);\n C.currentQueryProgressCallback = null;\n return result;\n }\n /**\n * Iterate over all of the individual captures in the order that they\n * appear.\n *\n * This is useful if you don't care about which pattern matched, and just\n * want a single, ordered sequence of captures.\n *\n * @param {Node} node - The node to execute the query on.\n *\n * @param {QueryOptions} options - Options for query execution.\n */\n captures(node, options = {}) {\n const startPosition = options.startPosition ?? ZERO_POINT;\n const endPosition = options.endPosition ?? ZERO_POINT;\n const startIndex = options.startIndex ?? 0;\n const endIndex = options.endIndex ?? 0;\n const startContainingPosition = options.startContainingPosition ?? ZERO_POINT;\n const endContainingPosition = options.endContainingPosition ?? ZERO_POINT;\n const startContainingIndex = options.startContainingIndex ?? 0;\n const endContainingIndex = options.endContainingIndex ?? 0;\n const matchLimit = options.matchLimit ?? 4294967295;\n const maxStartDepth = options.maxStartDepth ?? 4294967295;\n const progressCallback = options.progressCallback;\n if (typeof matchLimit !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n this.matchLimit = matchLimit;\n if (endIndex !== 0 && startIndex > endIndex) {\n throw new Error(\"`startIndex` cannot be greater than `endIndex`\");\n }\n if (endPosition !== ZERO_POINT && (startPosition.row > endPosition.row || startPosition.row === endPosition.row && startPosition.column > endPosition.column)) {\n throw new Error(\"`startPosition` cannot be greater than `endPosition`\");\n }\n if (endContainingIndex !== 0 && startContainingIndex > endContainingIndex) {\n throw new Error(\"`startContainingIndex` cannot be greater than `endContainingIndex`\");\n }\n if (endContainingPosition !== ZERO_POINT && (startContainingPosition.row > endContainingPosition.row || startContainingPosition.row === endContainingPosition.row && startContainingPosition.column > endContainingPosition.column)) {\n throw new Error(\"`startContainingPosition` cannot be greater than `endContainingPosition`\");\n }\n if (progressCallback) {\n C.currentQueryProgressCallback = progressCallback;\n }\n marshalNode(node);\n C._ts_query_captures_wasm(\n this[0],\n node.tree[0],\n startPosition.row,\n startPosition.column,\n endPosition.row,\n endPosition.column,\n startIndex,\n endIndex,\n startContainingPosition.row,\n startContainingPosition.column,\n endContainingPosition.row,\n endContainingPosition.column,\n startContainingIndex,\n endContainingIndex,\n matchLimit,\n maxStartDepth\n );\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const startAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const didExceedMatchLimit = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, \"i32\");\n const result = new Array();\n this.exceededMatchLimit = Boolean(didExceedMatchLimit);\n const captures = new Array();\n let address = startAddress;\n for (let i2 = 0; i2 < count; i2++) {\n const patternIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captureCount = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captureIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n captures.length = captureCount;\n address = unmarshalCaptures(this, node.tree, address, patternIndex, captures);\n if (this.textPredicates[patternIndex].every((p) => p(captures))) {\n const capture = captures[captureIndex];\n const setProperties = this.setProperties[patternIndex];\n capture.setProperties = setProperties;\n const assertedProperties = this.assertedProperties[patternIndex];\n capture.assertedProperties = assertedProperties;\n const refutedProperties = this.refutedProperties[patternIndex];\n capture.refutedProperties = refutedProperties;\n result.push(capture);\n }\n }\n C._free(startAddress);\n C.currentQueryProgressCallback = null;\n return result;\n }\n /** Get the predicates for a given pattern. */\n predicatesForPattern(patternIndex) {\n return this.predicates[patternIndex];\n }\n /**\n * Disable a certain capture within a query.\n *\n * This prevents the capture from being returned in matches, and also\n * avoids any resource usage associated with recording the capture.\n */\n disableCapture(captureName) {\n const captureNameLength = C.lengthBytesUTF8(captureName);\n const captureNameAddress = C._malloc(captureNameLength + 1);\n C.stringToUTF8(captureName, captureNameAddress, captureNameLength + 1);\n C._ts_query_disable_capture(this[0], captureNameAddress, captureNameLength);\n C._free(captureNameAddress);\n }\n /**\n * Disable a certain pattern within a query.\n *\n * This prevents the pattern from matching, and also avoids any resource\n * usage associated with the pattern. This throws an error if the pattern\n * index is out of bounds.\n */\n disablePattern(patternIndex) {\n if (patternIndex >= this.predicates.length) {\n throw new Error(\n `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}`\n );\n }\n C._ts_query_disable_pattern(this[0], patternIndex);\n }\n /**\n * Check if, on its last execution, this cursor exceeded its maximum number\n * of in-progress matches.\n */\n didExceedMatchLimit() {\n return this.exceededMatchLimit;\n }\n /** Get the byte offset where the given pattern starts in the query's source. */\n startIndexForPattern(patternIndex) {\n if (patternIndex >= this.predicates.length) {\n throw new Error(\n `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}`\n );\n }\n return C._ts_query_start_byte_for_pattern(this[0], patternIndex);\n }\n /** Get the byte offset where the given pattern ends in the query's source. */\n endIndexForPattern(patternIndex) {\n if (patternIndex >= this.predicates.length) {\n throw new Error(\n `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}`\n );\n }\n return C._ts_query_end_byte_for_pattern(this[0], patternIndex);\n }\n /** Get the number of patterns in the query. */\n patternCount() {\n return C._ts_query_pattern_count(this[0]);\n }\n /** Get the index for a given capture name. */\n captureIndexForName(captureName) {\n return this.captureNames.indexOf(captureName);\n }\n /** Check if a given pattern within a query has a single root node. */\n isPatternRooted(patternIndex) {\n return C._ts_query_is_pattern_rooted(this[0], patternIndex) === 1;\n }\n /** Check if a given pattern within a query has a single root node. */\n isPatternNonLocal(patternIndex) {\n return C._ts_query_is_pattern_non_local(this[0], patternIndex) === 1;\n }\n /**\n * Check if a given step in a query is 'definite'.\n *\n * A query step is 'definite' if its parent pattern will be guaranteed to\n * match successfully once it reaches the step.\n */\n isPatternGuaranteedAtStep(byteIndex) {\n return C._ts_query_is_pattern_guaranteed_at_step(this[0], byteIndex) === 1;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n CaptureQuantifier,\n Edit,\n LANGUAGE_VERSION,\n Language,\n LookaheadIterator,\n MIN_COMPATIBLE_VERSION,\n Node,\n Parser,\n Query,\n Tree,\n TreeCursor\n});\nmodule.exports.default = module.exports;\n//# sourceMappingURL=web-tree-sitter.cjs.map\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nlet leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tconst ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tconst def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tif(!__webpack_require__.o(exports, key)) {\n\t\t\t\tif(binding === 0) {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, value: definition[i++] });\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: binding });\n\t\t\t\t}\n\t\t\t} else if(binding === 0) { i++; }\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nlet __webpack_exports__ = __webpack_require__(186);\n"],"names":["fs","__importStar","__webpack_require__","path","Parser","Language","analyze_1","nesting_1","cyclomatic_1","cognitive_1","languages_1","types_1","printUsage","console","error","resolveThresholdOverride","override","defaults","undefined","mediumThreshold","highThreshold","async","parsed","argv","flag","name","index","indexOf","Number","filePath","find","arg","startsWith","nesting","cyclomatic","cognitive","parseArgs","process","slice","exit","adapter","resolveLanguageForFile","sourceCode","readFileSync","tree","init","parser","grammarPath","join","__dirname","grammar","load","setLanguage","loadParser","parse","violations","analyzeSource","DEFAULT_NESTING_THRESHOLDS","DEFAULT_CYCLOMATIC_THRESHOLDS","DEFAULT_COGNITIVE_THRESHOLDS","buildThresholds","log","JSON","stringify","hasBlockingViolation","some","v","severity","SEVERITY","HIGH","MEDIUM","main","catch","exports","sourceText","language","fileName","thresholds","positions","position_1","createPositionLookup","push","analyzeNesting","analyzeFunctionComplexity","analyzeCognitiveComplexity","coherence_1","analyzeFileCoherence","coherence","DEFAULT_COHERENCE_THRESHOLDS","magicNumber_1","analyzeMagicNumbers","magicNumber","DEFAULT_MAGIC_NUMBER_OPTIONS","magicString_1","analyzeMagicStrings","magicString","DEFAULT_MAGIC_STRING_OPTIONS","parameterCount_1","analyzeParameterCount","inversion_1","analyzeInversionOpportunities","primitiveObsession_1","analyzePrimitiveObsession","matchOpportunity_1","analyzeMatchOpportunities","matchOpportunity","DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS","logicalControlFlow_1","analyzeLogicalControlFlow","opaqueBoolean_1","analyzeOpaqueBooleanLiteral","traverse","node","isFunctionDefinition","complexity","calculateCognitiveComplexity","position","toPosition","startIndex","line","column","type","VIOLATION_TYPE","COGNITIVE","message","hotspots","findCognitiveHotspots","child","children","rootNode","functionNode","onContribution","score","nodeTypes","add","amount","walkNested","walk","entersNestedScope","booleanOperator","getBooleanOperator","parent","cognitiveNestedDecisionTypes","includes","elseClause","conditionalExpression","lambda","weight","functions","imports","importStatement","importFromStatement","text","collectFunctionsAndImports","checkFunctionCountSprawl","checkLargeFunctionSprawl","checkImportSprawl","filter","violation","leadingNameWord","nameNode","c","match","exec","toLowerCase","length","baseName","split","pop","isUtilsFile","singleDomain","minShare","leadingWords","map","word","wordCounts","Map","set","get","Math","max","values","looksLikeSingleDomain","singleDomainNameShare","COHERENCE","largeFunctions","fn","lineCount","endPosition","row","startPosition","largeFunctionLines","maxLargeFunctions","countDecisionPoints","isRoot","decisionNodeTypes","isTryElseClause","calculateCyclomaticComplexity","COMPLEXITY","findCyclomaticHotspots","depth","nextDepth","body","block","statements","isNamed","comment","trim","firstStatement","ifStatement","ifBody","totalLines","endIndex","INVERSION","currentNode","nestingLevel","validationChecks","nestingControlTypes","firstCheck","analyzeNestedValidation","maxNesting","nestedIfLocation","countNesting","currentDepth","analyzeNestedIfs","analyzeFunction","operator","expressionStatement","LOGICAL_CONTROL_FLOW","LOW","options","enabled","hasEnclosingFunction","assignmentNode","ancestor","integerLiteral","floatLiteral","rawValue","parseFloat","isNaN","value","signedValue","allowlist","assignment","grandparent","module","exportStatement","isInConstantContext","subscriptNodeTypes","isIndexPosition","isDefaultParameterValue","MAGIC","candidates","stringLiteral","content","Boolean","candidate","getEqualityComparisons","left","right","id","isEqualityComparisonOperand","container","getMembershipComparisons","isMembershipOperand","isKeyOrIndexPosition","isDecisionPoint","isDocstring","isFormattedOrInterpolatedString","isExempt","byContent","group","minDuplicates","first","consumed","Set","has","topIfNode","branches","ifNode","flatSiblings","getElseIfBranches","current","nestedIf","collectChainBranches","forEach","branch","minBranches","perBranchDiscriminants","branchNode","otherBranches","found","isVariableRef","variableReferenceNodeTypes","isLiteral","literalValue","variable","collectBranchDiscriminants","b","discriminants","commonVariable","d","every","MATCH_OPPORTUNITY","analyzeChain","NESTING","isBooleanLiteral","isPositionalCallArgument","OPAQUE_BOOLEAN","buildViolation","findParametersNode","params","parameters","paramCount","parameterChildTypes","PARAMETERS","parametersType","paramsNode","keywordOnly","typed","n","keywordOnlyBoundaryTypes","extracted","extractTypedParameter","i","a","primitiveTypeNames","PRIMITIVE_OBSESSION","distinctTypeAdvice","findParameterCollisions","valuesByVariable","firstOccurrence","record","varNode","key","stripQuotes","size","sample","Array","from","findStringlyTypedControlFlow","lineStartOffsets","offset","low","high","mid","ceil","FSHARP","forStatement","whileStatement","opToken","patternNode","typeNode","operands","rawRight","dotIndex","lastIndexOf","extension","languageId","EXTENSION_TO_LANGUAGE_ID","Y","python_1","fsharp_1","typescript_1","python","PYTHON","fsharp","typescript","TYPESCRIPT","results","allStrings","methodName","typeAnnotation","NAMING","require","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__name","target","configurable","__commonJS","cb","mod","__export","all","name2","enumerable","__copyProps","to","except","desc","call","__toESM","isNodeMode","__esModule","__toCommonJS","require_web_tree_sitter","Module","_scriptName","document","currentScript","src","moduleArg","moduleRtn","ENVIRONMENT_IS_WEB","window","ENVIRONMENT_IS_WORKER","WorkerGlobalScope","ENVIRONMENT_IS_NODE","versions","currentQueryProgressCallback","currentProgressCallback","currentLogCallback","currentParseCallback","arguments_","thisProgram","quit_","status","toThrow","__filename","scriptDirectory","readAsync","readBinary","locateFile","filename","isFileURI","URL","binary2","replace","exitCode","href","url","xhr","XMLHttpRequest","open","responseType","send","Uint8Array","response","Promise","resolve","reject","onload","onerror","fetch","credentials","ok","arrayBuffer","Error","out","bind","err","dynamicLibraries","wasmBinary","ABORT","EXITSTATUS","readyPromiseResolve","readyPromiseReject","wasmMemory","HEAP8","HEAPU8","HEAP16","HEAPU16","HEAP32","HEAPU32","HEAPF32","HEAPF64","HEAP64","HEAPU64","HEAP_DATA_VIEW","runtimeInitialized","updateMemoryViews","buffer","Int8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","LE_HEAP_UPDATE","initMemory","INITIAL_MEMORY","WebAssembly","Memory","initial","maximum","__RELOC_FUNCS__","wasmBinaryFile","preRun","addOnPreRun","shift","callRuntimeCallbacks","onPreRuns","initRuntime","wasmExports","onPostCtors","preMain","postRun","addOnPostRun","onPostRuns","abort","what","e","RuntimeError","findWasmBinary","getBinarySync","file","getWasmBinary","binaryFile","instantiateArrayBuffer","instantiate","reason","instantiateAsync","instantiateStreaming","getWasmImports","env","wasmImports","wasi_snapshot_preview1","Proxy","GOTHandler","createWasm","receiveInstance","instance2","module2","relocateExports","metadata2","getDylinkMetadata","neededDynlibs","concat","mergeLibSymbols","LDSO","loadDylibs","assignWasmExports","receiveInstantiationResult","result2","info2","inst","ExitStatus","this","constructor","GOT","currentModuleWeakSymbols","obj","symName","rtn","Global","mutable","required","LE_ATOMICS_NATIVE_BYTE_ORDER","LE_HEAP_LOAD_F32","byteOffset","getFloat32","LE_HEAP_LOAD_F64","getFloat64","LE_HEAP_LOAD_I16","getInt16","LE_HEAP_LOAD_I32","getInt32","LE_HEAP_LOAD_I64","getBigInt64","LE_HEAP_LOAD_U32","getUint32","LE_HEAP_STORE_F32","setFloat32","LE_HEAP_STORE_F64","setFloat64","LE_HEAP_STORE_I16","setInt16","LE_HEAP_STORE_I32","setInt32","LE_HEAP_STORE_I64","setBigInt64","LE_HEAP_STORE_U32","setUint32","callbacks","UTF8Decoder","TextDecoder","findStringEnd","heapOrArray","idx","maxBytesToRead","ignoreNul","maxIdx","UTF8ArrayToString","endPtr","decode","subarray","str","u0","u1","u2","String","fromCharCode","ch","end","getU8","getLEB","ret","mul","byte","getString","len","getStringList","count2","failIf","condition","dylinkSection","customSections","int32View","section_size","customSection","tlsExports","weakImports","runtimePaths","subsectionType","subsectionSize","memorySize","memoryAlign","tableSize","tableAlign","count","symname","getValue","ptr","endsWith","newDSO","handle2","syms","dso","refcount","Infinity","global","loadedLibsByName","loadedLibsByHandle","___heap_base","alignMemory","alignment","getMemory","_calloc","isInternalSym","uleb128EncodeWithLen","arr","wasmTypeCodes","p","j","f","generateTypePack","types","convertJsFunctionToWasm","func2","sig","bytes","of","Instance","wasmTableMirror","wasmTable","Table","element","getWasmTableEntry","funcPtr","updateTableMap","functionsInTableMap","i2","item","getFunctionAddress","WeakMap","freeTableIndexes","getEmptyTableSlot","setWasmTableEntry","addFunction","err2","TypeError","wrapped","updateGOT","exports2","memoryBase2","relocated","isSymbolDefined","existing","stub","dynCall","args2","promising","rtn2","stackSave","_emscripten_stack_get_current","stackRestore","val","__emscripten_stack_restore","createInvokeFunction","sp","_setThrew","resolveGlobalSymbol","direct","sym","addOnPostCtor","UTF8ToString","loadWebAssemblyModule","binary","flags","libName","localScope","handle","metadata","loadModule","memAlign","pow","memoryBase","tableBase","moduleExports","resolveSymbol","resolved","grow","proxyHandler","stubs","prop","proxy","info","postInstantiation","instance","addEmAsm","addr","args","arity","func","ASM_CONSTS","start","eval","allowUndefined","reportUndefinedSymbols","stop","jsString","addEmJs","cSig","jsArgs","jsArg","parts","applyRelocs","loadAsync","rpath","parentLibPath","paths","reduce","chain","dynNeeded","then","loadDynamicLibrary","needed","libName2","exp","entries","setImport","main_alias","asyncLoad","flags2","nodelete","localScope2","assign","loadLibData","data","dataSize","libData","libFile","getExports","moduleLoaded","entry","runDependencies","dependenciesFulfilled","removeRunDependency","callback","addRunDependency","lib","noExitRuntime","setValue","BigInt","___memory_base","___stack_high","___stack_low","___stack_pointer","___table_base","__abort_js","getHeapMax","growMemory","pages","byteLength","_emscripten_resize_heap","requestedSize","oldSize","maxHeapSize","cutDown","overGrownHeapSize","min","newSize","_fd_close","fd","INT53_MAX","INT53_MIN","bigintToI53Checked","num","NaN","_fd_seek","whence","newOffset","printCharBuffers","printChar","stream","curr","_fd_write","iov","iovcnt","pnum","_tree_sitter_log_callback","isLexMessage","messageAddress","_tree_sitter_parse_callback","inputBufferAddress","lengthAddress","string","stringToUTF16","_tree_sitter_progress_callback","currentOffset","hasError","_tree_sitter_query_progress_callback","runtimeKeepaliveCounter","keepRuntimeAlive","_proc_exit","code","exitJS","implicit","handleException","lengthBytesUTF8","charCodeAt","stringToUTF8Array","heap","outIdx","maxBytesToWrite","startIdx","endIdx","u","codePointAt","stringToUTF8","outPtr","stackAlloc","sz","__emscripten_stack_alloc","stringToUTF8OnStack","AsciiToString","startPtr","numCharsToWrite","codeUnit","unsigned","x","_malloc","_realloc","_free","_ts_range_edit","_memcmp","_ts_language_symbol_count","_ts_language_state_count","_ts_language_abi_version","_ts_language_name","_ts_language_field_count","_ts_language_next_state","_ts_language_symbol_name","_ts_language_symbol_for_name","_strncmp","_ts_language_symbol_type","_ts_language_field_name_for_id","_ts_lookahead_iterator_new","_ts_lookahead_iterator_delete","_ts_lookahead_iterator_reset_state","_ts_lookahead_iterator_reset","_ts_lookahead_iterator_next","_ts_lookahead_iterator_current_symbol","_ts_point_edit","_ts_parser_delete","_ts_parser_reset","_ts_parser_set_language","_ts_parser_set_included_ranges","_ts_query_new","_ts_query_delete","_iswspace","_iswalnum","_ts_query_pattern_count","_ts_query_capture_count","_ts_query_string_count","_ts_query_capture_name_for_id","_ts_query_capture_quantifier_for_id","_ts_query_string_value_for_id","_ts_query_predicates_for_pattern","_ts_query_start_byte_for_pattern","_ts_query_end_byte_for_pattern","_ts_query_is_pattern_rooted","_ts_query_is_pattern_non_local","_ts_query_is_pattern_guaranteed_at_step","_ts_query_disable_capture","_ts_query_disable_pattern","_ts_tree_copy","_ts_tree_delete","_ts_init","_ts_parser_new_wasm","_ts_parser_enable_logger_wasm","_ts_parser_parse_wasm","_ts_parser_included_ranges_wasm","_ts_language_type_is_named_wasm","_ts_language_type_is_visible_wasm","_ts_language_metadata_wasm","_ts_language_supertypes_wasm","_ts_language_subtypes_wasm","_ts_tree_root_node_wasm","_ts_tree_root_node_with_offset_wasm","_ts_tree_edit_wasm","_ts_tree_included_ranges_wasm","_ts_tree_get_changed_ranges_wasm","_ts_tree_cursor_new_wasm","_ts_tree_cursor_copy_wasm","_ts_tree_cursor_delete_wasm","_ts_tree_cursor_reset_wasm","_ts_tree_cursor_reset_to_wasm","_ts_tree_cursor_goto_first_child_wasm","_ts_tree_cursor_goto_last_child_wasm","_ts_tree_cursor_goto_first_child_for_index_wasm","_ts_tree_cursor_goto_first_child_for_position_wasm","_ts_tree_cursor_goto_next_sibling_wasm","_ts_tree_cursor_goto_previous_sibling_wasm","_ts_tree_cursor_goto_descendant_wasm","_ts_tree_cursor_goto_parent_wasm","_ts_tree_cursor_current_node_type_id_wasm","_ts_tree_cursor_current_node_state_id_wasm","_ts_tree_cursor_current_node_is_named_wasm","_ts_tree_cursor_current_node_is_missing_wasm","_ts_tree_cursor_current_node_id_wasm","_ts_tree_cursor_start_position_wasm","_ts_tree_cursor_end_position_wasm","_ts_tree_cursor_start_index_wasm","_ts_tree_cursor_end_index_wasm","_ts_tree_cursor_current_field_id_wasm","_ts_tree_cursor_current_depth_wasm","_ts_tree_cursor_current_descendant_index_wasm","_ts_tree_cursor_current_node_wasm","_ts_node_symbol_wasm","_ts_node_field_name_for_child_wasm","_ts_node_field_name_for_named_child_wasm","_ts_node_children_by_field_id_wasm","_ts_node_first_child_for_byte_wasm","_ts_node_first_named_child_for_byte_wasm","_ts_node_grammar_symbol_wasm","_ts_node_child_count_wasm","_ts_node_named_child_count_wasm","_ts_node_child_wasm","_ts_node_named_child_wasm","_ts_node_child_by_field_id_wasm","_ts_node_next_sibling_wasm","_ts_node_prev_sibling_wasm","_ts_node_next_named_sibling_wasm","_ts_node_prev_named_sibling_wasm","_ts_node_descendant_count_wasm","_ts_node_parent_wasm","_ts_node_child_with_descendant_wasm","_ts_node_descendant_for_index_wasm","_ts_node_named_descendant_for_index_wasm","_ts_node_descendant_for_position_wasm","_ts_node_named_descendant_for_position_wasm","_ts_node_start_point_wasm","_ts_node_end_point_wasm","_ts_node_start_index_wasm","_ts_node_end_index_wasm","_ts_node_to_string_wasm","_ts_node_children_wasm","_ts_node_named_children_wasm","_ts_node_descendants_of_type_wasm","_ts_node_is_named_wasm","_ts_node_has_changes_wasm","_ts_node_has_error_wasm","_ts_node_is_error_wasm","_ts_node_is_missing_wasm","_ts_node_is_extra_wasm","_ts_node_parse_state_wasm","_ts_node_next_parse_state_wasm","_ts_query_matches_wasm","_ts_query_captures_wasm","_memset","_memcpy","_memmove","_iswalpha","_iswblank","_iswdigit","_iswlower","_iswupper","_iswxdigit","_memchr","_strlen","_strcmp","_strncat","_strncpy","_towlower","_towupper","___wasm_apply_data_relocs","wasmExports2","__heap_base","__indirect_function_table","__memory_base","__stack_high","__stack_low","__stack_pointer","__table_base","_abort_js","emscripten_resize_heap","fd_close","fd_seek","fd_write","memory","tree_sitter_log_callback","tree_sitter_parse_callback","tree_sitter_progress_callback","tree_sitter_query_progress_callback","callMain","entryFunction","unshift","argc","argv_ptr","run","doRun","setTimeout","default","apply","index_exports","CaptureQuantifier","Edit","LANGUAGE_VERSION","LookaheadIterator","MIN_COMPATIBLE_VERSION","Node","Query","Tree","TreeCursor","oldEndPosition","newEndPosition","oldEndIndex","newEndIndex","editPoint","point","newIndex","newPoint","originalRow","editRange","range","newRange","MAX_SAFE_INTEGER","SIZE_OF_SHORT","SIZE_OF_INT","SIZE_OF_CURSOR","SIZE_OF_NODE","SIZE_OF_POINT","SIZE_OF_RANGE","ZERO_POINT","INTERNAL","Symbol","C","assertInternal","isPoint","setModule","internal","address","currentTypeId","currentType","reset","stateId","resetState","iterator","next","done","getText","result","textCallback","_Tree","copy","unmarshalNode","rootNodeWithOffset","offsetBytes","offsetExtent","TRANSFER_BUFFER","marshalPoint","edit","marshalEdit","getChangedRanges","other","unmarshalRange","getIncludedRanges","_TreeCursor","unmarshalTreeCursor","marshalTreeCursor","currentFieldId","currentFieldName","fields","currentDescendantIndex","nodeType","nodeTypeId","nodeStateId","nodeId","nodeIsNamed","nodeIsMissing","nodeText","unmarshalPoint","gotoFirstChild","gotoLastChild","gotoParent","gotoNextSibling","gotoPreviousSibling","gotoDescendant","goalDescendantIndex","gotoFirstChildForIndex","goalIndex","gotoFirstChildForPosition","goalPosition","marshalNode","resetTo","cursor","_children","_namedChildren","typeId","grammarId","grammarType","isExtra","isError","isMissing","hasChanges","parseState","nextParseState","equals","namedChild","childForFieldId","fieldId","childForFieldName","fieldName","fieldNameForChild","fieldNameForNamedChild","childrenForFieldName","childrenForFieldId","firstChildForIndex","firstNamedChildForIndex","childCount","namedChildCount","firstChild","firstNamedChild","lastChild","lastNamedChild","namedChildren","descendantsOfType","isArray","symbols","typesBySymbol","node_type","symbolsAddress","descendantCount","descendantAddress","nextSibling","previousSibling","nextNamedSibling","previousNamedSibling","childWithDescendant","descendant","descendantForIndex","start2","namedDescendantForIndex","descendantForPosition","namedDescendantForPosition","subbedPointRow","subbedPointColumn","toString","unmarshalCaptures","query","patternIndex","captureIndex","captureNames","marshalRange","unmarshalLanguageMetadata","major_version","minor_version","patch_version","LANGUAGE_FUNCTION_REGEX","_Language","abiVersion","fieldCount","stateCount","fieldIdForName","fieldNameForId","idForNodeType","named","typeLength","typeAddress","nodeTypeCount","nodeTypeForId","nodeTypeIsNamed","nodeTypeIsVisible","supertypes","subtypes","supertype","nextState","lookaheadIterator","input","globalThis","fs2","t","readFile","body2","retryResp","clone","compileStreaming","symbolNames","keys","functionName","test","languageAddress","import_web_tree_sitter","Module2","initializeBinding","moduleOptions","checkModule","logCallback","initialize","version","oldTree","progressCallback","rangeCount","rangeAddress","includedRanges","treeAddress","setLogger","getLogger","PREDICATE_STEP_TYPE_CAPTURE","PREDICATE_STEP_TYPE_STRING","QUERY_WORD_REGEX","Zero","ZeroOrOne","ZeroOrMore","One","OneOrMore","isCaptureStep","step","isStringStep","QueryErrorKind","Syntax","NodeName","FieldName","CaptureName","PatternStructure","QueryError","_QueryError","kind","super","formatMessage","suffix","parseAnyPredicate","steps","textPredicates","isPositive","matchAll","captureName1","captureName2","captures","nodes1","nodes2","compare","n1","n2","positive","captureName","stringValue","matches","doesNotMatch","nodes","parseMatchPredicate","regex","RegExp","parseAnyOfPredicate","stringSteps","s","parseIsPredicate","assertedProperties","refutedProperties","properties","parseSetDirective","setProperties","parsePattern","stepType","stepValueId","stringValues","predicates","exceededMatchLimit","captureQuantifiers","matchLimit","source","sourceLength","sourceAddress","errorId","errorByte","errorIndex","stringCount","captureCount","patternCount","nameAddress","nameLength","captureQuantifiersArray","quantifier","valueAddress","predicatesAddress","stepCount","stepAddress","freeze","startContainingPosition","endContainingPosition","startContainingIndex","endContainingIndex","maxStartDepth","rawCount","startAddress","didExceedMatchLimit","filteredCount","capture","predicatesForPattern","disableCapture","captureNameLength","captureNameAddress","disablePattern","startIndexForPattern","endIndexForPattern","captureIndexForName","isPatternRooted","isPatternNonLocal","isPatternGuaranteedAtStep","byteIndex","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","getProto","leafPrototypes","mode","ns","r","def","definition","binding","o","toStringTag","__webpack_exports__"],"sourceRoot":""}
1
+ {"version":3,"file":"cli.js","mappings":";o4BASA,MAAAA,EAAAC,EAAAC,EAAA,MAGAC,EAAAD,EAAA,KACAE,EAAAF,EAAA,KACAG,EAAAH,EAAA,IACAI,EAAAJ,EAAA,KAKMK,EAAc,CAChB,WACA,SACA,iBACA,eACA,oBACA,kBACA,mBACA,kBAmDJ,SAASC,EACLC,EACAC,GAEA,QAAiCC,IAA7BF,EAASG,sBAA4DD,IAA3BF,EAASI,cAGvD,MAAO,IACAH,EACHE,gBAAiBH,EAASG,iBAAmBF,EAASE,gBACtDC,cAAeJ,EAASI,eAAiBH,EAASG,cAE1D,EAUAC,iBACI,MAAMC,EAvEV,SAAmBC,GACf,MAAMC,EAAkB,GAClBC,EAAa,IAAIC,IAEvB,IAAK,IAAIC,EAAI,EAAGA,EAAIJ,EAAKK,OAAQD,IAAK,CAClC,MAAME,EAAMN,EAAKI,GACjB,GAAIE,EAAIC,WAAW,MAAO,CACtB,MAAMC,EAAOF,EAAIG,MAAM,GACnBlB,EAAYmB,SAASF,KACrBN,EAAWS,IAAIH,EAAMR,EAAKI,EAAI,IAC9BA,IAER,MACIH,EAAMW,KAAKN,EAEnB,CAEA,MAAMO,EAAQL,GAAqCN,EAAWY,IAAIN,GAC5DO,EAAcP,IAChB,MAAMQ,EAAQH,EAAKL,GACnB,YAAiBb,IAAVqB,EAAsBC,OAAOD,QAASrB,GAGjD,MAAO,CACHM,QACAiB,QAASL,EAAK,YACdM,OAAQN,EAAK,UACbO,QAAS,CACLxB,gBAAiBmB,EAAW,kBAC5Bl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QAAA2L,GAEA,IADA,IAAA1+C,EAAA,EACAA,EAAA0+C,EAAAz+C,QAAA,CACA,IAAAuX,EAAAknC,EAAA1+C,KACA2+C,EAAAD,EAAA1+C,KACAlB,oBAAA8/C,EAAAr8C,EAAAiV,GAMK,IAAAmnC,GAAyB3+C,IAL9B,IAAA2+C,EACAv+B,OAAAuC,eAAApgB,EAAAiV,EAAA,CAA2CsM,YAAA,EAAAljB,MAAA89C,EAAA1+C,OAE3CogB,OAAAuC,eAAApgB,EAAAiV,EAAA,CAA2CsM,YAAA,EAAApjB,IAAAi+C,GAG3C,MAEA,QAAAnnC,KAAAknC,EACA5/C,oBAAA8/C,EAAAF,EAAAlnC,KAAA1Y,oBAAA8/C,EAAAr8C,EAAAiV,IACA4I,OAAAuC,eAAApgB,EAAAiV,EAAA,CAA0CsM,YAAA,EAAApjB,IAAAg+C,EAAAlnC,MClB1C1Y,oBAAA8/C,EAAA,CAAAlxB,EAAAyK,IAAA/X,OAAA+C,UAAAC,eAAAe,KAAAuJ,EAAAyK,GCCAr5B,oBAAAoc,EAAA3Y,IACA8qC,OAAAwR,aACAz+B,OAAAuC,eAAApgB,EAAA8qC,OAAAwR,YAAA,CAAuDj+C,MAAA,WAEvDwf,OAAAuC,eAAApgB,EAAA,cAAgD3B,OAAA,KCFhD,IAAAk+C,oBAAAhgD,oBAAA","sources":["webpack://energy-state-analyzer/./src/cli.ts","webpack://energy-state-analyzer/./src/cliModes.ts","webpack://energy-state-analyzer/./src/core/analyze.ts","webpack://energy-state-analyzer/./src/core/detectors/cognitive.ts","webpack://energy-state-analyzer/./src/core/detectors/coherence.ts","webpack://energy-state-analyzer/./src/core/detectors/cyclomatic.ts","webpack://energy-state-analyzer/./src/core/detectors/inversion.ts","webpack://energy-state-analyzer/./src/core/detectors/logicalControlFlow.ts","webpack://energy-state-analyzer/./src/core/detectors/magicNumber.ts","webpack://energy-state-analyzer/./src/core/detectors/magicString.ts","webpack://energy-state-analyzer/./src/core/detectors/matchOpportunity.ts","webpack://energy-state-analyzer/./src/core/detectors/nesting.ts","webpack://energy-state-analyzer/./src/core/detectors/opaqueBoolean.ts","webpack://energy-state-analyzer/./src/core/detectors/parameterCount.ts","webpack://energy-state-analyzer/./src/core/detectors/primitiveObsession.ts","webpack://energy-state-analyzer/./src/core/esaignore.ts","webpack://energy-state-analyzer/./src/core/position.ts","webpack://energy-state-analyzer/./src/core/report.ts","webpack://energy-state-analyzer/./src/core/reportDiff.ts","webpack://energy-state-analyzer/./src/core/reportHuman.ts","webpack://energy-state-analyzer/./src/core/scan.ts","webpack://energy-state-analyzer/./src/core/severityCounts.ts","webpack://energy-state-analyzer/./src/core/suppressions.ts","webpack://energy-state-analyzer/./src/languages/fsharp.ts","webpack://energy-state-analyzer/./src/languages/index.ts","webpack://energy-state-analyzer/./src/languages/kotlin.ts","webpack://energy-state-analyzer/./src/languages/python.ts","webpack://energy-state-analyzer/./src/languages/typescript.ts","webpack://energy-state-analyzer/./src/types.ts","webpack://energy-state-analyzer/external node-commonjs \"child_process\"","webpack://energy-state-analyzer/external node-commonjs \"fs\"","webpack://energy-state-analyzer/external node-commonjs \"fs/promises\"","webpack://energy-state-analyzer/external node-commonjs \"path\"","webpack://energy-state-analyzer/./node_modules/web-tree-sitter/web-tree-sitter.cjs","webpack://energy-state-analyzer/webpack/bootstrap","webpack://energy-state-analyzer/webpack/runtime/create fake namespace object","webpack://energy-state-analyzer/webpack/runtime/define property getters","webpack://energy-state-analyzer/webpack/runtime/hasOwnProperty shorthand","webpack://energy-state-analyzer/webpack/runtime/make namespace object","webpack://energy-state-analyzer/webpack/startup"],"sourcesContent":["#!/usr/bin/env node\n// Headless entry point: run the same detectors the extension uses, without\n// vscode, so an external process (e.g. an AI coding agent or a CI job) can\n// gate on complexity without opening an editor.\n//\n// decision: exits 1 when any medium-or-high violation is found, not just high — CI/agent gating wants a single boolean signal, and severity is already visible in the emitted JSON for anyone who wants to discriminate further\n// invariant: `energy-state-cli <single-file>` with no other flags keeps printing the flat\n// EnergyViolation[] JSON array it always has — this is the published npm CLI contract\n// (README's \"Command-Line Usage\"), and scan/diff mode are additive, not a replacement for it\nimport * as fs from 'fs';\n\nimport { AnalyzeThresholds } from './core/analyze';\nimport { DEFAULT_NESTING_THRESHOLDS } from './core/detectors/nesting';\nimport { DEFAULT_CYCLOMATIC_THRESHOLDS } from './core/detectors/cyclomatic';\nimport { DEFAULT_COGNITIVE_THRESHOLDS } from './core/detectors/cognitive';\nimport { printUsage, runDiff, runLegacySingleFile, runScan, ReportFormat } from './cliModes';\n\n// decision: every flag recognized here (including --base-ref/--report) takes exactly one\n// value, so a positional path list can be recovered by skipping each `--flag value` pair\n// rather than needing a real argument-parsing library\nconst VALUE_FLAGS = [\n 'base-ref',\n 'report',\n 'medium-nesting',\n 'high-nesting',\n 'medium-cyclomatic',\n 'high-cyclomatic',\n 'medium-cognitive',\n 'high-cognitive'\n];\n\nfunction parseArgs(argv: string[]) {\n const paths: string[] = [];\n const flagValues = new Map<string, string>();\n\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i];\n if (arg.startsWith('--')) {\n const name = arg.slice(2);\n if (VALUE_FLAGS.includes(name)) {\n flagValues.set(name, argv[i + 1]);\n i++;\n }\n } else {\n paths.push(arg);\n }\n }\n\n const flag = (name: string): string | undefined => flagValues.get(name);\n const numberFlag = (name: string): number | undefined => {\n const value = flag(name);\n return value !== undefined ? Number(value) : undefined;\n };\n\n return {\n paths,\n baseRef: flag('base-ref'),\n report: flag('report') as ReportFormat | undefined,\n nesting: {\n mediumThreshold: numberFlag('medium-nesting'),\n highThreshold: numberFlag('high-nesting')\n },\n cyclomatic: {\n mediumThreshold: numberFlag('medium-cyclomatic'),\n highThreshold: numberFlag('high-cyclomatic')\n },\n cognitive: {\n mediumThreshold: numberFlag('medium-cognitive'),\n highThreshold: numberFlag('high-cognitive')\n }\n };\n}\n\ntype ThresholdOverride = { mediumThreshold?: number; highThreshold?: number };\n\n// decision: returns undefined (not the detector's own default) when neither flag was passed —\n// analyzeSource already falls back to each detector's own DEFAULT_*_THRESHOLDS when its entry is\n// undefined, so resolving the default here too would just be a second place that default could\n// drift out of sync with the detector module that owns it\nfunction resolveThresholdOverride<T extends ThresholdOverride>(\n override: ThresholdOverride,\n defaults: T\n): T | undefined {\n if (override.mediumThreshold === undefined && override.highThreshold === undefined) {\n return undefined;\n }\n return {\n ...defaults,\n mediumThreshold: override.mediumThreshold ?? defaults.mediumThreshold,\n highThreshold: override.highThreshold ?? defaults.highThreshold\n };\n}\n\nfunction buildThresholds(parsed: ReturnType<typeof parseArgs>): AnalyzeThresholds {\n return {\n nesting: resolveThresholdOverride(parsed.nesting, DEFAULT_NESTING_THRESHOLDS),\n cyclomatic: resolveThresholdOverride(parsed.cyclomatic, DEFAULT_CYCLOMATIC_THRESHOLDS),\n cognitive: resolveThresholdOverride(parsed.cognitive, DEFAULT_COGNITIVE_THRESHOLDS)\n };\n}\n\nasync function main(): Promise<void> {\n const parsed = parseArgs(process.argv.slice(2));\n const thresholds = buildThresholds(parsed);\n const reportFormat: ReportFormat = parsed.report ?? (parsed.baseRef || parsed.paths.length !== 1 ? 'md' : 'json');\n\n if (parsed.baseRef) {\n await runDiff(parsed.baseRef, parsed.paths, thresholds, reportFormat);\n return;\n }\n\n if (parsed.paths.length === 0) {\n printUsage();\n process.exit(2);\n }\n\n if (\n parsed.paths.length === 1 &&\n fs.existsSync(parsed.paths[0]) &&\n fs.statSync(parsed.paths[0]).isFile() &&\n !parsed.report\n ) {\n await runLegacySingleFile(parsed.paths[0], thresholds);\n return;\n }\n\n await runScan(parsed.paths, thresholds, reportFormat);\n}\n\nmain().catch((error) => {\n console.error('energy-state-cli failed:', error);\n process.exit(1);\n});\n","// Execution engine for each CLI invocation shape (single file, scan, diff) — split out of\n// cli.ts so argument parsing and mode execution are two separate, independently-readable\n// concerns (the coherence detector flagged cli.ts itself for mixing both in one file).\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { execFileSync } from 'child_process';\nconst { Parser, Language } = require('web-tree-sitter');\n\nimport { analyzeSource, AnalyzeThresholds } from './core/analyze';\nimport { LanguageAdapter } from './core/language';\nimport { resolveLanguageForFile } from './languages';\nimport { resolveSupportedFiles } from './core/scan';\nimport { isIgnored, loadIgnorePatterns } from './core/esaignore';\nimport {\n FileResult,\n FileSummary,\n hasBlockingViolations,\n renderDiffMarkdown,\n renderHumanReport,\n renderMarkdownReport,\n summarize,\n summarizeFile,\n diffSummaries\n} from './core/report';\nimport { EnergyViolation, SEVERITY } from './types';\n\nexport type ReportFormat = 'json' | 'md' | 'human';\n\nexport function printUsage(): void {\n console.error('Usage: energy-state-cli <file.py|.fs|.fsx|.ts> [thresholds...]');\n console.error(\n ' energy-state-cli <path...> [--report json|md|human] [thresholds...] (scan a directory/subtree)'\n );\n console.error(\n ' energy-state-cli --base-ref <ref> [<path...>] [--report json|md] [thresholds...] (diff PR head against a base ref)'\n );\n console.error(\n 'Thresholds: --medium-nesting N --high-nesting N --medium-cyclomatic N --high-cyclomatic N --medium-cognitive N --high-cognitive N'\n );\n}\n\n// decision: caches one parser instance per language adapter — scan/diff mode analyze many\n// files, and re-running Parser.init()/Language.load() per file would be wasteful I/O\nconst parserCache = new Map<LanguageAdapter, any>();\n\nasync function loadParser(adapter: LanguageAdapter) {\n const cached = parserCache.get(adapter);\n if (cached) {\n return cached;\n }\n await Parser.init();\n const parser = new Parser();\n const grammarPath = path.join(__dirname, '..', adapter.grammarPath);\n const grammar = await Language.load(grammarPath);\n parser.setLanguage(grammar);\n parserCache.set(adapter, parser);\n return parser;\n}\n\nasync function analyzeFile(\n filePath: string,\n sourceCode: string,\n thresholds: AnalyzeThresholds\n): Promise<EnergyViolation[]> {\n const adapter = resolveLanguageForFile(filePath);\n if (!adapter) {\n return [];\n }\n const parser = await loadParser(adapter);\n const tree = parser.parse(sourceCode);\n return analyzeSource(sourceCode, tree, adapter, filePath, thresholds);\n}\n\nfunction exitForCounts(counts: { low: number; medium: number; high: number }): never {\n process.exit(hasBlockingViolations(counts) ? 1 : 0);\n}\n\nexport async function runLegacySingleFile(filePath: string, thresholds: AnalyzeThresholds): Promise<void> {\n const adapter = resolveLanguageForFile(filePath);\n if (!adapter) {\n console.error(`Unsupported file type: ${filePath}`);\n printUsage();\n process.exit(2);\n }\n\n const sourceCode = fs.readFileSync(filePath, 'utf8');\n const violations = await analyzeFile(filePath, sourceCode, thresholds);\n\n console.log(JSON.stringify(violations, null, 2));\n\n const hasBlockingViolation = violations.some((v) => v.severity === SEVERITY.HIGH || v.severity === SEVERITY.MEDIUM);\n process.exit(hasBlockingViolation ? 1 : 0);\n}\n\nexport async function runScan(\n paths: string[],\n thresholds: AnalyzeThresholds,\n reportFormat: ReportFormat\n): Promise<void> {\n const files = resolveSupportedFiles(paths);\n const results: FileResult[] = [];\n\n for (const filePath of files) {\n const sourceCode = fs.readFileSync(filePath, 'utf8');\n const violations = await analyzeFile(filePath, sourceCode, thresholds);\n // decision: reports the path relative to cwd — resolveSupportedFiles resolves\n // absolute paths internally for reliable dedup, but a repo-wide report reads far\n // better as \"src/foo.ts\" than a full filesystem path repeated on every row\n results.push({ filePath: path.relative(process.cwd(), filePath), violations });\n }\n\n const summary = summarize(results);\n if (reportFormat === 'human') {\n console.log(renderHumanReport(results));\n } else if (reportFormat === 'md') {\n console.log(renderMarkdownReport(summary));\n } else {\n console.log(JSON.stringify(summary, null, 2));\n }\n exitForCounts(summary.totalCounts);\n}\n\nfunction changedFilesFromGit(baseRef: string): string[] {\n const output = execFileSync('git', ['diff', '--name-only', '--diff-filter=d', `${baseRef}...HEAD`], {\n encoding: 'utf8'\n });\n return output\n .split('\\n')\n .map((line) => line.trim())\n .filter(Boolean);\n}\n\n// decision: returns null (not throwing) when the file doesn't exist at baseRef — a newly\n// added file has no base content, which is a normal \"new file\" case, not an error\nfunction readAtRef(ref: string, filePath: string): string | null {\n try {\n // decision: pipes stderr instead of inheriting it — git's own \"fatal: path ... exists\n // on disk, but not in <ref>\" would otherwise print to the CLI's stderr on every new\n // file, duplicating (and outnumbering) our own, already-informative message below\n return execFileSync('git', ['show', `${ref}:${filePath}`], {\n encoding: 'utf8',\n stdio: ['ignore', 'pipe', 'ignore']\n });\n } catch (error) {\n console.error(`energy-state-cli: could not read ${filePath} at ${ref} (new file or rename) — treating as new`);\n return null;\n }\n}\n\nexport async function runDiff(\n baseRef: string,\n explicitPaths: string[],\n thresholds: AnalyzeThresholds,\n reportFormat: ReportFormat\n): Promise<void> {\n const rootDir = process.cwd();\n const ignorePatterns = loadIgnorePatterns(rootDir);\n const changedFiles = (explicitPaths.length > 0 ? explicitPaths : changedFilesFromGit(baseRef))\n .filter((filePath) => resolveLanguageForFile(filePath) && fs.existsSync(filePath))\n .filter((filePath) => !isIgnored(path.resolve(filePath), rootDir, ignorePatterns));\n\n const headSummaries: FileSummary[] = [];\n const baseSummaries: FileSummary[] = [];\n\n for (const filePath of changedFiles) {\n const headSource = fs.readFileSync(filePath, 'utf8');\n const headViolations = await analyzeFile(filePath, headSource, thresholds);\n headSummaries.push(summarizeFile({ filePath, violations: headViolations }));\n\n const baseSource = readAtRef(baseRef, filePath);\n if (baseSource !== null) {\n const baseViolations = await analyzeFile(filePath, baseSource, thresholds);\n baseSummaries.push(summarizeFile({ filePath, violations: baseViolations }));\n }\n }\n\n const entries = diffSummaries(baseSummaries, headSummaries);\n console.log(reportFormat === 'md' ? renderDiffMarkdown(entries, baseRef) : JSON.stringify(entries, null, 2));\n\n // decision: diff-mode's exit code reflects whether anything in the diff *worsened*, not\n // \"does head have any medium/high violation\" (scan/legacy mode's rule) — a PR touching a\n // file that already carried debt, or a genuinely new file, should not fail this check on\n // pre-existing severity alone; only a file this PR made worse should block it\n process.exit(entries.some((entry) => entry.status === 'worsened') ? 1 : 0);\n}\n","import { EnergyViolation } from '../types';\nimport { createPositionLookup } from './position';\nimport { LanguageAdapter } from './language';\nimport { analyzeNesting, NestingThresholds, DEFAULT_NESTING_THRESHOLDS } from './detectors/nesting';\nimport { analyzeFunctionComplexity, CyclomaticThresholds, DEFAULT_CYCLOMATIC_THRESHOLDS } from './detectors/cyclomatic';\nimport { analyzeCognitiveComplexity, CognitiveThresholds, DEFAULT_COGNITIVE_THRESHOLDS } from './detectors/cognitive';\nimport { analyzeFileCoherence, CoherenceThresholds, DEFAULT_COHERENCE_THRESHOLDS } from './detectors/coherence';\nimport { analyzeMagicNumbers, MagicNumberOptions, DEFAULT_MAGIC_NUMBER_OPTIONS } from './detectors/magicNumber';\nimport { analyzeMagicStrings, MagicStringOptions, DEFAULT_MAGIC_STRING_OPTIONS } from './detectors/magicString';\nimport { analyzeParameterCount } from './detectors/parameterCount';\nimport { analyzeInversionOpportunities } from './detectors/inversion';\nimport { analyzePrimitiveObsession } from './detectors/primitiveObsession';\nimport {\n analyzeMatchOpportunities,\n MatchOpportunityThresholds,\n DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS\n} from './detectors/matchOpportunity';\nimport { analyzeLogicalControlFlow } from './detectors/logicalControlFlow';\nimport { analyzeOpaqueBooleanLiteral } from './detectors/opaqueBoolean';\nimport { applySuppressions } from './suppressions';\n\nexport interface AnalyzeThresholds {\n nesting?: NestingThresholds;\n cyclomatic?: CyclomaticThresholds;\n cognitive?: CognitiveThresholds;\n coherence?: CoherenceThresholds;\n matchOpportunity?: MatchOpportunityThresholds;\n magicNumber?: MagicNumberOptions;\n magicString?: MagicStringOptions;\n}\n\n// esa-ignore-file: coherence\n// decision: this file's import count is inherent to being the one place that wires up every\n// detector (one import per detector, by design) — not accidental grab-bag sprawl, so the\n// import-sprawl coherence check is suppressed file-wide rather than chased by deleting imports.\n//\n// Language-agnostic entry point: runs every detector over an already-parsed\n// tree-sitter tree.\n//\n// decision: runs every detector unconditionally except where a detector exposes its own\n// enabled flag (currently magicNumber/magicString) — a caller-selected subset would let the\n// extension and the CLI (cli.ts) drift on which violations exist for the same file, but a\n// per-detector on/off default that both entry points inherit identically does not\n// reintroduce that drift\n// invariant: this module and everything it calls must not import vscode — used by both the VS Code extension (per keystroke) and the headless CLI (per file)\nexport function analyzeSource(\n sourceText: string,\n tree: any,\n language: LanguageAdapter,\n fileName: string,\n thresholds: AnalyzeThresholds = {}\n): EnergyViolation[] {\n const positions = createPositionLookup(sourceText);\n const violations: EnergyViolation[] = [];\n\n violations.push(...analyzeNesting(tree, positions, language, thresholds.nesting ?? DEFAULT_NESTING_THRESHOLDS));\n violations.push(\n ...analyzeFunctionComplexity(tree, positions, language, thresholds.cyclomatic ?? DEFAULT_CYCLOMATIC_THRESHOLDS)\n );\n violations.push(\n ...analyzeCognitiveComplexity(tree, positions, language, thresholds.cognitive ?? DEFAULT_COGNITIVE_THRESHOLDS)\n );\n violations.push(\n ...analyzeFileCoherence(tree, fileName, language, thresholds.coherence ?? DEFAULT_COHERENCE_THRESHOLDS)\n );\n violations.push(\n ...analyzeMagicNumbers(tree, positions, language, thresholds.magicNumber ?? DEFAULT_MAGIC_NUMBER_OPTIONS)\n );\n violations.push(\n ...analyzeMagicStrings(tree, positions, language, thresholds.magicString ?? DEFAULT_MAGIC_STRING_OPTIONS)\n );\n violations.push(...analyzeParameterCount(tree, positions, language));\n violations.push(...analyzeInversionOpportunities(tree, positions, language));\n violations.push(...analyzePrimitiveObsession(tree, positions, language));\n violations.push(\n ...analyzeMatchOpportunities(\n tree,\n positions,\n language,\n thresholds.matchOpportunity ?? DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS\n )\n );\n violations.push(...analyzeLogicalControlFlow(tree, positions, language));\n violations.push(...analyzeOpaqueBooleanLiteral(tree, positions, language));\n\n // decision: suppression is applied last, over the full combined list — an esa-ignore\n // directive can name any violation type regardless of which detector produced it, so it\n // must see everything before deciding what's unused.\n const { violations: suppressed, suppressionNotes } = applySuppressions(violations, sourceText);\n return [...suppressed, ...suppressionNotes];\n}\n","import { ComplexityHotspot, EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// Cognitive complexity (SonarSource): unlike cyclomatic complexity, every\n// decision point is weighted by how deeply it is nested, and early-return\n// guard clauses are not penalized. This tracks how hard code is to *read*,\n// not just how many paths it has.\n//\n// decision: implements a simplified subset of the SonarSource spec rather than the full algorithm, acceptable for a first pass:\n// assumption: `for`/`while` `else` clauses (where a grammar has them) are scored like `if`/`else`, even though they aren't really a decision point\n// assumption: boolean operator chain merging (\"a and b and c\" = one increment) only checks the immediate parent's operator, not the full chain direction\n// assumption: recursive calls to the enclosing function are not specially detected\n// assumption: match/switch-like constructs and try/except are scored once as a whole, not per-case — see each LanguageAdapter for exact node-type mapping\nexport function calculateCognitiveComplexity(\n functionNode: any,\n language: LanguageAdapter,\n onContribution?: (node: any, amount: number) => void\n): number {\n let score = 0;\n const { nodeTypes } = language;\n\n function add(node: any, amount: number) {\n score += amount;\n onContribution?.(node, amount);\n }\n\n function walkNested(node: any, nesting: number) {\n for (const child of node.children) {\n walk(child, language.entersNestedScope(child) ? nesting + 1 : nesting);\n }\n }\n\n function walk(node: any, nesting: number) {\n const booleanOperator = language.getBooleanOperator(node);\n if (booleanOperator) {\n const parentOperator = language.getBooleanOperator(node.parent);\n if (parentOperator !== booleanOperator) {\n add(node, 1);\n }\n for (const child of node.children) {\n walk(child, nesting);\n }\n return;\n }\n\n if (language.cognitiveNestedDecisionTypes.includes(node.type)) {\n add(node, 1 + nesting);\n walkNested(node, nesting);\n return;\n }\n\n if (node.type === nodeTypes.elseClause) {\n add(node, 1); // flat: no extra nesting increment for the else itself\n walkNested(node, nesting);\n return;\n }\n\n if (node.type === nodeTypes.conditionalExpression) {\n // ternary: \"a if cond else b\"\n add(node, 1 + nesting);\n for (const child of node.children) {\n walk(child, nesting + 1);\n }\n return;\n }\n\n if (language.isFunctionDefinition(node)) {\n // invariant: only the structural nesting increment for a nested named function/method counts here — its body is scored as its own separate violation by analyzeCognitiveComplexity's traversal, never folded into the enclosing function's score\n add(node, 1 + nesting);\n return;\n }\n\n if (node.type === nodeTypes.lambda) {\n // decision: attributes a lambda's body complexity to the enclosing function instead of scoring it separately, since lambdas aren't analyzed as their own function (see LanguageAdapter docs)\n add(node, 1 + nesting);\n walkNested(node, nesting);\n return;\n }\n\n for (const child of node.children || []) {\n walk(child, nesting);\n }\n }\n\n for (const child of functionNode.children) {\n walk(child, 0);\n }\n\n return score;\n}\n\n// Re-runs the same walk used for scoring, but records where each point of\n// score comes from so callers can render a per-line heatmap across the\n// function body instead of a single flat highlight.\nexport function findCognitiveHotspots(\n functionNode: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): ComplexityHotspot[] {\n const hotspots: ComplexityHotspot[] = [];\n calculateCognitiveComplexity(functionNode, language, (node, amount) => {\n hotspots.push({ line: positions.toPosition(node.startIndex).line, weight: amount });\n });\n return hotspots;\n}\n\nexport interface CognitiveThresholds {\n mediumThreshold: number;\n highThreshold: number;\n}\n\nexport const DEFAULT_COGNITIVE_THRESHOLDS: CognitiveThresholds = {\n mediumThreshold: 15,\n highThreshold: 25\n};\n\nexport function analyzeCognitiveComplexity(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: CognitiveThresholds = DEFAULT_COGNITIVE_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const complexity = calculateCognitiveComplexity(node, language);\n if (complexity > thresholds.mediumThreshold) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.COGNITIVE,\n severity: complexity > thresholds.highThreshold ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `High cognitive complexity: ${complexity}. This function is hard to read; consider flattening nesting or extracting functions.`,\n hotspots: findCognitiveHotspots(node, positions, language)\n });\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { LanguageAdapter } from '../language';\n\nexport interface CoherenceThresholds {\n // decision: gates file-coherence sprawl detection on large-function count, not raw function count — languages like F# idiomatically have many small functions per module, so what matters is functions large enough to carry real complexity\n largeFunctionLines: number;\n // Number of large functions (per largeFunctionLines) a file can contain\n // before it's flagged.\n maxLargeFunctions: number;\n // Share (0-1) of a file's functions that must share a leading name word (e.g. all\n // `extractX`/`extractY`) for the file to be treated as one coherent domain broken into many\n // small steps, rather than a grab-bag of unrelated helpers, and skip the raw function-count\n // sprawl check below.\n singleDomainNameShare: number;\n}\n\nexport const DEFAULT_COHERENCE_THRESHOLDS: CoherenceThresholds = {\n largeFunctionLines: 20,\n maxLargeFunctions: 5,\n singleDomainNameShare: 0.7\n};\n\nfunction lineCount(node: any): number {\n return node.endPosition.row - node.startPosition.row + 1;\n}\n\n// decision: a raw function name is a weak signal on its own, but a *dominant leading word*\n// shared across most of a file's functions (extractFoo/extractBar/extractBaz) is a cheap,\n// AST-only proxy for \"this file is one coherent domain factored into many small steps\" —\n// exactly the case the function-count sprawl check below would otherwise misflag, since it\n// can't tell that apart from an actual grab-bag of unrelated helpers by count alone\nfunction leadingNameWord(node: any): string | null {\n const nameNode = node.children?.find((c: any) => c.type === 'identifier');\n if (!nameNode?.text) {\n return null;\n }\n const match = /^[a-z]+/.exec(nameNode.text);\n return match ? match[0] : nameNode.text.toLowerCase();\n}\n\nfunction looksLikeSingleDomain(functions: any[], minShare: number): boolean {\n const leadingWords = functions.map(leadingNameWord).filter((word): word is string => word !== null);\n if (leadingWords.length === 0) {\n return false;\n }\n\n const wordCounts = new Map<string, number>();\n for (const word of leadingWords) {\n wordCounts.set(word, (wordCounts.get(word) ?? 0) + 1);\n }\n\n const dominantWordCount = Math.max(...wordCounts.values());\n return dominantWordCount / leadingWords.length >= minShare;\n}\n\nfunction collectFunctionsAndImports(tree: any, language: LanguageAdapter): { functions: any[]; imports: string[] } {\n const functions: any[] = [];\n const imports: string[] = [];\n const { nodeTypes } = language;\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n functions.push(node);\n } else if (\n node.isNamed &&\n (node.type === nodeTypes.importStatement || node.type === nodeTypes.importFromStatement)\n ) {\n // decision: requires isNamed, not just a type match — Kotlin's import rule is\n // literally named `import`, which collides with the anonymous `import` keyword\n // token that is itself a child of every import node (node.type for an anonymous\n // node is its literal text). Without this guard, every Kotlin import is counted\n // twice: once for the named node, once for its own leading keyword token.\n imports.push(node.text || '');\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return { functions, imports };\n}\n\n// decision: the raw function-count trigger (8/12) and its severity escalation (15) are\n// deliberately not part of CoherenceThresholds like largeFunctionLines/maxLargeFunctions are —\n// they're secondary heuristics tuned around the utils-file naming proxy, not a threshold users\n// are expected to retune independently\nconst UTILS_FILE_FUNCTION_THRESHOLD = 8;\nconst GENERIC_FUNCTION_COUNT_THRESHOLD = 12;\nconst HIGH_FUNCTION_COUNT_THRESHOLD = 15;\nconst LARGE_FUNCTION_SEVERITY_MULTIPLIER = 1.5;\nconst IMPORT_COUNT_THRESHOLD = 10;\nconst HIGH_IMPORT_COUNT_THRESHOLD = 15;\n\n// Flag files with too many unrelated functions (utils/helpers sprawl)\n// decision: lowers the flagging threshold from 12 to 8 functions when the filename itself signals a grab-bag module (util/helper/common) — the name is treated as a proxy for \"already known to lack a single responsibility\"\nfunction checkFunctionCountSprawl(\n functions: any[],\n fileName: string,\n thresholds: CoherenceThresholds\n): EnergyViolation | null {\n if (functions.length <= UTILS_FILE_FUNCTION_THRESHOLD) {\n return null;\n }\n\n const baseName = fileName.split('/').pop() || '';\n const isUtilsFile = baseName.includes('util') || baseName.includes('helper') || baseName.includes('common');\n // decision: an explicit utils/helper/common filename overrides the naming-cohesion signal — a module that already admits to being a grab-bag in its own name doesn't get to argue its way out via consistent prefixes\n const singleDomain = !isUtilsFile && looksLikeSingleDomain(functions, thresholds.singleDomainNameShare);\n\n if (!isUtilsFile && (functions.length <= GENERIC_FUNCTION_COUNT_THRESHOLD || singleDomain)) {\n return null;\n }\n\n return {\n line: 0,\n column: 0,\n type: VIOLATION_TYPE.COHERENCE,\n severity: functions.length > HIGH_FUNCTION_COUNT_THRESHOLD ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `File coherence warning: ${functions.length} functions in one file. Consider splitting by domain.`\n };\n}\n\n// Flag files with too many large functions, regardless of total function count - a module with\n// 30 small functions is fine, one with 6 sprawling ones isn't.\nfunction checkLargeFunctionSprawl(functions: any[], thresholds: CoherenceThresholds): EnergyViolation | null {\n const largeFunctions = functions.filter((fn) => lineCount(fn) > thresholds.largeFunctionLines);\n if (largeFunctions.length <= thresholds.maxLargeFunctions) {\n return null;\n }\n\n return {\n line: 0,\n column: 0,\n type: VIOLATION_TYPE.COHERENCE,\n severity:\n largeFunctions.length > thresholds.maxLargeFunctions * LARGE_FUNCTION_SEVERITY_MULTIPLIER\n ? SEVERITY.HIGH\n : SEVERITY.MEDIUM,\n message: `${largeFunctions.length} functions exceed ${thresholds.largeFunctionLines} lines. Large functions carry more complexity than function count alone suggests.`\n };\n}\n\n// Flag excessive imports (another sign of incoherence)\nfunction checkImportSprawl(imports: string[]): EnergyViolation | null {\n if (imports.length <= IMPORT_COUNT_THRESHOLD) {\n return null;\n }\n\n return {\n line: 0,\n column: 0,\n type: VIOLATION_TYPE.COHERENCE,\n severity: imports.length > HIGH_IMPORT_COUNT_THRESHOLD ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `Import sprawl: ${imports.length} imports suggest this file does too much.`\n };\n}\n\n// The \"Utils/Helpers Sprawl\" detector - detects files losing coherence\nexport function analyzeFileCoherence(\n tree: any,\n fileName: string,\n language: LanguageAdapter,\n thresholds: CoherenceThresholds = DEFAULT_COHERENCE_THRESHOLDS\n): EnergyViolation[] {\n const { functions, imports } = collectFunctionsAndImports(tree, language);\n\n return [\n checkFunctionCountSprawl(functions, fileName, thresholds),\n checkLargeFunctionSprawl(functions, thresholds),\n checkImportSprawl(imports)\n ].filter((violation): violation is EnergyViolation => violation !== null);\n}\n","import { ComplexityHotspot, EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// Cyclomatic complexity: counts independent paths through a function.\n// Every decision point (if/loop/except/boolean operator/ternary) adds 1,\n// regardless of how deeply it is nested.\nexport function calculateCyclomaticComplexity(functionNode: any, language: LanguageAdapter): number {\n let complexity = 1; // Base complexity\n\n function countDecisionPoints(node: any, isRoot: boolean) {\n if (\n language.decisionNodeTypes.includes(node.type) ||\n language.getBooleanOperator(node) !== null ||\n language.isTryElseClause(node)\n ) {\n complexity++;\n }\n\n // invariant: a nested named function/method's decision points are never counted toward the enclosing function's complexity — it is scored as its own separate violation by analyzeFunctionComplexity's traversal\n if (!isRoot && language.isFunctionDefinition(node)) {\n return;\n }\n\n for (const child of node.children) {\n countDecisionPoints(child, false);\n }\n }\n\n countDecisionPoints(functionNode, true);\n return complexity;\n}\n\n// Locates every decision point in a function and weights it by nesting\n// depth, so callers can render a per-line heatmap showing where the\n// complexity actually piles up (the metric itself stays flat/unweighted).\nexport function findCyclomaticHotspots(\n functionNode: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): ComplexityHotspot[] {\n const hotspots: ComplexityHotspot[] = [];\n\n function walk(node: any, depth: number, isRoot: boolean) {\n let nextDepth = depth;\n if (\n language.decisionNodeTypes.includes(node.type) ||\n language.getBooleanOperator(node) !== null ||\n language.isTryElseClause(node)\n ) {\n const line = positions.toPosition(node.startIndex).line;\n hotspots.push({ line, weight: 1 + depth });\n nextDepth = depth + 1;\n }\n\n // invariant: mirrors calculateCyclomaticComplexity's traversal exactly — a nested named function/method is hotspotted separately as its own violation, never folded into this one\n if (!isRoot && language.isFunctionDefinition(node)) {\n return;\n }\n\n for (const child of node.children) {\n walk(child, nextDepth, false);\n }\n }\n\n walk(functionNode, 0, true);\n return hotspots;\n}\n\nexport interface CyclomaticThresholds {\n mediumThreshold: number;\n highThreshold: number;\n}\n\nexport const DEFAULT_CYCLOMATIC_THRESHOLDS: CyclomaticThresholds = {\n mediumThreshold: 10,\n highThreshold: 15\n};\n\nexport function analyzeFunctionComplexity(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: CyclomaticThresholds = DEFAULT_CYCLOMATIC_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const complexity = calculateCyclomaticComplexity(node, language);\n if (complexity > thresholds.mediumThreshold) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.COMPLEXITY,\n severity: complexity > thresholds.highThreshold ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `High cyclomatic complexity: ${complexity}. Consider breaking down this function.`,\n hotspots: findCyclomaticHotspots(node, positions, language)\n });\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// The \"Inversion Opportunity\" detector - finds patterns that could benefit from early returns\nexport function analyzeInversionOpportunities(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n const { nodeTypes } = language;\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n analyzeFunction(node);\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n function analyzeFunction(functionNode: any) {\n // Find the function body\n //\n // decision: also checks one level of grandchildren, not just direct children — Kotlin's\n // function_declaration wraps its block in an intermediate function_body node\n // (function_declaration -> function_body -> block), unlike Python/TS/F# where the block\n // (or its equivalent) sits directly under the function node\n const body =\n functionNode.children.find((child: any) => child.type === nodeTypes.block) ??\n functionNode.children\n .flatMap((child: any) => child.children ?? [])\n .find((child: any) => child.type === nodeTypes.block);\n if (!body) {\n return;\n }\n\n // Look for patterns that could benefit from inversion\n //\n // decision: filters on isNamed, not just a non-comment/non-blank text check - grammars\n // with an explicit block wrapper (e.g. TS's statement_block) include the literal '{'/'}'\n // tokens in .children, and those pass a text?.trim() check same as a real statement would.\n // Without this, `statements[0]` on such grammars is always the '{' token, never the\n // function's actual first statement, so Pattern 1 below can never match.\n const statements = body.children.filter(\n (child: any) => child.isNamed && child.type !== nodeTypes.comment && child.text?.trim()\n );\n\n // Pattern 1: Single large if-statement dominating the function\n if (statements.length >= 1) {\n const firstStatement = statements[0];\n if (firstStatement.type === nodeTypes.ifStatement) {\n const ifBody = firstStatement.children.find((child: any) => child.type === nodeTypes.block);\n if (ifBody && ifBody.children.length > 2) {\n // Check if this if-statement contains most of the function logic\n const totalLines = functionNode.endIndex - functionNode.startIndex;\n const ifLines = ifBody.endIndex - ifBody.startIndex;\n const ratio = ifLines / totalLines;\n\n // decision: flags only when the if-body spans more than half the function — below that, the if is a fragment rather than the function's dominant structure\n if (ratio > 0.5) {\n const position = positions.toPosition(firstStatement.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.INVERSION,\n severity: SEVERITY.MEDIUM,\n message: 'Consider inverting this condition and using early return for cleaner flow.'\n });\n }\n }\n }\n }\n\n // Pattern 2: Nested validation checks that could be guard clauses\n analyzeNestedValidation(body);\n\n // Pattern 3: Multiple nested if-statements that could be flattened\n analyzeNestedIfs(body);\n }\n\n function analyzeNestedValidation(body: any) {\n // Look for patterns like: if (valid) { if (moreValid) { if (evenMoreValid) { ... } } }\n // decision: caps the validation-chain walk at 4 levels — deep chains beyond that are already caught by analyzeNestedIfs, so this loop only needs to bound its own work\n let currentNode = body;\n let nestingLevel = 0;\n const validationChecks: any[] = [];\n\n while (currentNode && nestingLevel < 4) {\n // decision: matches against language.nestingControlTypes rather than the\n // nodeTypes.ifStatement/forStatement/whileStatement trio directly — TypeScript's\n // `for...of`/`for...in` parses as its own for_in_statement node, distinct from\n // nodeTypes.forStatement's plain `for_statement`, and nestingControlTypes is the\n // per-language set that already accounts for that (bug found by running this\n // detector on its own source: a sibling for-of loop went unseen by the old filter,\n // making its lone if-sibling look like the only statement in this body and get\n // mistaken for a validation-chain step)\n const statements =\n currentNode.children?.filter((child: any) => language.nestingControlTypes.includes(child.type)) || [];\n\n if (statements.length === 1 && statements[0].type === nodeTypes.ifStatement) {\n const ifStatement = statements[0];\n validationChecks.push(ifStatement);\n\n // Check if this looks like a validation (no else clause, simple condition)\n //\n // decision: grammars with no elseClause wrapper (Kotlin, F#) can't be checked via\n // a single child's type — Kotlin's else-branch is either a second nodeTypes.block\n // child or a directly-nested ifStatement child, with no wrapper node distinguishing\n // it from the then-branch's own block. F#'s block-less grammar still can't detect a\n // plain (non-if) else this way — pre-existing, not a regression from this fallback.\n const hasElse = nodeTypes.elseClause\n ? ifStatement.children.some((child: any) => child.type === nodeTypes.elseClause)\n : ifStatement.children.filter((child: any) => child.type === nodeTypes.block).length > 1 ||\n ifStatement.children.some((child: any) => child.type === nodeTypes.ifStatement);\n if (!hasElse) {\n const ifBody = ifStatement.children.find((child: any) => child.type === nodeTypes.block);\n currentNode = ifBody;\n nestingLevel++;\n } else {\n break;\n }\n } else {\n break;\n }\n }\n\n // decision: suggests guard clauses starting at 2 chained validation checks — a single nested if is normal control flow, not yet a pattern worth restructuring\n if (validationChecks.length >= 2) {\n const firstCheck = validationChecks[0];\n const position = positions.toPosition(firstCheck.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.INVERSION,\n severity: SEVERITY.MEDIUM,\n message: `Found ${validationChecks.length} nested validation checks. Consider using guard clauses with early returns.`\n });\n }\n }\n\n function analyzeNestedIfs(body: any) {\n // Count deeply nested if statements that could be flattened\n let maxNesting = 0;\n let nestedIfLocation: any = null;\n\n function countNesting(node: any, currentDepth: number = 0) {\n // invariant: never descends into a nested function/method's body — that function is\n // walked as its own separate analyzeFunction call once traverse() reaches it, so\n // counting its if-nesting here too would both double-report the same location and\n // misattribute nesting depth to the wrong enclosing function (mirrors the same rule\n // in cognitive.ts's walk())\n if (language.isFunctionDefinition(node)) {\n return;\n }\n\n if (node.type === nodeTypes.ifStatement) {\n if (currentDepth > maxNesting) {\n maxNesting = currentDepth;\n nestedIfLocation = node;\n }\n currentDepth++;\n }\n\n for (const child of node.children || []) {\n countNesting(child, currentDepth);\n }\n }\n\n countNesting(body);\n\n // decision: flags if-nesting at 3+ levels here, one level below analyzeNesting's depth>3 threshold — this detector targets flattenable if-chains specifically, so it can fire earlier than the general nesting detector\n if (maxNesting >= 3 && nestedIfLocation) {\n const position = positions.toPosition(nestedIfLocation.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.INVERSION,\n severity: SEVERITY.MEDIUM,\n message: `Deep if-nesting (${maxNesting} levels). Consider inverting conditions or extracting functions.`\n });\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// The \"Logical Operator as Control Flow\" detector: flags `condition && doSomething();` (or\n// `condition || fallback();`) used as a standalone statement.\n//\n// decision: this is legal in every language the LanguageAdapter grammar reports an\n// expressionStatement for (Python's bare `and`/`or` expression statement included, not just\n// TS/JS's `&&`/`||`) and it already counts toward cyclomatic complexity via\n// getBooleanOperator (see cyclomatic.ts) — this detector exists only to name the *readability*\n// cost separately: an if hidden as an expression is invisible to anyone skimming for branches,\n// and can't grow past a single consequent expression without becoming unreadable.\nexport function analyzeLogicalControlFlow(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n const { nodeTypes } = language;\n\n function traverse(node: any) {\n const operator = language.getBooleanOperator(node);\n if (operator !== null && node.parent?.type === nodeTypes.expressionStatement) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.LOGICAL_CONTROL_FLOW,\n severity: SEVERITY.LOW,\n message:\n operator === 'and'\n ? \"If-statement disguised as '&&'. Consider an explicit if-statement instead.\"\n : \"If-statement disguised as '||'. Consider an explicit if-statement instead.\"\n });\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface MagicNumberOptions {\n enabled: boolean;\n // Numeric literals that never carry hidden meaning worth naming (loop\n // bounds, unit steps) — checked against the literal's signed value.\n allowlist: number[];\n}\n\nexport const DEFAULT_MAGIC_NUMBER_OPTIONS: MagicNumberOptions = {\n enabled: true,\n allowlist: [0, 1, -1, 2]\n};\n\n// The \"Magic Number\" detector: numbers don't get an interpolation-style escape hatch the way\n// strings do, so this stays broad (any significant literal outside a named binding) and leans\n// on the allowlist plus a few structural exemptions (index position, default parameter value)\n// to keep it from flagging the common idioms where a bare number isn't actually magic.\nexport function analyzeMagicNumbers(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n options: MagicNumberOptions = DEFAULT_MAGIC_NUMBER_OPTIONS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n if (!options.enabled) {\n return violations;\n }\n const { nodeTypes } = language;\n\n function isInConstantContext(node: any): boolean {\n // decision: uses a heuristic (assignment at module level, optionally wrapped in `export`) rather than resolving actual scope — cheap to check per-node and sufficient because idiomatic module-level constants are the common case this is meant to exempt\n let parent = node.parent;\n while (parent) {\n if (parent.type === nodeTypes.assignment) {\n // decision: F# has no separate node type for \"function definition\" vs \"plain\n // value binding\" (both are function_or_value_defn), so a literal deep inside a\n // function's body would otherwise match this ancestor and be wrongly treated as\n // the function's own \"named constant\" value. Once the nearest assignment-shaped\n // ancestor is actually a function, the literal is computed logic, not a binding.\n if (language.isFunctionDefinition(parent)) {\n return false;\n }\n // decision: checked before the module-scope walk below, and independent of it —\n // an explicit compile-time-constant marker (Kotlin's `const val`) is valid at any\n // nesting depth (companion object, object declaration, etc.), unlike the\n // module-scope heuristic that walk relies on for languages with no such marker\n if (language.isExplicitConstant(parent)) {\n return true;\n }\n // decision: Python wraps every top-level `name = value` in an\n // `expression_statement` between the assignment and the module root (unlike\n // TS's `lexical_declaration`, which sits directly under `program`) — unwrap it\n // before checking against module/export so `MAX_RETRIES = 5` at module scope\n // is still recognized as a constant binding.\n let grandparent = parent.parent;\n if (grandparent?.type === nodeTypes.expressionStatement) {\n grandparent = grandparent.parent;\n }\n if (grandparent?.type === nodeTypes.module) {\n // decision: F#'s `declaration_expression` node type is reused both for the\n // true module root and for wrapping a nested `let` binding's continuation\n // inside a function body (there's no separate node type for \"this let is\n // the function's actual last expression\" vs \"this let is module-level\") — so\n // matching nodeTypes.module here isn't enough on its own; this also has to\n // rule out an enclosing function definition somewhere further up\n return !hasEnclosingFunction(parent);\n }\n if (\n nodeTypes.exportStatement &&\n grandparent?.type === nodeTypes.exportStatement &&\n grandparent.parent?.type === nodeTypes.module\n ) {\n return true;\n }\n }\n parent = parent.parent;\n }\n return false;\n }\n\n function hasEnclosingFunction(assignmentNode: any): boolean {\n let ancestor = assignmentNode.parent;\n while (ancestor) {\n if (language.isFunctionDefinition(ancestor)) {\n return true;\n }\n ancestor = ancestor.parent;\n }\n return false;\n }\n\n function isIndexPosition(node: any): boolean {\n return !!node.parent && language.subscriptNodeTypes.includes(node.parent.type);\n }\n\n // decision: a plain `-` unary parent isn't its own node type across every grammar, so this\n // checks the structural shape (a 2-child parent whose first child is a literal `-` token)\n // instead of adding another per-language adapter hook for something this mechanical\n function signedValue(node: any, rawValue: number): number {\n const parent = node.parent;\n const isNegated = parent?.children?.length === 2 && parent.children[0]?.text === '-';\n return isNegated ? -rawValue : rawValue;\n }\n\n function traverse(node: any) {\n if (node.type === nodeTypes.integerLiteral || node.type === nodeTypes.floatLiteral) {\n // decision: always parseFloat, even for integerLiteral nodes — TS has no separate\n // floatLiteral node type (both map to nodeTypes.integerLiteral), so parseInt would\n // silently truncate a literal like `1.08` down to `1` and match the allowlist\n const rawValue = parseFloat(node.text);\n // decision: skips non-numeric text outright rather than falling through to the\n // allowlist/exemption checks — F#'s float grammar nests a `float`-typed fragment\n // node (digits/'.'/digits) inside its own `float`-typed literal, and TS's\n // `predefined_type` keyword token for the `number` annotation shares nodeTypes'\n // 'number' node type with the actual numeric-literal node; neither is a real value\n if (!Number.isNaN(rawValue)) {\n const value = signedValue(node, rawValue);\n\n const isExempt =\n options.allowlist.includes(value) ||\n isInConstantContext(node) ||\n isIndexPosition(node) ||\n language.isDefaultParameterValue(node);\n\n if (!isExempt) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.MAGIC,\n severity: SEVERITY.LOW,\n message: `Magic number: ${node.text}. Consider extracting to a named constant.`\n });\n }\n }\n // A literal's own children (if any) are fragments of the same value, not\n // separate literals — never descend into them.\n return;\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface MagicStringOptions {\n enabled: boolean;\n // Only flag a string once it recurs at a decision point at least this many times across\n // the file — mirrors Sonar's S1192, and cuts single-use false positives further.\n minDuplicates: number;\n // Literal contents that are never worth naming regardless of how often they recur.\n allowlist: string[];\n}\n\nexport const DEFAULT_MAGIC_STRING_OPTIONS: MagicStringOptions = {\n enabled: true,\n minDuplicates: 2,\n allowlist: ['', 'utf-8', '__main__']\n};\n\n// The \"Magic String\" detector: unlike numbers, strings get a narrow scope — only literals\n// standing at a decision point (compared, checked for membership, or used as a dict/object\n// key) are candidates, since that's where an unnamed string actually risks a silent typo. Any\n// other string (a message, a docstring, an interpolated template) is left alone entirely.\nexport function analyzeMagicStrings(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n options: MagicStringOptions = DEFAULT_MAGIC_STRING_OPTIONS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n if (!options.enabled) {\n return violations;\n }\n const { nodeTypes } = language;\n\n function isDocstring(node: any): boolean {\n return node.parent?.type === nodeTypes.expressionStatement;\n }\n\n function stripQuotes(text: string): string {\n return text.length >= 2 ? text.slice(1, -1) : text;\n }\n\n function isEqualityComparisonOperand(node: any): boolean {\n // decision: also checks the grandparent, not just the parent — F#'s grammar wraps a\n // literal operand in an intermediate `const` node before it reaches the\n // `infix_expression`, so the comparison node itself sits one level further up than in\n // Python/TS. Checking the parent alone would silently drop every F# string comparison.\n const candidates = [node.parent, node.parent?.parent].filter(Boolean);\n // decision: compares node identity by `.id`, not `===` — web-tree-sitter mints a fresh\n // JS wrapper object on every `.children`/`.parent` access, so two accessors that reach\n // the same underlying tree node are not reference-equal even though `.id` matches\n return candidates.some((candidate) =>\n language\n .getEqualityComparisons(candidate)\n .some(({ left, right }) => left.id === node.id || right.id === node.id)\n );\n }\n\n function isMembershipOperand(node: any, content: string): boolean {\n const container = node.parent?.parent;\n if (!container) {\n return false;\n }\n return language.getMembershipComparisons(container).some(({ values }) => values.includes(content));\n }\n\n function isKeyOrIndexPosition(node: any): boolean {\n return !!node.parent && language.subscriptNodeTypes.includes(node.parent.type);\n }\n\n function isDecisionPoint(node: any, content: string): boolean {\n return isEqualityComparisonOperand(node) || isMembershipOperand(node, content) || isKeyOrIndexPosition(node);\n }\n\n function isExempt(node: any, content: string): boolean {\n return (\n isDocstring(node) ||\n language.isFormattedOrInterpolatedString(node) ||\n options.allowlist.includes(content) ||\n content.length <= 1\n );\n }\n\n interface Candidate {\n node: any;\n content: string;\n }\n const candidates: Candidate[] = [];\n\n function traverse(node: any) {\n if (node.type === nodeTypes.stringLiteral) {\n const content = stripQuotes(node.text);\n if (isDecisionPoint(node, content) && !isExempt(node, content)) {\n candidates.push({ node, content });\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n\n const byContent = new Map<string, Candidate[]>();\n for (const candidate of candidates) {\n const group = byContent.get(candidate.content) ?? [];\n group.push(candidate);\n byContent.set(candidate.content, group);\n }\n\n for (const [content, group] of byContent) {\n if (group.length < options.minDuplicates) {\n continue;\n }\n const first = group[0].node;\n const position = positions.toPosition(first.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.MAGIC,\n severity: SEVERITY.LOW,\n message: `Magic string: \"${content}\" is compared/keyed against directly ${group.length} time(s). Consider extracting to a named constant or enum.`\n });\n }\n\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface MatchOpportunityThresholds {\n minBranches: number;\n}\n\nexport const DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS: MatchOpportunityThresholds = {\n minBranches: 3\n};\n\nfunction stripQuotes(text: string): string {\n return text.slice(1, -1);\n}\n\n// Walks an if-statement/if-expression node and returns every branch in the\n// same chain, in source order: the node itself, then one of three grammar\n// shapes for its continuations —\n// - flat elif siblings (Python/F#, via getElseIfBranches)\n// - else if there are none, `else if`-nested if-statements one level\n// inside an else_clause wrapper (TypeScript's shape)\n// - or, for grammars with no else_clause wrapper at all (Kotlin's\n// if_expression), a nested if-statement sitting as a *direct* child of\n// the previous one, with no wrapper node to key off\nfunction collectChainBranches(ifNode: any, language: LanguageAdapter): any[] {\n const branches = [ifNode];\n\n const flatSiblings = language.getElseIfBranches(ifNode);\n if (flatSiblings.length > 0) {\n branches.push(...flatSiblings);\n return branches;\n }\n\n let current = ifNode;\n while (true) {\n const nestedIf = language.nodeTypes.elseClause\n ? current.children\n ?.find((c: any) => c.type === language.nodeTypes.elseClause)\n ?.children?.find((c: any) => c.type === language.nodeTypes.ifStatement)\n : current.children?.find((c: any) => c.type === language.nodeTypes.ifStatement);\n if (!nestedIf) {\n break;\n }\n branches.push(nestedIf);\n current = nestedIf;\n }\n return branches;\n}\n\n// Collects every {variable, literal value} pair a single branch's own\n// condition/guard compares, without wandering into its consequence body or\n// into the next branch in the chain.\n//\n// decision: stops recursion at nodeTypes.block/elseClause and at any other\n// branch of the same chain, rather than resolving \"the condition\" via a\n// grammar-specific field name — this project's LanguageAdapter otherwise\n// avoids per-grammar field lookups (see language.ts), and a bounded scan\n// keeps that consistent at the cost of also scanning a branch's own\n// consequence when a grammar has no block wrapper (F#), matching the same\n// whole-subtree-scan tradeoff already accepted by primitiveObsession.ts\nfunction collectBranchDiscriminants(\n branchNode: any,\n otherBranches: Set<any>,\n language: LanguageAdapter\n): Array<{ variable: string; value: string }> {\n const { nodeTypes } = language;\n const found: Array<{ variable: string; value: string }> = [];\n\n function isVariableRef(node: any): boolean {\n return language.variableReferenceNodeTypes.includes(node.type);\n }\n\n function isLiteral(node: any): boolean {\n return (\n node.type === nodeTypes.stringLiteral ||\n node.type === nodeTypes.integerLiteral ||\n node.type === nodeTypes.floatLiteral\n );\n }\n\n function literalValue(node: any): string {\n return node.type === nodeTypes.stringLiteral ? stripQuotes(node.text) : node.text;\n }\n\n function walk(node: any) {\n if (otherBranches.has(node) || node.type === nodeTypes.block || node.type === nodeTypes.elseClause) {\n return;\n }\n\n for (const { left, right } of language.getEqualityComparisons(node)) {\n if (isVariableRef(left) && isLiteral(right)) {\n found.push({ variable: left.text, value: literalValue(right) });\n } else if (isVariableRef(right) && isLiteral(left)) {\n found.push({ variable: right.text, value: literalValue(left) });\n }\n }\n for (const { left, values } of language.getMembershipComparisons(node)) {\n if (isVariableRef(left)) {\n values.forEach((value) => found.push({ variable: left.text, value }));\n }\n }\n\n for (const child of node.children || []) {\n walk(child);\n }\n }\n\n walk(branchNode);\n return found;\n}\n\n// The \"Match Opportunity\" detector: an if/elif/elif chain (or TS's nested\n// `else if`) with enough branches, all discriminating on equality/membership\n// checks against the same single variable, is a natural fit for Python's\n// `match`, TypeScript's `switch`, or F#'s `match` — those give exhaustiveness\n// hints and one comparison site instead of N.\n//\n// decision: requires every branch to carry its own literal comparison against\n// the same variable — a chain with an unconditional catch-all `else` still\n// qualifies (the else itself contributes no discriminant and isn't a\n// \"branch\" for this check), but a chain mixing unrelated conditions across\n// branches does not, since match/switch can't express that dispatch anyway\nexport function analyzeMatchOpportunities(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: MatchOpportunityThresholds = DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n const { nodeTypes } = language;\n const consumed = new Set<any>();\n\n function traverse(node: any) {\n if (node.type === nodeTypes.ifStatement && !consumed.has(node)) {\n analyzeChain(node);\n }\n\n for (const child of node.children || []) {\n traverse(child);\n }\n }\n\n function analyzeChain(topIfNode: any) {\n const branches = collectChainBranches(topIfNode, language);\n branches.slice(1).forEach((branch) => consumed.add(branch));\n\n if (branches.length < thresholds.minBranches) {\n return;\n }\n\n const perBranchDiscriminants = branches.map((branch) =>\n collectBranchDiscriminants(branch, new Set(branches.filter((b) => b !== branch)), language)\n );\n\n if (perBranchDiscriminants.some((discriminants) => discriminants.length === 0)) {\n return;\n }\n\n const candidateVariables = perBranchDiscriminants[0].map((d) => d.variable);\n const commonVariable = candidateVariables.find((variable) =>\n perBranchDiscriminants.every((discriminants) => discriminants.some((d) => d.variable === variable))\n );\n if (!commonVariable) {\n return;\n }\n\n const position = positions.toPosition(topIfNode.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.MATCH_OPPORTUNITY,\n severity: SEVERITY.LOW,\n message: `This ${branches.length}-way if/elif chain all branch on '${commonVariable}'. Consider a match/switch statement for clearer, exhaustiveness-checked dispatch.`\n });\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\nexport interface NestingThresholds {\n mediumThreshold: number;\n highThreshold: number;\n}\n\n// decision: default medium threshold of 3 is the point where tracking active conditions starts to strain working memory; high threshold of 5 escalates severity for the deepest offenders\nexport const DEFAULT_NESTING_THRESHOLDS: NestingThresholds = {\n mediumThreshold: 3,\n highThreshold: 5\n};\n\nexport function analyzeNesting(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter,\n thresholds: NestingThresholds = DEFAULT_NESTING_THRESHOLDS\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any, depth: number = 0) {\n if (language.nestingControlTypes.includes(node.type)) {\n if (depth > thresholds.mediumThreshold) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.NESTING,\n severity: depth > thresholds.highThreshold ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `Excessive nesting depth: ${depth}. Consider extracting.`\n });\n }\n depth++;\n }\n\n for (const child of node.children) {\n traverse(child, depth);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// The \"Opaque Boolean Literal\" detector: a bare `true`/`false` passed positionally\n// into a call gives the reader no information about what it means without tracing\n// into the callee's signature — unlike primitive-obsession's swap-risk check, this\n// doesn't need a second adjacent parameter to be a problem; one opaque literal is\n// enough. Naming it at the call site (whatever the language allows: a keyword\n// argument, an object-literal field, F#'s named-argument syntax) fixes the\n// readability problem even where it isn't enforced by the type checker — see\n// isPositionalCallArgument's per-language doc for how each grammar distinguishes\n// labeled from positional.\nfunction buildViolation(node: any, positions: PositionLookup): EnergyViolation {\n const position = positions.toPosition(node.startIndex);\n return {\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.OPAQUE_BOOLEAN,\n severity: SEVERITY.LOW,\n message: `Opaque boolean literal: a bare '${node.text}' passed positionally tells the reader nothing without checking the callee's signature. Name it at the call site (a keyword argument, an object-literal field, or F#'s named-argument syntax) — or better, split into two clearly named functions (e.g. enableX()/disableX()) or use an enum.`\n };\n}\n\nexport function analyzeOpaqueBooleanLiteral(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isBooleanLiteral(node) && language.isPositionalCallArgument(node)) {\n violations.push(buildViolation(node, positions));\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\n\n// decision: does a level-by-level (breadth-first) search rather than a depth-first one — finds a function's own parameters node even when nested a level below the function node itself (e.g. F#'s argument_patterns sits inside function_declaration_left), while still stopping before it can reach a nested function's parameters\n// shared with primitiveObsession.ts's parameter-swap-risk check — same structural problem, same fix\nexport function findParametersNode(node: any, parametersType: string): any {\n for (const child of node.children) {\n if (child.type === parametersType) {\n return child;\n }\n }\n for (const child of node.children) {\n const found = findParametersNode(child, parametersType);\n if (found) {\n return found;\n }\n }\n return undefined;\n}\n\n// The \"Parameter Explosion\" detector\nexport function analyzeParameterCount(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const params = findParametersNode(node, language.nodeTypes.parameters);\n if (params) {\n const paramCount = params.children.filter((child: any) =>\n language.parameterChildTypes.includes(child.type)\n ).length;\n\n // decision: flags past 5 parameters (medium) and 8 (high) — beyond ~5, callers typically can no longer recall argument order/meaning without checking the signature\n if (paramCount > 5) {\n const position = positions.toPosition(node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.PARAMETERS,\n severity: paramCount > 8 ? SEVERITY.HIGH : SEVERITY.MEDIUM,\n message: `Parameter explosion: ${paramCount} parameters. Consider using objects or builder pattern.`\n });\n }\n }\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import { EnergyViolation, VIOLATION_TYPE, SEVERITY } from '../../types';\nimport { PositionLookup } from '../position';\nimport { LanguageAdapter } from '../language';\nimport { findParametersNode } from './parameterCount';\n\ninterface TypedParam {\n name: string;\n type: string;\n node: any;\n keywordOnly: boolean;\n}\n\n// Sub-check A (\"parameter swap risk\"): two adjacent parameters sharing the\n// same unqualified primitive type are indistinguishable at the call site —\n// nothing stops a caller passing them in the wrong order.\n//\n// decision: a pair is suppressed only when BOTH params sit past a\n// keywordOnlyBoundaryTypes marker (Python's bare `*` / `*args`) — the signature\n// itself must make positional calls impossible, not just \"some call sites happen\n// to use keywords\". A signature that still allows positional calls will\n// eventually get one.\n// known gap: Python's `**kwargs` dict-splatting can reintroduce positional-style\n// swap risk even past a keyword-only boundary (a caller building the dict by\n// hand can still transpose the values) — not worth detecting, left undocumented\n// in code but called out here for future readers.\nfunction findParameterCollisions(\n paramsNode: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n let keywordOnly = false;\n const typed: TypedParam[] = [];\n for (const n of paramsNode.children) {\n if (language.keywordOnlyBoundaryTypes.includes(n.type)) {\n keywordOnly = true;\n continue;\n }\n const extracted = language.extractTypedParameter(n);\n if (extracted) {\n typed.push({ ...extracted, node: n, keywordOnly });\n }\n }\n\n for (let i = 0; i < typed.length - 1; i++) {\n const a = typed[i];\n const b = typed[i + 1];\n if (a.type !== b.type || !language.primitiveTypeNames.has(a.type)) {\n continue;\n }\n if (a.keywordOnly && b.keywordOnly) {\n continue;\n }\n const position = positions.toPosition(a.node.startIndex);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.PRIMITIVE_OBSESSION,\n severity: SEVERITY.MEDIUM,\n message: `Primitive obsession: consecutive parameters '${a.name}: ${a.type}' and '${b.name}: ${b.type}' share the same primitive type — a caller can swap them and nothing will complain. Consider ${language.distinctTypeAdvice} so the type checker catches it.`\n });\n }\n return violations;\n}\n\nfunction stripQuotes(text: string): string {\n return text.slice(1, -1);\n}\n\n// Sub-check B (\"stringly-typed control flow\"): a variable repeatedly\n// compared against distinct string literals is a de facto enum encoded as\n// strings — no exhaustiveness checking, no typo protection at the type level.\n//\n// assumption: scoped to one function body at a time — the same variable name reused\n// across unrelated functions (e.g. two functions both naming a parameter `status`) does\n// not accumulate into a single false positive\nfunction findStringlyTypedControlFlow(\n functionNode: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const { nodeTypes } = language;\n const valuesByVariable = new Map<string, Set<string>>();\n const firstOccurrence = new Map<string, any>();\n\n function isVariableRef(node: any): boolean {\n return language.variableReferenceNodeTypes.includes(node.type);\n }\n\n function record(varNode: any, values: string[]) {\n const key = varNode.text;\n if (!valuesByVariable.has(key)) {\n valuesByVariable.set(key, new Set());\n firstOccurrence.set(key, varNode);\n }\n const set = valuesByVariable.get(key)!;\n values.forEach((v) => set.add(v));\n }\n\n function traverse(node: any) {\n for (const { left, right } of language.getEqualityComparisons(node)) {\n if (isVariableRef(left) && right.type === nodeTypes.stringLiteral) {\n record(left, [stripQuotes(right.text)]);\n } else if (isVariableRef(right) && left.type === nodeTypes.stringLiteral) {\n record(right, [stripQuotes(left.text)]);\n }\n }\n for (const { left, values } of language.getMembershipComparisons(node)) {\n if (isVariableRef(left) && values.length > 0) {\n record(left, values);\n }\n }\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(functionNode);\n\n const violations: EnergyViolation[] = [];\n for (const [key, values] of valuesByVariable) {\n if (values.size >= 3) {\n const node = firstOccurrence.get(key);\n const position = positions.toPosition(node.startIndex);\n const sample = Array.from(values).slice(0, 4);\n violations.push({\n line: position.line,\n column: position.column,\n type: VIOLATION_TYPE.PRIMITIVE_OBSESSION,\n severity: SEVERITY.LOW,\n message: `Stringly-typed control flow: '${key}' is compared against ${values.size} distinct string literals (${sample.join(', ')}${values.size > sample.length ? ', …' : ''}). Consider an Enum or Literal type to catch typos and get exhaustiveness checking.`\n });\n }\n }\n return violations;\n}\n\n// The \"Primitive Obsession\" detector: strings and numbers standing in for\n// what should be a distinct, validated type. Both sub-checks are driven\n// entirely through LanguageAdapter hooks (extractTypedParameter,\n// primitiveTypeNames, getEqualityComparisons, getMembershipComparisons,\n// variableReferenceNodeTypes), so Python/TypeScript/F# all run the same\n// traversal logic below.\nexport function analyzePrimitiveObsession(\n tree: any,\n positions: PositionLookup,\n language: LanguageAdapter\n): EnergyViolation[] {\n const violations: EnergyViolation[] = [];\n\n function traverse(node: any) {\n if (language.isFunctionDefinition(node)) {\n const paramsNode = findParametersNode(node, language.nodeTypes.parameters);\n if (paramsNode) {\n violations.push(...findParameterCollisions(paramsNode, positions, language));\n }\n violations.push(...findStringlyTypedControlFlow(node, positions, language));\n }\n\n for (const child of node.children) {\n traverse(child);\n }\n }\n\n traverse(tree.rootNode);\n return violations;\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\n\n// .esaignore holds one path pattern per line, relative to the file's own directory (the\n// project root, by convention — same as .gitignore). Blank lines and lines starting with\n// '#' are skipped.\n//\n// decision: supports exactly two pattern shapes — a literal path/directory (matches\n// itself, and everything under it if it's a directory; a bare name with no '/' also\n// matches at any depth, like gitignore) and a single-segment basename glob containing '*'\n// (e.g. `*.generated.ts`) — not a full gitignore engine (no negation, no '**', no brace\n// expansion), matching scan.ts's existing minimal-glob philosophy (see its\n// expandGlobLike) rather than pulling in a dependency.\nexport const ESAIGNORE_FILENAME = '.esaignore';\n\nexport function loadIgnorePatterns(rootDir: string): string[] {\n const ignorePath = path.join(rootDir, ESAIGNORE_FILENAME);\n if (!fs.existsSync(ignorePath)) {\n return [];\n }\n return fs\n .readFileSync(ignorePath, 'utf8')\n .split('\\n')\n .map((line) => line.trim())\n .filter((line) => line.length > 0 && !line.startsWith('#'))\n .map((line) => line.replace(/\\/+$/, ''));\n}\n\nfunction matchesLiteralPattern(relPath: string, pattern: string): boolean {\n if (pattern.includes('/')) {\n return relPath === pattern || relPath.startsWith(`${pattern}/`);\n }\n return relPath.split('/').includes(pattern);\n}\n\nfunction basenameGlobToRegExp(pattern: string): RegExp {\n const escaped = pattern\n .split('*')\n .map((part) => part.replace(/[.+?^${}()|[\\]\\\\]/g, '\\\\$&'))\n .join('.*');\n return new RegExp(`^${escaped}$`);\n}\n\n// Whether `absolutePath` (a file or directory) matches any pattern loaded via\n// loadIgnorePatterns, rooted at `rootDir`.\nexport function isIgnored(absolutePath: string, rootDir: string, patterns: string[]): boolean {\n if (patterns.length === 0) {\n return false;\n }\n const relPath = path.relative(rootDir, absolutePath).split(path.sep).join('/');\n const basename = path.basename(absolutePath);\n\n return patterns.some((pattern) =>\n pattern.includes('*') ? basenameGlobToRegExp(pattern).test(basename) : matchesLiteralPattern(relPath, pattern)\n );\n}\n","// Offset-to-line/column conversion that doesn't depend on vscode.TextDocument,\n// so detectors can run both inside the extension and in a headless CLI.\n//\n// decision: binary-searches precomputed line-start offsets instead of using vscode.TextDocument.positionAt — keeps detectors host-independent (see cli.ts)\n\nexport interface Position {\n line: number;\n column: number;\n}\n\nexport interface PositionLookup {\n toPosition(offset: number): Position;\n}\n\nexport function createPositionLookup(sourceText: string): PositionLookup {\n const lineStartOffsets: number[] = [0];\n for (let i = 0; i < sourceText.length; i++) {\n if (sourceText[i] === '\\n') {\n lineStartOffsets.push(i + 1);\n }\n }\n\n return {\n toPosition(offset: number): Position {\n let low = 0;\n let high = lineStartOffsets.length - 1;\n while (low < high) {\n const mid = Math.ceil((low + high) / 2);\n if (lineStartOffsets[mid] <= offset) {\n low = mid;\n } else {\n high = mid - 1;\n }\n }\n return { line: low, column: offset - lineStartOffsets[low] };\n }\n };\n}\n","import { EnergyViolation } from '../types';\nimport { SeverityCounts, emptyCounts } from './severityCounts';\n\n// invariant: this module must not import fs/child_process/vscode — it only aggregates and\n// renders data the caller already has, so it stays testable with hand-built fixtures\n// (see src/test/integration/report.test.ts) and reusable from both the CLI's scan and diff modes\n//\n// decision: split into report.ts (aggregate scoring + markdown table), reportDiff.ts (base/head\n// diffing), and reportHuman.ts (the human-readable risk report) — the combined file had grown to\n// 16 functions across three largely independent domains, which is exactly the sprawl this tool's\n// own coherence detector flags. This file re-exports the other two so existing imports of\n// './report' keep working unchanged.\n\nexport interface FileResult {\n filePath: string;\n violations: EnergyViolation[];\n}\n\nexport type { SeverityCounts };\n\nexport interface FileSummary {\n filePath: string;\n score: number;\n counts: SeverityCounts;\n byType: Record<string, number>;\n}\n\nexport interface AggregateSummary {\n files: FileSummary[];\n totalScore: number;\n totalCounts: SeverityCounts;\n}\n\n// decision: weights (1/4/9) make high-severity violations dominate the score without parsing\n// numeric complexity out of detector message strings — see src/core/detectors/cyclomatic.ts and\n// cognitive.ts, which only embed their numeric complexity in `message`, not as a structured field.\n// invariant: these weights are load-bearing for diff continuity (diffSummaries below) — changing\n// them changes the meaning of a previously reported delta, so treat this as a versioned constant.\nconst SEVERITY_WEIGHT: SeverityCounts = { low: 1, medium: 4, high: 9 };\n\nexport function summarizeFile(result: FileResult): FileSummary {\n const counts = emptyCounts();\n const byType: Record<string, number> = {};\n\n for (const violation of result.violations) {\n counts[violation.severity] += 1;\n byType[violation.type] = (byType[violation.type] ?? 0) + 1;\n }\n\n const score =\n counts.low * SEVERITY_WEIGHT.low + counts.medium * SEVERITY_WEIGHT.medium + counts.high * SEVERITY_WEIGHT.high;\n\n return { filePath: result.filePath, score, counts, byType };\n}\n\nexport function summarize(results: FileResult[]): AggregateSummary {\n const files = results.map(summarizeFile);\n const totalCounts = emptyCounts();\n let totalScore = 0;\n\n for (const file of files) {\n totalScore += file.score;\n totalCounts.low += file.counts.low;\n totalCounts.medium += file.counts.medium;\n totalCounts.high += file.counts.high;\n }\n\n return { files, totalScore, totalCounts };\n}\n\nexport function hasBlockingViolations(counts: SeverityCounts): boolean {\n return counts.medium > 0 || counts.high > 0;\n}\n\nexport function renderMarkdownReport(summary: AggregateSummary): string {\n const cleanCount = summary.files.filter((f) => f.score === 0).length;\n const lines: string[] = [];\n\n lines.push('# Energy State Report');\n lines.push('');\n lines.push(\n `**${summary.files.length} file${summary.files.length === 1 ? '' : 's'} scanned** — ${cleanCount} clean, ${summary.files.length - cleanCount} with violations`\n );\n lines.push('');\n lines.push('| File | Score | High | Medium | Low |');\n lines.push('| --- | --- | --- | --- | --- |');\n\n for (const file of summary.files) {\n lines.push(\n `| ${file.filePath} | ${file.score} | ${file.counts.high} | ${file.counts.medium} | ${file.counts.low} |`\n );\n }\n\n lines.push('');\n lines.push(\n `**Total score: ${summary.totalScore}** (${summary.totalCounts.high} high, ${summary.totalCounts.medium} medium, ${summary.totalCounts.low} low)`\n );\n\n return lines.join('\\n');\n}\n\nexport * from './reportDiff';\nexport * from './reportHuman';\n","// decision: split out of report.ts (base/head diffing and its markdown rendering) so the\n// aggregate-scoring, diff, and human-report domains each live in their own file — see the\n// coherence note in report.ts\nimport type { FileSummary } from './report';\n\nexport interface DiffEntry {\n filePath: string;\n baseScore: number | null;\n headScore: number;\n delta: number;\n status: 'new' | 'improved' | 'worsened' | 'unchanged';\n}\n\n// decision: keyed by filePath so callers can pass base/head summaries independently sized -\n// a file present only in head (baseScore null) is reported as 'new' rather than dropped\nexport function diffSummaries(base: FileSummary[], head: FileSummary[]): DiffEntry[] {\n const baseByPath = new Map(base.map((f) => [f.filePath, f.score]));\n\n return head.map((file) => {\n const baseScore = baseByPath.get(file.filePath) ?? null;\n const delta = baseScore === null ? file.score : file.score - baseScore;\n const status: DiffEntry['status'] =\n baseScore === null ? 'new' : delta < 0 ? 'improved' : delta > 0 ? 'worsened' : 'unchanged';\n\n return { filePath: file.filePath, baseScore, headScore: file.score, delta, status };\n });\n}\n\nconst STATUS_ICON: Record<DiffEntry['status'], string> = {\n new: '🆕',\n improved: '🟢',\n worsened: '🔴',\n unchanged: '⚪'\n};\n\nconst EMPTY_STATUS_COUNTS: Record<DiffEntry['status'], number> = { new: 0, improved: 0, worsened: 0, unchanged: 0 };\n\nexport function renderDiffMarkdown(entries: DiffEntry[], baseRef: string): string {\n const lines: string[] = [];\n\n lines.push(`# Energy State Diff vs \\`${baseRef}\\``);\n lines.push('');\n lines.push('| File | Base | Head | Δ | Status |');\n lines.push('| --- | --- | --- | --- | --- |');\n\n for (const entry of entries) {\n const base = entry.baseScore === null ? '—' : String(entry.baseScore);\n const delta = entry.baseScore === null ? '—' : entry.delta > 0 ? `+${entry.delta}` : String(entry.delta);\n lines.push(\n `| ${entry.filePath} | ${base} | ${entry.headScore} | ${delta} | ${STATUS_ICON[entry.status]} ${entry.status} |`\n );\n }\n\n // decision: tallies every status in one pass over a Record rather than three separate\n // `entries.filter(e => e.status === '...').length` calls — besides being cheaper, it avoids\n // repeating e.status against string literals, which the primitive-obsession detector reads\n // as stringly-typed control flow even though DiffEntry['status'] is already a literal union\n const statusCounts = entries.reduce(\n (counts, entry) => {\n counts[entry.status] += 1;\n return counts;\n },\n { ...EMPTY_STATUS_COUNTS }\n );\n\n lines.push('');\n lines.push(\n `_${entries.length} file${entries.length === 1 ? '' : 's'} changed, ${statusCounts.worsened} worsened, ${statusCounts.improved} improved, ${statusCounts.new} new._`\n );\n\n return lines.join('\\n');\n}\n","// decision: split out of report.ts (the human-readable risk report) so the aggregate-scoring,\n// diff, and human-report domains each live in their own file — see the coherence note in\n// report.ts\n//\n// decision: risk is reported on a None/Low/Medium/High/Critical qualitative scale rather than\n// a bespoke label set of our own — it mirrors the levels the existing SEVERITY constants already\n// use, just extended to five tiers, so a reader doesn't have to learn a new vocabulary. Earlier\n// this scale was explicitly framed as CVSS (the vulnerability-scoring standard); that framing was\n// dropped because it made readers think \"why is my code getting a CVE score\", which is the\n// opposite of a scale they should already be able to reason about.\n// decision: the underlying 0.0-10.0 complexity score is a piecewise-linear mapping of\n// the raw complexity number, anchored at README's existing McCabe breakpoints (10/20/50) —\n// see complexityToScore below — so the label is a re-expression of the same,\n// already-documented complexity bands rather than a second, independently-calibrated scale.\n// decision: a file's/report's headline risk is the MAXIMUM complexity value found, not an\n// average — averaging a file's function complexities would let one severely complex function\n// hide behind many trivial ones (nine functions at complexity 2 and one at 60 averages to ~8,\n// \"Low\"), masking exactly the function worth fixing first. Violation *counts* are reported\n// separately as a breadth indicator, deliberately not folded into the same number — this\n// mirrors the README's own Energy (peak intensity) vs Entropy (how spread out) distinction.\nimport { EnergyViolation, SEVERITY, VIOLATION_TYPE } from '../types';\nimport { emptyCounts } from './severityCounts';\nimport type { FileResult } from './report';\n\nexport type RiskLevel = 'none' | 'low' | 'medium' | 'high' | 'critical';\n\n// decision: anchors (value, score) pairs at the exact breakpoints README already documents\n// for cyclomatic complexity (10/20/50), reusing CVSS v3.1's qualitative boundaries\n// (3.9/6.9/8.9/10.0) as the corresponding output scores purely as a convenient 0-10 curve\n// shape — no CVSS terminology is surfaced to the reader — then linearly interpolates between\n// anchors and caps at complexity 100+ = 10.0\n// decision: the anchor scores are deliberately 0.1 below classifyScore's cutoffs (3.9 not 4.0,\n// 6.9 not 7.0, 8.9 not 9.0), not rounded to whole numbers — a complexity of exactly 10/20/50 is\n// the top of its documented band (10 = top of Low, per README), so its score must land just\n// under the next band's cutoff to classify correctly. Rounding these to 4.0/7.0/9.0 would push\n// complexity exactly 10/20/50 into the next band up, silently relabeling the documented\n// breakpoints themselves.\nconst COMPLEXITY_CURVE: { value: number; score: number }[] = [\n { value: 0, score: 0.0 },\n { value: 10, score: 3.9 },\n { value: 20, score: 6.9 },\n { value: 50, score: 8.9 },\n { value: 100, score: 10.0 }\n];\n\n// decision: derived from COMPLEXITY_CURVE's own last anchor rather than re-hardcoded — the cap\n// this function returns for out-of-range input must always agree with the curve it's capping\nconst MAX_COMPLEXITY_VALUE = COMPLEXITY_CURVE[COMPLEXITY_CURVE.length - 1].value;\nconst MAX_COMPLEXITY_SCORE = COMPLEXITY_CURVE[COMPLEXITY_CURVE.length - 1].score;\nconst SCORE_DECIMAL_PRECISION = 10;\n\nexport function complexityToScore(value: number): number {\n if (value <= 0) {\n return 0;\n }\n if (value >= MAX_COMPLEXITY_VALUE) {\n return MAX_COMPLEXITY_SCORE;\n }\n for (let i = 1; i < COMPLEXITY_CURVE.length; i++) {\n const prev = COMPLEXITY_CURVE[i - 1];\n const next = COMPLEXITY_CURVE[i];\n if (value <= next.value) {\n const ratio = (value - prev.value) / (next.value - prev.value);\n return (\n Math.round((prev.score + ratio * (next.score - prev.score)) * SCORE_DECIMAL_PRECISION) /\n SCORE_DECIMAL_PRECISION\n );\n }\n }\n return MAX_COMPLEXITY_SCORE;\n}\n\n// decision: boundaries reuse CVSS v3.1's qualitative rating cutoffs as a scale shape\n// (None 0.0, Low 0.1-3.9, Medium 4.0-6.9, High 7.0-8.9, Critical 9.0-10.0) without labeling\n// the scale itself as CVSS anywhere the reader sees it\nconst RISK_SCORE_CUTOFF: Record<'low' | 'medium' | 'high', number> = {\n low: 4.0,\n medium: 7.0,\n high: 9.0\n};\n\nexport function classifyScore(score: number): RiskLevel {\n if (score <= 0) {\n return 'none';\n }\n if (score < RISK_SCORE_CUTOFF.low) {\n return 'low';\n }\n if (score < RISK_SCORE_CUTOFF.medium) {\n return 'medium';\n }\n if (score < RISK_SCORE_CUTOFF.high) {\n return 'high';\n }\n return 'critical';\n}\n\nexport function classifyComplexityScore(value: number): RiskLevel {\n return classifyScore(complexityToScore(value));\n}\n\nconst RISK_LABEL: Record<RiskLevel, string> = {\n none: 'None',\n low: 'Low',\n medium: 'Medium',\n high: 'High',\n critical: 'Critical'\n};\n\nconst RISK_DESCRIPTION: Record<RiskLevel, string> = {\n none: 'no violations found',\n low: 'simple, easy to test exhaustively',\n medium: 'getting harder to cover with tests',\n high: 'complex, testing all paths is impractical',\n critical: 'effectively untestable'\n};\n\nconst CATEGORY_LABEL: Record<string, string> = {\n [VIOLATION_TYPE.NESTING]: 'Nesting depth',\n [VIOLATION_TYPE.COMPLEXITY]: 'Cyclomatic complexity',\n [VIOLATION_TYPE.COGNITIVE]: 'Cognitive complexity',\n [VIOLATION_TYPE.NAMING]: 'Naming',\n [VIOLATION_TYPE.COHERENCE]: 'File coherence',\n [VIOLATION_TYPE.MAGIC]: 'Magic values',\n [VIOLATION_TYPE.PARAMETERS]: 'Parameter count',\n [VIOLATION_TYPE.INVERSION]: 'Inversion opportunities',\n [VIOLATION_TYPE.PRIMITIVE_OBSESSION]: 'Primitive obsession',\n [VIOLATION_TYPE.MATCH_OPPORTUNITY]: 'Match opportunities',\n [VIOLATION_TYPE.LOGICAL_CONTROL_FLOW]: 'Logical operator as control flow',\n [VIOLATION_TYPE.OPAQUE_BOOLEAN]: 'Opaque boolean literals',\n [VIOLATION_TYPE.SUPPRESSION]: 'Suppression directives'\n};\n\n// decision: only the non-complexity categories get a static blurb — cyclomatic/cognitive\n// findings are described from their own extracted numbers instead (see describeCategory)\nconst CATEGORY_BLURB: Record<string, string> = {\n [VIOLATION_TYPE.NESTING]:\n 'control-flow blocks nested deep enough that a reader has to hold several levels of context in mind at once',\n [VIOLATION_TYPE.NAMING]: 'naming that obscures intent',\n [VIOLATION_TYPE.COHERENCE]:\n 'the file mixes too many responsibilities (too many functions/imports, or too many large functions) to read as one coherent unit',\n [VIOLATION_TYPE.MAGIC]: 'unnamed literals standing in for a value that deserves a name',\n [VIOLATION_TYPE.PARAMETERS]: 'a function with enough parameters that call sites are easy to get wrong',\n [VIOLATION_TYPE.INVERSION]: 'validation/guard logic that would read more clearly as early returns',\n [VIOLATION_TYPE.PRIMITIVE_OBSESSION]:\n 'adjacent same-typed values a caller could silently swap without the compiler noticing',\n [VIOLATION_TYPE.MATCH_OPPORTUNITY]:\n 'an if/elif chain on one variable that would read more clearly as a match/switch',\n [VIOLATION_TYPE.LOGICAL_CONTROL_FLOW]: '&&/|| used to hide an if statement',\n [VIOLATION_TYPE.OPAQUE_BOOLEAN]: 'a bare true/false at a call site that only makes sense by reading the callee',\n [VIOLATION_TYPE.SUPPRESSION]: 'an esa-ignore comment that names an unknown violation type, or no longer matches any violation'\n};\n\nconst COMPLEXITY_VALUE_PATTERN = /complexity: (\\d+)/i;\n\n// decision: extracts the numeric complexity from the violation message rather than adding a\n// structured field to EnergyViolation — see cyclomatic.ts/cognitive.ts, whose message format\n// (`High {cyclomatic|cognitive} complexity: N. ...`) is the only place that number lives today,\n// and both messages are only emitted above their own mediumThreshold, so any match is meaningful\nfunction extractComplexityValue(violation: EnergyViolation): number | undefined {\n if (violation.type !== VIOLATION_TYPE.COMPLEXITY && violation.type !== VIOLATION_TYPE.COGNITIVE) {\n return undefined;\n }\n const match = violation.message.match(COMPLEXITY_VALUE_PATTERN);\n return match ? Number(match[1]) : undefined;\n}\n\nfunction describeComplexityFindings(label: string, violations: EnergyViolation[]): string {\n const values = violations\n .map(extractComplexityValue)\n .filter((value): value is number => value !== undefined)\n .sort((a, b) => b - a);\n\n if (values.length === 0) {\n return '';\n }\n\n const worst = values[0];\n const score = complexityToScore(worst);\n const level = classifyScore(score);\n const countText =\n values.length === 1\n ? `1 function scores ${worst}`\n : `${values.length} functions score ${values.join(', ')} (worst: ${worst})`;\n\n return `- **${label}**: ${countText} — score ${score.toFixed(1)} (${RISK_LABEL[level]}): ${RISK_DESCRIPTION[level]}.`;\n}\n\nfunction describeCategoryFindings(type: string, violations: EnergyViolation[]): string {\n const label = CATEGORY_LABEL[type] ?? type;\n\n if (type === VIOLATION_TYPE.COMPLEXITY || type === VIOLATION_TYPE.COGNITIVE) {\n return describeComplexityFindings(label, violations);\n }\n\n const counts = emptyCounts();\n for (const violation of violations) {\n counts[violation.severity] += 1;\n }\n const severityText = (['high', 'medium', 'low'] as const)\n .filter((severity) => counts[severity] > 0)\n .map((severity) => `${counts[severity]} ${severity}`)\n .join(', ');\n const blurb = CATEGORY_BLURB[type];\n\n return `- **${label}**: ${violations.length} finding${violations.length === 1 ? '' : 's'} (${severityText})${blurb ? ` — ${blurb}` : ''}.`;\n}\n\n// decision: falls back to a fixed severity-based score when a file has no cyclomatic/cognitive\n// violations at all — those detectors don't fire on every file, but a file full of high-severity\n// findings from other detectors still deserves a non-zero score.\n// invariant: the fallback never reaches Critical (score < 9.0) — Critical is reserved for genuinely\n// extreme complexity (>=~93 on the interpolated curve), not for a pattern-based detector's severity\nconst FALLBACK_SEVERITY_SCORE: Record<'high' | 'medium' | 'low', number> = {\n high: 7.5,\n medium: 5.0,\n low: 2.0\n};\n\nfunction fileScore(violations: EnergyViolation[]): number {\n const complexityValues = violations\n .map(extractComplexityValue)\n .filter((value): value is number => value !== undefined);\n\n if (complexityValues.length > 0) {\n return complexityToScore(Math.max(...complexityValues));\n }\n if (violations.some((v) => v.severity === SEVERITY.HIGH)) {\n return FALLBACK_SEVERITY_SCORE.high;\n }\n if (violations.some((v) => v.severity === SEVERITY.MEDIUM)) {\n return FALLBACK_SEVERITY_SCORE.medium;\n }\n if (violations.length > 0) {\n return FALLBACK_SEVERITY_SCORE.low;\n }\n return 0.0;\n}\n\nfunction renderFileSection(result: FileResult): string {\n const lines: string[] = [];\n const score = fileScore(result.violations);\n const risk = classifyScore(score);\n\n lines.push(`## ${result.filePath} — ${RISK_LABEL[risk]} (score ${score.toFixed(1)})`);\n lines.push('');\n\n const byType = new Map<string, EnergyViolation[]>();\n for (const violation of result.violations) {\n const list = byType.get(violation.type) ?? [];\n list.push(violation);\n byType.set(violation.type, list);\n }\n\n for (const [type, violations] of byType) {\n const description = describeCategoryFindings(type, violations);\n if (description) {\n lines.push(description);\n }\n }\n\n return lines.join('\\n');\n}\n\nconst SCORE_LEGEND = [\n '## Score legend',\n '',\n '_Risk is reported on a 0.0–10.0 complexity score, sorted into the same None/Low/Medium/High/Critical levels already used elsewhere in this tool._',\n '',\n '| Score | Risk | Roughly | Cyclomatic/cognitive complexity |',\n '| --- | --- | --- | --- |',\n '| 0.0 | None | No violations found | — |',\n '| 0.1–3.9 | Low | Simple, easy to test exhaustively | 1–10 |',\n '| 4.0–6.9 | Medium | Getting harder to cover with tests | 11–20 |',\n '| 7.0–8.9 | High | Complex, testing all paths is impractical | 21–50 |',\n '| 9.0–10.0 | Critical | Effectively untestable | 50+ |',\n '',\n '_Cyclomatic and cognitive complexity numbers are converted to the score using the ranges above. Other detectors flag a pattern rather than a path count, so a file with no complexity violations of its own instead gets a fixed score from its worst other finding (Low 2.0 / Medium 5.0 / High 7.5)._'\n].join('\\n');\n\nexport function renderHumanReport(results: FileResult[]): string {\n const flagged = results\n .filter((r) => r.violations.length > 0)\n .sort((a, b) => fileScore(b.violations) - fileScore(a.violations));\n const cleanCount = results.length - flagged.length;\n\n const lines: string[] = [];\n lines.push('# Energy State Report');\n lines.push('');\n lines.push(SCORE_LEGEND);\n lines.push('');\n lines.push(\n `**${results.length} file${results.length === 1 ? '' : 's'} scanned** — ${cleanCount} clean, ${flagged.length} flagged`\n );\n lines.push('');\n\n for (const result of flagged) {\n lines.push(renderFileSection(result));\n lines.push('');\n }\n\n lines.push('## Total evaluation');\n lines.push('');\n\n const fileScores = results.map((r) => ({ filePath: r.filePath, score: fileScore(r.violations) }));\n const worst = fileScores.reduce((a, b) => (b.score > a.score ? b : a), { filePath: '', score: 0 });\n const repoLevel = classifyScore(worst.score);\n\n if (worst.score > 0) {\n lines.push(\n `**Repo score: ${worst.score.toFixed(1)} (${RISK_LABEL[repoLevel]})** — driven by the worst file in the scan, \\`${worst.filePath}\\` (${RISK_DESCRIPTION[repoLevel]}).`\n );\n } else {\n lines.push('**Repo score: 0.0 (None)** — no violations were found anywhere in the scan.');\n }\n lines.push('');\n lines.push(\n 'This is the _maximum_ file score, not an average across files — see the note at the top of this report for why an average would hide the file most worth fixing.'\n );\n lines.push('');\n\n const riskCounts: Record<RiskLevel, number> = { none: 0, low: 0, medium: 0, high: 0, critical: 0 };\n for (const { score } of fileScores) {\n riskCounts[classifyScore(score)] += 1;\n }\n\n lines.push('| Risk | Files |');\n lines.push('| --- | --- |');\n lines.push(`| None | ${riskCounts.none} |`);\n lines.push(`| Low | ${riskCounts.low} |`);\n lines.push(`| Medium | ${riskCounts.medium} |`);\n lines.push(`| High | ${riskCounts.high} |`);\n lines.push(`| Critical | ${riskCounts.critical} |`);\n lines.push('');\n\n const totalCounts = emptyCounts();\n for (const result of results) {\n for (const violation of result.violations) {\n totalCounts[violation.severity] += 1;\n }\n }\n const totalFindings = totalCounts.low + totalCounts.medium + totalCounts.high;\n lines.push(\n `**${totalFindings} total finding${totalFindings === 1 ? '' : 's'}** (${totalCounts.high} high, ${totalCounts.medium} medium, ${totalCounts.low} low) — breadth of issues across the scan, independent of peak severity.`\n );\n\n return lines.join('\\n');\n}\n","import * as fs from 'fs';\nimport * as path from 'path';\n\nimport { resolveLanguageForFile } from '../languages';\nimport { isIgnored, loadIgnorePatterns } from './esaignore';\n\n// invariant: this module only touches the filesystem (fs/path) — no tree-sitter, no vscode,\n// no git — so it stays independently testable against src/test/fixtures\n\nconst IGNORED_DIR_NAMES = new Set([\n 'node_modules',\n '.git',\n 'dist',\n 'out',\n 'build',\n '.next',\n 'coverage',\n '.vscode-test'\n]);\n\n// decision: bundles rootDir + ignorePatterns rather than passing them as two adjacent\n// string/string[] parameters — they always travel together, and rootDir sitting next to\n// another string parameter (dir, pattern) at each call site is exactly the swap-risk shape\n// the primitive-obsession detector flags (two consecutive same-typed params a caller could\n// transpose without the type checker complaining)\ninterface IgnoreContext {\n rootDir: string;\n ignorePatterns: string[];\n}\n\nfunction isPathIgnored(targetPath: string, ignore: IgnoreContext): boolean {\n return isIgnored(targetPath, ignore.rootDir, ignore.ignorePatterns);\n}\n\nfunction walkDirectory(dir: string, ignore: IgnoreContext, results: string[]): void {\n for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {\n const fullPath = path.join(dir, entry.name);\n if (IGNORED_DIR_NAMES.has(entry.name) || isPathIgnored(fullPath, ignore)) {\n continue;\n }\n if (entry.isDirectory()) {\n walkDirectory(fullPath, ignore, results);\n } else if (entry.isFile() && resolveLanguageForFile(entry.name)) {\n results.push(fullPath);\n }\n }\n}\n\n// decision: supports exactly one glob shape — a trailing `**/*.ext`-style suffix on an\n// otherwise literal directory prefix — rather than pulling in a general glob-matching\n// dependency. This covers the common \"src/**/*.py\" case; anything with brace expansion,\n// negation, or mid-path wildcards is not a glob engine this function implements.\nfunction expandGlobLike(pattern: string, ignore: IgnoreContext): string[] {\n const starIndex = pattern.indexOf('*');\n const prefixEnd = pattern.lastIndexOf(path.sep, starIndex);\n const prefixDir = prefixEnd === -1 ? '.' : pattern.slice(0, prefixEnd);\n const suffix = pattern.slice(pattern.lastIndexOf('.'));\n const extension = suffix.startsWith('.') && !suffix.includes('*') ? suffix : undefined;\n\n if (!fs.existsSync(prefixDir) || !fs.statSync(prefixDir).isDirectory()) {\n return [];\n }\n\n const results: string[] = [];\n walkDirectory(prefixDir, ignore, results);\n return extension ? results.filter((file) => file.toLowerCase().endsWith(extension.toLowerCase())) : results;\n}\n\n// Expands file/directory/glob-like CLI arguments into a deduplicated, sorted list of\n// absolute paths to files with a supported extension (see resolveLanguageForFile),\n// excluding anything matched by a `.esaignore` file found in `rootDir` (defaults to the\n// current working directory, mirroring where a CLI invocation expects to find it).\nexport function resolveSupportedFiles(inputs: string[], rootDir: string = process.cwd()): string[] {\n const ignore: IgnoreContext = { rootDir, ignorePatterns: loadIgnorePatterns(rootDir) };\n const results: string[] = [];\n\n for (const input of inputs) {\n if (input.includes('*')) {\n results.push(...expandGlobLike(input, ignore));\n continue;\n }\n\n if (!fs.existsSync(input)) {\n continue;\n }\n\n const stat = fs.statSync(input);\n if (stat.isDirectory()) {\n if (!isPathIgnored(input, ignore)) {\n walkDirectory(input, ignore, results);\n }\n } else if (stat.isFile() && resolveLanguageForFile(input) && !isPathIgnored(input, ignore)) {\n results.push(input);\n }\n }\n\n const absolute = results.map((file) => path.resolve(file));\n return Array.from(new Set(absolute)).sort();\n}\n","// decision: split out of report.ts so the low/medium/high tally shape and its zero-value\n// constructor can be shared by report.ts's aggregate scoring and reportHuman.ts's human-readable\n// rendering without either module importing the other (see report.ts for the coherence split)\nexport type SeverityCounts = Record<'low' | 'medium' | 'high', number>;\n\nexport function emptyCounts(): SeverityCounts {\n return { low: 0, medium: 0, high: 0 };\n}\n","import { EnergyViolation, VIOLATION_TYPE } from '../types';\n\n// decision: parsed by scanning raw source lines with a regex instead of walking the tree-sitter\n// AST — the comment node type differs per grammar (see LanguageAdapter.nodeTypes.comment) but the\n// esa-ignore marker text itself is identical across languages, so a text scan avoids needing a\n// per-language comment-node lookup just to find `//` and `#` comments.\nconst DIRECTIVE_PATTERN = /(\\/\\/|#)\\s*esa-ignore(-file)?(?::\\s*([\\w,\\s-]+))?/;\n\nconst KNOWN_TYPES: Set<string> = new Set(Object.values(VIOLATION_TYPE));\n\nexport interface Suppression {\n // 0-indexed line the directive comment itself sits on (matches EnergyViolation.line).\n line: number;\n column: number;\n scope: 'line' | 'file';\n types: string[] | 'all';\n unknownTypes: string[];\n // Whether the directive is the only content on its line — see isCoveredBy below.\n standalone: boolean;\n}\n\n// decision: an explicit but entirely-unrecognized type list (e.g. a typo'd `esa-ignore:\n// nseting`) resolves to an empty list, not a fallback to 'all' — falling back to 'all' would\n// make a typo silently suppress *more* than intended instead of less, which is the opposite of\n// the \"keep suppression honest\" goal (see the unused-directive note this produces below). Only\n// a bare directive with no colon at all means \"suppress every type\".\nfunction parseTypeList(raw: string | undefined): { types: string[] | 'all'; unknownTypes: string[] } {\n if (!raw) {\n return { types: 'all', unknownTypes: [] };\n }\n const tokens = raw.split(',').map(token => token.trim()).filter(Boolean);\n const types = tokens.filter(token => KNOWN_TYPES.has(token));\n const unknownTypes = tokens.filter(token => !KNOWN_TYPES.has(token));\n return { types, unknownTypes };\n}\n\nexport function parseSuppressions(sourceText: string): Suppression[] {\n const lines = sourceText.split('\\n');\n const suppressions: Suppression[] = [];\n\n lines.forEach((lineText, line) => {\n const match = DIRECTIVE_PATTERN.exec(lineText);\n if (!match) {\n return;\n }\n const { types, unknownTypes } = parseTypeList(match[3]);\n suppressions.push({\n line,\n column: match.index,\n scope: match[2] ? 'file' : 'line',\n types,\n unknownTypes,\n standalone: lineText.slice(0, match.index).trim() === ''\n });\n });\n\n return suppressions;\n}\n\n// decision: a standalone directive (nothing but the comment on its line) also covers the next\n// line — lets a suppression read naturally placed above a multi-line construct's header (a\n// function signature, an if-condition) instead of forcing it onto an already-long code line.\nfunction coversLine(suppression: Suppression, violationLine: number): boolean {\n if (suppression.scope === 'file') {\n return true;\n }\n if (violationLine === suppression.line) {\n return true;\n }\n return suppression.standalone && violationLine === suppression.line + 1;\n}\n\nfunction matchesType(suppression: Suppression, type: string): boolean {\n return suppression.types === 'all' || suppression.types.includes(type);\n}\n\nexport interface ApplySuppressionsResult {\n violations: EnergyViolation[];\n suppressionNotes: EnergyViolation[];\n}\n\n// decision: returns unused/unknown-type directives as their own low-severity violations (rather\n// than silently dropping them) — an esa-ignore that stopped matching anything (the violation was\n// fixed, or the type name was mistyped) is exactly the kind of stale suppression that should be\n// visible, not a silent no-op that quietly keeps working \"by accident\".\nexport function applySuppressions(violations: EnergyViolation[], sourceText: string): ApplySuppressionsResult {\n const suppressions = parseSuppressions(sourceText);\n if (suppressions.length === 0) {\n return { violations, suppressionNotes: [] };\n }\n\n const suppressedCounts = new Map<Suppression, number>(suppressions.map(s => [s, 0]));\n\n const remaining = violations.filter(violation => {\n const match = suppressions.find(s => coversLine(s, violation.line) && matchesType(s, violation.type));\n if (!match) {\n return true;\n }\n suppressedCounts.set(match, (suppressedCounts.get(match) ?? 0) + 1);\n return false;\n });\n\n const suppressionNotes: EnergyViolation[] = [];\n for (const suppression of suppressions) {\n if (suppression.unknownTypes.length > 0) {\n suppressionNotes.push({\n line: suppression.line,\n column: suppression.column,\n type: VIOLATION_TYPE.SUPPRESSION,\n severity: 'low',\n message: `esa-ignore names unknown violation type(s): ${suppression.unknownTypes.join(', ')}.`\n });\n }\n if ((suppressedCounts.get(suppression) ?? 0) === 0) {\n const scopeText = suppression.scope === 'file' ? 'file-wide ' : '';\n suppressionNotes.push({\n line: suppression.line,\n column: suppression.column,\n type: VIOLATION_TYPE.SUPPRESSION,\n severity: 'low',\n message: `Unused ${scopeText}esa-ignore — no matching violation found. Remove it or fix the type list.`\n });\n }\n }\n\n return { violations: remaining, suppressionNotes };\n}\n","import { LanguageAdapter } from '../core/language';\n\n// tree-sitter-fsharp has no block/body wrapper node — an if/for/while's\n// branches are direct expression children of the construct itself (there's\n// no equivalent of Python's `block` or TypeScript's `statement_block`), and\n// `else` isn't a distinct node type either (an else-if chain is just a\n// nested if_expression in the `else` position). Boolean operators (&&/||)\n// aren't their own node type: they're an `infix_expression` whose `infix_op`\n// child's text happens to be \"&&\" or \"||\", same shape as `+`/`-`/etc.\n//\n// decision: checks for a function_declaration_left child in isFunctionDefinition rather than matching function_or_value_defn alone — that node type also covers plain `let`/`let!` bindings (via value_declaration_left), and without the check every nested `let`/`let!` inside a function body (e.g. inside a MailboxProcessor `actor { let! msg = ... }`) would be misidentified as its own nested closure\n// invariant: a nested let/let! binding never inflates the enclosing function's cognitive complexity or nesting depth — only bindings with a function_declaration_left child count as a function\n//\n// assumption: any literal that is the direct value of a `let` binding (top-level or nested) is already named and not flagged as a magic value — broader than Python's module-only rule, since function_or_value_defn -> declaration_expression looks identical at every scope, but still aligned with the detector's intent that `let NAME = ...` IS F#'s idiomatic way to name a constant\nexport const FSHARP: LanguageAdapter = {\n id: 'fsharp',\n grammarPath: 'grammars/tree-sitter-fsharp.wasm',\n nodeTypes: {\n block: null,\n parameters: 'argument_patterns',\n ifStatement: 'if_expression',\n elseClause: null,\n forStatement: 'for_expression',\n whileStatement: 'while_expression',\n conditionalExpression: null, // ternary-position `if` reuses if_expression, already covered\n lambda: 'fun_expression',\n importStatement: 'import_decl', // `open X`\n importFromStatement: null,\n expressionStatement: null, // F# has no string-literal docstring convention\n assignment: 'function_or_value_defn',\n module: 'declaration_expression',\n exportStatement: null,\n comment: 'line_comment',\n integerLiteral: 'int',\n floatLiteral: 'float',\n stringLiteral: 'string'\n },\n isFunctionDefinition(node: any): boolean {\n return (\n node?.type === 'function_or_value_defn' &&\n node.children?.some((child: any) => child.type === 'function_declaration_left')\n );\n },\n parameterChildTypes: ['long_identifier', 'typed_pattern'],\n decisionNodeTypes: [\n 'if_expression',\n 'elif_expression',\n 'for_expression',\n 'while_expression',\n 'try_expression',\n 'match_expression'\n ],\n cognitiveNestedDecisionTypes: [\n 'if_expression',\n 'elif_expression',\n 'for_expression',\n 'while_expression',\n 'try_expression',\n 'match_expression'\n ],\n nestingControlTypes: [\n 'if_expression',\n 'elif_expression',\n 'for_expression',\n 'while_expression',\n 'try_expression',\n 'match_expression'\n ],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'infix_expression') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === 'infix_op');\n if (opToken?.text === '&&') {\n return 'and';\n }\n if (opToken?.text === '||') {\n return 'or';\n }\n return null;\n },\n // No block wrapper exists, so every child of a decision point is nested content.\n entersNestedScope(): boolean {\n return true;\n },\n // F#'s try_expression has no else-branch construct.\n isTryElseClause(): boolean {\n return false;\n },\n // long_identifier_or_op's own .text is already the bare (possibly dotted) name, so\n // it's used as-is rather than unwrapped down to a leaf identifier.\n variableReferenceNodeTypes: ['long_identifier_or_op'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'typed_pattern') {\n return null;\n }\n const patternNode = node.children.find((c: any) => c.type === 'identifier_pattern');\n const typeNode = node.children.find((c: any) => c.type === 'simple_type');\n if (!patternNode || !typeNode) {\n return null;\n }\n return { name: patternNode.text, type: typeNode.text };\n },\n primitiveTypeNames: new Set(['string', 'int', 'float', 'bool']),\n // F#'s named-argument syntax is optional at the call site, so it doesn't prevent a\n // future positional call — not a valid swap-risk mitigation. See language.ts's field doc.\n keywordOnlyBoundaryTypes: [],\n distinctTypeAdvice: 'a single-case union type',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'infix_expression') {\n return [];\n }\n const opToken = node.children.find((c: any) => c.type === 'infix_op');\n if (!opToken || opToken.text !== '=') {\n return [];\n }\n const operands = node.children.filter((c: any) => c.type !== 'infix_op');\n if (operands.length !== 2) {\n return [];\n }\n const [left, rawRight] = operands;\n // Literals are wrapped in a `const` node; unwrap so callers can compare\n // .type against nodeTypes.stringLiteral directly, same as Python/TS.\n const right = rawRight.type === 'const' && rawRight.children?.length === 1 ? rawRight.children[0] : rawRight;\n return [{ left, right }];\n },\n // F# has no `x in (a, b, c)`-style membership construct; repeated equality checks\n // (e.g. an elif chain) still accumulate via getEqualityComparisons.\n getMembershipComparisons(): Array<{ left: any; values: string[] }> {\n return [];\n },\n getElseIfBranches(node: any): any[] {\n return node?.children?.filter((c: any) => c.type === 'elif_expression') ?? [];\n },\n // F# indexes via `.[i]` rather than a dedicated subscript node — left unmodeled rather\n // than guessed at with a fragile node-type match.\n subscriptNodeTypes: [],\n // F# also has interpolated ($\"...\") strings, but they aren't distinguished from plain\n // strings here — a known gap, same tradeoff as leaving callNodeTypes unmodeled above.\n isFormattedOrInterpolatedString(): boolean {\n return false;\n },\n isDefaultParameterValue(): boolean {\n return false;\n },\n // A bool literal parses as a `const` node wrapping a `bool` child (its .text is\n // already \"true\"/\"false\", same as Python/TS's dedicated literal node types).\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'const' && node.children?.length === 1 && node.children[0]?.type === 'bool';\n },\n // F# has no dedicated call-expression or argument-list node — curried application\n // (`f true`) and paren-tuple application (`f(true, x)`) both parse as\n // application_expression, and named-argument syntax (`retries = true`) reuses the\n // same infix_expression node the primitive-obsession detector treats as equality\n // elsewhere in this grammar. Three shapes count as \"positional\":\n // 1. curried: `application_expression(callee, true)` — the literal is the\n // argument (not callee) child of an application_expression directly.\n // 2. paren, single arg: `f(true)` — same shape as (1), the parens contribute no\n // extra node.\n // 3. paren, multiple args: `f(true, x)` — the literal is a direct element of a\n // `tuple_expression` that is itself an application_expression's argument.\n // A named argument's literal sits one level deeper, inside `infix_expression`\n // (case 1/2's `application_expression` child, or case 3's `tuple_expression`\n // element) — never a direct child of either, so it never matches below without a\n // separate \"is labeled\" check.\n isPositionalCallArgument(node: any): boolean {\n const parent = node?.parent;\n if (parent?.type === 'application_expression') {\n // Guard against the literal being the callee itself — never true in\n // practice (a bool can't be applied to arguments), kept for safety.\n return parent.children?.[0]?.id !== node.id;\n }\n return parent?.type === 'tuple_expression' && parent.parent?.type === 'application_expression';\n },\n // F# has no compile-time-constant marker distinct from an ordinary `let` binding —\n // module-scope binding is the only signal here.\n isExplicitConstant(): boolean {\n return false;\n }\n};\n","import { LanguageAdapter } from '../core/language';\nimport { PYTHON } from './python';\nimport { FSHARP } from './fsharp';\nimport { TYPESCRIPT } from './typescript';\nimport { KOTLIN } from './kotlin';\n\n// decision: keys LANGUAGES by vscode languageId rather than file extension — the extension host already resolves languageId, and resolveLanguageForFile below provides the file-extension equivalent for the CLI\nexport const LANGUAGES: Record<string, LanguageAdapter> = {\n python: PYTHON,\n fsharp: FSHARP,\n typescript: TYPESCRIPT,\n kotlin: KOTLIN\n};\n\nconst EXTENSION_TO_LANGUAGE_ID: Record<string, string> = {\n '.py': 'python',\n '.fs': 'fsharp',\n '.fsx': 'fsharp',\n '.fsi': 'fsharp',\n '.ts': 'typescript',\n '.kt': 'kotlin',\n '.kts': 'kotlin'\n};\n\nexport function resolveLanguageForFile(fileName: string): LanguageAdapter | undefined {\n const dotIndex = fileName.lastIndexOf('.');\n if (dotIndex === -1) {\n return undefined;\n }\n const extension = fileName.slice(dotIndex).toLowerCase();\n const languageId = EXTENSION_TO_LANGUAGE_ID[extension];\n return languageId ? LANGUAGES[languageId] : undefined;\n}\n","import { LanguageAdapter } from '../core/language';\n\n// tree-sitter-kotlin (tree-sitter-grammars/tree-sitter-kotlin, v1.1.0) has a real\n// block wrapper like Python/TS, but its `else` is a bare keyword token with no\n// wrapper node at all: an `else if` chain's next `if_expression` is a direct\n// child of the previous one, not nested inside an else_clause (TS) nor a flat\n// elif sibling (Python/F#). See the ADC in matchOpportunity.ts's\n// collectChainBranches and inversion.ts's hasElse check for how that third shape\n// is handled — this adapter alone (elseClause: null, getElseIfBranches: []) is\n// not sufficient for those two detectors, unlike every other adapter.\nexport const KOTLIN: LanguageAdapter = {\n id: 'kotlin',\n grammarPath: 'grammars/tree-sitter-kotlin.wasm',\n nodeTypes: {\n block: 'block',\n parameters: 'function_value_parameters',\n ifStatement: 'if_expression',\n elseClause: null,\n forStatement: 'for_statement',\n whileStatement: 'while_statement',\n // if_expression already covers ternary-style use (Kotlin has no separate ternary node)\n conditionalExpression: null,\n lambda: 'lambda_literal',\n importStatement: 'import',\n importFromStatement: null,\n expressionStatement: null,\n // decision: 'property_declaration' (val/var NAME = value), not 'assignment' (bare\n // reassignment `x = 5`, no val/var) — the only consumer (magicNumber.ts's\n // isInConstantContext) wants \"is this literal the value of a named declaration\", which\n // is what Python's `assignment`/TS's `lexical_declaration` mean there too\n assignment: 'property_declaration',\n module: 'source_file',\n exportStatement: null,\n // grammar splits line_comment/block_comment; this single-string field can only\n // name one — block comments are a minor documented gap (inversion.ts's statement\n // filter is the only consumer, and only for a comment as literally the first line)\n comment: 'line_comment',\n integerLiteral: 'number_literal',\n floatLiteral: 'float_literal',\n stringLiteral: 'string_literal'\n },\n isFunctionDefinition(node: any): boolean {\n return node?.type === 'function_declaration';\n },\n parameterChildTypes: ['parameter'],\n decisionNodeTypes: ['if_expression', 'for_statement', 'while_statement', 'when_expression', 'catch_block'],\n cognitiveNestedDecisionTypes: [\n 'if_expression',\n 'for_statement',\n 'while_statement',\n 'when_expression',\n 'catch_block'\n ],\n nestingControlTypes: ['if_expression', 'for_statement', 'while_statement', 'try_expression'],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'binary_expression') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === '&&' || c.type === '||');\n if (!opToken) {\n return null;\n }\n return opToken.type === '&&' ? 'and' : 'or';\n },\n entersNestedScope(node: any): boolean {\n return node?.type === 'block';\n },\n // Kotlin's try/catch has no else-branch construct.\n isTryElseClause(): boolean {\n return false;\n },\n variableReferenceNodeTypes: ['identifier', 'navigation_expression'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'parameter') {\n return null;\n }\n const nameNode = node.children.find((c: any) => c.type === 'identifier');\n const typeNode = node.children.find((c: any) => c.type === 'user_type');\n if (!nameNode || !typeNode) {\n return null;\n }\n const typeIdentifier = typeNode.children?.find((c: any) => c.type === 'identifier');\n if (!typeIdentifier) {\n return null;\n }\n return { name: nameNode.text, type: typeIdentifier.text };\n },\n primitiveTypeNames: new Set(['Int', 'Long', 'Short', 'Byte', 'Double', 'Float', 'Boolean', 'String', 'Char']),\n // Kotlin has no enforced-keyword-only parameter syntax (named arguments are optional\n // at the call site) — see language.ts's field doc, same reasoning as F#.\n keywordOnlyBoundaryTypes: [],\n // decision: only suggests value class, not typealias — a typealias is just a synonym (the\n // compiler still sees the underlying primitive), so it wouldn't actually catch the swap this\n // warning is about, unlike Python's NewType/TS's branded type/F#'s single-case union, which\n // this field's other adapters correctly point to\n distinctTypeAdvice: 'a value class (@JvmInline value class)',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'binary_expression') {\n return [];\n }\n const opToken = node.children.find((c: any) => c.type === '==' || c.type === '===');\n if (!opToken) {\n return [];\n }\n const operands = node.children.filter((c: any) => c !== opToken);\n if (operands.length !== 2) {\n return [];\n }\n return [{ left: operands[0], right: operands[1] }];\n },\n // Kotlin's set-membership idiom (`x in listOf(...)`) is an in_expression whose right side\n // is normally a call_expression, not a literal collection — not modeled here, same\n // precedent as typescript.ts. Repeated equality checks still accumulate via\n // getEqualityComparisons.\n getMembershipComparisons(): Array<{ left: any; values: string[] }> {\n return [];\n },\n // No flat elif node exists — Kotlin's chain is walked via the bare-nested-if fallback in\n // matchOpportunity.ts's collectChainBranches instead.\n getElseIfBranches(): any[] {\n return [];\n },\n subscriptNodeTypes: ['index_expression'],\n isFormattedOrInterpolatedString(node: any): boolean {\n return node?.children?.some((c: any) => c.type === 'interpolation') ?? false;\n },\n isDefaultParameterValue(node: any): boolean {\n // decision: compares node identity by `.id`, not `===` — see the matching comment in\n // python.ts's isFormattedOrInterpolatedString for why\n // decision: a default value isn't nested inside the `parameter` node itself —\n // function_value_parameters is a flat seq(parameter_modifiers?, parameter, ('=' expr)?),\n // so the default value's siblings (not ancestors) are the '=' token and the parameter\n const parent = node?.parent;\n if (parent?.type !== 'function_value_parameters') {\n return false;\n }\n const siblings = parent.children ?? [];\n const index = siblings.findIndex((c: any) => c.id === node.id);\n return index >= 2 && siblings[index - 1]?.type === '=' && siblings[index - 2]?.type === 'parameter';\n },\n // decision: true/false have no dedicated literal node in this grammar — they lex as plain\n // `identifier` tokens (verified: no boolean_literal rule exists). Safe to key off text since\n // true/false are hard keywords in Kotlin, not shadowable identifiers.\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'identifier' && (node.text === 'true' || node.text === 'false');\n },\n // decision: every call argument (named or positional) wraps in `value_argument`, so unlike\n // the other adapters' direct-parent check, this also has to rule out a named argument\n // (`retries = true`) by checking the literal is value_argument's *first* child — a named\n // argument's value_argument instead starts with `identifier '='` before the value.\n isPositionalCallArgument(node: any): boolean {\n const valueArgument = node?.parent;\n if (valueArgument?.type !== 'value_argument' || valueArgument.parent?.type !== 'value_arguments') {\n return false;\n }\n if (valueArgument.parent.parent?.type !== 'call_expression') {\n return false;\n }\n return valueArgument.children?.[0]?.id === node.id;\n },\n // decision: `const val` is an explicit, compiler-enforced compile-time-constant marker —\n // unlike the module-scope heuristic isInConstantContext (magicNumber.ts) otherwise relies\n // on, this is valid at ANY nesting depth (a companion object's `const val` is just as much\n // a real constant as a top-level one), so it's checked as its own signal rather than folded\n // into that scope walk.\n isExplicitConstant(node: any): boolean {\n if (node?.type !== 'property_declaration') {\n return false;\n }\n const modifiers = node.children?.find((c: any) => c.type === 'modifiers');\n return (\n modifiers?.children?.some(\n (modifier: any) =>\n modifier.type === 'property_modifier' && modifier.children?.some((c: any) => c.type === 'const')\n ) ?? false\n );\n }\n};\n","import { LanguageAdapter } from '../core/language';\n\nexport const PYTHON: LanguageAdapter = {\n id: 'python',\n grammarPath: 'grammars/tree-sitter-python.wasm',\n nodeTypes: {\n block: 'block',\n parameters: 'parameters',\n ifStatement: 'if_statement',\n elseClause: 'else_clause',\n forStatement: 'for_statement',\n whileStatement: 'while_statement',\n conditionalExpression: 'conditional_expression',\n lambda: 'lambda',\n importStatement: 'import_statement',\n importFromStatement: 'import_from_statement',\n expressionStatement: 'expression_statement',\n assignment: 'assignment',\n module: 'module',\n exportStatement: null,\n comment: 'comment',\n integerLiteral: 'integer',\n floatLiteral: 'float',\n stringLiteral: 'string'\n },\n isFunctionDefinition(node: any): boolean {\n return node?.type === 'function_definition';\n },\n parameterChildTypes: ['identifier', 'default_parameter'],\n decisionNodeTypes: [\n 'if_statement',\n 'elif_clause',\n 'while_statement',\n 'for_statement',\n 'except_clause',\n 'conditional_expression',\n 'match_statement'\n ],\n cognitiveNestedDecisionTypes: [\n 'if_statement',\n 'elif_clause',\n 'for_statement',\n 'while_statement',\n 'except_clause',\n 'match_statement'\n ],\n nestingControlTypes: [\n 'if_statement',\n 'for_statement',\n 'while_statement',\n 'with_statement',\n 'try_statement',\n 'match_statement'\n ],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'boolean_operator') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === 'and' || c.type === 'or');\n return opToken ? (opToken.type as 'and' | 'or') : null;\n },\n entersNestedScope(node: any): boolean {\n return node?.type === 'block';\n },\n // decision: `else_clause` is shared by if/for/while/try in tree-sitter-python, but only a\n // try's else is a real decision point (mirrors ruff's C901: a non-vacuous try-else adds 1).\n // if/for/while's else already scores 0 via decisionNodeTypes, matching how plain `else`\n // (as opposed to `elif`) is excluded there — this predicate exists to avoid conflating\n // try's else with those.\n isTryElseClause(node: any): boolean {\n return node?.type === 'else_clause' && node?.parent?.type === 'try_statement';\n },\n variableReferenceNodeTypes: ['identifier', 'attribute'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'typed_parameter' && node?.type !== 'typed_default_parameter') {\n return null;\n }\n const nameNode = node.children.find((c: any) => c.type === 'identifier');\n const typeNode = node.children.find((c: any) => c.type === 'type');\n if (!nameNode || !typeNode) {\n return null;\n }\n return { name: nameNode.text, type: typeNode.text };\n },\n primitiveTypeNames: new Set(['str', 'int', 'float', 'bool', 'bytes']),\n keywordOnlyBoundaryTypes: ['keyword_separator', 'list_splat_pattern'],\n distinctTypeAdvice: 'NewType or a dataclass',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'comparison_operator') {\n return [];\n }\n const results: Array<{ left: any; right: any }> = [];\n const children = node.children;\n for (let i = 1; i < children.length - 1; i++) {\n if (children[i].type === '==') {\n results.push({ left: children[i - 1], right: children[i + 1] });\n }\n }\n return results;\n },\n // decision: only Python gets this — TS's equivalent is a `.includes()` call expression\n // (not a comparison node) and F# has no direct construct; both still accumulate distinct\n // literals across separate equality comparisons via getEqualityComparisons.\n getMembershipComparisons(node: any): Array<{ left: any; values: string[] }> {\n if (node?.type !== 'comparison_operator') {\n return [];\n }\n const results: Array<{ left: any; values: string[] }> = [];\n const children = node.children;\n for (let i = 1; i < children.length - 1; i++) {\n if (children[i].type !== 'in') {\n continue;\n }\n const left = children[i - 1];\n const right = children[i + 1];\n if (right.type !== 'tuple' && right.type !== 'list' && right.type !== 'set') {\n continue;\n }\n const values: string[] = [];\n let allStrings = true;\n for (const child of right.children) {\n if (!child.isNamed) {\n continue;\n }\n if (child.type !== 'string') {\n allStrings = false;\n break;\n }\n values.push(child.text.slice(1, -1));\n }\n if (allStrings && values.length > 0) {\n results.push({ left, values });\n }\n }\n return results;\n },\n getElseIfBranches(node: any): any[] {\n return node?.children?.filter((c: any) => c.type === 'elif_clause') ?? [];\n },\n subscriptNodeTypes: ['subscript'],\n isFormattedOrInterpolatedString(node: any): boolean {\n if (node?.children?.some((c: any) => c.type === 'interpolation')) {\n // f-string\n return true;\n }\n // decision: compares node identity by `.id`, not `===` — web-tree-sitter mints a fresh\n // JS wrapper object on every `.children`/`.parent` access, so two accessors that reach\n // the same underlying tree node are not reference-equal even though `.id` matches\n const parent = node?.parent;\n if (\n parent?.type === 'binary_operator' &&\n parent.children?.[0]?.id === node.id &&\n parent.children?.some((c: any) => c.type === '%')\n ) {\n // \"%s\" % value\n return true;\n }\n if (parent?.type === 'attribute' && parent.children?.[0]?.id === node.id) {\n const methodName = parent.children?.find((c: any) => c.type === 'identifier');\n if (methodName?.text === 'format' && parent.parent?.type === 'call') {\n return true;\n }\n }\n return false;\n },\n isDefaultParameterValue(node: any): boolean {\n const parent = node?.parent;\n return (\n (parent?.type === 'default_parameter' || parent?.type === 'typed_default_parameter') &&\n parent.children?.[parent.children.length - 1]?.id === node.id\n );\n },\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'true' || node?.type === 'false';\n },\n // A keyword argument (`retries=True`) wraps the literal in its own `keyword_argument`\n // node, so a labeled boolean's parent is never `argument_list` directly.\n isPositionalCallArgument(node: any): boolean {\n return node?.parent?.type === 'argument_list' && node.parent.parent?.type === 'call';\n },\n // Python has no dedicated compile-time-constant marker — module-scope assignment is the\n // only signal (see isInConstantContext in magicNumber.ts).\n isExplicitConstant(): boolean {\n return false;\n }\n};\n","import { LanguageAdapter } from '../core/language';\n\n// tree-sitter-typescript is structurally close to Python's grammar: real\n// block/body nodes, a distinct else_clause, and and/or (&&/||) each get\n// their own node type as the operator-token child of a binary_expression.\n//\n// decision: treats arrow functions (`(x) => x + 1`) as `lambda`, matching Python's `lambda` — they add structural nesting in cognitive complexity but aren't analyzed by parameter-count/complexity/coherence themselves (same limitation Python already has for its own lambdas); only named `function_declaration`s and class `method_definition`s count as \"a function\" for those detectors\n//\n// tradeoff: accepts a slightly higher cognitive-complexity score for `else if` chains (else_clause's flat +1 plus the nested if's `1 + nesting`) instead of unwrapping single-if else-clauses specially — TypeScript's `else if` parses as `else_clause` wrapping a nested `if_statement`, unlike Python's flat elif sibling\nexport const TYPESCRIPT: LanguageAdapter = {\n id: 'typescript',\n grammarPath: 'grammars/tree-sitter-typescript.wasm',\n nodeTypes: {\n block: 'statement_block',\n parameters: 'formal_parameters',\n ifStatement: 'if_statement',\n elseClause: 'else_clause',\n forStatement: 'for_statement',\n whileStatement: 'while_statement',\n conditionalExpression: 'ternary_expression',\n lambda: 'arrow_function',\n importStatement: 'import_statement',\n importFromStatement: null, // import_statement already covers every import form\n expressionStatement: 'expression_statement',\n assignment: 'lexical_declaration',\n module: 'program',\n exportStatement: 'export_statement',\n comment: 'comment',\n integerLiteral: 'number', // TS doesn't distinguish int/float, both are \"number\"\n floatLiteral: null,\n stringLiteral: 'string'\n },\n isFunctionDefinition(node: any): boolean {\n return node?.type === 'function_declaration' || node?.type === 'method_definition';\n },\n parameterChildTypes: ['required_parameter', 'optional_parameter'],\n decisionNodeTypes: [\n 'if_statement',\n 'for_statement',\n 'for_in_statement',\n 'while_statement',\n 'catch_clause',\n 'ternary_expression'\n ],\n cognitiveNestedDecisionTypes: [\n 'if_statement',\n 'for_statement',\n 'for_in_statement',\n 'while_statement',\n 'catch_clause'\n ],\n nestingControlTypes: ['if_statement', 'for_statement', 'for_in_statement', 'while_statement', 'try_statement'],\n getBooleanOperator(node: any): 'and' | 'or' | null {\n if (!node || node.type !== 'binary_expression') {\n return null;\n }\n const opToken = node.children?.find((c: any) => c.type === '&&' || c.type === '||');\n if (!opToken) {\n return null;\n }\n return opToken.type === '&&' ? 'and' : 'or';\n },\n entersNestedScope(node: any): boolean {\n return node?.type === 'statement_block';\n },\n // JS/TS try/catch has no else-branch construct.\n isTryElseClause(): boolean {\n return false;\n },\n variableReferenceNodeTypes: ['identifier', 'member_expression'],\n extractTypedParameter(node: any): { name: string; type: string } | null {\n if (node?.type !== 'required_parameter' && node?.type !== 'optional_parameter') {\n return null;\n }\n const nameNode = node.children.find((c: any) => c.type === 'identifier');\n const typeAnnotation = node.children.find((c: any) => c.type === 'type_annotation');\n if (!nameNode || !typeAnnotation) {\n return null;\n }\n // type_annotation's children are [':', <the actual type node>]\n const typeNode = typeAnnotation.children.find((c: any) => c.type !== ':');\n if (!typeNode) {\n return null;\n }\n return { name: nameNode.text, type: typeNode.text };\n },\n primitiveTypeNames: new Set(['string', 'number', 'boolean']),\n // TS has no enforced-keyword-only parameter syntax — see language.ts's field doc.\n keywordOnlyBoundaryTypes: [],\n distinctTypeAdvice: 'a branded/nominal type (e.g. a tagged type alias)',\n getEqualityComparisons(node: any): Array<{ left: any; right: any }> {\n if (node?.type !== 'binary_expression') {\n return [];\n }\n const opToken = node.children.find((c: any) => c.type === '===' || c.type === '==');\n if (!opToken) {\n return [];\n }\n const operands = node.children.filter((c: any) => c !== opToken);\n if (operands.length !== 2) {\n return [];\n }\n return [{ left: operands[0], right: operands[1] }];\n },\n // TS's set-membership idiom is `[...].includes(x)`, a call_expression rather than a\n // comparison node — not modeled here; repeated equality checks still accumulate via\n // getEqualityComparisons.\n getMembershipComparisons(): Array<{ left: any; values: string[] }> {\n return [];\n },\n // `else if` has no flat elif node in this grammar — it's a nested if_statement one\n // level inside else_clause, which the match-opportunity detector walks itself.\n getElseIfBranches(): any[] {\n return [];\n },\n subscriptNodeTypes: ['subscript_expression'],\n // TS has no node type where an interpolated/formatted string still shares\n // stringLiteral's node type — template literals parse as `template_string`,\n // which the traversal never visits as a string literal in the first place.\n isFormattedOrInterpolatedString(): boolean {\n return false;\n },\n isDefaultParameterValue(node: any): boolean {\n // decision: compares node identity by `.id`, not `===` — see the matching comment in\n // python.ts's isFormattedOrInterpolatedString for why\n // decision: a parameter with a default value (`x: number = 1`) still parses as\n // `required_parameter`, not `optional_parameter` (that node type is reserved for `x?:\n // number`) — so this checks for the `=` child rather than trusting the parameter's own\n // node type to signal \"has a default\"\n const parent = node?.parent;\n if (parent?.type !== 'required_parameter' && parent?.type !== 'optional_parameter') {\n return false;\n }\n return (\n parent.children?.some((c: any) => c.type === '=') &&\n parent.children?.[parent.children.length - 1]?.id === node.id\n );\n },\n isBooleanLiteral(node: any): boolean {\n return node?.type === 'true' || node?.type === 'false';\n },\n // An object-literal field (`{ retries: true }`) wraps the literal in `pair` inside\n // `object`, so a labeled boolean's parent is never `arguments` directly.\n isPositionalCallArgument(node: any): boolean {\n return node?.parent?.type === 'arguments' && node.parent.parent?.type === 'call_expression';\n },\n // TS's `const` is block-scoping, not a compile-time-constant marker (unlike Kotlin's\n // `const val`) — module-scope lexical_declaration is the only signal here.\n isExplicitConstant(): boolean {\n return false;\n }\n};\n","// Shared types for energy violation detectors (cyclomatic.ts, cognitive.ts, extension.ts)\n\nexport const SEVERITY = {\n LOW: 'low' as const,\n MEDIUM: 'medium' as const,\n HIGH: 'high' as const\n};\n\nexport const VIOLATION_TYPE = {\n NESTING: 'nesting' as const,\n COMPLEXITY: 'complexity' as const,\n COGNITIVE: 'cognitive' as const,\n NAMING: 'naming' as const,\n COHERENCE: 'coherence' as const,\n MAGIC: 'magic' as const,\n PARAMETERS: 'parameters' as const,\n INVERSION: 'inversion' as const,\n PRIMITIVE_OBSESSION: 'primitive-obsession' as const,\n MATCH_OPPORTUNITY: 'match-opportunity' as const,\n LOGICAL_CONTROL_FLOW: 'logical-control-flow' as const,\n OPAQUE_BOOLEAN: 'opaque-boolean' as const,\n SUPPRESSION: 'suppression' as const\n};\n\n// decision: reports per-line weighted hotspots (nesting depth for cognitive, decision density for cyclomatic) alongside the flat complexity score — lets callers paint a progressive heatmap across the function body instead of a single flat highlight, so the worst lines stand out visually\nexport interface ComplexityHotspot {\n line: number;\n weight: number;\n}\n\nexport interface EnergyViolation {\n line: number;\n column: number;\n type:\n | 'nesting'\n | 'complexity'\n | 'cognitive'\n | 'naming'\n | 'coherence'\n | 'magic'\n | 'parameters'\n | 'inversion'\n | 'primitive-obsession'\n | 'match-opportunity'\n | 'logical-control-flow'\n | 'opaque-boolean'\n | 'suppression';\n severity: 'low' | 'medium' | 'high';\n message: string;\n hotspots?: ComplexityHotspot[];\n}\n","module.exports = require(\"child_process\");","module.exports = require(\"fs\");","module.exports = require(\"fs/promises\");","module.exports = require(\"path\");","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __export = (target, all) => {\n for (var name2 in all)\n __defProp(target, name2, { get: all[name2], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// lib/web-tree-sitter.cjs\nvar require_web_tree_sitter = __commonJS({\n \"lib/web-tree-sitter.cjs\"(exports, module) {\n \"use strict\";\n var Module = (() => {\n var _scriptName = typeof document != \"undefined\" ? document.currentScript?.src : void 0;\n return async function(moduleArg = {}) {\n var moduleRtn;\n var Module = moduleArg;\n var ENVIRONMENT_IS_WEB = typeof window == \"object\";\n var ENVIRONMENT_IS_WORKER = typeof WorkerGlobalScope != \"undefined\";\n var ENVIRONMENT_IS_NODE = typeof process == \"object\" && process.versions?.node && process.type != \"renderer\";\n Module.currentQueryProgressCallback = null;\n Module.currentProgressCallback = null;\n Module.currentLogCallback = null;\n Module.currentParseCallback = null;\n var arguments_ = [];\n var thisProgram = \"./this.program\";\n var quit_ = /* @__PURE__ */ __name((status, toThrow) => {\n throw toThrow;\n }, \"quit_\");\n if (typeof __filename != \"undefined\") {\n _scriptName = __filename;\n } else if (ENVIRONMENT_IS_WORKER) {\n _scriptName = self.location.href;\n }\n var scriptDirectory = \"\";\n function locateFile(path) {\n if (Module[\"locateFile\"]) {\n return Module[\"locateFile\"](path, scriptDirectory);\n }\n return scriptDirectory + path;\n }\n __name(locateFile, \"locateFile\");\n var readAsync, readBinary;\n if (ENVIRONMENT_IS_NODE) {\n var fs = require(\"fs\");\n scriptDirectory = __dirname + \"/\";\n readBinary = /* @__PURE__ */ __name((filename) => {\n filename = isFileURI(filename) ? new URL(filename) : filename;\n var ret = fs.readFileSync(filename);\n return ret;\n }, \"readBinary\");\n readAsync = /* @__PURE__ */ __name(async (filename, binary2 = true) => {\n filename = isFileURI(filename) ? new URL(filename) : filename;\n var ret = fs.readFileSync(filename, binary2 ? void 0 : \"utf8\");\n return ret;\n }, \"readAsync\");\n if (process.argv.length > 1) {\n thisProgram = process.argv[1].replace(/\\\\/g, \"/\");\n }\n arguments_ = process.argv.slice(2);\n quit_ = /* @__PURE__ */ __name((status, toThrow) => {\n process.exitCode = status;\n throw toThrow;\n }, \"quit_\");\n } else if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {\n try {\n scriptDirectory = new URL(\".\", _scriptName).href;\n } catch {\n }\n {\n if (ENVIRONMENT_IS_WORKER) {\n readBinary = /* @__PURE__ */ __name((url) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, false);\n xhr.responseType = \"arraybuffer\";\n xhr.send(null);\n return new Uint8Array(\n /** @type{!ArrayBuffer} */\n xhr.response\n );\n }, \"readBinary\");\n }\n readAsync = /* @__PURE__ */ __name(async (url) => {\n if (isFileURI(url)) {\n return new Promise((resolve, reject) => {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = () => {\n if (xhr.status == 200 || xhr.status == 0 && xhr.response) {\n resolve(xhr.response);\n return;\n }\n reject(xhr.status);\n };\n xhr.onerror = reject;\n xhr.send(null);\n });\n }\n var response = await fetch(url, {\n credentials: \"same-origin\"\n });\n if (response.ok) {\n return response.arrayBuffer();\n }\n throw new Error(response.status + \" : \" + response.url);\n }, \"readAsync\");\n }\n } else {\n }\n var out = console.log.bind(console);\n var err = console.error.bind(console);\n var dynamicLibraries = [];\n var wasmBinary;\n var ABORT = false;\n var EXITSTATUS;\n var isFileURI = /* @__PURE__ */ __name((filename) => filename.startsWith(\"file://\"), \"isFileURI\");\n var readyPromiseResolve, readyPromiseReject;\n var wasmMemory;\n var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64;\n var HEAP64, HEAPU64;\n var HEAP_DATA_VIEW;\n var runtimeInitialized = false;\n function updateMemoryViews() {\n var b = wasmMemory.buffer;\n Module[\"HEAP8\"] = HEAP8 = new Int8Array(b);\n Module[\"HEAP16\"] = HEAP16 = new Int16Array(b);\n Module[\"HEAPU8\"] = HEAPU8 = new Uint8Array(b);\n Module[\"HEAPU16\"] = HEAPU16 = new Uint16Array(b);\n Module[\"HEAP32\"] = HEAP32 = new Int32Array(b);\n Module[\"HEAPU32\"] = HEAPU32 = new Uint32Array(b);\n Module[\"HEAPF32\"] = HEAPF32 = new Float32Array(b);\n Module[\"HEAPF64\"] = HEAPF64 = new Float64Array(b);\n Module[\"HEAP64\"] = HEAP64 = new BigInt64Array(b);\n Module[\"HEAPU64\"] = HEAPU64 = new BigUint64Array(b);\n Module[\"HEAP_DATA_VIEW\"] = HEAP_DATA_VIEW = new DataView(b);\n LE_HEAP_UPDATE();\n }\n __name(updateMemoryViews, \"updateMemoryViews\");\n function initMemory() {\n if (Module[\"wasmMemory\"]) {\n wasmMemory = Module[\"wasmMemory\"];\n } else {\n var INITIAL_MEMORY = Module[\"INITIAL_MEMORY\"] || 33554432;\n wasmMemory = new WebAssembly.Memory({\n \"initial\": INITIAL_MEMORY / 65536,\n // In theory we should not need to emit the maximum if we want \"unlimited\"\n // or 4GB of memory, but VMs error on that atm, see\n // https://github.com/emscripten-core/emscripten/issues/14130\n // And in the pthreads case we definitely need to emit a maximum. So\n // always emit one.\n \"maximum\": 32768\n });\n }\n updateMemoryViews();\n }\n __name(initMemory, \"initMemory\");\n var __RELOC_FUNCS__ = [];\n function preRun() {\n if (Module[\"preRun\"]) {\n if (typeof Module[\"preRun\"] == \"function\") Module[\"preRun\"] = [Module[\"preRun\"]];\n while (Module[\"preRun\"].length) {\n addOnPreRun(Module[\"preRun\"].shift());\n }\n }\n callRuntimeCallbacks(onPreRuns);\n }\n __name(preRun, \"preRun\");\n function initRuntime() {\n runtimeInitialized = true;\n callRuntimeCallbacks(__RELOC_FUNCS__);\n wasmExports[\"__wasm_call_ctors\"]();\n callRuntimeCallbacks(onPostCtors);\n }\n __name(initRuntime, \"initRuntime\");\n function preMain() {\n }\n __name(preMain, \"preMain\");\n function postRun() {\n if (Module[\"postRun\"]) {\n if (typeof Module[\"postRun\"] == \"function\") Module[\"postRun\"] = [Module[\"postRun\"]];\n while (Module[\"postRun\"].length) {\n addOnPostRun(Module[\"postRun\"].shift());\n }\n }\n callRuntimeCallbacks(onPostRuns);\n }\n __name(postRun, \"postRun\");\n function abort(what) {\n Module[\"onAbort\"]?.(what);\n what = \"Aborted(\" + what + \")\";\n err(what);\n ABORT = true;\n what += \". Build with -sASSERTIONS for more info.\";\n var e = new WebAssembly.RuntimeError(what);\n readyPromiseReject?.(e);\n throw e;\n }\n __name(abort, \"abort\");\n var wasmBinaryFile;\n function findWasmBinary() {\n return locateFile(\"web-tree-sitter.wasm\");\n }\n __name(findWasmBinary, \"findWasmBinary\");\n function getBinarySync(file) {\n if (file == wasmBinaryFile && wasmBinary) {\n return new Uint8Array(wasmBinary);\n }\n if (readBinary) {\n return readBinary(file);\n }\n throw \"both async and sync fetching of the wasm failed\";\n }\n __name(getBinarySync, \"getBinarySync\");\n async function getWasmBinary(binaryFile) {\n if (!wasmBinary) {\n try {\n var response = await readAsync(binaryFile);\n return new Uint8Array(response);\n } catch {\n }\n }\n return getBinarySync(binaryFile);\n }\n __name(getWasmBinary, \"getWasmBinary\");\n async function instantiateArrayBuffer(binaryFile, imports) {\n try {\n var binary2 = await getWasmBinary(binaryFile);\n var instance2 = await WebAssembly.instantiate(binary2, imports);\n return instance2;\n } catch (reason) {\n err(`failed to asynchronously prepare wasm: ${reason}`);\n abort(reason);\n }\n }\n __name(instantiateArrayBuffer, \"instantiateArrayBuffer\");\n async function instantiateAsync(binary2, binaryFile, imports) {\n if (!binary2 && !isFileURI(binaryFile) && !ENVIRONMENT_IS_NODE) {\n try {\n var response = fetch(binaryFile, {\n credentials: \"same-origin\"\n });\n var instantiationResult = await WebAssembly.instantiateStreaming(response, imports);\n return instantiationResult;\n } catch (reason) {\n err(`wasm streaming compile failed: ${reason}`);\n err(\"falling back to ArrayBuffer instantiation\");\n }\n }\n return instantiateArrayBuffer(binaryFile, imports);\n }\n __name(instantiateAsync, \"instantiateAsync\");\n function getWasmImports() {\n return {\n \"env\": wasmImports,\n \"wasi_snapshot_preview1\": wasmImports,\n \"GOT.mem\": new Proxy(wasmImports, GOTHandler),\n \"GOT.func\": new Proxy(wasmImports, GOTHandler)\n };\n }\n __name(getWasmImports, \"getWasmImports\");\n async function createWasm() {\n function receiveInstance(instance2, module2) {\n wasmExports = instance2.exports;\n wasmExports = relocateExports(wasmExports, 1024);\n var metadata2 = getDylinkMetadata(module2);\n if (metadata2.neededDynlibs) {\n dynamicLibraries = metadata2.neededDynlibs.concat(dynamicLibraries);\n }\n mergeLibSymbols(wasmExports, \"main\");\n LDSO.init();\n loadDylibs();\n __RELOC_FUNCS__.push(wasmExports[\"__wasm_apply_data_relocs\"]);\n assignWasmExports(wasmExports);\n return wasmExports;\n }\n __name(receiveInstance, \"receiveInstance\");\n function receiveInstantiationResult(result2) {\n return receiveInstance(result2[\"instance\"], result2[\"module\"]);\n }\n __name(receiveInstantiationResult, \"receiveInstantiationResult\");\n var info2 = getWasmImports();\n if (Module[\"instantiateWasm\"]) {\n return new Promise((resolve, reject) => {\n Module[\"instantiateWasm\"](info2, (mod, inst) => {\n resolve(receiveInstance(mod, inst));\n });\n });\n }\n wasmBinaryFile ??= findWasmBinary();\n var result = await instantiateAsync(wasmBinary, wasmBinaryFile, info2);\n var exports2 = receiveInstantiationResult(result);\n return exports2;\n }\n __name(createWasm, \"createWasm\");\n class ExitStatus {\n static {\n __name(this, \"ExitStatus\");\n }\n name = \"ExitStatus\";\n constructor(status) {\n this.message = `Program terminated with exit(${status})`;\n this.status = status;\n }\n }\n var GOT = {};\n var currentModuleWeakSymbols = /* @__PURE__ */ new Set([]);\n var GOTHandler = {\n get(obj, symName) {\n var rtn = GOT[symName];\n if (!rtn) {\n rtn = GOT[symName] = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": true\n });\n }\n if (!currentModuleWeakSymbols.has(symName)) {\n rtn.required = true;\n }\n return rtn;\n }\n };\n var LE_ATOMICS_NATIVE_BYTE_ORDER = [];\n var LE_HEAP_LOAD_F32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getFloat32(byteOffset, true), \"LE_HEAP_LOAD_F32\");\n var LE_HEAP_LOAD_F64 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getFloat64(byteOffset, true), \"LE_HEAP_LOAD_F64\");\n var LE_HEAP_LOAD_I16 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getInt16(byteOffset, true), \"LE_HEAP_LOAD_I16\");\n var LE_HEAP_LOAD_I32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getInt32(byteOffset, true), \"LE_HEAP_LOAD_I32\");\n var LE_HEAP_LOAD_I64 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getBigInt64(byteOffset, true), \"LE_HEAP_LOAD_I64\");\n var LE_HEAP_LOAD_U32 = /* @__PURE__ */ __name((byteOffset) => HEAP_DATA_VIEW.getUint32(byteOffset, true), \"LE_HEAP_LOAD_U32\");\n var LE_HEAP_STORE_F32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setFloat32(byteOffset, value, true), \"LE_HEAP_STORE_F32\");\n var LE_HEAP_STORE_F64 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setFloat64(byteOffset, value, true), \"LE_HEAP_STORE_F64\");\n var LE_HEAP_STORE_I16 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setInt16(byteOffset, value, true), \"LE_HEAP_STORE_I16\");\n var LE_HEAP_STORE_I32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setInt32(byteOffset, value, true), \"LE_HEAP_STORE_I32\");\n var LE_HEAP_STORE_I64 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setBigInt64(byteOffset, value, true), \"LE_HEAP_STORE_I64\");\n var LE_HEAP_STORE_U32 = /* @__PURE__ */ __name((byteOffset, value) => HEAP_DATA_VIEW.setUint32(byteOffset, value, true), \"LE_HEAP_STORE_U32\");\n var callRuntimeCallbacks = /* @__PURE__ */ __name((callbacks) => {\n while (callbacks.length > 0) {\n callbacks.shift()(Module);\n }\n }, \"callRuntimeCallbacks\");\n var onPostRuns = [];\n var addOnPostRun = /* @__PURE__ */ __name((cb) => onPostRuns.push(cb), \"addOnPostRun\");\n var onPreRuns = [];\n var addOnPreRun = /* @__PURE__ */ __name((cb) => onPreRuns.push(cb), \"addOnPreRun\");\n var UTF8Decoder = typeof TextDecoder != \"undefined\" ? new TextDecoder() : void 0;\n var findStringEnd = /* @__PURE__ */ __name((heapOrArray, idx, maxBytesToRead, ignoreNul) => {\n var maxIdx = idx + maxBytesToRead;\n if (ignoreNul) return maxIdx;\n while (heapOrArray[idx] && !(idx >= maxIdx)) ++idx;\n return idx;\n }, \"findStringEnd\");\n var UTF8ArrayToString = /* @__PURE__ */ __name((heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => {\n var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul);\n if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) {\n return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr));\n }\n var str = \"\";\n while (idx < endPtr) {\n var u0 = heapOrArray[idx++];\n if (!(u0 & 128)) {\n str += String.fromCharCode(u0);\n continue;\n }\n var u1 = heapOrArray[idx++] & 63;\n if ((u0 & 224) == 192) {\n str += String.fromCharCode((u0 & 31) << 6 | u1);\n continue;\n }\n var u2 = heapOrArray[idx++] & 63;\n if ((u0 & 240) == 224) {\n u0 = (u0 & 15) << 12 | u1 << 6 | u2;\n } else {\n u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63;\n }\n if (u0 < 65536) {\n str += String.fromCharCode(u0);\n } else {\n var ch = u0 - 65536;\n str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023);\n }\n }\n return str;\n }, \"UTF8ArrayToString\");\n var getDylinkMetadata = /* @__PURE__ */ __name((binary2) => {\n var offset = 0;\n var end = 0;\n function getU8() {\n return binary2[offset++];\n }\n __name(getU8, \"getU8\");\n function getLEB() {\n var ret = 0;\n var mul = 1;\n while (1) {\n var byte = binary2[offset++];\n ret += (byte & 127) * mul;\n mul *= 128;\n if (!(byte & 128)) break;\n }\n return ret;\n }\n __name(getLEB, \"getLEB\");\n function getString() {\n var len = getLEB();\n offset += len;\n return UTF8ArrayToString(binary2, offset - len, len);\n }\n __name(getString, \"getString\");\n function getStringList() {\n var count2 = getLEB();\n var rtn = [];\n while (count2--) rtn.push(getString());\n return rtn;\n }\n __name(getStringList, \"getStringList\");\n function failIf(condition, message) {\n if (condition) throw new Error(message);\n }\n __name(failIf, \"failIf\");\n if (binary2 instanceof WebAssembly.Module) {\n var dylinkSection = WebAssembly.Module.customSections(binary2, \"dylink.0\");\n failIf(dylinkSection.length === 0, \"need dylink section\");\n binary2 = new Uint8Array(dylinkSection[0]);\n end = binary2.length;\n } else {\n var int32View = new Uint32Array(new Uint8Array(binary2.subarray(0, 24)).buffer);\n var magicNumberFound = int32View[0] == 1836278016 || int32View[0] == 6386541;\n failIf(!magicNumberFound, \"need to see wasm magic number\");\n failIf(binary2[8] !== 0, \"need the dylink section to be first\");\n offset = 9;\n var section_size = getLEB();\n end = offset + section_size;\n var name2 = getString();\n failIf(name2 !== \"dylink.0\");\n }\n var customSection = {\n neededDynlibs: [],\n tlsExports: /* @__PURE__ */ new Set(),\n weakImports: /* @__PURE__ */ new Set(),\n runtimePaths: []\n };\n var WASM_DYLINK_MEM_INFO = 1;\n var WASM_DYLINK_NEEDED = 2;\n var WASM_DYLINK_EXPORT_INFO = 3;\n var WASM_DYLINK_IMPORT_INFO = 4;\n var WASM_DYLINK_RUNTIME_PATH = 5;\n var WASM_SYMBOL_TLS = 256;\n var WASM_SYMBOL_BINDING_MASK = 3;\n var WASM_SYMBOL_BINDING_WEAK = 1;\n while (offset < end) {\n var subsectionType = getU8();\n var subsectionSize = getLEB();\n if (subsectionType === WASM_DYLINK_MEM_INFO) {\n customSection.memorySize = getLEB();\n customSection.memoryAlign = getLEB();\n customSection.tableSize = getLEB();\n customSection.tableAlign = getLEB();\n } else if (subsectionType === WASM_DYLINK_NEEDED) {\n customSection.neededDynlibs = getStringList();\n } else if (subsectionType === WASM_DYLINK_EXPORT_INFO) {\n var count = getLEB();\n while (count--) {\n var symname = getString();\n var flags2 = getLEB();\n if (flags2 & WASM_SYMBOL_TLS) {\n customSection.tlsExports.add(symname);\n }\n }\n } else if (subsectionType === WASM_DYLINK_IMPORT_INFO) {\n var count = getLEB();\n while (count--) {\n var modname = getString();\n var symname = getString();\n var flags2 = getLEB();\n if ((flags2 & WASM_SYMBOL_BINDING_MASK) == WASM_SYMBOL_BINDING_WEAK) {\n customSection.weakImports.add(symname);\n }\n }\n } else if (subsectionType === WASM_DYLINK_RUNTIME_PATH) {\n customSection.runtimePaths = getStringList();\n } else {\n offset += subsectionSize;\n }\n }\n return customSection;\n }, \"getDylinkMetadata\");\n function getValue(ptr, type = \"i8\") {\n if (type.endsWith(\"*\")) type = \"*\";\n switch (type) {\n case \"i1\":\n return HEAP8[ptr];\n case \"i8\":\n return HEAP8[ptr];\n case \"i16\":\n return LE_HEAP_LOAD_I16((ptr >> 1) * 2);\n case \"i32\":\n return LE_HEAP_LOAD_I32((ptr >> 2) * 4);\n case \"i64\":\n return LE_HEAP_LOAD_I64((ptr >> 3) * 8);\n case \"float\":\n return LE_HEAP_LOAD_F32((ptr >> 2) * 4);\n case \"double\":\n return LE_HEAP_LOAD_F64((ptr >> 3) * 8);\n case \"*\":\n return LE_HEAP_LOAD_U32((ptr >> 2) * 4);\n default:\n abort(`invalid type for getValue: ${type}`);\n }\n }\n __name(getValue, \"getValue\");\n var newDSO = /* @__PURE__ */ __name((name2, handle2, syms) => {\n var dso = {\n refcount: Infinity,\n name: name2,\n exports: syms,\n global: true\n };\n LDSO.loadedLibsByName[name2] = dso;\n if (handle2 != void 0) {\n LDSO.loadedLibsByHandle[handle2] = dso;\n }\n return dso;\n }, \"newDSO\");\n var LDSO = {\n loadedLibsByName: {},\n loadedLibsByHandle: {},\n init() {\n newDSO(\"__main__\", 0, wasmImports);\n }\n };\n var ___heap_base = 78240;\n var alignMemory = /* @__PURE__ */ __name((size, alignment) => Math.ceil(size / alignment) * alignment, \"alignMemory\");\n var getMemory = /* @__PURE__ */ __name((size) => {\n if (runtimeInitialized) {\n return _calloc(size, 1);\n }\n var ret = ___heap_base;\n var end = ret + alignMemory(size, 16);\n ___heap_base = end;\n GOT[\"__heap_base\"].value = end;\n return ret;\n }, \"getMemory\");\n var isInternalSym = /* @__PURE__ */ __name((symName) => [\"__cpp_exception\", \"__c_longjmp\", \"__wasm_apply_data_relocs\", \"__dso_handle\", \"__tls_size\", \"__tls_align\", \"__set_stack_limits\", \"_emscripten_tls_init\", \"__wasm_init_tls\", \"__wasm_call_ctors\", \"__start_em_asm\", \"__stop_em_asm\", \"__start_em_js\", \"__stop_em_js\"].includes(symName) || symName.startsWith(\"__em_js__\"), \"isInternalSym\");\n var uleb128EncodeWithLen = /* @__PURE__ */ __name((arr) => {\n const n = arr.length;\n return [n % 128 | 128, n >> 7, ...arr];\n }, \"uleb128EncodeWithLen\");\n var wasmTypeCodes = {\n \"i\": 127,\n // i32\n \"p\": 127,\n // i32\n \"j\": 126,\n // i64\n \"f\": 125,\n // f32\n \"d\": 124,\n // f64\n \"e\": 111\n };\n var generateTypePack = /* @__PURE__ */ __name((types) => uleb128EncodeWithLen(Array.from(types, (type) => {\n var code = wasmTypeCodes[type];\n return code;\n })), \"generateTypePack\");\n var convertJsFunctionToWasm = /* @__PURE__ */ __name((func2, sig) => {\n var bytes = Uint8Array.of(\n 0,\n 97,\n 115,\n 109,\n // magic (\"\\0asm\")\n 1,\n 0,\n 0,\n 0,\n // version: 1\n 1,\n ...uleb128EncodeWithLen([\n 1,\n // count: 1\n 96,\n // param types\n ...generateTypePack(sig.slice(1)),\n // return types (for now only supporting [] if `void` and single [T] otherwise)\n ...generateTypePack(sig[0] === \"v\" ? \"\" : sig[0])\n ]),\n // The rest of the module is static\n 2,\n 7,\n // import section\n // (import \"e\" \"f\" (func 0 (type 0)))\n 1,\n 1,\n 101,\n 1,\n 102,\n 0,\n 0,\n 7,\n 5,\n // export section\n // (export \"f\" (func 0 (type 0)))\n 1,\n 1,\n 102,\n 0,\n 0\n );\n var module2 = new WebAssembly.Module(bytes);\n var instance2 = new WebAssembly.Instance(module2, {\n \"e\": {\n \"f\": func2\n }\n });\n var wrappedFunc = instance2.exports[\"f\"];\n return wrappedFunc;\n }, \"convertJsFunctionToWasm\");\n var wasmTableMirror = [];\n var wasmTable = new WebAssembly.Table({\n \"initial\": 31,\n \"element\": \"anyfunc\"\n });\n var getWasmTableEntry = /* @__PURE__ */ __name((funcPtr) => {\n var func2 = wasmTableMirror[funcPtr];\n if (!func2) {\n wasmTableMirror[funcPtr] = func2 = wasmTable.get(funcPtr);\n }\n return func2;\n }, \"getWasmTableEntry\");\n var updateTableMap = /* @__PURE__ */ __name((offset, count) => {\n if (functionsInTableMap) {\n for (var i2 = offset; i2 < offset + count; i2++) {\n var item = getWasmTableEntry(i2);\n if (item) {\n functionsInTableMap.set(item, i2);\n }\n }\n }\n }, \"updateTableMap\");\n var functionsInTableMap;\n var getFunctionAddress = /* @__PURE__ */ __name((func2) => {\n if (!functionsInTableMap) {\n functionsInTableMap = /* @__PURE__ */ new WeakMap();\n updateTableMap(0, wasmTable.length);\n }\n return functionsInTableMap.get(func2) || 0;\n }, \"getFunctionAddress\");\n var freeTableIndexes = [];\n var getEmptyTableSlot = /* @__PURE__ */ __name(() => {\n if (freeTableIndexes.length) {\n return freeTableIndexes.pop();\n }\n return wasmTable[\"grow\"](1);\n }, \"getEmptyTableSlot\");\n var setWasmTableEntry = /* @__PURE__ */ __name((idx, func2) => {\n wasmTable.set(idx, func2);\n wasmTableMirror[idx] = wasmTable.get(idx);\n }, \"setWasmTableEntry\");\n var addFunction = /* @__PURE__ */ __name((func2, sig) => {\n var rtn = getFunctionAddress(func2);\n if (rtn) {\n return rtn;\n }\n var ret = getEmptyTableSlot();\n try {\n setWasmTableEntry(ret, func2);\n } catch (err2) {\n if (!(err2 instanceof TypeError)) {\n throw err2;\n }\n var wrapped = convertJsFunctionToWasm(func2, sig);\n setWasmTableEntry(ret, wrapped);\n }\n functionsInTableMap.set(func2, ret);\n return ret;\n }, \"addFunction\");\n var updateGOT = /* @__PURE__ */ __name((exports2, replace) => {\n for (var symName in exports2) {\n if (isInternalSym(symName)) {\n continue;\n }\n var value = exports2[symName];\n GOT[symName] ||= new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": true\n });\n if (replace || GOT[symName].value == 0) {\n if (typeof value == \"function\") {\n GOT[symName].value = addFunction(value);\n } else if (typeof value == \"number\") {\n GOT[symName].value = value;\n } else {\n err(`unhandled export type for '${symName}': ${typeof value}`);\n }\n }\n }\n }, \"updateGOT\");\n var relocateExports = /* @__PURE__ */ __name((exports2, memoryBase2, replace) => {\n var relocated = {};\n for (var e in exports2) {\n var value = exports2[e];\n if (typeof value == \"object\") {\n value = value.value;\n }\n if (typeof value == \"number\") {\n value += memoryBase2;\n }\n relocated[e] = value;\n }\n updateGOT(relocated, replace);\n return relocated;\n }, \"relocateExports\");\n var isSymbolDefined = /* @__PURE__ */ __name((symName) => {\n var existing = wasmImports[symName];\n if (!existing || existing.stub) {\n return false;\n }\n return true;\n }, \"isSymbolDefined\");\n var dynCall = /* @__PURE__ */ __name((sig, ptr, args2 = [], promising = false) => {\n var func2 = getWasmTableEntry(ptr);\n var rtn = func2(...args2);\n function convert(rtn2) {\n return rtn2;\n }\n __name(convert, \"convert\");\n return convert(rtn);\n }, \"dynCall\");\n var stackSave = /* @__PURE__ */ __name(() => _emscripten_stack_get_current(), \"stackSave\");\n var stackRestore = /* @__PURE__ */ __name((val) => __emscripten_stack_restore(val), \"stackRestore\");\n var createInvokeFunction = /* @__PURE__ */ __name((sig) => (ptr, ...args2) => {\n var sp = stackSave();\n try {\n return dynCall(sig, ptr, args2);\n } catch (e) {\n stackRestore(sp);\n if (e !== e + 0) throw e;\n _setThrew(1, 0);\n if (sig[0] == \"j\") return 0n;\n }\n }, \"createInvokeFunction\");\n var resolveGlobalSymbol = /* @__PURE__ */ __name((symName, direct = false) => {\n var sym;\n if (isSymbolDefined(symName)) {\n sym = wasmImports[symName];\n } else if (symName.startsWith(\"invoke_\")) {\n sym = wasmImports[symName] = createInvokeFunction(symName.split(\"_\")[1]);\n }\n return {\n sym,\n name: symName\n };\n }, \"resolveGlobalSymbol\");\n var onPostCtors = [];\n var addOnPostCtor = /* @__PURE__ */ __name((cb) => onPostCtors.push(cb), \"addOnPostCtor\");\n var UTF8ToString = /* @__PURE__ */ __name((ptr, maxBytesToRead, ignoreNul) => ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead, ignoreNul) : \"\", \"UTF8ToString\");\n var loadWebAssemblyModule = /* @__PURE__ */ __name((binary, flags, libName, localScope, handle) => {\n var metadata = getDylinkMetadata(binary);\n function loadModule() {\n var memAlign = Math.pow(2, metadata.memoryAlign);\n var memoryBase = metadata.memorySize ? alignMemory(getMemory(metadata.memorySize + memAlign), memAlign) : 0;\n var tableBase = metadata.tableSize ? wasmTable.length : 0;\n if (handle) {\n HEAP8[handle + 8] = 1;\n LE_HEAP_STORE_U32((handle + 12 >> 2) * 4, memoryBase);\n LE_HEAP_STORE_I32((handle + 16 >> 2) * 4, metadata.memorySize);\n LE_HEAP_STORE_U32((handle + 20 >> 2) * 4, tableBase);\n LE_HEAP_STORE_I32((handle + 24 >> 2) * 4, metadata.tableSize);\n }\n if (metadata.tableSize) {\n wasmTable.grow(metadata.tableSize);\n }\n var moduleExports;\n function resolveSymbol(sym) {\n var resolved = resolveGlobalSymbol(sym).sym;\n if (!resolved && localScope) {\n resolved = localScope[sym];\n }\n if (!resolved) {\n resolved = moduleExports[sym];\n }\n return resolved;\n }\n __name(resolveSymbol, \"resolveSymbol\");\n var proxyHandler = {\n get(stubs, prop) {\n switch (prop) {\n case \"__memory_base\":\n return memoryBase;\n case \"__table_base\":\n return tableBase;\n }\n if (prop in wasmImports && !wasmImports[prop].stub) {\n var res = wasmImports[prop];\n return res;\n }\n if (!(prop in stubs)) {\n var resolved;\n stubs[prop] = (...args2) => {\n resolved ||= resolveSymbol(prop);\n return resolved(...args2);\n };\n }\n return stubs[prop];\n }\n };\n var proxy = new Proxy({}, proxyHandler);\n currentModuleWeakSymbols = metadata.weakImports;\n var info = {\n \"GOT.mem\": new Proxy({}, GOTHandler),\n \"GOT.func\": new Proxy({}, GOTHandler),\n \"env\": proxy,\n \"wasi_snapshot_preview1\": proxy\n };\n function postInstantiation(module, instance) {\n updateTableMap(tableBase, metadata.tableSize);\n moduleExports = relocateExports(instance.exports, memoryBase);\n if (!flags.allowUndefined) {\n reportUndefinedSymbols();\n }\n function addEmAsm(addr, body) {\n var args = [];\n var arity = 0;\n for (; arity < 16; arity++) {\n if (body.indexOf(\"$\" + arity) != -1) {\n args.push(\"$\" + arity);\n } else {\n break;\n }\n }\n args = args.join(\",\");\n var func = `(${args}) => { ${body} };`;\n ASM_CONSTS[start] = eval(func);\n }\n __name(addEmAsm, \"addEmAsm\");\n if (\"__start_em_asm\" in moduleExports) {\n var start = moduleExports[\"__start_em_asm\"];\n var stop = moduleExports[\"__stop_em_asm\"];\n while (start < stop) {\n var jsString = UTF8ToString(start);\n addEmAsm(start, jsString);\n start = HEAPU8.indexOf(0, start) + 1;\n }\n }\n function addEmJs(name, cSig, body) {\n var jsArgs = [];\n cSig = cSig.slice(1, -1);\n if (cSig != \"void\") {\n cSig = cSig.split(\",\");\n for (var i in cSig) {\n var jsArg = cSig[i].split(\" \").pop();\n jsArgs.push(jsArg.replace(\"*\", \"\"));\n }\n }\n var func = `(${jsArgs}) => ${body};`;\n moduleExports[name] = eval(func);\n }\n __name(addEmJs, \"addEmJs\");\n for (var name in moduleExports) {\n if (name.startsWith(\"__em_js__\")) {\n var start = moduleExports[name];\n var jsString = UTF8ToString(start);\n var parts = jsString.split(\"<::>\");\n addEmJs(name.replace(\"__em_js__\", \"\"), parts[0], parts[1]);\n delete moduleExports[name];\n }\n }\n var applyRelocs = moduleExports[\"__wasm_apply_data_relocs\"];\n if (applyRelocs) {\n if (runtimeInitialized) {\n applyRelocs();\n } else {\n __RELOC_FUNCS__.push(applyRelocs);\n }\n }\n var init = moduleExports[\"__wasm_call_ctors\"];\n if (init) {\n if (runtimeInitialized) {\n init();\n } else {\n addOnPostCtor(init);\n }\n }\n return moduleExports;\n }\n __name(postInstantiation, \"postInstantiation\");\n if (flags.loadAsync) {\n return (async () => {\n var instance2;\n if (binary instanceof WebAssembly.Module) {\n instance2 = new WebAssembly.Instance(binary, info);\n } else {\n ({ module: binary, instance: instance2 } = await WebAssembly.instantiate(binary, info));\n }\n return postInstantiation(binary, instance2);\n })();\n }\n var module = binary instanceof WebAssembly.Module ? binary : new WebAssembly.Module(binary);\n var instance = new WebAssembly.Instance(module, info);\n return postInstantiation(module, instance);\n }\n __name(loadModule, \"loadModule\");\n flags = {\n ...flags,\n rpath: {\n parentLibPath: libName,\n paths: metadata.runtimePaths\n }\n };\n if (flags.loadAsync) {\n return metadata.neededDynlibs.reduce((chain, dynNeeded) => chain.then(() => loadDynamicLibrary(dynNeeded, flags, localScope)), Promise.resolve()).then(loadModule);\n }\n metadata.neededDynlibs.forEach((needed) => loadDynamicLibrary(needed, flags, localScope));\n return loadModule();\n }, \"loadWebAssemblyModule\");\n var mergeLibSymbols = /* @__PURE__ */ __name((exports2, libName2) => {\n for (var [sym, exp] of Object.entries(exports2)) {\n const setImport = /* @__PURE__ */ __name((target) => {\n if (!isSymbolDefined(target)) {\n wasmImports[target] = exp;\n }\n }, \"setImport\");\n setImport(sym);\n const main_alias = \"__main_argc_argv\";\n if (sym == \"main\") {\n setImport(main_alias);\n }\n if (sym == main_alias) {\n setImport(\"main\");\n }\n }\n }, \"mergeLibSymbols\");\n var asyncLoad = /* @__PURE__ */ __name(async (url) => {\n var arrayBuffer = await readAsync(url);\n return new Uint8Array(arrayBuffer);\n }, \"asyncLoad\");\n function loadDynamicLibrary(libName2, flags2 = {\n global: true,\n nodelete: true\n }, localScope2, handle2) {\n var dso = LDSO.loadedLibsByName[libName2];\n if (dso) {\n if (!flags2.global) {\n if (localScope2) {\n Object.assign(localScope2, dso.exports);\n }\n } else if (!dso.global) {\n dso.global = true;\n mergeLibSymbols(dso.exports, libName2);\n }\n if (flags2.nodelete && dso.refcount !== Infinity) {\n dso.refcount = Infinity;\n }\n dso.refcount++;\n if (handle2) {\n LDSO.loadedLibsByHandle[handle2] = dso;\n }\n return flags2.loadAsync ? Promise.resolve(true) : true;\n }\n dso = newDSO(libName2, handle2, \"loading\");\n dso.refcount = flags2.nodelete ? Infinity : 1;\n dso.global = flags2.global;\n function loadLibData() {\n if (handle2) {\n var data = LE_HEAP_LOAD_U32((handle2 + 28 >> 2) * 4);\n var dataSize = LE_HEAP_LOAD_U32((handle2 + 32 >> 2) * 4);\n if (data && dataSize) {\n var libData = HEAP8.slice(data, data + dataSize);\n return flags2.loadAsync ? Promise.resolve(libData) : libData;\n }\n }\n var libFile = locateFile(libName2);\n if (flags2.loadAsync) {\n return asyncLoad(libFile);\n }\n if (!readBinary) {\n throw new Error(`${libFile}: file not found, and synchronous loading of external files is not available`);\n }\n return readBinary(libFile);\n }\n __name(loadLibData, \"loadLibData\");\n function getExports() {\n if (flags2.loadAsync) {\n return loadLibData().then((libData) => loadWebAssemblyModule(libData, flags2, libName2, localScope2, handle2));\n }\n return loadWebAssemblyModule(loadLibData(), flags2, libName2, localScope2, handle2);\n }\n __name(getExports, \"getExports\");\n function moduleLoaded(exports2) {\n if (dso.global) {\n mergeLibSymbols(exports2, libName2);\n } else if (localScope2) {\n Object.assign(localScope2, exports2);\n }\n dso.exports = exports2;\n }\n __name(moduleLoaded, \"moduleLoaded\");\n if (flags2.loadAsync) {\n return getExports().then((exports2) => {\n moduleLoaded(exports2);\n return true;\n });\n }\n moduleLoaded(getExports());\n return true;\n }\n __name(loadDynamicLibrary, \"loadDynamicLibrary\");\n var reportUndefinedSymbols = /* @__PURE__ */ __name(() => {\n for (var [symName, entry] of Object.entries(GOT)) {\n if (entry.value == 0) {\n var value = resolveGlobalSymbol(symName, true).sym;\n if (!value && !entry.required) {\n continue;\n }\n if (typeof value == \"function\") {\n entry.value = addFunction(value, value.sig);\n } else if (typeof value == \"number\") {\n entry.value = value;\n } else {\n throw new Error(`bad export type for '${symName}': ${typeof value}`);\n }\n }\n }\n }, \"reportUndefinedSymbols\");\n var runDependencies = 0;\n var dependenciesFulfilled = null;\n var removeRunDependency = /* @__PURE__ */ __name((id) => {\n runDependencies--;\n Module[\"monitorRunDependencies\"]?.(runDependencies);\n if (runDependencies == 0) {\n if (dependenciesFulfilled) {\n var callback = dependenciesFulfilled;\n dependenciesFulfilled = null;\n callback();\n }\n }\n }, \"removeRunDependency\");\n var addRunDependency = /* @__PURE__ */ __name((id) => {\n runDependencies++;\n Module[\"monitorRunDependencies\"]?.(runDependencies);\n }, \"addRunDependency\");\n var loadDylibs = /* @__PURE__ */ __name(async () => {\n if (!dynamicLibraries.length) {\n reportUndefinedSymbols();\n return;\n }\n addRunDependency(\"loadDylibs\");\n for (var lib of dynamicLibraries) {\n await loadDynamicLibrary(lib, {\n loadAsync: true,\n global: true,\n nodelete: true,\n allowUndefined: true\n });\n }\n reportUndefinedSymbols();\n removeRunDependency(\"loadDylibs\");\n }, \"loadDylibs\");\n var noExitRuntime = true;\n function setValue(ptr, value, type = \"i8\") {\n if (type.endsWith(\"*\")) type = \"*\";\n switch (type) {\n case \"i1\":\n HEAP8[ptr] = value;\n break;\n case \"i8\":\n HEAP8[ptr] = value;\n break;\n case \"i16\":\n LE_HEAP_STORE_I16((ptr >> 1) * 2, value);\n break;\n case \"i32\":\n LE_HEAP_STORE_I32((ptr >> 2) * 4, value);\n break;\n case \"i64\":\n LE_HEAP_STORE_I64((ptr >> 3) * 8, BigInt(value));\n break;\n case \"float\":\n LE_HEAP_STORE_F32((ptr >> 2) * 4, value);\n break;\n case \"double\":\n LE_HEAP_STORE_F64((ptr >> 3) * 8, value);\n break;\n case \"*\":\n LE_HEAP_STORE_U32((ptr >> 2) * 4, value);\n break;\n default:\n abort(`invalid type for setValue: ${type}`);\n }\n }\n __name(setValue, \"setValue\");\n var ___memory_base = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": false\n }, 1024);\n var ___stack_high = 78240;\n var ___stack_low = 12704;\n var ___stack_pointer = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": true\n }, 78240);\n var ___table_base = new WebAssembly.Global({\n \"value\": \"i32\",\n \"mutable\": false\n }, 1);\n var __abort_js = /* @__PURE__ */ __name(() => abort(\"\"), \"__abort_js\");\n __abort_js.sig = \"v\";\n var getHeapMax = /* @__PURE__ */ __name(() => (\n // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate\n // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side\n // for any code that deals with heap sizes, which would require special\n // casing all heap size related code to treat 0 specially.\n 2147483648\n ), \"getHeapMax\");\n var growMemory = /* @__PURE__ */ __name((size) => {\n var oldHeapSize = wasmMemory.buffer.byteLength;\n var pages = (size - oldHeapSize + 65535) / 65536 | 0;\n try {\n wasmMemory.grow(pages);\n updateMemoryViews();\n return 1;\n } catch (e) {\n }\n }, \"growMemory\");\n var _emscripten_resize_heap = /* @__PURE__ */ __name((requestedSize) => {\n var oldSize = HEAPU8.length;\n requestedSize >>>= 0;\n var maxHeapSize = getHeapMax();\n if (requestedSize > maxHeapSize) {\n return false;\n }\n for (var cutDown = 1; cutDown <= 4; cutDown *= 2) {\n var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown);\n overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296);\n var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536));\n var replacement = growMemory(newSize);\n if (replacement) {\n return true;\n }\n }\n return false;\n }, \"_emscripten_resize_heap\");\n _emscripten_resize_heap.sig = \"ip\";\n var _fd_close = /* @__PURE__ */ __name((fd) => 52, \"_fd_close\");\n _fd_close.sig = \"ii\";\n var INT53_MAX = 9007199254740992;\n var INT53_MIN = -9007199254740992;\n var bigintToI53Checked = /* @__PURE__ */ __name((num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num), \"bigintToI53Checked\");\n function _fd_seek(fd, offset, whence, newOffset) {\n offset = bigintToI53Checked(offset);\n return 70;\n }\n __name(_fd_seek, \"_fd_seek\");\n _fd_seek.sig = \"iijip\";\n var printCharBuffers = [null, [], []];\n var printChar = /* @__PURE__ */ __name((stream, curr) => {\n var buffer = printCharBuffers[stream];\n if (curr === 0 || curr === 10) {\n (stream === 1 ? out : err)(UTF8ArrayToString(buffer));\n buffer.length = 0;\n } else {\n buffer.push(curr);\n }\n }, \"printChar\");\n var _fd_write = /* @__PURE__ */ __name((fd, iov, iovcnt, pnum) => {\n var num = 0;\n for (var i2 = 0; i2 < iovcnt; i2++) {\n var ptr = LE_HEAP_LOAD_U32((iov >> 2) * 4);\n var len = LE_HEAP_LOAD_U32((iov + 4 >> 2) * 4);\n iov += 8;\n for (var j = 0; j < len; j++) {\n printChar(fd, HEAPU8[ptr + j]);\n }\n num += len;\n }\n LE_HEAP_STORE_U32((pnum >> 2) * 4, num);\n return 0;\n }, \"_fd_write\");\n _fd_write.sig = \"iippp\";\n function _tree_sitter_log_callback(isLexMessage, messageAddress) {\n if (Module.currentLogCallback) {\n const message = UTF8ToString(messageAddress);\n Module.currentLogCallback(message, isLexMessage !== 0);\n }\n }\n __name(_tree_sitter_log_callback, \"_tree_sitter_log_callback\");\n function _tree_sitter_parse_callback(inputBufferAddress, index, row, column, lengthAddress) {\n const INPUT_BUFFER_SIZE = 10 * 1024;\n const string = Module.currentParseCallback(index, {\n row,\n column\n });\n if (typeof string === \"string\") {\n setValue(lengthAddress, string.length, \"i32\");\n stringToUTF16(string, inputBufferAddress, INPUT_BUFFER_SIZE);\n } else {\n setValue(lengthAddress, 0, \"i32\");\n }\n }\n __name(_tree_sitter_parse_callback, \"_tree_sitter_parse_callback\");\n function _tree_sitter_progress_callback(currentOffset, hasError) {\n if (Module.currentProgressCallback) {\n return Module.currentProgressCallback({\n currentOffset,\n hasError\n });\n }\n return false;\n }\n __name(_tree_sitter_progress_callback, \"_tree_sitter_progress_callback\");\n function _tree_sitter_query_progress_callback(currentOffset) {\n if (Module.currentQueryProgressCallback) {\n return Module.currentQueryProgressCallback({\n currentOffset\n });\n }\n return false;\n }\n __name(_tree_sitter_query_progress_callback, \"_tree_sitter_query_progress_callback\");\n var runtimeKeepaliveCounter = 0;\n var keepRuntimeAlive = /* @__PURE__ */ __name(() => noExitRuntime || runtimeKeepaliveCounter > 0, \"keepRuntimeAlive\");\n var _proc_exit = /* @__PURE__ */ __name((code) => {\n EXITSTATUS = code;\n if (!keepRuntimeAlive()) {\n Module[\"onExit\"]?.(code);\n ABORT = true;\n }\n quit_(code, new ExitStatus(code));\n }, \"_proc_exit\");\n _proc_exit.sig = \"vi\";\n var exitJS = /* @__PURE__ */ __name((status, implicit) => {\n EXITSTATUS = status;\n _proc_exit(status);\n }, \"exitJS\");\n var handleException = /* @__PURE__ */ __name((e) => {\n if (e instanceof ExitStatus || e == \"unwind\") {\n return EXITSTATUS;\n }\n quit_(1, e);\n }, \"handleException\");\n var lengthBytesUTF8 = /* @__PURE__ */ __name((str) => {\n var len = 0;\n for (var i2 = 0; i2 < str.length; ++i2) {\n var c = str.charCodeAt(i2);\n if (c <= 127) {\n len++;\n } else if (c <= 2047) {\n len += 2;\n } else if (c >= 55296 && c <= 57343) {\n len += 4;\n ++i2;\n } else {\n len += 3;\n }\n }\n return len;\n }, \"lengthBytesUTF8\");\n var stringToUTF8Array = /* @__PURE__ */ __name((str, heap, outIdx, maxBytesToWrite) => {\n if (!(maxBytesToWrite > 0)) return 0;\n var startIdx = outIdx;\n var endIdx = outIdx + maxBytesToWrite - 1;\n for (var i2 = 0; i2 < str.length; ++i2) {\n var u = str.codePointAt(i2);\n if (u <= 127) {\n if (outIdx >= endIdx) break;\n heap[outIdx++] = u;\n } else if (u <= 2047) {\n if (outIdx + 1 >= endIdx) break;\n heap[outIdx++] = 192 | u >> 6;\n heap[outIdx++] = 128 | u & 63;\n } else if (u <= 65535) {\n if (outIdx + 2 >= endIdx) break;\n heap[outIdx++] = 224 | u >> 12;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n } else {\n if (outIdx + 3 >= endIdx) break;\n heap[outIdx++] = 240 | u >> 18;\n heap[outIdx++] = 128 | u >> 12 & 63;\n heap[outIdx++] = 128 | u >> 6 & 63;\n heap[outIdx++] = 128 | u & 63;\n i2++;\n }\n }\n heap[outIdx] = 0;\n return outIdx - startIdx;\n }, \"stringToUTF8Array\");\n var stringToUTF8 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite), \"stringToUTF8\");\n var stackAlloc = /* @__PURE__ */ __name((sz) => __emscripten_stack_alloc(sz), \"stackAlloc\");\n var stringToUTF8OnStack = /* @__PURE__ */ __name((str) => {\n var size = lengthBytesUTF8(str) + 1;\n var ret = stackAlloc(size);\n stringToUTF8(str, ret, size);\n return ret;\n }, \"stringToUTF8OnStack\");\n var AsciiToString = /* @__PURE__ */ __name((ptr) => {\n var str = \"\";\n while (1) {\n var ch = HEAPU8[ptr++];\n if (!ch) return str;\n str += String.fromCharCode(ch);\n }\n }, \"AsciiToString\");\n var stringToUTF16 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => {\n maxBytesToWrite ??= 2147483647;\n if (maxBytesToWrite < 2) return 0;\n maxBytesToWrite -= 2;\n var startPtr = outPtr;\n var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;\n for (var i2 = 0; i2 < numCharsToWrite; ++i2) {\n var codeUnit = str.charCodeAt(i2);\n LE_HEAP_STORE_I16((outPtr >> 1) * 2, codeUnit);\n outPtr += 2;\n }\n LE_HEAP_STORE_I16((outPtr >> 1) * 2, 0);\n return outPtr - startPtr;\n }, \"stringToUTF16\");\n LE_ATOMICS_NATIVE_BYTE_ORDER = new Int8Array(new Int16Array([1]).buffer)[0] === 1 ? [\n /* little endian */\n ((x) => x),\n ((x) => x),\n void 0,\n ((x) => x)\n ] : [\n /* big endian */\n ((x) => x),\n ((x) => ((x & 65280) << 8 | (x & 255) << 24) >> 16),\n void 0,\n ((x) => x >> 24 & 255 | x >> 8 & 65280 | (x & 65280) << 8 | (x & 255) << 24)\n ];\n function LE_HEAP_UPDATE() {\n HEAPU16.unsigned = ((x) => x & 65535);\n HEAPU32.unsigned = ((x) => x >>> 0);\n }\n __name(LE_HEAP_UPDATE, \"LE_HEAP_UPDATE\");\n {\n initMemory();\n if (Module[\"noExitRuntime\"]) noExitRuntime = Module[\"noExitRuntime\"];\n if (Module[\"print\"]) out = Module[\"print\"];\n if (Module[\"printErr\"]) err = Module[\"printErr\"];\n if (Module[\"dynamicLibraries\"]) dynamicLibraries = Module[\"dynamicLibraries\"];\n if (Module[\"wasmBinary\"]) wasmBinary = Module[\"wasmBinary\"];\n if (Module[\"arguments\"]) arguments_ = Module[\"arguments\"];\n if (Module[\"thisProgram\"]) thisProgram = Module[\"thisProgram\"];\n if (Module[\"preInit\"]) {\n if (typeof Module[\"preInit\"] == \"function\") Module[\"preInit\"] = [Module[\"preInit\"]];\n while (Module[\"preInit\"].length > 0) {\n Module[\"preInit\"].shift()();\n }\n }\n }\n Module[\"setValue\"] = setValue;\n Module[\"getValue\"] = getValue;\n Module[\"UTF8ToString\"] = UTF8ToString;\n Module[\"stringToUTF8\"] = stringToUTF8;\n Module[\"lengthBytesUTF8\"] = lengthBytesUTF8;\n Module[\"AsciiToString\"] = AsciiToString;\n Module[\"stringToUTF16\"] = stringToUTF16;\n Module[\"loadWebAssemblyModule\"] = loadWebAssemblyModule;\n Module[\"LE_HEAP_STORE_I64\"] = LE_HEAP_STORE_I64;\n var ASM_CONSTS = {};\n var _malloc, _calloc, _realloc, _free, _ts_range_edit, _memcmp, _ts_language_symbol_count, _ts_language_state_count, _ts_language_abi_version, _ts_language_name, _ts_language_field_count, _ts_language_next_state, _ts_language_symbol_name, _ts_language_symbol_for_name, _strncmp, _ts_language_symbol_type, _ts_language_field_name_for_id, _ts_lookahead_iterator_new, _ts_lookahead_iterator_delete, _ts_lookahead_iterator_reset_state, _ts_lookahead_iterator_reset, _ts_lookahead_iterator_next, _ts_lookahead_iterator_current_symbol, _ts_point_edit, _ts_parser_delete, _ts_parser_reset, _ts_parser_set_language, _ts_parser_set_included_ranges, _ts_query_new, _ts_query_delete, _iswspace, _iswalnum, _ts_query_pattern_count, _ts_query_capture_count, _ts_query_string_count, _ts_query_capture_name_for_id, _ts_query_capture_quantifier_for_id, _ts_query_string_value_for_id, _ts_query_predicates_for_pattern, _ts_query_start_byte_for_pattern, _ts_query_end_byte_for_pattern, _ts_query_is_pattern_rooted, _ts_query_is_pattern_non_local, _ts_query_is_pattern_guaranteed_at_step, _ts_query_disable_capture, _ts_query_disable_pattern, _ts_tree_copy, _ts_tree_delete, _ts_init, _ts_parser_new_wasm, _ts_parser_enable_logger_wasm, _ts_parser_parse_wasm, _ts_parser_included_ranges_wasm, _ts_language_type_is_named_wasm, _ts_language_type_is_visible_wasm, _ts_language_metadata_wasm, _ts_language_supertypes_wasm, _ts_language_subtypes_wasm, _ts_tree_root_node_wasm, _ts_tree_root_node_with_offset_wasm, _ts_tree_edit_wasm, _ts_tree_included_ranges_wasm, _ts_tree_get_changed_ranges_wasm, _ts_tree_cursor_new_wasm, _ts_tree_cursor_copy_wasm, _ts_tree_cursor_delete_wasm, _ts_tree_cursor_reset_wasm, _ts_tree_cursor_reset_to_wasm, _ts_tree_cursor_goto_first_child_wasm, _ts_tree_cursor_goto_last_child_wasm, _ts_tree_cursor_goto_first_child_for_index_wasm, _ts_tree_cursor_goto_first_child_for_position_wasm, _ts_tree_cursor_goto_next_sibling_wasm, _ts_tree_cursor_goto_previous_sibling_wasm, _ts_tree_cursor_goto_descendant_wasm, _ts_tree_cursor_goto_parent_wasm, _ts_tree_cursor_current_node_type_id_wasm, _ts_tree_cursor_current_node_state_id_wasm, _ts_tree_cursor_current_node_is_named_wasm, _ts_tree_cursor_current_node_is_missing_wasm, _ts_tree_cursor_current_node_id_wasm, _ts_tree_cursor_start_position_wasm, _ts_tree_cursor_end_position_wasm, _ts_tree_cursor_start_index_wasm, _ts_tree_cursor_end_index_wasm, _ts_tree_cursor_current_field_id_wasm, _ts_tree_cursor_current_depth_wasm, _ts_tree_cursor_current_descendant_index_wasm, _ts_tree_cursor_current_node_wasm, _ts_node_symbol_wasm, _ts_node_field_name_for_child_wasm, _ts_node_field_name_for_named_child_wasm, _ts_node_children_by_field_id_wasm, _ts_node_first_child_for_byte_wasm, _ts_node_first_named_child_for_byte_wasm, _ts_node_grammar_symbol_wasm, _ts_node_child_count_wasm, _ts_node_named_child_count_wasm, _ts_node_child_wasm, _ts_node_named_child_wasm, _ts_node_child_by_field_id_wasm, _ts_node_next_sibling_wasm, _ts_node_prev_sibling_wasm, _ts_node_next_named_sibling_wasm, _ts_node_prev_named_sibling_wasm, _ts_node_descendant_count_wasm, _ts_node_parent_wasm, _ts_node_child_with_descendant_wasm, _ts_node_descendant_for_index_wasm, _ts_node_named_descendant_for_index_wasm, _ts_node_descendant_for_position_wasm, _ts_node_named_descendant_for_position_wasm, _ts_node_start_point_wasm, _ts_node_end_point_wasm, _ts_node_start_index_wasm, _ts_node_end_index_wasm, _ts_node_to_string_wasm, _ts_node_children_wasm, _ts_node_named_children_wasm, _ts_node_descendants_of_type_wasm, _ts_node_is_named_wasm, _ts_node_has_changes_wasm, _ts_node_has_error_wasm, _ts_node_is_error_wasm, _ts_node_is_missing_wasm, _ts_node_is_extra_wasm, _ts_node_parse_state_wasm, _ts_node_next_parse_state_wasm, _ts_query_matches_wasm, _ts_query_captures_wasm, _memset, _memcpy, _memmove, _iswalpha, _iswblank, _iswdigit, _iswlower, _iswupper, _iswxdigit, _memchr, _strlen, _strcmp, _strncat, _strncpy, _towlower, _towupper, _setThrew, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, ___wasm_apply_data_relocs;\n function assignWasmExports(wasmExports2) {\n Module[\"_malloc\"] = _malloc = wasmExports2[\"malloc\"];\n Module[\"_calloc\"] = _calloc = wasmExports2[\"calloc\"];\n Module[\"_realloc\"] = _realloc = wasmExports2[\"realloc\"];\n Module[\"_free\"] = _free = wasmExports2[\"free\"];\n Module[\"_ts_range_edit\"] = _ts_range_edit = wasmExports2[\"ts_range_edit\"];\n Module[\"_memcmp\"] = _memcmp = wasmExports2[\"memcmp\"];\n Module[\"_ts_language_symbol_count\"] = _ts_language_symbol_count = wasmExports2[\"ts_language_symbol_count\"];\n Module[\"_ts_language_state_count\"] = _ts_language_state_count = wasmExports2[\"ts_language_state_count\"];\n Module[\"_ts_language_abi_version\"] = _ts_language_abi_version = wasmExports2[\"ts_language_abi_version\"];\n Module[\"_ts_language_name\"] = _ts_language_name = wasmExports2[\"ts_language_name\"];\n Module[\"_ts_language_field_count\"] = _ts_language_field_count = wasmExports2[\"ts_language_field_count\"];\n Module[\"_ts_language_next_state\"] = _ts_language_next_state = wasmExports2[\"ts_language_next_state\"];\n Module[\"_ts_language_symbol_name\"] = _ts_language_symbol_name = wasmExports2[\"ts_language_symbol_name\"];\n Module[\"_ts_language_symbol_for_name\"] = _ts_language_symbol_for_name = wasmExports2[\"ts_language_symbol_for_name\"];\n Module[\"_strncmp\"] = _strncmp = wasmExports2[\"strncmp\"];\n Module[\"_ts_language_symbol_type\"] = _ts_language_symbol_type = wasmExports2[\"ts_language_symbol_type\"];\n Module[\"_ts_language_field_name_for_id\"] = _ts_language_field_name_for_id = wasmExports2[\"ts_language_field_name_for_id\"];\n Module[\"_ts_lookahead_iterator_new\"] = _ts_lookahead_iterator_new = wasmExports2[\"ts_lookahead_iterator_new\"];\n Module[\"_ts_lookahead_iterator_delete\"] = _ts_lookahead_iterator_delete = wasmExports2[\"ts_lookahead_iterator_delete\"];\n Module[\"_ts_lookahead_iterator_reset_state\"] = _ts_lookahead_iterator_reset_state = wasmExports2[\"ts_lookahead_iterator_reset_state\"];\n Module[\"_ts_lookahead_iterator_reset\"] = _ts_lookahead_iterator_reset = wasmExports2[\"ts_lookahead_iterator_reset\"];\n Module[\"_ts_lookahead_iterator_next\"] = _ts_lookahead_iterator_next = wasmExports2[\"ts_lookahead_iterator_next\"];\n Module[\"_ts_lookahead_iterator_current_symbol\"] = _ts_lookahead_iterator_current_symbol = wasmExports2[\"ts_lookahead_iterator_current_symbol\"];\n Module[\"_ts_point_edit\"] = _ts_point_edit = wasmExports2[\"ts_point_edit\"];\n Module[\"_ts_parser_delete\"] = _ts_parser_delete = wasmExports2[\"ts_parser_delete\"];\n Module[\"_ts_parser_reset\"] = _ts_parser_reset = wasmExports2[\"ts_parser_reset\"];\n Module[\"_ts_parser_set_language\"] = _ts_parser_set_language = wasmExports2[\"ts_parser_set_language\"];\n Module[\"_ts_parser_set_included_ranges\"] = _ts_parser_set_included_ranges = wasmExports2[\"ts_parser_set_included_ranges\"];\n Module[\"_ts_query_new\"] = _ts_query_new = wasmExports2[\"ts_query_new\"];\n Module[\"_ts_query_delete\"] = _ts_query_delete = wasmExports2[\"ts_query_delete\"];\n Module[\"_iswspace\"] = _iswspace = wasmExports2[\"iswspace\"];\n Module[\"_iswalnum\"] = _iswalnum = wasmExports2[\"iswalnum\"];\n Module[\"_ts_query_pattern_count\"] = _ts_query_pattern_count = wasmExports2[\"ts_query_pattern_count\"];\n Module[\"_ts_query_capture_count\"] = _ts_query_capture_count = wasmExports2[\"ts_query_capture_count\"];\n Module[\"_ts_query_string_count\"] = _ts_query_string_count = wasmExports2[\"ts_query_string_count\"];\n Module[\"_ts_query_capture_name_for_id\"] = _ts_query_capture_name_for_id = wasmExports2[\"ts_query_capture_name_for_id\"];\n Module[\"_ts_query_capture_quantifier_for_id\"] = _ts_query_capture_quantifier_for_id = wasmExports2[\"ts_query_capture_quantifier_for_id\"];\n Module[\"_ts_query_string_value_for_id\"] = _ts_query_string_value_for_id = wasmExports2[\"ts_query_string_value_for_id\"];\n Module[\"_ts_query_predicates_for_pattern\"] = _ts_query_predicates_for_pattern = wasmExports2[\"ts_query_predicates_for_pattern\"];\n Module[\"_ts_query_start_byte_for_pattern\"] = _ts_query_start_byte_for_pattern = wasmExports2[\"ts_query_start_byte_for_pattern\"];\n Module[\"_ts_query_end_byte_for_pattern\"] = _ts_query_end_byte_for_pattern = wasmExports2[\"ts_query_end_byte_for_pattern\"];\n Module[\"_ts_query_is_pattern_rooted\"] = _ts_query_is_pattern_rooted = wasmExports2[\"ts_query_is_pattern_rooted\"];\n Module[\"_ts_query_is_pattern_non_local\"] = _ts_query_is_pattern_non_local = wasmExports2[\"ts_query_is_pattern_non_local\"];\n Module[\"_ts_query_is_pattern_guaranteed_at_step\"] = _ts_query_is_pattern_guaranteed_at_step = wasmExports2[\"ts_query_is_pattern_guaranteed_at_step\"];\n Module[\"_ts_query_disable_capture\"] = _ts_query_disable_capture = wasmExports2[\"ts_query_disable_capture\"];\n Module[\"_ts_query_disable_pattern\"] = _ts_query_disable_pattern = wasmExports2[\"ts_query_disable_pattern\"];\n Module[\"_ts_tree_copy\"] = _ts_tree_copy = wasmExports2[\"ts_tree_copy\"];\n Module[\"_ts_tree_delete\"] = _ts_tree_delete = wasmExports2[\"ts_tree_delete\"];\n Module[\"_ts_init\"] = _ts_init = wasmExports2[\"ts_init\"];\n Module[\"_ts_parser_new_wasm\"] = _ts_parser_new_wasm = wasmExports2[\"ts_parser_new_wasm\"];\n Module[\"_ts_parser_enable_logger_wasm\"] = _ts_parser_enable_logger_wasm = wasmExports2[\"ts_parser_enable_logger_wasm\"];\n Module[\"_ts_parser_parse_wasm\"] = _ts_parser_parse_wasm = wasmExports2[\"ts_parser_parse_wasm\"];\n Module[\"_ts_parser_included_ranges_wasm\"] = _ts_parser_included_ranges_wasm = wasmExports2[\"ts_parser_included_ranges_wasm\"];\n Module[\"_ts_language_type_is_named_wasm\"] = _ts_language_type_is_named_wasm = wasmExports2[\"ts_language_type_is_named_wasm\"];\n Module[\"_ts_language_type_is_visible_wasm\"] = _ts_language_type_is_visible_wasm = wasmExports2[\"ts_language_type_is_visible_wasm\"];\n Module[\"_ts_language_metadata_wasm\"] = _ts_language_metadata_wasm = wasmExports2[\"ts_language_metadata_wasm\"];\n Module[\"_ts_language_supertypes_wasm\"] = _ts_language_supertypes_wasm = wasmExports2[\"ts_language_supertypes_wasm\"];\n Module[\"_ts_language_subtypes_wasm\"] = _ts_language_subtypes_wasm = wasmExports2[\"ts_language_subtypes_wasm\"];\n Module[\"_ts_tree_root_node_wasm\"] = _ts_tree_root_node_wasm = wasmExports2[\"ts_tree_root_node_wasm\"];\n Module[\"_ts_tree_root_node_with_offset_wasm\"] = _ts_tree_root_node_with_offset_wasm = wasmExports2[\"ts_tree_root_node_with_offset_wasm\"];\n Module[\"_ts_tree_edit_wasm\"] = _ts_tree_edit_wasm = wasmExports2[\"ts_tree_edit_wasm\"];\n Module[\"_ts_tree_included_ranges_wasm\"] = _ts_tree_included_ranges_wasm = wasmExports2[\"ts_tree_included_ranges_wasm\"];\n Module[\"_ts_tree_get_changed_ranges_wasm\"] = _ts_tree_get_changed_ranges_wasm = wasmExports2[\"ts_tree_get_changed_ranges_wasm\"];\n Module[\"_ts_tree_cursor_new_wasm\"] = _ts_tree_cursor_new_wasm = wasmExports2[\"ts_tree_cursor_new_wasm\"];\n Module[\"_ts_tree_cursor_copy_wasm\"] = _ts_tree_cursor_copy_wasm = wasmExports2[\"ts_tree_cursor_copy_wasm\"];\n Module[\"_ts_tree_cursor_delete_wasm\"] = _ts_tree_cursor_delete_wasm = wasmExports2[\"ts_tree_cursor_delete_wasm\"];\n Module[\"_ts_tree_cursor_reset_wasm\"] = _ts_tree_cursor_reset_wasm = wasmExports2[\"ts_tree_cursor_reset_wasm\"];\n Module[\"_ts_tree_cursor_reset_to_wasm\"] = _ts_tree_cursor_reset_to_wasm = wasmExports2[\"ts_tree_cursor_reset_to_wasm\"];\n Module[\"_ts_tree_cursor_goto_first_child_wasm\"] = _ts_tree_cursor_goto_first_child_wasm = wasmExports2[\"ts_tree_cursor_goto_first_child_wasm\"];\n Module[\"_ts_tree_cursor_goto_last_child_wasm\"] = _ts_tree_cursor_goto_last_child_wasm = wasmExports2[\"ts_tree_cursor_goto_last_child_wasm\"];\n Module[\"_ts_tree_cursor_goto_first_child_for_index_wasm\"] = _ts_tree_cursor_goto_first_child_for_index_wasm = wasmExports2[\"ts_tree_cursor_goto_first_child_for_index_wasm\"];\n Module[\"_ts_tree_cursor_goto_first_child_for_position_wasm\"] = _ts_tree_cursor_goto_first_child_for_position_wasm = wasmExports2[\"ts_tree_cursor_goto_first_child_for_position_wasm\"];\n Module[\"_ts_tree_cursor_goto_next_sibling_wasm\"] = _ts_tree_cursor_goto_next_sibling_wasm = wasmExports2[\"ts_tree_cursor_goto_next_sibling_wasm\"];\n Module[\"_ts_tree_cursor_goto_previous_sibling_wasm\"] = _ts_tree_cursor_goto_previous_sibling_wasm = wasmExports2[\"ts_tree_cursor_goto_previous_sibling_wasm\"];\n Module[\"_ts_tree_cursor_goto_descendant_wasm\"] = _ts_tree_cursor_goto_descendant_wasm = wasmExports2[\"ts_tree_cursor_goto_descendant_wasm\"];\n Module[\"_ts_tree_cursor_goto_parent_wasm\"] = _ts_tree_cursor_goto_parent_wasm = wasmExports2[\"ts_tree_cursor_goto_parent_wasm\"];\n Module[\"_ts_tree_cursor_current_node_type_id_wasm\"] = _ts_tree_cursor_current_node_type_id_wasm = wasmExports2[\"ts_tree_cursor_current_node_type_id_wasm\"];\n Module[\"_ts_tree_cursor_current_node_state_id_wasm\"] = _ts_tree_cursor_current_node_state_id_wasm = wasmExports2[\"ts_tree_cursor_current_node_state_id_wasm\"];\n Module[\"_ts_tree_cursor_current_node_is_named_wasm\"] = _ts_tree_cursor_current_node_is_named_wasm = wasmExports2[\"ts_tree_cursor_current_node_is_named_wasm\"];\n Module[\"_ts_tree_cursor_current_node_is_missing_wasm\"] = _ts_tree_cursor_current_node_is_missing_wasm = wasmExports2[\"ts_tree_cursor_current_node_is_missing_wasm\"];\n Module[\"_ts_tree_cursor_current_node_id_wasm\"] = _ts_tree_cursor_current_node_id_wasm = wasmExports2[\"ts_tree_cursor_current_node_id_wasm\"];\n Module[\"_ts_tree_cursor_start_position_wasm\"] = _ts_tree_cursor_start_position_wasm = wasmExports2[\"ts_tree_cursor_start_position_wasm\"];\n Module[\"_ts_tree_cursor_end_position_wasm\"] = _ts_tree_cursor_end_position_wasm = wasmExports2[\"ts_tree_cursor_end_position_wasm\"];\n Module[\"_ts_tree_cursor_start_index_wasm\"] = _ts_tree_cursor_start_index_wasm = wasmExports2[\"ts_tree_cursor_start_index_wasm\"];\n Module[\"_ts_tree_cursor_end_index_wasm\"] = _ts_tree_cursor_end_index_wasm = wasmExports2[\"ts_tree_cursor_end_index_wasm\"];\n Module[\"_ts_tree_cursor_current_field_id_wasm\"] = _ts_tree_cursor_current_field_id_wasm = wasmExports2[\"ts_tree_cursor_current_field_id_wasm\"];\n Module[\"_ts_tree_cursor_current_depth_wasm\"] = _ts_tree_cursor_current_depth_wasm = wasmExports2[\"ts_tree_cursor_current_depth_wasm\"];\n Module[\"_ts_tree_cursor_current_descendant_index_wasm\"] = _ts_tree_cursor_current_descendant_index_wasm = wasmExports2[\"ts_tree_cursor_current_descendant_index_wasm\"];\n Module[\"_ts_tree_cursor_current_node_wasm\"] = _ts_tree_cursor_current_node_wasm = wasmExports2[\"ts_tree_cursor_current_node_wasm\"];\n Module[\"_ts_node_symbol_wasm\"] = _ts_node_symbol_wasm = wasmExports2[\"ts_node_symbol_wasm\"];\n Module[\"_ts_node_field_name_for_child_wasm\"] = _ts_node_field_name_for_child_wasm = wasmExports2[\"ts_node_field_name_for_child_wasm\"];\n Module[\"_ts_node_field_name_for_named_child_wasm\"] = _ts_node_field_name_for_named_child_wasm = wasmExports2[\"ts_node_field_name_for_named_child_wasm\"];\n Module[\"_ts_node_children_by_field_id_wasm\"] = _ts_node_children_by_field_id_wasm = wasmExports2[\"ts_node_children_by_field_id_wasm\"];\n Module[\"_ts_node_first_child_for_byte_wasm\"] = _ts_node_first_child_for_byte_wasm = wasmExports2[\"ts_node_first_child_for_byte_wasm\"];\n Module[\"_ts_node_first_named_child_for_byte_wasm\"] = _ts_node_first_named_child_for_byte_wasm = wasmExports2[\"ts_node_first_named_child_for_byte_wasm\"];\n Module[\"_ts_node_grammar_symbol_wasm\"] = _ts_node_grammar_symbol_wasm = wasmExports2[\"ts_node_grammar_symbol_wasm\"];\n Module[\"_ts_node_child_count_wasm\"] = _ts_node_child_count_wasm = wasmExports2[\"ts_node_child_count_wasm\"];\n Module[\"_ts_node_named_child_count_wasm\"] = _ts_node_named_child_count_wasm = wasmExports2[\"ts_node_named_child_count_wasm\"];\n Module[\"_ts_node_child_wasm\"] = _ts_node_child_wasm = wasmExports2[\"ts_node_child_wasm\"];\n Module[\"_ts_node_named_child_wasm\"] = _ts_node_named_child_wasm = wasmExports2[\"ts_node_named_child_wasm\"];\n Module[\"_ts_node_child_by_field_id_wasm\"] = _ts_node_child_by_field_id_wasm = wasmExports2[\"ts_node_child_by_field_id_wasm\"];\n Module[\"_ts_node_next_sibling_wasm\"] = _ts_node_next_sibling_wasm = wasmExports2[\"ts_node_next_sibling_wasm\"];\n Module[\"_ts_node_prev_sibling_wasm\"] = _ts_node_prev_sibling_wasm = wasmExports2[\"ts_node_prev_sibling_wasm\"];\n Module[\"_ts_node_next_named_sibling_wasm\"] = _ts_node_next_named_sibling_wasm = wasmExports2[\"ts_node_next_named_sibling_wasm\"];\n Module[\"_ts_node_prev_named_sibling_wasm\"] = _ts_node_prev_named_sibling_wasm = wasmExports2[\"ts_node_prev_named_sibling_wasm\"];\n Module[\"_ts_node_descendant_count_wasm\"] = _ts_node_descendant_count_wasm = wasmExports2[\"ts_node_descendant_count_wasm\"];\n Module[\"_ts_node_parent_wasm\"] = _ts_node_parent_wasm = wasmExports2[\"ts_node_parent_wasm\"];\n Module[\"_ts_node_child_with_descendant_wasm\"] = _ts_node_child_with_descendant_wasm = wasmExports2[\"ts_node_child_with_descendant_wasm\"];\n Module[\"_ts_node_descendant_for_index_wasm\"] = _ts_node_descendant_for_index_wasm = wasmExports2[\"ts_node_descendant_for_index_wasm\"];\n Module[\"_ts_node_named_descendant_for_index_wasm\"] = _ts_node_named_descendant_for_index_wasm = wasmExports2[\"ts_node_named_descendant_for_index_wasm\"];\n Module[\"_ts_node_descendant_for_position_wasm\"] = _ts_node_descendant_for_position_wasm = wasmExports2[\"ts_node_descendant_for_position_wasm\"];\n Module[\"_ts_node_named_descendant_for_position_wasm\"] = _ts_node_named_descendant_for_position_wasm = wasmExports2[\"ts_node_named_descendant_for_position_wasm\"];\n Module[\"_ts_node_start_point_wasm\"] = _ts_node_start_point_wasm = wasmExports2[\"ts_node_start_point_wasm\"];\n Module[\"_ts_node_end_point_wasm\"] = _ts_node_end_point_wasm = wasmExports2[\"ts_node_end_point_wasm\"];\n Module[\"_ts_node_start_index_wasm\"] = _ts_node_start_index_wasm = wasmExports2[\"ts_node_start_index_wasm\"];\n Module[\"_ts_node_end_index_wasm\"] = _ts_node_end_index_wasm = wasmExports2[\"ts_node_end_index_wasm\"];\n Module[\"_ts_node_to_string_wasm\"] = _ts_node_to_string_wasm = wasmExports2[\"ts_node_to_string_wasm\"];\n Module[\"_ts_node_children_wasm\"] = _ts_node_children_wasm = wasmExports2[\"ts_node_children_wasm\"];\n Module[\"_ts_node_named_children_wasm\"] = _ts_node_named_children_wasm = wasmExports2[\"ts_node_named_children_wasm\"];\n Module[\"_ts_node_descendants_of_type_wasm\"] = _ts_node_descendants_of_type_wasm = wasmExports2[\"ts_node_descendants_of_type_wasm\"];\n Module[\"_ts_node_is_named_wasm\"] = _ts_node_is_named_wasm = wasmExports2[\"ts_node_is_named_wasm\"];\n Module[\"_ts_node_has_changes_wasm\"] = _ts_node_has_changes_wasm = wasmExports2[\"ts_node_has_changes_wasm\"];\n Module[\"_ts_node_has_error_wasm\"] = _ts_node_has_error_wasm = wasmExports2[\"ts_node_has_error_wasm\"];\n Module[\"_ts_node_is_error_wasm\"] = _ts_node_is_error_wasm = wasmExports2[\"ts_node_is_error_wasm\"];\n Module[\"_ts_node_is_missing_wasm\"] = _ts_node_is_missing_wasm = wasmExports2[\"ts_node_is_missing_wasm\"];\n Module[\"_ts_node_is_extra_wasm\"] = _ts_node_is_extra_wasm = wasmExports2[\"ts_node_is_extra_wasm\"];\n Module[\"_ts_node_parse_state_wasm\"] = _ts_node_parse_state_wasm = wasmExports2[\"ts_node_parse_state_wasm\"];\n Module[\"_ts_node_next_parse_state_wasm\"] = _ts_node_next_parse_state_wasm = wasmExports2[\"ts_node_next_parse_state_wasm\"];\n Module[\"_ts_query_matches_wasm\"] = _ts_query_matches_wasm = wasmExports2[\"ts_query_matches_wasm\"];\n Module[\"_ts_query_captures_wasm\"] = _ts_query_captures_wasm = wasmExports2[\"ts_query_captures_wasm\"];\n Module[\"_memset\"] = _memset = wasmExports2[\"memset\"];\n Module[\"_memcpy\"] = _memcpy = wasmExports2[\"memcpy\"];\n Module[\"_memmove\"] = _memmove = wasmExports2[\"memmove\"];\n Module[\"_iswalpha\"] = _iswalpha = wasmExports2[\"iswalpha\"];\n Module[\"_iswblank\"] = _iswblank = wasmExports2[\"iswblank\"];\n Module[\"_iswdigit\"] = _iswdigit = wasmExports2[\"iswdigit\"];\n Module[\"_iswlower\"] = _iswlower = wasmExports2[\"iswlower\"];\n Module[\"_iswupper\"] = _iswupper = wasmExports2[\"iswupper\"];\n Module[\"_iswxdigit\"] = _iswxdigit = wasmExports2[\"iswxdigit\"];\n Module[\"_memchr\"] = _memchr = wasmExports2[\"memchr\"];\n Module[\"_strlen\"] = _strlen = wasmExports2[\"strlen\"];\n Module[\"_strcmp\"] = _strcmp = wasmExports2[\"strcmp\"];\n Module[\"_strncat\"] = _strncat = wasmExports2[\"strncat\"];\n Module[\"_strncpy\"] = _strncpy = wasmExports2[\"strncpy\"];\n Module[\"_towlower\"] = _towlower = wasmExports2[\"towlower\"];\n Module[\"_towupper\"] = _towupper = wasmExports2[\"towupper\"];\n _setThrew = wasmExports2[\"setThrew\"];\n __emscripten_stack_restore = wasmExports2[\"_emscripten_stack_restore\"];\n __emscripten_stack_alloc = wasmExports2[\"_emscripten_stack_alloc\"];\n _emscripten_stack_get_current = wasmExports2[\"emscripten_stack_get_current\"];\n ___wasm_apply_data_relocs = wasmExports2[\"__wasm_apply_data_relocs\"];\n }\n __name(assignWasmExports, \"assignWasmExports\");\n var wasmImports = {\n /** @export */\n __heap_base: ___heap_base,\n /** @export */\n __indirect_function_table: wasmTable,\n /** @export */\n __memory_base: ___memory_base,\n /** @export */\n __stack_high: ___stack_high,\n /** @export */\n __stack_low: ___stack_low,\n /** @export */\n __stack_pointer: ___stack_pointer,\n /** @export */\n __table_base: ___table_base,\n /** @export */\n _abort_js: __abort_js,\n /** @export */\n emscripten_resize_heap: _emscripten_resize_heap,\n /** @export */\n fd_close: _fd_close,\n /** @export */\n fd_seek: _fd_seek,\n /** @export */\n fd_write: _fd_write,\n /** @export */\n memory: wasmMemory,\n /** @export */\n tree_sitter_log_callback: _tree_sitter_log_callback,\n /** @export */\n tree_sitter_parse_callback: _tree_sitter_parse_callback,\n /** @export */\n tree_sitter_progress_callback: _tree_sitter_progress_callback,\n /** @export */\n tree_sitter_query_progress_callback: _tree_sitter_query_progress_callback\n };\n function callMain(args2 = []) {\n var entryFunction = resolveGlobalSymbol(\"main\").sym;\n if (!entryFunction) return;\n args2.unshift(thisProgram);\n var argc = args2.length;\n var argv = stackAlloc((argc + 1) * 4);\n var argv_ptr = argv;\n args2.forEach((arg) => {\n LE_HEAP_STORE_U32((argv_ptr >> 2) * 4, stringToUTF8OnStack(arg));\n argv_ptr += 4;\n });\n LE_HEAP_STORE_U32((argv_ptr >> 2) * 4, 0);\n try {\n var ret = entryFunction(argc, argv);\n exitJS(\n ret,\n /* implicit = */\n true\n );\n return ret;\n } catch (e) {\n return handleException(e);\n }\n }\n __name(callMain, \"callMain\");\n function run(args2 = arguments_) {\n if (runDependencies > 0) {\n dependenciesFulfilled = run;\n return;\n }\n preRun();\n if (runDependencies > 0) {\n dependenciesFulfilled = run;\n return;\n }\n function doRun() {\n Module[\"calledRun\"] = true;\n if (ABORT) return;\n initRuntime();\n preMain();\n readyPromiseResolve?.(Module);\n Module[\"onRuntimeInitialized\"]?.();\n var noInitialRun = Module[\"noInitialRun\"] || false;\n if (!noInitialRun) callMain(args2);\n postRun();\n }\n __name(doRun, \"doRun\");\n if (Module[\"setStatus\"]) {\n Module[\"setStatus\"](\"Running...\");\n setTimeout(() => {\n setTimeout(() => Module[\"setStatus\"](\"\"), 1);\n doRun();\n }, 1);\n } else {\n doRun();\n }\n }\n __name(run, \"run\");\n var wasmExports;\n wasmExports = await createWasm();\n run();\n if (runtimeInitialized) {\n moduleRtn = Module;\n } else {\n moduleRtn = new Promise((resolve, reject) => {\n readyPromiseResolve = resolve;\n readyPromiseReject = reject;\n });\n }\n return moduleRtn;\n };\n })();\n if (typeof exports === \"object\" && typeof module === \"object\") {\n module.exports = Module;\n module.exports.default = Module;\n } else if (typeof define === \"function\" && define[\"amd\"])\n define([], () => Module);\n }\n});\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n CaptureQuantifier: () => CaptureQuantifier,\n Edit: () => Edit,\n LANGUAGE_VERSION: () => LANGUAGE_VERSION,\n Language: () => Language,\n LookaheadIterator: () => LookaheadIterator,\n MIN_COMPATIBLE_VERSION: () => MIN_COMPATIBLE_VERSION,\n Node: () => Node,\n Parser: () => Parser,\n Query: () => Query,\n Tree: () => Tree,\n TreeCursor: () => TreeCursor\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/edit.ts\nvar Edit = class {\n static {\n __name(this, \"Edit\");\n }\n /** The start position of the change. */\n startPosition;\n /** The end position of the change before the edit. */\n oldEndPosition;\n /** The end position of the change after the edit. */\n newEndPosition;\n /** The start index of the change. */\n startIndex;\n /** The end index of the change before the edit. */\n oldEndIndex;\n /** The end index of the change after the edit. */\n newEndIndex;\n constructor({\n startIndex,\n oldEndIndex,\n newEndIndex,\n startPosition,\n oldEndPosition,\n newEndPosition\n }) {\n this.startIndex = startIndex >>> 0;\n this.oldEndIndex = oldEndIndex >>> 0;\n this.newEndIndex = newEndIndex >>> 0;\n this.startPosition = startPosition;\n this.oldEndPosition = oldEndPosition;\n this.newEndPosition = newEndPosition;\n }\n /**\n * Edit a point and index to keep it in-sync with source code that has been edited.\n *\n * This function updates a single point's byte offset and row/column position\n * based on an edit operation. This is useful for editing points without\n * requiring a tree or node instance.\n */\n editPoint(point, index) {\n let newIndex = index;\n const newPoint = { ...point };\n if (index >= this.oldEndIndex) {\n newIndex = this.newEndIndex + (index - this.oldEndIndex);\n const originalRow = point.row;\n newPoint.row = this.newEndPosition.row + (point.row - this.oldEndPosition.row);\n newPoint.column = originalRow === this.oldEndPosition.row ? this.newEndPosition.column + (point.column - this.oldEndPosition.column) : point.column;\n } else if (index > this.startIndex) {\n newIndex = this.newEndIndex;\n newPoint.row = this.newEndPosition.row;\n newPoint.column = this.newEndPosition.column;\n }\n return { point: newPoint, index: newIndex };\n }\n /**\n * Edit a range to keep it in-sync with source code that has been edited.\n *\n * This function updates a range's start and end positions based on an edit\n * operation. This is useful for editing ranges without requiring a tree\n * or node instance.\n */\n editRange(range) {\n const newRange = {\n startIndex: range.startIndex,\n startPosition: { ...range.startPosition },\n endIndex: range.endIndex,\n endPosition: { ...range.endPosition }\n };\n if (range.endIndex >= this.oldEndIndex) {\n if (range.endIndex !== Number.MAX_SAFE_INTEGER) {\n newRange.endIndex = this.newEndIndex + (range.endIndex - this.oldEndIndex);\n newRange.endPosition = {\n row: this.newEndPosition.row + (range.endPosition.row - this.oldEndPosition.row),\n column: range.endPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.endPosition.column - this.oldEndPosition.column) : range.endPosition.column\n };\n if (newRange.endIndex < this.newEndIndex) {\n newRange.endIndex = Number.MAX_SAFE_INTEGER;\n newRange.endPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER };\n }\n }\n } else if (range.endIndex > this.startIndex) {\n newRange.endIndex = this.startIndex;\n newRange.endPosition = { ...this.startPosition };\n }\n if (range.startIndex >= this.oldEndIndex) {\n newRange.startIndex = this.newEndIndex + (range.startIndex - this.oldEndIndex);\n newRange.startPosition = {\n row: this.newEndPosition.row + (range.startPosition.row - this.oldEndPosition.row),\n column: range.startPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.startPosition.column - this.oldEndPosition.column) : range.startPosition.column\n };\n if (newRange.startIndex < this.newEndIndex) {\n newRange.startIndex = Number.MAX_SAFE_INTEGER;\n newRange.startPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER };\n }\n } else if (range.startIndex > this.startIndex) {\n newRange.startIndex = this.startIndex;\n newRange.startPosition = { ...this.startPosition };\n }\n return newRange;\n }\n};\n\n// src/constants.ts\nvar SIZE_OF_SHORT = 2;\nvar SIZE_OF_INT = 4;\nvar SIZE_OF_CURSOR = 4 * SIZE_OF_INT;\nvar SIZE_OF_NODE = 5 * SIZE_OF_INT;\nvar SIZE_OF_POINT = 2 * SIZE_OF_INT;\nvar SIZE_OF_RANGE = 2 * SIZE_OF_INT + 2 * SIZE_OF_POINT;\nvar ZERO_POINT = { row: 0, column: 0 };\nvar INTERNAL = /* @__PURE__ */ Symbol(\"INTERNAL\");\nfunction assertInternal(x) {\n if (x !== INTERNAL) throw new Error(\"Illegal constructor\");\n}\n__name(assertInternal, \"assertInternal\");\nfunction isPoint(point) {\n return !!point && typeof point.row === \"number\" && typeof point.column === \"number\";\n}\n__name(isPoint, \"isPoint\");\nfunction setModule(module2) {\n C = module2;\n}\n__name(setModule, \"setModule\");\nvar C;\n\n// src/lookahead_iterator.ts\nvar LookaheadIterator = class {\n static {\n __name(this, \"LookaheadIterator\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n language;\n /** @internal */\n constructor(internal, address, language) {\n assertInternal(internal);\n this[0] = address;\n this.language = language;\n }\n /** Get the current symbol of the lookahead iterator. */\n get currentTypeId() {\n return C._ts_lookahead_iterator_current_symbol(this[0]);\n }\n /** Get the current symbol name of the lookahead iterator. */\n get currentType() {\n return this.language.types[this.currentTypeId] || \"ERROR\";\n }\n /** Delete the lookahead iterator, freeing its resources. */\n delete() {\n C._ts_lookahead_iterator_delete(this[0]);\n this[0] = 0;\n }\n /**\n * Reset the lookahead iterator.\n *\n * This returns `true` if the language was set successfully and `false`\n * otherwise.\n */\n reset(language, stateId) {\n if (C._ts_lookahead_iterator_reset(this[0], language[0], stateId)) {\n this.language = language;\n return true;\n }\n return false;\n }\n /**\n * Reset the lookahead iterator to another state.\n *\n * This returns `true` if the iterator was reset to the given state and\n * `false` otherwise.\n */\n resetState(stateId) {\n return Boolean(C._ts_lookahead_iterator_reset_state(this[0], stateId));\n }\n /**\n * Returns an iterator that iterates over the symbols of the lookahead iterator.\n *\n * The iterator will yield the current symbol name as a string for each step\n * until there are no more symbols to iterate over.\n */\n [Symbol.iterator]() {\n return {\n next: /* @__PURE__ */ __name(() => {\n if (C._ts_lookahead_iterator_next(this[0])) {\n return { done: false, value: this.currentType };\n }\n return { done: true, value: \"\" };\n }, \"next\")\n };\n }\n};\n\n// src/tree.ts\nfunction getText(tree, startIndex, endIndex, startPosition) {\n const length = endIndex - startIndex;\n let result = tree.textCallback(startIndex, startPosition);\n if (result) {\n startIndex += result.length;\n while (startIndex < endIndex) {\n const string = tree.textCallback(startIndex, startPosition);\n if (string && string.length > 0) {\n startIndex += string.length;\n result += string;\n } else {\n break;\n }\n }\n if (startIndex > endIndex) {\n result = result.slice(0, length);\n }\n }\n return result ?? \"\";\n}\n__name(getText, \"getText\");\nvar Tree = class _Tree {\n static {\n __name(this, \"Tree\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n textCallback;\n /** The language that was used to parse the syntax tree. */\n language;\n /** @internal */\n constructor(internal, address, language, textCallback) {\n assertInternal(internal);\n this[0] = address;\n this.language = language;\n this.textCallback = textCallback;\n }\n /** Create a shallow copy of the syntax tree. This is very fast. */\n copy() {\n const address = C._ts_tree_copy(this[0]);\n return new _Tree(INTERNAL, address, this.language, this.textCallback);\n }\n /** Delete the syntax tree, freeing its resources. */\n delete() {\n C._ts_tree_delete(this[0]);\n this[0] = 0;\n }\n /** Get the root node of the syntax tree. */\n get rootNode() {\n C._ts_tree_root_node_wasm(this[0]);\n return unmarshalNode(this);\n }\n /**\n * Get the root node of the syntax tree, but with its position shifted\n * forward by the given offset.\n */\n rootNodeWithOffset(offsetBytes, offsetExtent) {\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, offsetBytes, \"i32\");\n marshalPoint(address + SIZE_OF_INT, offsetExtent);\n C._ts_tree_root_node_with_offset_wasm(this[0]);\n return unmarshalNode(this);\n }\n /**\n * Edit the syntax tree to keep it in sync with source code that has been\n * edited.\n *\n * You must describe the edit both in terms of byte offsets and in terms of\n * row/column coordinates.\n */\n edit(edit) {\n marshalEdit(edit);\n C._ts_tree_edit_wasm(this[0]);\n }\n /** Create a new {@link TreeCursor} starting from the root of the tree. */\n walk() {\n return this.rootNode.walk();\n }\n /**\n * Compare this old edited syntax tree to a new syntax tree representing\n * the same document, returning a sequence of ranges whose syntactic\n * structure has changed.\n *\n * For this to work correctly, this syntax tree must have been edited such\n * that its ranges match up to the new tree. Generally, you'll want to\n * call this method right after calling one of the [`Parser::parse`]\n * functions. Call it on the old tree that was passed to parse, and\n * pass the new tree that was returned from `parse`.\n */\n getChangedRanges(other) {\n if (!(other instanceof _Tree)) {\n throw new TypeError(\"Argument must be a Tree\");\n }\n C._ts_tree_get_changed_ranges_wasm(this[0], other[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalRange(address);\n address += SIZE_OF_RANGE;\n }\n C._free(buffer);\n }\n return result;\n }\n /** Get the included ranges that were used to parse the syntax tree. */\n getIncludedRanges() {\n C._ts_tree_included_ranges_wasm(this[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalRange(address);\n address += SIZE_OF_RANGE;\n }\n C._free(buffer);\n }\n return result;\n }\n};\n\n// src/tree_cursor.ts\nvar TreeCursor = class _TreeCursor {\n static {\n __name(this, \"TreeCursor\");\n }\n /** @internal */\n // @ts-expect-error: never read\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n // @ts-expect-error: never read\n [1] = 0;\n // Internal handle for Wasm\n /** @internal */\n // @ts-expect-error: never read\n [2] = 0;\n // Internal handle for Wasm\n /** @internal */\n // @ts-expect-error: never read\n [3] = 0;\n // Internal handle for Wasm\n /** @internal */\n tree;\n /** @internal */\n constructor(internal, tree) {\n assertInternal(internal);\n this.tree = tree;\n unmarshalTreeCursor(this);\n }\n /** Creates a deep copy of the tree cursor. This allocates new memory. */\n copy() {\n const copy = new _TreeCursor(INTERNAL, this.tree);\n C._ts_tree_cursor_copy_wasm(this.tree[0]);\n unmarshalTreeCursor(copy);\n return copy;\n }\n /** Delete the tree cursor, freeing its resources. */\n delete() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_delete_wasm(this.tree[0]);\n this[0] = this[1] = this[2] = 0;\n }\n /** Get the tree cursor's current {@link Node}. */\n get currentNode() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_current_node_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get the numerical field id of this tree cursor's current node.\n *\n * See also {@link TreeCursor#currentFieldName}.\n */\n get currentFieldId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_field_id_wasm(this.tree[0]);\n }\n /** Get the field name of this tree cursor's current node. */\n get currentFieldName() {\n return this.tree.language.fields[this.currentFieldId];\n }\n /**\n * Get the depth of the cursor's current node relative to the original\n * node that the cursor was constructed with.\n */\n get currentDepth() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_depth_wasm(this.tree[0]);\n }\n /**\n * Get the index of the cursor's current node out of all of the\n * descendants of the original node that the cursor was constructed with.\n */\n get currentDescendantIndex() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_descendant_index_wasm(this.tree[0]);\n }\n /** Get the type of the cursor's current node. */\n get nodeType() {\n return this.tree.language.types[this.nodeTypeId] || \"ERROR\";\n }\n /** Get the type id of the cursor's current node. */\n get nodeTypeId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_type_id_wasm(this.tree[0]);\n }\n /** Get the state id of the cursor's current node. */\n get nodeStateId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_state_id_wasm(this.tree[0]);\n }\n /** Get the id of the cursor's current node. */\n get nodeId() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_id_wasm(this.tree[0]);\n }\n /**\n * Check if the cursor's current node is *named*.\n *\n * Named nodes correspond to named rules in the grammar, whereas\n * *anonymous* nodes correspond to string literals in the grammar.\n */\n get nodeIsNamed() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_is_named_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if the cursor's current node is *missing*.\n *\n * Missing nodes are inserted by the parser in order to recover from\n * certain kinds of syntax errors.\n */\n get nodeIsMissing() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_current_node_is_missing_wasm(this.tree[0]) === 1;\n }\n /** Get the string content of the cursor's current node. */\n get nodeText() {\n marshalTreeCursor(this);\n const startIndex = C._ts_tree_cursor_start_index_wasm(this.tree[0]);\n const endIndex = C._ts_tree_cursor_end_index_wasm(this.tree[0]);\n C._ts_tree_cursor_start_position_wasm(this.tree[0]);\n const startPosition = unmarshalPoint(TRANSFER_BUFFER);\n return getText(this.tree, startIndex, endIndex, startPosition);\n }\n /** Get the start position of the cursor's current node. */\n get startPosition() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_start_position_wasm(this.tree[0]);\n return unmarshalPoint(TRANSFER_BUFFER);\n }\n /** Get the end position of the cursor's current node. */\n get endPosition() {\n marshalTreeCursor(this);\n C._ts_tree_cursor_end_position_wasm(this.tree[0]);\n return unmarshalPoint(TRANSFER_BUFFER);\n }\n /** Get the start index of the cursor's current node. */\n get startIndex() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_start_index_wasm(this.tree[0]);\n }\n /** Get the end index of the cursor's current node. */\n get endIndex() {\n marshalTreeCursor(this);\n return C._ts_tree_cursor_end_index_wasm(this.tree[0]);\n }\n /**\n * Move this cursor to the first child of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there were no children.\n */\n gotoFirstChild() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_first_child_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the last child of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there were no children.\n *\n * Note that this function may be slower than\n * {@link TreeCursor#gotoFirstChild} because it needs to\n * iterate through all the children to compute the child's position.\n */\n gotoLastChild() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_last_child_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the parent of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there was no parent node (the cursor was already on the\n * root node).\n *\n * Note that the node the cursor was constructed with is considered the root\n * of the cursor, and the cursor cannot walk outside this node.\n */\n gotoParent() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_parent_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the next sibling of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there was no next sibling node.\n *\n * Note that the node the cursor was constructed with is considered the root\n * of the cursor, and the cursor cannot walk outside this node.\n */\n gotoNextSibling() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_next_sibling_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the previous sibling of its current node.\n *\n * This returns `true` if the cursor successfully moved, and returns\n * `false` if there was no previous sibling node.\n *\n * Note that this function may be slower than\n * {@link TreeCursor#gotoNextSibling} due to how node\n * positions are stored. In the worst case, this will need to iterate\n * through all the children up to the previous sibling node to recalculate\n * its position. Also note that the node the cursor was constructed with is\n * considered the root of the cursor, and the cursor cannot walk outside this node.\n */\n gotoPreviousSibling() {\n marshalTreeCursor(this);\n const result = C._ts_tree_cursor_goto_previous_sibling_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move the cursor to the node that is the nth descendant of\n * the original node that the cursor was constructed with, where\n * zero represents the original node itself.\n */\n gotoDescendant(goalDescendantIndex) {\n marshalTreeCursor(this);\n C._ts_tree_cursor_goto_descendant_wasm(this.tree[0], goalDescendantIndex);\n unmarshalTreeCursor(this);\n }\n /**\n * Move this cursor to the first child of its current node that contains or\n * starts after the given byte offset.\n *\n * This returns `true` if the cursor successfully moved to a child node, and returns\n * `false` if no such child was found.\n */\n gotoFirstChildForIndex(goalIndex) {\n marshalTreeCursor(this);\n C.setValue(TRANSFER_BUFFER + SIZE_OF_CURSOR, goalIndex, \"i32\");\n const result = C._ts_tree_cursor_goto_first_child_for_index_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Move this cursor to the first child of its current node that contains or\n * starts after the given byte offset.\n *\n * This returns the index of the child node if one was found, and returns\n * `null` if no such child was found.\n */\n gotoFirstChildForPosition(goalPosition) {\n marshalTreeCursor(this);\n marshalPoint(TRANSFER_BUFFER + SIZE_OF_CURSOR, goalPosition);\n const result = C._ts_tree_cursor_goto_first_child_for_position_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n return result === 1;\n }\n /**\n * Re-initialize this tree cursor to start at the original node that the\n * cursor was constructed with.\n */\n reset(node) {\n marshalNode(node);\n marshalTreeCursor(this, TRANSFER_BUFFER + SIZE_OF_NODE);\n C._ts_tree_cursor_reset_wasm(this.tree[0]);\n unmarshalTreeCursor(this);\n }\n /**\n * Re-initialize a tree cursor to the same position as another cursor.\n *\n * Unlike {@link TreeCursor#reset}, this will not lose parent\n * information and allows reusing already created cursors.\n */\n resetTo(cursor) {\n marshalTreeCursor(this, TRANSFER_BUFFER);\n marshalTreeCursor(cursor, TRANSFER_BUFFER + SIZE_OF_CURSOR);\n C._ts_tree_cursor_reset_to_wasm(this.tree[0], cursor.tree[0]);\n unmarshalTreeCursor(this);\n }\n};\n\n// src/node.ts\nvar Node = class {\n static {\n __name(this, \"Node\");\n }\n /** @internal */\n // @ts-expect-error: never read\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n _children;\n /** @internal */\n _namedChildren;\n /** @internal */\n constructor(internal, {\n id,\n tree,\n startIndex,\n startPosition,\n other\n }) {\n assertInternal(internal);\n this[0] = other;\n this.id = id;\n this.tree = tree;\n this.startIndex = startIndex;\n this.startPosition = startPosition;\n }\n /**\n * The numeric id for this node that is unique.\n *\n * Within a given syntax tree, no two nodes have the same id. However:\n *\n * * If a new tree is created based on an older tree, and a node from the old tree is reused in\n * the process, then that node will have the same id in both trees.\n *\n * * A node not marked as having changes does not guarantee it was reused.\n *\n * * If a node is marked as having changed in the old tree, it will not be reused.\n */\n id;\n /** The byte index where this node starts. */\n startIndex;\n /** The position where this node starts. */\n startPosition;\n /** The tree that this node belongs to. */\n tree;\n /** Get this node's type as a numerical id. */\n get typeId() {\n marshalNode(this);\n return C._ts_node_symbol_wasm(this.tree[0]);\n }\n /**\n * Get the node's type as a numerical id as it appears in the grammar,\n * ignoring aliases.\n */\n get grammarId() {\n marshalNode(this);\n return C._ts_node_grammar_symbol_wasm(this.tree[0]);\n }\n /** Get this node's type as a string. */\n get type() {\n return this.tree.language.types[this.typeId] || \"ERROR\";\n }\n /**\n * Get this node's symbol name as it appears in the grammar, ignoring\n * aliases as a string.\n */\n get grammarType() {\n return this.tree.language.types[this.grammarId] || \"ERROR\";\n }\n /**\n * Check if this node is *named*.\n *\n * Named nodes correspond to named rules in the grammar, whereas\n * *anonymous* nodes correspond to string literals in the grammar.\n */\n get isNamed() {\n marshalNode(this);\n return C._ts_node_is_named_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node is *extra*.\n *\n * Extra nodes represent things like comments, which are not required\n * by the grammar, but can appear anywhere.\n */\n get isExtra() {\n marshalNode(this);\n return C._ts_node_is_extra_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node represents a syntax error.\n *\n * Syntax errors represent parts of the code that could not be incorporated\n * into a valid syntax tree.\n */\n get isError() {\n marshalNode(this);\n return C._ts_node_is_error_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node is *missing*.\n *\n * Missing nodes are inserted by the parser in order to recover from\n * certain kinds of syntax errors.\n */\n get isMissing() {\n marshalNode(this);\n return C._ts_node_is_missing_wasm(this.tree[0]) === 1;\n }\n /** Check if this node has been edited. */\n get hasChanges() {\n marshalNode(this);\n return C._ts_node_has_changes_wasm(this.tree[0]) === 1;\n }\n /**\n * Check if this node represents a syntax error or contains any syntax\n * errors anywhere within it.\n */\n get hasError() {\n marshalNode(this);\n return C._ts_node_has_error_wasm(this.tree[0]) === 1;\n }\n /** Get the byte index where this node ends. */\n get endIndex() {\n marshalNode(this);\n return C._ts_node_end_index_wasm(this.tree[0]);\n }\n /** Get the position where this node ends. */\n get endPosition() {\n marshalNode(this);\n C._ts_node_end_point_wasm(this.tree[0]);\n return unmarshalPoint(TRANSFER_BUFFER);\n }\n /** Get the string content of this node. */\n get text() {\n return getText(this.tree, this.startIndex, this.endIndex, this.startPosition);\n }\n /** Get this node's parse state. */\n get parseState() {\n marshalNode(this);\n return C._ts_node_parse_state_wasm(this.tree[0]);\n }\n /** Get the parse state after this node. */\n get nextParseState() {\n marshalNode(this);\n return C._ts_node_next_parse_state_wasm(this.tree[0]);\n }\n /** Check if this node is equal to another node. */\n equals(other) {\n return this.tree === other.tree && this.id === other.id;\n }\n /**\n * Get the node's child at the given index, where zero represents the first child.\n *\n * This method is fairly fast, but its cost is technically log(n), so if\n * you might be iterating over a long list of children, you should use\n * {@link Node#children} instead.\n */\n child(index) {\n marshalNode(this);\n C._ts_node_child_wasm(this.tree[0], index);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's *named* child at the given index.\n *\n * See also {@link Node#isNamed}.\n * This method is fairly fast, but its cost is technically log(n), so if\n * you might be iterating over a long list of children, you should use\n * {@link Node#namedChildren} instead.\n */\n namedChild(index) {\n marshalNode(this);\n C._ts_node_named_child_wasm(this.tree[0], index);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's child with the given numerical field id.\n *\n * See also {@link Node#childForFieldName}. You can\n * convert a field name to an id using {@link Language#fieldIdForName}.\n */\n childForFieldId(fieldId) {\n marshalNode(this);\n C._ts_node_child_by_field_id_wasm(this.tree[0], fieldId);\n return unmarshalNode(this.tree);\n }\n /**\n * Get the first child with the given field name.\n *\n * If multiple children may have the same field name, access them using\n * {@link Node#childrenForFieldName}.\n */\n childForFieldName(fieldName) {\n const fieldId = this.tree.language.fields.indexOf(fieldName);\n if (fieldId !== -1) return this.childForFieldId(fieldId);\n return null;\n }\n /** Get the field name of this node's child at the given index. */\n fieldNameForChild(index) {\n marshalNode(this);\n const address = C._ts_node_field_name_for_child_wasm(this.tree[0], index);\n if (!address) return null;\n return C.AsciiToString(address);\n }\n /** Get the field name of this node's named child at the given index. */\n fieldNameForNamedChild(index) {\n marshalNode(this);\n const address = C._ts_node_field_name_for_named_child_wasm(this.tree[0], index);\n if (!address) return null;\n return C.AsciiToString(address);\n }\n /**\n * Get an array of this node's children with a given field name.\n *\n * See also {@link Node#children}.\n */\n childrenForFieldName(fieldName) {\n const fieldId = this.tree.language.fields.indexOf(fieldName);\n if (fieldId !== -1 && fieldId !== 0) return this.childrenForFieldId(fieldId);\n return [];\n }\n /**\n * Get an array of this node's children with a given field id.\n *\n * See also {@link Node#childrenForFieldName}.\n */\n childrenForFieldId(fieldId) {\n marshalNode(this);\n C._ts_node_children_by_field_id_wasm(this.tree[0], fieldId);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n C._free(buffer);\n }\n return result;\n }\n /** Get the node's first child that contains or starts after the given byte offset. */\n firstChildForIndex(index) {\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, index, \"i32\");\n C._ts_node_first_child_for_byte_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the node's first named child that contains or starts after the given byte offset. */\n firstNamedChildForIndex(index) {\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, index, \"i32\");\n C._ts_node_first_named_child_for_byte_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get this node's number of children. */\n get childCount() {\n marshalNode(this);\n return C._ts_node_child_count_wasm(this.tree[0]);\n }\n /**\n * Get this node's number of *named* children.\n *\n * See also {@link Node#isNamed}.\n */\n get namedChildCount() {\n marshalNode(this);\n return C._ts_node_named_child_count_wasm(this.tree[0]);\n }\n /** Get this node's first child. */\n get firstChild() {\n return this.child(0);\n }\n /**\n * Get this node's first named child.\n *\n * See also {@link Node#isNamed}.\n */\n get firstNamedChild() {\n return this.namedChild(0);\n }\n /** Get this node's last child. */\n get lastChild() {\n return this.child(this.childCount - 1);\n }\n /**\n * Get this node's last named child.\n *\n * See also {@link Node#isNamed}.\n */\n get lastNamedChild() {\n return this.namedChild(this.namedChildCount - 1);\n }\n /**\n * Iterate over this node's children.\n *\n * If you're walking the tree recursively, you may want to use the\n * {@link TreeCursor} APIs directly instead.\n */\n get children() {\n if (!this._children) {\n marshalNode(this);\n C._ts_node_children_wasm(this.tree[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n this._children = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n this._children[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n C._free(buffer);\n }\n }\n return this._children;\n }\n /**\n * Iterate over this node's named children.\n *\n * See also {@link Node#children}.\n */\n get namedChildren() {\n if (!this._namedChildren) {\n marshalNode(this);\n C._ts_node_named_children_wasm(this.tree[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n this._namedChildren = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n this._namedChildren[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n C._free(buffer);\n }\n }\n return this._namedChildren;\n }\n /**\n * Get the descendants of this node that are the given type, or in the given types array.\n *\n * The types array should contain node type strings, which can be retrieved from {@link Language#types}.\n *\n * Additionally, a `startPosition` and `endPosition` can be passed in to restrict the search to a byte range.\n */\n descendantsOfType(types, startPosition = ZERO_POINT, endPosition = ZERO_POINT) {\n if (!Array.isArray(types)) types = [types];\n const symbols = [];\n const typesBySymbol = this.tree.language.types;\n for (const node_type of types) {\n if (node_type == \"ERROR\") {\n symbols.push(65535);\n }\n }\n for (let i2 = 0, n = typesBySymbol.length; i2 < n; i2++) {\n if (types.includes(typesBySymbol[i2])) {\n symbols.push(i2);\n }\n }\n const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length);\n for (let i2 = 0, n = symbols.length; i2 < n; i2++) {\n C.setValue(symbolsAddress + i2 * SIZE_OF_INT, symbols[i2], \"i32\");\n }\n marshalNode(this);\n C._ts_node_descendants_of_type_wasm(\n this.tree[0],\n symbolsAddress,\n symbols.length,\n startPosition.row,\n startPosition.column,\n endPosition.row,\n endPosition.column\n );\n const descendantCount = C.getValue(TRANSFER_BUFFER, \"i32\");\n const descendantAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(descendantCount);\n if (descendantCount > 0) {\n let address = descendantAddress;\n for (let i2 = 0; i2 < descendantCount; i2++) {\n result[i2] = unmarshalNode(this.tree, address);\n address += SIZE_OF_NODE;\n }\n }\n C._free(descendantAddress);\n C._free(symbolsAddress);\n return result;\n }\n /** Get this node's next sibling. */\n get nextSibling() {\n marshalNode(this);\n C._ts_node_next_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get this node's previous sibling. */\n get previousSibling() {\n marshalNode(this);\n C._ts_node_prev_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's next *named* sibling.\n *\n * See also {@link Node#isNamed}.\n */\n get nextNamedSibling() {\n marshalNode(this);\n C._ts_node_next_named_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get this node's previous *named* sibling.\n *\n * See also {@link Node#isNamed}.\n */\n get previousNamedSibling() {\n marshalNode(this);\n C._ts_node_prev_named_sibling_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the node's number of descendants, including one for the node itself. */\n get descendantCount() {\n marshalNode(this);\n return C._ts_node_descendant_count_wasm(this.tree[0]);\n }\n /**\n * Get this node's immediate parent.\n * Prefer {@link Node#childWithDescendant} for iterating over this node's ancestors.\n */\n get parent() {\n marshalNode(this);\n C._ts_node_parent_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Get the node that contains `descendant`.\n *\n * Note that this can return `descendant` itself.\n */\n childWithDescendant(descendant) {\n marshalNode(this);\n marshalNode(descendant, 1);\n C._ts_node_child_with_descendant_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest node within this node that spans the given byte range. */\n descendantForIndex(start2, end = start2) {\n if (typeof start2 !== \"number\" || typeof end !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, start2, \"i32\");\n C.setValue(address + SIZE_OF_INT, end, \"i32\");\n C._ts_node_descendant_for_index_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest named node within this node that spans the given byte range. */\n namedDescendantForIndex(start2, end = start2) {\n if (typeof start2 !== \"number\" || typeof end !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n C.setValue(address, start2, \"i32\");\n C.setValue(address + SIZE_OF_INT, end, \"i32\");\n C._ts_node_named_descendant_for_index_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest node within this node that spans the given point range. */\n descendantForPosition(start2, end = start2) {\n if (!isPoint(start2) || !isPoint(end)) {\n throw new Error(\"Arguments must be {row, column} objects\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n marshalPoint(address, start2);\n marshalPoint(address + SIZE_OF_POINT, end);\n C._ts_node_descendant_for_position_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /** Get the smallest named node within this node that spans the given point range. */\n namedDescendantForPosition(start2, end = start2) {\n if (!isPoint(start2) || !isPoint(end)) {\n throw new Error(\"Arguments must be {row, column} objects\");\n }\n marshalNode(this);\n const address = TRANSFER_BUFFER + SIZE_OF_NODE;\n marshalPoint(address, start2);\n marshalPoint(address + SIZE_OF_POINT, end);\n C._ts_node_named_descendant_for_position_wasm(this.tree[0]);\n return unmarshalNode(this.tree);\n }\n /**\n * Create a new {@link TreeCursor} starting from this node.\n *\n * Note that the given node is considered the root of the cursor,\n * and the cursor cannot walk outside this node.\n */\n walk() {\n marshalNode(this);\n C._ts_tree_cursor_new_wasm(this.tree[0]);\n return new TreeCursor(INTERNAL, this.tree);\n }\n /**\n * Edit this node to keep it in-sync with source code that has been edited.\n *\n * This function is only rarely needed. When you edit a syntax tree with\n * the {@link Tree#edit} method, all of the nodes that you retrieve from\n * the tree afterward will already reflect the edit. You only need to\n * use {@link Node#edit} when you have a specific {@link Node} instance that\n * you want to keep and continue to use after an edit.\n */\n edit(edit) {\n if (this.startIndex >= edit.oldEndIndex) {\n this.startIndex = edit.newEndIndex + (this.startIndex - edit.oldEndIndex);\n let subbedPointRow;\n let subbedPointColumn;\n if (this.startPosition.row > edit.oldEndPosition.row) {\n subbedPointRow = this.startPosition.row - edit.oldEndPosition.row;\n subbedPointColumn = this.startPosition.column;\n } else {\n subbedPointRow = 0;\n subbedPointColumn = this.startPosition.column;\n if (this.startPosition.column >= edit.oldEndPosition.column) {\n subbedPointColumn = this.startPosition.column - edit.oldEndPosition.column;\n }\n }\n if (subbedPointRow > 0) {\n this.startPosition.row += subbedPointRow;\n this.startPosition.column = subbedPointColumn;\n } else {\n this.startPosition.column += subbedPointColumn;\n }\n } else if (this.startIndex > edit.startIndex) {\n this.startIndex = edit.newEndIndex;\n this.startPosition.row = edit.newEndPosition.row;\n this.startPosition.column = edit.newEndPosition.column;\n }\n }\n /** Get the S-expression representation of this node. */\n toString() {\n marshalNode(this);\n const address = C._ts_node_to_string_wasm(this.tree[0]);\n const result = C.AsciiToString(address);\n C._free(address);\n return result;\n }\n};\n\n// src/marshal.ts\nfunction unmarshalCaptures(query, tree, address, patternIndex, result) {\n for (let i2 = 0, n = result.length; i2 < n; i2++) {\n const captureIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const node = unmarshalNode(tree, address);\n address += SIZE_OF_NODE;\n result[i2] = { patternIndex, name: query.captureNames[captureIndex], node };\n }\n return address;\n}\n__name(unmarshalCaptures, \"unmarshalCaptures\");\nfunction marshalNode(node, index = 0) {\n let address = TRANSFER_BUFFER + index * SIZE_OF_NODE;\n C.setValue(address, node.id, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node.startIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node.startPosition.row, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node.startPosition.column, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, node[0], \"i32\");\n}\n__name(marshalNode, \"marshalNode\");\nfunction unmarshalNode(tree, address = TRANSFER_BUFFER) {\n const id = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n if (id === 0) return null;\n const index = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const row = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const column = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const other = C.getValue(address, \"i32\");\n const result = new Node(INTERNAL, {\n id,\n tree,\n startIndex: index,\n startPosition: { row, column },\n other\n });\n return result;\n}\n__name(unmarshalNode, \"unmarshalNode\");\nfunction marshalTreeCursor(cursor, address = TRANSFER_BUFFER) {\n C.setValue(address + 0 * SIZE_OF_INT, cursor[0], \"i32\");\n C.setValue(address + 1 * SIZE_OF_INT, cursor[1], \"i32\");\n C.setValue(address + 2 * SIZE_OF_INT, cursor[2], \"i32\");\n C.setValue(address + 3 * SIZE_OF_INT, cursor[3], \"i32\");\n}\n__name(marshalTreeCursor, \"marshalTreeCursor\");\nfunction unmarshalTreeCursor(cursor) {\n cursor[0] = C.getValue(TRANSFER_BUFFER + 0 * SIZE_OF_INT, \"i32\");\n cursor[1] = C.getValue(TRANSFER_BUFFER + 1 * SIZE_OF_INT, \"i32\");\n cursor[2] = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, \"i32\");\n cursor[3] = C.getValue(TRANSFER_BUFFER + 3 * SIZE_OF_INT, \"i32\");\n}\n__name(unmarshalTreeCursor, \"unmarshalTreeCursor\");\nfunction marshalPoint(address, point) {\n C.setValue(address, point.row, \"i32\");\n C.setValue(address + SIZE_OF_INT, point.column, \"i32\");\n}\n__name(marshalPoint, \"marshalPoint\");\nfunction unmarshalPoint(address) {\n const result = {\n row: C.getValue(address, \"i32\") >>> 0,\n column: C.getValue(address + SIZE_OF_INT, \"i32\") >>> 0\n };\n return result;\n}\n__name(unmarshalPoint, \"unmarshalPoint\");\nfunction marshalRange(address, range) {\n marshalPoint(address, range.startPosition);\n address += SIZE_OF_POINT;\n marshalPoint(address, range.endPosition);\n address += SIZE_OF_POINT;\n C.setValue(address, range.startIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, range.endIndex, \"i32\");\n address += SIZE_OF_INT;\n}\n__name(marshalRange, \"marshalRange\");\nfunction unmarshalRange(address) {\n const result = {};\n result.startPosition = unmarshalPoint(address);\n address += SIZE_OF_POINT;\n result.endPosition = unmarshalPoint(address);\n address += SIZE_OF_POINT;\n result.startIndex = C.getValue(address, \"i32\") >>> 0;\n address += SIZE_OF_INT;\n result.endIndex = C.getValue(address, \"i32\") >>> 0;\n return result;\n}\n__name(unmarshalRange, \"unmarshalRange\");\nfunction marshalEdit(edit, address = TRANSFER_BUFFER) {\n marshalPoint(address, edit.startPosition);\n address += SIZE_OF_POINT;\n marshalPoint(address, edit.oldEndPosition);\n address += SIZE_OF_POINT;\n marshalPoint(address, edit.newEndPosition);\n address += SIZE_OF_POINT;\n C.setValue(address, edit.startIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, edit.oldEndIndex, \"i32\");\n address += SIZE_OF_INT;\n C.setValue(address, edit.newEndIndex, \"i32\");\n address += SIZE_OF_INT;\n}\n__name(marshalEdit, \"marshalEdit\");\nfunction unmarshalLanguageMetadata(address) {\n const major_version = C.getValue(address, \"i32\");\n const minor_version = C.getValue(address += SIZE_OF_INT, \"i32\");\n const patch_version = C.getValue(address += SIZE_OF_INT, \"i32\");\n return { major_version, minor_version, patch_version };\n}\n__name(unmarshalLanguageMetadata, \"unmarshalLanguageMetadata\");\n\n// src/language.ts\nvar LANGUAGE_FUNCTION_REGEX = /^tree_sitter_\\w+$/;\nvar Language = class _Language {\n static {\n __name(this, \"Language\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /**\n * A list of all node types in the language. The index of each type in this\n * array is its node type id.\n */\n types;\n /**\n * A list of all field names in the language. The index of each field name in\n * this array is its field id.\n */\n fields;\n /** @internal */\n constructor(internal, address) {\n assertInternal(internal);\n this[0] = address;\n this.types = new Array(C._ts_language_symbol_count(this[0]));\n for (let i2 = 0, n = this.types.length; i2 < n; i2++) {\n if (C._ts_language_symbol_type(this[0], i2) < 2) {\n this.types[i2] = C.UTF8ToString(C._ts_language_symbol_name(this[0], i2));\n }\n }\n this.fields = new Array(C._ts_language_field_count(this[0]) + 1);\n for (let i2 = 0, n = this.fields.length; i2 < n; i2++) {\n const fieldName = C._ts_language_field_name_for_id(this[0], i2);\n if (fieldName !== 0) {\n this.fields[i2] = C.UTF8ToString(fieldName);\n } else {\n this.fields[i2] = null;\n }\n }\n }\n /**\n * Gets the name of the language.\n */\n get name() {\n const ptr = C._ts_language_name(this[0]);\n if (ptr === 0) return null;\n return C.UTF8ToString(ptr);\n }\n /**\n * Gets the ABI version of the language.\n */\n get abiVersion() {\n return C._ts_language_abi_version(this[0]);\n }\n /**\n * Get the metadata for this language. This information is generated by the\n * CLI, and relies on the language author providing the correct metadata in\n * the language's `tree-sitter.json` file.\n */\n get metadata() {\n C._ts_language_metadata_wasm(this[0]);\n const length = C.getValue(TRANSFER_BUFFER, \"i32\");\n if (length === 0) return null;\n return unmarshalLanguageMetadata(TRANSFER_BUFFER + SIZE_OF_INT);\n }\n /**\n * Gets the number of fields in the language.\n */\n get fieldCount() {\n return this.fields.length - 1;\n }\n /**\n * Gets the number of states in the language.\n */\n get stateCount() {\n return C._ts_language_state_count(this[0]);\n }\n /**\n * Get the field id for a field name.\n */\n fieldIdForName(fieldName) {\n const result = this.fields.indexOf(fieldName);\n return result !== -1 ? result : null;\n }\n /**\n * Get the field name for a field id.\n */\n fieldNameForId(fieldId) {\n return this.fields[fieldId] ?? null;\n }\n /**\n * Get the node type id for a node type name.\n */\n idForNodeType(type, named) {\n const typeLength = C.lengthBytesUTF8(type);\n const typeAddress = C._malloc(typeLength + 1);\n C.stringToUTF8(type, typeAddress, typeLength + 1);\n const result = C._ts_language_symbol_for_name(this[0], typeAddress, typeLength, named ? 1 : 0);\n C._free(typeAddress);\n return result || null;\n }\n /**\n * Gets the number of node types in the language.\n */\n get nodeTypeCount() {\n return C._ts_language_symbol_count(this[0]);\n }\n /**\n * Get the node type name for a node type id.\n */\n nodeTypeForId(typeId) {\n const name2 = C._ts_language_symbol_name(this[0], typeId);\n return name2 ? C.UTF8ToString(name2) : null;\n }\n /**\n * Check if a node type is named.\n *\n * @see {@link https://tree-sitter.github.io/tree-sitter/using-parsers/2-basic-parsing.html#named-vs-anonymous-nodes}\n */\n nodeTypeIsNamed(typeId) {\n return C._ts_language_type_is_named_wasm(this[0], typeId) ? true : false;\n }\n /**\n * Check if a node type is visible.\n */\n nodeTypeIsVisible(typeId) {\n return C._ts_language_type_is_visible_wasm(this[0], typeId) ? true : false;\n }\n /**\n * Get the supertypes ids of this language.\n *\n * @see {@link https://tree-sitter.github.io/tree-sitter/using-parsers/6-static-node-types.html?highlight=supertype#supertype-nodes}\n */\n get supertypes() {\n C._ts_language_supertypes_wasm(this[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = C.getValue(address, \"i16\");\n address += SIZE_OF_SHORT;\n }\n }\n return result;\n }\n /**\n * Get the subtype ids for a given supertype node id.\n */\n subtypes(supertype) {\n C._ts_language_subtypes_wasm(this[0], supertype);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = C.getValue(address, \"i16\");\n address += SIZE_OF_SHORT;\n }\n }\n return result;\n }\n /**\n * Get the next state id for a given state id and node type id.\n */\n nextState(stateId, typeId) {\n return C._ts_language_next_state(this[0], stateId, typeId);\n }\n /**\n * Create a new lookahead iterator for this language and parse state.\n *\n * This returns `null` if state is invalid for this language.\n *\n * Iterating {@link LookaheadIterator} will yield valid symbols in the given\n * parse state. Newly created lookahead iterators will return the `ERROR`\n * symbol from {@link LookaheadIterator#currentType}.\n *\n * Lookahead iterators can be useful for generating suggestions and improving\n * syntax error diagnostics. To get symbols valid in an `ERROR` node, use the\n * lookahead iterator on its first leaf node state. For `MISSING` nodes, a\n * lookahead iterator created on the previous non-extra leaf node may be\n * appropriate.\n */\n lookaheadIterator(stateId) {\n const address = C._ts_lookahead_iterator_new(this[0], stateId);\n if (address) return new LookaheadIterator(INTERNAL, address, this);\n return null;\n }\n /**\n * Load a language from a WebAssembly module.\n * The module can be provided as a path to a file or as a buffer.\n */\n static async load(input) {\n let binary2;\n if (input instanceof Uint8Array) {\n binary2 = input;\n } else if (globalThis.process?.versions.node) {\n const fs2 = await import(\"fs/promises\");\n binary2 = await fs2.readFile(input);\n } else {\n const response = await fetch(input);\n if (!response.ok) {\n const body2 = await response.text();\n throw new Error(`Language.load failed with status ${response.status}.\n\n${body2}`);\n }\n const retryResp = response.clone();\n try {\n binary2 = await WebAssembly.compileStreaming(response);\n } catch (reason) {\n console.error(\"wasm streaming compile failed:\", reason);\n console.error(\"falling back to ArrayBuffer instantiation\");\n binary2 = new Uint8Array(await retryResp.arrayBuffer());\n }\n }\n const mod = await C.loadWebAssemblyModule(binary2, { loadAsync: true });\n const symbolNames = Object.keys(mod);\n const functionName = symbolNames.find((key) => LANGUAGE_FUNCTION_REGEX.test(key) && !key.includes(\"external_scanner_\"));\n if (!functionName) {\n console.log(`Couldn't find language function in Wasm file. Symbols:\n${JSON.stringify(symbolNames, null, 2)}`);\n throw new Error(\"Language.load failed: no language function found in Wasm file\");\n }\n const languageAddress = mod[functionName]();\n return new _Language(INTERNAL, languageAddress);\n }\n};\n\n// src/bindings.ts\nvar import_web_tree_sitter = __toESM(require_web_tree_sitter(), 1);\nvar Module2 = null;\nasync function initializeBinding(moduleOptions) {\n return Module2 ??= await (0, import_web_tree_sitter.default)(moduleOptions);\n}\n__name(initializeBinding, \"initializeBinding\");\nfunction checkModule() {\n return !!Module2;\n}\n__name(checkModule, \"checkModule\");\n\n// src/parser.ts\nvar TRANSFER_BUFFER;\nvar LANGUAGE_VERSION;\nvar MIN_COMPATIBLE_VERSION;\nvar Parser = class {\n static {\n __name(this, \"Parser\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n [1] = 0;\n // Internal handle for Wasm\n /** @internal */\n logCallback = null;\n /** The parser's current language. */\n language = null;\n /**\n * This must always be called before creating a Parser.\n *\n * You can optionally pass in options to configure the Wasm module, the most common\n * one being `locateFile` to help the module find the `.wasm` file.\n */\n static async init(moduleOptions) {\n setModule(await initializeBinding(moduleOptions));\n TRANSFER_BUFFER = C._ts_init();\n LANGUAGE_VERSION = C.getValue(TRANSFER_BUFFER, \"i32\");\n MIN_COMPATIBLE_VERSION = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n }\n /**\n * Create a new parser.\n */\n constructor() {\n this.initialize();\n }\n /** @internal */\n initialize() {\n if (!checkModule()) {\n throw new Error(\"cannot construct a Parser before calling `init()`\");\n }\n C._ts_parser_new_wasm();\n this[0] = C.getValue(TRANSFER_BUFFER, \"i32\");\n this[1] = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n }\n /** Delete the parser, freeing its resources. */\n delete() {\n C._ts_parser_delete(this[0]);\n C._free(this[1]);\n this[0] = 0;\n this[1] = 0;\n }\n /**\n * Set the language that the parser should use for parsing.\n *\n * If the language was not successfully assigned, an error will be thrown.\n * This happens if the language was generated with an incompatible\n * version of the Tree-sitter CLI. Check the language's version using\n * {@link Language#version} and compare it to this library's\n * {@link LANGUAGE_VERSION} and {@link MIN_COMPATIBLE_VERSION} constants.\n */\n setLanguage(language) {\n let address;\n if (!language) {\n address = 0;\n this.language = null;\n } else if (language.constructor === Language) {\n address = language[0];\n const version = C._ts_language_abi_version(address);\n if (version < MIN_COMPATIBLE_VERSION || LANGUAGE_VERSION < version) {\n throw new Error(\n `Incompatible language version ${version}. Compatibility range ${MIN_COMPATIBLE_VERSION} through ${LANGUAGE_VERSION}.`\n );\n }\n this.language = language;\n } else {\n throw new Error(\"Argument must be a Language\");\n }\n C._ts_parser_set_language(this[0], address);\n return this;\n }\n /**\n * Parse a slice of UTF8 text.\n *\n * @param {string | ParseCallback} callback - The UTF8-encoded text to parse or a callback function.\n *\n * @param {Tree | null} [oldTree] - A previous syntax tree parsed from the same document. If the text of the\n * document has changed since `oldTree` was created, then you must edit `oldTree` to match\n * the new text using {@link Tree#edit}.\n *\n * @param {ParseOptions} [options] - Options for parsing the text.\n * This can be used to set the included ranges, or a progress callback.\n *\n * @returns {Tree | null} A {@link Tree} if parsing succeeded, or `null` if:\n * - The parser has not yet had a language assigned with {@link Parser#setLanguage}.\n * - The progress callback returned true.\n */\n parse(callback, oldTree, options) {\n if (typeof callback === \"string\") {\n C.currentParseCallback = (index) => callback.slice(index);\n } else if (typeof callback === \"function\") {\n C.currentParseCallback = callback;\n } else {\n throw new Error(\"Argument must be a string or a function\");\n }\n if (options?.progressCallback) {\n C.currentProgressCallback = options.progressCallback;\n } else {\n C.currentProgressCallback = null;\n }\n if (this.logCallback) {\n C.currentLogCallback = this.logCallback;\n C._ts_parser_enable_logger_wasm(this[0], 1);\n } else {\n C.currentLogCallback = null;\n C._ts_parser_enable_logger_wasm(this[0], 0);\n }\n let rangeCount = 0;\n let rangeAddress = 0;\n if (options?.includedRanges) {\n rangeCount = options.includedRanges.length;\n rangeAddress = C._calloc(rangeCount, SIZE_OF_RANGE);\n let address = rangeAddress;\n for (let i2 = 0; i2 < rangeCount; i2++) {\n marshalRange(address, options.includedRanges[i2]);\n address += SIZE_OF_RANGE;\n }\n }\n const treeAddress = C._ts_parser_parse_wasm(\n this[0],\n this[1],\n oldTree ? oldTree[0] : 0,\n rangeAddress,\n rangeCount\n );\n if (!treeAddress) {\n C.currentParseCallback = null;\n C.currentLogCallback = null;\n C.currentProgressCallback = null;\n return null;\n }\n if (!this.language) {\n throw new Error(\"Parser must have a language to parse\");\n }\n const result = new Tree(INTERNAL, treeAddress, this.language, C.currentParseCallback);\n C.currentParseCallback = null;\n C.currentLogCallback = null;\n C.currentProgressCallback = null;\n return result;\n }\n /**\n * Instruct the parser to start the next parse from the beginning.\n *\n * If the parser previously failed because of a callback, \n * then by default, it will resume where it left off on the\n * next call to {@link Parser#parse} or other parsing functions.\n * If you don't want to resume, and instead intend to use this parser to\n * parse some other document, you must call `reset` first.\n */\n reset() {\n C._ts_parser_reset(this[0]);\n }\n /** Get the ranges of text that the parser will include when parsing. */\n getIncludedRanges() {\n C._ts_parser_included_ranges_wasm(this[0]);\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const buffer = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const result = new Array(count);\n if (count > 0) {\n let address = buffer;\n for (let i2 = 0; i2 < count; i2++) {\n result[i2] = unmarshalRange(address);\n address += SIZE_OF_RANGE;\n }\n C._free(buffer);\n }\n return result;\n }\n /** Set the logging callback that a parser should use during parsing. */\n setLogger(callback) {\n if (!callback) {\n this.logCallback = null;\n } else if (typeof callback !== \"function\") {\n throw new Error(\"Logger callback must be a function\");\n } else {\n this.logCallback = callback;\n }\n return this;\n }\n /** Get the parser's current logger. */\n getLogger() {\n return this.logCallback;\n }\n};\n\n// src/query.ts\nvar PREDICATE_STEP_TYPE_CAPTURE = 1;\nvar PREDICATE_STEP_TYPE_STRING = 2;\nvar QUERY_WORD_REGEX = /[\\w-]+/g;\nvar CaptureQuantifier = {\n Zero: 0,\n ZeroOrOne: 1,\n ZeroOrMore: 2,\n One: 3,\n OneOrMore: 4\n};\nvar isCaptureStep = /* @__PURE__ */ __name((step) => step.type === \"capture\", \"isCaptureStep\");\nvar isStringStep = /* @__PURE__ */ __name((step) => step.type === \"string\", \"isStringStep\");\nvar QueryErrorKind = {\n Syntax: 1,\n NodeName: 2,\n FieldName: 3,\n CaptureName: 4,\n PatternStructure: 5\n};\nvar QueryError = class _QueryError extends Error {\n constructor(kind, info2, index, length) {\n super(_QueryError.formatMessage(kind, info2));\n this.kind = kind;\n this.info = info2;\n this.index = index;\n this.length = length;\n this.name = \"QueryError\";\n }\n static {\n __name(this, \"QueryError\");\n }\n /** Formats an error message based on the error kind and info */\n static formatMessage(kind, info2) {\n switch (kind) {\n case QueryErrorKind.NodeName:\n return `Bad node name '${info2.word}'`;\n case QueryErrorKind.FieldName:\n return `Bad field name '${info2.word}'`;\n case QueryErrorKind.CaptureName:\n return `Bad capture name @${info2.word}`;\n case QueryErrorKind.PatternStructure:\n return `Bad pattern structure at offset ${info2.suffix}`;\n case QueryErrorKind.Syntax:\n return `Bad syntax at offset ${info2.suffix}`;\n }\n }\n};\nfunction parseAnyPredicate(steps, index, operator, textPredicates) {\n if (steps.length !== 3) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected 2, got ${steps.length - 1}`\n );\n }\n if (!isCaptureStep(steps[1])) {\n throw new Error(\n `First argument of \\`#${operator}\\` predicate must be a capture. Got \"${steps[1].value}\"`\n );\n }\n const isPositive = operator === \"eq?\" || operator === \"any-eq?\";\n const matchAll = !operator.startsWith(\"any-\");\n if (isCaptureStep(steps[2])) {\n const captureName1 = steps[1].name;\n const captureName2 = steps[2].name;\n textPredicates[index].push((captures) => {\n const nodes1 = [];\n const nodes2 = [];\n for (const c of captures) {\n if (c.name === captureName1) nodes1.push(c.node);\n if (c.name === captureName2) nodes2.push(c.node);\n }\n const compare = /* @__PURE__ */ __name((n1, n2, positive) => {\n return positive ? n1.text === n2.text : n1.text !== n2.text;\n }, \"compare\");\n return matchAll ? nodes1.every((n1) => nodes2.some((n2) => compare(n1, n2, isPositive))) : nodes1.some((n1) => nodes2.some((n2) => compare(n1, n2, isPositive)));\n });\n } else {\n const captureName = steps[1].name;\n const stringValue = steps[2].value;\n const matches = /* @__PURE__ */ __name((n) => n.text === stringValue, \"matches\");\n const doesNotMatch = /* @__PURE__ */ __name((n) => n.text !== stringValue, \"doesNotMatch\");\n textPredicates[index].push((captures) => {\n const nodes = [];\n for (const c of captures) {\n if (c.name === captureName) nodes.push(c.node);\n }\n const test = isPositive ? matches : doesNotMatch;\n return matchAll ? nodes.every(test) : nodes.some(test);\n });\n }\n}\n__name(parseAnyPredicate, \"parseAnyPredicate\");\nfunction parseMatchPredicate(steps, index, operator, textPredicates) {\n if (steps.length !== 3) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected 2, got ${steps.length - 1}.`\n );\n }\n if (steps[1].type !== \"capture\") {\n throw new Error(\n `First argument of \\`#${operator}\\` predicate must be a capture. Got \"${steps[1].value}\".`\n );\n }\n if (steps[2].type !== \"string\") {\n throw new Error(\n `Second argument of \\`#${operator}\\` predicate must be a string. Got @${steps[2].name}.`\n );\n }\n const isPositive = operator === \"match?\" || operator === \"any-match?\";\n const matchAll = !operator.startsWith(\"any-\");\n const captureName = steps[1].name;\n const regex = new RegExp(steps[2].value);\n textPredicates[index].push((captures) => {\n const nodes = [];\n for (const c of captures) {\n if (c.name === captureName) nodes.push(c.node.text);\n }\n const test = /* @__PURE__ */ __name((text, positive) => {\n return positive ? regex.test(text) : !regex.test(text);\n }, \"test\");\n if (nodes.length === 0) return !isPositive;\n return matchAll ? nodes.every((text) => test(text, isPositive)) : nodes.some((text) => test(text, isPositive));\n });\n}\n__name(parseMatchPredicate, \"parseMatchPredicate\");\nfunction parseAnyOfPredicate(steps, index, operator, textPredicates) {\n if (steps.length < 2) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected at least 1. Got ${steps.length - 1}.`\n );\n }\n if (steps[1].type !== \"capture\") {\n throw new Error(\n `First argument of \\`#${operator}\\` predicate must be a capture. Got \"${steps[1].value}\".`\n );\n }\n const isPositive = operator === \"any-of?\";\n const captureName = steps[1].name;\n const stringSteps = steps.slice(2);\n if (!stringSteps.every(isStringStep)) {\n throw new Error(\n `Arguments to \\`#${operator}\\` predicate must be strings.\".`\n );\n }\n const values = stringSteps.map((s) => s.value);\n textPredicates[index].push((captures) => {\n const nodes = [];\n for (const c of captures) {\n if (c.name === captureName) nodes.push(c.node.text);\n }\n if (nodes.length === 0) return !isPositive;\n return nodes.every((text) => values.includes(text)) === isPositive;\n });\n}\n__name(parseAnyOfPredicate, \"parseAnyOfPredicate\");\nfunction parseIsPredicate(steps, index, operator, assertedProperties, refutedProperties) {\n if (steps.length < 2 || steps.length > 3) {\n throw new Error(\n `Wrong number of arguments to \\`#${operator}\\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`\n );\n }\n if (!steps.every(isStringStep)) {\n throw new Error(\n `Arguments to \\`#${operator}\\` predicate must be strings.\".`\n );\n }\n const properties = operator === \"is?\" ? assertedProperties : refutedProperties;\n if (!properties[index]) properties[index] = {};\n properties[index][steps[1].value] = steps[2]?.value ?? null;\n}\n__name(parseIsPredicate, \"parseIsPredicate\");\nfunction parseSetDirective(steps, index, setProperties) {\n if (steps.length < 2 || steps.length > 3) {\n throw new Error(`Wrong number of arguments to \\`#set!\\` predicate. Expected 1 or 2. Got ${steps.length - 1}.`);\n }\n if (!steps.every(isStringStep)) {\n throw new Error(`Arguments to \\`#set!\\` predicate must be strings.\".`);\n }\n if (!setProperties[index]) setProperties[index] = {};\n setProperties[index][steps[1].value] = steps[2]?.value ?? null;\n}\n__name(parseSetDirective, \"parseSetDirective\");\nfunction parsePattern(index, stepType, stepValueId, captureNames, stringValues, steps, textPredicates, predicates, setProperties, assertedProperties, refutedProperties) {\n if (stepType === PREDICATE_STEP_TYPE_CAPTURE) {\n const name2 = captureNames[stepValueId];\n steps.push({ type: \"capture\", name: name2 });\n } else if (stepType === PREDICATE_STEP_TYPE_STRING) {\n steps.push({ type: \"string\", value: stringValues[stepValueId] });\n } else if (steps.length > 0) {\n if (steps[0].type !== \"string\") {\n throw new Error(\"Predicates must begin with a literal value\");\n }\n const operator = steps[0].value;\n switch (operator) {\n case \"any-not-eq?\":\n case \"not-eq?\":\n case \"any-eq?\":\n case \"eq?\":\n parseAnyPredicate(steps, index, operator, textPredicates);\n break;\n case \"any-not-match?\":\n case \"not-match?\":\n case \"any-match?\":\n case \"match?\":\n parseMatchPredicate(steps, index, operator, textPredicates);\n break;\n case \"not-any-of?\":\n case \"any-of?\":\n parseAnyOfPredicate(steps, index, operator, textPredicates);\n break;\n case \"is?\":\n case \"is-not?\":\n parseIsPredicate(steps, index, operator, assertedProperties, refutedProperties);\n break;\n case \"set!\":\n parseSetDirective(steps, index, setProperties);\n break;\n default:\n predicates[index].push({ operator, operands: steps.slice(1) });\n }\n steps.length = 0;\n }\n}\n__name(parsePattern, \"parsePattern\");\nvar Query = class {\n static {\n __name(this, \"Query\");\n }\n /** @internal */\n [0] = 0;\n // Internal handle for Wasm\n /** @internal */\n exceededMatchLimit;\n /** @internal */\n textPredicates;\n /** The names of the captures used in the query. */\n captureNames;\n /** The quantifiers of the captures used in the query. */\n captureQuantifiers;\n /**\n * The other user-defined predicates associated with the given index.\n *\n * This includes predicates with operators other than:\n * - `match?`\n * - `eq?` and `not-eq?`\n * - `any-of?` and `not-any-of?`\n * - `is?` and `is-not?`\n * - `set!`\n */\n predicates;\n /** The properties for predicates with the operator `set!`. */\n setProperties;\n /** The properties for predicates with the operator `is?`. */\n assertedProperties;\n /** The properties for predicates with the operator `is-not?`. */\n refutedProperties;\n /** The maximum number of in-progress matches for this cursor. */\n matchLimit;\n /**\n * Create a new query from a string containing one or more S-expression\n * patterns.\n *\n * The query is associated with a particular language, and can only be run\n * on syntax nodes parsed with that language. References to Queries can be\n * shared between multiple threads.\n *\n * @link {@see https://tree-sitter.github.io/tree-sitter/using-parsers/queries}\n */\n constructor(language, source) {\n const sourceLength = C.lengthBytesUTF8(source);\n const sourceAddress = C._malloc(sourceLength + 1);\n C.stringToUTF8(source, sourceAddress, sourceLength + 1);\n const address = C._ts_query_new(\n language[0],\n sourceAddress,\n sourceLength,\n TRANSFER_BUFFER,\n TRANSFER_BUFFER + SIZE_OF_INT\n );\n if (!address) {\n const errorId = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const errorByte = C.getValue(TRANSFER_BUFFER, \"i32\");\n const errorIndex = C.UTF8ToString(sourceAddress, errorByte).length;\n const suffix = source.slice(errorIndex, errorIndex + 100).split(\"\\n\")[0];\n const word = suffix.match(QUERY_WORD_REGEX)?.[0] ?? \"\";\n C._free(sourceAddress);\n switch (errorId) {\n case QueryErrorKind.Syntax:\n throw new QueryError(QueryErrorKind.Syntax, { suffix: `${errorIndex}: '${suffix}'...` }, errorIndex, 0);\n case QueryErrorKind.NodeName:\n throw new QueryError(errorId, { word }, errorIndex, word.length);\n case QueryErrorKind.FieldName:\n throw new QueryError(errorId, { word }, errorIndex, word.length);\n case QueryErrorKind.CaptureName:\n throw new QueryError(errorId, { word }, errorIndex, word.length);\n case QueryErrorKind.PatternStructure:\n throw new QueryError(errorId, { suffix: `${errorIndex}: '${suffix}'...` }, errorIndex, 0);\n }\n }\n const stringCount = C._ts_query_string_count(address);\n const captureCount = C._ts_query_capture_count(address);\n const patternCount = C._ts_query_pattern_count(address);\n const captureNames = new Array(captureCount);\n const captureQuantifiers = new Array(patternCount);\n const stringValues = new Array(stringCount);\n for (let i2 = 0; i2 < captureCount; i2++) {\n const nameAddress = C._ts_query_capture_name_for_id(\n address,\n i2,\n TRANSFER_BUFFER\n );\n const nameLength = C.getValue(TRANSFER_BUFFER, \"i32\");\n captureNames[i2] = C.UTF8ToString(nameAddress, nameLength);\n }\n for (let i2 = 0; i2 < patternCount; i2++) {\n const captureQuantifiersArray = new Array(captureCount);\n for (let j = 0; j < captureCount; j++) {\n const quantifier = C._ts_query_capture_quantifier_for_id(address, i2, j);\n captureQuantifiersArray[j] = quantifier;\n }\n captureQuantifiers[i2] = captureQuantifiersArray;\n }\n for (let i2 = 0; i2 < stringCount; i2++) {\n const valueAddress = C._ts_query_string_value_for_id(\n address,\n i2,\n TRANSFER_BUFFER\n );\n const nameLength = C.getValue(TRANSFER_BUFFER, \"i32\");\n stringValues[i2] = C.UTF8ToString(valueAddress, nameLength);\n }\n const setProperties = new Array(patternCount);\n const assertedProperties = new Array(patternCount);\n const refutedProperties = new Array(patternCount);\n const predicates = new Array(patternCount);\n const textPredicates = new Array(patternCount);\n for (let i2 = 0; i2 < patternCount; i2++) {\n const predicatesAddress = C._ts_query_predicates_for_pattern(address, i2, TRANSFER_BUFFER);\n const stepCount = C.getValue(TRANSFER_BUFFER, \"i32\");\n predicates[i2] = [];\n textPredicates[i2] = [];\n const steps = new Array();\n let stepAddress = predicatesAddress;\n for (let j = 0; j < stepCount; j++) {\n const stepType = C.getValue(stepAddress, \"i32\");\n stepAddress += SIZE_OF_INT;\n const stepValueId = C.getValue(stepAddress, \"i32\");\n stepAddress += SIZE_OF_INT;\n parsePattern(\n i2,\n stepType,\n stepValueId,\n captureNames,\n stringValues,\n steps,\n textPredicates,\n predicates,\n setProperties,\n assertedProperties,\n refutedProperties\n );\n }\n Object.freeze(textPredicates[i2]);\n Object.freeze(predicates[i2]);\n Object.freeze(setProperties[i2]);\n Object.freeze(assertedProperties[i2]);\n Object.freeze(refutedProperties[i2]);\n }\n C._free(sourceAddress);\n this[0] = address;\n this.captureNames = captureNames;\n this.captureQuantifiers = captureQuantifiers;\n this.textPredicates = textPredicates;\n this.predicates = predicates;\n this.setProperties = setProperties;\n this.assertedProperties = assertedProperties;\n this.refutedProperties = refutedProperties;\n this.exceededMatchLimit = false;\n }\n /** Delete the query, freeing its resources. */\n delete() {\n C._ts_query_delete(this[0]);\n this[0] = 0;\n }\n /**\n * Iterate over all of the matches in the order that they were found.\n *\n * Each match contains the index of the pattern that matched, and a list of\n * captures. Because multiple patterns can match the same set of nodes,\n * one match may contain captures that appear *before* some of the\n * captures from a previous match.\n *\n * @param {Node} node - The node to execute the query on.\n *\n * @param {QueryOptions} options - Options for query execution.\n */\n matches(node, options = {}) {\n const startPosition = options.startPosition ?? ZERO_POINT;\n const endPosition = options.endPosition ?? ZERO_POINT;\n const startIndex = options.startIndex ?? 0;\n const endIndex = options.endIndex ?? 0;\n const startContainingPosition = options.startContainingPosition ?? ZERO_POINT;\n const endContainingPosition = options.endContainingPosition ?? ZERO_POINT;\n const startContainingIndex = options.startContainingIndex ?? 0;\n const endContainingIndex = options.endContainingIndex ?? 0;\n const matchLimit = options.matchLimit ?? 4294967295;\n const maxStartDepth = options.maxStartDepth ?? 4294967295;\n const progressCallback = options.progressCallback;\n if (typeof matchLimit !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n this.matchLimit = matchLimit;\n if (endIndex !== 0 && startIndex > endIndex) {\n throw new Error(\"`startIndex` cannot be greater than `endIndex`\");\n }\n if (endPosition !== ZERO_POINT && (startPosition.row > endPosition.row || startPosition.row === endPosition.row && startPosition.column > endPosition.column)) {\n throw new Error(\"`startPosition` cannot be greater than `endPosition`\");\n }\n if (endContainingIndex !== 0 && startContainingIndex > endContainingIndex) {\n throw new Error(\"`startContainingIndex` cannot be greater than `endContainingIndex`\");\n }\n if (endContainingPosition !== ZERO_POINT && (startContainingPosition.row > endContainingPosition.row || startContainingPosition.row === endContainingPosition.row && startContainingPosition.column > endContainingPosition.column)) {\n throw new Error(\"`startContainingPosition` cannot be greater than `endContainingPosition`\");\n }\n if (progressCallback) {\n C.currentQueryProgressCallback = progressCallback;\n }\n marshalNode(node);\n C._ts_query_matches_wasm(\n this[0],\n node.tree[0],\n startPosition.row,\n startPosition.column,\n endPosition.row,\n endPosition.column,\n startIndex,\n endIndex,\n startContainingPosition.row,\n startContainingPosition.column,\n endContainingPosition.row,\n endContainingPosition.column,\n startContainingIndex,\n endContainingIndex,\n matchLimit,\n maxStartDepth\n );\n const rawCount = C.getValue(TRANSFER_BUFFER, \"i32\");\n const startAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const didExceedMatchLimit = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, \"i32\");\n const result = new Array(rawCount);\n this.exceededMatchLimit = Boolean(didExceedMatchLimit);\n let filteredCount = 0;\n let address = startAddress;\n for (let i2 = 0; i2 < rawCount; i2++) {\n const patternIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captureCount = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captures = new Array(captureCount);\n address = unmarshalCaptures(this, node.tree, address, patternIndex, captures);\n if (this.textPredicates[patternIndex].every((p) => p(captures))) {\n result[filteredCount] = { patternIndex, captures };\n const setProperties = this.setProperties[patternIndex];\n result[filteredCount].setProperties = setProperties;\n const assertedProperties = this.assertedProperties[patternIndex];\n result[filteredCount].assertedProperties = assertedProperties;\n const refutedProperties = this.refutedProperties[patternIndex];\n result[filteredCount].refutedProperties = refutedProperties;\n filteredCount++;\n }\n }\n result.length = filteredCount;\n C._free(startAddress);\n C.currentQueryProgressCallback = null;\n return result;\n }\n /**\n * Iterate over all of the individual captures in the order that they\n * appear.\n *\n * This is useful if you don't care about which pattern matched, and just\n * want a single, ordered sequence of captures.\n *\n * @param {Node} node - The node to execute the query on.\n *\n * @param {QueryOptions} options - Options for query execution.\n */\n captures(node, options = {}) {\n const startPosition = options.startPosition ?? ZERO_POINT;\n const endPosition = options.endPosition ?? ZERO_POINT;\n const startIndex = options.startIndex ?? 0;\n const endIndex = options.endIndex ?? 0;\n const startContainingPosition = options.startContainingPosition ?? ZERO_POINT;\n const endContainingPosition = options.endContainingPosition ?? ZERO_POINT;\n const startContainingIndex = options.startContainingIndex ?? 0;\n const endContainingIndex = options.endContainingIndex ?? 0;\n const matchLimit = options.matchLimit ?? 4294967295;\n const maxStartDepth = options.maxStartDepth ?? 4294967295;\n const progressCallback = options.progressCallback;\n if (typeof matchLimit !== \"number\") {\n throw new Error(\"Arguments must be numbers\");\n }\n this.matchLimit = matchLimit;\n if (endIndex !== 0 && startIndex > endIndex) {\n throw new Error(\"`startIndex` cannot be greater than `endIndex`\");\n }\n if (endPosition !== ZERO_POINT && (startPosition.row > endPosition.row || startPosition.row === endPosition.row && startPosition.column > endPosition.column)) {\n throw new Error(\"`startPosition` cannot be greater than `endPosition`\");\n }\n if (endContainingIndex !== 0 && startContainingIndex > endContainingIndex) {\n throw new Error(\"`startContainingIndex` cannot be greater than `endContainingIndex`\");\n }\n if (endContainingPosition !== ZERO_POINT && (startContainingPosition.row > endContainingPosition.row || startContainingPosition.row === endContainingPosition.row && startContainingPosition.column > endContainingPosition.column)) {\n throw new Error(\"`startContainingPosition` cannot be greater than `endContainingPosition`\");\n }\n if (progressCallback) {\n C.currentQueryProgressCallback = progressCallback;\n }\n marshalNode(node);\n C._ts_query_captures_wasm(\n this[0],\n node.tree[0],\n startPosition.row,\n startPosition.column,\n endPosition.row,\n endPosition.column,\n startIndex,\n endIndex,\n startContainingPosition.row,\n startContainingPosition.column,\n endContainingPosition.row,\n endContainingPosition.column,\n startContainingIndex,\n endContainingIndex,\n matchLimit,\n maxStartDepth\n );\n const count = C.getValue(TRANSFER_BUFFER, \"i32\");\n const startAddress = C.getValue(TRANSFER_BUFFER + SIZE_OF_INT, \"i32\");\n const didExceedMatchLimit = C.getValue(TRANSFER_BUFFER + 2 * SIZE_OF_INT, \"i32\");\n const result = new Array();\n this.exceededMatchLimit = Boolean(didExceedMatchLimit);\n const captures = new Array();\n let address = startAddress;\n for (let i2 = 0; i2 < count; i2++) {\n const patternIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captureCount = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n const captureIndex = C.getValue(address, \"i32\");\n address += SIZE_OF_INT;\n captures.length = captureCount;\n address = unmarshalCaptures(this, node.tree, address, patternIndex, captures);\n if (this.textPredicates[patternIndex].every((p) => p(captures))) {\n const capture = captures[captureIndex];\n const setProperties = this.setProperties[patternIndex];\n capture.setProperties = setProperties;\n const assertedProperties = this.assertedProperties[patternIndex];\n capture.assertedProperties = assertedProperties;\n const refutedProperties = this.refutedProperties[patternIndex];\n capture.refutedProperties = refutedProperties;\n result.push(capture);\n }\n }\n C._free(startAddress);\n C.currentQueryProgressCallback = null;\n return result;\n }\n /** Get the predicates for a given pattern. */\n predicatesForPattern(patternIndex) {\n return this.predicates[patternIndex];\n }\n /**\n * Disable a certain capture within a query.\n *\n * This prevents the capture from being returned in matches, and also\n * avoids any resource usage associated with recording the capture.\n */\n disableCapture(captureName) {\n const captureNameLength = C.lengthBytesUTF8(captureName);\n const captureNameAddress = C._malloc(captureNameLength + 1);\n C.stringToUTF8(captureName, captureNameAddress, captureNameLength + 1);\n C._ts_query_disable_capture(this[0], captureNameAddress, captureNameLength);\n C._free(captureNameAddress);\n }\n /**\n * Disable a certain pattern within a query.\n *\n * This prevents the pattern from matching, and also avoids any resource\n * usage associated with the pattern. This throws an error if the pattern\n * index is out of bounds.\n */\n disablePattern(patternIndex) {\n if (patternIndex >= this.predicates.length) {\n throw new Error(\n `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}`\n );\n }\n C._ts_query_disable_pattern(this[0], patternIndex);\n }\n /**\n * Check if, on its last execution, this cursor exceeded its maximum number\n * of in-progress matches.\n */\n didExceedMatchLimit() {\n return this.exceededMatchLimit;\n }\n /** Get the byte offset where the given pattern starts in the query's source. */\n startIndexForPattern(patternIndex) {\n if (patternIndex >= this.predicates.length) {\n throw new Error(\n `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}`\n );\n }\n return C._ts_query_start_byte_for_pattern(this[0], patternIndex);\n }\n /** Get the byte offset where the given pattern ends in the query's source. */\n endIndexForPattern(patternIndex) {\n if (patternIndex >= this.predicates.length) {\n throw new Error(\n `Pattern index is ${patternIndex} but the pattern count is ${this.predicates.length}`\n );\n }\n return C._ts_query_end_byte_for_pattern(this[0], patternIndex);\n }\n /** Get the number of patterns in the query. */\n patternCount() {\n return C._ts_query_pattern_count(this[0]);\n }\n /** Get the index for a given capture name. */\n captureIndexForName(captureName) {\n return this.captureNames.indexOf(captureName);\n }\n /** Check if a given pattern within a query has a single root node. */\n isPatternRooted(patternIndex) {\n return C._ts_query_is_pattern_rooted(this[0], patternIndex) === 1;\n }\n /** Check if a given pattern within a query has a single root node. */\n isPatternNonLocal(patternIndex) {\n return C._ts_query_is_pattern_non_local(this[0], patternIndex) === 1;\n }\n /**\n * Check if a given step in a query is 'definite'.\n *\n * A query step is 'definite' if its parent pattern will be guaranteed to\n * match successfully once it reaches the step.\n */\n isPatternGuaranteedAtStep(byteIndex) {\n return C._ts_query_is_pattern_guaranteed_at_step(this[0], byteIndex) === 1;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n CaptureQuantifier,\n Edit,\n LANGUAGE_VERSION,\n Language,\n LookaheadIterator,\n MIN_COMPATIBLE_VERSION,\n Node,\n Parser,\n Query,\n Tree,\n TreeCursor\n});\nmodule.exports.default = module.exports;\n//# sourceMappingURL=web-tree-sitter.cjs.map\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","const getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nlet leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tconst ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tconst def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tif(!__webpack_require__.o(exports, key)) {\n\t\t\t\tif(binding === 0) {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, value: definition[i++] });\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: binding });\n\t\t\t\t}\n\t\t\t} else if(binding === 0) { i++; }\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nlet __webpack_exports__ = __webpack_require__(186);\n"],"names":["fs","__importStar","__webpack_require__","nesting_1","cyclomatic_1","cognitive_1","cliModes_1","VALUE_FLAGS","resolveThresholdOverride","override","defaults","undefined","mediumThreshold","highThreshold","async","parsed","argv","paths","flagValues","Map","i","length","arg","startsWith","name","slice","includes","set","push","flag","get","numberFlag","value","Number","baseRef","report","nesting","cyclomatic","cognitive","parseArgs","process","thresholds","DEFAULT_NESTING_THRESHOLDS","DEFAULT_CYCLOMATIC_THRESHOLDS","DEFAULT_COGNITIVE_THRESHOLDS","buildThresholds","reportFormat","runDiff","printUsage","exit","existsSync","statSync","isFile","runLegacySingleFile","runScan","main","catch","error","console","exports","filePath","languages_1","resolveLanguageForFile","sourceCode","readFileSync","violations","analyzeFile","log","JSON","stringify","hasBlockingViolation","some","v","severity","types_1","SEVERITY","HIGH","MEDIUM","files","scan_1","resolveSupportedFiles","results","path","relative","cwd","summary","report_1","summarize","counts","renderHumanReport","renderMarkdownReport","totalCounts","hasBlockingViolations","explicitPaths","rootDir","ignorePatterns","esaignore_1","loadIgnorePatterns","changedFiles","child_process_1","execFileSync","encoding","split","map","line","trim","filter","Boolean","changedFilesFromGit","isIgnored","resolve","headSummaries","baseSummaries","headSource","headViolations","summarizeFile","baseSource","readAtRef","baseViolations","entries","diffSummaries","renderDiffMarkdown","entry","status","Parser","Language","analyze_1","parserCache","adapter","parser","cached","init","grammarPath","join","__dirname","grammar","load","setLanguage","loadParser","tree","parse","analyzeSource","ref","stdio","sourceText","language","fileName","positions","position_1","createPositionLookup","analyzeNesting","analyzeFunctionComplexity","analyzeCognitiveComplexity","coherence_1","analyzeFileCoherence","coherence","DEFAULT_COHERENCE_THRESHOLDS","magicNumber_1","analyzeMagicNumbers","magicNumber","DEFAULT_MAGIC_NUMBER_OPTIONS","magicString_1","analyzeMagicStrings","magicString","DEFAULT_MAGIC_STRING_OPTIONS","parameterCount_1","analyzeParameterCount","inversion_1","analyzeInversionOpportunities","primitiveObsession_1","analyzePrimitiveObsession","matchOpportunity_1","analyzeMatchOpportunities","matchOpportunity","DEFAULT_MATCH_OPPORTUNITY_THRESHOLDS","logicalControlFlow_1","analyzeLogicalControlFlow","opaqueBoolean_1","analyzeOpaqueBooleanLiteral","suppressed","suppressionNotes","suppressions_1","applySuppressions","traverse","node","isFunctionDefinition","complexity","calculateCognitiveComplexity","position","toPosition","startIndex","column","type","VIOLATION_TYPE","COGNITIVE","message","hotspots","findCognitiveHotspots","child","children","rootNode","functionNode","onContribution","score","nodeTypes","add","amount","walkNested","walk","entersNestedScope","booleanOperator","getBooleanOperator","parent","cognitiveNestedDecisionTypes","elseClause","conditionalExpression","lambda","weight","functions","imports","isNamed","importStatement","importFromStatement","text","collectFunctionsAndImports","checkFunctionCountSprawl","checkLargeFunctionSprawl","checkImportSprawl","violation","leadingNameWord","nameNode","find","c","match","exec","toLowerCase","baseName","pop","isUtilsFile","singleDomain","minShare","leadingWords","word","wordCounts","Math","max","values","looksLikeSingleDomain","singleDomainNameShare","COHERENCE","largeFunctions","fn","lineCount","endPosition","row","startPosition","largeFunctionLines","maxLargeFunctions","countDecisionPoints","isRoot","decisionNodeTypes","isTryElseClause","calculateCyclomaticComplexity","COMPLEXITY","findCyclomaticHotspots","depth","nextDepth","body","block","flatMap","statements","comment","firstStatement","ifStatement","ifBody","totalLines","endIndex","INVERSION","currentNode","nestingLevel","validationChecks","nestingControlTypes","firstCheck","analyzeNestedValidation","maxNesting","nestedIfLocation","countNesting","currentDepth","analyzeNestedIfs","analyzeFunction","operator","expressionStatement","LOGICAL_CONTROL_FLOW","LOW","options","enabled","hasEnclosingFunction","assignmentNode","ancestor","integerLiteral","floatLiteral","rawValue","parseFloat","isNaN","signedValue","allowlist","assignment","isExplicitConstant","grandparent","module","exportStatement","isInConstantContext","subscriptNodeTypes","isIndexPosition","isDefaultParameterValue","MAGIC","candidates","stringLiteral","content","candidate","getEqualityComparisons","left","right","id","isEqualityComparisonOperand","container","getMembershipComparisons","isMembershipOperand","isKeyOrIndexPosition","isDecisionPoint","isDocstring","isFormattedOrInterpolatedString","isExempt","byContent","group","minDuplicates","first","consumed","Set","has","topIfNode","branches","ifNode","flatSiblings","getElseIfBranches","current","nestedIf","collectChainBranches","forEach","branch","minBranches","perBranchDiscriminants","branchNode","otherBranches","found","isVariableRef","variableReferenceNodeTypes","isLiteral","literalValue","variable","collectBranchDiscriminants","b","discriminants","commonVariable","d","every","MATCH_OPPORTUNITY","analyzeChain","NESTING","isBooleanLiteral","isPositionalCallArgument","OPAQUE_BOOLEAN","buildViolation","findParametersNode","params","parameters","paramCount","parameterChildTypes","PARAMETERS","parametersType","paramsNode","keywordOnly","typed","n","keywordOnlyBoundaryTypes","extracted","extractTypedParameter","a","primitiveTypeNames","PRIMITIVE_OBSESSION","distinctTypeAdvice","findParameterCollisions","valuesByVariable","firstOccurrence","record","varNode","key","stripQuotes","size","sample","Array","from","findStringlyTypedControlFlow","ignorePath","ESAIGNORE_FILENAME","replace","absolutePath","patterns","relPath","sep","basename","pattern","escaped","part","RegExp","basenameGlobToRegExp","test","matchesLiteralPattern","lineStartOffsets","offset","low","high","mid","ceil","severityCounts_1","emptyCounts","totalScore","file","medium","cleanCount","f","lines","result","byType","__exportStar","base","head","baseByPath","baseScore","delta","headScore","String","STATUS_ICON","statusCounts","reduce","EMPTY_STATUS_COUNTS","worsened","improved","new","unchanged","complexityToScore","classifyScore","classifyComplexityScore","flagged","r","sort","fileScore","SCORE_LEGEND","renderFileSection","fileScores","worst","repoLevel","toFixed","RISK_LABEL","RISK_DESCRIPTION","riskCounts","none","critical","totalFindings","COMPLEXITY_CURVE","MAX_COMPLEXITY_VALUE","MAX_COMPLEXITY_SCORE","prev","next","ratio","round","CATEGORY_LABEL","NAMING","SUPPRESSION","CATEGORY_BLURB","COMPLEXITY_VALUE_PATTERN","extractComplexityValue","describeCategoryFindings","label","level","describeComplexityFindings","severityText","blurb","complexityValues","risk","list","description","inputs","ignore","input","expandGlobLike","stat","isDirectory","isPathIgnored","walkDirectory","absolute","IGNORED_DIR_NAMES","targetPath","dir","readdirSync","withFileTypes","fullPath","starIndex","indexOf","prefixEnd","lastIndexOf","prefixDir","suffix","extension","endsWith","suppressions","lineText","DIRECTIVE_PATTERN","types","unknownTypes","raw","tokens","token","KNOWN_TYPES","parseTypeList","index","scope","standalone","parseSuppressions","suppressedCounts","s","remaining","coversLine","suppression","violationLine","scopeText","Object","FSHARP","forStatement","whileStatement","opToken","patternNode","typeNode","operands","rawRight","dotIndex","languageId","EXTENSION_TO_LANGUAGE_ID","Y","python_1","fsharp_1","typescript_1","kotlin_1","python","PYTHON","fsharp","typescript","TYPESCRIPT","kotlin","KOTLIN","typeIdentifier","siblings","findIndex","valueArgument","modifiers","modifier","allStrings","methodName","typeAnnotation","require","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","__create","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__name","target","configurable","__commonJS","cb","mod","__export","all","name2","enumerable","__copyProps","to","except","desc","call","__toESM","isNodeMode","__esModule","__toCommonJS","require_web_tree_sitter","Module","_scriptName","document","currentScript","src","moduleArg","moduleRtn","ENVIRONMENT_IS_WEB","window","ENVIRONMENT_IS_WORKER","WorkerGlobalScope","ENVIRONMENT_IS_NODE","versions","currentQueryProgressCallback","currentProgressCallback","currentLogCallback","currentParseCallback","arguments_","thisProgram","quit_","toThrow","__filename","scriptDirectory","readAsync","readBinary","locateFile","filename","isFileURI","URL","binary2","exitCode","href","url","xhr","XMLHttpRequest","open","responseType","send","Uint8Array","response","Promise","reject","onload","onerror","fetch","credentials","ok","arrayBuffer","Error","out","bind","err","dynamicLibraries","wasmBinary","ABORT","EXITSTATUS","readyPromiseResolve","readyPromiseReject","wasmMemory","HEAP8","HEAPU8","HEAP16","HEAPU16","HEAP32","HEAPU32","HEAPF32","HEAPF64","HEAP64","HEAPU64","HEAP_DATA_VIEW","runtimeInitialized","updateMemoryViews","buffer","Int8Array","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","LE_HEAP_UPDATE","initMemory","INITIAL_MEMORY","WebAssembly","Memory","initial","maximum","__RELOC_FUNCS__","wasmBinaryFile","preRun","addOnPreRun","shift","callRuntimeCallbacks","onPreRuns","initRuntime","wasmExports","onPostCtors","preMain","postRun","addOnPostRun","onPostRuns","abort","what","e","RuntimeError","findWasmBinary","getBinarySync","getWasmBinary","binaryFile","instantiateArrayBuffer","instantiate","reason","instantiateAsync","instantiateStreaming","getWasmImports","env","wasmImports","wasi_snapshot_preview1","Proxy","GOTHandler","createWasm","receiveInstance","instance2","module2","relocateExports","metadata2","getDylinkMetadata","neededDynlibs","concat","mergeLibSymbols","LDSO","loadDylibs","assignWasmExports","receiveInstantiationResult","result2","info2","inst","ExitStatus","this","constructor","GOT","currentModuleWeakSymbols","obj","symName","rtn","Global","mutable","required","LE_ATOMICS_NATIVE_BYTE_ORDER","LE_HEAP_LOAD_F32","byteOffset","getFloat32","LE_HEAP_LOAD_F64","getFloat64","LE_HEAP_LOAD_I16","getInt16","LE_HEAP_LOAD_I32","getInt32","LE_HEAP_LOAD_I64","getBigInt64","LE_HEAP_LOAD_U32","getUint32","LE_HEAP_STORE_F32","setFloat32","LE_HEAP_STORE_F64","setFloat64","LE_HEAP_STORE_I16","setInt16","LE_HEAP_STORE_I32","setInt32","LE_HEAP_STORE_I64","setBigInt64","LE_HEAP_STORE_U32","setUint32","callbacks","UTF8Decoder","TextDecoder","findStringEnd","heapOrArray","idx","maxBytesToRead","ignoreNul","maxIdx","UTF8ArrayToString","endPtr","decode","subarray","str","u0","u1","u2","fromCharCode","ch","end","getU8","getLEB","ret","mul","byte","getString","len","getStringList","count2","failIf","condition","dylinkSection","customSections","int32View","section_size","customSection","tlsExports","weakImports","runtimePaths","subsectionType","subsectionSize","memorySize","memoryAlign","tableSize","tableAlign","count","symname","getValue","ptr","newDSO","handle2","syms","dso","refcount","Infinity","global","loadedLibsByName","loadedLibsByHandle","___heap_base","alignMemory","alignment","getMemory","_calloc","isInternalSym","uleb128EncodeWithLen","arr","wasmTypeCodes","p","j","generateTypePack","convertJsFunctionToWasm","func2","sig","bytes","of","Instance","wasmTableMirror","wasmTable","Table","element","getWasmTableEntry","funcPtr","updateTableMap","functionsInTableMap","i2","item","getFunctionAddress","WeakMap","freeTableIndexes","getEmptyTableSlot","setWasmTableEntry","addFunction","err2","TypeError","wrapped","updateGOT","exports2","memoryBase2","relocated","isSymbolDefined","existing","stub","dynCall","args2","promising","rtn2","stackSave","_emscripten_stack_get_current","stackRestore","val","__emscripten_stack_restore","createInvokeFunction","sp","_setThrew","resolveGlobalSymbol","direct","sym","addOnPostCtor","UTF8ToString","loadWebAssemblyModule","binary","flags","libName","localScope","handle","metadata","loadModule","memAlign","pow","memoryBase","tableBase","moduleExports","resolveSymbol","resolved","grow","proxyHandler","stubs","prop","proxy","info","postInstantiation","instance","addEmAsm","addr","args","arity","func","ASM_CONSTS","start","eval","allowUndefined","reportUndefinedSymbols","stop","jsString","addEmJs","cSig","jsArgs","jsArg","parts","applyRelocs","loadAsync","rpath","parentLibPath","chain","dynNeeded","then","loadDynamicLibrary","needed","libName2","exp","setImport","main_alias","asyncLoad","flags2","nodelete","localScope2","assign","loadLibData","data","dataSize","libData","libFile","getExports","moduleLoaded","runDependencies","dependenciesFulfilled","removeRunDependency","callback","addRunDependency","lib","noExitRuntime","setValue","BigInt","___memory_base","___stack_high","___stack_low","___stack_pointer","___table_base","__abort_js","getHeapMax","growMemory","pages","byteLength","_emscripten_resize_heap","requestedSize","oldSize","maxHeapSize","cutDown","overGrownHeapSize","min","newSize","_fd_close","fd","INT53_MAX","INT53_MIN","bigintToI53Checked","num","NaN","_fd_seek","whence","newOffset","printCharBuffers","printChar","stream","curr","_fd_write","iov","iovcnt","pnum","_tree_sitter_log_callback","isLexMessage","messageAddress","_tree_sitter_parse_callback","inputBufferAddress","lengthAddress","string","stringToUTF16","_tree_sitter_progress_callback","currentOffset","hasError","_tree_sitter_query_progress_callback","runtimeKeepaliveCounter","keepRuntimeAlive","_proc_exit","code","exitJS","implicit","handleException","lengthBytesUTF8","charCodeAt","stringToUTF8Array","heap","outIdx","maxBytesToWrite","startIdx","endIdx","u","codePointAt","stringToUTF8","outPtr","stackAlloc","sz","__emscripten_stack_alloc","stringToUTF8OnStack","AsciiToString","startPtr","numCharsToWrite","codeUnit","unsigned","x","_malloc","_realloc","_free","_ts_range_edit","_memcmp","_ts_language_symbol_count","_ts_language_state_count","_ts_language_abi_version","_ts_language_name","_ts_language_field_count","_ts_language_next_state","_ts_language_symbol_name","_ts_language_symbol_for_name","_strncmp","_ts_language_symbol_type","_ts_language_field_name_for_id","_ts_lookahead_iterator_new","_ts_lookahead_iterator_delete","_ts_lookahead_iterator_reset_state","_ts_lookahead_iterator_reset","_ts_lookahead_iterator_next","_ts_lookahead_iterator_current_symbol","_ts_point_edit","_ts_parser_delete","_ts_parser_reset","_ts_parser_set_language","_ts_parser_set_included_ranges","_ts_query_new","_ts_query_delete","_iswspace","_iswalnum","_ts_query_pattern_count","_ts_query_capture_count","_ts_query_string_count","_ts_query_capture_name_for_id","_ts_query_capture_quantifier_for_id","_ts_query_string_value_for_id","_ts_query_predicates_for_pattern","_ts_query_start_byte_for_pattern","_ts_query_end_byte_for_pattern","_ts_query_is_pattern_rooted","_ts_query_is_pattern_non_local","_ts_query_is_pattern_guaranteed_at_step","_ts_query_disable_capture","_ts_query_disable_pattern","_ts_tree_copy","_ts_tree_delete","_ts_init","_ts_parser_new_wasm","_ts_parser_enable_logger_wasm","_ts_parser_parse_wasm","_ts_parser_included_ranges_wasm","_ts_language_type_is_named_wasm","_ts_language_type_is_visible_wasm","_ts_language_metadata_wasm","_ts_language_supertypes_wasm","_ts_language_subtypes_wasm","_ts_tree_root_node_wasm","_ts_tree_root_node_with_offset_wasm","_ts_tree_edit_wasm","_ts_tree_included_ranges_wasm","_ts_tree_get_changed_ranges_wasm","_ts_tree_cursor_new_wasm","_ts_tree_cursor_copy_wasm","_ts_tree_cursor_delete_wasm","_ts_tree_cursor_reset_wasm","_ts_tree_cursor_reset_to_wasm","_ts_tree_cursor_goto_first_child_wasm","_ts_tree_cursor_goto_last_child_wasm","_ts_tree_cursor_goto_first_child_for_index_wasm","_ts_tree_cursor_goto_first_child_for_position_wasm","_ts_tree_cursor_goto_next_sibling_wasm","_ts_tree_cursor_goto_previous_sibling_wasm","_ts_tree_cursor_goto_descendant_wasm","_ts_tree_cursor_goto_parent_wasm","_ts_tree_cursor_current_node_type_id_wasm","_ts_tree_cursor_current_node_state_id_wasm","_ts_tree_cursor_current_node_is_named_wasm","_ts_tree_cursor_current_node_is_missing_wasm","_ts_tree_cursor_current_node_id_wasm","_ts_tree_cursor_start_position_wasm","_ts_tree_cursor_end_position_wasm","_ts_tree_cursor_start_index_wasm","_ts_tree_cursor_end_index_wasm","_ts_tree_cursor_current_field_id_wasm","_ts_tree_cursor_current_depth_wasm","_ts_tree_cursor_current_descendant_index_wasm","_ts_tree_cursor_current_node_wasm","_ts_node_symbol_wasm","_ts_node_field_name_for_child_wasm","_ts_node_field_name_for_named_child_wasm","_ts_node_children_by_field_id_wasm","_ts_node_first_child_for_byte_wasm","_ts_node_first_named_child_for_byte_wasm","_ts_node_grammar_symbol_wasm","_ts_node_child_count_wasm","_ts_node_named_child_count_wasm","_ts_node_child_wasm","_ts_node_named_child_wasm","_ts_node_child_by_field_id_wasm","_ts_node_next_sibling_wasm","_ts_node_prev_sibling_wasm","_ts_node_next_named_sibling_wasm","_ts_node_prev_named_sibling_wasm","_ts_node_descendant_count_wasm","_ts_node_parent_wasm","_ts_node_child_with_descendant_wasm","_ts_node_descendant_for_index_wasm","_ts_node_named_descendant_for_index_wasm","_ts_node_descendant_for_position_wasm","_ts_node_named_descendant_for_position_wasm","_ts_node_start_point_wasm","_ts_node_end_point_wasm","_ts_node_start_index_wasm","_ts_node_end_index_wasm","_ts_node_to_string_wasm","_ts_node_children_wasm","_ts_node_named_children_wasm","_ts_node_descendants_of_type_wasm","_ts_node_is_named_wasm","_ts_node_has_changes_wasm","_ts_node_has_error_wasm","_ts_node_is_error_wasm","_ts_node_is_missing_wasm","_ts_node_is_extra_wasm","_ts_node_parse_state_wasm","_ts_node_next_parse_state_wasm","_ts_query_matches_wasm","_ts_query_captures_wasm","_memset","_memcpy","_memmove","_iswalpha","_iswblank","_iswdigit","_iswlower","_iswupper","_iswxdigit","_memchr","_strlen","_strcmp","_strncat","_strncpy","_towlower","_towupper","___wasm_apply_data_relocs","wasmExports2","__heap_base","__indirect_function_table","__memory_base","__stack_high","__stack_low","__stack_pointer","__table_base","_abort_js","emscripten_resize_heap","fd_close","fd_seek","fd_write","memory","tree_sitter_log_callback","tree_sitter_parse_callback","tree_sitter_progress_callback","tree_sitter_query_progress_callback","callMain","entryFunction","unshift","argc","argv_ptr","run","doRun","setTimeout","default","apply","index_exports","CaptureQuantifier","Edit","LANGUAGE_VERSION","LookaheadIterator","MIN_COMPATIBLE_VERSION","Node","Query","Tree","TreeCursor","oldEndPosition","newEndPosition","oldEndIndex","newEndIndex","editPoint","point","newIndex","newPoint","originalRow","editRange","range","newRange","MAX_SAFE_INTEGER","SIZE_OF_SHORT","SIZE_OF_INT","SIZE_OF_CURSOR","SIZE_OF_NODE","SIZE_OF_POINT","SIZE_OF_RANGE","ZERO_POINT","INTERNAL","Symbol","C","assertInternal","isPoint","setModule","internal","address","currentTypeId","currentType","reset","stateId","resetState","iterator","done","getText","textCallback","_Tree","copy","unmarshalNode","rootNodeWithOffset","offsetBytes","offsetExtent","TRANSFER_BUFFER","marshalPoint","edit","marshalEdit","getChangedRanges","other","unmarshalRange","getIncludedRanges","_TreeCursor","unmarshalTreeCursor","marshalTreeCursor","currentFieldId","currentFieldName","fields","currentDescendantIndex","nodeType","nodeTypeId","nodeStateId","nodeId","nodeIsNamed","nodeIsMissing","nodeText","unmarshalPoint","gotoFirstChild","gotoLastChild","gotoParent","gotoNextSibling","gotoPreviousSibling","gotoDescendant","goalDescendantIndex","gotoFirstChildForIndex","goalIndex","gotoFirstChildForPosition","goalPosition","marshalNode","resetTo","cursor","_children","_namedChildren","typeId","grammarId","grammarType","isExtra","isError","isMissing","hasChanges","parseState","nextParseState","equals","namedChild","childForFieldId","fieldId","childForFieldName","fieldName","fieldNameForChild","fieldNameForNamedChild","childrenForFieldName","childrenForFieldId","firstChildForIndex","firstNamedChildForIndex","childCount","namedChildCount","firstChild","firstNamedChild","lastChild","lastNamedChild","namedChildren","descendantsOfType","isArray","symbols","typesBySymbol","node_type","symbolsAddress","descendantCount","descendantAddress","nextSibling","previousSibling","nextNamedSibling","previousNamedSibling","childWithDescendant","descendant","descendantForIndex","start2","namedDescendantForIndex","descendantForPosition","namedDescendantForPosition","subbedPointRow","subbedPointColumn","toString","unmarshalCaptures","query","patternIndex","captureIndex","captureNames","marshalRange","unmarshalLanguageMetadata","major_version","minor_version","patch_version","LANGUAGE_FUNCTION_REGEX","_Language","abiVersion","fieldCount","stateCount","fieldIdForName","fieldNameForId","idForNodeType","named","typeLength","typeAddress","nodeTypeCount","nodeTypeForId","nodeTypeIsNamed","nodeTypeIsVisible","supertypes","subtypes","supertype","nextState","lookaheadIterator","globalThis","fs2","t","readFile","body2","retryResp","clone","compileStreaming","symbolNames","keys","functionName","languageAddress","import_web_tree_sitter","Module2","initializeBinding","moduleOptions","checkModule","logCallback","initialize","version","oldTree","progressCallback","rangeCount","rangeAddress","includedRanges","treeAddress","setLogger","getLogger","PREDICATE_STEP_TYPE_CAPTURE","PREDICATE_STEP_TYPE_STRING","QUERY_WORD_REGEX","Zero","ZeroOrOne","ZeroOrMore","One","OneOrMore","isCaptureStep","step","isStringStep","QueryErrorKind","Syntax","NodeName","FieldName","CaptureName","PatternStructure","QueryError","_QueryError","kind","super","formatMessage","parseAnyPredicate","steps","textPredicates","isPositive","matchAll","captureName1","captureName2","captures","nodes1","nodes2","compare","n1","n2","positive","captureName","stringValue","matches","doesNotMatch","nodes","parseMatchPredicate","regex","parseAnyOfPredicate","stringSteps","parseIsPredicate","assertedProperties","refutedProperties","properties","parseSetDirective","setProperties","parsePattern","stepType","stepValueId","stringValues","predicates","exceededMatchLimit","captureQuantifiers","matchLimit","source","sourceLength","sourceAddress","errorId","errorByte","errorIndex","stringCount","captureCount","patternCount","nameAddress","nameLength","captureQuantifiersArray","quantifier","valueAddress","predicatesAddress","stepCount","stepAddress","freeze","startContainingPosition","endContainingPosition","startContainingIndex","endContainingIndex","maxStartDepth","rawCount","startAddress","didExceedMatchLimit","filteredCount","capture","predicatesForPattern","disableCapture","captureNameLength","captureNameAddress","disablePattern","startIndexForPattern","endIndexForPattern","captureIndexForName","isPatternRooted","isPatternNonLocal","isPatternGuaranteedAtStep","byteIndex","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","getProto","leafPrototypes","mode","ns","def","definition","binding","o","toStringTag","__webpack_exports__"],"sourceRoot":""}