@noego/trust 0.5.0-dev.0 → 0.5.0-dev.1
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/README.md +44 -9
- package/dist/{baseline-B0AplCuF.d.ts → baseline-Bkav9mS0.d.ts} +22 -4
- package/dist/{chunk-V72KWVWP.js → chunk-7PY2Q6OX.js} +212 -16
- package/dist/chunk-7PY2Q6OX.js.map +1 -0
- package/dist/{chunk-NG4KYWVW.js → chunk-UG6D3V4M.js} +877 -41
- package/dist/chunk-UG6D3V4M.js.map +1 -0
- package/dist/{chunk-OSSITT3R.js → chunk-XXLWC5DB.js} +17 -61
- package/dist/chunk-XXLWC5DB.js.map +1 -0
- package/dist/cli/index.js +341 -92
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/wasm-worker.js +257 -0
- package/dist/cli/wasm-worker.js.map +1 -0
- package/dist/core/index.d.ts +5 -3
- package/dist/core/index.js +7 -7
- package/dist/eslint/index.d.ts +6 -2
- package/dist/eslint/index.js +2 -2
- package/dist/licenses/@jridgewell__resolve-uri/LICENSE +19 -0
- package/dist/licenses/@jridgewell__sourcemap-codec/LICENSE +19 -0
- package/dist/licenses/@jridgewell__trace-mapping/LICENSE +19 -0
- package/dist/licenses/JS-DEPENDENCIES.json +83 -0
- package/dist/licenses/balanced-match/LICENSE.md +23 -0
- package/dist/licenses/brace-expansion/LICENSE +23 -0
- package/dist/licenses/dedent-js/LICENSE +19 -0
- package/dist/licenses/minimatch/LICENSE.md +55 -0
- package/dist/licenses/scule/LICENSE +21 -0
- package/dist/licenses/svelte2tsx/LICENSE +21 -0
- package/dist/native/licenses/CARGO-DEPENDENCIES.json +479 -0
- package/dist/native/licenses/LICENSE-trust.txt +15 -0
- package/dist/native/licenses/cargo/adler2-2.0.1/LICENSE-0BSD +12 -0
- package/dist/native/licenses/cargo/adler2-2.0.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/adler2-2.0.1/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/aho-corasick-1.1.5/COPYING +3 -0
- package/dist/native/licenses/cargo/aho-corasick-1.1.5/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/autocfg-1.5.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/autocfg-1.5.1/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/bitflags-1.3.2/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/bitflags-1.3.2/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/bstr-1.13.1/COPYING +8 -0
- package/dist/native/licenses/cargo/bstr-1.13.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/bstr-1.13.1/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/bumpalo-3.20.3/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/bumpalo-3.20.3/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/cfg-if-1.0.5/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/cfg-if-1.0.5/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/crc32fast-1.5.2/LICENSE-APACHE +202 -0
- package/dist/native/licenses/cargo/crc32fast-1.5.2/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/defmt-1.1.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/defmt-1.1.1/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/defmt-macros-1.1.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/defmt-macros-1.1.1/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/equivalent-1.0.2/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/equivalent-1.0.2/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/flate2-1.1.10/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/flate2-1.1.10/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/globset-0.4.20/COPYING +3 -0
- package/dist/native/licenses/cargo/globset-0.4.20/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/hashbrown-0.17.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/hashbrown-0.17.1/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/indexmap-2.14.0/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/indexmap-2.14.0/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/itoa-1.0.18/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/itoa-1.0.18/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/jiff-0.2.37/COPYING +3 -0
- package/dist/native/licenses/cargo/jiff-0.2.37/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/jiff-core-0.1.1/COPYING +3 -0
- package/dist/native/licenses/cargo/jiff-core-0.1.1/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/jiff-tzdb-0.1.9/COPYING +3 -0
- package/dist/native/licenses/cargo/jiff-tzdb-0.1.9/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/jiff-tzdb-platform-0.1.3/COPYING +3 -0
- package/dist/native/licenses/cargo/jiff-tzdb-platform-0.1.3/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/log-0.4.34/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/log-0.4.34/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/lzma-rust2-0.21.0/LICENSE +201 -0
- package/dist/native/licenses/cargo/memchr-2.8.2/COPYING +3 -0
- package/dist/native/licenses/cargo/memchr-2.8.2/LICENSE-MIT +21 -0
- package/dist/native/licenses/cargo/miniz_oxide-0.9.1/LICENSE +25 -0
- package/dist/native/licenses/cargo/miniz_oxide-0.9.1/LICENSE-APACHE.md +177 -0
- package/dist/native/licenses/cargo/miniz_oxide-0.9.1/LICENSE-MIT.md +24 -0
- package/dist/native/licenses/cargo/miniz_oxide-0.9.1/LICENSE-ZLIB.md +14 -0
- package/dist/native/licenses/cargo/num-bigint-0.4.6/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/num-bigint-0.4.6/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/num-integer-0.1.47/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/num-integer-0.1.47/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/num-traits-0.2.19/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/num-traits-0.2.19/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/proc-macro2-1.0.107/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/proc-macro2-1.0.107/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/quote-1.0.47/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/quote-1.0.47/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/regex-automata-0.4.18/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/regex-automata-0.4.18/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/regex-syntax-0.8.11/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/regex-syntax-0.8.11/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/rustc-hash-2.1.2/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/rustc-hash-2.1.2/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/ryu-js-1.0.2/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/ryu-js-1.0.2/LICENSE-BOOST +23 -0
- package/dist/native/licenses/cargo/serde-1.0.229/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/serde-1.0.229/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/serde_core-1.0.229/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/serde_core-1.0.229/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/serde_derive-1.0.229/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/serde_derive-1.0.229/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/serde_json-1.0.152/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/serde_json-1.0.152/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/simd-adler32-0.3.10/LICENSE.md +21 -0
- package/dist/native/licenses/cargo/smallvec-1.15.1/LICENSE-APACHE +201 -0
- package/dist/native/licenses/cargo/smallvec-1.15.1/LICENSE-MIT +25 -0
- package/dist/native/licenses/cargo/syn-2.0.119/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/syn-2.0.119/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/syn-3.0.7/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/syn-3.0.7/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/thiserror-2.0.21/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/thiserror-2.0.21/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/thiserror-impl-2.0.21/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/thiserror-impl-2.0.21/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/unicode-ident-1.0.26/LICENSE-APACHE +176 -0
- package/dist/native/licenses/cargo/unicode-ident-1.0.26/LICENSE-MIT +23 -0
- package/dist/native/licenses/cargo/unicode-ident-1.0.26/LICENSE-UNICODE +39 -0
- package/dist/native/licenses/cargo/xxhash-rust-0.8.15/LICENSE +23 -0
- package/dist/native/licenses/cargo/zlib-rs-0.6.8/LICENSE +19 -0
- package/dist/native/licenses/cargo/zmij-1.0.23/LICENSE-MIT +23 -0
- package/dist/native/licenses/ts-rust/LICENSE +21 -0
- package/dist/native/licenses/ts-rust/NOTICE.md +53 -0
- package/dist/native/licenses/ts-rust/licenses/Go-LICENSE.txt +27 -0
- package/dist/native/licenses/ts-rust/licenses/TypeScript-LICENSE.txt +55 -0
- package/dist/native/licenses/ts-rust/licenses/TypeScript-NOTICE.txt +405 -0
- package/dist/native/licenses/ts-rust/licenses/Unicode-LICENSE.txt +39 -0
- package/dist/native/licenses/ts-rust/licenses/vscode-languageserver-node-LICENSE.txt +18 -0
- package/dist/native/licenses/typescript/LICENSE.txt +55 -0
- package/dist/native/licenses/typescript/ThirdPartyNoticeText.txt +193 -0
- package/dist/native/licenses/typescript/manifest.json +105 -0
- package/dist/native/trust_native_wasm.wasm +0 -0
- package/dist/svelte2tsx/index.cjs +7064 -0
- package/dist/svelte2tsx/svelte-jsx-v4.d.ts +230 -0
- package/dist/svelte2tsx/svelte-jsx.d.ts +1492 -0
- package/dist/svelte2tsx/svelte-shims-v4.d.ts +290 -0
- package/dist/svelte2tsx/svelte-shims.d.ts +305 -0
- package/package.json +25 -5
- package/dist/chunk-NG4KYWVW.js.map +0 -1
- package/dist/chunk-OSSITT3R.js.map +0 -1
- package/dist/chunk-V72KWVWP.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/messages.ts","../src/eslint/node-preset.generated.ts","../src/eslint/web-preset.generated.ts","../src/eslint/presets.ts","../src/eslint/zones.ts","../node_modules/balanced-match/src/index.ts","../node_modules/brace-expansion/src/index.ts","../node_modules/minimatch/src/assert-valid-pattern.ts","../node_modules/minimatch/src/brace-expressions.ts","../node_modules/minimatch/src/unescape.ts","../node_modules/minimatch/src/ast.ts","../node_modules/minimatch/src/escape.ts","../node_modules/minimatch/src/index.ts","../src/eslint/config.ts","../src/core/svelte.ts","../node_modules/@jridgewell/sourcemap-codec/src/vlq.ts","../node_modules/@jridgewell/sourcemap-codec/src/strings.ts","../node_modules/@jridgewell/sourcemap-codec/src/scopes.ts","../node_modules/@jridgewell/sourcemap-codec/src/range-mappings.ts","../node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts","../node_modules/@jridgewell/resolve-uri/src/resolve-uri.ts","../node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts","../node_modules/@jridgewell/trace-mapping/src/resolve.ts","../node_modules/@jridgewell/trace-mapping/src/strip-filename.ts","../node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts","../node_modules/@jridgewell/trace-mapping/src/sort.ts","../node_modules/@jridgewell/trace-mapping/src/by-source.ts","../node_modules/@jridgewell/trace-mapping/src/binary-search.ts","../node_modules/@jridgewell/trace-mapping/src/types.ts","../node_modules/@jridgewell/trace-mapping/src/flatten-map.ts","../src/core/program.ts","../src/eslint/origin.ts","../src/core/validator.ts","../src/eslint/typescript.ts","../src/core/baseline.ts"],"sourcesContent":["// Rule ids, message templates and the finding shape shared by the standalone core (`trust check`)\n// and the ESLint adapter. Templates use ESLint's `{{origin}}` placeholder syntax.\n\nexport const UNTRUSTED_CALL_RULE = 'untrusted-call-must-return-result';\nexport const THROW_RULE = 'throw-must-return-result';\n/** Origin label of every throw-rule finding (baseline key). */\nexport const THROW_ORIGIN = 'throw';\n\nexport type CatchProblem = 'rethrow' | 'notResultErr' | 'rawCatchValue' | 'notAllPaths';\n\nexport const CATCH_MESSAGES: Record<CatchProblem, string> = {\n rethrow: '`catch` guarding {{target}} must return Result.err(...), not re-throw.',\n notResultErr: '`catch` guarding {{target}} must return Result.err(...) on every return.',\n rawCatchValue: 'Result.err(...) guarding {{target}} must not pass the raw caught value; normalize it to a typed error.',\n notAllPaths: '`catch` guarding {{target}} must return Result.err(...) on every path.',\n};\n\nfunction forThrow(template: string): string {\n return template.replace('{{target}}', 'this `throw`');\n}\n\nfunction withOrigin(template: string): string {\n return template.replace('{{target}}', 'the call into \"{{origin}}\"');\n}\n\nexport const THROW_MESSAGES = {\n escapes: '`throw` must be inside a `try` (same function) whose `catch` returns Result.err(...), or inside Trust.try/tryAsync.',\n rethrow: forThrow(CATCH_MESSAGES.rethrow),\n notResultErr: forThrow(CATCH_MESSAGES.notResultErr),\n rawCatchValue: forThrow(CATCH_MESSAGES.rawCatchValue),\n notAllPaths: forThrow(CATCH_MESSAGES.notAllPaths),\n} as const satisfies Record<string, string> & Record<CatchProblem, string>;\n\nexport const UNTRUSTED_CALL_MESSAGES = {\n unguarded:\n 'Call into untrusted \"{{origin}}\" must be inside a `try` (same function) whose `catch` returns Result.err(...), or inside Trust.try/tryAsync. If \"{{origin}}\" cannot fail, trust it in trust.config.json.',\n notAwaited:\n 'Async call into untrusted \"{{origin}}\" must be awaited inside the guard, or its rejection escapes the catch.',\n callsIgnored:\n 'Call into \"{{origin}}\" is trusted only because its file is ignored. List that file under \"passthrough\" instead of \"ignore\" so calls into it must be handled.',\n rethrow: withOrigin(CATCH_MESSAGES.rethrow),\n notResultErr: withOrigin(CATCH_MESSAGES.notResultErr),\n rawCatchValue: withOrigin(CATCH_MESSAGES.rawCatchValue),\n notAllPaths: withOrigin(CATCH_MESSAGES.notAllPaths),\n} as const satisfies Record<string, string> & Record<CatchProblem, string>;\n\nexport const FLOATING_PROMISE_RULE = 'floating-promise';\nexport const MISUSED_PROMISE_RULE = 'misused-promise';\n/** Origin label of every floating-promise finding (baseline key). */\nexport const FLOATING_PROMISE_ORIGIN = 'unhandled';\n\nexport const FLOATING_PROMISE_MESSAGE =\n 'Promise is neither awaited nor handled; prefix with `void` to run it without waiting, or `await` it and decide the Result.';\n\n/** Keyed by origin (baseline key). */\nexport const MISUSED_PROMISE_MESSAGES = {\n condition: 'Promise used as a condition is always truthy; await it first.',\n 'void-callback':\n 'Async callback passed where a void-returning function is expected; its rejections are dropped — handle inside, or use a Promise-aware API.',\n} as const satisfies Record<string, string>;\n\nexport type MisusedPromiseOrigin = keyof typeof MISUSED_PROMISE_MESSAGES;\n\nexport const TYPE_CLAIM_RULE = 'type-claim';\n\n/**\n * Keyed by origin: the baseline key, and the ESLint messageId of `trust/type-claim`. The five `claim:*`\n * origins name the kind of claim; `unanalyzable` is a node the analyzer could not type (reported, never\n * passed); `directive` is a `//trust:` comment that marks nothing (a misspelled or misplaced\n * `//trust:validator_function`, see core/validator.ts; a misplaced `//trust:accept` is reported by the\n * throw rule, see ACCEPT_DIRECTIVE_MESSAGES).\n */\nexport const TYPE_CLAIM_MESSAGES = {\n 'claim:as':\n 'Type assertion claims \"{{from}}\" is \"{{to}}\", but \"{{from}}\" is not assignable to \"{{to}}\": nothing proves it. Narrow or validate the value instead.',\n 'claim:non-null':\n 'Non-null assertion `!` claims \"{{from}}\" is never null or undefined: nothing proves it. Check for the missing value instead.',\n 'claim:any': '{{detail}}: `any` turns type checking off. Use `unknown` and narrow or validate it.',\n 'claim:predicate': 'Type predicate \"{{predicate}}\" is a claim: the compiler does not check that the function body proves it.',\n 'claim:generic-return':\n 'Call picks its own return type: type parameter \"{{parameter}}\" of \"{{callee}}\" appears only in the return type, so \"{{chosen}}\" is claimed, not proven. Validate the returned value.',\n unanalyzable: 'Cannot analyze {{what}}: {{reason}}. What cannot be analyzed is reported, never passed.',\n directive:\n 'Trust directive \"{{text}}\" {{problem}}: it marks nothing. A validator is marked by `//trust:validator_function` on the line directly above its function declaration, method, or `const` arrow/function expression; an accepted failure path by `//trust:accept <reason>` on the line directly above its statement.',\n} as const satisfies Record<string, string>;\n\n/**\n * The `directive` finding of throw-must-return-result (core/accept.ts), keyed by ESLint messageId (origin\n * `directive`): a `//trust:accept` that accepts nothing.\n */\nexport const ACCEPT_DIRECTIVE_MESSAGES = {\n directive:\n 'Trust directive \"{{text}}\" {{problem}}: it accepts nothing. A failure path is accepted by `//trust:accept <reason>` on the line directly above the statement that throws, calls or holds the promise (not above its function), and only that statement\\'s findings are accepted.',\n} as const satisfies Record<string, string>;\n\nexport type AcceptDirectiveMessageId = keyof typeof ACCEPT_DIRECTIVE_MESSAGES;\n\nexport type TypeClaimOrigin = keyof typeof TYPE_CLAIM_MESSAGES;\n\n/** The origins that name a claim kind (every type-claim origin except `unanalyzable` and `directive`). */\nexport const TYPE_CLAIM_KINDS = ['claim:as', 'claim:non-null', 'claim:any', 'claim:predicate', 'claim:generic-return'] as const satisfies readonly TypeClaimOrigin[];\n\n/** Origin of a node the type-claim analyzer could not type. */\nexport const UNANALYZABLE_ORIGIN = 'unanalyzable' satisfies TypeClaimOrigin;\n\n/** Origin of a `//trust:` comment that marks nothing. */\nexport const DIRECTIVE_ORIGIN = 'directive' satisfies TypeClaimOrigin;\n\nexport const UNTRUSTED_VALUE_RULE = 'untrusted-value';\n\n/**\n * How an untrusted value entered the checked code (core/untrusted-values.ts):\n * return returned by a call / `new` into an origin that is not type-trusted\n * generic-return returned by a call that picked its own return type (a type parameter found only\n * in the return position), whatever the origin\n * parameter a parameter of a callback whose signature is declared by an origin that is not\n * type-trusted: the outside calls it, with whatever it has\n * read a property or a global declared by an origin that is not type-trusted\n * catch a `catch` variable: anything can be thrown\n * guard a value narrowed by a type guard or assertion function (`x is T`, `asserts x is T`,\n * `asserts x`) whose signature is declared by an origin that is not type-trusted: the\n * narrowed type is that origin's claim (AJV's `ValidateFunction<T>`)\n */\nexport type UntrustedEntry = 'return' | 'generic-return' | 'parameter' | 'read' | 'catch' | 'guard';\n\n/** Origin of a `catch` variable: no declaration says what is thrown. */\nexport const CATCH_ORIGIN = 'catch';\n\n/** How each entry is named in a message. */\nexport const UNTRUSTED_ENTRY_LABELS: Readonly<Record<UntrustedEntry, string>> = {\n return: 'returned by',\n 'generic-return': 'returned, with a type the caller picked, by',\n parameter: 'passed to a callback by',\n read: 'read from',\n catch: 'caught in a',\n guard: 'narrowed by the guard',\n};\n\n/**\n * The messages of `untrusted-value`, keyed by ESLint messageId. `{{origin}}` is the baseline key;\n * `{{entry}}` is the entry's label, `{{use}}` what the code does with the value and `{{type}}` the type\n * it is declared to have. `callerChosen` is the message of a `generic-return` value: no type-trust entry\n * proves a type the caller picked, so it does not suggest one. `handoff` is a function checked code hands\n * to an origin that is not type-trusted (`untrustedCallbacks: \"all\"`): `{{callback}}` names the function,\n * `{{parameter}}` the parameter that claims a type and `{{type}}` that type.\n */\nexport const UNTRUSTED_VALUE_MESSAGES = {\n untrusted:\n 'Untrusted value {{entry}} \"{{origin}}\" is {{use}}: its type \"{{type}}\" is declared, not proven. Pass it to a validator, or keep it as `unknown` and narrow it (typeof, in, Array.isArray). If \"{{origin}}\" declares true types, add it to \"trust_type\" in trust.config.json.',\n callerChosen:\n 'Untrusted value {{entry}} \"{{origin}}\" is {{use}}: its type \"{{type}}\" was picked by the call, not proven, and no type trust proves it. Pass it to a validator, or keep it as `unknown` and narrow it (typeof, in, Array.isArray).',\n handoff:\n '\"{{callback}}\" receives data from \"{{origin}}\" but declares its parameter \"{{parameter}}\" as \"{{type}}\", which nothing proves. Declare the parameter `unknown` and validate it, or, if \"{{origin}}\" declares true types, add it to \"trust_type\" in trust.config.json.',\n} as const satisfies Record<string, string>;\n\nexport type UntrustedValueMessageId = keyof typeof UNTRUSTED_VALUE_MESSAGES;\n\nexport const DROPPED_RESULT_RULE = 'dropped-result';\n\n/**\n * The messages of `dropped-result` (core/dropped-results.ts), keyed by origin: the baseline key, and the\n * ESLint messageId of `trust/dropped-result`. `{{subject}}` is the variable or expression whose failure is\n * dropped (for `callback`, the callee the function is handed to); `{{kinds}}` lists the failure kinds still\n * possible there.\n */\nexport const DROPPED_RESULT_MESSAGES = {\n discarded: '`{{subject}}` can fail with {{kinds}}, but its Result is not kept, so the failure is dropped. Return it, or handle it with Trust.decide.',\n argument:\n '`{{subject}}` can fail with {{kinds}}, but it is passed where no Result is expected, so the failure is dropped. Keep it in a variable, then return it or handle it with Trust.decide.',\n stored:\n '`{{subject}}` can fail with {{kinds}}, but it is stored where failures are not followed, so the failure is dropped. Return it or handle it with Trust.decide first, and store the value.',\n callback:\n 'The function passed to `{{subject}}` returns a Result that can fail with {{kinds}}, but `{{subject}}` takes no Result back, so the failure is dropped. Handle it with Trust.decide inside the function.',\n return:\n 'This return drops `{{subject}}`, which can still fail with {{kinds}}. Return the failure (`if (!{{subject}}.ok) return {{subject}};`), or handle it with Trust.decide.',\n end: '`{{subject}}` can still fail with {{kinds}} when it goes out of scope here, so the failure is dropped. Return it, or handle it with Trust.decide.',\n overwritten:\n '`{{subject}}` is assigned again while it can still fail with {{kinds}}, so the failure is dropped. Return it, or handle it with Trust.decide first.',\n} as const satisfies Record<string, string>;\n\nexport type DroppedResultOrigin = keyof typeof DROPPED_RESULT_MESSAGES;\n\nexport const REDUNDANT_GUARD_RULE = 'redundant-guard';\n/** Origin label of every redundant-guard finding (baseline key). */\nexport const REDUNDANT_GUARD_ORIGIN = 'redundant';\n\n/**\n * The message of `redundant-guard` (core/redundant-guards.ts). `{{guard}}` is `Trust.try`, `Trust.tryAsync` or\n * `try`; `{{calls}}` says what is called inside.\n */\nexport const REDUNDANT_GUARD_MESSAGES = {\n redundant:\n '`{{guard}}` guards nothing that can fail: {{calls}}. It invents a failure path callers must unwrap for nothing. Call it directly and return its value; a trusted origin\\'s failure is a programmer error, not a failure path. If the call can fail, remove its origin from \"trust\" in trust.config.json instead.',\n} as const satisfies Record<string, string>;\n\n/** `\"A\"`, `\"A\" or \"B\"`, `\"A\", \"B\" or \"C\"`; any kind that is not a literal makes it `a failure of any kind`. */\nexport function formatFailureKinds(kinds: readonly string[], anyKind: string): string {\n if (kinds.length === 0 || kinds.includes(anyKind)) return 'a failure of any kind';\n const quoted = kinds.map((kind) => `\"${kind}\"`);\n return quoted.length === 1 ? quoted[0] : `${quoted.slice(0, -1).join(', ')} or ${quoted[quoted.length - 1]}`;\n}\n\nexport type ThrowMessageId = keyof typeof THROW_MESSAGES;\nexport type UntrustedCallMessageId = keyof typeof UNTRUSTED_CALL_MESSAGES;\n\n/** One trust-rule violation. `line`/`column` are 1-based; `file` is relative to the trust root when inside it. */\nexport interface Finding {\n readonly file: string;\n readonly rule: string;\n readonly origin: string;\n readonly line: number;\n readonly column: number;\n readonly message: string;\n}\n\n/** Fills `{{origin}}` the way ESLint fills message data. */\nexport function formatMessage(template: string, origin: string): string {\n return template.replace(/\\{\\{\\s*origin\\s*\\}\\}/g, () => origin);\n}\n\n/** Fills every `{{name}}` from `data` the way ESLint fills message data (one pass; an unknown name is left as written). */\nexport function fillMessage(template: string, data: Readonly<Record<string, string>>): string {\n return template.replace(/\\{\\{([^{}]+)\\}\\}/g, (placeholder, name: string) => {\n const key = name.trim();\n return Object.prototype.hasOwnProperty.call(data, key) ? data[key] : placeholder;\n });\n}\n","// GENERATED by trust/research/node-api/tools/emit-preset.mjs. Do not edit by hand: change the audit and regenerate.\n//\n// Node built-in APIs audited member by member against the Node source (v24.21.0 decides, v26.10.0 recorded).\n// Trusted = a call whose arguments satisfy the TypeScript types cannot throw synchronously and cannot fail\n// asynchronously (rejected promise, error-first callback, call-caused 'error' event). I/O, native calls and\n// OS reads are fine on their own; only a reachable failure path disqualifies. Exceptions from callbacks or\n// listeners the caller passes count as failures. Implicit hooks (Proxy traps, getters, coercion) and\n// TypeScript-unsound inputs do not; engine resource limits (OOM, max string length) do not.\n//\n// 2411 callables audited: 641 trust, 1770 distrust. 541 trust entries (20 cover a whole\n// module or class), 6 distrust entries for distrusted members under a trusted entry.\n// Evidence for every entry: trust/research/node-api/out/verdicts.final.json.\n\nexport const NODE_TRUST: readonly string[] = [\n 'node:assert.assert.Assert', // Constructor merges options with defaults and stores them; diff is the literal union 'simple'|'full' so valida…\n 'node:assert.assert.CallTracker.report', // Deprecated (DEP0173); iterates the private SafeSet of contexts and builds plain report objects from private f…\n 'node:async_hooks.AsyncHook', // every member (2) audited trust; also trusts future members\n 'node:async_hooks.AsyncLocalStorage.bind', // Delegates to AsyncResource.bind(fn): type falls back to fn.name or 'bound-anonymous-fn', default trigger id i…\n 'node:async_hooks.AsyncLocalStorage.disable', // Deletes this store from the current AsyncContextFrame map (no-op when no frame); native getContinuationPreser…\n 'node:async_hooks.AsyncLocalStorage.enterWith', // Builds a new SafeMap frame copying the current frame and stores it via the native continuation-data setter; s…\n 'node:async_hooks.AsyncLocalStorage.getStore', // Reads the current frame via the native getter and returns frame.get(this) or the default value; SafeMap looku…\n 'node:async_hooks.AsyncLocalStorage.snapshot', // Binds an internal anonymous arrow through AsyncResource.bind and returns it; the user callback runs only when…\n 'node:async_hooks.AsyncLocalStorage.withScope', // v26-only (typed); constructs RunScope which calls getStore and enterWith, neither of which can fail; experime…\n 'node:async_hooks.AsyncResource.asyncId', // Returns a stored numeric field; no failure path (v24.21.0/lib/async_hooks.js:243; v26 :242).\n 'node:async_hooks.AsyncResource.bind', // Static bind: type ||= fn.name || 'bound-anonymous-fn' so validateString/ERR_ASYNC_TYPE are unreachable for ty…\n 'node:async_hooks.AsyncResource.emitDestroy', // Marks destroyed and, only if destroy hooks exist, queues the id natively for a later destroy callback; hook e…\n 'node:async_hooks.AsyncResource.triggerAsyncId', // Returns a stored numeric field; no failure path (v24.21.0/lib/async_hooks.js:247; v26 :246).\n 'node:async_hooks.RunScope.dispose', // v26-only; idempotent: returns if already disposed, else restores the previous store via enterWith, which cann…\n 'node:async_hooks.executionAsyncId', // Returns a field of the shared async_id_fields typed array; no failure path (v24.21.0/lib/internal/async_hooks…\n 'node:async_hooks.executionAsyncResource', // Returns the top-level resource or the stack entry; native ExecutionAsyncResource only converts an internal in…\n 'node:async_hooks.triggerAsyncId', // Returns a field of the shared async_id_fields typed array; no failure path (v24.21.0/lib/internal/async_hooks…\n 'node:buffer.Blob.slice', // WebIDL long long conversion clamps typed numbers (NaN->0), negatives/overflow are clamped to [0,size], conten…\n 'node:buffer.Blob.stream', // Gets a native reader and wraps it in a highWaterMark-0 ReadableStream, so nothing is read at call time; NotRe…\n 'node:buffer.Blob.textStream', // Creates the blob reader stream and pipes it through a non-fatal TextDecoderStream; invalid UTF-8 becomes U+FF…\n 'node:buffer.isAscii', // Typed ArrayBuffer/TypedArray always passes the JS guard (the INVALID_ARG_TYPE throw is type_only); native Val…\n 'node:buffer.isUtf8', // Typed ArrayBuffer/TypedArray always passes the JS guard (INVALID_ARG_TYPE is type_only); native ValidateUtf8 …\n 'node:buffer.resolveObjectURL', // The entire URL parse, nodedata lookup and blob creation run inside try/catch that swallows every error and re…\n 'node:buffer.valueOf', // Type-only member of the WithImplicitCoercion<T> object literal ({ valueOf(): T }) supplied by callers, not a …\n 'node:child_process.ChildProcess.ref', // No-op without a handle; native HandleWrap::Ref only uv_refs a live handle and returns silently otherwise (v24…\n 'node:child_process.ChildProcess.unref', // No-op without a handle; native HandleWrap::Unref only uv_unrefs a live handle (v24.21.0/lib/internal/child_pr…\n 'node:child_process.Control', // every member (2) audited trust; also trusts future members\n 'node:cluster.Worker.isConnected', // Returns this.process.connected, a plain boolean field on the ChildProcess; no failure path (v24.21.0/lib/inte…\n 'node:cluster.Worker.isDead', // Compares process.exitCode and signalCode against null; no failure path (v24.21.0/lib/internal/cluster/worker.…\n 'node:console.console.Console.countReset', // v24 implementation is present despite the bundle's absence flag: missing labels only warn, and Trace receives…\n 'node:console.console.Console.groupEnd', // Only slices the genuine receiver's indentation string; no callback or failure delivery (v26.10.0/lib/internal…\n 'node:console.console.Console.time', // Typed string labels produce nonempty trace names and safe timer-map updates; duplicate labels only warn; insp…\n 'node:console.console.Console.timeStamp', // Both runtimes use V8 ConsoleTimeStamp: typed string labels are returned directly and omitted/undefined labels…\n 'node:crypto.DiffieHellman.getGenerator', // Returns g, which every constructed DH has (constructor rejects missing params); 'g is null' throw (v24 crypto…\n 'node:crypto.Hmac.digest', // A repeated digest returns an empty buffer instead of throwing; native HMAC finalize failure (v24 crypto_hmac.…\n 'node:crypto.KeyObject.from', // v24: genuine CryptoKey always maps to a KeyObject (DEP0204 warning only; structural fake CryptoKey caveat at …\n 'node:crypto.X509Certificate.checkIssued', // With a genuine X509Certificate, native isIssuedBy returns a boolean (v24 crypto_x509.cc:452, v26 :431); only …\n 'node:crypto.X509Certificate.toJSON', // Returns the cached native PEM (v24 crypto_x509.cc:282, v26 :269); only allocation/string limits can fail, whi…\n 'node:crypto.X509Certificate.toLegacyObject', // Native X509ToObject has no throw besides allocation (excluded); empty result maps to null, and translatePeerC…\n 'node:crypto.X509Certificate.toString', // Returns the cached native PEM (v24 crypto_x509.cc:282, v26 :269); only allocation/string limits can fail, whi…\n 'node:crypto.createSecretKey', // bufferOnly path: typed ArrayBufferView passes, string+BufferEncoding goes through Buffer.from (no throw), nat…\n 'node:crypto.getCiphers', // Native enumeration converts available names into an array without exposing provider errors; v26 refreshes by …\n 'node:crypto.getCurves', // Native curve enumeration only collects names into an array; engine allocation/string limits excluded in both …\n 'node:crypto.getFips', // Reads forced-FIPS flag or native enabled boolean without exposing failure; engine allocation limits excluded …\n 'node:crypto.getHashes', // Native hash enumeration filters unavailable digests rather than throwing; v26 refreshes by FIPS generation; e…\n 'node:crypto.randomUUID', // Draws from the OpenSSL CSPRNG; the only failure is an OpenSSL install whose random provider cannot be instant…\n 'node:crypto.randomUUIDv7', // Same CSPRNG as randomUUID; the only failure is an OpenSSL random provider that cannot be instantiated (v24.21…\n 'node:crypto.secureHeapUsed', // Native secure-heap read returns a number and JS constructs statistics; no failure delivery in either version;…\n 'node:crypto.webcrypto.Crypto.randomUUID', // v24: cannot fail. v26: after crypto.setFips(true), webcrypto.randomUUID throws ERR_OSSL_EVP_UNSUPPORTED (v26.…\n 'node:dgram.Socket.ref', // No-op when closed; native HandleWrap ref only toggles loop reference (v24.21.0/src/handle_wrap.cc); identical…\n 'node:dgram.Socket.unref', // No-op when closed; native HandleWrap unref only toggles loop reference (v24.21.0/src/handle_wrap.cc:49); iden…\n 'node:diagnostics_channel.BoundedChannel.subscribe', // v26-only experimental: subscribes typed handler functions to start/end channels; no throws for typed input.\n 'node:diagnostics_channel.BoundedChannel.unsubscribe', // v26-only experimental: removes handlers and returns boolean; no throws for typed input.\n 'node:diagnostics_channel.BoundedChannel.withScope', // v26-only experimental: enters bound stores via AsyncLocalStorage.withScope and publishes start; subscriber an…\n 'node:diagnostics_channel.Channel.bindStore', // Records the store/transform in a map; the transform runs only later in runStores where its exceptions are cau…\n 'node:diagnostics_channel.Channel.publish', // Subscriber exceptions are caught and re-raised via process.nextTick as uncaught exceptions, never thrown or d…\n 'node:diagnostics_channel.Channel.subscribe', // validateFunction always passes for a typed listener; only array/map bookkeeping; identical in v26.\n 'node:diagnostics_channel.Channel.unbindStore', // Map lookup/delete returning boolean; no throws; identical in v26.\n 'node:diagnostics_channel.Channel.unsubscribe', // Array lookup/splice returning boolean; no throws; identical in v26.\n 'node:diagnostics_channel.Channel.withStoreScope', // v26-only experimental: inactive channel returns a no-op disposable; active channel enters stores with withSco…\n 'node:diagnostics_channel.TracingChannel.subscribe', // Subscribes typed handler functions to the per-event channels; no throws for typed input; v26 routes through B…\n 'node:diagnostics_channel.TracingChannel.unsubscribe', // Removes handlers and returns boolean; no throws for typed input; identical behavior in v26.\n 'node:diagnostics_channel.boundedChannel', // v26-only experimental: string names always create channels; a typed collection of genuine Channel objects pas…\n 'node:diagnostics_channel.channel', // Typed string|symbol always passes the type check; returns cached or new Channel; identical in v26 (lib/diagno…\n 'node:diagnostics_channel.hasSubscribers', // Map lookup returning boolean; no throws; identical in v26.\n 'node:diagnostics_channel.subscribe', // channel(name).subscribe with a typed function; no throws; identical in v26.\n 'node:diagnostics_channel.tracingChannel', // String names always create channels; a typed collection of genuine Channel objects passes assertChannel; same…\n 'node:diagnostics_channel.unsubscribe', // channel(name).unsubscribe returns boolean; no throws; identical in v26.\n 'node:dns.Resolver.cancel', // Native ares_cancel returns void; cancelled queries get ECANCELLED on their own callbacks/promises via SetImme…\n 'node:dns.getDefaultResultOrder', // Returns the stored order string; no throws; v26 initializes it to 'verbatim' (lib/internal/dns/utils.js:219).\n 'node:dns.getServers', // Bound ResolverBase.getServers on the default resolver; native read guarded only by internal CHECKs; identical…\n 'node:dns.setDefaultResultOrder', // validateOneOf accepts every member of the typed literal union; assignment only; identical in v26.\n 'node:dns/promises.Resolver.cancel', // Native ares_cancel returns void; cancelled queries get ECANCELLED on their own callbacks/promises via SetImme…\n 'node:dns/promises.getDefaultResultOrder', // Returns the stored order string; no throws; v26 initializes it to 'verbatim' (lib/internal/dns/utils.js:219).\n 'node:dns/promises.getServers', // Bound ResolverBase.getServers on the default resolver; native read guarded only by internal CHECKs; identical…\n 'node:dns/promises.setDefaultResultOrder', // validateOneOf accepts every member of the typed literal union; assignment only; identical in v26.\n 'node:domain.Domain.bind', // Deprecated; only creates a wrapper and defines its domain property; supplied callback is not invoked by bind …\n 'node:domain.Domain.enter', // Deprecated; updates stack and captured original exception callback after clearing it; analyzer confuses the s…\n 'node:domain.Domain.exit', // Deprecated; missing stack entry is a no-op; otherwise pops stack and safely clears/reinstalls captured origin…\n 'node:domain.Domain.intercept', // Deprecated; returns a wrapper without executing callback or forwarding an error during intercept in either ve…\n 'node:domain.create', // Deprecated; allocates genuine Domain and WeakRef and installs only internal hooks/listeners; native hook regi…\n 'node:events.EventEmitter.EventEmitterAsyncResource.emitDestroy', // Marks resource destroyed and queues native destroy notification; repeated calls do not throw and delayed dest…\n 'node:events.EventEmitter.InternalEventEmitter.listenerCount', // v26-only type interface inherits EventEmitter prototype listenerCount; reads/copies registrations without inv…\n 'node:events.EventEmitter.InternalEventEmitter.listeners', // v26-only type interface inherits EventEmitter prototype listeners; reads/copies registrations without invokin…\n 'node:events.EventEmitter.InternalEventEmitter.rawListeners', // v26-only type interface inherits EventEmitter prototype rawListeners; reads/copies registrations without invo…\n 'node:events.EventEmitter.NodeEventTarget.emit', // Genuine NodeEventTarget dispatch catches listener exceptions/rejections and schedules an uncaught nextTick th…\n 'node:events.EventEmitter.NodeEventTarget.eventNames', // Genuine NodeEventTarget only reads its listener map or numeric listener limit; no callback invocation or coun…\n 'node:events.EventEmitter.NodeEventTarget.getMaxListeners', // Genuine NodeEventTarget only reads its listener map or numeric listener limit; no callback invocation or coun…\n 'node:events.EventEmitter.NodeEventTarget.listenerCount', // Genuine NodeEventTarget only reads its listener map or numeric listener limit; no callback invocation or coun…\n 'node:events.EventEmitter.NodeEventTarget.off', // Genuine NodeEventTarget removes matching listener without invoking it or EventEmitter removeListener meta-lis…\n 'node:events.EventEmitter.NodeEventTarget.removeAllListeners', // Genuine NodeEventTarget clears/deletes listener map without invoking callbacks or emitting removal meta-event…\n 'node:events.EventEmitter.NodeEventTarget.removeListener', // Genuine NodeEventTarget removes matching listener without invoking it or EventEmitter removeListener meta-lis…\n 'node:events.EventEmitter.getEventListeners', // Returns copied listeners for genuine EventEmitter/EventTarget without invoking registered listeners; invalid-…\n 'node:events.EventEmitter.getMaxListeners', // Reads stored or default numeric limit on genuine EventEmitter/EventTarget; no counting failure in either vers…\n 'node:events.EventEmitter.listenerCount', // Static helper counts genuine emitter/target registrations without invoking listeners in both versions; bundle…\n 'node:ffi.DynamicLibrary.close', // v26-only experimental: native Close only marks functions closed and uv_dlclose()s once (idempotent, void), th…\n 'node:fs.Dirent', // every member (7) audited trust; also trusts future members\n 'node:fs.FSWatcher.ref', // Native watcher refs the HandleWrap only if open (v24 lib/internal/fs/watchers.js:357, src/handle_wrap.cc ref …\n 'node:fs.FSWatcher.unref', // Native watcher unrefs the HandleWrap only if open (v24 lib/internal/fs/watchers.js:362, src/handle_wrap.cc:49…\n 'node:fs.ReadStream.listenerCount', // v26-only typing: counts registered listeners (optionally matching one) without invoking them; no counting fai…\n 'node:fs.ReadStream.listeners', // v26-only typing: returns an unwrapped copy of the listener array without invoking listeners; no counting fail…\n 'node:fs.ReadStream.rawListeners', // v26-only typing: returns a copy of the raw listener array without invoking listeners; no counting failure pat…\n 'node:fs.StatWatcher', // every member (2) audited trust; also trusts future members\n 'node:fs.StatsBase.isBlockDevice', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFBLK (false on Windows); no throw path (v24 lib/…\n 'node:fs.StatsBase.isCharacterDevice', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFCHR; no throw path (v24 lib/internal/fs/utils.j…\n 'node:fs.StatsBase.isDirectory', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFDIR; no throw path (v24 lib/internal/fs/utils.j…\n 'node:fs.StatsBase.isFIFO', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFIFO (false on Windows); no throw path (v24 lib/…\n 'node:fs.StatsBase.isFile', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFREG; no throw path (v24 lib/internal/fs/utils.j…\n 'node:fs.StatsBase.isSocket', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFSOCK (false on Windows); no throw path (v24 lib…\n 'node:fs.StatsBase.isSymbolicLink', // Masks the numeric/bigint mode with S_IFMT and compares to S_IFLNK; no throw path (v24 lib/internal/fs/utils.j…\n 'node:fs.WriteStream.listenerCount', // v26-only typing: counts registered listeners (optionally matching one) without invoking them; no counting fai…\n 'node:fs.WriteStream.listeners', // v26-only typing: returns an unwrapped copy of the listener array without invoking listeners; no counting fail…\n 'node:fs.WriteStream.rawListeners', // v26-only typing: returns a copy of the raw listener array without invoking listeners; no counting failure pat…\n 'node:fs.data', // Trust as a type-only inventory artifact, not as a callable API: ReadStreamEvents.data describes the caller's …\n 'node:fs.drain', // Trust as a type-only inventory artifact, not a callable API: v24 fs.d.ts:714 declares a WriteStreamEvents lis…\n 'node:fs.existsSync', // Trust by explicit user policy: path validation errors return false (lib/fs.js:281-290) and native access/stat…\n 'node:fs.finish', // Trust only as a non-callable inventory artifact: fs.d.ts:716 describes a WriteStream finish listener, not fs.…\n 'node:fs.pipe', // Trust only this non-callable inventory artifact: fs.d.ts:718 is WriteStreamEvents.pipe, a listener type, and …\n 'node:fs.readable', // Forced binary trust for a type-only inventory artifact, not endorsement of a callable: readable is ReadStream…\n 'node:fs.ready', // Non-callable inventory artifact, not an endorsement of fs.ready(): v24 fs.d.ts:699,719 describe ready-event l…\n 'node:fs.resume', // Forced binary classification of a type-only inventory artifact: v24 fs.d.ts:700 describes a ReadStream 'resum…\n 'node:fs.unpipe', // Forced binary trust for a non-callable inventory artifact, not a runtime safety endorsement: fs.d.ts:720 is t…\n 'node:global.AbortController', // every member (2) audited trust; also trusts future members\n 'node:global.AbortSignal.abort', // Constructs an already-aborted AbortSignal with the given or default DOMException reason; no validation or lis…\n 'node:global.AbortSignal.addEventListener', // v26-only on AbortSignal: validates typed listener/options, registers a Listener; AbortSignal kNewListener onl…\n 'node:global.AbortSignal.any', // Converts a typed AbortSignal[] and builds a composite signal; genuine AbortSignal elements always pass the in…\n 'node:global.AbortSignal.removeEventListener', // v26-only on AbortSignal: unlinks a matching listener; AbortSignal kRemoveListener only updates gc-persistence…\n 'node:global.Buffer.equals', // Genuine Uint8Arrays are length-checked then compared natively without failure delivery in both versions (v24.…\n 'node:global.Buffer.includes', // Typed needles and BufferEncoding values reach bounded native searches; numeric offsets clamp and no failure i…\n 'node:global.Buffer.indexOf', // Typed needles and BufferEncoding values reach bounded native searches; numeric offsets clamp and no failure i…\n 'node:global.Buffer.isBuffer', // instanceof returns a boolean; implicit Proxy prototype traps are excluded and recorded in both versions.\n 'node:global.Buffer.isEncoding', // Primitive string normalization returns a boolean without failure in both versions (v24.21.0/lib/internal/util…\n 'node:global.Buffer.lastIndexOf', // Typed needles and BufferEncoding values reach bounded native searches; numeric offsets clamp and no failure i…\n 'node:global.Buffer.of', // Allocates a FastBuffer of items.length and assigns typed numbers to Uint8Array slots, which never throws; ide…\n 'node:global.Buffer.toJSON', // Copies bytes into a plain array; length getter returns 0 for detached buffers so no throw; identical in v26 (…\n 'node:global.Buffer.toString', // start/end are clamped in JS, every BufferEncoding literal is recognised by getEncodingOps, and native StringS…\n 'node:global.ByteLengthQueuingStrategy', // init.highWaterMark is a required typed number, so validateObject and ERR_MISSING_OPTION are type_only; the va…\n 'node:global.CallSite.getColumnNumber', // Both versions validate the genuine CallSite's private data then synchronously return a column number or null …\n 'node:global.CallSite.getEnclosingColumnNumber', // Both versions validate genuine CallSite receivers and return an enclosing column/Wasm offset or null without …\n 'node:global.CallSite.getEnclosingLineNumber', // Both versions only read internal frame/script source positions and return a positive line number or null (v24…\n 'node:global.CallSite.getEvalOrigin', // Both versions validate only CallSite receiver branding, then return undefined for non-eval frames or format i…\n 'node:global.CallSite.getFileName', // Both versions validate the genuine CallSite then read its script name or return null without invoking user co…\n 'node:global.CallSite.getFunctionName', // Both versions safely return a name or null for genuine CallSites (v24.21.0/deps/v8/src/objects/call-site-info…\n 'node:global.CallSite.getLineNumber', // Both versions return a line number or null for genuine CallSites (deps/v8/src/builtins/builtins-callsite.cc:1…\n 'node:global.CallSite.getMethodName', // Both versions validate the genuine CallSite then return a method name or null via internal metadata inspectio…\n 'node:global.CallSite.getPosition', // Genuine CallSites return an integer in both versions (v24.21.0/deps/v8/src/builtins/builtins-callsite.cc:120;…\n 'node:global.CallSite.getPromiseIndex', // Both versions return null for non-combinator frames or the stored promise index for genuine combinator frames…\n 'node:global.CallSite.getScriptHash', // For genuine CallSites both versions return an empty/cached string or synchronously hash valid source into a f…\n 'node:global.CallSite.getScriptNameOrSourceURL', // Both versions validate genuine CallSite receivers, then only read the stored script source_url/name or return…\n 'node:global.CallSite.getTypeName', // Genuine CallSites return null or a type-name string without a counting failure: v24.21.0/deps/v8/src/objects/…\n 'node:global.CallSite.isAsync', // Both versions validate the genuine CallSite's private frame then return its async flag as a boolean (v24.21.0…\n 'node:global.CallSite.isConstructor', // In both versions genuine CallSites have the own internal CallSiteInfo data property (v24.21.0/deps/v8/src/exe…\n 'node:global.CallSite.isEval', // Both versions only read the genuine CallSite's internal script compilation flag and return a boolean (v24.21.…\n 'node:global.CallSite.isNative', // Both versions validate genuine CallSite receivers and return a boolean from internal script metadata only (v2…\n 'node:global.CallSite.isPromiseAll', // Both versions only validate the genuine CallSite's internal data and return a boolean from an async flag and …\n 'node:global.CallSite.isToplevel', // Genuine CallSites carry the private frame property; receiver checks only reject invalid receivers, and isTopl…\n 'node:global.CountQueuingStrategy', // init.highWaterMark is a required typed number, so validateObject and ERR_MISSING_OPTION are type_only; no ran…\n 'node:global.CustomEvent', // Required typed type makes ERR_MISSING_ARGS type_only; stores detail and delegates to Event, which only reads …\n 'node:global.DOMException', // Creates an Error, stringifies typed message/name and optionally copies cause; no validation or native failure…\n 'node:global.Error.prepareStackTrace', // Default implementation formats error name/message and joins CallSites (source-map variant wraps lookups in tr…\n 'node:global.Event', // every member (6) audited trust; also trusts future members\n 'node:global.EventEmitter.eventNames', // Enumerates the genuine internal event table without invoking listeners or native code in both versions (v24.2…\n 'node:global.EventEmitter.getMaxListeners', // Reads the configured numeric limit or default without invoking callbacks in both versions (v24.21.0/lib/event…\n 'node:global.EventEmitter.listenerCount', // Counts registrations and compares listener identities without invoking listener functions in both versions; i…\n 'node:global.EventEmitter.listeners', // Copies and unwraps registered listener references without invoking them in both versions; implicit listener-p…\n 'node:global.EventEmitter.rawListeners', // Returns a copied array of registered function references without invoking callbacks in both versions (v24.21.…\n 'node:global.EventTarget', // Constructor only initialises internal fields via initEventTarget (identical v26 event_target.js:593).\n 'node:global.EventTarget.addEventListener', // Registers typed listeners without calling them; only type-only validations and warnings in both versions.\n 'node:global.EventTarget.removeEventListener', // Removes a registered listener without invoking it; v26 fixes boolean capture flattening without introducing f…\n 'node:global.HRTime.bigint', // Reads uv_hrtime into the binding buffer and returns its bigint; no error channel in either inspected native i…\n 'node:global.Immediate.hasRef', // Returns the internal reference-state boolean without callbacks in both versions (lib/internal/timers.js:786).\n 'node:global.Immediate.ref', // Only toggles reference state and the native idle handle; both versions' native toggle exposes no failure (src…\n 'node:global.Immediate.unref', // Only toggles reference state and the native idle handle; both versions' native toggle exposes no failure (src…\n 'node:global.MessageChannel', // Native constructor creates and entangles two MessagePorts; uv_async_init is a CHECK and internal construction…\n 'node:global.ProcessPermission', // every member (2) audited trust; also trusts future members\n 'node:global.ProcessReport.getReport', // Native report generation skips failed OS reads and catches Error inspection exceptions, then parses escaped J…\n 'node:global.ReadableStream.isPaused', // Reads genuine Node readable state and returns a boolean without events or callbacks in both versions.\n 'node:global.RefCounted', // every member (2) audited trust; also trusts future members\n 'node:global.RequireResolve.paths', // Computes search-path arrays or null without resolving files or reading cwd in both versions; typed string val…\n 'node:global.TextEncoder', // No-arg constructor only sets an internal marker (v26 uses a private #encoding field, lib/internal/encoding.js…\n 'node:global.TextEncoderStream', // Creates a TextEncoder and a TransformStream with Node's own transformer and default strategies, so no validat…\n 'node:global.Timeout.close', // Legacy cancellation delegates to clearTimeout, never invokes the timer callback, and exposes no native failur…\n 'node:global.Timeout.hasRef', // Returns genuine timer reference state without callbacks or native error delivery in both versions (lib/intern…\n 'node:global.Timeout.ref', // Only updates timer reference state; inspected native uv_ref toggle has no failure delivery in either version.\n 'node:global.Timeout.refresh', // Reschedules a genuine timer without calling its callback; native scheduling/ref changes deliver no failure an…\n 'node:global.Timeout.unref', // Only updates timer reference state; inspected native uv_unref toggle has no failure delivery in either versio…\n 'node:global.Timer', // every member (2) audited trust; also trusts future members\n 'node:global.clearImmediate', // Cancels a genuine Immediate or returns early; native toggleImmediateRef has no error delivery; async_hooks de…\n 'node:global.clearInterval', // Delegates to clearTimeout, which cancels or ignores a typed Timeout/string/number id without invoking callbac…\n 'node:global.clearTimeout', // Cancels a Timeout or looks up a typed id in knownTimersById and ignores unknown ids; no callback invocation (…\n 'node:global.console.time', // Both versions only store timestamps and emit duplicate-label warnings: Node time bookkeeping (v24.21.0/lib/in…\n 'node:global.console.timeStamp', // Both versions pass typed string/undefined labels without coercion (deps/v8/src/inspector/v8-console.cc:164,45…\n 'node:global.process.addUncaughtExceptionCaptureCallback', // v26-only registration validates a function and stores it without invocation; report flags only read/write nat…\n 'node:global.process.availableMemory', // Native code returns libuv's unsigned memory estimate directly without exception/error delivery in both versio…\n 'node:global.process.constrainedMemory', // Native code returns libuv's unsigned memory limit or zero without exception/error delivery in both versions (…\n 'node:global.process.emitWarning', // Typed warnings/options schedule warning delivery; ctor is only a stack cutoff, not invoked; warnings and dela…\n 'node:global.process.getActiveResourcesInfo', // Native code enumerates internal active resource names and creates an array without failure delivery in both v…\n 'node:global.process.getegid', // Where available, native getegid returns the unsigned effective group ID without an error path in both version…\n 'node:global.process.geteuid', // Direct native geteuid() cast to uint32 with no error path (POSIX-only; absent on Windows); identical in v26 a…\n 'node:global.process.getgid', // Direct native getgid() cast to uint32 with no error path (POSIX-only); identical in v26 at v26.10.0/src/node_…\n 'node:global.process.getuid', // Direct native getuid() cast to uint32 with no error path (POSIX-only); identical in v26 at v26.10.0/src/node_…\n 'node:global.process.hasUncaughtExceptionCaptureCallback', // Returns captureFn !== null; no failure path (v26 identical at v26.10.0/lib/internal/process/execution.js:155).\n 'node:global.process.hrtime', // Native uv_hrtime fill has no error; the only throws need a non-array or a length other than 2, which the [num…\n 'node:global.process.listenerCount', // v26-only typing; EventEmitter listenerCount only counts/compares listeners without invoking them (v26.10.0/li…\n 'node:global.process.listeners', // EventEmitter listeners returns an unwrapped copy of registered listeners without invoking them; same in v26 a…\n 'node:global.process.nextTick', // Typed Function passes validateFunction; callback is only queued for later, and async_hooks init throws are fa…\n 'node:global.process.rawListeners', // v26-only typing; returns a copy of raw listener array without invoking listeners (v26.10.0/lib/events.js:824).\n 'node:global.process.ref', // Experimental; null/primitive inputs are no-ops and genuine refables' ref() does not throw; a throwing user re…\n 'node:global.process.setSourceMapsEnabled', // Boolean validation is type-only; JS swaps support and native code only sets the environment flag (v24.21.0/sr…\n 'node:global.process.unref', // Nullish inputs are ignored; refable data methods are implicit hooks, not explicitly passed callbacks, and no …\n 'node:global.process.uptime', // Native code only updates the event-loop clock and returns elapsed uv_hrtime without failure delivery (v24.21.…\n 'node:global.queueMicrotask', // Only enqueues the callback (optionally wrapped in an AsyncResource); callback runs later and its errors are n…\n 'node:global.setImmediate', // Enqueues the callback without synchronous invocation or error delivery; async_hooks init errors are fatal, no…\n 'node:global.setInterval', // Schedules the callback for later; typed negative/NaN delays only warn and normalize (identical in v26 lib/tim…\n 'node:global.setTimeout', // Schedules the callback for later; typed negative/NaN delays only warn and normalize (identical in v26 lib/tim…\n 'node:http.Agent.getName', // Builds a key string by concatenating typed host/port/localAddress/family/socketPath fields; no validation or …\n 'node:http.ClientRequest.getRawHeaderNames', // Returns the stored raw header names from the null-prototype header map, or []; no failure path.\n 'node:http.ClientRequest.listenerCount', // v26-only typed overload of EventEmitter.listenerCount: counts stored listeners by identity without invoking t…\n 'node:http.ClientRequest.listeners', // v26-only typed overload of EventEmitter.listeners: returns an unwrapped copy of the listener array without in…\n 'node:http.ClientRequest.rawListeners', // v26-only typed overload of EventEmitter.rawListeners: returns a copy of listeners/wrappers without invoking t…\n 'node:http.IncomingMessage.listenerCount', // v26-only typed overload of EventEmitter.listenerCount: counts stored listeners by identity without invoking t…\n 'node:http.IncomingMessage.listeners', // v26-only typed overload of EventEmitter.listeners: returns an unwrapped copy of the listener array without in…\n 'node:http.IncomingMessage.rawListeners', // v26-only typed overload of EventEmitter.rawListeners: returns a copy of listeners/wrappers without invoking t…\n 'node:http.OutgoingMessage.getHeader', // validateString passes for typed string; looks up the lowercased name in the null-prototype header map.\n 'node:http.OutgoingMessage.getHeaderNames', // Returns ObjectKeys of the header map or []; no failure path.\n 'node:http.OutgoingMessage.getHeaders', // Builds a shallow null-prototype copy of stored header values; no failure path.\n 'node:http.OutgoingMessage.hasHeader', // validateString passes for typed string; boolean lookup in the header map.\n 'node:http.OutgoingMessage.listenerCount', // v26-only typed overload of EventEmitter.listenerCount: counts stored listeners by identity without invoking t…\n 'node:http.OutgoingMessage.listeners', // v26-only typed overload of EventEmitter.listeners: returns an unwrapped copy of the listener array without in…\n 'node:http.OutgoingMessage.rawListeners', // v26-only typing; inherited EventEmitter.rawListeners copies the listener array without invoking listeners (v2…\n 'node:http.Server.listenerCount', // v26-only typing; inherited listenerCount counts registered listeners without invoking them (v26.10.0/lib/even…\n 'node:http.Server.listeners', // v26-only typing; inherited listeners returns an unwrapped copy of the listener array without invoking listene…\n 'node:http.Server.rawListeners', // v26-only typing; inherited rawListeners copies the listener array without invoking listeners (v26.10.0/lib/ev…\n 'node:http2.ClientHttp2Session.listenerCount', // v26-only member: inherited EventEmitter.listenerCount counts registrations and compares identities without in…\n 'node:http2.ClientHttp2Session.listeners', // v26-only member: inherited EventEmitter.listeners copies/unwraps listener references without invoking them (v…\n 'node:http2.ClientHttp2Session.rawListeners', // v26-only member: inherited EventEmitter.rawListeners returns a copied array of registered functions without i…\n 'node:http2.ClientHttp2Stream.listenerCount', // v26-only typing: inherited EventEmitter.listenerCount counts registrations without invoking listeners (v26.10…\n 'node:http2.ClientHttp2Stream.listeners', // v26-only typing: inherited EventEmitter.listeners copies and unwraps registered references without invoking t…\n 'node:http2.ClientHttp2Stream.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied array of registered references without …\n 'node:http2.Http2SecureServer.listenerCount', // v26-only member: inherited EventEmitter.listenerCount counts registrations and compares identities without in…\n 'node:http2.Http2SecureServer.listeners', // v26-only member: inherited EventEmitter.listeners copies/unwraps listener references without invoking them (v…\n 'node:http2.Http2SecureServer.rawListeners', // v26-only member: inherited EventEmitter.rawListeners returns a copied array of registered functions without i…\n 'node:http2.Http2Server.listenerCount', // v26-only member: inherited EventEmitter.listenerCount counts registrations and compares identities without in…\n 'node:http2.Http2Server.listeners', // v26-only member: inherited EventEmitter.listeners copies/unwraps listener references without invoking them (v…\n 'node:http2.Http2Server.rawListeners', // v26-only member: inherited EventEmitter.rawListeners returns a copied array of registered functions without i…\n 'node:http2.Http2ServerRequest.listenerCount', // v26-only member: inherited EventEmitter.listenerCount counts registrations and compares identities without in…\n 'node:http2.Http2ServerRequest.listeners', // v26-only member: inherited EventEmitter.listeners copies/unwraps listener references without invoking them (v…\n 'node:http2.Http2ServerRequest.rawListeners', // v26-only member: inherited EventEmitter.rawListeners returns a copied array of registered functions without i…\n 'node:http2.Http2ServerResponse.getHeader', // validateString passes for typed strings; trims/lowercases and reads a null-prototype header map with no throw…\n 'node:http2.Http2ServerResponse.getHeaderNames', // Returns ObjectKeys of the internal null-prototype header map (v24.21.0/lib/internal/http2/compat.js:603); ide…\n 'node:http2.Http2ServerResponse.getHeaders', // Copies the internal null-prototype data-property header map with ObjectAssign (v24.21.0/lib/internal/http2/co…\n 'node:http2.Http2ServerResponse.hasHeader', // validateString passes for typed strings, then ObjectHasOwn on the internal header map (v24.21.0/lib/internal/…\n 'node:http2.Http2Stream.listenerCount', // v26-only typing: inherited EventEmitter.listenerCount counts registrations without invoking listeners (v26.10…\n 'node:http2.Http2Stream.listeners', // v26-only typing: inherited EventEmitter.listeners copies and unwraps registered references without invoking t…\n 'node:http2.Http2Stream.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied array of registered references without …\n 'node:http2.ServerHttp2Session.listenerCount', // v26-only typing: inherited EventEmitter.listenerCount counts registrations without invoking listeners (v26.10…\n 'node:http2.ServerHttp2Session.listeners', // v26-only typing: inherited EventEmitter.listeners copies and unwraps registered references without invoking t…\n 'node:http2.ServerHttp2Session.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied array of registered references without …\n 'node:http2.getDefaultSettings', // Native RefreshDefaults only writes compile-time defaults into the shared settings buffer, then JS builds a pl…\n 'node:https.Agent.getName', // Pure string concatenation of typed option fields over http Agent.getName; no validation or native calls; engi…\n 'node:https.Server.listenerCount', // v26-only typing; inherited listenerCount counts listeners without invoking them (v26.10.0/lib/events.js:835).\n 'node:https.Server.listeners', // v26-only typing; inherited listeners returns an unwrapped copy without invoking listeners (v26.10.0/lib/event…\n 'node:https.Server.rawListeners', // v26-only typing; inherited rawListeners copies the listener array without invoking listeners (v26.10.0/lib/ev…\n 'node:inspector.InspectorConsole.clear', // Both versions use the non-Formatter ConsoleClear builtin (deps/v8/src/builtins/builtins-console.cc:26); Clear…\n 'node:inspector.InspectorConsole.groupEnd', // Both versions use the non-Formatter ConsoleGroupEnd builtin (v24.21.0/deps/v8/src/builtins/builtins-console.c…\n 'node:inspector.Network.loadingFailed', // Typed params object passes validateObject; native loadingFailed only needs string requestId/type/errorText an…\n 'node:inspector.Network.loadingFinished', // Typed params object passes validateObject; native loadingFinished only needs string requestId and numeric tim…\n 'node:inspector.Network.webSocketClosed', // Typed params object passes validateObject; native webSocketClosed only needs string requestId and numeric tim…\n 'node:inspector.Network.webSocketCreated', // Typed params object passes validateObject; native webSocketCreated only needs string requestId and url, guara…\n 'node:inspector.NetworkResources.put', // Experimental; without --experimental-inspector-network-resource it only emits a warning; typed strings pass v…\n 'node:inspector.close', // close is native _debugEnd: if the agent IsListening it resets the IO thread (Agent::Stop is io_.reset()), oth…\n 'node:inspector.url', // Native Url returns undefined when not listening or a formatted ws:// string from host/port; no throw or error…\n 'node:module.Module.ModuleHooks.deregister', // Removes this hook instance from the resolve/load arrays via findIndex/splice; idempotent, no throw; v26 ident…\n 'node:module.Module.SourceMap', // every member (2) audited trust; also trusts future members\n 'node:module.Module.enableCompileCache', // Failures (NODE_DISABLE_COMPILE_CACHE, missing fs permission, mkdir error) are returned as a status/message re…\n 'node:module.Module.findSourceMap', // Non-strings return undefined and every conversion/lookup/SourceMap construction is inside a catch that return…\n 'node:module.Module.flushCompileCache', // Native FlushCompileCache only rejects non-boolean args (none passed by the typed signature); Persist logs and…\n 'node:module.Module.getCompileCacheDir', // Returns the native cache dir string or undefined; no failure path; identical in v26.\n 'node:module.Module.getSourceMapsSupport', // Returns a frozen module-level state object; no failure path; identical in v26.\n 'node:module.Module.isBuiltin', // SafeSet membership checks plus a typeof-guarded startsWith/slice; returns boolean for any string; identical i…\n 'node:module.Module.registerHooks', // Experimental; typed resolve/load are functions so validateFunction cannot fail; constructs and pushes a froze…\n 'node:module.Module.setSourceMapsSupport', // Typed boolean/options pass validation; native SetSourceMapsEnabled only sets a flag; swaps prepareStackTrace …\n 'node:module.Module.syncBuiltinESMExports', // Copies current builtin export values into existing ESM facades; ordinary builtin exports do not throw; a user…\n 'node:module.Module.wrap', // String concatenation of the CJS wrapper around script; only engine max-string-length limits apply (excluded);…\n 'node:net.BlockList.check', // String path calls native checkString which returns false for unparsable addresses; SocketAddress path is a pu…\n 'node:net.BlockList.isBlockList', // Optional-chained symbol property read returns a boolean for every ordinary value; only Proxy traps/getters co…\n 'node:net.BlockList.toJSON', // Experimental; returns this.rules from native GetRules/ListRules which only builds strings (engine allocation …\n 'node:net.Server.ref', // Sets a flag and, with a live handle, calls native HandleWrap ref which only toggles uv ref state (handle_wrap…\n 'node:net.Server.unref', // Sets a flag and, with a live handle, calls native HandleWrap unref which only toggles uv ref state (handle_wr…\n 'node:net.Socket.address', // _getsockname returns {} without a handle and ignores the native getsockname return code (FIXME at v26 net.js:…\n 'node:net.Socket.listenerCount', // v26-only declaration: EventEmitter.listenerCount only reads _events and compares listeners without invoking t…\n 'node:net.Socket.listeners', // v26-only declaration: EventEmitter.listeners returns an unwrapped copy of the listener array without invoking…\n 'node:net.Socket.rawListeners', // v26-only declaration: EventEmitter.rawListeners returns a copy of the listener array without invoking listene…\n 'node:net.Socket.setEncoding', // Readable.setEncoding builds a StringDecoder for a typed BufferEncoding (all supported) and re-decodes buffere…\n 'node:net.Socket.setKeepAlive', // Coerces typed inputs, caches without a handle, and ignores the native uv_tcp_keepalive_ex return code; option…\n 'node:net.Socket.setNoDelay', // Caches the flag without a handle and ignores the native uv_tcp_nodelay return code; no counting failure path;…\n 'node:net.SocketAddress.parse', // validateString on a typed string, then URL parsing and SocketAddress construction inside a catch-all that ret…\n 'node:net.createServer', // Constructs a Server: typed numeric options pass validateNumber (negatives clamp), listener registered on a fr…\n 'node:net.getDefaultAutoSelectFamily', // Returns a module-level boolean; identical in v26.\n 'node:net.getDefaultAutoSelectFamilyAttemptTimeout', // Returns a module-level number; identical in v26.\n 'node:net.isIP', // Two primordial RegExp tests on the string, returns 4/6/0; identical in v26.\n 'node:net.isIPv4', // Primordial RegExp test of a fixed IPv4 pattern; returns boolean; identical in v26.\n 'node:net.isIPv6', // Primordial RegExp test of a fixed IPv6 pattern; returns boolean; identical in v26.\n 'node:net.setDefaultAutoSelectFamily', // validateBoolean always passes for the typed boolean, then assigns module state; identical in v26.\n 'node:os.arch', // Returns process.arch; no counting failure path (v26 identical at v26.10.0/lib/os.js:166).\n 'node:os.availableParallelism', // Native uv_available_parallelism returns an unsigned count with no error path (v24.21.0/src/node_os.cc:413); v…\n 'node:os.cpus', // Native uv_cpu_info errors return undefined, which JS converts to [] (v24.21.0/lib/os.js:143); v26 identical.\n 'node:os.endianness', // Returns a constant computed at module load; no failure path; v26 identical.\n 'node:os.freemem', // Native uv_get_free_memory returns a number (0 on failure) with no throw (v24.21.0/src/node_os.cc:147); v26 id…\n 'node:os.loadavg', // Native uv_loadavg fills an internal Float64Array with no error path; CHECKs guard internal invariants only; v…\n 'node:os.machine', // Returns uname machine string cached at module load (v24.21.0/lib/os.js:101); no call-time failure; v26 identi…\n 'node:os.platform', // Returns process.platform; no counting failure path (v26 identical at v26.10.0/lib/os.js:174).\n 'node:os.release', // Returns uname release string cached at module load (v24.21.0/lib/os.js:89); no call-time failure; v26 identic…\n 'node:os.tmpdir', // Reads environment with '/tmp' fallback; native GetTempDir has no counting failure; engine string limits exclu…\n 'node:os.totalmem', // Native uv_get_total_memory returns a number with no throw (v24.21.0/src/node_os.cc:160); v26 identical.\n 'node:os.type', // Returns the OS type string captured once at module load from getOSInformation; the call itself has no failure…\n 'node:os.version', // Returns the OS version string captured once at module load from getOSInformation; the call itself has no fail…\n 'node:path.path.PlatformPath.basename', // Typed strings pass validateString; pure string scanning (posix and win32) with no other throw; absent from v2…\n 'node:path.path.PlatformPath.dirname', // Typed string passes validateString; pure string scanning with no other throw; absent from v26 typings.\n 'node:path.path.PlatformPath.extname', // Typed string passes validateString; pure string scanning with no other throw; absent from v26 typings.\n 'node:path.path.PlatformPath.format', // Typed object passes validateObject and fields are only concatenated; user getters on pathObject are implicit …\n 'node:path.path.PlatformPath.isAbsolute', // Typed string passes validateString; character checks only; absent from v26 typings.\n 'node:path.path.PlatformPath.join', // Typed strings pass validateString then pure normalize, no cwd read; engine string limits excluded; absent fro…\n 'node:path.path.PlatformPath.normalize', // Typed string passes validateString; pure normalizeString with no cwd read; absent from v26 typings.\n 'node:path.path.PlatformPath.parse', // Typed string passes validateString; pure string scanning returning a fresh object; absent from v26 typings.\n 'node:path.path.basename', // v26-only: validateString on typed strings only, then pure charCode scanning and slice; no counting failure pa…\n 'node:path.path.dirname', // v26-only: validateString on a typed string, then pure scanning and slice; no counting failure path.\n 'node:path.path.extname', // v26-only: validateString on a typed string, then pure character scanning; no counting failure path.\n 'node:path.path.format', // v26-only: bound _format validates the typed object then concatenates optional string fields; only getters/Pro…\n 'node:path.path.isAbsolute', // v26-only: validateString on a typed string then a first-char comparison; no counting failure path.\n 'node:path.path.join', // v26-only: validates typed strings, joins and runs pure posix.normalize (internal separator predicate, not use…\n 'node:path.path.normalize', // v26-only: validateString then pure normalizeString with the internal isPosixPathSeparator predicate (analyzer…\n 'node:path.path.parse', // v26-only: validateString on a typed string then pure scanning into a plain object; no counting failure path.\n 'node:path.path.toNamespacedPath', // v26-only: posix implementation returns its argument unchanged; no counting failure path.\n 'node:perf_hooks.ELDHistogram', // every member (2) audited trust; also trusts future members\n 'node:perf_hooks.Histogram.reset', // Genuine histogram calls native DoReset -> hdr_reset and field zeroing with no failure path (histogram-inl.h:3…\n 'node:perf_hooks.Performance.addEventListener', // v26-only on Performance; EventTarget.addEventListener validates typed options/listener, ignores aborted signa…\n 'node:perf_hooks.Performance.clearMeasures', // Filters or resets the measure buffer; no throw path on the genuine performance receiver; identical in v26.\n 'node:perf_hooks.Performance.clearResourceTimings', // Filters or resets the resource buffer; no throw path on the genuine performance receiver; identical in v26.\n 'node:perf_hooks.Performance.eventLoopUtilization', // Same function as perf_hooks.eventLoopUtilization: arithmetic over milestones, hrtime and native loopIdleTime …\n 'node:perf_hooks.Performance.getEntries', // Concatenates and sorts internal buffers; no throw path on the genuine performance receiver; identical in v26.\n 'node:perf_hooks.Performance.getEntriesByName', // Filters internal buffers by typed name/type; unknown types return []; ERR_MISSING_ARGS unreachable with the r…\n 'node:perf_hooks.Performance.getEntriesByType', // Filters internal buffers by typed EntryType; ERR_MISSING_ARGS unreachable with the required typed argument; i…\n 'node:perf_hooks.Performance.markResourceTiming', // v24: cacheMode is typed '' | 'local' so the internal assert holds and the call only enqueues/buffers (buffer-…\n 'node:perf_hooks.Performance.now', // Returns a monotonic hrtime-based number (node_perf.cc:315); no failure path on the genuine performance receiv…\n 'node:perf_hooks.Performance.removeEventListener', // v26-only on Performance; EventTarget.removeEventListener ignores nullish listeners, unlinks a matching handle…\n 'node:perf_hooks.Performance.setResourceTimingBufferSize', // Typed number goes through WebIDL 'unsigned long' without enforceRange (modular conversion, no throw; webidl.j…\n 'node:perf_hooks.Performance.timerify', // Same as perf_hooks.timerify: wraps fn without calling it; genuine RecordableHistogram passes (a structural fa…\n 'node:perf_hooks.Performance.toJSON', // Returns nodeTiming, timeOrigin and eventLoopUtilization() of the genuine performance object, none of which ca…\n 'node:perf_hooks.PerformanceEntry.toJSON', // Genuine entries pass validateThisInternalField and only read internal slots; unbound receivers are receiver m…\n 'node:perf_hooks.PerformanceObserver', // v26-only constructor; only validateFunction (type_only) then stores the callback; the callback runs later via…\n 'node:perf_hooks.PerformanceObserver.disconnect', // Clears private sets/buffers and may call native removeGarbageCollectionTracking, which only removes GC hooks …\n 'node:perf_hooks.PerformanceObserver.takeRecords', // Swaps and returns the private buffer; no throw path; identical in v26.\n 'node:perf_hooks.PerformanceObserverEntryList.getEntries', // Genuine list (delivered to observer callbacks) passes validateThisInternalField and returns a slice; identica…\n 'node:perf_hooks.PerformanceObserverEntryList.getEntriesByName', // Genuine list filters internal entries by typed name/type; ERR_MISSING_ARGS is unreachable with the required t…\n 'node:perf_hooks.PerformanceObserverEntryList.getEntriesByType', // Genuine list filters internal entries by typed EntryType; ERR_MISSING_ARGS is unreachable with the required t…\n 'node:perf_hooks.PerformanceResourceTiming.toJSON', // Genuine entry reads internal slots and timingInfo fields with optional chaining; no throw for ordinary timing…\n 'node:perf_hooks.RecordableHistogram.add', // Genuine RecordableHistogram other passes the kRecordable check and native hdr_add returns a dropped count wit…\n 'node:perf_hooks.RecordableHistogram.recordDelta', // Native RecordDelta records the monotonic hrtime delta; out-of-range values only bump exceeds (histogram-inl.h…\n 'node:perf_hooks.eventLoopUtilization', // Pure arithmetic over milestones, process.hrtime() and native loopIdleTime (uv_metrics_idle_time, no failure p…\n 'node:perf_hooks.timerify', // Validates and wraps fn without calling it; fn runs only when the caller invokes the wrapper; a genuine Record…\n 'node:punycode.ucs2.decode', // Deprecated (DEP0040); only charCodeAt loops and array pushes over a typed string, no throw path; engine alloc…\n 'node:querystring.parse', // Default decoder catches URIError and falls back to unescapeBuffer; a throwing custom decodeURIComponent is ca…\n 'node:querystring.unescape', // decodeURIComponent errors are caught and the input is decoded by unescapeBuffer, which never throws for a str…\n 'node:quic.listEndpoints', // v26-only: validates a typed options object, copies the internal SafeSet registry and filters with non-throwin…\n 'node:readline.Interface.getCursorPos', // Computes display width from prompt and line in JS plus ICU GetStringWidth, which only CHECKs an internal stri…\n 'node:readline.Interface.getPrompt', // Returns the stored prompt string; identical in v26.\n 'node:readline.Interface.setPrompt', // Only stores the prompt string; identical in v26.\n 'node:readline/promises.Readline.rollback', // Only replaces the private pending-action array and returns this; identical in v26.\n 'node:repl.REPLServer.clearBufferedCommand', // Only assigns '' to the internal buffered-command slot; no validation, callbacks or native calls (v26 class me…\n 'node:repl.REPLServer.defineCommand', // Function or REPLCommand with typed action passes validateFunction (type_only) and is stored on a null-prototy…\n 'node:repl.REPLServer.listenerCount', // v26-only typing; counts registered listeners (optionally matching a listener) without invoking them.\n 'node:repl.REPLServer.listeners', // v26-only typing; returns an unwrapped copy of the listener array without invoking listeners.\n 'node:repl.REPLServer.rawListeners', // v26-only typing; returns a copy of the raw listener array (including once wrappers) without invoking listener…\n 'node:repl.REPLServer.writer', // Default writer is util.inspect with showProxy:true, which returns a string for any value; only implicit custo…\n 'node:repl.writer', // Calls util.inspect with showProxy: true, so proxies are not trapped and inspect's own errors are handled; rem…\n 'node:sea.isSea', // Native IsSea returns IsSingleExecutable(), a postject sentinel check with no error path (v26 node_sea.cc:262,…\n 'node:sqlite.SQLTagStore.clear', // Only clears the LRU statement cache, dropping strong references without synchronous finalization or SQLite ca…\n 'node:stream.Stream.Duplex.listenerCount', // v26-only inventory member counts listeners without invoking them (events.js:835-865).\n 'node:stream.Stream.Duplex.listeners', // v26-only inventory member copies registered listeners without invoking them (events.js:791-805).\n 'node:stream.Stream.Duplex.rawListeners', // v26-only inventory member copies raw listeners without invoking them (events.js:791-805).\n 'node:stream.Stream.Pipe', // every member (4) audited trust; also trusts future members\n 'node:stream.Stream.Readable.isDisturbed', // Only reads disturbance/aborted flags in both versions (utils.js:299-304); implicit property hooks do not coun…\n 'node:stream.Stream.Readable.isPaused', // Reads genuine receiver pause/flow bit flags without invoking callbacks in both versions (readable.js:588; v26…\n 'node:stream.Stream.Readable.iterator', // Only creates a lazy iterator for a genuine Readable; later next/return operations own their failures (v24 rea…\n 'node:stream.Stream.Readable.listenerCount', // v26-only inventory member counts listeners without invoking them (events.js:835-865).\n 'node:stream.Stream.Readable.listeners', // v26-only inventory member copies listeners without invoking them (events.js:791-805).\n 'node:stream.Stream.Readable.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied listener array without invoking listene…\n 'node:stream.Stream.Readable.resume', // Only flips flowing flags and schedules resume_ via process.nextTick (v24 readable.js:1266; v26 :1303, also no…\n 'node:stream.Stream.Writable.cork', // Only sets the corked flag and increments the counter (v24/v26 writable.js:515-520); no validation, callbacks …\n 'node:stream.Stream.Writable.listenerCount', // v26-only typing: inherited EventEmitter.listenerCount counts registered (optionally matching) listeners witho…\n 'node:stream.Stream.Writable.listeners', // v26-only typing: inherited EventEmitter.listeners returns an unwrapped copy of the listener array without inv…\n 'node:stream.Stream.Writable.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied listener array without invoking listene…\n 'node:stream.Stream.Writable.setDefaultEncoding', // Lower-cases and checks Buffer.isEncoding, which accepts every BufferEncoding literal, so the ERR_UNKNOWN_ENCO…\n 'node:stream.Stream.getDefaultHighWaterMark', // Returns the selected mutable default numeric highWaterMark without failure (state.js:20-22) in both versions.\n 'node:stream.Stream.isErrored', // Only reads stream error flags in both versions (utils.js:306-316); implicit property hooks do not count.\n 'node:stream.Stream.isReadable', // Only tests readable lifecycle flags in both versions (utils.js:173-180); implicit property hooks do not count.\n 'node:stream.Stream.isWritable', // Only tests writable lifecycle flags in both versions (utils.js:182-189); implicit property hooks do not count.\n 'node:stream/iter.SyncShare.cancel', // v26-only experimental API: marks consumers detached, clears storage and catches iterator-return errors; no pr…\n 'node:stream/iter.SyncStatefulTransform.transform', // v26-only experimental interface: genuine Node sync zlib transforms return a suspended generator (v26.10.0/lib…\n 'node:stream/iter.Writer.endSync', // v26-only experimental API: Push/Broadcast return byte counts or -1 for non-closeable states; classic adapter …\n 'node:stream/iter.Writer.writeSync', // v26-only experimental API: converts typed strings/Uint8Arrays then queues or returns false, including closed/…\n 'node:stream/iter.Writer.writevSync', // v26-only experimental API: converts typed strings/Uint8Arrays then queues or returns false, including closed/…\n 'node:stream/iter.fromReadable', // v26-only experimental API: caches or builds a lazy iterator without reading or registering listeners; standar…\n 'node:stream/iter.tap', // v26-only experimental API: only validates the typed callback and returns a closure; callback is not invoked b…\n 'node:stream/iter.tapSync', // v26-only experimental API: only validates the typed callback and returns a closure; callback is not invoked b…\n 'node:stream/iter.toWritable', // v26-only experimental API: builds a Writable with fixed valid options and defers writer method invocation unt…\n 'node:stream/web.ByteLengthQueuingStrategy', // Both versions only store the required typed numeric highWaterMark without range validation; engine allocation…\n 'node:stream/web.CompressionStream', // Judged on v26 declaration availability (implementation also exists in v24): all four literal formats create c…\n 'node:stream/web.CountQueuingStrategy', // every member (2) audited trust; also trusts future members\n 'node:stream/web.DecompressionStream', // Judged on v26 declaration availability (implementation also exists in v24): all four literal formats create c…\n 'node:stream/web.TextEncoderStream', // Both versions create a state-only TextEncoder and fixed-valid TransformStream; encoding and user data handlin…\n 'node:string_decoder', // every member (2) audited trust; also trusts future members\n 'node:test.test.MockFunctionContext.callCount', // Returns the private call array length (mock.js:120, same in v26); no failure path.\n 'node:test.test.MockFunctionContext.mockImplementation', // validateFunction only rejects non-functions (type_only for typed F), then stores the implementation (mock.js:…\n 'node:test.test.MockFunctionContext.resetCalls', // Replaces the private call array (mock.js:165, same in v26); no failure path.\n 'node:test.test.MockModuleContext.restore', // Idempotent: only deletes/restores Module._cache entries, flips the mock record inactive and deletes shared ma…\n 'node:test.test.MockPropertyContext.accessCount', // Returns the private access array length (mock.js:380, same in v26); no failure path.\n 'node:test.test.MockPropertyContext.resetAccesses', // Replaces the private access array (mock.js:434, same in v26); no failure path.\n 'node:test.test.SuiteContext.diagnostic', // Only appends the typed message to the suite diagnostics array in both versions; engine allocation limits excl…\n 'node:test.test.TestContext.diagnostic', // Only appends the typed message to the test diagnostics array in both versions; engine allocation limits exclu…\n 'node:test.test.TestContext.runOnly', // Only assigns the boolean subtest filtering flag in both versions.\n 'node:test.test.TestContext.skip', // Only assigns the directive flag and optional typed message on the genuine test in both versions.\n 'node:test.test.TestContext.todo', // Only assigns the directive flag and optional typed message on the genuine test in both versions.\n 'node:test.test.TestsStream.listenerCount', // v26-only declaration: Reads listener bookkeeping without invoking listeners; engine allocation limits exclude…\n 'node:test.test.TestsStream.listeners', // v26-only declaration: Reads listener bookkeeping without invoking listeners; engine allocation limits exclude…\n 'node:test.test.TestsStream.rawListeners', // v26-only declaration: Reads listener bookkeeping without invoking listeners; engine allocation limits exclude…\n 'node:test.test.assert.register', // Validates typed name/function and stores the assertion without invoking it in both versions.\n 'node:test.test.getTestContext', // Looks up the active async resource and returns its lazily-created context or undefined without failure in bot…\n 'node:test.test.snapshot', // every member (2) audited trust; also trusts future members\n 'node:tls.Server.getTicketKeys', // Copies the genuine context's 48-byte ticket key into a new Buffer in both versions; engine allocation limits …\n 'node:tls.Server.listenerCount', // v26-only declaration: reads listener bookkeeping without invoking listeners; engine allocation limits exclude…\n 'node:tls.Server.listeners', // v26-only declaration: reads listener bookkeeping without invoking listeners; engine allocation limits exclude…\n 'node:tls.Server.rawListeners', // v26-only declaration: reads listener bookkeeping without invoking listeners; engine allocation limits exclude…\n 'node:tls.TLSSocket.disableRenegotiation', // Only sets an internal symbol flag; no native call or failure path (v24 wrap.js:790, v26 :799).\n 'node:tls.TLSSocket.enableTrace', // Proxy returns null without a handle; native EnableTrace only installs an SSL_trace message callback with erro…\n 'node:tls.TLSSocket.getCertificate', // Returns null without a handle; native GetCert returns undefined or an X509 dictionary from a locally loaded c…\n 'node:tls.TLSSocket.getCipher', // Proxy returns null without a handle; native GetCipherInfo returns undefined when no cipher is negotiated and …\n 'node:tls.TLSSocket.getEphemeralKeyInfo', // Proxy returns null without a handle; server returns null and client builds a dictionary from the peer temp ke…\n 'node:tls.TLSSocket.getFinished', // Proxy returns null without a handle; native returns undefined when no Finished message exists, else copies it…\n 'node:tls.TLSSocket.getPeerCertificate', // Returns null without a handle, {} or undefined without a peer cert; native GetPeerCert only returns empty May…\n 'node:tls.TLSSocket.getPeerFinished', // Proxy returns null without a handle; native returns undefined when no peer Finished exists, else copies it in…\n 'node:tls.TLSSocket.getPeerX509Certificate', // Optional-chains the handle and returns undefined when the native X509Certificate::GetPeerCert yields nothing;…\n 'node:tls.TLSSocket.getProtocol', // Proxy returns null without a handle; native returns SSL_get_version string (crypto_tls.cc:2115); identical v2…\n 'node:tls.TLSSocket.getSharedSigalgs', // Proxy returns null without a handle; native builds a string array from SSL_get_shared_sigalgs with UNDEF fall…\n 'node:tls.TLSSocket.getTLSTicket', // Proxy returns null without a handle; native returns undefined without a session/ticket else Buffer::Copy (cry…\n 'node:tls.TLSSocket.getX509Certificate', // Optional-chains the handle and returns undefined when no local certificate exists; native X509Certificate::Ge…\n 'node:tls.TLSSocket.isSessionReused', // Proxy returns null without a handle; native returns SSL_session_reused boolean (crypto_tls.cc:1855); identica…\n 'node:tls.TLSSocket.listenerCount', // v26-only typing: inherited EventEmitter.listenerCount counts registrations without invoking listeners (v26.10…\n 'node:tls.TLSSocket.listeners', // v26-only typing: inherited EventEmitter.listeners copies and unwraps registered references without invoking t…\n 'node:tls.TLSSocket.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied array of registered references without …\n 'node:tls.getCACertificates', // Typed selectors only return cached CA strings; loaders suppress OS/parse errors, and successfully decoded, un…\n 'node:tls.getCertificateCompressionAlgorithms', // Native code only checks compiled compression BIO availability and returns names in both versions; engine allo…\n 'node:trace_events.Tracing.disable', // No-op unless enabled; native Disable only removes categories from the default writer without throwing (node_t…\n 'node:trace_events.getEnabledCategories', // Native returns the agent's enabled category string or undefined, no throw (node_trace_events.cc:117); module-…\n 'node:tty.WriteStream.getWindowSize', // Returns the cached [columns, rows] properties without native calls (tty.js:187); identical v26.\n 'node:tty.WriteStream.listenerCount', // v26-only typing: inherited EventEmitter.listenerCount counts registrations without invoking listeners (v26.10…\n 'node:tty.WriteStream.listeners', // v26-only typing: inherited EventEmitter.listeners copies and unwraps registered references without invoking t…\n 'node:tty.WriteStream.rawListeners', // v26-only typing: inherited EventEmitter.rawListeners returns a copied array of registered references without …\n 'node:tty.isatty', // Range-checks the typed fd and returns false outside int32 >= 0; native IsTTY returns uv_guess_handle == UV_TT…\n 'node:url.URL.canParse', // Typed string input/base go to native CanParse, which returns ada::can_parse's boolean without throwing.\n 'node:url.URL.parse', // Calls the URL constructor with kParseURLSymbol so native Parse returns without raising, and invalid input yie…\n 'node:url.URL.revokeObjectURL', // Native RevokeObjectURL returns silently on unparsable URLs or unknown ids; nothing is thrown for a typed stri…\n 'node:url.URL.toJSON', // Returns href after lazy search sync; native Update returns false instead of throwing, and context update just…\n 'node:url.URL.toString', // Returns href after lazy search sync; native Update reports failure as false, not a throw. Not in the v26 inve…\n 'node:url.URLSearchParams.append', // Pushes well-formed strings and marks the linked URL dirty; native Update failure is returned as false, not th…\n 'node:url.URLSearchParams.delete', // Filters the in-memory list by typed name/value; the linked-URL update reports failure as false, never throws.\n 'node:url.URLSearchParams.entries', // Returns a new URLSearchParamsIterator for a genuine receiver; no counting failure path.\n 'node:url.URLSearchParams.get', // Linear lookup over the in-memory list; returns the value or null.\n 'node:url.URLSearchParams.getAll', // Collects matching values from the in-memory list; no counting failure path.\n 'node:url.URLSearchParams.has', // Linear membership test over the in-memory list; returns a boolean.\n 'node:url.URLSearchParams.keys', // Returns a new key iterator for a genuine receiver; no counting failure path.\n 'node:url.URLSearchParams.set', // Rewrites the in-memory list and marks the URL dirty; native Update failure is returned as false, not thrown.\n 'node:url.URLSearchParams.sort', // Stable insertion/merge sort over string pairs using primitive comparison; no user code or throw.\n 'node:url.URLSearchParams.toString', // Serializes stored strings, which are already well-formed (toUSVString), so encodeStr never sees lone surrogat…\n 'node:url.URLSearchParams.values', // Returns a new value iterator for a genuine receiver; no counting failure path.\n 'node:url.domainToASCII', // Native DomainToASCII returns '' for empty or invalid hostnames instead of throwing; only engine string limits…\n 'node:url.domainToUnicode', // Native DomainToUnicode returns '' for empty or invalid hostnames instead of throwing; only engine string limi…\n 'node:util.InspectStyles.regexp', // v26-only highlightRegExp is a pure string scanner; palette built from typed InspectColor names (all defined i…\n 'node:util.MIMEParams.delete', // Lowercases name and deletes from an internal SafeMap; lazy #parse never throws (QUOTED_VALUE_PATTERN always m…\n 'node:util.MIMEParams.entries', // Generator method; calling it only creates the iterator; lazy #parse never throws (QUOTED_VALUE_PATTERN always…\n 'node:util.MIMEParams.get', // Lowercases name and reads an internal SafeMap; lazy #parse never throws (QUOTED_VALUE_PATTERN always matches,…\n 'node:util.MIMEParams.has', // Lowercases name and checks an internal SafeMap; lazy #parse never throws (QUOTED_VALUE_PATTERN always matches…\n 'node:util.MIMEParams.keys', // Generator method; calling it only creates the iterator; lazy #parse never throws (QUOTED_VALUE_PATTERN always…\n 'node:util.MIMEParams.values', // Generator method; calling it only creates the iterator; lazy #parse never throws (QUOTED_VALUE_PATTERN always…\n 'node:util.MIMEType.toString', // Genuine MIMEType always holds parsed type/subtype and a MIMEParams; serialization concatenates strings withou…\n 'node:util.TextEncoder', // every member (3) audited trust; also trusts future members\n 'node:util.debuglog', // Only builds lazy closures and defines an enabled getter; section is uppercased and the callback runs only on …\n 'node:util.deprecate', // Validates typed string code then wraps fn (setPrototypeOf on a fresh function, copies prototype/length); miss…\n 'node:util.getSystemErrorMap', // Native GetErrMap builds a Map from the static uv_errors_map table with no failure return (v24.21.0/src/uv.cc:…\n 'node:util.parseEnv', // Typed string passes validateString; native Dotenv ParseContent/ToObject has no error path beyond engine alloc…\n 'node:util.stripVTControlCharacters', // Typed string passes validateString; indexOf and internal regex replace only; v26 same at v26.10.0/lib/interna…\n 'node:util.toUSVString', // Template-literal of a typed string then String.prototype.toWellFormed; no failure path; v26 same at v26.10.0/…\n 'node:util.transferableAbortController', // Constructs an AbortController with an internally created transferable AbortSignal; no failure path; v26 same …\n 'node:util/types', // every member (43) audited trust; also trusts future members\n 'node:v8.Deserializer.getWireFormatVersion', // Native getter returns the deserializer's parsed wire-format version (0 before readHeader); no throw path (v24…\n 'node:v8.Deserializer.transferArrayBuffer', // Typed number id converts via Uint32Value without throwing; typed ArrayBuffer is recorded in a transfer dictio…\n 'node:v8.GCProfiler', // every member (2) audited trust; also trusts future members\n 'node:v8.Serializer.releaseBuffer', // Releases the serializer's malloc buffer into a Buffer; repeated calls yield an empty buffer; only allocation …\n 'node:v8.Serializer.transferArrayBuffer', // Typed number id converts via Uint32Value without throwing and a typed ArrayBuffer passes IsArrayBuffer; V8 on…\n 'node:v8.Serializer.writeDouble', // NumberValue on a typed number cannot throw; V8 WriteDouble only appends bytes, allocation failure sets an out…\n 'node:v8.Serializer.writeHeader', // Appends the version header bytes; no throw path besides excluded allocation limits (node_serdes.cc:183); v26 …\n 'node:v8.Serializer.writeRawBytes', // Typed ArrayBufferView passes the IsArrayBufferView check and bytes are appended; only excluded allocation lim…\n 'node:v8.Serializer.writeUint32', // Uint32Value wraps any typed number without throwing; varint append has no error path (node_serdes.cc:240); v2…\n 'node:v8.Serializer.writeUint64', // Uint32Value on typed numbers cannot throw; varint append has no error path (node_serdes.cc:250); v26 same.\n 'node:v8.SyncCPUProfileHandle.stop', // A genuine handle holds an id from a successful start in the env's private CpuProfiler pending list; first sto…\n 'node:v8.cachedDataVersionTag', // Native returns ScriptCompiler::CachedDataVersionTag() as an unsigned integer with no failure path (v24.21.0/s…\n 'node:v8.getCppHeapStatistics', // Literal-union detail level passes validateOneOf; native CollectStatistics and object conversion have no expos…\n 'node:v8.getHeapCodeStatistics', // Native fills a Float64 buffer from GetHeapCodeAndMetadataStatistics without failure (v24.21.0/src/node_v8.cc:…\n 'node:v8.getHeapSnapshot', // Typed boolean options validate; native TakeHeapSnapshot failure is a CHECK abort (not a throw) and the stream…\n 'node:v8.getHeapSpaceStatistics', // Iterates known heap spaces filling a buffer via GetHeapSpaceStatistics, no failure path (v24.21.0/src/node_v8…\n 'node:v8.getHeapStatistics', // Native fills a Float64 buffer from Isolate::GetHeapStatistics, no failure path (v24.21.0/src/node_v8.cc:215).\n 'node:v8.isStringOneByteRepresentation', // Typed string passes validateString; native returns String::IsOneByte() (v24.21.0/src/node_v8.cc:296).\n 'node:v8.queryObjects', // Typed Function/format literal pass validation; native returns [] for non-object prototypes; experimental warn…\n 'node:v8.setFlagsFromString', // Typed string validated; V8::SetFlagsFromString reports unknown flags on stderr without throwing; behavior cha…\n 'node:v8.startupSnapshot.isBuildingSnapshot', // Reads a native flag buffer element; no throw path (startup_snapshot.js:21); v26 same.\n 'node:v8.stopCoverage', // No-op without NODE_V8_COVERAGE; otherwise dispatches Profiler.stopPreciseCoverage, with internal errors print…\n 'node:v8.takeCoverage', // No-op without NODE_V8_COVERAGE; otherwise takes precise coverage and write failures only print to stderr (v24…\n 'node:vfs', // every member (2) audited trust; also trusts future members\n 'node:vm.Script.createCachedData', // Native CreateCodeCache result is copied into a Buffer (empty when no cache); only allocation limits (excluded…\n 'node:vm.SourceTextModule.hasTopLevelAwait', // Genuine receiver passes the internal-field check and the call reads a boolean property of the module wrap; no…\n 'node:wasi.WASI.getImportObject', // Returns an object keyed by the constructor-chosen binding name; no throw path (wasi.js:161); v26 same.\n 'node:worker_threads.BroadcastChannel', // v26-only construct: typed string name is stringified and native BroadcastChannel joins a named SiblingGroup p…\n 'node:worker_threads.BroadcastChannel.addEventListener', // v26-only typed declaration of inherited EventTarget.addEventListener: registers the listener without calling …\n 'node:worker_threads.BroadcastChannel.close', // Detaches internal handlers and closes the internal MessagePort; repeated close returns early; native HandleWr…\n 'node:worker_threads.BroadcastChannel.removeEventListener', // v26-only typed declaration of inherited EventTarget.removeEventListener: unlinks a listener without invoking …\n 'node:worker_threads.MessageChannel', // v26-only construct: creates and entangles two native ports; failures are allocation/engine limits only (uv_as…\n 'node:worker_threads.MessagePort.addEventListener', // v26-only typed declaration of inherited EventTarget.addEventListener; MessagePort's kNewListener override onl…\n 'node:worker_threads.MessagePort.close', // Native HandleWrap close returns early unless initialized and schedules uv_close; the later 'close' dispatch c…\n 'node:worker_threads.MessagePort.emit', // NodeEventTarget.emit dispatch catches listener exceptions/rejections and reschedules them as uncaught nextTic…\n 'node:worker_threads.MessagePort.hasRef', // Calls native HandleWrap::HasRef, which returns silently for an unwrapped (closed) port and otherwise reads re…\n 'node:worker_threads.MessagePort.ref', // Native HandleWrap::Ref only uv_refs an alive handle and returns silently otherwise; identical in v26.\n 'node:worker_threads.MessagePort.removeEventListener', // v26-only typed declaration of inherited EventTarget.removeEventListener; MessagePort's kRemoveListener overri…\n 'node:worker_threads.MessagePort.start', // Native MessagePort::Start returns for closed/detached ports and otherwise sets receiving state and triggers a…\n 'node:worker_threads.MessagePort.unref', // Native HandleWrap::Unref only uv_unrefs an alive handle and returns silently otherwise; identical in v26.\n 'node:worker_threads.Worker.ref', // Returns after exit; otherwise native Worker::Ref only toggles has_ref_/env refs and MessagePort ref is a no-o…\n 'node:worker_threads.Worker.unref', // Returns after exit; otherwise native Worker::Unref only toggles has_ref_/env refs and MessagePort unref is a …\n 'node:worker_threads.getEnvironmentData', // Plain SafeMap lookup by key; no throw path (v24 lib/internal/worker.js:127, v26 :131).\n 'node:worker_threads.isMarkedAsUntransferable', // Reads a private symbol that never triggers Proxy traps or getters; returns false for nullish (v24 lib/interna…\n 'node:worker_threads.setEnvironmentData', // Plain SafeMap set/delete; values are cloned only later when a Worker is constructed (v24 lib/internal/worker.…\n 'node:zlib/iter', // every member (16) audited trust; also trusts future members\n];\n\nexport const NODE_DISTRUST: readonly string[] = [\n 'node:global.EventTarget.dispatchEvent', // Redispatch of the currently dispatched genuine Event throws ERR_EVENT_RECURSION in both versions; listener ex…\n 'node:perf_hooks.PerformanceObserver.observe', // Switching a single-type observer to entryTypes throws InvalidModificationError DOMException; passing both ent…\n 'node:stream/web.ByteLengthQueuingStrategy.size', // Detached or out-of-bounds DataView byteLength access throws in both versions.\n 'node:worker_threads.BroadcastChannel.onmessage', // v24-only handler property: invoking it calls the caller-assigned function directly (exceptions propagate), an…\n 'node:worker_threads.BroadcastChannel.onmessageerror', // v24-only handler property: invoking it calls the caller-assigned function directly (exceptions propagate), an…\n 'node:worker_threads.BroadcastChannel.postMessage', // Throws InvalidStateError DOMException after close() and DataCloneError for uncloneable values such as functio…\n];\n","// GENERATED by trust/research/web-api/tools/emit-preset.mjs. Do not edit by hand: change the audit and regenerate.\n//\n// Browser APIs audited member by member (trust/research/web-api/RUBRIC.md) against Blink at Chromium\n// 130.0.6723.191 (Electron 33), V8 13.0.245.25 for console, the pinned specs (recorded), and TypeScript 5.9.3's DOM libs.\n// Two questions per API: can a call with typed arguments throw or fail asynchronously (trust/distrust), and is\n// the declared TypeScript type of what it hands back true (trust_type/distrust_type). If it can throw, it is distrust.\n//\n// web_strict counts every failure path. web ignores the paths tagged in tools/scenario-tags.json: a window or\n// frame that was removed, an enforced Trusted Types / storage policy, a non-HTML document.\n// Scope: the 420 DOM APIs demo-assistant's UI uses (first pass); unaudited APIs stay untrusted.\n// web: 103 trust, 59 distrust, 319 trust_type, 20 distrust_type. web_strict: 94 trust, 68 distrust, 308 trust_type, 26 distrust_type.\n// Trust entries for bare constructor / interface names are left out (an entry covers every member below it).\n// Evidence for every entry: trust/research/web-api/out/final/*.json and out/auto.json.\n\nexport const WEB_TRUST: readonly string[] = [\n 'js:AbortSignal.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:AbortSignal.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:AnimationFrameProvider.cancelAnimationFrame', // call trust: no ExceptionState, unknown handle is ignored (LocalDOMWindow::cancelAnimationFrame at local_dom_w…\n 'js:AnimationFrameProvider.requestAnimationFrame', // call trust: callback is only scheduled, never run synchronously, no ExceptionState (local_dom_window.cc:1973)…\n 'js:BaseAudioContext.createBiquadFilter', // web ignores: NotAllowedError only on a context kept from a removed iframe\n 'js:BaseAudioContext.createBufferSource', // call trust: AudioBufferSourceNode::Create only constructs the node and never touches ExceptionState; type tru…\n 'js:BaseAudioContext.createDynamicsCompressor', // call trust: DynamicsCompressorNode::Create only constructs the node and never touches ExceptionState; type tr…\n 'js:BaseAudioContext.createGain', // call trust: GainNode::Create only constructs the node and never touches ExceptionState; type trust: returns t…\n 'js:BaseAudioContext.createOscillator', // call trust: OscillatorNode::Create only constructs the node and never touches ExceptionState; type trust: ret…\n 'js:CSS.escape', // SerializeIdentifier over any string never throws (NUL becomes U+FFFD) and returns a string.\n 'js:CSSStyleDeclaration.getPropertyValue', // getPropertyValue(DOMString) has no ExceptionState and returns empty string for unknown names; always a string…\n 'js:Console.debug', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Console.error', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Console.info', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Console.warn', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Crypto.randomUUID', // No ExceptionState, always a canonical 4-dash UUID string matching the template type; SecureContext assumed pe…\n 'js:DOMTokenList.contains', // No RaisesException; any string just does a set lookup and returns boolean.\n 'js:DataTransferItem.getAsFile', // getAsFile has no ExceptionState and returns File? matching File | null; trust/trust.\n 'js:Document.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Document.caretRangeFromPoint', // call trust: long args coerce NaN to 0, no ExceptionState (document.cc:1697); type trust: Range|null matches I…\n 'js:Document.createRange', // trust/trust: createRange() always returns a new Range (document.cc:2064), no ExceptionState.\n 'js:Document.createTreeWalker', // trust/trust: non-null Node root, unsigned long whatToShow without EnforceRange wraps NaN; filter not invoked …\n 'js:Document.execCommand', // web ignores: insertHTML throws only under an enforced Trusted Types CSP\n 'js:Document.getElementById', // call trust: lookup returns null when absent (tree_scope.cc:113), never throws; type distrust: IDL Element? bu…\n 'js:Document.getElementsByTagName', // call trust: no ExceptionState, always returns a live HTMLCollection; type distrust: tag-name maps ignore name…\n 'js:Document.getSelection', // Returns the selection or null for a frameless document, never throws; Selection | null is exact (tree_scope.c…\n 'js:Document.hasFocus', // Pure boolean query on page focus state (document.cc:8546), no failure path; boolean is exact.\n 'js:Document.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Element.getAttribute', // No RaisesException; any string name is accepted; string | null is exact.\n 'js:Element.getBoundingClientRect', // Always returns a DOMRect even when detached; no failure path.\n 'js:Element.hasAttribute', // No RaisesException; boolean result is exact for any string name.\n 'js:Element.hasPointerCapture', // Plain long (no EnforceRange, NaN->0), no RaisesException; returns boolean.\n 'js:Element.removeAttribute', // No failure path for any name; void; CEReactions recorded as hook.\n 'js:Element.scrollIntoView', // No RaisesException; typed boolean or options cannot fail; void.\n 'js:Element.scrollTo', // Unrestricted doubles and options dictionary cannot throw; void.\n 'js:Event.composedPath', // No exception state; returns sequence<EventTarget> matching EventTarget[].\n 'js:Event.preventDefault', // Sets canceled flag only; returns void; no failure path.\n 'js:Event.stopPropagation', // Sets stop-propagation flag only; returns void; no failure path.\n 'js:EventTarget.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLButtonElement.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLCollectionBase.item', // call trust: unsigned long index wraps without EnforceRange so no throw; type trust: Element | null is exact.\n 'js:HTMLDivElement.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLDivElement.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLElement.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLElement.click', // click() dispatches a simulated click with no ExceptionState; listener throws are reported not rethrown; retur…\n 'js:HTMLElement.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLInputElement.select', // select() calls setSelectionRange + Focus with no ExceptionState; no failure path; returns void.\n 'js:HTMLOrSVGElement.blur', // blur() is a no-throw focus-state change; returns void.\n 'js:HTMLOrSVGElement.focus', // focusForBindings has no ExceptionState; FocusOptions dictionary cannot throw on typed input; returns void.\n 'js:HTMLTextAreaElement.select', // select() has no ExceptionState and just sets the selection range (text_control_element.cc:272); returns void.\n 'js:HTMLTextAreaElement.setSelectionRange', // setSelectionRangeForBinding takes no ExceptionState; unsigned long args wrap (null/NaN to 0, no EnforceRange)…\n 'js:IntersectionObserver.disconnect', // IDL says RaisesException but disconnect(ExceptionState&) never touches it and only clears observations; retur…\n 'js:IntersectionObserver.observe', // IDL says RaisesException but observe(Element*, ExceptionState&) never raises; duplicate or detached target is…\n 'js:Location.reload', // web ignores: SecurityError only on a Location kept from a frame that navigated cross-origin\n 'js:MediaQueryList.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:MediaQueryList.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:MutationObserver.disconnect', // Clears registrations and records; no ExceptionState, returns void.\n 'js:MutationObserver.takeRecords', // No ExceptionState; always returns a fresh MutationRecord[] (possibly empty).\n 'js:Node.contains', // Pure tree walk accepting Node|null; returns boolean, no failure path.\n 'js:Performance.now', // No ExceptionState, returns a double always; DOMHighResTimeStamp is number.\n 'js:PerformanceObserver.disconnect', // Clears observer state; no ExceptionState; returns void.\n 'js:PerformanceObserverEntryList.getEntries', // No exception path; returns PerformanceEntry sequence matching PerformanceEntryList.\n 'js:Range.collapse', // Moves one boundary to the other; no ExceptionState, optional boolean cannot fail; returns void.\n 'js:Range.getBoundingClientRect', // Always builds a DOMRect (empty for collapsed/detached ranges); no throw path.\n 'js:Range.intersectsNode', // Only throw is the null-node TypeError that TS rejects; foreign-root nodes return false; boolean is exact.\n 'js:Range.toString', // Stringifier concatenates text node data into a string; no ExceptionState, always a string.\n 'js:ResizeObserver.disconnect', // Clears observations; no ExceptionState; returns void.\n 'js:ResizeObserver.observe', // Both overloads take a genuine Element and a dictionary with an enum box, no ExceptionState; returns void.\n 'js:ResizeObserver.unobserve', // Erases the observation if present, ignores unknown targets; no ExceptionState; returns void.\n 'js:Storage.getItem', // web ignores: SecurityError only on a Storage kept from a removed iframe\n 'js:Storage.removeItem', // web ignores: SecurityError only on a Storage kept from a removed iframe\n 'js:TextEncoder.encode', // USVString is lossy-converted so no throw; only allocation failure (text_encoder.cc:85, resource limit, not co…\n 'js:URL.createObjectURL', // IDL says RaisesException but URLFileAPI::createObjectURL and the MediaSource path never throw (closed context…\n 'js:URL.revokeObjectURL', // Parses the string into a KURL and revokes it; no ExceptionState and unknown URLs are ignored; returns void.\n 'js:Window.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Window.confirm', // Returns false when detached or sandboxed without allow-modals (console error only), never throws; boolean exa…\n 'js:Window.getComputedStyle', // Always returns a CSSComputedStyleDeclaration (invalid pseudo gives empty style), no ExceptionState; non-null …\n 'js:Window.matchMedia', // web ignores: null only when the window's document is detached\n 'js:Window.prompt', // Returns null/empty when detached or sandboxed, never throws; string | null matches IDL DOMString?.\n 'js:Window.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:WindowOrWorkerGlobalScope.clearInterval', // Never throws: long handle wraps, unknown id ignored (dom_timer.cc:237); returns void.\n 'js:WindowOrWorkerGlobalScope.clearTimeout', // Never throws: long handle wraps, unknown id ignored (dom_timer.cc:237); returns void.\n 'js:WindowOrWorkerGlobalScope.reportError', // Reports the value to onerror/console, never rethrows; invalid context returns early; returns void.\n 'js:WindowOrWorkerGlobalScope.setInterval', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:WindowOrWorkerGlobalScope.setTimeout', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:Worker.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Worker.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Worker.terminate', // Idempotent TerminateGlobalScope (dedicated_worker.cc:383), no exception state; returns void.\n 'js:addEventListener', // call trust (null/duplicate listener ignored, options typed), type n/a (void); event-map type_unsound hook rec…\n 'js:alert', // call trust: sandboxed/no-frame alert is ignored with a console error, never thrown; type n/a (void).\n 'js:cancelAnimationFrame', // call trust: plain `long` handle (no EnforceRange) and unknown ids are ignored; type n/a (void).\n 'js:clearInterval', // call trust: optional plain `long` handle, unknown id is a no-op; type n/a (void).\n 'js:clearTimeout', // call trust: optional plain `long` handle, unknown id is a no-op; type n/a (void).\n 'js:confirm', // call trust: sandboxed or detached window returns false without throwing; type trust: boolean.\n 'js:getComputedStyle', // getComputedStyle has no ExceptionState and always returns a CSSStyleDeclaration (empty for unknown pseudo-ele…\n 'js:matchMedia', // matchMedia(string) returns a new MediaQueryList for any string (unparsable queries yield \"not all\"), no Excep…\n 'js:prompt', // Blink prompt() has no ExceptionState and returns null when sandboxed/no page; string|null is exact (note: Ele…\n 'js:queueMicrotask', // Enqueues the callback and returns void; callback exceptions are reported (InvokeAndReportException), never re…\n 'js:removeEventListener', // Removes a matching listener or does nothing; IDL has no RaisesException and a missing/null listener is ignore…\n 'js:requestAnimationFrame', // Schedules the callback for later and returns a long id; no ExceptionState, nothing rethrown; number is exact.\n 'js:requestIdleCallback', // No RaisesException and IdleRequestOptions.timeout is a plain unsigned long (no EnforceRange); returns a numbe…\n 'js:setInterval', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:setTimeout', // web ignores: string handler throws only under an enforced Trusted Types CSP\n];\n\nexport const WEB_DISTRUST: readonly string[] = [\n 'js:AudioBuffer.getChannelData', // distrust call (value: channel index >= numberOfChannels throws IndexSizeError); type trust: returns the Float…\n 'js:AudioBufferSourceNode.start', // distrust call (state: starting twice throws InvalidStateError; value: negative when/offset/duration throws Ra…\n 'js:AudioContext.resume', // distrust call (async: returns a Promise that rejects on a closed context); type trust: Promise<void> matches …\n 'js:AudioNode.connect', // distrust call (value: bad output/input index throws IndexSizeError; cross-context destination throws InvalidA…\n 'js:AudioParam.exponentialRampToValueAtTime', // Throws RangeError on 0 value or negative time, TypeError on NaN, NotSupportedError on curve overlap; returns …\n 'js:AudioParam.setValueAtTime', // Throws RangeError on negative time, TypeError on NaN, NotSupportedError on curve overlap; returns this, Audio…\n 'js:AudioScheduledSourceNode.start', // Throws InvalidStateError if already started and RangeError on negative or NaN when; returns void.\n 'js:AudioScheduledSourceNode.stop', // Throws InvalidStateError if never started and RangeError on negative or NaN when; returns void.\n 'js:BaseAudioContext.createBuffer', // call distrust: NotSupportedError for typed numbers out of range (0 channels/frames, bad sample rate); type tr…\n 'js:Blob.arrayBuffer', // Promise can reject (BlobFileReaderClient::DidFail rejects) so call distrust (async); Promise<ArrayBuffer> is …\n 'js:Body.json', // return type contains any\n 'js:Body.text', // Returns a Promise that rejects on used or errored body so call distrust (async); Promise<string> (USVString) …\n 'js:CSSStyleDeclaration.removeProperty', // Throws NoModificationAllowedError on a computed-style receiver (state); returns exact string; CEReactions hoo…\n 'js:CSSStyleDeclaration.setProperty', // Throws NoModificationAllowedError on a computed-style receiver (state); returns void; CEReactions hook record…\n 'js:ChildNode.remove', // Blink throws NotFoundError if a blur handler reparented the focused child during removal (spec says remove() …\n 'js:Clipboard.writeText', // Returns Promise that rejects NotAllowedError when unfocused or permission denied; resolves undefined, true to…\n 'js:Crypto.getRandomValues', // Throws TypeMismatchError for Float arrays/DataView and QuotaExceededError above 65536 bytes; returns the same…\n 'js:DOMTokenList.add', // Empty or whitespace-containing string token throws SyntaxError/InvalidCharacterError; returns void; CEReactio…\n 'js:DOMTokenList.remove', // Empty or whitespace-containing string token throws SyntaxError/InvalidCharacterError; returns void; CEReactio…\n 'js:DataTransferItemList.add', // add(data,type) throws NotSupportedError when an item of that type already exists (state); DataTransferItem | …\n 'js:Document.caretPositionFromPoint', // call distrust: typed NaN/Infinity into non-unrestricted float throws TypeError; type trust: CaretPosition|nul…\n 'js:Document.createElement', // call distrust: invalid tag name throws InvalidCharacterError; type distrust (medium): non-HTML documents retu…\n 'js:DocumentOrShadowRoot.elementFromPoint', // NaN/Infinity into plain double x,y throws TypeError (idl:15); result Element | null is exact (tree_scope.cc:2…\n 'js:Element.closest', // closest('[') throws SyntaxError (value); <E> overload is a cast and tag-name overload ignores SVG/MathML name…\n 'js:Element.matches', // matches('[') throws SyntaxError via SelectorQueryCache::Add; boolean return is exact.\n 'js:Element.releasePointerCapture', // Throws NotFoundError when pointerId is not an active pointer; returns void.\n 'js:Element.setAttribute', // call distrust (value): invalid attribute name throws InvalidCharacterError; returns void so type n/a; CEReact…\n 'js:Element.setPointerCapture', // call distrust (state): NotFoundError for inactive pointerId, InvalidStateError when disconnected or pointer-l…\n 'js:EventTarget.dispatchEvent', // Re-dispatching an in-flight event throws InvalidStateError; listener throws are reported not rethrown; boolea…\n 'js:IntersectionObserver', // Throws RangeError for out-of-range threshold and SyntaxError for malformed rootMargin; returned IntersectionO…\n 'js:MouseEvent', // MouseEventInit clientX/clientY/screenX/screenY are non-unrestricted double, so NaN/Infinity (typed number) th…\n 'js:MutationObserver.observe', // Throws TypeError for a typed options dict with no observation type (e.g. {}); returns void.\n 'js:Node.appendChild', // Throws HierarchyRequestError for ancestor/invalid parent; returns the same node T (type true); custom element…\n 'js:Node.insertBefore', // Throws NotFoundError/HierarchyRequestError on bad child or ancestor; returns inserted node T (true); custom e…\n 'js:Node.replaceChild', // Throws NotFoundError/HierarchyRequestError; returns the replaced child T (true); custom element reactions rec…\n 'js:NodeListOf.forEach', // iterable<Node> forEach runs the callback synchronously and propagates its exception (user_code_rethrow); retu…\n 'js:ParentNode.append', // Inserting an ancestor throws HierarchyRequestError; returns void; CEReactions custom element callbacks record…\n 'js:ParentNode.querySelector', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:ParentNode.querySelectorAll', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:ParentNode.replaceChildren', // Inserting an ancestor throws HierarchyRequestError; returns void; CEReactions custom element callbacks record…\n 'js:PerformanceObserver.observe', // All PerformanceObserverInit members optional, so observe() throws TypeError (also InvalidModificationError mi…\n 'js:Range.selectNodeContents', // Throws InvalidNodeTypeError for a DocumentType node (typed Node); returns void.\n 'js:Range.setEnd', // CheckNodeWOffset throws IndexSizeError for offset past node length and InvalidNodeTypeError for doctype; retu…\n 'js:Range.setStart', // CheckNodeWOffset throws IndexSizeError for offset past node length and InvalidNodeTypeError for doctype; retu…\n 'js:Selection.getRangeAt', // Throws IndexSizeError for index >= rangeCount; also returns null on a detached-window selection though typed …\n 'js:Storage.setItem', // QuotaExceededError when full and SecurityError on a removed-iframe Storage; returns void.\n 'js:SubtleCrypto.digest', // Returns Promise; rejects on unsupported algorithm (async); resolves ArrayBuffer as typed (IDL any, always Arr…\n 'js:SubtleCrypto.importKey', // Returns Promise; rejects on bad key data/usages (async); resolves CryptoKey as typed in all overloads.\n 'js:SubtleCrypto.sign', // Returns Promise; rejects on key/algorithm mismatch (async); resolves ArrayBuffer as typed (IDL any).\n 'js:TextDecoder', // Unknown or replacement encoding label in a plain string throws RangeError; the TextDecoder returned is genuin…\n 'js:TextDecoder.decode', // Throws TypeError on invalid bytes when the decoder was built fatal; returns a true string (content is not typ…\n 'js:TreeWalker.nextNode', // Filter exceptions are rethrown and reentrant calls throw InvalidStateError; Node | null matches IDL Node?.\n 'js:URL', // Invalid URL or base string throws TypeError; the URL returned is genuine.\n 'js:WebSocket', // distrust call (value: invalid or disallowed URL string throws SyntaxError/SecurityError; connect failures arr…\n 'js:Worker', // distrust call (environment: destroyed context throws InvalidAccessError; script-URL resolution/origin errors …\n 'js:Worker.postMessage', // Structured clone of any message or bad transfer list throws DataCloneError (RaisesException); returns void.\n 'js:btoa', // call distrust (value): non-Latin1 string throws InvalidCharacterError; type trust: always a string.\n 'js:fetch', // Returns a Promise that rejects on network failure (and RaisesException); Promise<Response> is a true type.\n 'js:structuredClone', // Throws DataCloneError for functions/uncloneable values, and the clone is not a T for class instances (prototy…\n];\n\nexport const WEB_TRUST_TYPE: readonly string[] = [\n 'js:AbortSignal.aborted', // Plain boolean read (abort_signal.h:99); boolean is exact, no failure path.\n 'js:AbortSignal.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:AbortSignal.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:AbstractRange.collapsed', // Plain boolean attribute, exact type (abstract_range.idl:14).\n 'js:AbstractRange.startContainer', // Always a Node (abstract_range.idl:10), non-nullable in IDL and TS.\n 'js:AbstractRange.startOffset', // unsigned long maps to number (abstract_range.idl:11).\n 'js:AnimationFrameProvider.requestAnimationFrame', // call trust: callback is only scheduled, never run synchronously, no ExceptionState (local_dom_window.cc:1973)…\n 'js:Attr.name', // call n/a (attribute); type trust: readonly DOMString name is always a string.\n 'js:Attr.value', // call n/a (attribute); type trust: DOMString value is always a string (content is not type); read cannot throw…\n 'js:AudioBuffer.getChannelData', // distrust call (value: channel index >= numberOfChannels throws IndexSizeError); type trust: returns the Float…\n 'js:AudioBufferSourceNode.buffer', // call n/a (attribute); type trust: getter returns AudioBuffer or null as declared; the setter throws InvalidSt…\n 'js:AudioContext.resume', // distrust call (async: returns a Promise that rejects on a closed context); type trust: Promise<void> matches …\n 'js:AudioNode.connect', // distrust call (value: bad output/input index throws IndexSizeError; cross-context destination throws InvalidA…\n 'js:AudioParam.exponentialRampToValueAtTime', // Throws RangeError on 0 value or negative time, TypeError on NaN, NotSupportedError on curve overlap; returns …\n 'js:AudioParam.setValueAtTime', // Throws RangeError on negative time, TypeError on NaN, NotSupportedError on curve overlap; returns this, Audio…\n 'js:AudioParam.value', // Read is a plain float typed number (the audited use is a write, whose setter can raise NotSupportedError duri…\n 'js:BaseAudioContext.createBiquadFilter', // web ignores: NotAllowedError only on a context kept from a removed iframe\n 'js:BaseAudioContext.createBuffer', // call distrust: NotSupportedError for typed numbers out of range (0 channels/frames, bad sample rate); type tr…\n 'js:BaseAudioContext.createBufferSource', // call trust: AudioBufferSourceNode::Create only constructs the node and never touches ExceptionState; type tru…\n 'js:BaseAudioContext.createDynamicsCompressor', // call trust: DynamicsCompressorNode::Create only constructs the node and never touches ExceptionState; type tr…\n 'js:BaseAudioContext.createGain', // call trust: GainNode::Create only constructs the node and never touches ExceptionState; type trust: returns t…\n 'js:BaseAudioContext.createOscillator', // call trust: OscillatorNode::Create only constructs the node and never touches ExceptionState; type trust: ret…\n 'js:BaseAudioContext.currentTime', // call n/a (attribute); type trust: IDL double, TS number.\n 'js:BaseAudioContext.destination', // call n/a (attribute); type trust: non-nullable AudioDestinationNode returned from destination_node_ (base_aud…\n 'js:BaseAudioContext.sampleRate', // call n/a (attribute); type trust: IDL float, TS number.\n 'js:BaseAudioContext.state', // call n/a (attribute); type trust: IDL enum suspended/running/closed is within TS AudioContextState (base_audi…\n 'js:BiquadFilterNode.Q', // Read of non-null AudioParam (IDL non-nullable, TS AudioParam); getter cannot throw; type trusted.\n 'js:BiquadFilterNode.frequency', // Read of non-null AudioParam (IDL non-nullable, TS AudioParam); getter cannot throw; type trusted.\n 'js:BiquadFilterNode.type', // BiquadFilterType enum matches the TS 8-value union exactly; getter cannot throw; type trusted (usage is write…\n 'js:Blob.arrayBuffer', // Promise can reject (BlobFileReaderClient::DidFail rejects) so call distrust (async); Promise<ArrayBuffer> is …\n 'js:Blob.size', // unsigned long long maps to number; getter cannot throw; type trusted.\n 'js:Blob.type', // DOMString maps to string; getter cannot throw; type trusted.\n 'js:Body.text', // Returns a Promise that rejects on used or errored body so call distrust (async); Promise<string> (USVString) …\n 'js:CSS.escape', // SerializeIdentifier over any string never throws (NUL becomes U+FFFD) and returns a string.\n 'js:CSSStyleDeclaration.borderBottomWidth', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.borderTopWidth', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.clipPath', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.colorScheme', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.contentVisibility', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.display', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.fontSize', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.getPropertyValue', // getPropertyValue(DOMString) has no ExceptionState and returns empty string for unknown names; always a string…\n 'js:CSSStyleDeclaration.height', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.inset', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.lineHeight', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.marginBottom', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.marginTop', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.minHeight', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.opacity', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.overflow', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.overflowX', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.overflowY', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.paddingBottom', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.paddingTop', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.pointerEvents', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.position', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.removeProperty', // Throws NoModificationAllowedError on a computed-style receiver (state); returns exact string; CEReactions hoo…\n 'js:CSSStyleDeclaration.transform', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.transition', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.userSelect', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.visibility', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.width', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CaretPosition.offset', // unsigned long maps to number; getter cannot throw; type trusted.\n 'js:CaretPosition.offsetNode', // IDL Node is non-nullable, TS Node; getter cannot throw; type trusted.\n 'js:CharacterData.data', // DOMString (null coerces to empty string on write) maps to string; getter cannot throw; content is not type, s…\n 'js:CharacterData.ownerDocument', // Node.ownerDocument is null only for a Document (node.cc:1917); a CharacterData always has one so TS Document …\n 'js:Clipboard.writeText', // Returns Promise that rejects NotAllowedError when unfocused or permission denied; resolves undefined, true to…\n 'js:ClipboardEvent.clipboardData', // Plain nullable getter, IDL DataTransfer? matches DataTransfer | null; cannot throw.\n 'js:Crypto.getRandomValues', // Throws TypeMismatchError for Float arrays/DataView and QuotaExceededError above 65536 bytes; returns the same…\n 'js:Crypto.randomUUID', // No ExceptionState, always a canonical 4-dash UUID string matching the template type; SecureContext assumed pe…\n 'js:Crypto.subtle', // Lazy getter returns a SubtleCrypto, cannot throw; only undefined on insecure contexts, which rubric excludes.\n 'js:DOMRect.height', // unrestricted double maps to number, including NaN/Infinity (dom_rect.idl:20); reading never throws.\n 'js:DOMRect.width', // unrestricted double maps to number, including NaN/Infinity (dom_rect.idl:19); reading never throws.\n 'js:DOMRectReadOnly.bottom', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.height', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.left', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.right', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.top', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.width', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.x', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.y', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMTokenList.contains', // No RaisesException; any string just does a set lookup and returns boolean.\n 'js:DataTransfer.dropEffect', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransfer.files', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransfer.items', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransfer.types', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransferItem.getAsFile', // getAsFile has no ExceptionState and returns File? matching File | null; trust/trust.\n 'js:DataTransferItem.kind', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransferItemList.add', // add(data,type) throws NotSupportedError when an item of that type already exists (state); DataTransferItem | …\n 'js:Document.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Document.caretPositionFromPoint', // call distrust: typed NaN/Infinity into non-unrestricted float throws TypeError; type trust: CaretPosition|nul…\n 'js:Document.caretRangeFromPoint', // call trust: long args coerce NaN to 0, no ExceptionState (document.cc:1697); type trust: Range|null matches I…\n 'js:Document.createElement', // web ignores: plain Element only in a non-HTML (XML) document\n 'js:Document.createRange', // trust/trust: createRange() always returns a new Range (document.cc:2064), no ExceptionState.\n 'js:Document.createTreeWalker', // trust/trust: non-null Node root, unsigned long whatToShow without EnforceRange wraps NaN; filter not invoked …\n 'js:Document.defaultView', // type trust: IDL Window? maps to (WindowProxy & typeof globalThis) | null, null for detached/no-browsing-conte…\n 'js:Document.execCommand', // web ignores: insertHTML throws only under an enforced Trusted Types CSP\n 'js:Document.getSelection', // Returns the selection or null for a frameless document, never throws; Selection | null is exact (tree_scope.c…\n 'js:Document.hasFocus', // Pure boolean query on page focus state (document.cc:8546), no failure path; boolean is exact.\n 'js:Document.hidden', // Plain boolean from page visibility (document.cc:1973); getter does not throw.\n 'js:Document.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Document.visibilityState', // Blink enum is exactly hidden|visible (document.idl:25) matching DocumentVisibilityState (lib.dom.d.ts:39288).\n 'js:DocumentOrShadowRoot.activeElement', // Returns focused element, body or null (tree_scope.cc:626-630); Element | null is exact.\n 'js:DocumentOrShadowRoot.elementFromPoint', // NaN/Infinity into plain double x,y throws TypeError (idl:15); result Element | null is exact (tree_scope.cc:2…\n 'js:DragEvent.dataTransfer', // IDL DataTransfer? matches TS DataTransfer | null; getter cannot throw.\n 'js:DynamicsCompressorNode.attack', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:DynamicsCompressorNode.ratio', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:DynamicsCompressorNode.release', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:DynamicsCompressorNode.threshold', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:Element.attributes', // NamedNodeMap [SameObject] is exact; read cannot fail.\n 'js:Element.classList', // DOMTokenList [SameObject] is exact; read cannot fail.\n 'js:Element.className', // DOMString reflect of class is always a string; CEReactions hook on write only.\n 'js:Element.clientHeight', // long -> number; always returns an int, 0 when detached.\n 'js:Element.clientWidth', // long -> number; always returns an int, 0 when detached.\n 'js:Element.getAttribute', // No RaisesException; any string name is accepted; string | null is exact.\n 'js:Element.getBoundingClientRect', // Always returns a DOMRect even when detached; no failure path.\n 'js:Element.hasAttribute', // No RaisesException; boolean result is exact for any string name.\n 'js:Element.hasPointerCapture', // Plain long (no EnforceRange, NaN->0), no RaisesException; returns boolean.\n 'js:Element.id', // DOMString reflect of id is always a string; CEReactions hook on write only.\n 'js:Element.innerHTML', // Always a string; only the setter raises (RaisesException=Setter), the getter does not in Blink; CEReactions o…\n 'js:Element.matches', // matches('[') throws SyntaxError via SelectorQueryCache::Add; boolean return is exact.\n 'js:Element.outerHTML', // Getter serializes to a true string without throwing; setter has CEReactions (recorded).\n 'js:Element.ownerDocument', // IDL Document? is null only for Document nodes; a genuine Element always has one, so TS Document is true.\n 'js:Element.scrollHeight', // long in IDL, number in TS; layout read cannot fail.\n 'js:Element.scrollLeft', // unrestricted double to number; read and write cannot throw.\n 'js:Element.scrollTop', // unrestricted double to number; read and write cannot throw.\n 'js:Element.scrollWidth', // long in IDL, number in TS; layout read cannot fail.\n 'js:Element.tagName', // attribute: IDL DOMString, TS string; always a string, no throw.\n 'js:Element.textContent', // attribute on Element: getter never returns null for an Element (null only for Document/DocumentType), so TS s…\n 'js:ElementCSSInlineStyle.style', // attribute: [SameObject] CSSStyleDeclaration non-nullable on every genuine receiver; TS CSSStyleDeclaration is…\n 'js:ElementContentEditable.isContentEditable', // attribute: IDL boolean, TS boolean; always a boolean.\n 'js:ErrorEvent.colno', // attribute: IDL unsigned long, TS number; always a number.\n 'js:ErrorEvent.filename', // attribute: IDL DOMString, TS string; always a string.\n 'js:ErrorEvent.lineno', // attribute: IDL unsigned long, TS number; always a number.\n 'js:ErrorEvent.message', // attribute: IDL DOMString, TS string; always a string.\n 'js:Event.CAPTURING_PHASE', // Constant 1 matches TS literal 1 and IDL const; no failure.\n 'js:Event.cancelable', // Read-only boolean, TS boolean matches IDL boolean; getter cannot throw.\n 'js:Event.composedPath', // No exception state; returns sequence<EventTarget> matching EventTarget[].\n 'js:Event.currentTarget', // IDL EventTarget? matches TS EventTarget | null; getter cannot throw.\n 'js:Event.defaultPrevented', // Read-only boolean matching TS boolean; no failure.\n 'js:Event.eventPhase', // unsigned short matches TS number; no failure.\n 'js:Event.target', // IDL EventTarget? matches TS EventTarget | null; getter cannot throw.\n 'js:Event.type', // DOMString matches TS string; no failure.\n 'js:EventTarget.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:EventTarget.dispatchEvent', // Re-dispatching an in-flight event throws InvalidStateError; listener throws are reported not rethrown; boolea…\n 'js:File.name', // call n/a; type trust: DOMString name is a true string.\n 'js:FontFaceSet.ready', // call n/a; type trust: Promise<FontFaceSet> only ever resolves with the set (font_face_set.cc:283), never reje…\n 'js:FontFaceSource.fonts', // call n/a; type trust: non-nullable FontFaceSet in IDL and TS.\n 'js:FrameRequestCallback', // web only: the browser calls it with objects it created; a hand-made call is a type_unsound hook\n 'js:GainNode.gain', // call n/a; type trust: readonly AudioParam, always present.\n 'js:GlobalEventHandlers.onclick', // call n/a; type trust: handler-or-null round trip (the callback's `any` return is the caller's own function); …\n 'js:HTMLButtonElement.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLButtonElement.disabled', // call n/a; type trust: reflected boolean (CEReactions custom_element hook only on write).\n 'js:HTMLButtonElement.type', // call n/a; type trust: getter returns only submit|reset|button (html_button_element.cc type_ enum), matching t…\n 'js:HTMLCollectionBase.item', // call trust: unsigned long index wraps without EnforceRange so no throw; type trust: Element | null is exact.\n 'js:HTMLCollectionBase.length', // call n/a; type trust: unsigned long is a number.\n 'js:HTMLDetailsElement.open', // call n/a; type trust: reflected boolean.\n 'js:HTMLDivElement.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLDivElement.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLElement.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLElement.offsetHeight', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.offsetLeft', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.offsetTop', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.offsetWidth', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:HTMLImageElement.alt', // Attribute read only; reflected DOMString is always a string, matches `string`.\n 'js:HTMLImageElement.complete', // Attribute read only; IDL boolean matches `boolean`.\n 'js:HTMLImageElement.currentSrc', // Attribute read only; DOMString (empty when none) matches `string`.\n 'js:HTMLImageElement.naturalHeight', // Attribute read only; unsigned long matches `number`.\n 'js:HTMLImageElement.naturalWidth', // Attribute read only; unsigned long matches `number`.\n 'js:HTMLInputElement.checked', // boolean in IDL and TS; read cannot throw.\n 'js:HTMLInputElement.disabled', // Reflected boolean; getter cannot throw; CEReactions only on setter.\n 'js:HTMLInputElement.files', // FileList? in IDL matches FileList | null in TS; read cannot throw.\n 'js:HTMLInputElement.selectionEnd', // Getter returns null when type lacks selection API, never throws (RaisesException is for the setter path); uns…\n 'js:HTMLInputElement.selectionStart', // Getter returns null when type lacks selection API, never throws; unsigned long? matches number | null.\n 'js:HTMLInputElement.value', // DOMString getter always a string (content is not type); CEReactions/RaisesException are setter-side.\n 'js:HTMLInputElement.valueAsNumber', // unrestricted double read yields number (NaN included); getter cannot throw.\n 'js:HTMLOrSVGElement.dataset', // SameObject DOMStringMap always returned; read cannot throw.\n 'js:HTMLSelectElement.value', // DOMString getter always a string; read cannot throw.\n 'js:HTMLTemplateElement.content', // web ignores: null only for a template whose document was detached before content was read\n 'js:HTMLTextAreaElement.selectionStart', // Textarea selectionStart is non-nullable unsigned long (unlike input) so number is exact; getter cannot throw.\n 'js:HTMLTextAreaElement.value', // Value is a plain DOMString so string is exact (content is not type); getter cannot throw; setter is CEReactio…\n 'js:ImportMeta.url', // import.meta.url is always the module URL string (HostGetImportMetaProperties); getter cannot throw.\n 'js:IntersectionObserverCallback', // web only: the browser calls it with objects it created; a hand-made call is a type_unsound hook\n 'js:IntersectionObserverEntry.isIntersecting', // boolean in IDL and TS; plain getter.\n 'js:KeyboardEvent.altKey', // Plain readonly boolean modifier flag in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.code', // Plain readonly DOMString in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.ctrlKey', // Plain readonly boolean in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.key', // Plain readonly DOMString in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.metaKey', // Plain readonly boolean in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.shiftKey', // Plain readonly boolean in IDL and TS; no failure path (call n/a, type trust).\n 'js:Location.host', // USVString getter on a genuine same-origin Location never throws (RaisesException is Setter only); string is e…\n 'js:Location.origin', // readonly USVString; no failure path; string is exact.\n 'js:MediaQueryList.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:MediaQueryList.matches', // readonly boolean; no failure path (call n/a, type trust).\n 'js:MediaQueryList.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:MediaQueryListEvent.matches', // boolean in IDL and TS; always a true boolean.\n 'js:MessageEventTarget.onmessage', // Write-only in the UI; reading yields the handler function or null, both match the declared type (the any is t…\n 'js:MouseEvent.button', // short in IDL, number in TS; always a number.\n 'js:MouseEvent.clientX', // double in IDL, number in TS.\n 'js:MouseEvent.clientY', // double in IDL, number in TS.\n 'js:MouseEvent.ctrlKey', // boolean in IDL and TS.\n 'js:MouseEvent.metaKey', // boolean in IDL and TS.\n 'js:MouseEvent.shiftKey', // boolean in IDL and TS.\n 'js:MutationCallback', // web only: the browser calls it with objects it created; a hand-made call is a type_unsound hook\n 'js:MutationObserver.takeRecords', // No ExceptionState; always returns a fresh MutationRecord[] (possibly empty).\n 'js:MutationRecord.addedNodes', // Attribute read: call n/a; type trusted: NodeList is always returned (SameObject, never null).\n 'js:MutationRecord.attributeName', // Attribute read: call n/a; type trusted: DOMString? matches string | null.\n 'js:MutationRecord.oldValue', // Attribute read: call n/a; type trusted: DOMString? matches string | null.\n 'js:MutationRecord.removedNodes', // Attribute read: call n/a; type trusted: NodeList is always returned (SameObject, never null).\n 'js:MutationRecord.target', // Attribute read: call n/a; type trusted: non-nullable Node in IDL and TS.\n 'js:MutationRecord.type', // Attribute read: call n/a; type trusted: IDL DOMString only ever holds attributes|characterData|childList, mat…\n 'js:Navigator.clipboard', // Attribute read: call n/a; type trusted: SameObject Clipboard exposed in secure contexts, matches TS; absent (…\n 'js:NavigatorConcurrentHardware.hardwareConcurrency', // Attribute read: call n/a; type trusted: unsigned long long reads as a number.\n 'js:NavigatorID.platform', // Attribute read: call n/a; type trusted: DOMString is a string.\n 'js:NavigatorID.userAgent', // Attribute read: call n/a; type trusted: DOMString is a string.\n 'js:Node.ELEMENT_NODE', // Constant 1 matches literal type 1.\n 'js:Node.TEXT_NODE', // Constant 3 matches literal type 3.\n 'js:Node.appendChild', // Throws HierarchyRequestError for ancestor/invalid parent; returns the same node T (type true); custom element…\n 'js:Node.childNodes', // NodeList of Element/Text/Comment/PI/DocumentType children, all ChildNode; same-object, cannot throw.\n 'js:Node.contains', // Pure tree walk accepting Node|null; returns boolean, no failure path.\n 'js:Node.insertBefore', // Throws NotFoundError/HierarchyRequestError on bad child or ancestor; returns inserted node T (true); custom e…\n 'js:Node.isConnected', // IDL boolean to TS boolean, no failure path.\n 'js:Node.nextSibling', // Node? sibling is always a ChildNode (Element/CharacterData/DocumentType) or null.\n 'js:Node.nodeType', // unsigned short to number.\n 'js:Node.parentNode', // Parent is Element, Document or DocumentFragment, all ParentNode, or null.\n 'js:Node.replaceChild', // Throws NotFoundError/HierarchyRequestError; returns the replaced child T (true); custom element reactions rec…\n 'js:Node.textContent', // Getter returns DOMString? (string|null) matching TS; setter [RaisesException]/CEReactions not exercised by re…\n 'js:NodeFilter.SHOW_TEXT', // Constant 0x4 in IDL equals TS literal 0x4; cannot fail.\n 'js:NodeList.length', // unsigned long length is a number; cannot fail.\n 'js:NonDocumentTypeChildNode.nextElementSibling', // Element? matches TS Element | null; cannot fail.\n 'js:NonDocumentTypeChildNode.previousElementSibling', // Element? matches TS Element | null; cannot fail.\n 'js:OscillatorNode.frequency', // Readonly AudioParam attribute always present; cannot fail.\n 'js:OscillatorNode.type', // Getter returns OscillatorType matching TS union; setter can throw InvalidStateError for \"custom\" (setter only…\n 'js:PageTransitionEvent.persisted', // boolean matches TS boolean; cannot fail.\n 'js:ParentNode.children', // HTMLCollection is the IDL type and the TS type; never null.\n 'js:ParentNode.lastElementChild', // IDL Element? matches TS Element | null.\n 'js:Performance.now', // No ExceptionState, returns a double always; DOMHighResTimeStamp is number.\n 'js:Performance.timeOrigin', // DOMHighResTimeStamp is a number; no failure.\n 'js:PerformanceEntry.duration', // DOMHighResTimeStamp is a number; no failure.\n 'js:PerformanceObserverCallback', // web only: the browser calls it with objects it created; a hand-made call is a type_unsound hook\n 'js:PerformanceObserverEntryList.getEntries', // No exception path; returns PerformanceEntry sequence matching PerformanceEntryList.\n 'js:PointerEvent.pointerId', // long in IDL, number in TS; plain getter on a genuine PointerEvent, cannot throw.\n 'js:Range.getBoundingClientRect', // Always builds a DOMRect (empty for collapsed/detached ranges); no throw path.\n 'js:Range.intersectsNode', // Only throw is the null-node TypeError that TS rejects; foreign-root nodes return false; boolean is exact.\n 'js:Range.toString', // Stringifier concatenates text node data into a string; no ExceptionState, always a string.\n 'js:ResizeObserverCallback', // web only: the browser calls it with objects it created; a hand-made call is a type_unsound hook\n 'js:ResizeObserverEntry.contentRect', // Readonly DOMRectReadOnly attribute, always set; no throw, type exact.\n 'js:ResizeObserverEntry.target', // Readonly Element attribute, always set; no throw, type exact.\n 'js:Selection.anchorNode', // Node? attribute matches Node | null; getter does not throw.\n 'js:Selection.focusNode', // Node? attribute matches Node | null; getter does not throw.\n 'js:Selection.getRangeAt', // web ignores: null only when the selection's window is detached (IndexSizeError stays normal)\n 'js:Selection.isCollapsed', // boolean attribute, true or false; no throw, type exact.\n 'js:Selection.rangeCount', // unsigned long maps to number; no throw, type exact.\n 'js:Storage.getItem', // web ignores: SecurityError only on a Storage kept from a removed iframe\n 'js:SubtleCrypto.digest', // Returns Promise; rejects on unsupported algorithm (async); resolves ArrayBuffer as typed (IDL any, always Arr…\n 'js:SubtleCrypto.importKey', // Returns Promise; rejects on bad key data/usages (async); resolves CryptoKey as typed in all overloads.\n 'js:SubtleCrypto.sign', // Returns Promise; rejects on key/algorithm mismatch (async); resolves ArrayBuffer as typed (IDL any).\n 'js:TextDecoder.decode', // Throws TypeError on invalid bytes when the decoder was built fatal; returns a true string (content is not typ…\n 'js:TextEncoder.encode', // USVString is lossy-converted so no throw; only allocation failure (text_encoder.cc:85, resource limit, not co…\n 'js:Touch.clientX', // IDL double, TS number; plain read.\n 'js:Touch.clientY', // IDL double, TS number; plain read.\n 'js:TouchEvent.touches', // IDL non-nullable TouchList, TS TouchList; plain read.\n 'js:TransitionEvent.propertyName', // IDL DOMString, TS string; plain read.\n 'js:TreeWalker.nextNode', // Filter exceptions are rethrown and reentrant calls throw InvalidStateError; Node | null matches IDL Node?.\n 'js:UIEvent.detail', // IDL long, TS number; plain read.\n 'js:URL.createObjectURL', // IDL says RaisesException but URLFileAPI::createObjectURL and the MediaSource path never throw (closed context…\n 'js:URL.host', // USVString getter returns a string; no throw.\n 'js:URL.hostname', // USVString getter returns a string; no throw.\n 'js:URL.pathname', // USVString getter returns a string; no throw.\n 'js:URL.search', // USVString getter returns a string; no throw.\n 'js:VisualViewport.height', // double in IDL, number in TS; detached frames report 0.\n 'js:VisualViewport.offsetTop', // double in IDL, number in TS; detached frames report 0.\n 'js:VisualViewport.width', // double in IDL, number in TS; detached frames report 0.\n 'js:WebSocket.OPEN', // const unsigned short = 1 in IDL, literal 1 in TS.\n 'js:WebSocket.readyState', // unsigned short in IDL, number in TS.\n 'js:WheelEvent.deltaMode', // Attribute read of IDL unsigned long (0/1/2) on a genuine WheelEvent; TS number is exact; no failure path.\n 'js:WheelEvent.deltaX', // Attribute read of IDL double on a genuine WheelEvent; TS number is exact; no failure path.\n 'js:WheelEvent.deltaY', // Attribute read of IDL double on a genuine WheelEvent; TS number is exact; no failure path.\n 'js:Window.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Window.confirm', // Returns false when detached or sandboxed without allow-modals (console error only), never throws; boolean exa…\n 'js:Window.devicePixelRatio', // double in IDL, number in TS; returns 0.0 when detached, no throw.\n 'js:Window.getComputedStyle', // Always returns a CSSComputedStyleDeclaration (invalid pseudo gives empty style), no ExceptionState; non-null …\n 'js:Window.history', // Blink getter always returns a History object (no RaisesException); non-null type true.\n 'js:Window.innerHeight', // long in IDL, number in TS; 0 when detached.\n 'js:Window.innerWidth', // long in IDL, number in TS; 0 when detached.\n 'js:Window.matchMedia', // web ignores: null only when the window's document is detached\n 'js:Window.prompt', // Returns null/empty when detached or sandboxed, never throws; string | null matches IDL DOMString?.\n 'js:Window.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Window.visualViewport', // IDL non-null, TS declares VisualViewport | null (wider, true); getter returns a stored pointer.\n 'js:WindowOrWorkerGlobalScope.setInterval', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:WindowOrWorkerGlobalScope.setTimeout', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:Worker.addEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:Worker.removeEventListener', // listener parameters are the event-map event; a synthetic event is a recorded type_unsound hook (RUBRIC.md)\n 'js:btoa', // call distrust (value): non-Latin1 string throws InvalidCharacterError; type trust: always a string.\n 'js:confirm', // call trust: sandboxed or detached window returns false without throwing; type trust: boolean.\n 'js:console', // attribute read of the Replaceable Console object on a genuine window; type `Console` is true.\n 'js:crossOriginIsolated', // attribute read returns a boolean from CrossOriginIsolatedCapability; type `boolean` is exact.\n 'js:crypto', // attribute read lazily creates and returns a Crypto object, never null; type `Crypto` is true.\n 'js:devicePixelRatio', // double in IDL, number in TS; returns 0.0 when frameless, still a number.\n 'js:document', // Non-null Document on a genuine same-origin window (document_ only cleared on window reuse); cross-origin Wind…\n 'js:fetch', // Returns a Promise that rejects on network failure (and RaisesException); Promise<Response> is a true type.\n 'js:getComputedStyle', // getComputedStyle has no ExceptionState and always returns a CSSStyleDeclaration (empty for unknown pseudo-ele…\n 'js:history', // LocalDOMWindow::history lazily creates a History, never null; cross-origin access would throw only with a non…\n 'js:innerHeight', // long in IDL, number in TS.\n 'js:innerWidth', // long in IDL, number in TS.\n 'js:location', // Window.location is a non-null LegacyUnforgeable Location; the getter never throws or returns null on a genuin…\n 'js:matchMedia', // matchMedia(string) returns a new MediaQueryList for any string (unparsable queries yield \"not all\"), no Excep…\n 'js:navigator', // Window.navigator lazily creates and returns a non-null Navigator; no throw.\n 'js:performance', // Window.performance is a Replaceable readonly Performance attribute, non-null on a genuine window; getter does…\n 'js:prompt', // Blink prompt() has no ExceptionState and returns null when sandboxed/no page; string|null is exact (note: Ele…\n 'js:requestAnimationFrame', // Schedules the callback for later and returns a long id; no ExceptionState, nothing rethrown; number is exact.\n 'js:requestIdleCallback', // No RaisesException and IdleRequestOptions.timeout is a plain unsigned long (no EnforceRange); returns a numbe…\n 'js:self', // Replaceable Window self returns the window proxy; typed Window in lib.dom (judged on a genuine Window receive…\n 'js:sessionStorage', // web ignores: null only when DOM storage is disabled by the browser configuration\n 'js:setInterval', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:setTimeout', // web ignores: string handler throws only under an enforced Trusted Types CSP\n 'js:visualViewport', // Always returns the window DOMVisualViewport; declared VisualViewport | null is at least as wide.\n 'js:window', // web ignores: null only when read through a Window whose frame was removed\n];\n\nexport const WEB_DISTRUST_TYPE: readonly string[] = [\n 'js:AbstractWorker.onerror', // Declared handler type contains any in its return; ErrorEvent parameter can be a synthetic Event (type_unsound…\n 'js:Body.json', // return type contains any\n 'js:CustomEvent', // Constructor cannot throw (no ExceptionState); explicit <T> with no init makes detail null, so type is a cast.\n 'js:CustomEvent.detail', // Attribute read; typed `any` (IDL any, caller-defined payload via generic T) so type distrust.\n 'js:Document.body', // type distrust: IDL HTMLElement? can be null (e.g. after body.remove()) but TS says HTMLElement; getter itself…\n 'js:Document.documentElement', // type distrust: IDL Element? but TS declares non-null HTMLElement; getter never throws.\n 'js:Document.getElementById', // call trust: lookup returns null when absent (tree_scope.cc:113), never throws; type distrust: IDL Element? bu…\n 'js:Document.getElementsByTagName', // call trust: no ExceptionState, always returns a live HTMLCollection; type distrust: tag-name maps ignore name…\n 'js:Element.closest', // closest('[') throws SyntaxError (value); <E> overload is a cast and tag-name overload ignores SVG/MathML name…\n 'js:Element.prototype', // Interface prototype object typed as an Element instance; getters throw TypeError.\n 'js:ErrorEvent.error', // declared type contains any\n 'js:HTMLElement.hidden', // Getter returns \"until-found\" (string) but TS declares boolean; setter is CEReactions (recorded hook).\n 'js:HTMLElement.prototype', // Prototype object is typed as an instance but is not a genuine HTMLElement (Illegal invocation on most members…\n 'js:History.state', // declared type contains any\n 'js:MessageEvent.data', // Never throws; data is declared any (T defaults to any) and carries cross-context structured-clone data.\n 'js:Node.parentElement', // IDL returns Element?, so an SVG/MathML parent is not an HTMLElement; TS declaration is too narrow.\n 'js:ParentNode.querySelector', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:ParentNode.querySelectorAll', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:PromiseRejectionEvent.reason', // declared type contains any\n 'js:structuredClone', // Throws DataCloneError for functions/uncloneable values, and the clone is not a T for class instances (prototy…\n];\n\nexport const WEB_STRICT_TRUST: readonly string[] = [\n 'js:AbortSignal.addEventListener', // Inherited EventTarget.addEventListener only registers the listener, no throw; void; event-map type_unsound ho…\n 'js:AbortSignal.removeEventListener', // Inherited EventTarget.removeEventListener ignores unknown listeners, no throw; returns void.\n 'js:AnimationFrameProvider.cancelAnimationFrame', // call trust: no ExceptionState, unknown handle is ignored (LocalDOMWindow::cancelAnimationFrame at local_dom_w…\n 'js:AnimationFrameProvider.requestAnimationFrame', // call trust: callback is only scheduled, never run synchronously, no ExceptionState (local_dom_window.cc:1973)…\n 'js:BaseAudioContext.createBufferSource', // call trust: AudioBufferSourceNode::Create only constructs the node and never touches ExceptionState; type tru…\n 'js:BaseAudioContext.createDynamicsCompressor', // call trust: DynamicsCompressorNode::Create only constructs the node and never touches ExceptionState; type tr…\n 'js:BaseAudioContext.createGain', // call trust: GainNode::Create only constructs the node and never touches ExceptionState; type trust: returns t…\n 'js:BaseAudioContext.createOscillator', // call trust: OscillatorNode::Create only constructs the node and never touches ExceptionState; type trust: ret…\n 'js:CSS.escape', // SerializeIdentifier over any string never throws (NUL becomes U+FFFD) and returns a string.\n 'js:CSSStyleDeclaration.getPropertyValue', // getPropertyValue(DOMString) has no ExceptionState and returns empty string for unknown names; always a string…\n 'js:Console.debug', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Console.error', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Console.info', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Console.warn', // Console log never throws or rejects for any args (V8 delegate, warnings are not failures); returns void.\n 'js:Crypto.randomUUID', // No ExceptionState, always a canonical 4-dash UUID string matching the template type; SecureContext assumed pe…\n 'js:DOMTokenList.contains', // No RaisesException; any string just does a set lookup and returns boolean.\n 'js:DataTransferItem.getAsFile', // getAsFile has no ExceptionState and returns File? matching File | null; trust/trust.\n 'js:Document.addEventListener', // call trust: null listener is ignored (event_target.cc:585), no throw/async failure; type n/a (void); event-ma…\n 'js:Document.caretRangeFromPoint', // call trust: long args coerce NaN to 0, no ExceptionState (document.cc:1697); type trust: Range|null matches I…\n 'js:Document.createRange', // trust/trust: createRange() always returns a new Range (document.cc:2064), no ExceptionState.\n 'js:Document.createTreeWalker', // trust/trust: non-null Node root, unsigned long whatToShow without EnforceRange wraps NaN; filter not invoked …\n 'js:Document.getElementById', // call trust: lookup returns null when absent (tree_scope.cc:113), never throws; type distrust: IDL Element? bu…\n 'js:Document.getElementsByTagName', // call trust: no ExceptionState, always returns a live HTMLCollection; type distrust: tag-name maps ignore name…\n 'js:Document.getSelection', // Returns the selection or null for a frameless document, never throws; Selection | null is exact (tree_scope.c…\n 'js:Document.hasFocus', // Pure boolean query on page focus state (document.cc:8546), no failure path; boolean is exact.\n 'js:Document.removeEventListener', // Removes a matching listener or does nothing, no ExceptionState (event_target.idl:33); void return.\n 'js:Element.getAttribute', // No RaisesException; any string name is accepted; string | null is exact.\n 'js:Element.getBoundingClientRect', // Always returns a DOMRect even when detached; no failure path.\n 'js:Element.hasAttribute', // No RaisesException; boolean result is exact for any string name.\n 'js:Element.hasPointerCapture', // Plain long (no EnforceRange, NaN->0), no RaisesException; returns boolean.\n 'js:Element.removeAttribute', // No failure path for any name; void; CEReactions recorded as hook.\n 'js:Element.scrollIntoView', // No RaisesException; typed boolean or options cannot fail; void.\n 'js:Element.scrollTo', // Unrestricted doubles and options dictionary cannot throw; void.\n 'js:Event.composedPath', // No exception state; returns sequence<EventTarget> matching EventTarget[].\n 'js:Event.preventDefault', // Sets canceled flag only; returns void; no failure path.\n 'js:Event.stopPropagation', // Sets stop-propagation flag only; returns void; no failure path.\n 'js:EventTarget.addEventListener', // Ignores duplicate listeners, no ExceptionState; returns void; event-map type hole recorded as type_unsound.\n 'js:HTMLButtonElement.addEventListener', // call trust: duplicate/aborted-signal registrations are ignored silently, void return; event-map type_unsound …\n 'js:HTMLCollectionBase.item', // call trust: unsigned long index wraps without EnforceRange so no throw; type trust: Element | null is exact.\n 'js:HTMLDivElement.addEventListener', // addEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; event…\n 'js:HTMLDivElement.removeEventListener', // removeEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; no…\n 'js:HTMLElement.addEventListener', // addEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; event…\n 'js:HTMLElement.click', // click() dispatches a simulated click with no ExceptionState; listener throws are reported not rethrown; retur…\n 'js:HTMLElement.removeEventListener', // removeEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; no…\n 'js:HTMLInputElement.select', // select() calls setSelectionRange + Focus with no ExceptionState; no failure path; returns void.\n 'js:HTMLOrSVGElement.blur', // blur() is a no-throw focus-state change; returns void.\n 'js:HTMLOrSVGElement.focus', // focusForBindings has no ExceptionState; FocusOptions dictionary cannot throw on typed input; returns void.\n 'js:HTMLTextAreaElement.select', // select() has no ExceptionState and just sets the selection range (text_control_element.cc:272); returns void.\n 'js:HTMLTextAreaElement.setSelectionRange', // setSelectionRangeForBinding takes no ExceptionState; unsigned long args wrap (null/NaN to 0, no EnforceRange)…\n 'js:IntersectionObserver.disconnect', // IDL says RaisesException but disconnect(ExceptionState&) never touches it and only clears observations; retur…\n 'js:IntersectionObserver.observe', // IDL says RaisesException but observe(Element*, ExceptionState&) never raises; duplicate or detached target is…\n 'js:MediaQueryList.addEventListener', // addEventListener ignores null/duplicate listeners and has no ExceptionState; returns void.\n 'js:MediaQueryList.removeEventListener', // removeEventListener ignores null/duplicate listeners and has no ExceptionState; returns void.\n 'js:MutationObserver.disconnect', // Clears registrations and records; no ExceptionState, returns void.\n 'js:MutationObserver.takeRecords', // No ExceptionState; always returns a fresh MutationRecord[] (possibly empty).\n 'js:Node.contains', // Pure tree walk accepting Node|null; returns boolean, no failure path.\n 'js:Performance.now', // No ExceptionState, returns a double always; DOMHighResTimeStamp is number.\n 'js:PerformanceObserver.disconnect', // Clears observer state; no ExceptionState; returns void.\n 'js:PerformanceObserverEntryList.getEntries', // No exception path; returns PerformanceEntry sequence matching PerformanceEntryList.\n 'js:Range.collapse', // Moves one boundary to the other; no ExceptionState, optional boolean cannot fail; returns void.\n 'js:Range.getBoundingClientRect', // Always builds a DOMRect (empty for collapsed/detached ranges); no throw path.\n 'js:Range.intersectsNode', // Only throw is the null-node TypeError that TS rejects; foreign-root nodes return false; boolean is exact.\n 'js:Range.toString', // Stringifier concatenates text node data into a string; no ExceptionState, always a string.\n 'js:ResizeObserver.disconnect', // Clears observations; no ExceptionState; returns void.\n 'js:ResizeObserver.observe', // Both overloads take a genuine Element and a dictionary with an enum box, no ExceptionState; returns void.\n 'js:ResizeObserver.unobserve', // Erases the observation if present, ignores unknown targets; no ExceptionState; returns void.\n 'js:TextEncoder.encode', // USVString is lossy-converted so no throw; only allocation failure (text_encoder.cc:85, resource limit, not co…\n 'js:URL.createObjectURL', // IDL says RaisesException but URLFileAPI::createObjectURL and the MediaSource path never throw (closed context…\n 'js:URL.revokeObjectURL', // Parses the string into a KURL and revokes it; no ExceptionState and unknown URLs are ignored; returns void.\n 'js:Window.addEventListener', // Null/duplicate/aborted listener is ignored (event_target.cc:581), void return; event-map type_unsound hook re…\n 'js:Window.confirm', // Returns false when detached or sandboxed without allow-modals (console error only), never throws; boolean exa…\n 'js:Window.getComputedStyle', // Always returns a CSSComputedStyleDeclaration (invalid pseudo gives empty style), no ExceptionState; non-null …\n 'js:Window.matchMedia', // Never throws (bad query just does not match), but returns null from a detached document so MediaQueryList is …\n 'js:Window.prompt', // Returns null/empty when detached or sandboxed, never throws; string | null matches IDL DOMString?.\n 'js:Window.removeEventListener', // Unknown/null listener is ignored, void return, no throw.\n 'js:WindowOrWorkerGlobalScope.clearInterval', // Never throws: long handle wraps, unknown id ignored (dom_timer.cc:237); returns void.\n 'js:WindowOrWorkerGlobalScope.clearTimeout', // Never throws: long handle wraps, unknown id ignored (dom_timer.cc:237); returns void.\n 'js:WindowOrWorkerGlobalScope.reportError', // Reports the value to onerror/console, never rethrows; invalid context returns early; returns void.\n 'js:Worker.addEventListener', // Never throws, duplicate/null listener ignored; event-map typing hole recorded as type_unsound; returns void.\n 'js:Worker.removeEventListener', // Never throws, unknown listener ignored; returns void.\n 'js:Worker.terminate', // Idempotent TerminateGlobalScope (dedicated_worker.cc:383), no exception state; returns void.\n 'js:addEventListener', // call trust (null/duplicate listener ignored, options typed), type n/a (void); event-map type_unsound hook rec…\n 'js:alert', // call trust: sandboxed/no-frame alert is ignored with a console error, never thrown; type n/a (void).\n 'js:cancelAnimationFrame', // call trust: plain `long` handle (no EnforceRange) and unknown ids are ignored; type n/a (void).\n 'js:clearInterval', // call trust: optional plain `long` handle, unknown id is a no-op; type n/a (void).\n 'js:clearTimeout', // call trust: optional plain `long` handle, unknown id is a no-op; type n/a (void).\n 'js:confirm', // call trust: sandboxed or detached window returns false without throwing; type trust: boolean.\n 'js:getComputedStyle', // getComputedStyle has no ExceptionState and always returns a CSSStyleDeclaration (empty for unknown pseudo-ele…\n 'js:matchMedia', // matchMedia(string) returns a new MediaQueryList for any string (unparsable queries yield \"not all\"), no Excep…\n 'js:prompt', // Blink prompt() has no ExceptionState and returns null when sandboxed/no page; string|null is exact (note: Ele…\n 'js:queueMicrotask', // Enqueues the callback and returns void; callback exceptions are reported (InvokeAndReportException), never re…\n 'js:removeEventListener', // Removes a matching listener or does nothing; IDL has no RaisesException and a missing/null listener is ignore…\n 'js:requestAnimationFrame', // Schedules the callback for later and returns a long id; no ExceptionState, nothing rethrown; number is exact.\n 'js:requestIdleCallback', // No RaisesException and IdleRequestOptions.timeout is a plain unsigned long (no EnforceRange); returns a numbe…\n];\n\nexport const WEB_STRICT_DISTRUST: readonly string[] = [\n 'js:AudioBuffer.getChannelData', // distrust call (value: channel index >= numberOfChannels throws IndexSizeError); type trust: returns the Float…\n 'js:AudioBufferSourceNode.start', // distrust call (state: starting twice throws InvalidStateError; value: negative when/offset/duration throws Ra…\n 'js:AudioContext.resume', // distrust call (async: returns a Promise that rejects on a closed context); type trust: Promise<void> matches …\n 'js:AudioNode.connect', // distrust call (value: bad output/input index throws IndexSizeError; cross-context destination throws InvalidA…\n 'js:AudioParam.exponentialRampToValueAtTime', // Throws RangeError on 0 value or negative time, TypeError on NaN, NotSupportedError on curve overlap; returns …\n 'js:AudioParam.setValueAtTime', // Throws RangeError on negative time, TypeError on NaN, NotSupportedError on curve overlap; returns this, Audio…\n 'js:AudioScheduledSourceNode.start', // Throws InvalidStateError if already started and RangeError on negative or NaN when; returns void.\n 'js:AudioScheduledSourceNode.stop', // Throws InvalidStateError if never started and RangeError on negative or NaN when; returns void.\n 'js:BaseAudioContext.createBiquadFilter', // call distrust: detached-frame context throws NotAllowedError via CheckExecutionContextAndThrowIfNecessary (sp…\n 'js:BaseAudioContext.createBuffer', // call distrust: NotSupportedError for typed numbers out of range (0 channels/frames, bad sample rate); type tr…\n 'js:Blob.arrayBuffer', // Promise can reject (BlobFileReaderClient::DidFail rejects) so call distrust (async); Promise<ArrayBuffer> is …\n 'js:Body.json', // return type contains any\n 'js:Body.text', // Returns a Promise that rejects on used or errored body so call distrust (async); Promise<string> (USVString) …\n 'js:CSSStyleDeclaration.removeProperty', // Throws NoModificationAllowedError on a computed-style receiver (state); returns exact string; CEReactions hoo…\n 'js:CSSStyleDeclaration.setProperty', // Throws NoModificationAllowedError on a computed-style receiver (state); returns void; CEReactions hook record…\n 'js:ChildNode.remove', // Blink throws NotFoundError if a blur handler reparented the focused child during removal (spec says remove() …\n 'js:Clipboard.writeText', // Returns Promise that rejects NotAllowedError when unfocused or permission denied; resolves undefined, true to…\n 'js:Crypto.getRandomValues', // Throws TypeMismatchError for Float arrays/DataView and QuotaExceededError above 65536 bytes; returns the same…\n 'js:DOMTokenList.add', // Empty or whitespace-containing string token throws SyntaxError/InvalidCharacterError; returns void; CEReactio…\n 'js:DOMTokenList.remove', // Empty or whitespace-containing string token throws SyntaxError/InvalidCharacterError; returns void; CEReactio…\n 'js:DataTransferItemList.add', // add(data,type) throws NotSupportedError when an item of that type already exists (state); DataTransferItem | …\n 'js:Document.caretPositionFromPoint', // call distrust: typed NaN/Infinity into non-unrestricted float throws TypeError; type trust: CaretPosition|nul…\n 'js:Document.createElement', // call distrust: invalid tag name throws InvalidCharacterError; type distrust (medium): non-HTML documents retu…\n 'js:Document.execCommand', // call distrust: InvalidStateError on non-HTML documents and Trusted Types TypeError; type trust: boolean; depr…\n 'js:DocumentOrShadowRoot.elementFromPoint', // NaN/Infinity into plain double x,y throws TypeError (idl:15); result Element | null is exact (tree_scope.cc:2…\n 'js:Element.closest', // closest('[') throws SyntaxError (value); <E> overload is a cast and tag-name overload ignores SVG/MathML name…\n 'js:Element.matches', // matches('[') throws SyntaxError via SelectorQueryCache::Add; boolean return is exact.\n 'js:Element.releasePointerCapture', // Throws NotFoundError when pointerId is not an active pointer; returns void.\n 'js:Element.setAttribute', // call distrust (value): invalid attribute name throws InvalidCharacterError; returns void so type n/a; CEReact…\n 'js:Element.setPointerCapture', // call distrust (state): NotFoundError for inactive pointerId, InvalidStateError when disconnected or pointer-l…\n 'js:EventTarget.dispatchEvent', // Re-dispatching an in-flight event throws InvalidStateError; listener throws are reported not rethrown; boolea…\n 'js:IntersectionObserver', // Throws RangeError for out-of-range threshold and SyntaxError for malformed rootMargin; returned IntersectionO…\n 'js:Location.reload', // Returns void; fine on own window but a Location held across a cross-origin navigation throws SecurityError (r…\n 'js:MouseEvent', // MouseEventInit clientX/clientY/screenX/screenY are non-unrestricted double, so NaN/Infinity (typed number) th…\n 'js:MutationObserver.observe', // Throws TypeError for a typed options dict with no observation type (e.g. {}); returns void.\n 'js:Node.appendChild', // Throws HierarchyRequestError for ancestor/invalid parent; returns the same node T (type true); custom element…\n 'js:Node.insertBefore', // Throws NotFoundError/HierarchyRequestError on bad child or ancestor; returns inserted node T (true); custom e…\n 'js:Node.replaceChild', // Throws NotFoundError/HierarchyRequestError; returns the replaced child T (true); custom element reactions rec…\n 'js:NodeListOf.forEach', // iterable<Node> forEach runs the callback synchronously and propagates its exception (user_code_rethrow); retu…\n 'js:ParentNode.append', // Inserting an ancestor throws HierarchyRequestError; returns void; CEReactions custom element callbacks record…\n 'js:ParentNode.querySelector', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:ParentNode.querySelectorAll', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:ParentNode.replaceChildren', // Inserting an ancestor throws HierarchyRequestError; returns void; CEReactions custom element callbacks record…\n 'js:PerformanceObserver.observe', // All PerformanceObserverInit members optional, so observe() throws TypeError (also InvalidModificationError mi…\n 'js:Range.selectNodeContents', // Throws InvalidNodeTypeError for a DocumentType node (typed Node); returns void.\n 'js:Range.setEnd', // CheckNodeWOffset throws IndexSizeError for offset past node length and InvalidNodeTypeError for doctype; retu…\n 'js:Range.setStart', // CheckNodeWOffset throws IndexSizeError for offset past node length and InvalidNodeTypeError for doctype; retu…\n 'js:Selection.getRangeAt', // Throws IndexSizeError for index >= rangeCount; also returns null on a detached-window selection though typed …\n 'js:Storage.getItem', // Throws SecurityError on a Storage from a removed iframe; string | null is exact.\n 'js:Storage.removeItem', // Throws SecurityError on a Storage from a removed iframe; returns void.\n 'js:Storage.setItem', // QuotaExceededError when full and SecurityError on a removed-iframe Storage; returns void.\n 'js:SubtleCrypto.digest', // Returns Promise; rejects on unsupported algorithm (async); resolves ArrayBuffer as typed (IDL any, always Arr…\n 'js:SubtleCrypto.importKey', // Returns Promise; rejects on bad key data/usages (async); resolves CryptoKey as typed in all overloads.\n 'js:SubtleCrypto.sign', // Returns Promise; rejects on key/algorithm mismatch (async); resolves ArrayBuffer as typed (IDL any).\n 'js:TextDecoder', // Unknown or replacement encoding label in a plain string throws RangeError; the TextDecoder returned is genuin…\n 'js:TextDecoder.decode', // Throws TypeError on invalid bytes when the decoder was built fatal; returns a true string (content is not typ…\n 'js:TreeWalker.nextNode', // Filter exceptions are rethrown and reentrant calls throw InvalidStateError; Node | null matches IDL Node?.\n 'js:URL', // Invalid URL or base string throws TypeError; the URL returned is genuine.\n 'js:WebSocket', // distrust call (value: invalid or disallowed URL string throws SyntaxError/SecurityError; connect failures arr…\n 'js:WindowOrWorkerGlobalScope.setInterval', // Function overload cannot throw (CSP eval denial returns 0), but a string handler throws TypeError under Trust…\n 'js:WindowOrWorkerGlobalScope.setTimeout', // Function overload cannot throw (CSP eval denial returns 0), but a string handler throws TypeError under Trust…\n 'js:Worker', // distrust call (environment: destroyed context throws InvalidAccessError; script-URL resolution/origin errors …\n 'js:Worker.postMessage', // Structured clone of any message or bad transfer list throws DataCloneError (RaisesException); returns void.\n 'js:btoa', // call distrust (value): non-Latin1 string throws InvalidCharacterError; type trust: always a string.\n 'js:fetch', // Returns a Promise that rejects on network failure (and RaisesException); Promise<Response> is a true type.\n 'js:setInterval', // String handler ([StringContext=TrustedScript] ScriptString) throws TypeError under enforced Trusted Types wit…\n 'js:setTimeout', // String handler ([StringContext=TrustedScript] ScriptString) throws TypeError under enforced Trusted Types wit…\n 'js:structuredClone', // Throws DataCloneError for functions/uncloneable values, and the clone is not a T for class instances (prototy…\n];\n\nexport const WEB_STRICT_TRUST_TYPE: readonly string[] = [\n 'js:AbortSignal.aborted', // Plain boolean read (abort_signal.h:99); boolean is exact, no failure path.\n 'js:AbortSignal.addEventListener', // Inherited EventTarget.addEventListener only registers the listener, no throw; void; event-map type_unsound ho…\n 'js:AbortSignal.removeEventListener', // Inherited EventTarget.removeEventListener ignores unknown listeners, no throw; returns void.\n 'js:AbstractRange.collapsed', // Plain boolean attribute, exact type (abstract_range.idl:14).\n 'js:AbstractRange.startContainer', // Always a Node (abstract_range.idl:10), non-nullable in IDL and TS.\n 'js:AbstractRange.startOffset', // unsigned long maps to number (abstract_range.idl:11).\n 'js:AnimationFrameProvider.requestAnimationFrame', // call trust: callback is only scheduled, never run synchronously, no ExceptionState (local_dom_window.cc:1973)…\n 'js:Attr.name', // call n/a (attribute); type trust: readonly DOMString name is always a string.\n 'js:Attr.value', // call n/a (attribute); type trust: DOMString value is always a string (content is not type); read cannot throw…\n 'js:AudioBuffer.getChannelData', // distrust call (value: channel index >= numberOfChannels throws IndexSizeError); type trust: returns the Float…\n 'js:AudioBufferSourceNode.buffer', // call n/a (attribute); type trust: getter returns AudioBuffer or null as declared; the setter throws InvalidSt…\n 'js:AudioContext.resume', // distrust call (async: returns a Promise that rejects on a closed context); type trust: Promise<void> matches …\n 'js:AudioNode.connect', // distrust call (value: bad output/input index throws IndexSizeError; cross-context destination throws InvalidA…\n 'js:AudioParam.exponentialRampToValueAtTime', // Throws RangeError on 0 value or negative time, TypeError on NaN, NotSupportedError on curve overlap; returns …\n 'js:AudioParam.setValueAtTime', // Throws RangeError on negative time, TypeError on NaN, NotSupportedError on curve overlap; returns this, Audio…\n 'js:AudioParam.value', // Read is a plain float typed number (the audited use is a write, whose setter can raise NotSupportedError duri…\n 'js:BaseAudioContext.createBiquadFilter', // call distrust: detached-frame context throws NotAllowedError via CheckExecutionContextAndThrowIfNecessary (sp…\n 'js:BaseAudioContext.createBuffer', // call distrust: NotSupportedError for typed numbers out of range (0 channels/frames, bad sample rate); type tr…\n 'js:BaseAudioContext.createBufferSource', // call trust: AudioBufferSourceNode::Create only constructs the node and never touches ExceptionState; type tru…\n 'js:BaseAudioContext.createDynamicsCompressor', // call trust: DynamicsCompressorNode::Create only constructs the node and never touches ExceptionState; type tr…\n 'js:BaseAudioContext.createGain', // call trust: GainNode::Create only constructs the node and never touches ExceptionState; type trust: returns t…\n 'js:BaseAudioContext.createOscillator', // call trust: OscillatorNode::Create only constructs the node and never touches ExceptionState; type trust: ret…\n 'js:BaseAudioContext.currentTime', // call n/a (attribute); type trust: IDL double, TS number.\n 'js:BaseAudioContext.destination', // call n/a (attribute); type trust: non-nullable AudioDestinationNode returned from destination_node_ (base_aud…\n 'js:BaseAudioContext.sampleRate', // call n/a (attribute); type trust: IDL float, TS number.\n 'js:BaseAudioContext.state', // call n/a (attribute); type trust: IDL enum suspended/running/closed is within TS AudioContextState (base_audi…\n 'js:BiquadFilterNode.Q', // Read of non-null AudioParam (IDL non-nullable, TS AudioParam); getter cannot throw; type trusted.\n 'js:BiquadFilterNode.frequency', // Read of non-null AudioParam (IDL non-nullable, TS AudioParam); getter cannot throw; type trusted.\n 'js:BiquadFilterNode.type', // BiquadFilterType enum matches the TS 8-value union exactly; getter cannot throw; type trusted (usage is write…\n 'js:Blob.arrayBuffer', // Promise can reject (BlobFileReaderClient::DidFail rejects) so call distrust (async); Promise<ArrayBuffer> is …\n 'js:Blob.size', // unsigned long long maps to number; getter cannot throw; type trusted.\n 'js:Blob.type', // DOMString maps to string; getter cannot throw; type trusted.\n 'js:Body.text', // Returns a Promise that rejects on used or errored body so call distrust (async); Promise<string> (USVString) …\n 'js:CSS.escape', // SerializeIdentifier over any string never throws (NUL becomes U+FFFD) and returns a string.\n 'js:CSSStyleDeclaration.borderBottomWidth', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.borderTopWidth', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.clipPath', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.colorScheme', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.contentVisibility', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.display', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.fontSize', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.getPropertyValue', // getPropertyValue(DOMString) has no ExceptionState and returns empty string for unknown names; always a string…\n 'js:CSSStyleDeclaration.height', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.inset', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.lineHeight', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.marginBottom', // CSS property accessor reads a CSS-serialised DOMString (empty string if unset), never null; string is exact, …\n 'js:CSSStyleDeclaration.marginTop', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.minHeight', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.opacity', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.overflow', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.overflowX', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.overflowY', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.paddingBottom', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.paddingTop', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.pointerEvents', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.position', // Read returns a CSS serialization string, typed string; type-trusted (content is not type); call n/a for attri…\n 'js:CSSStyleDeclaration.removeProperty', // Throws NoModificationAllowedError on a computed-style receiver (state); returns exact string; CEReactions hoo…\n 'js:CSSStyleDeclaration.transform', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.transition', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.userSelect', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.visibility', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CSSStyleDeclaration.width', // CSS property accessor: string in IDL and TS, getter/setter never throw on a genuine declaration; call n/a, ty…\n 'js:CaretPosition.offset', // unsigned long maps to number; getter cannot throw; type trusted.\n 'js:CaretPosition.offsetNode', // IDL Node is non-nullable, TS Node; getter cannot throw; type trusted.\n 'js:CharacterData.data', // DOMString (null coerces to empty string on write) maps to string; getter cannot throw; content is not type, s…\n 'js:CharacterData.ownerDocument', // Node.ownerDocument is null only for a Document (node.cc:1917); a CharacterData always has one so TS Document …\n 'js:Clipboard.writeText', // Returns Promise that rejects NotAllowedError when unfocused or permission denied; resolves undefined, true to…\n 'js:ClipboardEvent.clipboardData', // Plain nullable getter, IDL DataTransfer? matches DataTransfer | null; cannot throw.\n 'js:Crypto.getRandomValues', // Throws TypeMismatchError for Float arrays/DataView and QuotaExceededError above 65536 bytes; returns the same…\n 'js:Crypto.randomUUID', // No ExceptionState, always a canonical 4-dash UUID string matching the template type; SecureContext assumed pe…\n 'js:Crypto.subtle', // Lazy getter returns a SubtleCrypto, cannot throw; only undefined on insecure contexts, which rubric excludes.\n 'js:DOMRect.height', // unrestricted double maps to number, including NaN/Infinity (dom_rect.idl:20); reading never throws.\n 'js:DOMRect.width', // unrestricted double maps to number, including NaN/Infinity (dom_rect.idl:19); reading never throws.\n 'js:DOMRectReadOnly.bottom', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.height', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.left', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.right', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.top', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.width', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.x', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMRectReadOnly.y', // Plain unrestricted double getter on a genuine DOMRectReadOnly never throws; number is exact (NaN/Infinity are…\n 'js:DOMTokenList.contains', // No RaisesException; any string just does a set lookup and returns boolean.\n 'js:DataTransfer.dropEffect', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransfer.files', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransfer.items', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransfer.types', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransferItem.getAsFile', // getAsFile has no ExceptionState and returns File? matching File | null; trust/trust.\n 'js:DataTransferItem.kind', // Attribute read of a real DataTransfer(Item); IDL type matches the TS declaration exactly; call n/a.\n 'js:DataTransferItemList.add', // add(data,type) throws NotSupportedError when an item of that type already exists (state); DataTransferItem | …\n 'js:Document.addEventListener', // call trust: null listener is ignored (event_target.cc:585), no throw/async failure; type n/a (void); event-ma…\n 'js:Document.caretPositionFromPoint', // call distrust: typed NaN/Infinity into non-unrestricted float throws TypeError; type trust: CaretPosition|nul…\n 'js:Document.caretRangeFromPoint', // call trust: long args coerce NaN to 0, no ExceptionState (document.cc:1697); type trust: Range|null matches I…\n 'js:Document.createRange', // trust/trust: createRange() always returns a new Range (document.cc:2064), no ExceptionState.\n 'js:Document.createTreeWalker', // trust/trust: non-null Node root, unsigned long whatToShow without EnforceRange wraps NaN; filter not invoked …\n 'js:Document.defaultView', // type trust: IDL Window? maps to (WindowProxy & typeof globalThis) | null, null for detached/no-browsing-conte…\n 'js:Document.execCommand', // call distrust: InvalidStateError on non-HTML documents and Trusted Types TypeError; type trust: boolean; depr…\n 'js:Document.getSelection', // Returns the selection or null for a frameless document, never throws; Selection | null is exact (tree_scope.c…\n 'js:Document.hasFocus', // Pure boolean query on page focus state (document.cc:8546), no failure path; boolean is exact.\n 'js:Document.hidden', // Plain boolean from page visibility (document.cc:1973); getter does not throw.\n 'js:Document.removeEventListener', // Removes a matching listener or does nothing, no ExceptionState (event_target.idl:33); void return.\n 'js:Document.visibilityState', // Blink enum is exactly hidden|visible (document.idl:25) matching DocumentVisibilityState (lib.dom.d.ts:39288).\n 'js:DocumentOrShadowRoot.activeElement', // Returns focused element, body or null (tree_scope.cc:626-630); Element | null is exact.\n 'js:DocumentOrShadowRoot.elementFromPoint', // NaN/Infinity into plain double x,y throws TypeError (idl:15); result Element | null is exact (tree_scope.cc:2…\n 'js:DragEvent.dataTransfer', // IDL DataTransfer? matches TS DataTransfer | null; getter cannot throw.\n 'js:DynamicsCompressorNode.attack', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:DynamicsCompressorNode.ratio', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:DynamicsCompressorNode.release', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:DynamicsCompressorNode.threshold', // readonly non-nullable AudioParam attribute (IDL and lib.dom agree); the getter cannot throw and always return…\n 'js:Element.attributes', // NamedNodeMap [SameObject] is exact; read cannot fail.\n 'js:Element.classList', // DOMTokenList [SameObject] is exact; read cannot fail.\n 'js:Element.className', // DOMString reflect of class is always a string; CEReactions hook on write only.\n 'js:Element.clientHeight', // long -> number; always returns an int, 0 when detached.\n 'js:Element.clientWidth', // long -> number; always returns an int, 0 when detached.\n 'js:Element.getAttribute', // No RaisesException; any string name is accepted; string | null is exact.\n 'js:Element.getBoundingClientRect', // Always returns a DOMRect even when detached; no failure path.\n 'js:Element.hasAttribute', // No RaisesException; boolean result is exact for any string name.\n 'js:Element.hasPointerCapture', // Plain long (no EnforceRange, NaN->0), no RaisesException; returns boolean.\n 'js:Element.id', // DOMString reflect of id is always a string; CEReactions hook on write only.\n 'js:Element.innerHTML', // Always a string; only the setter raises (RaisesException=Setter), the getter does not in Blink; CEReactions o…\n 'js:Element.matches', // matches('[') throws SyntaxError via SelectorQueryCache::Add; boolean return is exact.\n 'js:Element.outerHTML', // Getter serializes to a true string without throwing; setter has CEReactions (recorded).\n 'js:Element.ownerDocument', // IDL Document? is null only for Document nodes; a genuine Element always has one, so TS Document is true.\n 'js:Element.scrollHeight', // long in IDL, number in TS; layout read cannot fail.\n 'js:Element.scrollLeft', // unrestricted double to number; read and write cannot throw.\n 'js:Element.scrollTop', // unrestricted double to number; read and write cannot throw.\n 'js:Element.scrollWidth', // long in IDL, number in TS; layout read cannot fail.\n 'js:Element.tagName', // attribute: IDL DOMString, TS string; always a string, no throw.\n 'js:Element.textContent', // attribute on Element: getter never returns null for an Element (null only for Document/DocumentType), so TS s…\n 'js:ElementCSSInlineStyle.style', // attribute: [SameObject] CSSStyleDeclaration non-nullable on every genuine receiver; TS CSSStyleDeclaration is…\n 'js:ElementContentEditable.isContentEditable', // attribute: IDL boolean, TS boolean; always a boolean.\n 'js:ErrorEvent.colno', // attribute: IDL unsigned long, TS number; always a number.\n 'js:ErrorEvent.filename', // attribute: IDL DOMString, TS string; always a string.\n 'js:ErrorEvent.lineno', // attribute: IDL unsigned long, TS number; always a number.\n 'js:ErrorEvent.message', // attribute: IDL DOMString, TS string; always a string.\n 'js:Event.CAPTURING_PHASE', // Constant 1 matches TS literal 1 and IDL const; no failure.\n 'js:Event.cancelable', // Read-only boolean, TS boolean matches IDL boolean; getter cannot throw.\n 'js:Event.composedPath', // No exception state; returns sequence<EventTarget> matching EventTarget[].\n 'js:Event.currentTarget', // IDL EventTarget? matches TS EventTarget | null; getter cannot throw.\n 'js:Event.defaultPrevented', // Read-only boolean matching TS boolean; no failure.\n 'js:Event.eventPhase', // unsigned short matches TS number; no failure.\n 'js:Event.target', // IDL EventTarget? matches TS EventTarget | null; getter cannot throw.\n 'js:Event.type', // DOMString matches TS string; no failure.\n 'js:EventTarget.addEventListener', // Ignores duplicate listeners, no ExceptionState; returns void; event-map type hole recorded as type_unsound.\n 'js:EventTarget.dispatchEvent', // Re-dispatching an in-flight event throws InvalidStateError; listener throws are reported not rethrown; boolea…\n 'js:File.name', // call n/a; type trust: DOMString name is a true string.\n 'js:FontFaceSet.ready', // call n/a; type trust: Promise<FontFaceSet> only ever resolves with the set (font_face_set.cc:283), never reje…\n 'js:FontFaceSource.fonts', // call n/a; type trust: non-nullable FontFaceSet in IDL and TS.\n 'js:GainNode.gain', // call n/a; type trust: readonly AudioParam, always present.\n 'js:GlobalEventHandlers.onclick', // call n/a; type trust: handler-or-null round trip (the callback's `any` return is the caller's own function); …\n 'js:HTMLButtonElement.addEventListener', // call trust: duplicate/aborted-signal registrations are ignored silently, void return; event-map type_unsound …\n 'js:HTMLButtonElement.disabled', // call n/a; type trust: reflected boolean (CEReactions custom_element hook only on write).\n 'js:HTMLButtonElement.type', // call n/a; type trust: getter returns only submit|reset|button (html_button_element.cc type_ enum), matching t…\n 'js:HTMLCollectionBase.item', // call trust: unsigned long index wraps without EnforceRange so no throw; type trust: Element | null is exact.\n 'js:HTMLCollectionBase.length', // call n/a; type trust: unsigned long is a number.\n 'js:HTMLDetailsElement.open', // call n/a; type trust: reflected boolean.\n 'js:HTMLDivElement.addEventListener', // addEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; event…\n 'js:HTMLDivElement.removeEventListener', // removeEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; no…\n 'js:HTMLElement.addEventListener', // addEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; event…\n 'js:HTMLElement.offsetHeight', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.offsetLeft', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.offsetTop', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.offsetWidth', // IDL long -> TS number; always a number (0 when detached); reads do not throw.\n 'js:HTMLElement.removeEventListener', // removeEventListener never throws (null/duplicate/aborted-signal ignored, no ExceptionState); returns void; no…\n 'js:HTMLImageElement.alt', // Attribute read only; reflected DOMString is always a string, matches `string`.\n 'js:HTMLImageElement.complete', // Attribute read only; IDL boolean matches `boolean`.\n 'js:HTMLImageElement.currentSrc', // Attribute read only; DOMString (empty when none) matches `string`.\n 'js:HTMLImageElement.naturalHeight', // Attribute read only; unsigned long matches `number`.\n 'js:HTMLImageElement.naturalWidth', // Attribute read only; unsigned long matches `number`.\n 'js:HTMLInputElement.checked', // boolean in IDL and TS; read cannot throw.\n 'js:HTMLInputElement.disabled', // Reflected boolean; getter cannot throw; CEReactions only on setter.\n 'js:HTMLInputElement.files', // FileList? in IDL matches FileList | null in TS; read cannot throw.\n 'js:HTMLInputElement.selectionEnd', // Getter returns null when type lacks selection API, never throws (RaisesException is for the setter path); uns…\n 'js:HTMLInputElement.selectionStart', // Getter returns null when type lacks selection API, never throws; unsigned long? matches number | null.\n 'js:HTMLInputElement.value', // DOMString getter always a string (content is not type); CEReactions/RaisesException are setter-side.\n 'js:HTMLInputElement.valueAsNumber', // unrestricted double read yields number (NaN included); getter cannot throw.\n 'js:HTMLOrSVGElement.dataset', // SameObject DOMStringMap always returned; read cannot throw.\n 'js:HTMLSelectElement.value', // DOMString getter always a string; read cannot throw.\n 'js:HTMLTextAreaElement.selectionStart', // Textarea selectionStart is non-nullable unsigned long (unlike input) so number is exact; getter cannot throw.\n 'js:HTMLTextAreaElement.value', // Value is a plain DOMString so string is exact (content is not type); getter cannot throw; setter is CEReactio…\n 'js:ImportMeta.url', // import.meta.url is always the module URL string (HostGetImportMetaProperties); getter cannot throw.\n 'js:IntersectionObserverEntry.isIntersecting', // boolean in IDL and TS; plain getter.\n 'js:KeyboardEvent.altKey', // Plain readonly boolean modifier flag in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.code', // Plain readonly DOMString in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.ctrlKey', // Plain readonly boolean in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.key', // Plain readonly DOMString in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.metaKey', // Plain readonly boolean in IDL and TS; no failure path (call n/a, type trust).\n 'js:KeyboardEvent.shiftKey', // Plain readonly boolean in IDL and TS; no failure path (call n/a, type trust).\n 'js:Location.host', // USVString getter on a genuine same-origin Location never throws (RaisesException is Setter only); string is e…\n 'js:Location.origin', // readonly USVString; no failure path; string is exact.\n 'js:MediaQueryList.addEventListener', // addEventListener ignores null/duplicate listeners and has no ExceptionState; returns void.\n 'js:MediaQueryList.matches', // readonly boolean; no failure path (call n/a, type trust).\n 'js:MediaQueryList.removeEventListener', // removeEventListener ignores null/duplicate listeners and has no ExceptionState; returns void.\n 'js:MediaQueryListEvent.matches', // boolean in IDL and TS; always a true boolean.\n 'js:MessageEventTarget.onmessage', // Write-only in the UI; reading yields the handler function or null, both match the declared type (the any is t…\n 'js:MouseEvent.button', // short in IDL, number in TS; always a number.\n 'js:MouseEvent.clientX', // double in IDL, number in TS.\n 'js:MouseEvent.clientY', // double in IDL, number in TS.\n 'js:MouseEvent.ctrlKey', // boolean in IDL and TS.\n 'js:MouseEvent.metaKey', // boolean in IDL and TS.\n 'js:MouseEvent.shiftKey', // boolean in IDL and TS.\n 'js:MutationObserver.takeRecords', // No ExceptionState; always returns a fresh MutationRecord[] (possibly empty).\n 'js:MutationRecord.addedNodes', // Attribute read: call n/a; type trusted: NodeList is always returned (SameObject, never null).\n 'js:MutationRecord.attributeName', // Attribute read: call n/a; type trusted: DOMString? matches string | null.\n 'js:MutationRecord.oldValue', // Attribute read: call n/a; type trusted: DOMString? matches string | null.\n 'js:MutationRecord.removedNodes', // Attribute read: call n/a; type trusted: NodeList is always returned (SameObject, never null).\n 'js:MutationRecord.target', // Attribute read: call n/a; type trusted: non-nullable Node in IDL and TS.\n 'js:MutationRecord.type', // Attribute read: call n/a; type trusted: IDL DOMString only ever holds attributes|characterData|childList, mat…\n 'js:Navigator.clipboard', // Attribute read: call n/a; type trusted: SameObject Clipboard exposed in secure contexts, matches TS; absent (…\n 'js:NavigatorConcurrentHardware.hardwareConcurrency', // Attribute read: call n/a; type trusted: unsigned long long reads as a number.\n 'js:NavigatorID.platform', // Attribute read: call n/a; type trusted: DOMString is a string.\n 'js:NavigatorID.userAgent', // Attribute read: call n/a; type trusted: DOMString is a string.\n 'js:Node.ELEMENT_NODE', // Constant 1 matches literal type 1.\n 'js:Node.TEXT_NODE', // Constant 3 matches literal type 3.\n 'js:Node.appendChild', // Throws HierarchyRequestError for ancestor/invalid parent; returns the same node T (type true); custom element…\n 'js:Node.childNodes', // NodeList of Element/Text/Comment/PI/DocumentType children, all ChildNode; same-object, cannot throw.\n 'js:Node.contains', // Pure tree walk accepting Node|null; returns boolean, no failure path.\n 'js:Node.insertBefore', // Throws NotFoundError/HierarchyRequestError on bad child or ancestor; returns inserted node T (true); custom e…\n 'js:Node.isConnected', // IDL boolean to TS boolean, no failure path.\n 'js:Node.nextSibling', // Node? sibling is always a ChildNode (Element/CharacterData/DocumentType) or null.\n 'js:Node.nodeType', // unsigned short to number.\n 'js:Node.parentNode', // Parent is Element, Document or DocumentFragment, all ParentNode, or null.\n 'js:Node.replaceChild', // Throws NotFoundError/HierarchyRequestError; returns the replaced child T (true); custom element reactions rec…\n 'js:Node.textContent', // Getter returns DOMString? (string|null) matching TS; setter [RaisesException]/CEReactions not exercised by re…\n 'js:NodeFilter.SHOW_TEXT', // Constant 0x4 in IDL equals TS literal 0x4; cannot fail.\n 'js:NodeList.length', // unsigned long length is a number; cannot fail.\n 'js:NonDocumentTypeChildNode.nextElementSibling', // Element? matches TS Element | null; cannot fail.\n 'js:NonDocumentTypeChildNode.previousElementSibling', // Element? matches TS Element | null; cannot fail.\n 'js:OscillatorNode.frequency', // Readonly AudioParam attribute always present; cannot fail.\n 'js:OscillatorNode.type', // Getter returns OscillatorType matching TS union; setter can throw InvalidStateError for \"custom\" (setter only…\n 'js:PageTransitionEvent.persisted', // boolean matches TS boolean; cannot fail.\n 'js:ParentNode.children', // HTMLCollection is the IDL type and the TS type; never null.\n 'js:ParentNode.lastElementChild', // IDL Element? matches TS Element | null.\n 'js:Performance.now', // No ExceptionState, returns a double always; DOMHighResTimeStamp is number.\n 'js:Performance.timeOrigin', // DOMHighResTimeStamp is a number; no failure.\n 'js:PerformanceEntry.duration', // DOMHighResTimeStamp is a number; no failure.\n 'js:PerformanceObserverEntryList.getEntries', // No exception path; returns PerformanceEntry sequence matching PerformanceEntryList.\n 'js:PointerEvent.pointerId', // long in IDL, number in TS; plain getter on a genuine PointerEvent, cannot throw.\n 'js:Range.getBoundingClientRect', // Always builds a DOMRect (empty for collapsed/detached ranges); no throw path.\n 'js:Range.intersectsNode', // Only throw is the null-node TypeError that TS rejects; foreign-root nodes return false; boolean is exact.\n 'js:Range.toString', // Stringifier concatenates text node data into a string; no ExceptionState, always a string.\n 'js:ResizeObserverEntry.contentRect', // Readonly DOMRectReadOnly attribute, always set; no throw, type exact.\n 'js:ResizeObserverEntry.target', // Readonly Element attribute, always set; no throw, type exact.\n 'js:Selection.anchorNode', // Node? attribute matches Node | null; getter does not throw.\n 'js:Selection.focusNode', // Node? attribute matches Node | null; getter does not throw.\n 'js:Selection.isCollapsed', // boolean attribute, true or false; no throw, type exact.\n 'js:Selection.rangeCount', // unsigned long maps to number; no throw, type exact.\n 'js:Storage.getItem', // Throws SecurityError on a Storage from a removed iframe; string | null is exact.\n 'js:SubtleCrypto.digest', // Returns Promise; rejects on unsupported algorithm (async); resolves ArrayBuffer as typed (IDL any, always Arr…\n 'js:SubtleCrypto.importKey', // Returns Promise; rejects on bad key data/usages (async); resolves CryptoKey as typed in all overloads.\n 'js:SubtleCrypto.sign', // Returns Promise; rejects on key/algorithm mismatch (async); resolves ArrayBuffer as typed (IDL any).\n 'js:TextDecoder.decode', // Throws TypeError on invalid bytes when the decoder was built fatal; returns a true string (content is not typ…\n 'js:TextEncoder.encode', // USVString is lossy-converted so no throw; only allocation failure (text_encoder.cc:85, resource limit, not co…\n 'js:Touch.clientX', // IDL double, TS number; plain read.\n 'js:Touch.clientY', // IDL double, TS number; plain read.\n 'js:TouchEvent.touches', // IDL non-nullable TouchList, TS TouchList; plain read.\n 'js:TransitionEvent.propertyName', // IDL DOMString, TS string; plain read.\n 'js:TreeWalker.nextNode', // Filter exceptions are rethrown and reentrant calls throw InvalidStateError; Node | null matches IDL Node?.\n 'js:UIEvent.detail', // IDL long, TS number; plain read.\n 'js:URL.createObjectURL', // IDL says RaisesException but URLFileAPI::createObjectURL and the MediaSource path never throw (closed context…\n 'js:URL.host', // USVString getter returns a string; no throw.\n 'js:URL.hostname', // USVString getter returns a string; no throw.\n 'js:URL.pathname', // USVString getter returns a string; no throw.\n 'js:URL.search', // USVString getter returns a string; no throw.\n 'js:VisualViewport.height', // double in IDL, number in TS; detached frames report 0.\n 'js:VisualViewport.offsetTop', // double in IDL, number in TS; detached frames report 0.\n 'js:VisualViewport.width', // double in IDL, number in TS; detached frames report 0.\n 'js:WebSocket.OPEN', // const unsigned short = 1 in IDL, literal 1 in TS.\n 'js:WebSocket.readyState', // unsigned short in IDL, number in TS.\n 'js:WheelEvent.deltaMode', // Attribute read of IDL unsigned long (0/1/2) on a genuine WheelEvent; TS number is exact; no failure path.\n 'js:WheelEvent.deltaX', // Attribute read of IDL double on a genuine WheelEvent; TS number is exact; no failure path.\n 'js:WheelEvent.deltaY', // Attribute read of IDL double on a genuine WheelEvent; TS number is exact; no failure path.\n 'js:Window.addEventListener', // Null/duplicate/aborted listener is ignored (event_target.cc:581), void return; event-map type_unsound hook re…\n 'js:Window.confirm', // Returns false when detached or sandboxed without allow-modals (console error only), never throws; boolean exa…\n 'js:Window.devicePixelRatio', // double in IDL, number in TS; returns 0.0 when detached, no throw.\n 'js:Window.getComputedStyle', // Always returns a CSSComputedStyleDeclaration (invalid pseudo gives empty style), no ExceptionState; non-null …\n 'js:Window.history', // Blink getter always returns a History object (no RaisesException); non-null type true.\n 'js:Window.innerHeight', // long in IDL, number in TS; 0 when detached.\n 'js:Window.innerWidth', // long in IDL, number in TS; 0 when detached.\n 'js:Window.prompt', // Returns null/empty when detached or sandboxed, never throws; string | null matches IDL DOMString?.\n 'js:Window.removeEventListener', // Unknown/null listener is ignored, void return, no throw.\n 'js:Window.visualViewport', // IDL non-null, TS declares VisualViewport | null (wider, true); getter returns a stored pointer.\n 'js:WindowOrWorkerGlobalScope.setInterval', // Function overload cannot throw (CSP eval denial returns 0), but a string handler throws TypeError under Trust…\n 'js:WindowOrWorkerGlobalScope.setTimeout', // Function overload cannot throw (CSP eval denial returns 0), but a string handler throws TypeError under Trust…\n 'js:Worker.addEventListener', // Never throws, duplicate/null listener ignored; event-map typing hole recorded as type_unsound; returns void.\n 'js:Worker.removeEventListener', // Never throws, unknown listener ignored; returns void.\n 'js:btoa', // call distrust (value): non-Latin1 string throws InvalidCharacterError; type trust: always a string.\n 'js:confirm', // call trust: sandboxed or detached window returns false without throwing; type trust: boolean.\n 'js:console', // attribute read of the Replaceable Console object on a genuine window; type `Console` is true.\n 'js:crossOriginIsolated', // attribute read returns a boolean from CrossOriginIsolatedCapability; type `boolean` is exact.\n 'js:crypto', // attribute read lazily creates and returns a Crypto object, never null; type `Crypto` is true.\n 'js:devicePixelRatio', // double in IDL, number in TS; returns 0.0 when frameless, still a number.\n 'js:document', // Non-null Document on a genuine same-origin window (document_ only cleared on window reuse); cross-origin Wind…\n 'js:fetch', // Returns a Promise that rejects on network failure (and RaisesException); Promise<Response> is a true type.\n 'js:getComputedStyle', // getComputedStyle has no ExceptionState and always returns a CSSStyleDeclaration (empty for unknown pseudo-ele…\n 'js:history', // LocalDOMWindow::history lazily creates a History, never null; cross-origin access would throw only with a non…\n 'js:innerHeight', // long in IDL, number in TS.\n 'js:innerWidth', // long in IDL, number in TS.\n 'js:location', // Window.location is a non-null LegacyUnforgeable Location; the getter never throws or returns null on a genuin…\n 'js:matchMedia', // matchMedia(string) returns a new MediaQueryList for any string (unparsable queries yield \"not all\"), no Excep…\n 'js:navigator', // Window.navigator lazily creates and returns a non-null Navigator; no throw.\n 'js:performance', // Window.performance is a Replaceable readonly Performance attribute, non-null on a genuine window; getter does…\n 'js:prompt', // Blink prompt() has no ExceptionState and returns null when sandboxed/no page; string|null is exact (note: Ele…\n 'js:requestAnimationFrame', // Schedules the callback for later and returns a long id; no ExceptionState, nothing rethrown; number is exact.\n 'js:requestIdleCallback', // No RaisesException and IdleRequestOptions.timeout is a plain unsigned long (no EnforceRange); returns a numbe…\n 'js:self', // Replaceable Window self returns the window proxy; typed Window in lib.dom (judged on a genuine Window receive…\n 'js:setInterval', // String handler ([StringContext=TrustedScript] ScriptString) throws TypeError under enforced Trusted Types wit…\n 'js:setTimeout', // String handler ([StringContext=TrustedScript] ScriptString) throws TypeError under enforced Trusted Types wit…\n 'js:visualViewport', // Always returns the window DOMVisualViewport; declared VisualViewport | null is at least as wide.\n];\n\nexport const WEB_STRICT_DISTRUST_TYPE: readonly string[] = [\n 'js:AbstractWorker.onerror', // Declared handler type contains any in its return; ErrorEvent parameter can be a synthetic Event (type_unsound…\n 'js:Body.json', // return type contains any\n 'js:CustomEvent', // Constructor cannot throw (no ExceptionState); explicit <T> with no init makes detail null, so type is a cast.\n 'js:CustomEvent.detail', // Attribute read; typed `any` (IDL any, caller-defined payload via generic T) so type distrust.\n 'js:Document.body', // type distrust: IDL HTMLElement? can be null (e.g. after body.remove()) but TS says HTMLElement; getter itself…\n 'js:Document.createElement', // call distrust: invalid tag name throws InvalidCharacterError; type distrust (medium): non-HTML documents retu…\n 'js:Document.documentElement', // type distrust: IDL Element? but TS declares non-null HTMLElement; getter never throws.\n 'js:Document.getElementById', // call trust: lookup returns null when absent (tree_scope.cc:113), never throws; type distrust: IDL Element? bu…\n 'js:Document.getElementsByTagName', // call trust: no ExceptionState, always returns a live HTMLCollection; type distrust: tag-name maps ignore name…\n 'js:Element.closest', // closest('[') throws SyntaxError (value); <E> overload is a cast and tag-name overload ignores SVG/MathML name…\n 'js:Element.prototype', // Interface prototype object typed as an Element instance; getters throw TypeError.\n 'js:ErrorEvent.error', // declared type contains any\n 'js:HTMLElement.hidden', // Getter returns \"until-found\" (string) but TS declares boolean; setter is CEReactions (recorded hook).\n 'js:HTMLElement.prototype', // Prototype object is typed as an instance but is not a genuine HTMLElement (Illegal invocation on most members…\n 'js:HTMLTemplateElement.content', // Never throws; type mismatch: content() lazily creates the fragment only while an ExecutionContext exists, so …\n 'js:History.state', // declared type contains any\n 'js:MessageEvent.data', // Never throws; data is declared any (T defaults to any) and carries cross-context structured-clone data.\n 'js:Node.parentElement', // IDL returns Element?, so an SVG/MathML parent is not an HTMLElement; TS declaration is too narrow.\n 'js:ParentNode.querySelector', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:ParentNode.querySelectorAll', // Invalid selector string throws SyntaxError; the <E> overload is a cast and tag-name overloads ignore SVG name…\n 'js:PromiseRejectionEvent.reason', // declared type contains any\n 'js:Selection.getRangeAt', // Throws IndexSizeError for index >= rangeCount; also returns null on a detached-window selection though typed …\n 'js:Window.matchMedia', // Never throws (bad query just does not match), but returns null from a detached document so MediaQueryList is …\n 'js:sessionStorage', // Getter can throw SecurityError (sandbox/opaque origin) and returns null when DOM storage is disabled although…\n 'js:structuredClone', // Throws DataCloneError for functions/uncloneable values, and the clone is not a T for class instances (prototy…\n 'js:window', // call n/a (attribute); type distrust (mismatch: Blink returns null for window on a Window whose frame was remo…\n];\n","// Built-in presets, referenced from a trust config as `\"extend\": \"<name>\"` or `\"extend\": [\"<name>\", ...]`.\n// Presets may only carry trust/distrust and trust_type/distrust_type (no globs: those are relative to a project),\n// and may only extend presets (one name or an array of names).\n//\n// js language built-ins, the same in every runtime\n// node js + Node built-in APIs (audited member by member, see node-preset.generated.ts)\n// web js + browser APIs (audited, see web-preset.generated.ts); ignores failures that need a removed\n// frame, an enforced Trusted Types / storage policy or a non-HTML document\n// web_strict the same audit with every failure path counted\n// default alias of node, kept for existing configs\n// svelte Svelte 5 runes and svelte/store, svelte/reactivity; an add-on that extends nothing, so it is\n// combined with a runtime preset: `\"extend\": [\"web\", \"svelte\"]`\n//\n// `trust` and `trust_type` are two audits (see config.ts): \"cannot fail\" and \"its declared types are true\".\n// The js, web, web_strict and svelte presets have type-trust lists.\n//\n// A project with several runtimes points each area at its own trust config (ESLint flat-config `files`\n// blocks with different `configFile` options): server code extends `node`, frontend code extends `web`,\n// shared code extends `js`.\n\nimport { NODE_DISTRUST, NODE_TRUST } from './node-preset.generated.js';\nimport {\n WEB_DISTRUST,\n WEB_DISTRUST_TYPE,\n WEB_STRICT_DISTRUST,\n WEB_STRICT_DISTRUST_TYPE,\n WEB_STRICT_TRUST,\n WEB_STRICT_TRUST_TYPE,\n WEB_TRUST,\n WEB_TRUST_TYPE,\n} from './web-preset.generated.js';\n\nexport interface PresetDefinition {\n readonly $comment?: string;\n /** A preset name, or preset names applied left to right (a later one overrides an earlier one). */\n readonly extend?: string | readonly string[];\n readonly trust?: readonly string[];\n readonly distrust?: readonly string[];\n readonly trust_type?: readonly string[];\n readonly distrust_type?: readonly string[];\n}\n\nconst JS_PRESET: PresetDefinition = {\n $comment:\n 'Pure, in-memory JavaScript built-ins that cannot fail on typed input, in any runtime. ' +\n 'Deliberately NOT trusted: js:JSON (parse throws), js:URL, js:BigInt, js:structuredClone, ' +\n 'js:encodeURI*/decodeURI* (throw URIError), the AbortSignal constructor, AbortSignal.timeout ' +\n '(RangeError) and throwIfAborted (throws by design), the URLSearchParams constructor (a one-element ' +\n 'pair throws) and URLSearchParams.forEach (rethrows the callback), every npm package.',\n trust: [\n 'js:Array',\n 'js:ReadonlyArray',\n 'js:String',\n 'js:Number',\n 'js:Boolean',\n 'js:Math',\n 'js:Object',\n 'js:Map',\n 'js:ReadonlyMap',\n 'js:Set',\n 'js:ReadonlySet',\n 'js:WeakMap',\n 'js:WeakSet',\n 'js:Date',\n 'js:Error',\n 'js:RegExp',\n 'js:Promise',\n 'js:PromiseLike',\n 'js:Symbol',\n 'js:Iterator',\n 'js:IterableIterator',\n 'js:CallableFunction',\n 'js:Function',\n 'js:parseInt',\n 'js:parseFloat',\n 'js:isNaN',\n 'js:isFinite',\n // HTML timers as declared by lib.dom (a tsconfig without `types: [\"node\"]` resolves the globals here, not\n // to node:global.*). Same audit as the node preset entries: they only schedule or cancel; a typed delay\n // cannot throw and the callback runs later, outside this call. structuredClone stays untrusted (DataCloneError).\n 'js:setTimeout',\n 'js:clearTimeout',\n 'js:setInterval',\n 'js:clearInterval',\n 'js:queueMicrotask',\n // Web-standard classes, member-level where a member can fail (verified against Node's implementation\n // of the same WHATWG specs; see trust/research/node-api).\n 'js:AbortController',\n 'js:AbortSignal.abort',\n 'js:AbortSignal.any',\n 'js:AbortSignal.addEventListener',\n 'js:AbortSignal.removeEventListener',\n 'js:TextEncoder',\n 'js:URLSearchParams.append',\n 'js:URLSearchParams.delete',\n 'js:URLSearchParams.get',\n 'js:URLSearchParams.getAll',\n 'js:URLSearchParams.has',\n 'js:URLSearchParams.set',\n 'js:URLSearchParams.sort',\n 'js:URLSearchParams.toString',\n ],\n // Type trust is a separate audit: are the declared types true at runtime whenever the receiver and the\n // arguments have their declared types? These carry their types from what they are given (an array of\n // users maps over users) or return what the specification says. Deliberately NOT type-trusted:\n // js:JSON (parse returns `any`; stringify is declared `string` but returns undefined for undefined, a\n // function or a symbol), the `groups` of a regular-expression match (declared `string`, undefined for a\n // group that did not take part), js:structuredClone, js:Reflect, js:Proxy, and every DOM / web API\n // (js:fetch, js:Response, js:MessageEvent, js:Location, js:Storage, ...): their values come from outside.\n trust_type: [\n 'js:Array',\n 'js:ReadonlyArray',\n 'js:String',\n 'js:Number',\n 'js:Boolean',\n 'js:BigInt',\n 'js:Math',\n 'js:Object',\n 'js:Map',\n 'js:ReadonlyMap',\n 'js:Set',\n 'js:ReadonlySet',\n 'js:WeakMap',\n 'js:WeakSet',\n 'js:Date',\n 'js:Error',\n 'js:RegExp',\n 'js:RegExpMatchArray.index',\n 'js:RegExpMatchArray.input',\n 'js:RegExpExecArray.index',\n 'js:RegExpExecArray.input',\n 'js:Promise',\n 'js:PromiseLike',\n 'js:PromiseFulfilledResult',\n 'js:PromiseRejectedResult',\n 'js:Symbol',\n 'js:Iterator',\n 'js:IterableIterator',\n 'js:IteratorYieldResult',\n 'js:IteratorReturnResult',\n 'js:ArrayIterator',\n 'js:MapIterator',\n 'js:SetIterator',\n 'js:Generator',\n 'js:CallableFunction',\n 'js:NewableFunction',\n 'js:Function',\n 'js:parseInt',\n 'js:parseFloat',\n 'js:isNaN',\n 'js:isFinite',\n 'js:NaN',\n 'js:Infinity',\n 'js:setTimeout',\n 'js:setInterval',\n ],\n};\n\nconst NODE_PRESET: PresetDefinition = {\n $comment:\n 'js plus Node built-in APIs, audited member by member against the Node v24 source (v26 recorded): ' +\n 'a call is trusted only if typed arguments cannot make it throw or fail asynchronously. Whole-module ' +\n 'or whole-class entries are used only where every member was trusted. See node-preset.generated.ts. ' +\n 'That audit is about failing, not about types: no Node API is type-trusted yet (add the ones a project ' +\n 'relies on to its own \"trust_type\", e.g. node:path).',\n extend: 'js',\n trust: NODE_TRUST,\n distrust: NODE_DISTRUST,\n};\n\nconst WEB_PRESET: PresetDefinition = {\n $comment:\n 'js plus browser APIs, audited member by member against Blink (Chromium 130, Electron 33): call trust and ' +\n 'type trust. Failure paths that need a removed frame or window, an enforced Trusted Types / storage policy, ' +\n 'or a non-HTML document are ignored (use web_strict to count them). First pass: the DOM APIs a real Svelte ' +\n 'app uses; unaudited APIs stay untrusted. See web-preset.generated.ts.',\n extend: 'js',\n trust: WEB_TRUST,\n distrust: WEB_DISTRUST,\n trust_type: WEB_TRUST_TYPE,\n distrust_type: WEB_DISTRUST_TYPE,\n};\n\nconst WEB_STRICT_PRESET: PresetDefinition = {\n $comment:\n 'Same audit as web, but every failure path counts, including a removed frame or window, an enforced ' +\n 'Trusted Types / storage policy and a non-HTML document (so setTimeout, Storage.getItem and window are ' +\n 'untrusted). See web-preset.generated.ts.',\n extend: 'js',\n trust: WEB_STRICT_TRUST,\n distrust: WEB_STRICT_DISTRUST,\n trust_type: WEB_STRICT_TRUST_TYPE,\n distrust_type: WEB_STRICT_DISTRUST_TYPE,\n};\n\nconst DEFAULT_PRESET: PresetDefinition = {\n $comment: 'Alias of the node preset.',\n extend: 'node',\n};\n\n// Svelte 5. The runes are global functions declared at the top level of svelte's types/index.d.ts, so\n// their origins are `svelte.<rune>` and a rune's sub-rune is a member of it (`svelte.$state.raw`); an entry\n// for a rune covers its sub-runes. Module exports are named by their module (`svelte.tick`,\n// `svelte/store.writable`, `svelte/reactivity.SvelteMap`).\n//\n// It extends nothing: it is an add-on to a runtime preset (`[\"web\", \"svelte\"]`, `[\"default\", \"svelte\"]`).\n// Extending `js` would put `js` right after `svelte` in the chain and so ahead of `node` in\n// `[\"default\", \"svelte\"]` (a level reached twice keeps its first position).\nconst SVELTE_PRESET: PresetDefinition = {\n $comment:\n 'Svelte 5 runes, svelte.tick, svelte/store and the Map/Set/Date classes of svelte/reactivity. An add-on: ' +\n 'combine it with a runtime preset, e.g. \"extend\": [\"web\", \"svelte\"]. Deliberately NOT trusted: ' +\n 'svelte/reactivity.SvelteURL and SvelteURLSearchParams (their constructors throw like js:URL and ' +\n 'js:URLSearchParams), svelte.createContext (including its setter), fork, hydratable, mount/hydrate/unmount, motion and transition.draw. Type trust covers only the ' +\n 'runes that hand back the value they are given; $props is declared `any` and is left to type-claim.',\n trust: [\n // Runes are compiler instructions: the compiler replaces each call with its own runtime code, which\n // cannot fail on typed input. Calling one where Svelte does not allow it is a compile error, or for\n // $effect outside component initialisation or an $effect.root a deterministic error on first run\n // (effect_orphan), not a failure a caller handles. Callbacks given to a rune ($derived.by, $effect) are\n // checked where they are written.\n 'svelte.$state', // $state, $state.raw, $state.snapshot, $state.eager: create or copy reactive state\n 'svelte.$derived', // $derived, $derived.by: declare derived state\n 'svelte.$effect', // $effect, $effect.pre, $effect.root, $effect.tracking, $effect.pending: register or inspect effects\n 'svelte.$props', // $props, $props.id: read the component's props / a per-instance id\n 'svelte.$bindable', // marks a prop bindable, returns its fallback\n 'svelte.$inspect', // $inspect, $inspect.trace: development-only logging, removed from production builds\n 'svelte.untrack', // runs its callback with tracking disabled, restored in finally\n 'svelte.onMount', // registers a callback; throws only outside component initialization\n 'svelte.onDestroy', // registers teardown; throws only outside component initialization\n 'svelte.beforeUpdate', // registers a legacy hook; misuse-only errors\n 'svelte.afterUpdate', // registers a legacy hook; misuse-only errors\n 'svelte.createEventDispatcher', // creates a dispatcher; initialization misuse only\n 'svelte.getAbortSignal', // returns the current effect signal; effect-context misuse only\n 'svelte.setContext', // stores context; initialization misuse only\n 'svelte.getContext', // reads context; initialization misuse only\n 'svelte.hasContext', // tests context membership; initialization misuse only\n 'svelte.getAllContexts', // reads the context map; initialization misuse only\n 'svelte.flushSync', // flushes callbacks, whose bodies are checked where written\n 'svelte.settled', // waits for updates; its deferred is only resolved\n 'svelte.createRawSnippet', // wraps snippet callbacks, checked where written\n 'svelte.__renderSnippet', // CLI-only generated render wrapper; arguments and snippet bodies remain checked\n 'svelte/transition.fade', // computed styles and arithmetic only\n 'svelte/transition.fly', // computed styles and arithmetic only\n 'svelte/transition.slide', // computed styles and arithmetic only\n 'svelte/transition.blur', // computed styles and arithmetic only\n 'svelte/transition.scale', // computed styles and arithmetic only\n 'svelte/transition.crossfade', // styles, bounding rectangles and arithmetic only\n 'svelte/animate.flip', // bounding rectangles, styles and arithmetic only\n 'svelte/easing', // pure arithmetic\n 'svelte/attachments.createAttachmentKey', // creates a symbol\n 'svelte/attachments.fromAction', // wraps an action callback, checked where written\n 'svelte/events.on', // wraps addEventListener and returns teardown\n 'svelte.tick', // resolves once pending state changes are applied; effect bodies it flushes are checked where written\n 'svelte/store', // writable/readable/derived/get/readonly/fromStore/toStore and set/update/subscribe are in-memory;\n // subscriber and derive callbacks run synchronously but are checked where they are written (as js:Array.map's are)\n 'svelte/reactivity.SvelteMap', // Map semantics (js:Map is trusted by js), plus change signals\n 'svelte/reactivity.SvelteSet', // Set semantics (js:Set is trusted by js), plus change signals\n 'svelte/reactivity.SvelteDate', // Date semantics (js:Date is trusted by js: an invalid date is a value, not a throw)\n 'svelte/reactivity.createSubscriber', // returns a function that registers the given start callback\n ],\n // The runes that return what they are given: `$state(value)` and `$state.raw(value)` return `value` (as a\n // reactive proxy with the same shape, or as is), `$derived(expression)` returns the expression and\n // `$derived.by(fn)` what `fn` returns. The compiler erases the call, so the declared `T` is exactly the type\n // of the argument (or of the callback's return), which the type checker already checked. `svelte.$state`\n // also covers `$state.eager(value)`, which returns `value` as well.\n trust_type: ['svelte.$state', 'svelte.$state.raw', 'svelte.$derived', 'svelte.$derived.by'],\n // `$state.snapshot` returns a structured clone typed by a conditional approximation (`toJSON` results,\n // uncloneable values handed back as they are), not the value it is given.\n distrust_type: ['svelte.$state.snapshot'],\n};\n\nexport const PRESETS: Readonly<Record<string, PresetDefinition>> = {\n js: JS_PRESET,\n node: NODE_PRESET,\n web: WEB_PRESET,\n web_strict: WEB_STRICT_PRESET,\n default: DEFAULT_PRESET,\n svelte: SVELTE_PRESET,\n};\n","// Glob zones (passthrough / ignore), with the same matcher ESLint flat config uses for\n// `files`/`ignores`: minimatch with `{ dot: true }`, a leading `./` stripped, patterns relative\n// to the directory of the config file that declared them, `!pattern` re-includes (last match wins).\n// Paths are realpath-resolved and posix-normalized before matching.\nimport { readdirSync, realpathSync } from 'node:fs';\nimport { isAbsolute, join, relative, sep } from 'node:path';\nimport { Minimatch } from 'minimatch';\n\nexport type Zone = 'checked' | 'passthrough' | 'ignore' | 'external';\n\nexport interface ZoneGroup {\n /** Config file that declared the patterns (for error messages). */\n readonly source: string;\n /** Realpath of the directory the patterns are relative to. */\n readonly baseDir: string;\n readonly patterns: readonly string[];\n}\n\nconst MINIMATCH_OPTIONS = { dot: true } as const;\nconst SKIPPED_DIRECTORIES = new Set(['node_modules', '.git']);\nconst matcherCache = new Map<string, Minimatch>();\n\nfunction matcher(pattern: string): Minimatch {\n let cached = matcherCache.get(pattern);\n if (!cached) {\n cached = new Minimatch(pattern, MINIMATCH_OPTIONS);\n matcherCache.set(pattern, cached);\n }\n return cached;\n}\n\nexport function toPosix(path: string): string {\n return sep === '/' ? path : path.split(sep).join('/');\n}\n\nexport function realpathOrSelf(path: string): string {\n try {\n return realpathSync.native(path);\n } catch {\n return path;\n }\n}\n\n/** Normalizes one configured pattern; returns an error message for an invalid one. */\nexport function normalizePattern(raw: string): { pattern: string } | { error: string } {\n const negated = raw.startsWith('!');\n let body = negated ? raw.slice(1) : raw;\n if (body.startsWith('./')) body = body.slice(2);\n if (body.length === 0) return { error: `empty glob \"${raw}\"` };\n if (isAbsolute(body) || /^[A-Za-z]:[\\\\/]/.test(body)) {\n return { error: `glob \"${raw}\" must be relative to the config file's directory` };\n }\n if (body.startsWith('../')) return { error: `glob \"${raw}\" must not leave the config file's directory` };\n if (body.endsWith('/')) body = `${body}**`;\n return { pattern: negated ? `!${body}` : body };\n}\n\n/** Posix path of `absolutePath` relative to `baseDir`, or null when it lies outside. */\nexport function relativeInside(baseDir: string, absolutePath: string): string | null {\n const rel = toPosix(relative(baseDir, absolutePath));\n if (rel === '' || rel.startsWith('../') || rel === '..' || isAbsolute(rel)) return null;\n return rel;\n}\n\n/** ESLint `ignores` semantics: patterns apply in order, a `!pattern` match un-includes. */\nexport function matchesPatterns(patterns: readonly string[], rel: string): boolean {\n let included = false;\n for (const pattern of patterns) {\n if (pattern.startsWith('!')) {\n if (included && matcher(pattern.slice(1)).match(rel)) included = false;\n } else if (!included && matcher(pattern).match(rel)) {\n included = true;\n }\n }\n return included;\n}\n\nexport function groupMatches(group: ZoneGroup, absoluteRealPath: string): boolean {\n const rel = relativeInside(group.baseDir, absoluteRealPath);\n return rel !== null && matchesPatterns(group.patterns, rel);\n}\n\nconst MAGIC = /[*?[\\]{}()!+@]/;\n\nfunction staticPrefix(pattern: string): string {\n const parts = pattern.split('/');\n const fixed: string[] = [];\n for (let index = 0; index < parts.length - 1; index += 1) {\n if (MAGIC.test(parts[index])) break;\n fixed.push(parts[index]);\n }\n return fixed.join('/');\n}\n\nfunction* walkFiles(baseDir: string, prefix: string): Generator<string> {\n const start = prefix ? join(baseDir, prefix) : baseDir;\n const stack = [start];\n while (stack.length > 0) {\n const directory = stack.pop() as string;\n let entries;\n try {\n entries = readdirSync(directory, { withFileTypes: true });\n } catch {\n continue;\n }\n for (const entry of entries) {\n const full = join(directory, entry.name);\n if (entry.isDirectory()) {\n if (!SKIPPED_DIRECTORIES.has(entry.name)) stack.push(full);\n } else {\n yield toPosix(relative(baseDir, full));\n }\n }\n }\n}\n\n/** True when at least one file under `baseDir` (node_modules and .git skipped) matches `pattern`. */\nexport function patternMatchesAnyFile(baseDir: string, pattern: string): boolean {\n const body = pattern.startsWith('!') ? pattern.slice(1) : pattern;\n const compiled = matcher(body);\n for (const rel of walkFiles(baseDir, staticPrefix(body))) {\n if (compiled.match(rel)) return true;\n }\n return false;\n}\n\nexport class Zones {\n private readonly cache = new Map<string, Zone>();\n\n constructor(\n /** Realpath of the project root (directory of the leaf trust config). */\n readonly rootDir: string,\n private readonly passthrough: readonly ZoneGroup[],\n private readonly ignore: readonly ZoneGroup[],\n readonly virtualPaths: ReadonlyMap<string, string> = new Map(),\n ) {}\n\n /** Zone of a file. Ignore wins over passthrough; files outside the root or in node_modules are external. */\n zoneOf(fileName: string): Zone {\n const cached = this.cache.get(fileName);\n if (cached) return cached;\n const zone = this.compute(fileName);\n this.cache.set(fileName, zone);\n return zone;\n }\n\n /** Project-relative posix path (for `local:` origins and baselines), or the absolute path when outside. */\n relativePath(fileName: string): string {\n const real = realpathOrSelf(this.virtualPaths.get(fileName) ?? fileName);\n return relativeInside(this.rootDir, real) ?? toPosix(real);\n }\n\n private compute(fileName: string): Zone {\n const real = realpathOrSelf(this.virtualPaths.get(fileName) ?? fileName);\n const rel = relativeInside(this.rootDir, real);\n if (rel === null || rel.split('/').includes('node_modules')) return 'external';\n if (this.ignore.some((group) => groupMatches(group, real))) return 'ignore';\n if (this.passthrough.some((group) => groupMatches(group, real))) return 'passthrough';\n return 'checked';\n }\n}\n","export const balanced = (\n a: string | RegExp,\n b: string | RegExp,\n str: string,\n) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b\n\n const r = ma !== null && mb != null && range(ma, mb, str)\n\n return (\n r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n }\n )\n}\n\nconst maybeMatch = (reg: RegExp, str: string) => {\n const m = str.match(reg)\n return m ? m[0] : null\n}\n\nexport const range = (\n a: string,\n b: string,\n str: string,\n): undefined | [number, number] => {\n let begs: number[],\n beg: number | undefined,\n left: number,\n right: number | undefined = undefined,\n result: undefined | [number, number]\n let ai = str.indexOf(a)\n let bi = str.indexOf(b, ai + 1)\n let i = ai\n\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi]\n }\n begs = []\n left = str.length\n\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i)\n ai = str.indexOf(a, i + 1)\n } else if (begs.length === 1) {\n const r = begs.pop()\n if (r !== undefined) result = [r, bi]\n } else {\n beg = begs.pop()\n if (beg !== undefined && beg < left) {\n left = beg\n right = bi\n }\n\n bi = str.indexOf(b, i + 1)\n }\n\n i = ai < bi && ai >= 0 ? ai : bi\n }\n\n if (begs.length && right !== undefined) {\n result = [left, right]\n }\n }\n\n return result\n}\n","import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\n// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An\n// input like `'{a,b}'.repeat(1500)` stays under that count - its output is\n// truncated to 100k results - while making every result ~1500 characters\n// long. The result set, and the intermediate arrays built while combining\n// brace sets, then grow large enough to exhaust memory and crash the process\n// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of\n// characters the accumulator may hold at any point, so memory stays flat no\n// matter how many brace groups are chained. The limit sits well above any\n// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M\n// characters) so legitimate input is unaffected.\nexport const EXPANSION_MAX_LENGTH = 4_000_000\n\n// `expand_` recurses once per level of brace *nesting* - both when expanding a\n// set's comma members and when re-wrapping a set whose body is a single part.\n// The CVE-2026-14257 fix made the *tail* iterative (recursion on `m.post`, one\n// level per chained group), which left nesting depth unbounded: about 3,100\n// levels of `{{{...a,b...}}}` - only ~6KB of input - exhausted the native stack\n// and crashed the process. `EXPANSION_MAX_DEPTH` bounds how deep the parser\n// will follow nesting. It sits far above any realistic pattern and well below\n// the depth at which the stack runs out.\nexport const EXPANSION_MAX_DEPTH = 1_000\n\n// Bash keeps a quirk where a brace group followed by a comma set still expands\n// (`{a},b}`). The parser implements it by rewriting the string and restarting\n// the scan, absorbing one `}` per pass. `n` trailing braces therefore cost `n`\n// full passes over a string that itself grows by one `escClose` sentinel each\n// time - quadratic in `n`, with a ~26x constant from the sentinel's length.\n// 128KB of `'{a}' + '}'.repeat(n) + ',z}'` blocked the event loop for 27\n// seconds to produce two results. `EXPANSION_MAX_REWRITES` bounds how many\n// times the scan may restart. Real `{a},b}` input needs a handful.\nexport const EXPANSION_MAX_REWRITES = 1_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n// Like `target.push(...items)` but doesn't overflow the stack\nfunction pushAll(target: string[], items: string[]) {\n for (let i = 0; i < items.length; i++) {\n target.push(items[i] as string)\n }\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n const parts: string[] = []\n\n // Walk the brace groups iteratively. Recursing on `post` once per group let a\n // chain of them exhaust the stack - the parsing-side counterpart to\n // the `expand_` overflow fixed for CVE-2026-14257, and not something `max` or\n // `maxLength` can bound, since it happens before expansion.\n //\n // The part the next chunk continues\n let carry = ''\n\n for (;;) {\n const m = balanced('{', '}', str)\n\n if (!m) {\n const tail = str.split(',')\n tail[0] = carry + (tail[0] as string)\n pushAll(parts, tail)\n return parts\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n p[0] = carry + (p[0] as string)\n p[p.length - 1] += '{' + body + '}'\n\n if (!post.length) {\n pushAll(parts, p)\n return parts\n }\n\n carry = p.pop() as string\n pushAll(parts, p)\n str = post\n }\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n maxLength?: number\n maxDepth?: number\n maxRewrites?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const {\n max = EXPANSION_MAX,\n maxLength = EXPANSION_MAX_LENGTH,\n maxDepth = EXPANSION_MAX_DEPTH,\n maxRewrites = EXPANSION_MAX_REWRITES,\n } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(\n escapeBraces(str),\n max,\n maxLength,\n maxDepth,\n 0,\n maxRewrites,\n true,\n ).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\n// Build `{ acc[a] + pre + values[v] }` for every combination, capping the\n// number of results at `max` and the total number of characters at `maxLength`.\n// This is the one place output grows, so bounding it here keeps the single\n// accumulator - and therefore memory - flat regardless of how many brace groups\n// are combined (CVE-2026-14257).\nfunction combine(\n acc: string[],\n pre: string,\n values: string[],\n max: number,\n maxLength: number,\n dropEmpties: boolean,\n): string[] {\n const out: string[] = []\n let length = 0\n for (let a = 0; a < acc.length; a++) {\n for (let v = 0; v < values.length; v++) {\n if (out.length >= max) return out\n const expansion = (acc[a] as string) + pre + values[v]\n // Bash drops empty results at the top level. Skip them before they count\n // against `max`, so `max` bounds the number of *kept* results.\n if (dropEmpties && !expansion) continue\n if (length + expansion.length > maxLength) return out\n out.push(expansion)\n length += expansion.length\n }\n }\n return out\n}\n\n// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`)\n// sequence body.\nfunction expandSequence(\n body: string,\n isAlphaSequence: boolean,\n max: number,\n maxLength: number,\n): string[] {\n const n = body.split(/\\.\\./)\n const N: string[] = []\n // A sequence body always splits into two or three parts, but the compiler\n // can't know that.\n /* c8 ignore start */\n if (n[0] === undefined || n[1] === undefined) {\n return N\n }\n /* c8 ignore stop */\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n let length = 0\n for (let i = x; test(i, y) && N.length < max; i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n if (length + c.length > maxLength) break\n N.push(c)\n length += c.length\n }\n return N\n}\n\nfunction expand_(\n str: string,\n max: number,\n maxLength: number,\n maxDepth: number,\n depth: number,\n maxRewrites: number,\n isTop: boolean,\n): string[] {\n // Too deeply nested to keep following: treat the rest as literal, the same\n // way a group that cannot expand is already handled. Truncating rather than\n // throwing keeps `expand` total, matching `max` and `maxLength`.\n if (depth > maxDepth) {\n return [str]\n }\n\n // Consume the string's top-level brace groups left to right, threading a\n // running set of combined prefixes (`acc`). Expanding the tail iteratively -\n // rather than recursing on `m.post` once per group - keeps the native stack\n // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no\n // longer overflow the stack, and leaves a single accumulator whose size\n // `maxLength` bounds directly (CVE-2026-14257).\n let acc: string[] = ['']\n\n // Bash drops empty results, but only when the *first* top-level group is a\n // comma set - a sequence like `{a..\\}` may legitimately yield ''. The drop\n // is on the final strings, so it is applied to whichever `combine` produces\n // them (the one with no brace set left in the tail).\n // How many times the `{a},b}` rewrite below has restarted the scan. Each pass\n // re-reads the whole string, so leaving this unbounded is quadratic.\n let rewrites = 0\n let dropEmpties = false\n let firstGroup = true\n\n for (;;) {\n const m = balanced('{', '}', str)\n\n // No brace set left: the rest of the string is literal.\n if (!m) {\n return combine(acc, str, [''], max, maxLength, dropEmpties)\n }\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n\n if (/\\$$/.test(pre)) {\n acc = combine(\n acc,\n pre + '{' + m.body + '}',\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n firstGroup = false\n if (!m.post.length) break\n str = m.post\n continue\n }\n\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (rewrites < maxRewrites && m.post.match(/,(?!,).*\\}/)) {\n rewrites++\n str = m.pre + '{' + m.body + escClose + m.post\n isTop = true\n continue\n }\n // Nothing here expands, so the whole remaining string is literal.\n return combine(\n acc,\n pre + '{' + m.body + '}' + m.post,\n [''],\n max,\n maxLength,\n dropEmpties,\n )\n }\n\n if (firstGroup) {\n dropEmpties = isTop && !isSequence\n firstGroup = false\n }\n\n let values: string[]\n if (isSequence) {\n values = expandSequence(m.body, isAlphaSequence, max, maxLength)\n } else {\n let n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(\n n[0],\n max,\n maxLength,\n maxDepth,\n depth + 1,\n maxRewrites,\n false,\n ).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n acc = combine(\n acc,\n pre + n[0],\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n if (!m.post.length) break\n str = m.post\n continue\n }\n /* c8 ignore stop */\n }\n\n // Values that `combine` is going to drop as empty produce no result, so\n // they must not count against `max` - otherwise `{a,,b}` with `max: 2`\n // would stop at `['a', '']` and yield one result instead of two. Skipping\n // them outright keeps `values` bounded while leaving `max` a bound on\n // *kept* results.\n let dropsEmpties = dropEmpties && !m.post.length && !pre\n for (let d = 0; dropsEmpties && d < acc.length; d++) {\n if (acc[d]) {\n dropsEmpties = false\n }\n }\n\n values = []\n let valuesLength = 0\n outer: for (let j = 0; j < n.length; j++) {\n const expanded = expand_(\n n[j] as string,\n max,\n maxLength,\n maxDepth,\n depth + 1,\n maxRewrites,\n false,\n )\n for (let k = 0; k < expanded.length; k++) {\n const v = expanded[k] as string\n if (dropsEmpties && !v) continue\n if (\n values.length >= max ||\n valuesLength + v.length > maxLength\n ) {\n break outer\n }\n values.push(v)\n valuesLength += v.length\n }\n }\n }\n\n acc = combine(\n acc,\n pre,\n values,\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n if (!m.post.length) break\n str = m.post\n }\n\n return acc\n}\n","const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: unknown) => void = (\n pattern: unknown,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { <posix class>: [<translation>, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } =\n {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n }\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number,\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c<more...>] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n","import type { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = true,\n }: Pick<MinimatchOptions, 'windowsPathsNoEscape' | 'magicalBraces'> = {},\n) => {\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/\\[([^/\\\\])\\]/g, '$1')\n : s\n .replace(/((?!\\\\).|^)\\[([^/\\\\])\\]/g, '$1$2')\n .replace(/\\\\([^/])/g, '$1')\n }\n return windowsPathsNoEscape ?\n s.replace(/\\[([^/\\\\{}])\\]/g, '$1')\n : s\n .replace(/((?!\\\\).|^)\\[([^/\\\\{}])\\]/g, '$1$2')\n .replace(/\\\\([^/{}])/g, '$1')\n}\n","// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport type { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set<ExtglobType>(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string | null): c is ExtglobType =>\n types.has(c as ExtglobType)\nconst isExtglobAST = (c: AST): c is AST & { type: ExtglobType } =>\n isExtglobType(c.type)\n\n// Map of which extglob types can adopt the children of a nested extglob\n//\n// anything but ! can adopt a matching type:\n// +(a|+(b|c)|d) => +(a|b|c|d)\n// *(a|*(b|c)|d) => *(a|b|c|d)\n// @(a|@(b|c)|d) => @(a|b|c|d)\n// ?(a|?(b|c)|d) => ?(a|b|c|d)\n//\n// * can adopt anything, because 0 or repetition is allowed\n// *(a|?(b|c)|d) => *(a|b|c|d)\n// *(a|+(b|c)|d) => *(a|b|c|d)\n// *(a|@(b|c)|d) => *(a|b|c|d)\n//\n// + can adopt @, because 1 or repetition is allowed\n// +(a|@(b|c)|d) => +(a|b|c|d)\n//\n// + and @ CANNOT adopt *, because 0 would be allowed\n// +(a|*(b|c)|d) => would match \"\", on *(b|c)\n// @(a|*(b|c)|d) => would match \"\", on *(b|c)\n//\n// + and @ CANNOT adopt ?, because 0 would be allowed\n// +(a|?(b|c)|d) => would match \"\", on ?(b|c)\n// @(a|?(b|c)|d) => would match \"\", on ?(b|c)\n//\n// ? can adopt @, because 0 or 1 is allowed\n// ?(a|@(b|c)|d) => ?(a|b|c|d)\n//\n// ? and @ CANNOT adopt * or +, because >1 would be allowed\n// ?(a|*(b|c)|d) => would match bbb on *(b|c)\n// @(a|*(b|c)|d) => would match bbb on *(b|c)\n// ?(a|+(b|c)|d) => would match bbb on +(b|c)\n// @(a|+(b|c)|d) => would match bbb on +(b|c)\n//\n// ! CANNOT adopt ! (nothing else can either)\n// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)\n//\n// ! can adopt @\n// !(a|@(b|c)|d) => !(a|b|c|d)\n//\n// ! CANNOT adopt *\n// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt +\n// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt ?\n// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match \"x\"\nconst adoptionMap = new Map<ExtglobType, ExtglobType[]>([\n ['!', ['@']],\n ['?', ['?', '@']],\n ['@', ['@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@']],\n])\n\n// nested extglobs that can be adopted in, but with the addition of\n// a blank '' element.\nconst adoptionWithSpaceMap = new Map<ExtglobType, ExtglobType[]>([\n ['!', ['?']],\n ['@', ['?']],\n ['+', ['?', '*']],\n])\n\n// union of the previous two maps\nconst adoptionAnyMap = new Map<ExtglobType, ExtglobType[]>([\n ['!', ['?', '@']],\n ['?', ['?', '@']],\n ['@', ['?', '@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@', '?', '*']],\n])\n\n// Extglobs that can take over their parent if they are the only child\n// the key is parent, value maps child to resulting extglob parent type\n// '@' is omitted because it's a special case. An `@` extglob with a single\n// member can always be usurped by that subpattern.\nconst usurpMap = new Map<\n ExtglobType,\n Map<ExtglobType | null, ExtglobType | null>\n>([\n ['!', new Map([['!', '@']])],\n [\n '?',\n new Map([\n ['*', '*'],\n ['+', '*'],\n ]),\n ],\n [\n '@',\n new Map([\n ['!', '!'],\n ['?', '?'],\n ['@', '@'],\n ['*', '*'],\n ['+', '+'],\n ]),\n ],\n [\n '+',\n new Map([\n ['?', '*'],\n ['*', '*'],\n ]),\n ],\n])\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nlet ID = 0\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n #parent?: AST\n #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n id = ++ID\n\n get depth(): number {\n return (this.#parent?.depth ?? -1) + 1\n }\n\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return {\n '@@type': 'AST',\n id: this.id,\n type: this.type,\n root: this.#root.id,\n parent: this.#parent?.id,\n depth: this.depth,\n partsLength: this.#parts.length,\n parts: this.#parts,\n }\n }\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n return (\n this.#toString !== undefined ? this.#toString\n : !this.type ?\n (this.#toString = this.#parts.map(p => String(p)).join(''))\n : (this.#toString =\n this.type +\n '(' +\n this.#parts.map(p => String(p)).join('|') +\n ')')\n )\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (\n typeof p !== 'string' &&\n !(p instanceof AST && p.#parent === this)\n ) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: unknown[] =\n this.type === null ?\n this.#parts\n .slice()\n .map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions,\n extDepth: number,\n ): number {\n const maxDepth = opt.maxExtglobRecursion ?? 2\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n // we don't have to check for adoption here, because that's\n // done at the other recursion point.\n const doRecurse =\n !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n extDepth <= maxDepth\n if (doRecurse) {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt, extDepth + 1)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n const doRecurse =\n !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n /* c8 ignore start - the maxDepth is sufficient here */\n (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)))\n /* c8 ignore stop */\n if (doRecurse) {\n const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt, extDepth + depthAdd)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n #canAdoptWithSpace(child?: AST | string): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n return this.#canAdopt(child, adoptionWithSpaceMap)\n }\n\n #canAdopt(\n child?: AST | string,\n map: Map<ExtglobType, ExtglobType[]> = adoptionMap,\n ): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n if (\n !child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null\n ) {\n return false\n }\n const gc = child.#parts[0]\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false\n }\n return (this as AST & { type: ExtglobType }).#canAdoptType(\n gc.type,\n map,\n )\n }\n #canAdoptType(\n c: string,\n map: Map<ExtglobType, ExtglobType[]> = adoptionAnyMap,\n ): c is ExtglobType {\n return !!map.get(this.type as ExtglobType)?.includes(c as ExtglobType)\n }\n\n #adoptWithSpace(\n this: AST & { type: ExtglobType },\n child: AST & {\n type: null\n },\n index: number,\n ) {\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n const blank = new AST(null, gc, this.options)\n blank.#parts.push('')\n gc.push(blank)\n this.#adopt(child, index)\n }\n\n #adopt(\n child: AST & {\n type: null\n },\n index: number,\n ) {\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n this.#parts.splice(index, 1, ...gc.#parts)\n for (const p of gc.#parts) {\n if (typeof p === 'object') p.#parent = this\n }\n this.#toString = undefined\n }\n\n #canUsurpType(c: string): boolean {\n const m = usurpMap.get(this.type as ExtglobType)\n return !!m?.has(c as ExtglobType)\n }\n\n #canUsurp(child?: AST | string): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n if (\n !child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1\n ) {\n return false\n }\n const gc = child.#parts[0]\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false\n }\n return (this as AST & { type: ExtglobType }).#canUsurpType(gc.type)\n }\n\n #usurp(this: AST & { type: ExtglobType }, child: AST & { type: null }) {\n const m = usurpMap.get(this.type as ExtglobType)\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n const nt = m?.get(gc.type)\n /* c8 ignore start - impossible */\n if (!nt) return false\n /* c8 ignore stop */\n this.#parts = gc.#parts\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#parent = this\n }\n }\n this.type = nt\n this.#toString = undefined\n this.#emptyExt = false\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options, 0)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) {\n this.#flatten()\n this.#fillNegs()\n }\n if (!isExtglobAST(this)) {\n const noEmpty =\n this.isStart() &&\n this.isEnd() &&\n !this.#parts.some(s => typeof s !== 'string')\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string' ?\n AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start =\n needNoTrav ? startNoTraversal\n : needNoDot ? startNoDot\n : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = (this as AST & { type: ExtglobType }).#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n const me = this as AST\n me.#parts = [s]\n me.type = null\n me.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot ?\n ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!' ?\n // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@' ? ')'\n : this.type === '?' ? ')?'\n : this.type === '+' && bodyDotAllowed ? ')'\n : this.type === '*' && bodyDotAllowed ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#flatten()\n }\n }\n } else {\n // do up to 10 passes to flatten as much as possible\n let iterations = 0\n let done = false\n do {\n done = true\n for (let i = 0; i < this.#parts.length; i++) {\n const c = this.#parts[i]\n if (typeof c === 'object') {\n c.#flatten()\n if (this.#canAdopt(c)) {\n done = false\n this.#adopt(c, i)\n } else if (this.#canAdoptWithSpace(c)) {\n done = false\n ;(this as AST & { type: ExtglobType }).#adoptWithSpace(c, i)\n } else if (this.#canUsurp(c)) {\n done = false\n ;(this as AST & { type: ExtglobType }).#usurp(c)\n }\n }\n }\n } while (!done && ++iterations < 10)\n }\n this.#toString = undefined\n }\n\n #partsToRegExp(this: AST & { type: ExtglobType }, dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n // multiple stars that aren't globstars coalesce into one *\n let inStar = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '*') {\n if (inStar) continue\n inStar = true\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star\n hasMagic = true\n continue\n } else {\n inStar = false\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n","import type { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = false,\n }: Pick<MinimatchOptions, 'windowsPathsNoEscape' | 'magicalBraces'> = {},\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]{}]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n }\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n","import { expand } from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport type { ExtglobType } from './ast.js'\nimport { AST } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n | 'aix'\n | 'android'\n | 'darwin'\n | 'freebsd'\n | 'haiku'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | 'cygwin'\n | 'netbsd'\n\nexport interface MinimatchOptions {\n /** do not expand `{x,y}` style braces */\n nobrace?: boolean\n /** do not treat patterns starting with `#` as a comment */\n nocomment?: boolean\n /** do not treat patterns starting with `!` as a negation */\n nonegate?: boolean\n /** print LOTS of debugging output */\n debug?: boolean\n /** treat `**` the same as `*` */\n noglobstar?: boolean\n /** do not expand extglobs like `+(a|b)` */\n noext?: boolean\n /** return the pattern if nothing matches */\n nonull?: boolean\n /** treat `\\\\` as a path separator, not an escape character */\n windowsPathsNoEscape?: boolean\n /**\n * inverse of {@link MinimatchOptions.windowsPathsNoEscape}\n * @deprecated\n */\n allowWindowsEscape?: boolean\n /**\n * Compare a partial path to a pattern. As long as the parts\n * of the path that are present are not contradicted by the\n * pattern, it will be treated as a match. This is useful in\n * applications where you're walking through a folder structure,\n * and don't yet have the full path, but want to ensure that you\n * do not walk down paths that can never be a match.\n */\n partial?: boolean\n /** allow matches that start with `.` even if the pattern does not */\n dot?: boolean\n /** ignore case */\n nocase?: boolean\n /** ignore case only in wildcard patterns */\n nocaseMagicOnly?: boolean\n /** consider braces to be \"magic\" for the purpose of `hasMagic` */\n magicalBraces?: boolean\n /**\n * If set, then patterns without slashes will be matched\n * against the basename of the path if it contains slashes.\n * For example, `a?b` would match the path `/xyz/123/acb`, but\n * not `/xyz/acb/123`.\n */\n matchBase?: boolean\n /** invert the results of negated matches */\n flipNegate?: boolean\n /** do not collapse multiple `/` into a single `/` */\n preserveMultipleSlashes?: boolean\n /**\n * A number indicating the level of optimization that should be done\n * to the pattern prior to parsing and using it for matches.\n */\n optimizationLevel?: number\n /** operating system platform */\n platform?: Platform\n /**\n * When a pattern starts with a UNC path or drive letter, and in\n * `nocase:true` mode, do not convert the root portions of the\n * pattern into a case-insensitive regular expression, and instead\n * leave them as strings.\n *\n * This is the default when the platform is `win32` and\n * `nocase:true` is set.\n */\n windowsNoMagicRoot?: boolean\n /**\n * max number of `{...}` patterns to expand. Default 100_000.\n */\n braceExpandMax?: number\n /**\n * Max number of non-adjacent `**` patterns to recursively walk down.\n *\n * The default of 200 is almost certainly high enough for most purposes,\n * and can handle absurdly excessive patterns.\n */\n maxGlobstarRecursion?: number\n\n /**\n * Max depth to traverse for nested extglobs like `*(a|b|c)`\n *\n * Default is 2, which is quite low, but any higher value\n * swiftly results in punishing performance impacts. Note\n * that this is *not* relevant when the globstar types can\n * be safely coalesced into a single set.\n *\n * For example, `*(a|@(b|c)|d)` would be flattened into\n * `*(a|b|c|d)`. Thus, many common extglobs will retain good\n * performance and never hit this limit, even if they are\n * excessively deep and complicated.\n *\n * If the limit is hit, then the extglob characters are simply\n * not parsed, and the pattern effectively switches into\n * `noextglob: true` mode for the contents of that nested\n * sub-pattern. This will typically _not_ result in a match,\n * but is considered a valid trade-off for security and\n * performance.\n */\n maxExtglobRecursion?: number\n}\n\nexport const minimatch = (\n p: string,\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?*[(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) =>\n !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) =>\n f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) =>\n f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?*[(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n typeof process === 'object' && process ?\n (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix') as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep =\n defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n (pattern: string, options: MinimatchOptions = {}) =>\n (p: string) =>\n minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n orig(p, pattern, ext(def, options))\n\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern: string, options: MinimatchOptions = {}) {\n super(pattern, ext(def, options))\n }\n static defaults(options: MinimatchOptions) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n },\n\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n super(type, parent, ext(def, options))\n }\n /* c8 ignore stop */\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options))\n }\n },\n\n unescape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.unescape(s, ext(def, options)),\n\n escape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.escape(s, ext(def, options)),\n\n filter: (pattern: string, options: MinimatchOptions = {}) =>\n orig.filter(pattern, ext(def, options)),\n\n defaults: (options: MinimatchOptions) =>\n orig.defaults(ext(def, options)),\n\n makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n orig.makeRe(pattern, ext(def, options)),\n\n braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n orig.braceExpand(pattern, ext(def, options)),\n\n match: (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n ) => orig.match(list, pattern, ext(def, options)),\n\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li <https://github.com/yetingli> for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern, { max: options.braceExpandMax })\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n const mm = new Minimatch(pattern, options)\n list = list.filter(f => mm.match(f))\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n _src?: string\n _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n options: MinimatchOptions\n set: ParseReturnFiltered[][]\n pattern: string\n\n windowsPathsNoEscape: boolean\n nonegate: boolean\n negate: boolean\n comment: boolean\n empty: boolean\n preserveMultipleSlashes: boolean\n partial: boolean\n globSet: string[]\n globParts: string[][]\n nocase: boolean\n\n isWindows: boolean\n platform: Platform\n windowsNoMagicRoot: boolean\n maxGlobstarRecursion: number\n\n regexp: false | null | MMRegExp\n constructor(pattern: string, options: MinimatchOptions = {}) {\n assertValidPattern(pattern)\n\n options = options || {}\n this.options = options\n this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200\n this.pattern = pattern\n this.platform = options.platform || defaultPlatform\n this.isWindows = this.platform === 'win32'\n // avoid the annoying deprecation flag lol\n const awe = ('allowWindow' + 'sEscape') as keyof MinimatchOptions\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options[awe] === false\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/')\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n this.regexp = null\n this.negate = false\n this.nonegate = !!options.nonegate\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n this.nocase = !!this.options.nocase\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined ?\n options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase)\n\n this.globSet = []\n this.globParts = []\n this.set = []\n\n // make the set of regexps etc.\n this.make()\n }\n\n hasMagic(): boolean {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string') return true\n }\n }\n return false\n }\n\n debug(..._: unknown[]) {}\n\n make() {\n const pattern = this.pattern\n const options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())]\n\n if (options.debug) {\n //oxlint-disable-next-line no-console\n this.debug = (...args: unknown[]) => console.error(...args)\n }\n\n this.debug(this.pattern, this.globSet)\n\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n this.globParts = this.preprocess(rawGlobParts)\n this.debug(this.pattern, this.globParts)\n\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC =\n s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3])\n const isDrive = /^[a-z]:/i.test(s[0])\n if (isUNC) {\n return [\n ...s.slice(0, 4),\n ...s.slice(4).map(ss => this.parse(ss)),\n ]\n } else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n }\n }\n return s.map(ss => this.parse(ss))\n })\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n this.set = set.filter(\n s => s.indexOf(false) === -1,\n ) as ParseReturnFiltered[][]\n\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i]\n if (\n p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])\n ) {\n p[2] = '?'\n }\n }\n }\n\n this.debug(this.pattern, this.set)\n }\n\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts: string[][]) {\n // if we're not in globstar mode, then turn ** into *\n if (this.options.noglobstar) {\n for (const partset of globParts) {\n for (let j = 0; j < partset.length; j++) {\n if (partset[j] === '**') {\n partset[j] = '*'\n }\n }\n }\n }\n\n const { optimizationLevel = 1 } = this.options\n\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts)\n globParts = this.secondPhasePreProcess(globParts)\n } else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts)\n } else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts)\n }\n\n return globParts\n }\n\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs\n while (parts[i + 1] === '**') {\n i++\n }\n if (i !== gs) {\n parts.splice(gs, i - gs)\n }\n }\n return parts\n })\n }\n\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n parts = parts.reduce((set: string[], part) => {\n const prev = set[set.length - 1]\n if (part === '**' && prev === '**') {\n return set\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop()\n return set\n }\n }\n set.push(part)\n return set\n }, [])\n return parts.length === 0 ? [''] : parts\n })\n }\n\n levelTwoFileOptimize(parts: string | string[]) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts)\n }\n let didSomething: boolean = false\n\n do {\n didSomething = false\n // <pre>/<e>/<rest> -> <pre>/<rest>\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i]\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '') continue\n if (p === '.' || p === '') {\n didSomething = true\n parts.splice(i, 1)\n i--\n }\n }\n if (\n parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')\n ) {\n didSomething = true\n parts.pop()\n }\n }\n\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd: number = 0\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1]\n if (\n p &&\n p !== '.' &&\n p !== '..' &&\n p !== '**' &&\n !(this.isWindows && /^[a-z]:$/i.test(p))\n ) {\n didSomething = true\n parts.splice(dd - 1, 2)\n dd -= 2\n }\n }\n } while (didSomething)\n return parts.length === 0 ? [''] : parts\n }\n\n // First phase: single-pattern processing\n // <pre> is 1 or more portions\n // <rest> is 1 or more portions\n // <p> is any portion other than ., .., '', or **\n // <e> is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n // <pre>/<e>/<rest> -> <pre>/<rest>\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n // **/**/<rest> -> **/<rest>\n //\n // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow\n // this WOULD be allowed if ** did follow symlinks, or * didn't\n firstPhasePreProcess(globParts: string[][]) {\n let didSomething = false\n do {\n didSomething = false\n // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n // <pre>/**/**/<rest> -> <pre>/**/<rest>\n gss++\n }\n // eg, if gs is 2 and gss is 4, that means we have 3 **\n // parts, and can remove 2 of them.\n if (gss > gs) {\n parts.splice(gs + 1, gss - gs)\n }\n\n let next = parts[gs + 1]\n const p = parts[gs + 2]\n const p2 = parts[gs + 3]\n if (next !== '..') continue\n if (\n !p ||\n p === '.' ||\n p === '..' ||\n !p2 ||\n p2 === '.' ||\n p2 === '..'\n ) {\n continue\n }\n didSomething = true\n // edit parts in place, and push the new one\n parts.splice(gs, 1)\n const other = parts.slice(0)\n other[gs] = '**'\n globParts.push(other)\n gs--\n }\n\n // <pre>/<e>/<rest> -> <pre>/<rest>\n if (!this.preserveMultipleSlashes) {\n for (let i = 1; i < parts.length - 1; i++) {\n const p = parts[i]\n // don't squeeze out UNC patterns\n if (i === 1 && p === '' && parts[0] === '') continue\n if (p === '.' || p === '') {\n didSomething = true\n parts.splice(i, 1)\n i--\n }\n }\n if (\n parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')\n ) {\n didSomething = true\n parts.pop()\n }\n }\n\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd: number = 0\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1]\n if (p && p !== '.' && p !== '..' && p !== '**') {\n didSomething = true\n const needDot = dd === 1 && parts[dd + 1] === '**'\n const splin = needDot ? ['.'] : []\n parts.splice(dd - 1, 2, ...splin)\n if (parts.length === 0) parts.push('')\n dd -= 2\n }\n }\n }\n } while (didSomething)\n\n return globParts\n }\n\n // second phase: multi-pattern dedupes\n // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>\n // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>\n // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>\n //\n // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>\n // ^-- not valid because ** doens't follow symlinks\n secondPhasePreProcess(globParts: string[][]): string[][] {\n for (let i = 0; i < globParts.length - 1; i++) {\n for (let j = i + 1; j < globParts.length; j++) {\n const matched = this.partsMatch(\n globParts[i],\n globParts[j],\n !this.preserveMultipleSlashes,\n )\n if (matched) {\n globParts[i] = []\n globParts[j] = matched\n break\n }\n }\n }\n return globParts.filter(gs => gs.length)\n }\n\n partsMatch(\n a: string[],\n b: string[],\n emptyGSMatch: boolean = false,\n ): false | string[] {\n let ai = 0\n let bi = 0\n let result: string[] = []\n let which: string = ''\n while (ai < a.length && bi < b.length) {\n if (a[ai] === b[bi]) {\n result.push(which === 'b' ? b[bi] : a[ai])\n ai++\n bi++\n } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n result.push(a[ai])\n ai++\n } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n result.push(b[bi])\n bi++\n } else if (\n a[ai] === '*' &&\n b[bi] &&\n (this.options.dot || !b[bi].startsWith('.')) &&\n b[bi] !== '**'\n ) {\n if (which === 'b') return false\n which = 'a'\n result.push(a[ai])\n ai++\n bi++\n } else if (\n b[bi] === '*' &&\n a[ai] &&\n (this.options.dot || !a[ai].startsWith('.')) &&\n a[ai] !== '**'\n ) {\n if (which === 'a') return false\n which = 'b'\n result.push(b[bi])\n ai++\n bi++\n } else {\n return false\n }\n }\n // if we fall out of the loop, it means they two are identical\n // as long as their lengths match\n return a.length === b.length && result\n }\n\n parseNegate() {\n if (this.nonegate) return\n\n const pattern = this.pattern\n let negate = false\n let negateOffset = 0\n\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.slice(negateOffset)\n this.negate = negate\n }\n\n // set partial to true to test if, for example,\n // \"/a/b\" matches the start of \"/*/b/*/d\"\n // Partial means, if you run out of file before you run\n // out of pattern, then that's fine, as long as all\n // the parts match.\n matchOne(\n file: string[],\n pattern: ParseReturn[],\n partial: boolean = false,\n ) {\n let fileStartIndex = 0\n let patternStartIndex = 0\n\n // UNC paths like //?/X:/... can match X:/... and vice versa\n // Drive letters in absolute drive or unc paths are always compared\n // case-insensitively.\n if (this.isWindows) {\n const fileDrive =\n typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n const fileUNC =\n !fileDrive &&\n file[0] === '' &&\n file[1] === '' &&\n file[2] === '?' &&\n /^[a-z]:$/i.test(file[3])\n\n const patternDrive =\n typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n const patternUNC =\n !patternDrive &&\n pattern[0] === '' &&\n pattern[1] === '' &&\n pattern[2] === '?' &&\n typeof pattern[3] === 'string' &&\n /^[a-z]:$/i.test(pattern[3])\n\n const fdi =\n fileUNC ? 3\n : fileDrive ? 0\n : undefined\n const pdi =\n patternUNC ? 3\n : patternDrive ? 0\n : undefined\n if (typeof fdi === 'number' && typeof pdi === 'number') {\n const [fd, pd]: [string, string] = [\n file[fdi],\n pattern[pdi] as string,\n ]\n // start matching at the drive letter index of each\n if (fd.toLowerCase() === pd.toLowerCase()) {\n pattern[pdi] = fd\n patternStartIndex = pdi\n fileStartIndex = fdi\n }\n }\n }\n\n // resolve and reduce . and .. portions in the file as well.\n // don't need to do the second phase, because it's only one string[]\n const { optimizationLevel = 1 } = this.options\n if (optimizationLevel >= 2) {\n file = this.levelTwoFileOptimize(file)\n }\n\n if (pattern.includes(GLOBSTAR)) {\n return this.#matchGlobstar(\n file,\n pattern,\n partial,\n fileStartIndex,\n patternStartIndex,\n )\n }\n\n return this.#matchOne(\n file,\n pattern,\n partial,\n fileStartIndex,\n patternStartIndex,\n )\n }\n\n #matchGlobstar(\n file: string[],\n pattern: ParseReturn[],\n partial: boolean,\n fileIndex: number,\n patternIndex: number,\n ) {\n // split the pattern into head, tail, and middle of ** delimited parts\n const firstgs = pattern.indexOf(GLOBSTAR, patternIndex)\n const lastgs = pattern.lastIndexOf(GLOBSTAR)\n\n // split the pattern up into globstar-delimited sections\n // the tail has to be at the end, and the others just have\n // to be found in order from the head.\n const [head, body, tail] =\n partial ?\n [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1),\n [],\n ]\n : [\n pattern.slice(patternIndex, firstgs),\n pattern.slice(firstgs + 1, lastgs),\n pattern.slice(lastgs + 1),\n ]\n\n // check the head, from the current file/pattern index.\n if (head.length) {\n const fileHead = file.slice(fileIndex, fileIndex + head.length)\n if (!this.#matchOne(fileHead, head, partial, 0, 0)) {\n return false\n }\n fileIndex += head.length\n patternIndex += head.length\n }\n // now we know the head matches!\n\n // if the last portion is not empty, it MUST match the end\n // check the tail\n let fileTailMatch: number = 0\n if (tail.length) {\n // if head + tail > file, then we cannot possibly match\n if (tail.length + fileIndex > file.length) return false\n\n // try to match the tail\n let tailStart = file.length - tail.length\n if (this.#matchOne(file, tail, partial, tailStart, 0)) {\n fileTailMatch = tail.length\n } else {\n // affordance for stuff like a/**/* matching a/b/\n // if the last file portion is '', and there's more to the pattern\n // then try without the '' bit.\n if (\n file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length\n ) {\n return false\n }\n tailStart--\n if (!this.#matchOne(file, tail, partial, tailStart, 0)) {\n return false\n }\n fileTailMatch = tail.length + 1\n }\n }\n\n // now we know the tail matches!\n\n // the middle is zero or more portions wrapped in **, possibly\n // containing more ** sections.\n // so a/**/b/**/c/**/d has become **/b/**/c/**\n // if it's empty, it means a/**/b, just verify we have no bad dots\n // if there's no tail, so it ends on /**, then we must have *something*\n // after the head, or it's not a matc\n if (!body.length) {\n let sawSome = !!fileTailMatch\n for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n const f = String(file[i])\n sawSome = true\n if (\n f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))\n ) {\n return false\n }\n }\n // in partial mode, we just need to get past all file parts\n return partial || sawSome\n }\n\n // now we know that there's one or more body sections, which can\n // be matched anywhere from the 0 index (because the head was pruned)\n // through to the length-fileTailMatch index.\n // split the body up into sections, and note the minimum index it can\n // be found at (start with the length of all previous segments)\n // [section, before, after]\n const bodySegments: [ParseReturn[], number][] = [[[], 0]]\n let currentBody: [ParseReturn[], number] = bodySegments[0]\n let nonGsParts = 0\n const nonGsPartsSums: number[] = [0]\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts)\n currentBody = [[], 0]\n bodySegments.push(currentBody)\n } else {\n currentBody[0].push(b)\n nonGsParts++\n }\n }\n let i = bodySegments.length - 1\n const fileLength = file.length - fileTailMatch\n for (const b of bodySegments) {\n b[1] = fileLength - ((nonGsPartsSums[i--] as number) + b[0].length)\n }\n\n return !!this.#matchGlobStarBodySections(\n file,\n bodySegments,\n fileIndex,\n 0,\n partial,\n 0,\n !!fileTailMatch,\n )\n }\n\n // return false for \"nope, not matching\"\n // return null for \"not matching, cannot keep trying\"\n #matchGlobStarBodySections(\n file: string[],\n // pattern section, last possible position for it\n bodySegments: [ParseReturn[], number][],\n fileIndex: number,\n bodyIndex: number,\n partial: boolean,\n globStarDepth: number,\n sawTail: boolean,\n ): boolean | null {\n // take the first body segment, and walk from fileIndex to its \"after\"\n // value at the end\n // If it doesn't match at that position, we increment, until we hit\n // that final possible position, and give up.\n // If it does match, then advance and try to rest.\n // If any of them fail we keep walking forward.\n // this is still a bit recursively painful, but it's more constrained\n // than previous implementations, because we never test something that\n // can't possibly be a valid matching condition.\n const bs = bodySegments[bodyIndex]\n if (!bs) {\n // just make sure that there's no bad dots\n for (let i = fileIndex; i < file.length; i++) {\n sawTail = true\n const f = file[i]\n if (\n f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))\n ) {\n return false\n }\n }\n return sawTail\n }\n\n // have a non-globstar body section to test\n const [body, after] = bs\n while (fileIndex <= after) {\n const m = this.#matchOne(\n file.slice(0, fileIndex + body.length),\n body,\n partial,\n fileIndex,\n 0,\n )\n // if limit exceeded, no match. intentional false negative,\n // acceptable break in correctness for security.\n if (m && globStarDepth < this.maxGlobstarRecursion) {\n // match! see if the rest match. if so, we're done!\n const sub = this.#matchGlobStarBodySections(\n file,\n bodySegments,\n fileIndex + body.length,\n bodyIndex + 1,\n partial,\n globStarDepth + 1,\n sawTail,\n )\n if (sub !== false) {\n return sub\n }\n }\n const f = file[fileIndex]\n if (\n f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))\n ) {\n return false\n }\n\n fileIndex++\n }\n // walked off. no point continuing\n return partial || null\n }\n\n #matchOne(\n file: string[],\n pattern: ParseReturn[],\n partial: boolean,\n fileIndex: number,\n patternIndex: number,\n ) {\n let fi: number\n let pi: number\n let pl: number\n let fl: number\n for (\n fi = fileIndex,\n pi = patternIndex,\n fl = file.length,\n pl = pattern.length;\n fi < fl && pi < pl;\n fi++, pi++\n ) {\n this.debug('matchOne loop')\n let p = pattern[pi]\n let f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* c8 ignore start */\n if (p === false || p === GLOBSTAR) {\n return false\n }\n /* c8 ignore stop */\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n let hit: boolean\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = p.test(f)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return fi === fl - 1 && file[fi] === ''\n\n /* c8 ignore start */\n } else {\n // should be unreachable.\n throw new Error('wtf?')\n }\n /* c8 ignore stop */\n }\n\n braceExpand() {\n return braceExpand(this.pattern, this.options)\n }\n\n parse(pattern: string): ParseReturn {\n assertValidPattern(pattern)\n\n const options = this.options\n\n // shortcuts\n if (pattern === '**') return GLOBSTAR\n if (pattern === '') return ''\n\n // far and away, the most common glob pattern parts are\n // *, *.*, and *.<ext> Add a fast check method for those.\n let m: RegExpMatchArray | null\n let fastTest: null | ((f: string) => boolean) = null\n if ((m = pattern.match(starRE))) {\n fastTest = options.dot ? starTestDot : starTest\n } else if ((m = pattern.match(starDotExtRE))) {\n fastTest = (\n options.nocase ?\n options.dot ?\n starDotExtTestNocaseDot\n : starDotExtTestNocase\n : options.dot ? starDotExtTestDot\n : starDotExtTest)(m[1])\n } else if ((m = pattern.match(qmarksRE))) {\n fastTest = (\n options.nocase ?\n options.dot ?\n qmarksTestNocaseDot\n : qmarksTestNocase\n : options.dot ? qmarksTestDot\n : qmarksTest)(m)\n } else if ((m = pattern.match(starDotStarRE))) {\n fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n } else if ((m = pattern.match(dotStarRE))) {\n fastTest = dotStarTest\n }\n\n const re = AST.fromGlob(pattern, this.options).toMMPattern()\n if (fastTest && typeof re === 'object') {\n // Avoids overriding in frozen environments\n Reflect.defineProperty(re, 'test', { value: fastTest })\n }\n return re\n }\n\n makeRe() {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n const set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n const options = this.options\n\n const twoStar =\n options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n const flags = new Set(options.nocase ? ['i'] : [])\n\n // regexpify non-globstar patterns\n // if ** is only item, then we just do one twoStar\n // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n // if ** is last, append (\\/twoStar|) to previous\n // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n // then filter out GLOBSTAR symbols\n let re = set\n .map(pattern => {\n const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n if (p instanceof RegExp) {\n for (const f of p.flags.split('')) flags.add(f)\n }\n return (\n typeof p === 'string' ? regExpEscape(p)\n : p === GLOBSTAR ? GLOBSTAR\n : p._src\n )\n }) as (string | typeof GLOBSTAR)[]\n pp.forEach((p, i) => {\n const next = pp[i + 1]\n const prev = pp[i - 1]\n if (p !== GLOBSTAR || prev === GLOBSTAR) {\n return\n }\n if (prev === undefined) {\n if (next !== undefined && next !== GLOBSTAR) {\n pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n } else {\n pp[i] = twoStar\n }\n } else if (next === undefined) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n } else if (next !== GLOBSTAR) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n pp[i + 1] = GLOBSTAR\n }\n })\n const filtered = pp.filter(p => p !== GLOBSTAR)\n\n // For partial matches, we need to make the pattern match\n // any prefix of the full path. We do this by generating\n // alternative patterns that match progressively longer prefixes.\n if (this.partial && filtered.length >= 1) {\n const prefixes: string[] = []\n for (let i = 1; i <= filtered.length; i++) {\n prefixes.push(filtered.slice(0, i).join('/'))\n }\n return '(?:' + prefixes.join('|') + ')'\n }\n\n return filtered.join('/')\n })\n .join('|')\n\n // need to wrap in parens if we had more than one thing with |,\n // otherwise only the first will be anchored to ^ and the last to $\n const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^' + open + re + close + '$'\n\n // In partial mode, '/' should always match as it's a valid prefix for any pattern\n if (this.partial) {\n re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n }\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').+$'\n\n try {\n this.regexp = new RegExp(re, [...flags].join(''))\n /* c8 ignore start */\n } catch {\n // should be impossible\n this.regexp = false\n }\n /* c8 ignore stop */\n return this.regexp\n }\n\n slashSplit(p: string) {\n // if p starts with // on windows, we preserve that\n // so that UNC paths aren't broken. Otherwise, any number of\n // / characters are coalesced into one, unless\n // preserveMultipleSlashes is set to true.\n if (this.preserveMultipleSlashes) {\n return p.split('/')\n } else if (this.isWindows && /^\\/\\/[^/]+/.test(p)) {\n // add an extra '' for the one we lose\n return ['', ...p.split(/\\/+/)]\n } else {\n return p.split(/\\/+/)\n }\n }\n\n match(f: string, partial = this.partial) {\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) {\n return false\n }\n if (this.empty) {\n return f === ''\n }\n\n if (f === '/' && partial) {\n return true\n }\n\n const options = this.options\n\n // windows: need to use /, not \\\n if (this.isWindows) {\n f = f.split('\\\\').join('/')\n }\n\n // treat the test path as a set of pathparts.\n const ff = this.slashSplit(f)\n this.debug(this.pattern, 'split', ff)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n const set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n let filename: string = ff[ff.length - 1]\n if (!filename) {\n for (let i = ff.length - 2; !filename && i >= 0; i--) {\n filename = ff[i]\n }\n }\n\n for (const pattern of set) {\n let file = ff\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n const hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) {\n return true\n }\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) {\n return false\n }\n return this.negate\n }\n\n static defaults(def: MinimatchOptions) {\n return minimatch.defaults(def).Minimatch\n }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n","// Loads trust.config.json:\n//\n// {\n// \"extend\": \"default\", // preset name or a path relative to this file, or an array of them\n// \"trust\": [\"zod\", { \"origin\": \"@noego/ioc\", \"reason\": \"DI container, no I/O\" }],\n// \"distrust\": [\"js:Array.from\"], // remove something inherited from the extend chain\n// \"trust_type\": [\"js:Math\", { \"origin\": \"node:path\", \"reason\": \"returns plain strings\" }],\n// \"distrust_type\": [\"js:Array.from\"], // the same two lists for type trust (see below)\n// \"passthrough\": [\"server/repositories/**\"], // not checked inside; calls into them are untrusted\n// \"ignore\": [\"**/*.test.ts\"], // not checked inside; calls into them are reported\n// \"strict\": [\"server/services/workspace/**\"], // CLI: `trust check` also runs the --strict rules on these\n// \"tsconfig\": [{ \"files\": \"ui/**\", \"tsconfig\": \"tsconfig.web.json\" }], // CLI: which tsconfig compiles which files\n// \"rules\": { \"type-claim\": \"on\", \"untrusted-value\": \"on\", \"dropped-result\": \"on\", \"untrustedCallbacks\": \"inline\" }\n// }\n//\n// `rules` holds the per-rule settings. `type-claim`, `untrusted-value`, `dropped-result` and `redundant-guard` are opt-in\n// (\"on\" / \"off\", default \"off\"), so upgrading changes no finding until a project turns them on. `untrustedCallbacks`\n// says which callback parameters are untrusted-value sources: \"off\" (none), \"inline\" (default: a\n// parameter of a function written inline where an origin that is not type-trusted calls it), or \"all\".\n// Each key is inherited through `extend` on its own: the first level of the chain (leaf first) that sets\n// it wins. The CLI (check / baseline / explain / refactor) and the ESLint rules read the same settings.\n//\n// Trust resolution walks the chain from this file toward the root preset: the first level whose\n// distrust matches wins (untrusted), else the first level whose trust matches wins (trusted).\n// So a file's `distrust` beats everything it inherits. Within one file the same origin may not be\n// both trusted and distrusted.\n//\n// `extend` may be an array (`[\"web\", \"svelte\"]`): its entries apply left to right, so a later entry\n// overrides an earlier one, and the file itself overrides all of them. The chain (`levels`, nearest\n// first) is this file, then the last entry's chain, ..., then the first entry's chain. A level reached\n// through more than one entry (both reach `js`) appears once, at its first position in that order.\n// Single-valued settings (`rules` keys, ...) therefore come from the later entry when both set them.\n//\n// `trust_type` / `distrust_type` are a second, separate pair of lists with the same origin syntax, entry\n// shapes and resolution along the chain. `trust` says \"a call into this origin cannot fail\"; `trust_type`\n// says \"the types this origin declares are true at runtime\". Neither implies the other: `fs.readFileSync`\n// can throw but its `string` is true; a typed IPC payload cannot throw but its type may be false. An\n// origin not on the type-trust list gives untrusted values (core/untrusted-values.ts).\n//\n// Globs use ESLint flat-config semantics (see ./zones.ts) and are relative to the directory of the\n// file that declares them. A glob that matches no file is a load error (typo protection).\n//\n// `tsconfig` is used by the CLI only (check / baseline / explain): the first entry whose `files`\n// glob(s) match a file picks the tsconfig (relative to the declaring file's directory) its program is\n// built from; `--tsconfig` beats it and the nearest tsconfig.json is the fallback (core/program.ts).\nimport { existsSync, readFileSync, statSync } from 'node:fs';\nimport { dirname, isAbsolute, resolve } from 'node:path';\nimport { PRESETS, type PresetDefinition } from './presets.js';\nimport { normalizePattern, patternMatchesAnyFile, realpathOrSelf, type ZoneGroup } from './zones.js';\n\nexport type TrustEntry = string | { readonly origin: string; readonly reason?: string };\n\nexport interface TrustLevel {\n /** Config file path or `preset:<name>`. */\n readonly source: string;\n readonly trust: readonly string[];\n readonly distrust: readonly string[];\n /** Origins whose declared types are trusted (`trust_type`). */\n readonly typeTrust: readonly string[];\n /** Origins removed from the inherited type-trust list (`distrust_type`). */\n readonly typeDistrust: readonly string[];\n}\n\nexport interface TrustConfig {\n /** Absolute path of the leaf config file. */\n readonly file: string;\n /** Realpath of the leaf config file's directory: the project root for zones and `local:` origins. */\n readonly rootDir: string;\n /** Leaf first, root preset last. */\n readonly levels: readonly TrustLevel[];\n readonly passthrough: readonly ZoneGroup[];\n readonly ignore: readonly ZoneGroup[];\n /** `strict` globs of the chain: `trust check` also runs the strict rules on files matching them. */\n readonly strict: readonly ZoneGroup[];\n /** `tsconfig` entries of the chain, leaf first, in declaration order. */\n readonly tsconfig: readonly TsconfigMapping[];\n /** Per-rule settings (`rules`), each resolved along the chain; unset keys take DEFAULT_RULE_SETTINGS. */\n readonly rules: TrustRuleSettings;\n /**\n * Globs that matched no file when the config loaded, as `trust config <source>: <message>` lines.\n * Filled under `validateGlobs: 'report'` (the default); empty when globs are not checked or throw.\n */\n readonly unmatchedGlobs: readonly string[];\n}\n\n/** An opt-in rule's switch. */\nexport type RuleSwitch = 'on' | 'off';\n\n/** Which callback parameters are untrusted-value sources (see the file comment). */\nexport type UntrustedCallbacks = 'off' | 'inline' | 'all';\n\n/** The rules that are off unless a config turns them on. */\nexport type OptInRule = 'type-claim' | 'untrusted-value' | 'dropped-result' | 'redundant-guard';\n\nexport interface TrustRuleSettings {\n readonly 'type-claim': RuleSwitch;\n readonly 'untrusted-value': RuleSwitch;\n readonly 'dropped-result': RuleSwitch;\n readonly 'redundant-guard': RuleSwitch;\n readonly untrustedCallbacks: UntrustedCallbacks;\n}\n\n/** What a config that sets nothing gets: the opt-in rules off, callbacks as today. */\nexport const DEFAULT_RULE_SETTINGS: TrustRuleSettings = Object.freeze({\n 'type-claim': 'off',\n 'untrusted-value': 'off',\n 'dropped-result': 'off',\n 'redundant-guard': 'off',\n untrustedCallbacks: 'inline',\n});\n\n/** Whether the config turns an opt-in rule on. */\nexport function isRuleEnabled(config: Pick<TrustConfig, 'rules'>, rule: OptInRule): boolean {\n return config.rules[rule] === 'on';\n}\n\n/** One `tsconfig` entry: files matching `patterns` (zone glob semantics) compile under `tsconfig`. */\nexport interface TsconfigMapping extends ZoneGroup {\n /** Position in the declaring file's `tsconfig` array (for error messages). */\n readonly index: number;\n /** Absolute tsconfig path. Its existence is checked when a file maps to it, not at load. */\n readonly tsconfig: string;\n}\n\n/**\n * What to do with a glob that matches no file: `'report'` lists it in `TrustConfig.unmatchedGlobs`\n * and loads anyway, `true` makes it a load error (TrustConfigError), `false` does not check.\n */\nexport type GlobValidation = boolean | 'report';\n\nexport interface LoadTrustConfigOptions {\n /**\n * Check that every glob matches at least one file (default `'report'`). A glob can match nothing for\n * a legitimate moment (generated files absent in a fresh worktree), so by default every entry point\n * (ESLint and the CLIs alike) loads and reports it rather than refusing to run; pass `true` to fail.\n */\n readonly validateGlobs?: GlobValidation;\n /**\n * Directory the leaf config's globs, `tsconfig` paths, baseline keys and `local:` origins resolve\n * against, instead of the config file's own directory (a config kept outside the project).\n */\n readonly rootDir?: string;\n}\n\nexport class TrustConfigError extends Error {\n override readonly name = 'TrustConfigError';\n}\n\nconst FILE_KEYS = new Set(['$comment', 'extend', 'trust', 'distrust', 'trust_type', 'distrust_type', 'passthrough', 'ignore', 'strict', 'tsconfig', 'rules']);\nconst PRESET_KEYS = new Set(['$comment', 'extend', 'trust', 'distrust', 'trust_type', 'distrust_type']);\n/** Key names from before the rename; rejected with the replacement so a stale config never silently loses its lists. */\nconst RENAMED_KEYS: Readonly<Record<string, string>> = { typeTrust: 'trust_type', typeDistrust: 'distrust_type' };\nconst ENTRY_KEYS = new Set(['origin', 'reason']);\nconst TSCONFIG_ENTRY_KEYS = new Set(['files', 'tsconfig']);\n/** The values each `rules` key accepts. */\nconst RULE_VALUES: Readonly<Record<keyof TrustRuleSettings, readonly string[]>> = {\n 'type-claim': ['on', 'off'],\n 'untrusted-value': ['on', 'off'],\n 'dropped-result': ['on', 'off'],\n 'redundant-guard': ['on', 'off'],\n untrustedCallbacks: ['off', 'inline', 'all'],\n};\n\ninterface RawTsconfigEntry {\n readonly patterns: string[];\n /** As written: relative to the level's baseDir. */\n readonly tsconfig: string;\n}\n\ninterface RawLevel {\n readonly source: string;\n /** Directory globs and `tsconfig` paths resolve against (null for presets). */\n readonly baseDir: string | null;\n /** Directory a relative `extend` resolves against: always the file's own directory (null for presets). */\n readonly fileDir: string | null;\n /** `extend` entries as written, left to right (a plain string is one entry; empty when unset). */\n readonly extend: readonly string[];\n /** True when `extend` was written as an array (error messages then name the entry index). */\n readonly extendIsArray: boolean;\n readonly trust: string[];\n readonly distrust: string[];\n readonly typeTrust: string[];\n readonly typeDistrust: string[];\n readonly passthrough: string[];\n readonly ignore: string[];\n readonly strict: string[];\n readonly tsconfig: RawTsconfigEntry[];\n /** The `rules` keys this level sets. */\n readonly rules: Partial<TrustRuleSettings>;\n}\n\n/**\n * Trust entries are matched exactly as written. Origin namespaces:\n * js:JSON.parse JavaScript built-ins (TypeScript lib)\n * node:fs.existsSync Node built-in modules (the `node:` import specifier)\n * node:global.process.cwd Node globals\n * zod.object, @scope/pkg.fn npm packages (bare package name)\n */\nexport function normalizeOrigin(origin: string): string {\n return origin.trim();\n}\n\n/** Prefixes from earlier origin naming; rejected with the replacement so a stale entry never silently stops matching. */\nfunction legacyOriginHint(origin: string): string | null {\n if (origin.startsWith('builtin:')) return `\"${origin}\" uses the old \"builtin:\" prefix; use \"js:${origin.slice('builtin:'.length)}\"`;\n if (origin === 'node' || origin.startsWith('node.')) {\n return `\"${origin}\" uses the old \"node.\" prefix for Node globals; use \"node:global${origin.slice('node'.length)}\"`;\n }\n return null;\n}\n\n/** Reports a config problem by throwing; trust's own throws TrustConfigError (`fail`). */\nexport type ConfigFail = (source: string, message: string) => never;\n\nfunction fail(source: string, message: string): never {\n throw new TrustConfigError(`trust config ${source}: ${message}`);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction checkedOrigin(source: string, key: string, index: number, origin: string): string {\n const normalized = normalizeOrigin(origin);\n const hint = legacyOriginHint(normalized);\n if (hint) fail(source, `\"${key}[${index}]\": ${hint}`);\n return normalized;\n}\n\nfunction readEntries(source: string, key: string, value: unknown): string[] {\n if (value === undefined) return [];\n if (!Array.isArray(value)) fail(source, `\"${key}\" must be an array`);\n return value.map((entry, index) => {\n if (typeof entry === 'string') {\n if (!entry.trim()) fail(source, `\"${key}[${index}]\" must not be empty`);\n return checkedOrigin(source, key, index, entry);\n }\n if (!isRecord(entry)) fail(source, `\"${key}[${index}]\" must be a string or { origin, reason }`);\n for (const entryKey of Object.keys(entry)) {\n if (!ENTRY_KEYS.has(entryKey)) fail(source, `\"${key}[${index}]\" has unknown key \"${entryKey}\"`);\n }\n if (typeof entry.origin !== 'string' || !entry.origin.trim()) {\n fail(source, `\"${key}[${index}].origin\" must be a non-empty string`);\n }\n if (entry.reason !== undefined && typeof entry.reason !== 'string') {\n fail(source, `\"${key}[${index}].reason\" must be a string`);\n }\n return checkedOrigin(source, key, index, entry.origin);\n });\n}\n\nfunction readGlobs(source: string, key: string, value: unknown, failWith: ConfigFail = fail): string[] {\n if (value === undefined) return [];\n if (!Array.isArray(value)) failWith(source, `\"${key}\" must be an array of globs`);\n return value.map((entry, index) => {\n if (typeof entry !== 'string') failWith(source, `\"${key}[${index}]\" must be a string`);\n const normalized = normalizePattern(entry);\n if ('error' in normalized) failWith(source, `\"${key}\": ${normalized.error}`);\n return normalized.pattern;\n });\n}\n\nfunction readTsconfigEntries(source: string, value: unknown, failWith: ConfigFail = fail) {\n if (value === undefined) return [];\n if (!Array.isArray(value)) failWith(source, '\"tsconfig\" must be an array of { files, tsconfig }');\n return value.map((entry, index) => {\n const at = `tsconfig[${index}]`;\n if (!isRecord(entry)) failWith(source, `\"${at}\" must be an object { files, tsconfig }`);\n for (const entryKey of Object.keys(entry)) {\n if (!TSCONFIG_ENTRY_KEYS.has(entryKey)) failWith(source, `\"${at}\" has unknown key \"${entryKey}\"`);\n }\n const files = typeof entry.files === 'string' ? [entry.files] : entry.files;\n if (!Array.isArray(files) || files.length === 0) failWith(source, `\"${at}.files\" must be a glob or a non-empty array of globs`);\n if (typeof entry.tsconfig !== 'string' || !entry.tsconfig.trim()) failWith(source, `\"${at}.tsconfig\" must be a non-empty string`);\n return { patterns: readGlobs(source, `${at}.files`, files, failWith), tsconfig: entry.tsconfig };\n });\n}\n\nfunction readRules(source: string, value: unknown): Partial<TrustRuleSettings> {\n if (value === undefined) return {};\n if (!isRecord(value)) fail(source, '\"rules\" must be an object, e.g. { \"type-claim\": \"on\", \"untrusted-value\": \"on\" }');\n const rules: Record<string, string> = {};\n for (const [key, setting] of Object.entries(value)) {\n const allowed = Object.prototype.hasOwnProperty.call(RULE_VALUES, key) ? RULE_VALUES[key as keyof TrustRuleSettings] : undefined;\n if (!allowed) fail(source, `\"rules\" has unknown key \"${key}\" (known: ${Object.keys(RULE_VALUES).map((name) => `\"${name}\"`).join(', ')})`);\n if (typeof setting !== 'string' || !allowed.includes(setting)) {\n fail(source, `\"rules.${key}\" must be one of ${allowed.map((name) => `\"${name}\"`).join(', ')}`);\n }\n rules[key] = setting;\n }\n return rules as Partial<TrustRuleSettings>;\n}\n\n/** `extend`: one preset name / path, or a non-empty array of them without repeats. */\nfunction readExtend(source: string, value: unknown): string[] {\n if (value === undefined) return [];\n if (typeof value === 'string') {\n if (!value) fail(source, '\"extend\" must be a non-empty string');\n return [value];\n }\n if (!Array.isArray(value)) fail(source, '\"extend\" must be a preset name or path, or a non-empty array of them');\n if (value.length === 0) fail(source, '\"extend\" must not be an empty array');\n const entries: string[] = [];\n value.forEach((entry: unknown, index) => {\n if (typeof entry !== 'string' || !entry.trim()) fail(source, `\"extend[${index}]\" must be a non-empty string`);\n const earlier = entries.indexOf(entry);\n if (earlier >= 0) fail(source, `\"extend[${index}]\" repeats \"${entry}\" (already \"extend[${earlier}]\")`);\n entries.push(entry);\n });\n return entries;\n}\n\nfunction parseLevel(source: string, raw: unknown, allowedKeys: Set<string>, baseDir: string | null, fileDir: string | null): RawLevel {\n if (!isRecord(raw)) fail(source, 'expected an object');\n for (const key of Object.keys(raw)) {\n if (allowedKeys.has(key)) continue;\n const renamed = Object.prototype.hasOwnProperty.call(RENAMED_KEYS, key) ? RENAMED_KEYS[key] : undefined;\n if (renamed) fail(source, `\"${key}\" was renamed; use \"${renamed}\"`);\n fail(source, `unknown key \"${key}\" (known: ${[...allowedKeys].map((name) => `\"${name}\"`).join(', ')})`);\n }\n const extend = readExtend(source, raw.extend);\n const trust = readEntries(source, 'trust', raw.trust);\n const distrust = readEntries(source, 'distrust', raw.distrust);\n const both = trust.filter((origin) => distrust.includes(origin));\n if (both.length > 0) fail(source, `\"${both[0]}\" is both trusted and distrusted`);\n const typeTrust = readEntries(source, 'trust_type', raw.trust_type);\n const typeDistrust = readEntries(source, 'distrust_type', raw.distrust_type);\n const typeBoth = typeTrust.filter((origin) => typeDistrust.includes(origin));\n if (typeBoth.length > 0) fail(source, `\"${typeBoth[0]}\" is both type-trusted and type-distrusted`);\n return {\n source,\n baseDir,\n fileDir,\n extend,\n extendIsArray: Array.isArray(raw.extend),\n trust,\n distrust,\n typeTrust,\n typeDistrust,\n passthrough: readGlobs(source, 'passthrough', raw.passthrough),\n ignore: readGlobs(source, 'ignore', raw.ignore),\n strict: readGlobs(source, 'strict', raw.strict),\n tsconfig: readTsconfigEntries(source, raw.tsconfig),\n rules: readRules(source, raw.rules),\n };\n}\n\n/** `baseDir` overrides the file's own directory for its globs and `tsconfig` paths (the leaf under `rootDir`). */\nfunction readFileLevel(file: string, baseDir: string | undefined): RawLevel {\n if (!existsSync(file)) throw new TrustConfigError(`trust config not found: ${file}`);\n let raw: unknown;\n try {\n raw = JSON.parse(readFileSync(file, 'utf8'));\n } catch (error) {\n fail(file, `invalid JSON (${error instanceof Error ? error.message : String(error)})`);\n }\n const fileDir = realpathOrSelf(dirname(file));\n return parseLevel(file, raw, FILE_KEYS, baseDir ?? fileDir, fileDir);\n}\n\nfunction readPresetLevel(name: string): RawLevel {\n const preset: PresetDefinition | undefined = PRESETS[name];\n if (!preset) throw new TrustConfigError(`unknown preset \"${name}\"`);\n return parseLevel(`preset:${name}`, preset, PRESET_KEYS, null, null);\n}\n\n/** The sources a level extends (a file path or `preset:<name>`), left to right as written. */\nfunction nextSources(level: RawLevel): string[] {\n const sources: string[] = [];\n level.extend.forEach((extend, index) => {\n // A plain string keeps its original messages; an array entry is named by its index.\n const at = level.extendIsArray ? `\"extend[${index}]\": ` : '';\n let source: string;\n if (extend.startsWith('.') || isAbsolute(extend)) {\n if (level.fileDir === null) fail(level.source, `${at}presets may only extend presets, not \"${extend}\"`);\n source = resolve(level.fileDir, extend);\n } else {\n if (!Object.prototype.hasOwnProperty.call(PRESETS, extend)) fail(level.source, `${at}unknown preset \"${extend}\"`);\n source = `preset:${extend}`;\n }\n const earlier = sources.indexOf(source);\n if (earlier >= 0) fail(level.source, `${at}\"${extend}\" is the same config as \"extend[${earlier}]\" (\"${level.extend[earlier]}\")`);\n sources.push(source);\n });\n return sources;\n}\n\n/**\n * The levels of the `extend` chain, nearest first: the file, then each `extend` entry's own chain from\n * the last entry to the first (later entries override earlier ones). A level reached more than once\n * keeps its first position. A cycle through any branch is an error.\n */\nfunction readChain(configFile: string, rootDir: string | undefined): RawLevel[] {\n const chain: RawLevel[] = [];\n // Levels are identified by realpath, so a file reached through a symlinked directory is still one level.\n const placed = new Set<string>();\n const visit = (source: string, path: readonly string[]): void => {\n const key = source.startsWith('preset:') ? source : realpathOrSelf(source);\n if (path.includes(key)) {\n throw new TrustConfigError(`trust config cycle: ${[...path, key].join(' -> ')}`);\n }\n // Every level below an already placed one is placed too, and any cycle through it was reported then.\n if (placed.has(key)) return;\n const level = source.startsWith('preset:')\n ? readPresetLevel(source.slice('preset:'.length))\n : readFileLevel(source, path.length === 0 ? rootDir : undefined);\n placed.add(key);\n chain.push(level);\n const next = nextSources(level);\n for (let index = next.length - 1; index >= 0; index--) visit(next[index], [...path, key]);\n };\n visit(resolve(configFile), []);\n return chain;\n}\n\ntype ZoneKey = 'passthrough' | 'ignore' | 'strict';\n\n/** One unmatched glob: a load error under `true`, a reported line under `'report'`. */\nfunction unmatchedGlob(validate: GlobValidation, source: string, message: string, failWith: ConfigFail, unmatched: string[]): void {\n if (validate === true) failWith(source, message);\n unmatched.push(`trust config ${source}: ${message}`);\n}\n\nfunction zoneGroups<K extends ZoneKey>(\n chain: readonly (Pick<RawLevel, 'source' | 'baseDir'> & Readonly<Record<K, readonly string[]>>)[],\n key: K,\n validate: GlobValidation,\n failWith: ConfigFail = fail,\n unmatched: string[] = [],\n): ZoneGroup[] {\n const groups: ZoneGroup[] = [];\n for (const level of chain) {\n const patterns = level[key];\n if (patterns.length === 0 || level.baseDir === null) continue;\n if (validate !== false) {\n for (const pattern of patterns) {\n if (!patternMatchesAnyFile(level.baseDir, pattern)) {\n unmatchedGlob(validate, level.source, `${key} glob \"${pattern}\" matches no files under ${level.baseDir}`, failWith, unmatched);\n }\n }\n }\n groups.push({ source: level.source, baseDir: level.baseDir, patterns });\n }\n return groups;\n}\n\nfunction tsconfigMappings(\n chain: readonly Pick<RawLevel, 'source' | 'baseDir' | 'tsconfig'>[],\n validate: GlobValidation,\n failWith: ConfigFail = fail,\n unmatched: string[] = [],\n) {\n const mappings: TsconfigMapping[] = [];\n for (const level of chain) {\n const baseDir = level.baseDir;\n if (baseDir === null) continue;\n level.tsconfig.forEach((entry, index) => {\n if (validate !== false) {\n for (const pattern of entry.patterns) {\n if (!patternMatchesAnyFile(baseDir, pattern)) {\n unmatchedGlob(validate, level.source, `tsconfig[${index}] glob \"${pattern}\" matches no files under ${baseDir}`, failWith, unmatched);\n }\n }\n }\n mappings.push({ source: level.source, baseDir, patterns: entry.patterns, index, tsconfig: resolve(baseDir, entry.tsconfig) });\n });\n }\n return mappings;\n}\n\n/** Each `rules` key from the first level (leaf first) that sets it, else its default. */\nfunction ruleSettings(chain: RawLevel[]): TrustRuleSettings {\n const settings: Record<string, string> = { ...DEFAULT_RULE_SETTINGS };\n for (const key of Object.keys(DEFAULT_RULE_SETTINGS) as Array<keyof TrustRuleSettings>) {\n const level = chain.find((candidate) => candidate.rules[key] !== undefined);\n if (level) settings[key] = level.rules[key] as string;\n }\n return Object.freeze(settings) as unknown as TrustRuleSettings;\n}\n\n/**\n * Loads and validates a trust config file and its `extend` chain. Throws TrustConfigError for a malformed\n * config; a glob matching no file is reported in `unmatchedGlobs` unless `validateGlobs` says otherwise.\n */\nexport function loadTrustConfig(configFile: string, options: LoadTrustConfigOptions = {}): TrustConfig {\n const file = resolve(configFile);\n const rootDir = options.rootDir === undefined ? undefined : realpathOrSelf(resolve(options.rootDir));\n const chain = readChain(file, rootDir);\n const validate = options.validateGlobs ?? 'report';\n const unmatched: string[] = [];\n return {\n file,\n rootDir: rootDir ?? realpathOrSelf(dirname(file)),\n levels: chain.map(({ source, trust, distrust, typeTrust, typeDistrust }) => ({ source, trust, distrust, typeTrust, typeDistrust })),\n passthrough: zoneGroups(chain, 'passthrough', validate, fail, unmatched),\n ignore: zoneGroups(chain, 'ignore', validate, fail, unmatched),\n strict: zoneGroups(chain, 'strict', validate, fail, unmatched),\n tsconfig: tsconfigMappings(chain, validate, fail, unmatched),\n rules: ruleSettings(chain),\n unmatchedGlobs: unmatched,\n };\n}\n\nconst cache = new Map<string, { mtimes: ReadonlyMap<string, number>; config: TrustConfig }>();\n\nfunction mtimeOf(file: string): number {\n return existsSync(file) ? statSync(file).mtimeMs : -1;\n}\n\n/**\n * Cached by path + the mtime of every config file in the chain (the leaf and each file it extends,\n * through every `extend` entry), so long-lived ESLint servers pick up edits to any of them.\n */\nexport function loadTrustConfigCached(configFile: string): TrustConfig {\n const file = resolve(configFile);\n const hit = cache.get(file);\n if (hit && [...hit.mtimes].every(([path, mtimeMs]) => mtimeOf(path) === mtimeMs)) return hit.config;\n const leafMtime = mtimeOf(file);\n const config = loadTrustConfig(file);\n const mtimes = new Map<string, number>([[file, leafMtime]]);\n for (const level of config.levels) {\n if (!level.source.startsWith('preset:') && !mtimes.has(level.source)) mtimes.set(level.source, mtimeOf(level.source));\n }\n cache.set(file, { mtimes, config });\n return config;\n}\n\n/** Union of every trust entry in the chain (for tooling and tests). */\nexport function effectiveTrustList(config: TrustConfig): string[] {\n return [...new Set(config.levels.flatMap((level) => level.trust))];\n}\n\n/** The `ignore` and `tsconfig` settings of one config level (a sibling tool's config file, see core/tool-config.ts). */\nexport interface ZoneSettings {\n readonly ignore: readonly ZoneGroup[];\n readonly tsconfig: readonly TsconfigMapping[];\n}\n\n/**\n * Reads `ignore` and `tsconfig` of a one-level config exactly as trust reads its own (same glob\n * normalization, same `tsconfig` entry shape, globs and tsconfig paths relative to `baseDir`), reporting\n * problems through `failWith` so another tool names its own config. Throws whatever `failWith` throws.\n */\nexport function readZoneSettings(\n source: string,\n raw: { readonly ignore?: unknown; readonly tsconfig?: unknown },\n baseDir: string,\n validateGlobs: boolean,\n failWith: ConfigFail,\n): ZoneSettings {\n const level = { source, baseDir, ignore: readGlobs(source, 'ignore', raw.ignore, failWith), tsconfig: readTsconfigEntries(source, raw.tsconfig, failWith) };\n return { ignore: zoneGroups([level], 'ignore', validateGlobs, failWith), tsconfig: tsconfigMappings([level], validateGlobs, failWith) };\n}\n\n/** Union of every type-trust entry in the chain (for tooling and tests). */\nexport function effectiveTypeTrustList(config: TrustConfig): string[] {\n return [...new Set(config.levels.flatMap((level) => level.typeTrust))];\n}\n","// CLI-only Svelte conversion. No generated files are written to the project.\nimport { createRequire } from 'node:module';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { basename, dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { TraceMap, originalPositionFor, decodedMappings } from '@jridgewell/trace-mapping';\nimport type * as TS from 'typescript';\nimport type { svelte2tsx } from 'svelte2tsx';\nimport type { TsconfigMapping } from '../eslint/config.js';\nimport type { TypeScript } from '../eslint/typescript.js';\nimport { groupByTsconfig, readTsconfig } from './program.js';\n\nexport class SvelteFileError extends Error {}\ntype Position = { line: number; column: number };\ninterface Component {\n source: string;\n code: string;\n map: TraceMap;\n lines: number[];\n ignored: [number, number][];\n snippetCalls: Set<number>;\n generatedCalls: Set<number>;\n}\nconst sourceInputs = new WeakMap<TS.SourceFile, SvelteInputs>();\nexport function svelteForSource(source: TS.SourceFile): SvelteInputs | undefined { return sourceInputs.get(source); }\nconst checkerInputs = new WeakMap<TS.TypeChecker, SvelteInputs>();\nexport function svelteFor(checker: TS.TypeChecker): SvelteInputs | undefined { return checkerInputs.get(checker); }\nexport function registerSvelte(program: TS.Program, inputs: SvelteInputs): void {\n checkerInputs.set(program.getTypeChecker(), inputs);\n for (const source of program.getSourceFiles()) if (inputs.paths.has(source.fileName)) sourceInputs.set(source, inputs);\n}\n\n/** State is owned by a single invocation/program, never a suffix-based global path registry. */\nexport class SvelteInputs {\n readonly virtual = new Map<string, string>();\n readonly paths = new Map<string, string>();\n readonly components = new Map<string, Component>();\n readonly shims = new Set<string>();\n readonly imports = new Map<string, Set<string>>();\n readonly componentShims = new Map<string, string[]>();\n extraRoots(files: readonly string[]): string[] {\n const roots = new Set<string>(), seen = new Set<string>(), queue = [...files];\n while (queue.length) {\n const file = queue.pop()!;\n if (seen.has(file)) continue;\n seen.add(file);\n for (const shim of this.componentShims.get(file) ?? []) roots.add(shim);\n queue.push(...this.imports.get(file) ?? []);\n }\n return [...roots];\n }\n generated(file: string): string { return this.paths.has(file + '.ts') ? file + '.ts' : file; }\n snippetCall(file: string, offset: number): boolean { return this.components.get(file)?.snippetCalls.has(offset) ?? false; }\n original(file: string): string { return this.paths.get(file) ?? file; }\n position(file: string, position: Position): Position | null {\n const component = this.components.get(file);\n if (!component) return position;\n const offset = (component.lines[position.line - 1] ?? component.code.length) + position.column - 1;\n if (component.generatedCalls.has(offset)) return null;\n if (component.ignored.some(([start, end]) => offset >= start && offset < end)) return null;\n const mapped = originalPositionFor(component.map, { line: position.line, column: position.column - 1 });\n return mapped.line === null || mapped.column === null ? null : { line: mapped.line, column: mapped.column + 1 };\n }\n generatedLines(file: string, line: number): Set<number> {\n const component = this.components.get(file);\n if (!component) return new Set([line]);\n const lines = new Set<number>();\n decodedMappings(component.map).forEach((segments, generated) => {\n if (segments.some(segment => segment.length >= 4 && segment[2] === line - 1)) lines.add(generated + 1);\n });\n return lines;\n }\n generatedPositions(file: string, position: Position): Position[] {\n const component = this.components.get(file);\n if (!component) return [position];\n const positions: Position[] = [];\n decodedMappings(component.map).forEach((segments, line) => {\n for (const segment of segments) {\n if (segment.length >= 4 && segment[2] === position.line - 1 && segment[3] === position.column - 1)\n positions.push({ line: line + 1, column: segment[0] + 1 });\n }\n });\n return positions;\n }\n finding<T extends Position & { rule: string; origin?: string }>(file: string, finding: T, snippetTrusted = false): T | null {\n const component = this.components.get(file);\n if (snippetTrusted && component && finding.rule === 'untrusted-call-must-return-result' && finding.origin === 'svelte.Snippet') {\n const offset = (component.lines[finding.line - 1] ?? 0) + finding.column - 1;\n // Only the call wrapped by the converter, never its arguments or a user-written Snippet call.\n if (component.snippetCalls.has(offset)) return null;\n }\n const position = this.position(file, finding);\n return position ? { ...finding, ...position } : null;\n }\n error(message: string): string {\n for (const [file, source] of this.paths) {\n if (!message.startsWith(file + ':')) continue;\n const match = /^(\\d+):(\\d+)([\\s\\S]*)$/.exec(message.slice(file.length + 1));\n if (!match) return source + message.slice(file.length);\n const position = this.position(file, { line: Number(match[1]), column: Number(match[2]) });\n return position ? `${source}:${position.line}:${position.column}${match[3]}` : `${source}: generated Svelte syntax error${match[3]}`;\n }\n return message;\n }\n}\n\n/** The @noego/trust package directory, from a built chunk under dist/ or from src/ in a checkout. */\nfunction packageRoot(): string {\n let directory = dirname(fileURLToPath(import.meta.url));\n for (;;) {\n const manifest = join(directory, 'package.json');\n if (existsSync(manifest) && JSON.parse(readFileSync(manifest, 'utf8')).name === '@noego/trust') return directory;\n const parent = dirname(directory);\n if (parent === directory) throw new Error('Cannot locate the @noego/trust package directory');\n directory = parent;\n }\n}\n\n/**\n * trust's own svelte2tsx: the shipped `dist/svelte2tsx/index.cjs` bundle (built by tsup, with the shim\n * .d.ts files beside it), else the devDependency in a source checkout. svelte2tsx is deliberately not\n * taken from the checked project: it is a required-peer package most projects only have transitively,\n * and the shipped copy is the one this version is tested against. Loaded lazily, per component: its\n * `require('typescript')` and `require('svelte/compiler')` resolve from the consumer (optional peers).\n */\nfunction locateConverter(file: string): string {\n const shipped = join(packageRoot(), 'dist', 'svelte2tsx', 'index.cjs');\n if (existsSync(shipped)) return shipped;\n try { return createRequire(import.meta.url).resolve('svelte2tsx'); }\n catch { throw new Error(`Cannot check ${file}: the svelte2tsx converter is missing from @noego/trust (dist/svelte2tsx); reinstall @noego/trust or run its build`); }\n}\n\nexport function prepareSvelte(ts: TypeScript, cwd: string, files: readonly string[], override?: string, mappings: readonly TsconfigMapping[] = []): SvelteInputs {\n const inputs = new SvelteInputs();\n const bundled = createRequire(import.meta.url);\n const runtimes = new Map<string, { convert: typeof svelte2tsx; parse: typeof import('svelte/compiler').parse; version: string; shims: string[]; shimDir: string }>();\n function runtime(file: string) {\n const project = createRequire(join(dirname(file), '__trust_svelte__.cjs'));\n let manifest: string;\n try { manifest = project.resolve('svelte/package.json'); }\n catch { throw new Error(`Cannot check ${file}: install svelte in the project; .svelte files are never silently skipped`); }\n const cached = runtimes.get(manifest);\n if (cached) return cached;\n const converter = locateConverter(file);\n const version: string = JSON.parse(readFileSync(manifest, 'utf8')).version;\n const suffix = Number(version.split('.')[0]) >= 4 ? '-v4' : '';\n const result = {\n convert: (bundled(converter) as typeof import('svelte2tsx')).svelte2tsx,\n shimDir: dirname(manifest),\n parse: (project('svelte/compiler') as typeof import('svelte/compiler')).parse, version,\n shims: ['svelte-shims', 'svelte-jsx'].map(name => join(dirname(converter), name + suffix + '.d.ts')),\n };\n runtimes.set(manifest, result);\n return result;\n }\n function convert(file: string): string {\n const virtual = file + '.ts';\n if (inputs.virtual.has(virtual)) return inputs.virtual.get(virtual)!;\n if (existsSync(virtual)) throw new Error(`Cannot check ${file}: virtual file collides with real file ${virtual}`);\n const env = runtime(file);\n const source = readFileSync(file, 'utf8');\n const scripts = [...source.matchAll(/<script\\b([^>]*)>/gi)];\n const isTsFile = scripts.length === 0 || scripts.some(match => /\\blang\\s*=\\s*[\"'](?:ts|typescript)[\"']/i.test(match[1]));\n let result: ReturnType<typeof svelte2tsx>;\n try { result = env.convert(source, { filename: file, mode: 'ts', isTsFile, version: env.version, parse: env.parse, emitOnTemplateError: false }); }\n catch (error) {\n const detail = error as { message?: string; start?: { line: number; column: number } };\n throw new SvelteFileError(`${file}:${detail.start?.line ?? 1}:${(detail.start?.column ?? 0) + 1} ${detail.message ?? String(error)} (Svelte preprocessors are not run)`);\n }\n const code = result.code;\n const lines = [0];\n for (let i = 0; i < code.length; i++) if (code[i] === '\\n') lines.push(i + 1);\n const ignored: [number, number][] = [];\n for (const match of code.matchAll(/\\/\\*Ωignore_startΩ\\*\\/[\\s\\S]*?\\/\\*Ωignore_endΩ\\*\\//g)) ignored.push([match.index!, match.index! + match[0].length]);\n const map = new TraceMap({ ...result.map, version: 3 });\n const sourceLines = [0, ...[...source.matchAll(/\\n/g)].map(match => match.index! + 1)];\n const snippetCalls = new Set<number>();\n const generatedCalls = new Set<number>();\n const ast = ts.createSourceFile(virtual, code, ts.ScriptTarget.Latest, true);\n const visit = (node: TS.Node): void => {\n if (ts.isCallExpression(node) || ts.isNewExpression(node)) {\n const callee = node.expression.getText(ast);\n if (/^(?:__sveltets_|\\$\\$|svelteHTML\\.)/.test(callee)) {\n const position = ast.getLineAndCharacterOfPosition(node.getStart(ast));\n const original = originalPositionFor(map, { line: position.line + 1, column: position.character });\n const written = original.line === null || original.column === null ? '' : source.slice(sourceLines[original.line - 1] + original.column);\n if (!written?.startsWith(callee)) generatedCalls.add(node.getStart(ast));\n }\n }\n if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === '__sveltets_2_ensureSnippet') {\n const call = node.arguments[0];\n if (call && ts.isCallExpression(call)) snippetCalls.add(call.getStart(ast));\n }\n ts.forEachChild(node, visit);\n };\n visit(ast);\n inputs.paths.set(virtual, file);\n inputs.virtual.set(virtual, code);\n inputs.components.set(virtual, { source, code, lines, ignored, snippetCalls, generatedCalls, map });\n const diagnostics = (ast as TS.SourceFile & { parseDiagnostics?: readonly TS.DiagnosticWithLocation[] }).parseDiagnostics ?? [];\n if (diagnostics.length) {\n const diagnostic = diagnostics[0];\n const position = ast.getLineAndCharacterOfPosition(diagnostic.start);\n throw new SvelteFileError(inputs.error(`${virtual}:${position.line + 1}:${position.character + 1} ${ts.flattenDiagnosticMessageText(diagnostic.messageText, '\\n')}`));\n }\n const componentShims: string[] = [];\n for (const shim of env.shims) {\n if (!existsSync(shim)) throw new Error(`Cannot check ${file}: missing svelte2tsx shim ${shim}`);\n // Keep shim imports beside the project's Svelte, including when conversion is bundled.\n const virtualShim = join(env.shimDir, '__trust_' + basename(shim));\n if (existsSync(virtualShim)) throw new Error(`Svelte shim overlay collides with ${virtualShim}`);\n inputs.virtual.set(virtualShim, readFileSync(shim, 'utf8'));\n inputs.shims.add(virtualShim);\n componentShims.push(virtualShim);\n }\n inputs.componentShims.set(file, componentShims);\n return code;\n }\n // Resolve using the importer's options. Pretend candidate .svelte.ts files exist during\n // resolution, then convert the actual .svelte source. Ignored imports still need types.\n const settings = new Map<string | undefined, TS.CompilerOptions>();\n const seen = new Set<string>();\n const queue = [...files];\n while (queue.length) {\n const file = resolve(queue.shift()!);\n if (seen.has(file)) continue;\n seen.add(file);\n const code = file.endsWith('.svelte') ? convert(file) : ts.sys.readFile(file);\n if (code === undefined || !code.includes('.svelte')) continue;\n const grouping = groupByTsconfig(ts, cwd, [file], override, mappings);\n if (grouping.kind !== 'grouped') throw new Error(grouping.message);\n const owner = [...grouping.groups.keys()][0];\n let options = settings.get(owner);\n if (!options) { options = readTsconfig(ts, owner).options; settings.set(owner, options); }\n const host: TS.ModuleResolutionHost = {\n ...ts.sys,\n fileExists: path => ts.sys.fileExists(path) || (path.endsWith('.svelte.ts') && ts.sys.fileExists(path.slice(0, -3))),\n };\n const ast = ts.createSourceFile(file, code, ts.ScriptTarget.Latest, true);\n const visit = (node: TS.Node): void => {\n const specifier = ts.isImportDeclaration(node) || ts.isExportDeclaration(node) ? node.moduleSpecifier :\n ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.ImportKeyword ? node.arguments[0] : undefined;\n if (specifier && ts.isStringLiteralLike(specifier) && specifier.text.endsWith('.svelte')) {\n const resolved = ts.resolveModuleName(specifier.text, inputs.generated(file), options, host).resolvedModule?.resolvedFileName;\n if (resolved?.endsWith('.svelte.ts') && ts.sys.fileExists(resolved.slice(0, -3))) {\n const target = resolved.slice(0, -3);\n const imports = inputs.imports.get(file) ?? new Set<string>();\n imports.add(target); inputs.imports.set(file, imports); queue.push(target);\n }\n }\n ts.forEachChild(node, visit);\n };\n visit(ast);\n }\n return inputs;\n}\n","import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n return value;\n}\n\nexport function decodeSign(num: number): number {\n return num & 1 ? -0x80000000 | -(num >>> 1) : num >>> 1;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number) {\n do {\n let clamped = num & 0b011111;\n num >>>= 5;\n if (num > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (num > 0);\n}\n\nexport function encodeSign(num: number): number {\n return num < 0 ? (-num << 1) | 1 : num << 1;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n declare private buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport {\n comma,\n decodeInteger,\n decodeSign,\n encodeInteger,\n encodeSign,\n hasMoreVlq,\n semicolon,\n} from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix<A, B, O> = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line += decodeSign(decodeInteger(reader));\n const column = decodeSign(decodeInteger(reader));\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeSign(decodeInteger(reader));\n const fields = decodeSign(decodeInteger(reader));\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName\n ? [line, column, 0, 0, kind, decodeSign(decodeInteger(reader))]\n : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeSign(decodeInteger(reader));\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n encodeInteger(writer, encodeSign(startLine - state[0]));\n state[0] = startLine;\n encodeInteger(writer, encodeSign(startColumn));\n encodeInteger(writer, encodeSign(kind));\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, encodeSign(fields));\n if (scope.length === 6) encodeInteger(writer, encodeSign(scope[5]));\n\n for (const v of vars) {\n encodeInteger(writer, encodeSign(v));\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n encodeInteger(writer, encodeSign(endLine - state[0]));\n state[0] = endLine;\n encodeInteger(writer, encodeSign(endColumn));\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn += decodeSign(decodeInteger(reader));\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeSign(decodeInteger(reader));\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = definitionSourcesIndex + decodeSign(decodeInteger(reader));\n definitionScopeIndex =\n decodeSign(decodeInteger(reader)) +\n (definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0);\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex += decodeSign(decodeInteger(reader));\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = (sameSource ? callsiteLine : 0) + decodeSign(decodeInteger(reader));\n callsiteColumn =\n (sameSource && prevLine === callsiteLine ? callsiteColumn : 0) +\n decodeSign(decodeInteger(reader));\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeSign(decodeInteger(reader));\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeSign(decodeInteger(reader))]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine += decodeSign(decodeInteger(reader));\n bindingColumn =\n (bindingLine === prevBl ? bindingColumn : 0) + decodeSign(decodeInteger(reader));\n const expression = decodeSign(decodeInteger(reader));\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n encodeInteger(writer, encodeSign(range[1] - state[1]));\n state[1] = range[1];\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, encodeSign(fields));\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n encodeInteger(writer, encodeSign(sourcesIndex - state[2]));\n state[2] = sourcesIndex;\n encodeInteger(writer, encodeSign(scopesIndex - state[3]));\n state[3] = scopesIndex;\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n encodeInteger(writer, encodeSign(sourcesIndex - state[4]));\n state[4] = sourcesIndex;\n encodeInteger(writer, encodeSign(callLine - state[5]));\n state[5] = callLine;\n encodeInteger(writer, encodeSign(callColumn - state[6]));\n state[6] = callColumn;\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, encodeSign(-binding.length));\n const expression = binding[0][0];\n encodeInteger(writer, encodeSign(expression));\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n encodeInteger(writer, encodeSign(expRange[1]! - bindingStartLine));\n bindingStartLine = expRange[1]!;\n encodeInteger(writer, encodeSign(expRange[2]! - bindingStartColumn));\n bindingStartColumn = expRange[2]!;\n encodeInteger(writer, encodeSign(expRange[0]!));\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n encodeInteger(writer, encodeSign(endColumn - state[1]));\n state[1] = endColumn;\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { StringReader, StringWriter } from './strings';\nimport { decodeInteger, encodeInteger, semicolon } from './vlq';\n\nexport type MappingIndex = number;\nexport type RangeMappings = MappingIndex[][];\n\nexport function decodeRangeMappings(input: string): RangeMappings {\n const { length } = input;\n const reader = new StringReader(input);\n const rangeMappings: RangeMappings = [];\n\n do {\n const semi = reader.indexOf(';');\n const indices: MappingIndex[] = [];\n let index = 0;\n\n while (reader.pos < semi) {\n index += decodeInteger(reader);\n indices.push(index);\n }\n\n rangeMappings.push(indices);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return rangeMappings;\n}\n\nexport function encodeRangeMappings(decoded: RangeMappings): string {\n if (decoded.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < decoded.length; i++) {\n const indices = decoded[i];\n if (i > 0) writer.write(semicolon);\n\n let index = 0;\n for (let j = 0; j < indices.length; j++) {\n const offset = indices[j];\n encodeInteger(writer, offset - index);\n index = offset;\n }\n }\n\n return writer.flush();\n}\n","import {\n comma,\n decodeInteger,\n decodeSign,\n encodeInteger,\n encodeSign,\n hasMoreVlq,\n semicolon,\n} from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport { decodeRangeMappings, encodeRangeMappings } from './range-mappings';\nexport type { MappingIndex, RangeMappings } from './range-mappings';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn += decodeSign(decodeInteger(reader));\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex += decodeSign(decodeInteger(reader));\n sourceLine += decodeSign(decodeInteger(reader));\n sourceColumn += decodeSign(decodeInteger(reader));\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex += decodeSign(decodeInteger(reader));\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly<SourceMapMappings>): string;\nexport function encode(decoded: Readonly<SourceMapMappings>): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n encodeInteger(writer, encodeSign(segment[0] - genColumn));\n genColumn = segment[0];\n\n if (segment.length === 1) continue;\n encodeInteger(writer, encodeSign(segment[1] - sourcesIndex));\n encodeInteger(writer, encodeSign(segment[2] - sourceLine));\n encodeInteger(writer, encodeSign(segment[3] - sourceColumn));\n sourcesIndex = segment[1];\n sourceLine = segment[2];\n sourceColumn = segment[3];\n\n if (segment.length === 4) continue;\n encodeInteger(writer, encodeSign(segment[4] - namesIndex));\n namesIndex = segment[4];\n }\n }\n\n return writer.flush();\n}\n","// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n","import { encode, decode } from '@jridgewell/sourcemap-codec';\n\nimport resolver from './resolve';\nimport maybeSort from './sort';\nimport buildBySources from './by-source';\nimport {\n memoizedState,\n memoizedBinarySearch,\n upperBound,\n lowerBound,\n found as bsFound,\n} from './binary-search';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n REV_GENERATED_LINE,\n REV_GENERATED_COLUMN,\n} from './sourcemap-segment';\nimport { parse } from './types';\n\nimport type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport type {\n SourceMapV3,\n DecodedSourceMap,\n EncodedSourceMap,\n InvalidOriginalMapping,\n OriginalMapping,\n InvalidGeneratedMapping,\n GeneratedMapping,\n SourceMapInput,\n Needle,\n SourceNeedle,\n SourceMap,\n EachMapping,\n Bias,\n XInput,\n SectionedSourceMap,\n Ro,\n} from './types';\nimport type { Source } from './by-source';\nimport type { MemoState } from './binary-search';\n\nexport type { SourceMapSegment } from './sourcemap-segment';\nexport type {\n SourceMap,\n DecodedSourceMap,\n EncodedSourceMap,\n Section,\n SectionedSourceMap,\n SourceMapV3,\n Bias,\n EachMapping,\n GeneratedMapping,\n InvalidGeneratedMapping,\n InvalidOriginalMapping,\n Needle,\n OriginalMapping,\n OriginalMapping as Mapping,\n SectionedSourceMapInput,\n SourceMapInput,\n SourceNeedle,\n XInput,\n EncodedSourceMapXInput,\n DecodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionXInput,\n} from './types';\n\ninterface PublicMap {\n _encoded: TraceMap['_encoded'];\n _decoded: TraceMap['_decoded'];\n _decodedMemo: TraceMap['_decodedMemo'];\n _bySources: TraceMap['_bySources'];\n _bySourceMemos: TraceMap['_bySourceMemos'];\n}\n\nconst LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)';\nconst COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)';\n\nexport const LEAST_UPPER_BOUND = -1;\nexport const GREATEST_LOWER_BOUND = 1;\n\nexport { FlattenMap, FlattenMap as AnyMap } from './flatten-map';\n\nexport class TraceMap implements SourceMap {\n declare version: SourceMapV3['version'];\n declare file: SourceMapV3['file'];\n declare names: SourceMapV3['names'];\n declare sourceRoot: SourceMapV3['sourceRoot'];\n declare sources: SourceMapV3['sources'];\n declare sourcesContent: SourceMapV3['sourcesContent'];\n declare ignoreList: SourceMapV3['ignoreList'];\n\n declare resolvedSources: string[];\n declare private _encoded: string | undefined;\n\n declare private _decoded: SourceMapSegment[][] | undefined;\n declare private _decodedMemo: MemoState;\n\n declare private _bySources: Source[] | undefined;\n declare private _bySourceMemos: MemoState[] | undefined;\n\n constructor(map: Ro<SourceMapInput>, mapUrl?: string | null) {\n const isString = typeof map === 'string';\n if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap;\n\n const parsed = parse(map as Exclude<SourceMapInput, TraceMap>);\n\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined;\n\n const resolve = resolver(mapUrl, sourceRoot);\n this.resolvedSources = sources.map(resolve);\n\n const { mappings } = parsed;\n if (typeof mappings === 'string') {\n this._encoded = mappings;\n this._decoded = undefined;\n } else if (Array.isArray(mappings)) {\n this._encoded = undefined;\n this._decoded = maybeSort(mappings, isString);\n } else if ((parsed as unknown as SectionedSourceMap).sections) {\n throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);\n } else {\n throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);\n }\n\n this._decodedMemo = memoizedState();\n this._bySources = undefined;\n this._bySourceMemos = undefined;\n }\n}\n\n/**\n * Typescript doesn't allow friend access to private fields, so this just casts the map into a type\n * with public access modifiers.\n */\nfunction cast(map: unknown): PublicMap {\n return map as any;\n}\n\n/**\n * Returns the encoded (VLQ string) form of the SourceMap's mappings field.\n */\nexport function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] {\n return (cast(map)._encoded ??= encode(cast(map)._decoded!));\n}\n\n/**\n * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.\n */\nexport function decodedMappings(map: TraceMap): Readonly<DecodedSourceMap['mappings']> {\n return (cast(map)._decoded ||= decode(cast(map)._encoded!));\n}\n\n/**\n * A low-level API to find the segment associated with a generated line/column (think, from a\n * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.\n */\nexport function traceSegment(\n map: TraceMap,\n line: number,\n column: number,\n): Readonly<SourceMapSegment> | null {\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return null;\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND,\n );\n\n return index === -1 ? null : segments[index];\n}\n\n/**\n * A higher-level API to find the source/line/column associated with a generated line/column\n * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in\n * `source-map` library.\n */\nexport function originalPositionFor(\n map: TraceMap,\n needle: Needle,\n): OriginalMapping | InvalidOriginalMapping {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const decoded = decodedMappings(map);\n\n // It's common for parent source maps to have pointers to lines that have no\n // mapping (like a \"//# sourceMappingURL=\") at the end of the child file.\n if (line >= decoded.length) return OMapping(null, null, null, null);\n\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND,\n );\n\n if (index === -1) return OMapping(null, null, null, null);\n\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null,\n );\n}\n\n/**\n * Finds the generated line/column position of the provided source/line/column source position.\n */\nexport function generatedPositionFor(\n map: TraceMap,\n needle: SourceNeedle,\n): GeneratedMapping | InvalidGeneratedMapping {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\n\n/**\n * Finds all generated line/column positions of the provided source/line/column source position.\n */\nexport function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] {\n const { source, line, column, bias } = needle;\n // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit.\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\n\n/**\n * Iterates each mapping in generated position order.\n */\nexport function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name,\n } as EachMapping);\n }\n }\n}\n\nfunction sourceIndex(map: TraceMap, source: string): number {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\n\n/**\n * Retrieves the source content for a particular source, if its found. Returns null if not.\n */\nexport function sourceContentFor(map: TraceMap, source: string): string | null {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\n\n/**\n * Determines if the source is marked to ignore by the source map.\n */\nexport function isIgnored(map: TraceMap, source: string): boolean {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\n\n/**\n * A helper that skips sorting of the input map's mappings array, which can be expensive for larger\n * maps.\n */\nexport function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\n\n/**\n * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function decodedMap(\n map: TraceMap,\n): Omit<DecodedSourceMap, 'mappings'> & { mappings: readonly SourceMapSegment[][] } {\n return clone(map, decodedMappings(map));\n}\n\n/**\n * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects\n * a sourcemap, or to JSON.stringify.\n */\nexport function encodedMap(map: TraceMap): EncodedSourceMap {\n return clone(map, encodedMappings(map));\n}\n\nfunction clone<T extends string | readonly SourceMapSegment[][]>(\n map: TraceMap | DecodedSourceMap,\n mappings: T,\n): T extends string ? EncodedSourceMap : DecodedSourceMap {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList,\n } as any;\n}\n\nfunction OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping;\nfunction OMapping(\n source: string,\n line: number,\n column: number,\n name: string | null,\n): OriginalMapping;\nfunction OMapping(\n source: string | null,\n line: number | null,\n column: number | null,\n name: string | null,\n): OriginalMapping | InvalidOriginalMapping {\n return { source, line, column, name } as any;\n}\n\nfunction GMapping(line: null, column: null): InvalidGeneratedMapping;\nfunction GMapping(line: number, column: number): GeneratedMapping;\nfunction GMapping(\n line: number | null,\n column: number | null,\n): GeneratedMapping | InvalidGeneratedMapping {\n return { line, column } as any;\n}\n\nfunction traceSegmentInternal(\n segments: SourceMapSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number;\nfunction traceSegmentInternal(\n segments: SourceMapSegment[] | ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): number {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (bsFound) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\n\nfunction sliceGeneratedPositions(\n segments: ReverseSegment[],\n memo: MemoState,\n line: number,\n column: number,\n bias: Bias,\n): GeneratedMapping[] {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n\n // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in\n // insertion order) segment that matched. Even if we did respect the bias when tracing, we would\n // still need to call `lowerBound()` to find the first segment, which is slower than just looking\n // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the\n // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to\n // match LEAST_UPPER_BOUND.\n if (!bsFound && bias === LEAST_UPPER_BOUND) min++;\n\n if (min === -1 || min === segments.length) return [];\n\n // We may have found the segment that started at an earlier column. If this is the case, then we\n // need to slice all generated segments that match _that_ column, because all such segments span\n // to our desired column.\n const matchedColumn = bsFound ? column : segments[min][COLUMN];\n\n // The binary search is not guaranteed to find the lower bound when a match wasn't found.\n if (!bsFound) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\n\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: false,\n): GeneratedMapping | InvalidGeneratedMapping;\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: true,\n): GeneratedMapping[];\nfunction generatedPosition(\n map: TraceMap,\n source: string,\n line: number,\n column: number,\n bias: Bias,\n all: boolean,\n): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] {\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n\n const { sources, resolvedSources } = map;\n let sourceIndex = sources.indexOf(source);\n if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source);\n if (sourceIndex === -1) return all ? [] : GMapping(null, null);\n\n const bySourceMemos = (cast(map)._bySourceMemos ||= sources.map(memoizedState));\n const generated = (cast(map)._bySources ||= buildBySources(decodedMappings(map), bySourceMemos));\n\n const segments = generated[sourceIndex][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n\n const memo = bySourceMemos[sourceIndex];\n\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\n","import resolveUri from '@jridgewell/resolve-uri';\nimport stripFilename from './strip-filename';\n\ntype Resolve = (source: string | null) => string;\nexport default function resolver(\n mapUrl: string | null | undefined,\n sourceRoot: string | undefined,\n): Resolve {\n const from = stripFilename(mapUrl);\n // The sourceRoot is always treated as a directory, if it's not empty.\n // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327\n // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401\n const prefix = sourceRoot ? sourceRoot + '/' : '';\n\n return (source) => resolveUri(prefix + (source || ''), from);\n}\n","/**\n * Removes everything after the last \"/\", but leaves the slash.\n */\nexport default function stripFilename(path: string | undefined | null): string {\n if (!path) return '';\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n","type GeneratedColumn = number;\ntype SourcesIndex = number;\ntype SourceLine = number;\ntype SourceColumn = number;\ntype NamesIndex = number;\n\ntype GeneratedLine = number;\n\nexport type SourceMapSegment =\n | [GeneratedColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn]\n | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];\n\nexport type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn];\n\nexport const COLUMN = 0;\nexport const SOURCES_INDEX = 1;\nexport const SOURCE_LINE = 2;\nexport const SOURCE_COLUMN = 3;\nexport const NAMES_INDEX = 4;\n\nexport const REV_GENERATED_LINE = 1;\nexport const REV_GENERATED_COLUMN = 2;\n","import { COLUMN } from './sourcemap-segment';\n\nimport type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';\n\nexport default function maybeSort(\n mappings: SourceMapSegment[][],\n owned: boolean,\n): SourceMapSegment[][] {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n\n // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If\n // not, we do not want to modify the consumer's input array.\n if (!owned) mappings = mappings.slice();\n\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\n\nfunction nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\n\nfunction isSorted(line: SourceMapSegment[]): boolean {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\n\nfunction sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\n\nexport function sortComparator<T extends SourceMapSegment | ReverseSegment>(a: T, b: T): number {\n return a[COLUMN] - b[COLUMN];\n}\n","import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment';\nimport { sortComparator } from './sort';\n\nimport type { ReverseSegment, SourceMapSegment } from './sourcemap-segment';\n\nexport type Source = ReverseSegment[][];\n\n// Rebuilds the original source files, with mappings that are ordered by source line/column instead\n// of generated line/column.\nexport default function buildBySources(\n decoded: readonly SourceMapSegment[][],\n memos: unknown[],\n): Source[] {\n const sources: Source[] = memos.map(() => []);\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n\n const sourceIndex = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n\n const source = sources[sourceIndex];\n const segs = (source[sourceLine] ||= []);\n segs.push([sourceColumn, i, seg[COLUMN]]);\n }\n }\n\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n for (let j = 0; j < source.length; j++) {\n const line = source[j];\n if (line) line.sort(sortComparator);\n }\n }\n\n return sources;\n}\n","import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment';\nimport { COLUMN } from './sourcemap-segment';\n\nexport type MemoState = {\n lastKey: number;\n lastNeedle: number;\n lastIndex: number;\n};\n\nexport let found = false;\n\n/**\n * A binary search implementation that returns the index if a match is found.\n * If no match is found, then the left-index (the index associated with the item that comes just\n * before the desired index) is returned. To maintain proper sort order, a splice would happen at\n * the next index:\n *\n * ```js\n * const array = [1, 3];\n * const needle = 2;\n * const index = binarySearch(array, needle, (item, needle) => item - needle);\n *\n * assert.equal(index, 0);\n * array.splice(index + 1, 0, needle);\n * assert.deepEqual(array, [1, 2, 3]);\n * ```\n */\nexport function binarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n low: number,\n high: number,\n): number {\n while (low <= high) {\n const mid = low + ((high - low) >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n\n if (cmp === 0) {\n found = true;\n return mid;\n }\n\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n\n found = false;\n return low - 1;\n}\n\nexport function upperBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function lowerBound(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n index: number,\n): number {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\n\nexport function memoizedState(): MemoState {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1,\n };\n}\n\n/**\n * This overly complicated beast is just to record the last tested line/column and the resulting\n * index, allowing us to skip a few tests if mappings are monotonically increasing.\n */\nexport function memoizedBinarySearch(\n haystack: SourceMapSegment[] | ReverseSegment[],\n needle: number,\n state: MemoState,\n key: number,\n): number {\n const { lastKey, lastNeedle, lastIndex } = state;\n\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n\n if (needle >= lastNeedle) {\n // lastIndex may be -1 if the previous needle was not found.\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n\n return (state.lastIndex = binarySearch(haystack, needle, low, high));\n}\n","import type { SourceMapSegment } from './sourcemap-segment';\nimport type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping';\n\nexport interface SourceMapV3 {\n file?: string | null;\n names: string[];\n sourceRoot?: string;\n sources: (string | null)[];\n sourcesContent?: (string | null)[];\n version: 3;\n ignoreList?: number[];\n}\n\nexport interface EncodedSourceMap extends SourceMapV3 {\n mappings: string;\n}\n\nexport interface DecodedSourceMap extends SourceMapV3 {\n mappings: SourceMapSegment[][];\n}\n\nexport interface Section {\n offset: { line: number; column: number };\n map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;\n}\n\nexport interface SectionedSourceMap {\n file?: string | null;\n sections: Section[];\n version: 3;\n}\n\nexport type OriginalMapping = {\n source: string | null;\n line: number;\n column: number;\n name: string | null;\n};\n\nexport type InvalidOriginalMapping = {\n source: null;\n line: null;\n column: null;\n name: null;\n};\n\nexport type GeneratedMapping = {\n line: number;\n column: number;\n};\nexport type InvalidGeneratedMapping = {\n line: null;\n column: null;\n};\n\nexport type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;\n\nexport type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] };\nexport type EncodedSourceMapXInput = EncodedSourceMap & XInput;\nexport type DecodedSourceMapXInput = DecodedSourceMap & XInput;\nexport type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {\n sections: SectionXInput[];\n};\nexport type SectionXInput = Omit<Section, 'map'> & {\n map: SectionedSourceMapInput;\n};\n\nexport type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;\nexport type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;\n\nexport type Needle = { line: number; column: number; bias?: Bias };\nexport type SourceNeedle = { source: string; line: number; column: number; bias?: Bias };\n\nexport type EachMapping =\n | {\n generatedLine: number;\n generatedColumn: number;\n source: null;\n originalLine: null;\n originalColumn: null;\n name: null;\n }\n | {\n generatedLine: number;\n generatedColumn: number;\n source: string | null;\n originalLine: number;\n originalColumn: number;\n name: string | null;\n };\n\nexport abstract class SourceMap {\n declare version: SourceMapV3['version'];\n declare file: SourceMapV3['file'];\n declare names: SourceMapV3['names'];\n declare sourceRoot: SourceMapV3['sourceRoot'];\n declare sources: SourceMapV3['sources'];\n declare sourcesContent: SourceMapV3['sourcesContent'];\n declare resolvedSources: SourceMapV3['sources'];\n declare ignoreList: SourceMapV3['ignoreList'];\n}\n\nexport type Ro<T> =\n T extends Array<infer V>\n ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>>\n : T extends object\n ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>>\n : T;\ntype RoArray<T> = Ro<T>[];\ntype RoObject<T> = { [K in keyof T]: T[K] | Ro<T[K]> };\n\nexport function parse<T>(map: T): Exclude<T, string> {\n return typeof map === 'string' ? JSON.parse(map) : (map as Exclude<T, string>);\n}\n","import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping';\nimport {\n COLUMN,\n SOURCES_INDEX,\n SOURCE_LINE,\n SOURCE_COLUMN,\n NAMES_INDEX,\n} from './sourcemap-segment';\nimport { parse } from './types';\n\nimport type {\n DecodedSourceMap,\n DecodedSourceMapXInput,\n EncodedSourceMapXInput,\n SectionedSourceMapXInput,\n SectionedSourceMapInput,\n SectionXInput,\n Ro,\n} from './types';\nimport type { SourceMapSegment } from './sourcemap-segment';\n\ntype FlattenMap = {\n new (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;\n (map: Ro<SectionedSourceMapInput>, mapUrl?: string | null): TraceMap;\n};\n\nexport const FlattenMap: FlattenMap = function (map, mapUrl) {\n const parsed = parse(map as SectionedSourceMapInput);\n\n if (!('sections' in parsed)) {\n return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl);\n }\n\n const mappings: SourceMapSegment[][] = [];\n const sources: string[] = [];\n const sourcesContent: (string | null)[] = [];\n const names: string[] = [];\n const ignoreList: number[] = [];\n\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity,\n );\n\n const joined: DecodedSourceMap = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList,\n };\n\n return presortedDecodedMap(joined);\n} as FlattenMap;\n\nfunction recurse(\n input: SectionedSourceMapXInput,\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc,\n );\n }\n}\n\nfunction addSection(\n input: SectionXInput['map'],\n mapUrl: string | null | undefined,\n mappings: SourceMapSegment[][],\n sources: string[],\n sourcesContent: (string | null)[],\n names: string[],\n ignoreList: number[],\n lineOffset: number,\n columnOffset: number,\n stopLine: number,\n stopColumn: number,\n) {\n const parsed = parse(input);\n if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters<typeof recurse>));\n\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n\n append(sources, resolvedSources);\n append(names, map.names);\n\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n\n // We can only add so many lines before we step into the range that the next section's map\n // controls. When we get to the last line, then we'll start checking the segments to see if\n // they've crossed into the column range. But it may not have any columns that overstep, so we\n // still need to check that we don't overstep lines, too.\n if (lineI > stopLine) return;\n\n // The out line may already exist in mappings (if we're continuing the line started by a\n // previous section). Or, we may have jumped ahead several lines to start this section.\n const out = getLine(mappings, lineI);\n // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the\n // map can be multiple lines), it doesn't.\n const cOffset = i === 0 ? columnOffset : 0;\n\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n\n // If this segment steps into the column range that the next section's map controls, we need\n // to stop early.\n if (lineI === stopLine && column >= stopColumn) return;\n\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4\n ? [column, sourcesIndex, sourceLine, sourceColumn]\n : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]],\n );\n }\n }\n}\n\nfunction append<T>(arr: T[], other: T[]) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\n\nfunction getLine<T>(arr: T[][], index: number): T[] {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n","// TypeScript programs for the CLI: files grouped by the tsconfig that owns them (one `--tsconfig`\n// for all, else the trust config's first matching `tsconfig` entry, else the nearest tsconfig.json\n// above the file), one Program per group rooted at those files. Compiler options come from the\n// tsconfig; of its file list only the declaration files are added as roots, so ambient declarations\n// (`env.d.ts`, `/// <reference types>`) resolve exactly as under typed ESLint without loading the\n// rest of the project.\nimport { prepareSvelte, registerSvelte, svelteFor } from './svelte.js';\nimport { dirname, resolve } from 'node:path';\nimport type * as TS from 'typescript';\nimport type { TsconfigMapping } from '../eslint/config.js';\nimport type { TypeScript } from '../eslint/typescript.js';\nimport { groupMatches, realpathOrSelf } from '../eslint/zones.js';\n\nexport interface TsconfigSettings {\n readonly options: TS.CompilerOptions;\n /** `.d.ts` files of the tsconfig's own file list. */\n readonly declarationFiles: readonly string[];\n}\n\n/** Options and declaration files of `tsconfig` (strict + allowJs when there is none); throws on an unreadable tsconfig. */\nexport function readTsconfig(ts: TypeScript, tsconfig: string | undefined): TsconfigSettings {\n if (!tsconfig) return { options: { allowJs: true, strict: true, noEmit: true }, declarationFiles: [] };\n const parsed = ts.getParsedCommandLineOfConfigFile(tsconfig, {}, {\n ...ts.sys,\n onUnRecoverableConfigFileDiagnostic: (diagnostic) => {\n throw new Error(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\\n'));\n },\n });\n return {\n options: { ...parsed?.options, noEmit: true },\n declarationFiles: (parsed?.fileNames ?? []).filter((name) => /\\.d\\.[cm]?ts$/.test(name)),\n };\n}\n\nexport interface ProgramGroup {\n /** Absolute tsconfig path, or undefined when no tsconfig owns the files. */\n readonly tsconfig: string | undefined;\n /** Absolute paths of the files to check, in input order. */\n readonly files: readonly string[];\n readonly program: TS.Program;\n}\n\n/** A file matched a trust config `tsconfig` entry whose tsconfig does not exist. */\nexport interface MissingMappedTsconfig {\n readonly kind: 'missing-mapped-tsconfig';\n /** Names the config file, the entry and the missing path. */\n readonly message: string;\n}\n\nexport type TsconfigGrouping = { readonly kind: 'grouped'; readonly groups: Map<string | undefined, string[]> } | MissingMappedTsconfig;\n\nexport type ProgramsCreation = { readonly kind: 'created'; readonly groups: ProgramGroup[] } | MissingMappedTsconfig;\n\nfunction missingMappedTsconfig(mapping: TsconfigMapping, file: string): MissingMappedTsconfig {\n const files = mapping.patterns.length === 1 ? JSON.stringify(mapping.patterns[0]) : JSON.stringify(mapping.patterns);\n return {\n kind: 'missing-mapped-tsconfig',\n message:\n `trust config ${mapping.source}: \"tsconfig[${mapping.index}]\" (files ${files}) maps ${file} ` +\n `to ${mapping.tsconfig}, which does not exist`,\n };\n}\n\n/**\n * Absolute files grouped by owning tsconfig: `tsconfig` (relative to cwd) for every file when given,\n * else the first `mappings` entry whose globs match the file, else the nearest tsconfig.json.\n */\nexport function groupByTsconfig(\n ts: TypeScript,\n cwd: string,\n files: readonly string[],\n tsconfig?: string,\n mappings: readonly TsconfigMapping[] = [],\n): TsconfigGrouping {\n const override = tsconfig ? resolve(cwd, tsconfig) : undefined;\n const groups = new Map<string | undefined, string[]>();\n for (const file of files) {\n const mapping = override === undefined ? mappings.find((entry) => groupMatches(entry, realpathOrSelf(file))) : undefined;\n if (mapping && !ts.sys.fileExists(mapping.tsconfig)) return missingMappedTsconfig(mapping, file);\n const owner = override ?? mapping?.tsconfig ?? ts.findConfigFile(dirname(file), ts.sys.fileExists);\n const list = groups.get(owner) ?? [];\n list.push(file);\n groups.set(owner, list);\n }\n return { kind: 'grouped', groups };\n}\n\n/**\n * One Program per owning tsconfig (see groupByTsconfig), rooted at the given files. A missing mapped\n * tsconfig is a returned failure; an unreadable tsconfig still throws (readTsconfig).\n */\nexport function createPrograms(\n ts: TypeScript,\n cwd: string,\n files: readonly string[],\n tsconfig?: string,\n mappings: readonly TsconfigMapping[] = [],\n): ProgramsCreation {\n const grouping = groupByTsconfig(ts, cwd, files, tsconfig, mappings);\n if (grouping.kind !== 'grouped') return grouping;\n const svelte = prepareSvelte(ts, cwd, files, tsconfig, mappings);\n const groups = [...grouping.groups].map(([owner, groupFiles]) => {\n const settings = readTsconfig(ts, owner);\n const rootNames = [...new Set([...groupFiles.map(file => svelte.generated(file)), ...settings.declarationFiles, ...svelte.extraRoots(groupFiles)])];\n const host = ts.createCompilerHost(settings.options);\n const read = host.readFile.bind(host), exists = host.fileExists.bind(host);\n host.readFile = file => svelte.virtual.get(file) ?? read(file);\n host.fileExists = file => svelte.virtual.has(file) || exists(file);\n const realpath = host.realpath?.bind(host);\n host.realpath = file => svelte.virtual.has(file) ? file : realpath?.(file) ?? file;\n host.getSourceFile = (file, languageVersion) => {\n const text = host.readFile(file);\n return text === undefined ? undefined : ts.createSourceFile(file, text, languageVersion, true);\n };\n const program = ts.createProgram({ rootNames, options: settings.options, host });\n registerSvelte(program, svelte);\n return { tsconfig: owner, files: groupFiles, program };\n });\n return { kind: 'created', groups };\n}\n\n/** The program's source file for `file` (also tried by realpath, for symlinked paths). */\nexport function sourceFileOf(program: TS.Program, file: string): TS.SourceFile | undefined {\n file = svelteFor(program.getTypeChecker())?.generated(file) ?? file;\n return program.getSourceFile(file) ?? program.getSourceFile(realpathOrSelf(file));\n}\n","// Where does a callee come from? An \"origin\" is the string trust entries match against.\n//\n// JS built-in (TypeScript lib) js:JSON.parse, js:Array.map, js:Reflect.get, js:URL\n// Node built-in module node:fs.readFileSync, node:fs/promises.readFile, node:child_process.spawn\n// Node global (@types/node) node:global.setTimeout, node:global.Buffer.from, node:global.process.cwd\n// other declare module \"x\" x.member (ambient modules outside @types/node keep their name)\n// npm package zod.object, better-sqlite3.Database.prepare, @scope/pkg.fn\n// first-party, passthrough zone local:server/repositories/x.ts#XRepository.find\n// first-party, ignore zone local:server/testing/fixture.ts#makeThing\n// first-party, checked zone (no origin: trusted, it is checked itself)\n//\n// The `node:` prefix keeps Node's own modules apart from npm packages of the same name (`path`,\n// `events`, `util`, `buffer`, … all exist on npm). Member paths are the named containers from the\n// module down to the declaration, so trusting `js:JSON` covers `js:JSON.parse` while\n// `js:JSON.stringify` alone does not. Linked packages (npm link, file:) resolve to paths outside\n// node_modules; they are recognised by their nearest package.json being outside the project root.\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport type * as TS from 'typescript';\nimport type { TypeScript } from './typescript.js';\nimport { realpathOrSelf, toPosix, type Zone, type Zones } from './zones.js';\n\nexport type OriginInfo =\n // `base` is the package/module/namespace part of `origin`, before any member path (`js:`,\n // `node:fs/promises`, `node:global`, `lodash.merge`). Trust entries may extend the base only with\n // `/` (subpath), so `lodash` never covers the package `lodash.merge`.\n | { readonly kind: 'external'; readonly origin: string; readonly base: string; readonly fileName: string }\n | { readonly kind: 'local'; readonly zone: Exclude<Zone, 'external'>; readonly origin: string; readonly fileName: string };\n\nconst NODE_MODULES = '/node_modules/';\n// Default library paths accepted by the TypeScript-based ESLint/core integrations.\nconst TS_LIB_FILE = /\\/(?:typescript|@tsc-rs\\/[^/]+|@typescript\\/native-preview-[^/]+)\\/lib\\/lib\\.[^/]*\\.d\\.ts$/;\n\n/**\n * `declare global { … }` or `global { … }` inside `declare module \"m\"`. typescript flags it GlobalAugmentation;\n * compiler-compatible ASTs can also represent it as the module declaration named `global`.\n */\nfunction isGlobalAugmentation(ts: TypeScript, node: TS.ModuleDeclaration): boolean {\n return (node.flags & ts.NodeFlags.GlobalAugmentation) !== 0 || (ts.isIdentifier(node.name) && node.name.text === 'global');\n}\nexport const TRUST_PACKAGE = '@noego/trust';\nconst JS_BASE = 'js:';\nconst NODE_PREFIX = 'node:';\nconst NODE_GLOBAL_BASE = 'node:global';\n/** packageFromNodeModulesPath maps `@types/node` to this name. */\nconst NODE_TYPES_PACKAGE = 'node';\n/**\n * @types/node declares several globals through interfaces (`var process: NodeJS.Process`); name them\n * by the global you write, not the interface: `NodeJS.Process.cwd` → `process.cwd`.\n */\nconst NODE_GLOBAL_INTERFACES: Readonly<Record<string, string>> = {\n Process: 'process',\n Require: 'require',\n Module: 'module',\n Console: 'console',\n Global: 'global',\n};\n\nfunction nodeGlobalPath(members: readonly string[]): string[] {\n const path = members[0] === 'NodeJS' ? members.slice(1) : [...members];\n if (path.length > 0 && NODE_GLOBAL_INTERFACES[path[0]]) path[0] = NODE_GLOBAL_INTERFACES[path[0]];\n return path;\n}\n\nconst manifestNameCache = new Map<string, string | null>();\n\nfunction readManifestName(directory: string): string | null {\n const file = join(directory, 'package.json');\n if (!existsSync(file)) return null;\n try {\n const manifest: unknown = JSON.parse(readFileSync(file, 'utf8'));\n if (manifest && typeof manifest === 'object' && 'name' in manifest && typeof manifest.name === 'string') {\n return manifest.name;\n }\n } catch {\n return null;\n }\n return null;\n}\n\n/** Name in the nearest package.json that has one, walking up from the file. */\nexport function nearestPackageName(fileName: string): string | null {\n const visited: string[] = [];\n let directory = dirname(fileName);\n let result: string | null = null;\n for (;;) {\n const cached = manifestNameCache.get(directory);\n if (cached !== undefined) {\n result = cached;\n break;\n }\n visited.push(directory);\n const name = readManifestName(directory);\n if (name) {\n result = name;\n break;\n }\n const parent = dirname(directory);\n if (parent === directory) break;\n directory = parent;\n }\n for (const entry of visited) manifestNameCache.set(entry, result);\n return result;\n}\n\nfunction packageOrigin(name: string): string {\n if (!name.startsWith('@types/')) return name;\n const bare = name.slice('@types/'.length);\n return bare.includes('__') ? `@${bare.replace('__', '/')}` : bare;\n}\n\nfunction packageFromNodeModulesPath(fileName: string): string | null {\n const index = fileName.lastIndexOf(NODE_MODULES);\n if (index < 0) return null;\n const parts = fileName.slice(index + NODE_MODULES.length).split('/');\n return packageOrigin(parts[0].startsWith('@') ? `${parts[0]}/${parts[1]}` : parts[0]);\n}\n\n/** True when the file belongs to the @noego/trust package (installed, linked, or its own source). */\nexport function isTrustPackageFile(fileName: string): boolean {\n return packageFromNodeModulesPath(toPosix(fileName)) === TRUST_PACKAGE || nearestPackageName(fileName) === TRUST_PACKAGE;\n}\n\nexport class OriginResolver {\n constructor(\n private readonly ts: TypeScript,\n private readonly zones: Zones,\n ) {}\n\n originOf(declaration: TS.Node): OriginInfo {\n const generated = declaration.getSourceFile().fileName;\n const fileName = toPosix(this.zones.virtualPaths.get(generated) ?? generated);\n const members = this.memberPath(declaration);\n const external = (base: string, path: readonly string[] = members): OriginInfo => ({\n kind: 'external',\n // A namespace base (`js:`) takes its first member directly: `js:JSON.parse`, not `js:.JSON.parse`.\n origin: path.length > 0 ? `${base}${base.endsWith(':') ? '' : '.'}${path.join('.')}` : base,\n base,\n fileName,\n });\n if (TS_LIB_FILE.test(fileName)) return external(JS_BASE);\n const fromNodeModules = packageFromNodeModulesPath(fileName);\n const fromNodeTypes = fromNodeModules === NODE_TYPES_PACKAGE;\n const moduleName = this.ambientModuleName(declaration);\n if (moduleName) return external(fromNodeTypes ? `${NODE_PREFIX}${moduleName}` : moduleName);\n if (fromNodeTypes) return external(NODE_GLOBAL_BASE, nodeGlobalPath(members));\n if (fromNodeModules) return external(fromNodeModules);\n const zone = this.zones.zoneOf(fileName);\n if (zone === 'external') {\n const name = nearestPackageName(realpathOrSelf(fileName));\n return external(name ? packageOrigin(name) : `external:${fileName}`);\n }\n const path = this.zones.relativePath(fileName);\n const origin = members.length > 0 ? `local:${path}#${members.join('.')}` : `local:${path}`;\n return { kind: 'local', zone, origin, fileName };\n }\n\n /** Named containers from the module down to (and including) the declaration. */\n memberPath(declaration: TS.Node): string[] {\n const ts = this.ts;\n const names: string[] = [];\n for (let node: TS.Node | undefined = declaration; node && !ts.isSourceFile(node); node = node.parent) {\n if (ts.isModuleDeclaration(node)) {\n if (ts.isStringLiteral(node.name)) break;\n if (isGlobalAugmentation(ts, node)) continue;\n }\n const name = this.containerName(node);\n if (name && !(this.zones.virtualPaths.has(declaration.getSourceFile().fileName) && (name.startsWith('$$') || name.startsWith('__sveltets_')))) names.push(name);\n }\n return names.reverse();\n }\n\n private containerName(node: TS.Node): string | null {\n const ts = this.ts;\n const named =\n ts.isInterfaceDeclaration(node) ||\n ts.isClassDeclaration(node) ||\n ts.isClassExpression(node) ||\n ts.isFunctionDeclaration(node) ||\n ts.isModuleDeclaration(node) ||\n ts.isVariableDeclaration(node) ||\n ts.isMethodSignature(node) ||\n ts.isMethodDeclaration(node) ||\n ts.isPropertySignature(node) ||\n ts.isPropertyDeclaration(node) ||\n ts.isPropertyAssignment(node) ||\n ts.isGetAccessorDeclaration(node) ||\n ts.isEnumDeclaration(node);\n if (!named) return null;\n const name = (node as TS.NamedDeclaration).name;\n if (!name) return null;\n if (ts.isIdentifier(name) || ts.isStringLiteral(name) || ts.isPrivateIdentifier(name)) {\n return ts.isInterfaceDeclaration(node) ? name.text.replace(/Constructor$/, '') : name.text;\n }\n return null;\n }\n\n private ambientModuleName(declaration: TS.Node): string | null {\n const ts = this.ts;\n for (let node: TS.Node | undefined = declaration; node; node = node.parent) {\n // `declare module \"module\" { global { … } }` declares globals, not exports of \"module\":\n // fall back to the declaring package (`node.NodeJS.Require.resolve`).\n if (ts.isModuleDeclaration(node) && isGlobalAugmentation(ts, node)) return null;\n if (ts.isModuleDeclaration(node) && ts.isStringLiteral(node.name)) return node.name.text.replace(/^node:/, '');\n }\n return null;\n }\n}\n","// Validators: the one place a type may be claimed instead of proven. A function is a validator when\n// the line directly above its declaration is the directive\n//\n// //trust:validator_function\n// export function parseUser(input: unknown) { ... }\n//\n// on a function declaration, a method, or an arrow / function expression assigned to a `const`. From\n// there on the function is not questioned: the type-claim rule (type-claims.ts) asks `isInsideValidator`\n// about every claim it finds and reports only the ones outside, so casts, `!`, `any`, type predicates\n// and caller-chosen generics inside a validator (and inside the functions nested in it) are allowed,\n// and its return type is trusted at every call site (a body with no reported claim proves its return\n// type, see bodyProvesReturn). The directive is a human decision, like a trust-list entry: nothing here\n// inspects what the function does.\n//\n// Every other `//trust:` comment is a finding (origin `directive`, reported by the type-claim rule): a\n// misspelled directive (`//trust:validator`), a block comment, or one that is not directly above a\n// declaration of the right shape, so a typo cannot silently leave a function unmarked or mark the\n// wrong thing. `trust check`, `trust baseline`, `trust explain` and the ESLint rule all go through here.\n// The one other directive, `//trust:accept <reason>`, is read here too and decided in accept.ts.\nimport type * as TS from 'typescript';\nimport type { TypeScript } from '../eslint/typescript.js';\n\n/** The directive, as written after the comment marker. */\nexport const VALIDATOR_DIRECTIVE = 'trust:validator_function';\n\n/** The accept directive, as written after the comment marker; its reason follows it (accept.ts). */\nexport const ACCEPT_DIRECTIVE = 'trust:accept';\n\n/** Answers \"is `node` inside an approved validator?\" for the nodes of one program. */\nexport type InsideValidator = (node: TS.Node) => boolean;\n\n/** A `//trust:…` comment: the validator or accept directive, or a typo of one. */\nexport interface TrustDirective {\n readonly pos: number;\n readonly end: number;\n /** The comment as written (`//trust:validator_function`). */\n readonly text: string;\n readonly kind: 'line' | 'block';\n /** The comment's content after its marker, trimmed (`trust:validator_function`). */\n readonly body: string;\n}\n\n/** Why a directive marks nothing: not the directive, not a `//` comment, or not directly above a function of the right shape. */\nexport type DirectiveProblem = 'unknown' | 'block' | 'misplaced';\n\ntype ValidatorCarrier = TS.FunctionDeclaration | TS.MethodDeclaration | TS.VariableStatement;\n\nfunction lineOf(sourceFile: TS.SourceFile, position: number): number {\n return sourceFile.getLineAndCharacterOfPosition(position).line;\n}\n\n/** The comment-marker namespace of trust's own directives (`//trust:…`). */\nexport const TRUST_DIRECTIVE_PREFIX = 'trust';\n\n/**\n * `range` as a directive of `prefix`: a comment whose content starts with `<prefix>:` followed by\n * something (`// trust: the caller checked it` is prose, not a directive). Else null.\n */\nfunction asDirective(ts: TypeScript, text: string, range: TS.CommentRange, prefix: string = TRUST_DIRECTIVE_PREFIX): TrustDirective | null {\n const raw = text.slice(range.pos, range.end);\n const line = range.kind === ts.SyntaxKind.SingleLineCommentTrivia;\n const inner = line ? raw.slice(2) : raw.slice(2, raw.endsWith('*/') ? -2 : undefined).replace(/^\\*+/, '');\n const body = inner.trim();\n if (!body.startsWith(`${prefix}:`) || !/\\S/.test(body.charAt(prefix.length + 1))) return null;\n return { pos: range.pos, end: range.end, text: raw, kind: line ? 'line' : 'block', body };\n}\n\n/**\n * True when `directive` is the directive `name` (`trust:accept`): its body is `name` alone or `name`\n * followed by whitespace and a reason, so `trust:accepted` is a typo of it, not it.\n */\nexport function isNamedDirective(directive: TrustDirective, name: string): boolean {\n return directive.body === name || (directive.body.startsWith(name) && /\\s/.test(directive.body.charAt(name.length)));\n}\n\n/** The text after the directive name `name`, trimmed: empty when there is no reason. */\nexport function directiveReason(directive: TrustDirective, name: string): string {\n return directive.body.slice(name.length).trim();\n}\n\n/** `trust:accept`, alone or followed by whitespace and a reason (`trust:accepted` is a typo, not an accept). */\nexport function isAcceptDirective(directive: TrustDirective): boolean {\n return isNamedDirective(directive, ACCEPT_DIRECTIVE);\n}\n\n/**\n * Every trust directive of the file, in source order. TypeScript keeps no list of comments, so they are\n * read from the trivia around every node and token of the tree: before each one's first character and\n * after its last. Tokens count, not only nodes, so a comment followed by nothing but a closing brace,\n * bracket or parenthesis (an empty function body, class body, object or array literal, parameter list\n * or type literal) is seen too. JSDoc subtrees are skipped: their lines are comment text, not comments.\n * A `//` inside a string, a template or a regular expression is not a comment.\n */\nexport function trustDirectivesIn(ts: TypeScript, sourceFile: TS.SourceFile): TrustDirective[] {\n return lineDirectivesIn(ts, sourceFile, TRUST_DIRECTIVE_PREFIX);\n}\n\n/**\n * Every directive of `prefix` (`ioc` for `//ioc:…`) in the file, in source order, found exactly as\n * trustDirectivesIn finds trust's own: line and block comments alike, so a caller can report the\n * block ones.\n */\nexport function lineDirectivesIn(ts: TypeScript, sourceFile: TS.SourceFile, prefix: string): TrustDirective[] {\n const text = sourceFile.text;\n const seen = new Set<number>();\n const found: TrustDirective[] = [];\n const take = (ranges: readonly TS.CommentRange[] | undefined): void => {\n for (const range of ranges ?? []) {\n if (seen.has(range.pos)) continue;\n seen.add(range.pos);\n const directive = asDirective(ts, text, range, prefix);\n if (directive) found.push(directive);\n }\n };\n const visit = (node: TS.Node): void => {\n if (ts.isJSDoc(node)) return;\n // Leading: the comments on the lines before this node or token; trailing: the one after it on its line.\n take(ts.getLeadingCommentRanges(text, node.pos));\n for (const child of node.getChildren(sourceFile)) visit(child);\n take(ts.getTrailingCommentRanges(text, node.end));\n };\n visit(sourceFile);\n return found.sort((a, b) => a.pos - b.pos);\n}\n\n/** The arrow / function expression a `const` statement with exactly one declaration holds, else null. */\nfunction constFunction(ts: TypeScript, statement: TS.VariableStatement): TS.ArrowFunction | TS.FunctionExpression | null {\n const list = statement.declarationList;\n if (!(list.flags & ts.NodeFlags.Const) || list.declarations.length !== 1) return null;\n const initializer = list.declarations[0].initializer;\n return initializer && (ts.isArrowFunction(initializer) || ts.isFunctionExpression(initializer)) ? initializer : null;\n}\n\n/** A declaration the directive may mark: a function declaration, a method, or a `const` holding an arrow / function expression. */\nfunction isValidatorCarrier(ts: TypeScript, node: TS.Node): node is ValidatorCarrier {\n if (ts.isFunctionDeclaration(node) || ts.isMethodDeclaration(node)) return true;\n return ts.isVariableStatement(node) && constFunction(ts, node) !== null;\n}\n\n/** The declaration that carries the directive for the function `fn`: itself, or the `const` statement it is assigned by; null when `fn` has no markable shape. */\nfunction carrierOf(ts: TypeScript, fn: TS.Node): ValidatorCarrier | null {\n if (ts.isFunctionDeclaration(fn) || ts.isMethodDeclaration(fn)) return fn;\n if (!ts.isArrowFunction(fn) && !ts.isFunctionExpression(fn)) return null;\n const declaration = fn.parent;\n if (!ts.isVariableDeclaration(declaration) || declaration.initializer !== fn) return null;\n const statement = declaration.parent.parent;\n return ts.isVariableStatement(statement) && constFunction(ts, statement) === fn ? statement : null;\n}\n\n/**\n * The directive directly above `node`: the last comment before it is a trust directive, on the line\n * directly above its first token (after any JSDoc, never with a blank line between). Else null.\n */\nexport function directiveDirectlyAbove(ts: TypeScript, node: TS.Node, prefix: string = TRUST_DIRECTIVE_PREFIX): TrustDirective | null {\n const sourceFile = node.getSourceFile();\n const last = ts.getLeadingCommentRanges(sourceFile.text, node.pos)?.at(-1);\n const directive = last && asDirective(ts, sourceFile.text, last, prefix);\n if (!directive) return null;\n return lineOf(sourceFile, directive.pos) + 1 === lineOf(sourceFile, node.getStart(sourceFile)) ? directive : null;\n}\n\n/** The directive that marks `carrier`: `//trust:validator_function` directly above it. Else null. */\nfunction markingDirective(ts: TypeScript, carrier: ValidatorCarrier): TrustDirective | null {\n const directive = directiveDirectlyAbove(ts, carrier);\n return directive && directive.kind === 'line' && directive.body === VALIDATOR_DIRECTIVE ? directive : null;\n}\n\nconst marked = new WeakMap<TS.Node, boolean>();\n\n/**\n * True when the function `fn` (a function declaration, a method, or an arrow / function expression\n * assigned to a `const`) is marked `//trust:validator_function`. A call into such a function is the\n * sanctioned way out of `unknown`: its return type is trusted.\n */\nexport function isMarkedValidator(ts: TypeScript, fn: TS.Node): boolean {\n const known = marked.get(fn);\n if (known !== undefined) return known;\n const carrier = carrierOf(ts, fn);\n const result = carrier !== null && markingDirective(ts, carrier) !== null;\n marked.set(fn, result);\n return result;\n}\n\nfunction isFunctionLike(ts: TypeScript, node: TS.Node): boolean {\n return ts.isFunctionDeclaration(node) || ts.isMethodDeclaration(node) || ts.isArrowFunction(node) || ts.isFunctionExpression(node);\n}\n\n/**\n * The validator recogniser the rules use: `node` (a claim: a cast, `x!`, an `any`, a type predicate, a\n * generic call) is inside a validator when it, or any function enclosing it, is a marked validator.\n */\nexport function isInsideValidator(ts: TypeScript, node: TS.Node): boolean {\n for (let current: TS.Node | undefined = node; current; current = current.parent) {\n if (isFunctionLike(ts, current) && isMarkedValidator(ts, current)) return true;\n }\n return false;\n}\n\n/** The outermost node whose first token is at `position` (the end-of-file token counts), else undefined. */\nfunction nodeStartingAt(ts: TypeScript, sourceFile: TS.SourceFile, position: number): TS.Node | undefined {\n let node: TS.Node = sourceFile;\n for (;;) {\n const child = ts.forEachChild(node, (candidate) => {\n const atEnd = position === candidate.end && candidate.kind === ts.SyntaxKind.EndOfFileToken;\n return candidate.pos <= position && (position < candidate.end || atEnd) ? candidate : undefined;\n });\n if (!child) return undefined;\n if (child.getStart(sourceFile) === position) return child;\n node = child;\n }\n}\n\n/** Offset of the first token after `position`: whitespace and comments skipped, by the scanner's own rules. */\nfunction nextTokenStart(ts: TypeScript, text: string, position: number): number {\n const scanner = ts.createScanner(ts.ScriptTarget.Latest, true, ts.LanguageVariant.Standard, text, undefined, position);\n scanner.scan();\n return scanner.getTokenStart();\n}\n\n/** The outermost node whose first token is the first one after `directive` (the node it sits above), else undefined. */\nexport function nodeBelow(ts: TypeScript, sourceFile: TS.SourceFile, directive: TrustDirective): TS.Node | undefined {\n return nodeStartingAt(ts, sourceFile, nextTokenStart(ts, sourceFile.text, directive.end));\n}\n\n/** Why `directive` marks nothing, or null when it marks a validator (the declaration directly below it). */\nexport function directiveProblem(ts: TypeScript, sourceFile: TS.SourceFile, directive: TrustDirective): DirectiveProblem | null {\n if (directive.body !== VALIDATOR_DIRECTIVE) return 'unknown';\n if (directive.kind !== 'line') return 'block';\n const below = nodeBelow(ts, sourceFile, directive);\n const marks = below !== undefined && isValidatorCarrier(ts, below) && markingDirective(ts, below)?.pos === directive.pos;\n return marks ? null : 'misplaced';\n}\n","// Resolve the consumer's `typescript` (the one typescript-eslint built the Program with), so\n// SyntaxKind values and node guards match the checker we are handed. Falls back to our own copy.\nimport { createRequire } from 'node:module';\nimport { join } from 'node:path';\nimport type * as TS from 'typescript';\n\nexport type TypeScript = typeof TS;\n\nconst cache = new Map<string, TypeScript>();\n\nexport function loadTypeScript(cwd: string): TypeScript {\n const cached = cache.get(cwd);\n if (cached) return cached;\n let ts: TypeScript;\n try {\n ts = createRequire(join(cwd, '__noego_trust__.cjs'))('typescript') as TypeScript;\n } catch {\n ts = createRequire(import.meta.url)('typescript') as TypeScript;\n }\n cache.set(cwd, ts);\n return ts;\n}\n","// Baseline of existing violations, keyed by file + rule + origin with a count.\n// A check fails only when some key's current count exceeds its baselined count, so:\n// - existing violations do not block CI;\n// - a new unguarded call (or a new call in a file that already had one) fails;\n// - removing an origin from the trust list makes all of its calls new violations.\n// Findings come from the core (check-file.ts), which already carries each one's rule and origin.\n//\n// Nothing here is specific to trust's rules: any finding with a file, a rule and an origin counts, so a\n// sibling checker (`@noego/trust/core`) keeps its own baseline file with its own rule ids.\nimport { existsSync, readFileSync } from 'node:fs';\nimport { THROW_RULE, UNTRUSTED_CALL_RULE, type Finding } from './messages.js';\n\nexport { THROW_RULE, UNTRUSTED_CALL_RULE, type Finding };\n\n/** What a baseline counts a finding by. */\nexport type BaselineFinding = Pick<Finding, 'file' | 'rule' | 'origin'>;\n\n/** file → rule → origin → count */\nexport type BaselineCounts = Record<string, Record<string, Record<string, number>>>;\n\nexport interface BaselineDelta<F extends BaselineFinding = Finding> {\n readonly file: string;\n readonly rule: string;\n readonly origin: string;\n readonly allowed: number;\n readonly found: number;\n readonly findings: readonly F[];\n}\n\nexport function countFindings(findings: readonly BaselineFinding[]): BaselineCounts {\n const counts: BaselineCounts = {};\n for (const finding of findings) {\n const byRule = (counts[finding.file] ??= {});\n const byOrigin = (byRule[finding.rule] ??= {});\n byOrigin[finding.origin] = (byOrigin[finding.origin] ?? 0) + 1;\n }\n return counts;\n}\n\n/**\n * Which baseline entries a run speaks for: `all` (a run over the whole tree: an entry with no\n * findings now is stale, and --update drops it), or only the entries of the files it checked\n * (baseline keys); entries of other files are neither stale nor rewritten.\n */\nexport type BaselineScope = { readonly kind: 'all' } | { readonly kind: 'files'; readonly files: ReadonlySet<string> };\n\nexport const WHOLE_BASELINE: BaselineScope = { kind: 'all' };\n\nfunction inScope(scope: BaselineScope, file: string) {\n return scope.kind === 'all' || scope.files.has(file);\n}\n\n/** The baseline after `--update`: in-scope files get their current counts, out-of-scope entries are kept as they are. */\nexport function updateBaseline(baseline: BaselineCounts, findings: readonly BaselineFinding[], scope: BaselineScope) {\n const current = countFindings(findings);\n if (scope.kind === 'all') return { counts: current, kept: 0 };\n const kept = Object.entries(baseline).filter(([file]) => !scope.files.has(file));\n return { counts: { ...Object.fromEntries(kept), ...current }, kept: kept.length };\n}\n\nexport function compareToBaseline<F extends BaselineFinding = Finding>(\n findings: readonly F[],\n baseline: BaselineCounts,\n scope: BaselineScope = WHOLE_BASELINE,\n): { readonly added: BaselineDelta<F>[]; readonly stale: BaselineDelta<F>[] } {\n const groups = new Map<string, F[]>();\n for (const finding of findings) {\n const key = JSON.stringify([finding.file, finding.rule, finding.origin]);\n const list = groups.get(key) ?? [];\n list.push(finding);\n groups.set(key, list);\n }\n const added: BaselineDelta<F>[] = [];\n for (const list of groups.values()) {\n const { file, rule, origin } = list[0];\n const allowed = baseline[file]?.[rule]?.[origin] ?? 0;\n if (list.length > allowed) added.push({ file, rule, origin, allowed, found: list.length, findings: list });\n }\n const stale: BaselineDelta<F>[] = [];\n for (const [file, byRule] of Object.entries(baseline)) {\n if (!inScope(scope, file)) continue;\n for (const [rule, byOrigin] of Object.entries(byRule)) {\n for (const [origin, allowed] of Object.entries(byOrigin)) {\n const found = groups.get(JSON.stringify([file, rule, origin]))?.length ?? 0;\n if (found < allowed) stale.push({ file, rule, origin, allowed, found, findings: [] });\n }\n }\n }\n return { added, stale };\n}\n\nfunction sortObject<T>(record: Record<string, T>, map: (value: T) => unknown): Record<string, unknown> {\n return Object.fromEntries(\n Object.keys(record)\n .sort()\n .map((key) => [key, map(record[key])]),\n );\n}\n\n/** The `$comment` of trust's own baseline file. */\nexport const TRUST_BASELINE_COMMENT =\n 'Generated by `trust baseline --update`. Existing @noego/trust violations, counted per file + rule + origin. ' +\n 'CI fails when a count grows. Shrink it by fixing calls and re-running --update; never hand-raise a count.';\n\n/** The baseline file's text; `comment` (another tool's own) replaces trust's `$comment`. */\nexport function serializeBaseline(counts: BaselineCounts, comment: string = TRUST_BASELINE_COMMENT): string {\n const violations = sortObject(counts, (byRule) => sortObject(byRule, (byOrigin) => sortObject(byOrigin, (count) => count)));\n const document = {\n $comment: comment,\n version: 1,\n violations,\n };\n return `${JSON.stringify(document, null, 2)}\\n`;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Throws (with `source` in the message) on invalid JSON or an unexpected shape. */\nexport function parseBaseline(text: string, source: string): BaselineCounts {\n const document: unknown = JSON.parse(text);\n if (!isRecord(document) || document.version !== 1 || !isRecord(document.violations)) {\n throw new Error(`${source}: expected { \"version\": 1, \"violations\": { … } }`);\n }\n const counts: BaselineCounts = {};\n for (const [file, byRule] of Object.entries(document.violations)) {\n if (!isRecord(byRule)) throw new Error(`${source}: violations[\"${file}\"] must be an object`);\n for (const [rule, byOrigin] of Object.entries(byRule)) {\n if (!isRecord(byOrigin)) throw new Error(`${source}: violations[\"${file}\"][\"${rule}\"] must be an object`);\n for (const [origin, count] of Object.entries(byOrigin)) {\n if (typeof count !== 'number' || !Number.isInteger(count) || count < 0) {\n throw new Error(`${source}: count for ${file} ${rule} ${origin} must be a non-negative integer`);\n }\n ((counts[file] ??= {})[rule] ??= {})[origin] = count;\n }\n }\n }\n return counts;\n}\n\n/** The baseline's counts (none when the file does not exist), or why it could not be read. */\nexport function readBaseline(baselineFile: string): { counts: BaselineCounts } | { error: string } {\n if (!existsSync(baselineFile)) return { counts: {} };\n try {\n return { counts: parseBaseline(readFileSync(baselineFile, 'utf8'), baselineFile) };\n } catch (error) {\n return { error: error instanceof Error ? error.message : String(error) };\n }\n}\n\n/** A delta as `trust baseline` prints it: a header line, then one indented line per finding. */\nexport function describeBaselineDelta(delta: BaselineDelta<BaselineFinding & { readonly line: number; readonly column: number; readonly message: string }>): string[] {\n const header = `${delta.file} ${delta.rule} ${delta.origin}: ${delta.found} found, ${delta.allowed} baselined`;\n return [header, ...delta.findings.map((finding) => ` ${delta.file}:${finding.line}:${finding.column} ${finding.message}`)];\n}\n"],"mappings":";AAGO,IAAM,sBAAsB;AAC5B,IAAM,aAAa;AAEnB,IAAM,eAAe;AAIrB,IAAM,iBAA+C;AAAA,EAC1D,SAAS;AAAA,EACT,cAA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AAAA,EACF;AACA,SAAO;AACT;AAGO,SAAS,aAAa,cAAsE;AACjG,MAAI,CAACC,YAAW,YAAY,EAAG,QAAO,EAAE,QAAQ,CAAC,EAAE;AACnD,MAAI;AACF,WAAO,EAAE,QAAQ,cAAcC,cAAa,cAAc,MAAM,GAAG,YAAY,EAAE;AAAA,EACnF,SAAS,OAAO;AACd,WAAO,EAAE,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;AAAA,EACzE;AACF;AAGO,SAAS,sBAAsB,OAAgI;AACpK,QAAM,SAAS,GAAG,MAAM,IAAI,KAAK,MAAM,IAAI,KAAK,MAAM,MAAM,KAAK,MAAM,KAAK,WAAW,MAAM,OAAO;AACpG,SAAO,CAAC,QAAQ,GAAG,MAAM,SAAS,IAAI,CAAC,YAAY,OAAO,MAAM,IAAI,IAAI,QAAQ,IAAI,IAAI,QAAQ,MAAM,KAAK,QAAQ,OAAO,EAAE,CAAC;AAC/H;","names":["sep","i","acc","ext","start","final","ext","qmark","star","regExpEscape","i","path","sep","isAbsolute","isAbsolute","path","existsSync","readFileSync","dirname","join","resolve","match","path","url","resolve","path","resolve","sortComparator","resolve","_a","match","dirname","join","existsSync","readFileSync","resolve","path","dirname","resolve","resolve","dirname","existsSync","readFileSync","dirname","join","path","join","existsSync","readFileSync","dirname","range","found","createRequire","join","cache","existsSync","readFileSync","found","isRecord","existsSync","readFileSync"]}
|