@j0hanz/fetch-url-mcp 1.12.7 → 1.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http/auth.d.ts +9 -4
- package/dist/http/auth.d.ts.map +1 -1
- package/dist/http/auth.js +30 -5
- package/dist/http/index.d.ts +4 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +5 -0
- package/dist/http/native.d.ts +73 -0
- package/dist/http/native.d.ts.map +1 -1
- package/dist/http/native.js +597 -10
- package/dist/http/rate-limit.d.ts +7 -2
- package/dist/http/rate-limit.d.ts.map +1 -1
- package/dist/http/rate-limit.js +9 -4
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -6
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +22 -2
- package/dist/lib/core.d.ts +57 -5
- package/dist/lib/core.d.ts.map +1 -1
- package/dist/lib/core.js +155 -5
- package/dist/lib/error/classes.d.ts +19 -0
- package/dist/lib/error/classes.d.ts.map +1 -0
- package/dist/lib/error/classes.js +107 -0
- package/dist/lib/error/classify.d.ts +4 -0
- package/dist/lib/error/classify.d.ts.map +1 -0
- package/dist/lib/error/classify.js +154 -0
- package/dist/lib/error/codes.d.ts +23 -0
- package/dist/lib/error/codes.d.ts.map +1 -0
- package/dist/lib/error/codes.js +22 -0
- package/dist/lib/error/index.d.ts +6 -0
- package/dist/lib/error/index.d.ts.map +1 -0
- package/dist/lib/error/index.js +7 -0
- package/dist/lib/{error-messages.d.ts → error/messages.d.ts} +2 -2
- package/dist/lib/error/messages.d.ts.map +1 -0
- package/dist/lib/{error-messages.js → error/messages.js} +2 -2
- package/dist/lib/{tool-errors.d.ts → error/payload.d.ts} +7 -13
- package/dist/lib/error/payload.d.ts.map +1 -0
- package/dist/lib/error/payload.js +108 -0
- package/dist/lib/mcp-interop.d.ts.map +1 -1
- package/dist/lib/mcp-interop.js +4 -6
- package/dist/lib/net/http.d.ts.map +1 -0
- package/dist/lib/{http.js → net/http.js} +5 -7
- package/dist/lib/net/index.d.ts +4 -0
- package/dist/lib/net/index.d.ts.map +1 -0
- package/dist/lib/net/index.js +5 -0
- package/dist/lib/{fetch-pipeline.d.ts → net/pipeline.d.ts} +3 -3
- package/dist/lib/net/pipeline.d.ts.map +1 -0
- package/dist/lib/{fetch-pipeline.js → net/pipeline.js} +4 -5
- package/dist/lib/{url.d.ts → net/url.d.ts} +1 -1
- package/dist/lib/net/url.d.ts.map +1 -0
- package/dist/lib/{url.js → net/url.js} +4 -5
- package/dist/lib/utils.d.ts +2 -32
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -146
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +11 -6
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +8 -9
- package/dist/tasks/index.d.ts +2 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +3 -0
- package/dist/tasks/manager.d.ts +123 -1
- package/dist/tasks/manager.d.ts.map +1 -1
- package/dist/tasks/manager.js +756 -10
- package/dist/tools/{fetch-url.d.ts → index.d.ts} +4 -5
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/{fetch-url.js → index.js} +7 -8
- package/dist/transform/index.d.ts +279 -0
- package/dist/transform/index.d.ts.map +1 -0
- package/dist/transform/index.js +5235 -0
- package/package.json +2 -2
- package/dist/cli.d.ts +0 -19
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -65
- package/dist/http/health.d.ts +0 -8
- package/dist/http/health.d.ts.map +0 -1
- package/dist/http/health.js +0 -152
- package/dist/http/helpers.d.ts +0 -68
- package/dist/http/helpers.d.ts.map +0 -1
- package/dist/http/helpers.js +0 -402
- package/dist/lib/error-codes.d.ts +0 -13
- package/dist/lib/error-codes.d.ts.map +0 -1
- package/dist/lib/error-codes.js +0 -12
- package/dist/lib/error-messages.d.ts.map +0 -1
- package/dist/lib/fetch-pipeline.d.ts.map +0 -1
- package/dist/lib/http.d.ts.map +0 -1
- package/dist/lib/logger-names.d.ts +0 -16
- package/dist/lib/logger-names.d.ts.map +0 -1
- package/dist/lib/logger-names.js +0 -15
- package/dist/lib/session.d.ts +0 -44
- package/dist/lib/session.d.ts.map +0 -1
- package/dist/lib/session.js +0 -137
- package/dist/lib/tool-errors.d.ts.map +0 -1
- package/dist/lib/tool-errors.js +0 -253
- package/dist/lib/url.d.ts.map +0 -1
- package/dist/lib/zod.d.ts +0 -3
- package/dist/lib/zod.d.ts.map +0 -1
- package/dist/lib/zod.js +0 -27
- package/dist/tasks/call-contract.d.ts +0 -25
- package/dist/tasks/call-contract.d.ts.map +0 -1
- package/dist/tasks/call-contract.js +0 -59
- package/dist/tasks/execution.d.ts +0 -16
- package/dist/tasks/execution.d.ts.map +0 -1
- package/dist/tasks/execution.js +0 -241
- package/dist/tasks/handlers.d.ts +0 -11
- package/dist/tasks/handlers.d.ts.map +0 -1
- package/dist/tasks/handlers.js +0 -157
- package/dist/tasks/owner.d.ts +0 -43
- package/dist/tasks/owner.d.ts.map +0 -1
- package/dist/tasks/owner.js +0 -144
- package/dist/tasks/registry.d.ts +0 -20
- package/dist/tasks/registry.d.ts.map +0 -1
- package/dist/tasks/registry.js +0 -40
- package/dist/tasks/waiters.d.ts +0 -27
- package/dist/tasks/waiters.d.ts.map +0 -1
- package/dist/tasks/waiters.js +0 -114
- package/dist/tools/fetch-url.d.ts.map +0 -1
- package/dist/transform/dom-prep.d.ts +0 -16
- package/dist/transform/dom-prep.d.ts.map +0 -1
- package/dist/transform/dom-prep.js +0 -1287
- package/dist/transform/html-translators.d.ts +0 -5
- package/dist/transform/html-translators.d.ts.map +0 -1
- package/dist/transform/html-translators.js +0 -697
- package/dist/transform/markdown-cleanup.d.ts +0 -10
- package/dist/transform/markdown-cleanup.d.ts.map +0 -1
- package/dist/transform/markdown-cleanup.js +0 -542
- package/dist/transform/metadata.d.ts +0 -18
- package/dist/transform/metadata.d.ts.map +0 -1
- package/dist/transform/metadata.js +0 -462
- package/dist/transform/next-flight.d.ts +0 -2
- package/dist/transform/next-flight.d.ts.map +0 -1
- package/dist/transform/next-flight.js +0 -374
- package/dist/transform/shared.d.ts +0 -8
- package/dist/transform/shared.d.ts.map +0 -1
- package/dist/transform/shared.js +0 -137
- package/dist/transform/transform.d.ts +0 -38
- package/dist/transform/transform.d.ts.map +0 -1
- package/dist/transform/transform.js +0 -1042
- package/dist/transform/types.d.ts +0 -124
- package/dist/transform/types.d.ts.map +0 -1
- package/dist/transform/types.js +0 -5
- package/dist/transform/worker-pool.d.ts +0 -76
- package/dist/transform/worker-pool.d.ts.map +0 -1
- package/dist/transform/worker-pool.js +0 -725
- /package/dist/lib/{http.d.ts → net/http.d.ts} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface CleanupOptions {
|
|
2
|
-
preserveEmptyHeadings?: boolean;
|
|
3
|
-
signal?: AbortSignal;
|
|
4
|
-
url?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function processFencedContent(content: string, processTextSegment: (text: string) => string): string;
|
|
7
|
-
export declare function finalizeMarkdownSections(content: string, options?: Pick<CleanupOptions, 'signal' | 'url'>): string;
|
|
8
|
-
export declare function cleanupMarkdownArtifacts(content: string, options?: CleanupOptions): string;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=markdown-cleanup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-cleanup.d.ts","sourceRoot":"","sources":["../../src/transform/markdown-cleanup.ts"],"names":[],"mappings":"AA4HA,UAAU,cAAc;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAyeD,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAC3C,MAAM,CAyBR;AAaD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,KAAK,CAAC,GAC/C,MAAM,CAUR;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,cAAc,GACvB,MAAM,CAkBR"}
|
|
@@ -1,542 +0,0 @@
|
|
|
1
|
-
import { config } from '../lib/core.js';
|
|
2
|
-
import { throwIfAborted } from '../lib/utils.js';
|
|
3
|
-
// ── ASCII code constants ────────────────────────────────────────────
|
|
4
|
-
const ASCII_MARKERS = {
|
|
5
|
-
HASH: 35,
|
|
6
|
-
ASTERISK: 42,
|
|
7
|
-
PLUS: 43,
|
|
8
|
-
DASH: 45,
|
|
9
|
-
PERIOD: 46,
|
|
10
|
-
DIGIT_0: 48,
|
|
11
|
-
DIGIT_9: 57,
|
|
12
|
-
EXCLAMATION: 33,
|
|
13
|
-
QUESTION: 63,
|
|
14
|
-
BRACKET_OPEN: 91,
|
|
15
|
-
};
|
|
16
|
-
// ── Title heuristic thresholds ──────────────────────────────────────
|
|
17
|
-
const TITLE_MIN_WORDS = 2;
|
|
18
|
-
const TITLE_MAX_WORDS = 10;
|
|
19
|
-
const TITLE_MIN_CAPITALIZED = 2;
|
|
20
|
-
const TITLE_EXCLUSION_WORDS = new Set([
|
|
21
|
-
'and',
|
|
22
|
-
'or',
|
|
23
|
-
'the',
|
|
24
|
-
'of',
|
|
25
|
-
'in',
|
|
26
|
-
'for',
|
|
27
|
-
'to',
|
|
28
|
-
'a',
|
|
29
|
-
]);
|
|
30
|
-
// ── Processing limits ───────────────────────────────────────────────
|
|
31
|
-
const HAS_FOLLOWING_LOOKAHEAD = 10;
|
|
32
|
-
const PROPERTY_FIX_MAX_PASSES = 5;
|
|
33
|
-
const MAX_LINE_LENGTH = 80;
|
|
34
|
-
// ── TOC thresholds ──────────────────────────────────────────────────
|
|
35
|
-
const TOC_SCAN_LIMIT = 20;
|
|
36
|
-
const TOC_MAX_NON_EMPTY = 12;
|
|
37
|
-
const TOC_LINK_RATIO_THRESHOLD = 0.8;
|
|
38
|
-
// ── List indentation normalization ───────────────────────────────────
|
|
39
|
-
const SOURCE_INDENT_STEP = 2;
|
|
40
|
-
const TARGET_INDENT_STEP = 4;
|
|
41
|
-
// ── Docs-chrome scan depth ───────────────────────────────────────────
|
|
42
|
-
const CHROME_SCAN_LINE_LIMIT = 12;
|
|
43
|
-
// ── Fence pattern ───────────────────────────────────────────────────
|
|
44
|
-
const FENCE_PATTERN = /^\s*(`{3,}|~{3,})/;
|
|
45
|
-
// ── Regex collection ────────────────────────────────────────────────
|
|
46
|
-
const REGEX = {
|
|
47
|
-
HEADING_MARKER: /^#{1,6}\s/m,
|
|
48
|
-
HEADING_STRICT: /^#{1,6}\s+/m,
|
|
49
|
-
EMPTY_HEADING_LINE: /^#{1,6}[ \t\u00A0]*$/,
|
|
50
|
-
ANCHOR_ONLY_HEADING: /^#{1,6}\s+\[[^\]]+\]\(#[^)]+\)\s*$/,
|
|
51
|
-
HEADING_TRAILING_PERMALINK: /^(#{1,6}\s+.+?)\s*\[(?:#|¶|§|¤|🔗)\]\(#[^)]+\)\s*$/gmu,
|
|
52
|
-
FENCE_START: FENCE_PATTERN,
|
|
53
|
-
LIST_MARKER: /^(?:[-*+])\s/m,
|
|
54
|
-
TOC_LINK: /^- \[[^\]]+\]\(#[^)]+\)\s*$/,
|
|
55
|
-
TOC_HEADING: /^(?:#{1,6}\s+)?(?:table of contents|contents|on this page)\s*$/i,
|
|
56
|
-
COMBINED_LINE_REMOVALS: /^(?:\[Skip to (?:main )?(?:content|navigation)\]\(#[^)]*\)|\[Skip link\]\(#[^)]*\)|Was this page helpful\??|\[Back to top\]\(#[^)]*\)|\[\s*\]\(https?:\/\/[^)]*\))\s*$/gim,
|
|
57
|
-
ZERO_WIDTH_ANCHOR: /\[(?:\s|\u200B)*\]\(#[^)]*\)[ \t]*/g,
|
|
58
|
-
// ReDoS-safe: {0,30} bounds identifier backtracking, negated char class
|
|
59
|
-
// [^\u0022\u201C\u201D]* has no overlap with delimiters, and \s+ is anchored
|
|
60
|
-
// between ':' and a quote. Multi-pass capped at PROPERTY_FIX_MAX_PASSES.
|
|
61
|
-
CONCATENATED_PROPS: /([a-z_][a-z0-9_]{0,30}\??:\s+)([\u0022\u201C][^\u0022\u201C\u201D]*[\u0022\u201D])([a-z_][a-z0-9_]{0,30}\??:)/g,
|
|
62
|
-
DOUBLE_NEWLINE_REDUCER: /\n{3,}/g,
|
|
63
|
-
HEADING_SPACING: /(^#{1,6}\s[^\n]*)\n([^\n])/gm,
|
|
64
|
-
HEADING_CODE_BLOCK: /(^#{1,6}\s+\w+)```/gm,
|
|
65
|
-
SPACING_LINK_FIX: /\]\(([^)]+)\)\[/g,
|
|
66
|
-
SPACING_ADJ_COMBINED: /(?:\]\([^)]+\)|`[^`]+`)(?=[A-Za-z0-9])/g,
|
|
67
|
-
SPACING_CODE_DASH: /(`[^`]+`)\s*\\-\s*/g,
|
|
68
|
-
SPACING_ESCAPED_DASH: /(?<=[\w)\]`])\s*\\-\s*(?=[A-Za-z0-9([])/g,
|
|
69
|
-
SPACING_ESCAPES: /\\([[\].])/g,
|
|
70
|
-
SPACING_LIST_NUM_COMBINED: /^((?![-*+] |\d+\. |[ \t]).+)\n((?:[-*+]|\d+\.) )/gm,
|
|
71
|
-
PUNCT_ONLY_LIST_ARTIFACT: /^(?:[-*+]|\d+\.)\s*(?:\\[-*+|/]|[-*+|/])(?:\s+(?:\\[-*+|/]|[-*+|/]))*\s*$/gm,
|
|
72
|
-
NESTED_LIST_INDENT: /^( +)((?:[-*+])|\d+\.)\s/gm,
|
|
73
|
-
TYPEDOC_COMMENT: /(`+)(?:(?!\1)[\s\S])*?\1|\s?\/\\?\*[\s\S]*?\\?\*\//g,
|
|
74
|
-
};
|
|
75
|
-
// ── Heading keywords (config-driven) ────────────────────────────────
|
|
76
|
-
const HEADING_KEYWORDS = new Set(config.markdownCleanup.headingKeywords.map((value) => value.toLocaleLowerCase(config.i18n.locale)));
|
|
77
|
-
// ── Prefix patterns ─────────────────────────────────────────────────
|
|
78
|
-
const SPECIAL_PREFIXES = /^(?:example|note|tip|warning|important|caution):\s+\S/i;
|
|
79
|
-
const REPL_PROMPT_LINE = /^(?:>>>|\.\.\.|In \[\d+\]:|Out\[\d+\]:|\.\.\.\\?>)\s*/;
|
|
80
|
-
const LEADING_DOCS_CHROME_PATTERNS = [
|
|
81
|
-
/^Edit this page$/i,
|
|
82
|
-
/^Toggle table of contents sidebar$/i,
|
|
83
|
-
/^Toggle site navigation sidebar$/i,
|
|
84
|
-
/^Toggle Light \/ Dark \/ Auto color theme$/i,
|
|
85
|
-
/^Back to top$/i,
|
|
86
|
-
];
|
|
87
|
-
// ── TypeDoc prefixes ────────────────────────────────────────────────
|
|
88
|
-
const TYPEDOC_PREFIXES = [
|
|
89
|
-
'Defined in:',
|
|
90
|
-
'Returns:',
|
|
91
|
-
'Since:',
|
|
92
|
-
'See also:',
|
|
93
|
-
];
|
|
94
|
-
function createAbortChecker(options) {
|
|
95
|
-
return (stage) => {
|
|
96
|
-
throwIfAborted(options?.signal, options?.url ?? '', stage);
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function isBlank(line) {
|
|
100
|
-
return line === undefined || line.trim().length === 0;
|
|
101
|
-
}
|
|
102
|
-
function hasFollowingContent(lines, startIndex) {
|
|
103
|
-
// Optimization: Bound lookahead to avoid checking too many lines in huge files
|
|
104
|
-
for (let i = startIndex + 1; i < Math.min(lines.length, startIndex + HAS_FOLLOWING_LOOKAHEAD); i++) {
|
|
105
|
-
if (!isBlank(lines[i]))
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
function findNextNonBlank(lines, startIndex, maxLookahead) {
|
|
111
|
-
const limit = maxLookahead !== undefined
|
|
112
|
-
? Math.min(lines.length, startIndex + maxLookahead)
|
|
113
|
-
: lines.length;
|
|
114
|
-
for (let i = startIndex; i < limit; i++) {
|
|
115
|
-
if (!isBlank(lines[i]))
|
|
116
|
-
return i;
|
|
117
|
-
}
|
|
118
|
-
return -1;
|
|
119
|
-
}
|
|
120
|
-
function stripAnchorOnlyHeading(line) {
|
|
121
|
-
return line.replace(/^(#{1,6})\s+\[([^\]]+)\]\(#[^)]+\)\s*$/, '$1 $2');
|
|
122
|
-
}
|
|
123
|
-
function isTitleCaseOrKeyword(trimmed) {
|
|
124
|
-
// Quick check for length to avoid regex on long strings
|
|
125
|
-
if (trimmed.length > MAX_LINE_LENGTH)
|
|
126
|
-
return false;
|
|
127
|
-
// Single word optimization
|
|
128
|
-
if (!trimmed.includes(' ')) {
|
|
129
|
-
if (!/^[A-Z]/.test(trimmed))
|
|
130
|
-
return false;
|
|
131
|
-
return HEADING_KEYWORDS.has(trimmed.toLocaleLowerCase(config.i18n.locale));
|
|
132
|
-
}
|
|
133
|
-
// Split limited number of words
|
|
134
|
-
const words = trimmed.split(/\s+/);
|
|
135
|
-
const len = words.length;
|
|
136
|
-
if (len < TITLE_MIN_WORDS || len > TITLE_MAX_WORDS)
|
|
137
|
-
return false;
|
|
138
|
-
let capitalizedCount = 0;
|
|
139
|
-
for (let i = 0; i < len; i++) {
|
|
140
|
-
const w = words[i];
|
|
141
|
-
if (!w)
|
|
142
|
-
continue;
|
|
143
|
-
const isCap = /^[A-Z][a-z]*$/.test(w);
|
|
144
|
-
if (isCap)
|
|
145
|
-
capitalizedCount++;
|
|
146
|
-
else if (!TITLE_EXCLUSION_WORDS.has(w.toLowerCase()))
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
return capitalizedCount >= TITLE_MIN_CAPITALIZED;
|
|
150
|
-
}
|
|
151
|
-
function isMarkdownStructuralLine(trimmed) {
|
|
152
|
-
const firstChar = trimmed.charCodeAt(0);
|
|
153
|
-
if (firstChar !== ASCII_MARKERS.HASH &&
|
|
154
|
-
firstChar !== ASCII_MARKERS.DASH &&
|
|
155
|
-
firstChar !== ASCII_MARKERS.ASTERISK &&
|
|
156
|
-
firstChar !== ASCII_MARKERS.PLUS &&
|
|
157
|
-
firstChar !== ASCII_MARKERS.BRACKET_OPEN &&
|
|
158
|
-
(firstChar < ASCII_MARKERS.DIGIT_0 || firstChar > ASCII_MARKERS.DIGIT_9)) {
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
return (REGEX.HEADING_MARKER.test(trimmed) ||
|
|
162
|
-
REGEX.LIST_MARKER.test(trimmed) ||
|
|
163
|
-
/^\d+\.\s/.test(trimmed) ||
|
|
164
|
-
/^\[.*\]\(.*\)$/.test(trimmed));
|
|
165
|
-
}
|
|
166
|
-
function isTerminalPunctuation(charCode) {
|
|
167
|
-
return (charCode === ASCII_MARKERS.PERIOD ||
|
|
168
|
-
charCode === ASCII_MARKERS.EXCLAMATION ||
|
|
169
|
-
charCode === ASCII_MARKERS.QUESTION);
|
|
170
|
-
}
|
|
171
|
-
function getHeadingPrefix(trimmed) {
|
|
172
|
-
if (trimmed.length > MAX_LINE_LENGTH)
|
|
173
|
-
return null;
|
|
174
|
-
if (REPL_PROMPT_LINE.test(trimmed))
|
|
175
|
-
return null;
|
|
176
|
-
if (isMarkdownStructuralLine(trimmed))
|
|
177
|
-
return null;
|
|
178
|
-
if (SPECIAL_PREFIXES.test(trimmed)) {
|
|
179
|
-
return /^example:\s/i.test(trimmed) ? '### ' : '## ';
|
|
180
|
-
}
|
|
181
|
-
if (isTerminalPunctuation(trimmed.charCodeAt(trimmed.length - 1)))
|
|
182
|
-
return null;
|
|
183
|
-
return isTitleCaseOrKeyword(trimmed) ? '## ' : null;
|
|
184
|
-
}
|
|
185
|
-
function getTocBlockStats(lines, headingIndex) {
|
|
186
|
-
let total = 0;
|
|
187
|
-
let linkCount = 0;
|
|
188
|
-
let nonLinkCount = 0;
|
|
189
|
-
const lookaheadMax = Math.min(lines.length, headingIndex + TOC_SCAN_LIMIT);
|
|
190
|
-
for (let i = headingIndex + 1; i < lookaheadMax; i++) {
|
|
191
|
-
const line = lines[i];
|
|
192
|
-
if (!line)
|
|
193
|
-
continue;
|
|
194
|
-
const trimmed = line.trim();
|
|
195
|
-
if (!trimmed)
|
|
196
|
-
continue;
|
|
197
|
-
if (REGEX.HEADING_MARKER.test(trimmed))
|
|
198
|
-
break;
|
|
199
|
-
total += 1;
|
|
200
|
-
if (REGEX.TOC_LINK.test(trimmed))
|
|
201
|
-
linkCount += 1;
|
|
202
|
-
else
|
|
203
|
-
nonLinkCount += 1;
|
|
204
|
-
if (total >= TOC_MAX_NON_EMPTY)
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
return { total, linkCount, nonLinkCount };
|
|
208
|
-
}
|
|
209
|
-
function skipTocLines(lines, startIndex) {
|
|
210
|
-
for (let i = startIndex; i < lines.length; i++) {
|
|
211
|
-
const line = lines[i];
|
|
212
|
-
if (line === undefined)
|
|
213
|
-
continue;
|
|
214
|
-
const trimmed = line.trim();
|
|
215
|
-
if (!trimmed)
|
|
216
|
-
continue;
|
|
217
|
-
if (!REGEX.TOC_LINK.test(trimmed))
|
|
218
|
-
return i;
|
|
219
|
-
}
|
|
220
|
-
return lines.length;
|
|
221
|
-
}
|
|
222
|
-
function isTypeDocArtifactLine(line) {
|
|
223
|
-
const trimmed = line.trim();
|
|
224
|
-
for (const prefix of TYPEDOC_PREFIXES) {
|
|
225
|
-
if (!trimmed.startsWith(prefix))
|
|
226
|
-
continue;
|
|
227
|
-
const rest = trimmed.slice(prefix.length).trimStart();
|
|
228
|
-
if (!rest.startsWith('**`'))
|
|
229
|
-
return false;
|
|
230
|
-
return rest.includes('`**');
|
|
231
|
-
}
|
|
232
|
-
return false;
|
|
233
|
-
}
|
|
234
|
-
function tryPromoteOrphan(ctx) {
|
|
235
|
-
const prevLine = ctx.lines[ctx.index - 1];
|
|
236
|
-
const isOrphan = ctx.index === 0 || !prevLine || prevLine.trim().length === 0;
|
|
237
|
-
if (!isOrphan)
|
|
238
|
-
return null;
|
|
239
|
-
const prefix = getHeadingPrefix(ctx.trimmed);
|
|
240
|
-
if (!prefix)
|
|
241
|
-
return null;
|
|
242
|
-
const isSpecialPrefix = SPECIAL_PREFIXES.test(ctx.trimmed);
|
|
243
|
-
if (!isSpecialPrefix && !hasFollowingContent(ctx.lines, ctx.index))
|
|
244
|
-
return null;
|
|
245
|
-
if (!isSpecialPrefix) {
|
|
246
|
-
const nextIdx = findNextNonBlank(ctx.lines, ctx.index + 1, HAS_FOLLOWING_LOOKAHEAD);
|
|
247
|
-
const nextLine = nextIdx >= 0 ? ctx.lines[nextIdx]?.trim() : undefined;
|
|
248
|
-
if (nextLine && REGEX.HEADING_MARKER.test(nextLine))
|
|
249
|
-
return null;
|
|
250
|
-
}
|
|
251
|
-
return `${prefix}${ctx.trimmed}`;
|
|
252
|
-
}
|
|
253
|
-
function shouldSkipAsToc(ctx, removeToc, options) {
|
|
254
|
-
if (!removeToc || !REGEX.TOC_HEADING.test(ctx.trimmed))
|
|
255
|
-
return null;
|
|
256
|
-
const { total, linkCount, nonLinkCount } = getTocBlockStats(ctx.lines, ctx.index);
|
|
257
|
-
if (total === 0 || nonLinkCount > 0)
|
|
258
|
-
return null;
|
|
259
|
-
const ratio = linkCount / total;
|
|
260
|
-
if (ratio <= TOC_LINK_RATIO_THRESHOLD)
|
|
261
|
-
return null;
|
|
262
|
-
throwIfAborted(options?.signal, options?.url ?? '', 'markdown:cleanup:toc');
|
|
263
|
-
return skipTocLines(ctx.lines, ctx.index + 1);
|
|
264
|
-
}
|
|
265
|
-
function normalizePreprocessLine(ctx, options) {
|
|
266
|
-
if (REGEX.EMPTY_HEADING_LINE.test(ctx.trimmed))
|
|
267
|
-
return null;
|
|
268
|
-
if (!REGEX.ANCHOR_ONLY_HEADING.test(ctx.trimmed))
|
|
269
|
-
return ctx.line;
|
|
270
|
-
if (!hasFollowingContent(ctx.lines, ctx.index)) {
|
|
271
|
-
return options?.preserveEmptyHeadings
|
|
272
|
-
? stripAnchorOnlyHeading(ctx.trimmed)
|
|
273
|
-
: null;
|
|
274
|
-
}
|
|
275
|
-
return stripAnchorOnlyHeading(ctx.trimmed);
|
|
276
|
-
}
|
|
277
|
-
function maybeSkipTocBlock(ctx, options) {
|
|
278
|
-
return shouldSkipAsToc(ctx, config.markdownCleanup.removeTocBlocks, options);
|
|
279
|
-
}
|
|
280
|
-
function maybePromoteOrphanHeading(ctx, checkAbort) {
|
|
281
|
-
if (!config.markdownCleanup.promoteOrphanHeadings ||
|
|
282
|
-
ctx.trimmed.length === 0) {
|
|
283
|
-
return null;
|
|
284
|
-
}
|
|
285
|
-
checkAbort('markdown:cleanup:promote');
|
|
286
|
-
return tryPromoteOrphan(ctx);
|
|
287
|
-
}
|
|
288
|
-
function preprocessLines(lines, options) {
|
|
289
|
-
const checkAbort = createAbortChecker(options);
|
|
290
|
-
const result = [];
|
|
291
|
-
let skipUntil = -1;
|
|
292
|
-
for (let i = 0; i < lines.length; i++) {
|
|
293
|
-
if (i < skipUntil)
|
|
294
|
-
continue;
|
|
295
|
-
const currentLine = lines[i] ?? '';
|
|
296
|
-
const trimmed = currentLine.trim();
|
|
297
|
-
const ctx = { lines, index: i, trimmed, line: currentLine };
|
|
298
|
-
const normalizedLine = normalizePreprocessLine(ctx, options);
|
|
299
|
-
if (normalizedLine === null)
|
|
300
|
-
continue;
|
|
301
|
-
const tocSkip = maybeSkipTocBlock(ctx, options);
|
|
302
|
-
if (tocSkip !== null) {
|
|
303
|
-
skipUntil = tocSkip;
|
|
304
|
-
continue;
|
|
305
|
-
}
|
|
306
|
-
const promotedLine = maybePromoteOrphanHeading(ctx, checkAbort);
|
|
307
|
-
result.push(promotedLine ?? normalizedLine);
|
|
308
|
-
}
|
|
309
|
-
return result.join('\n');
|
|
310
|
-
}
|
|
311
|
-
function processTextBuffer(lines, options) {
|
|
312
|
-
if (lines.length === 0)
|
|
313
|
-
return '';
|
|
314
|
-
const text = preprocessLines(lines, options);
|
|
315
|
-
return applyGlobalRegexes(text, options);
|
|
316
|
-
}
|
|
317
|
-
function removeTypeDocArtifacts(text) {
|
|
318
|
-
const filtered = text
|
|
319
|
-
.split('\n')
|
|
320
|
-
.filter((line) => !isTypeDocArtifactLine(line))
|
|
321
|
-
.join('\n');
|
|
322
|
-
return filtered.replace(REGEX.TYPEDOC_COMMENT, (match) => match.startsWith('`') ? match : '');
|
|
323
|
-
}
|
|
324
|
-
function removeSkipLinks(text) {
|
|
325
|
-
return text
|
|
326
|
-
.replace(REGEX.ZERO_WIDTH_ANCHOR, '')
|
|
327
|
-
.replace(REGEX.COMBINED_LINE_REMOVALS, '');
|
|
328
|
-
}
|
|
329
|
-
function normalizeInlineCodeTokens(text) {
|
|
330
|
-
return text.replace(/`([^`\n]+)`/g, (match, inner) => {
|
|
331
|
-
const trimmed = inner.trim();
|
|
332
|
-
if (!/[A-Za-z0-9]/.test(trimmed))
|
|
333
|
-
return match;
|
|
334
|
-
const parts = /^(\s*)(.*?)(\s*)$/.exec(inner);
|
|
335
|
-
if (!parts)
|
|
336
|
-
return match;
|
|
337
|
-
const normalized = collapseQualifiedIdentifierSpacing(parts[2] ?? '');
|
|
338
|
-
if (trimmed === inner && normalized === inner)
|
|
339
|
-
return match;
|
|
340
|
-
return `${parts[1] ?? ''}\`${normalized}\`${parts[3] ?? ''}`;
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
function applyUntilStable(text, pattern, replacement, maxPasses = PROPERTY_FIX_MAX_PASSES) {
|
|
344
|
-
let result = text;
|
|
345
|
-
for (let i = 0; i < maxPasses; i++) {
|
|
346
|
-
const next = result.replace(pattern, replacement);
|
|
347
|
-
if (next === result)
|
|
348
|
-
break;
|
|
349
|
-
result = next;
|
|
350
|
-
}
|
|
351
|
-
return result;
|
|
352
|
-
}
|
|
353
|
-
function collapseQualifiedIdentifierSpacing(text) {
|
|
354
|
-
return applyUntilStable(text, /\b([A-Za-z_$][\w$]*)\.\s+(?=[A-Za-z_$<])/g, '$1.');
|
|
355
|
-
}
|
|
356
|
-
function normalizeMarkdownLinkText(text) {
|
|
357
|
-
const normalized = collapseQualifiedIdentifierSpacing(text.replace(/\\`/g, '`').replace(/\\</g, '<').replace(/\\>/g, '>'));
|
|
358
|
-
return normalized.replace(/</g, '\\<').replace(/>/g, '\\>');
|
|
359
|
-
}
|
|
360
|
-
function normalizeMarkdownLinkLabels(text) {
|
|
361
|
-
return text.replace(/\[([^\]]+)\]\(([^)]+)\)/g, (_match, linkText, url) => `[${normalizeMarkdownLinkText(linkText)}](${url})`);
|
|
362
|
-
}
|
|
363
|
-
const INLINE_CODE_PAD_BEFORE = /(\S)[ \t]{2,}(?=`[^`\n]+`)/g;
|
|
364
|
-
const INLINE_CODE_PAD_AFTER = /(`[^`\n]+`)[ \t]{2,}(?=\S)/g;
|
|
365
|
-
function collapseInlineCodePadding(text) {
|
|
366
|
-
return text
|
|
367
|
-
.replace(INLINE_CODE_PAD_BEFORE, '$1 ')
|
|
368
|
-
.replace(INLINE_CODE_PAD_AFTER, '$1 ');
|
|
369
|
-
}
|
|
370
|
-
function escapeAngleBracketsInMarkdownTables(text) {
|
|
371
|
-
return text.replace(/^(?!\|\s*[-: ]+\|)(\|.*\|)\s*$/gm, (line) => line
|
|
372
|
-
.replace(/<\/([A-Za-z][A-Za-z0-9-]*)>/g, '\\</$1\\>')
|
|
373
|
-
.replace(/<([A-Za-z][A-Za-z0-9-]*)>/g, '\\<$1\\>'));
|
|
374
|
-
}
|
|
375
|
-
function stripTrailingHeadingPermalinks(text) {
|
|
376
|
-
return text
|
|
377
|
-
.replace(REGEX.HEADING_TRAILING_PERMALINK, '$1')
|
|
378
|
-
.replace(/^(#{1,6})\s{2,}/gm, '$1 ')
|
|
379
|
-
.replace(/^(#{1,6}\s+.*?)[ \t]+$/gm, '$1');
|
|
380
|
-
}
|
|
381
|
-
function getHeadingInfo(line) {
|
|
382
|
-
const match = /^(#{1,6})\s+/.exec(line.trim());
|
|
383
|
-
if (!match)
|
|
384
|
-
return null;
|
|
385
|
-
return { level: match[1]?.length ?? 0 };
|
|
386
|
-
}
|
|
387
|
-
function removeEmptyHeadingSections(text) {
|
|
388
|
-
const lines = text.split('\n');
|
|
389
|
-
const kept = [];
|
|
390
|
-
for (let i = 0; i < lines.length; i++) {
|
|
391
|
-
const line = lines[i] ?? '';
|
|
392
|
-
const heading = getHeadingInfo(line);
|
|
393
|
-
if (!heading) {
|
|
394
|
-
kept.push(line);
|
|
395
|
-
continue;
|
|
396
|
-
}
|
|
397
|
-
const nextIndex = findNextNonBlank(lines, i + 1);
|
|
398
|
-
const nextLine = nextIndex >= 0 ? lines[nextIndex] : undefined;
|
|
399
|
-
if (nextLine === undefined) {
|
|
400
|
-
kept.push(line);
|
|
401
|
-
continue;
|
|
402
|
-
}
|
|
403
|
-
const nextHeading = getHeadingInfo(nextLine);
|
|
404
|
-
if (nextHeading && nextHeading.level <= heading.level) {
|
|
405
|
-
continue;
|
|
406
|
-
}
|
|
407
|
-
kept.push(line);
|
|
408
|
-
}
|
|
409
|
-
return kept.join('\n').replace(REGEX.DOUBLE_NEWLINE_REDUCER, '\n\n');
|
|
410
|
-
}
|
|
411
|
-
function normalizeMarkdownSpacing(text) {
|
|
412
|
-
let result = text
|
|
413
|
-
.replace(REGEX.SPACING_LINK_FIX, ']($1) [')
|
|
414
|
-
.replace(REGEX.SPACING_ADJ_COMBINED, '$& ')
|
|
415
|
-
.replace(REGEX.SPACING_CODE_DASH, '$1 - ')
|
|
416
|
-
.replace(REGEX.SPACING_ESCAPED_DASH, ' - ')
|
|
417
|
-
.replace(REGEX.SPACING_ESCAPES, '$1')
|
|
418
|
-
.replace(REGEX.SPACING_LIST_NUM_COMBINED, '$1\n\n$2')
|
|
419
|
-
.replace(REGEX.PUNCT_ONLY_LIST_ARTIFACT, '')
|
|
420
|
-
.replace(REGEX.DOUBLE_NEWLINE_REDUCER, '\n\n');
|
|
421
|
-
// Fix missing spaces after sentence-ending punctuation followed by uppercase
|
|
422
|
-
result = result.replace(/([.!?:;])([A-Z])/g, '$1 $2');
|
|
423
|
-
// Trim whitespace around token-like inline code spans.
|
|
424
|
-
result = normalizeInlineCodeTokens(result);
|
|
425
|
-
result = collapseInlineCodePadding(result);
|
|
426
|
-
result = normalizeMarkdownLinkLabels(result);
|
|
427
|
-
result = escapeAngleBracketsInMarkdownTables(result);
|
|
428
|
-
return normalizeNestedListIndentation(result);
|
|
429
|
-
}
|
|
430
|
-
function stripLeadingDocsChrome(text) {
|
|
431
|
-
const lines = text.split('\n');
|
|
432
|
-
const cleaned = lines.map((line, index) => {
|
|
433
|
-
if (index >= CHROME_SCAN_LINE_LIMIT)
|
|
434
|
-
return line;
|
|
435
|
-
const trimmed = line.trim();
|
|
436
|
-
return LEADING_DOCS_CHROME_PATTERNS.some((pattern) => pattern.test(trimmed))
|
|
437
|
-
? ''
|
|
438
|
-
: line;
|
|
439
|
-
});
|
|
440
|
-
return cleaned.join('\n').replace(REGEX.DOUBLE_NEWLINE_REDUCER, '\n\n');
|
|
441
|
-
}
|
|
442
|
-
function fixConcatenatedProperties(text) {
|
|
443
|
-
return applyUntilStable(text, REGEX.CONCATENATED_PROPS, '$1$2\n\n$3');
|
|
444
|
-
}
|
|
445
|
-
function applyGlobalRegexes(text, options) {
|
|
446
|
-
const checkAbort = createAbortChecker(options);
|
|
447
|
-
const passes = [
|
|
448
|
-
{
|
|
449
|
-
stage: 'markdown:cleanup:nbsp',
|
|
450
|
-
transform: (t) => t.replace(/\u00A0/g, ' '),
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
stage: 'markdown:cleanup:headings',
|
|
454
|
-
transform: (t) => t
|
|
455
|
-
.replace(REGEX.HEADING_SPACING, '$1\n\n$2')
|
|
456
|
-
.replace(REGEX.HEADING_CODE_BLOCK, '$1\n\n```'),
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
stage: 'markdown:cleanup:typedoc',
|
|
460
|
-
enabled: () => config.markdownCleanup.removeTypeDocComments,
|
|
461
|
-
transform: removeTypeDocArtifacts,
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
stage: 'markdown:cleanup:skip-links',
|
|
465
|
-
enabled: () => config.markdownCleanup.removeSkipLinks,
|
|
466
|
-
transform: removeSkipLinks,
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
stage: 'markdown:cleanup:spacing',
|
|
470
|
-
transform: normalizeMarkdownSpacing,
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
stage: 'markdown:cleanup:properties',
|
|
474
|
-
transform: fixConcatenatedProperties,
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
stage: 'markdown:cleanup:permalinks',
|
|
478
|
-
transform: stripTrailingHeadingPermalinks,
|
|
479
|
-
},
|
|
480
|
-
];
|
|
481
|
-
let result = text;
|
|
482
|
-
for (const pass of passes) {
|
|
483
|
-
if (pass.enabled !== undefined && !pass.enabled())
|
|
484
|
-
continue;
|
|
485
|
-
checkAbort(pass.stage);
|
|
486
|
-
result = pass.transform(result);
|
|
487
|
-
}
|
|
488
|
-
return result;
|
|
489
|
-
}
|
|
490
|
-
function normalizeNestedListIndentation(text) {
|
|
491
|
-
return text.replace(REGEX.NESTED_LIST_INDENT, (match, spaces, marker) => {
|
|
492
|
-
const count = spaces.length;
|
|
493
|
-
if (count < SOURCE_INDENT_STEP || count % SOURCE_INDENT_STEP !== 0)
|
|
494
|
-
return match;
|
|
495
|
-
const normalized = ' '.repeat((count / SOURCE_INDENT_STEP) * TARGET_INDENT_STEP);
|
|
496
|
-
return `${normalized}${marker} `;
|
|
497
|
-
});
|
|
498
|
-
}
|
|
499
|
-
export function processFencedContent(content, processTextSegment) {
|
|
500
|
-
// Normalize line endings to \n
|
|
501
|
-
const normalizedContent = content.replace(/\r\n/g, '\n');
|
|
502
|
-
const FENCE_BLOCK_REGEX = /^[ \t]*(`{3,}|~{3,})[^\n]*(?:\n[\s\S]*?)?(?:^[ \t]*\1[ \t]*$|$(?!\n))/gm;
|
|
503
|
-
const parts = [];
|
|
504
|
-
let lastIndex = 0;
|
|
505
|
-
for (const match of normalizedContent.matchAll(FENCE_BLOCK_REGEX)) {
|
|
506
|
-
const matchStart = match.index;
|
|
507
|
-
if (matchStart > lastIndex) {
|
|
508
|
-
parts.push(processTextSegment(normalizedContent.slice(lastIndex, matchStart)));
|
|
509
|
-
}
|
|
510
|
-
parts.push(match[0]);
|
|
511
|
-
lastIndex = matchStart + match[0].length;
|
|
512
|
-
}
|
|
513
|
-
if (lastIndex < normalizedContent.length) {
|
|
514
|
-
parts.push(processTextSegment(normalizedContent.slice(lastIndex)));
|
|
515
|
-
}
|
|
516
|
-
return parts.join('');
|
|
517
|
-
}
|
|
518
|
-
function stripLeadingBreadcrumbNoise(text) {
|
|
519
|
-
return text.replace(/^([^\n#>|`\-*+\d[\]()]{1,40})\n(\s*\n)?(?=#{1,2}\s)/, '');
|
|
520
|
-
}
|
|
521
|
-
function stripCopyButtonText(text) {
|
|
522
|
-
return text.replace(/\[Copy\]\(#copy\)\s*/gi, '');
|
|
523
|
-
}
|
|
524
|
-
export function finalizeMarkdownSections(content, options) {
|
|
525
|
-
if (!content)
|
|
526
|
-
return '';
|
|
527
|
-
throwIfAborted(options?.signal, options?.url ?? '', 'markdown:cleanup:empty-headings');
|
|
528
|
-
return stripLeadingBreadcrumbNoise(stripLeadingDocsChrome(removeEmptyHeadingSections(content)));
|
|
529
|
-
}
|
|
530
|
-
export function cleanupMarkdownArtifacts(content, options) {
|
|
531
|
-
if (!content)
|
|
532
|
-
return '';
|
|
533
|
-
throwIfAborted(options?.signal, options?.url ?? '', 'markdown:cleanup:begin');
|
|
534
|
-
let result = stripCopyButtonText(processFencedContent(content, (text) => processTextBuffer(text.split('\n'), options)).trim());
|
|
535
|
-
if (!options?.preserveEmptyHeadings) {
|
|
536
|
-
result = finalizeMarkdownSections(result, options);
|
|
537
|
-
}
|
|
538
|
-
else {
|
|
539
|
-
result = stripLeadingBreadcrumbNoise(stripLeadingDocsChrome(result));
|
|
540
|
-
}
|
|
541
|
-
return result;
|
|
542
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ExtractedMetadata, MetadataBlock } from './types.js';
|
|
2
|
-
export declare function normalizeDocumentTitle(title: string, baseUrl?: string): string;
|
|
3
|
-
export declare function extractMetadata(document: Document, baseUrl?: string): ExtractedMetadata;
|
|
4
|
-
export declare function extractMetadataFromHead(html: string, baseUrl?: string): ExtractedMetadata | null;
|
|
5
|
-
export declare function mergeMetadata(early: ExtractedMetadata | null, late: ExtractedMetadata): ExtractedMetadata;
|
|
6
|
-
export declare function extractTitleFromRawMarkdown(content: string): string | undefined;
|
|
7
|
-
export declare function addSourceToMarkdown(content: string, url: string): string;
|
|
8
|
-
export declare function isRawTextContent(content: string): boolean;
|
|
9
|
-
export declare function buildMetadataFooter(metadata?: MetadataBlock, fallbackUrl?: string): string;
|
|
10
|
-
export interface SyntheticTitleContext {
|
|
11
|
-
readonly title: string | undefined;
|
|
12
|
-
}
|
|
13
|
-
export declare function normalizeSyntheticTitleToken(value: string | undefined): string;
|
|
14
|
-
export declare function shouldPreferPrimaryHeadingTitle(primaryHeading: string | undefined, title: string | undefined): boolean;
|
|
15
|
-
export declare function isGithubRepositoryRootUrl(url: string): boolean;
|
|
16
|
-
export declare function maybeStripGithubPrimaryHeading(markdown: string, primaryHeading: string | undefined, url: string): string;
|
|
17
|
-
export declare function maybePrependSyntheticTitle(markdown: string, context: SyntheticTitleContext): string;
|
|
18
|
-
//# sourceMappingURL=metadata.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/transform/metadata.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAgCnE,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAkBR;AAuJD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,MAAM,GACf,iBAAiB,CAYnB;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,MAAM,GACf,iBAAiB,GAAG,IAAI,CAY1B;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,iBAAiB,GAAG,IAAI,EAC/B,IAAI,EAAE,iBAAiB,GACtB,iBAAiB,CAmBnB;AA0GD,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAOpB;AACD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAuCxE;AAmBD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAczD;AAaD,wBAAgB,mBAAmB,CACjC,QAAQ,CAAC,EAAE,aAAa,EACxB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAmBR;AAMD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAMD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,MAAM,CAER;AAED,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,OAAO,CAWT;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAU9D;AAkCD,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,GAAG,EAAE,MAAM,GACV,MAAM,CAMR;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,qBAAqB,GAC7B,MAAM,CAMR"}
|