dsh-library 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +201 -0
  3. package/README.es.md +158 -0
  4. package/README.hi.md +158 -0
  5. package/README.md +158 -0
  6. package/README.pt.md +158 -0
  7. package/README.zh.md +158 -0
  8. package/SECURITY.md +38 -0
  9. package/THIRD_PARTY_NOTICES.md +27 -0
  10. package/cordis.patch.yml +79 -0
  11. package/lib/index.js +6074 -0
  12. package/lib/types/config.d.ts +208 -0
  13. package/lib/types/config.d.ts.map +1 -0
  14. package/lib/types/embedding.d.ts +56 -0
  15. package/lib/types/embedding.d.ts.map +1 -0
  16. package/lib/types/ids.d.ts +27 -0
  17. package/lib/types/ids.d.ts.map +1 -0
  18. package/lib/types/index.d.ts +248 -0
  19. package/lib/types/index.d.ts.map +1 -0
  20. package/lib/types/quality/chunk-visual.d.ts +93 -0
  21. package/lib/types/quality/chunk-visual.d.ts.map +1 -0
  22. package/lib/types/quality/citation.d.ts +76 -0
  23. package/lib/types/quality/citation.d.ts.map +1 -0
  24. package/lib/types/quality/diversity.d.ts +54 -0
  25. package/lib/types/quality/diversity.d.ts.map +1 -0
  26. package/lib/types/quality/few-shot.d.ts +54 -0
  27. package/lib/types/quality/few-shot.d.ts.map +1 -0
  28. package/lib/types/quality/lost-middle.d.ts +95 -0
  29. package/lib/types/quality/lost-middle.d.ts.map +1 -0
  30. package/lib/types/quality/purge.d.ts +55 -0
  31. package/lib/types/quality/purge.d.ts.map +1 -0
  32. package/lib/types/quality/reference.d.ts +75 -0
  33. package/lib/types/quality/reference.d.ts.map +1 -0
  34. package/lib/types/quality/relevance.d.ts +44 -0
  35. package/lib/types/quality/relevance.d.ts.map +1 -0
  36. package/lib/types/text.d.ts +51 -0
  37. package/lib/types/text.d.ts.map +1 -0
  38. package/package.json +149 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-visual.d.ts","sourceRoot":"","sources":["../../../src/quality/chunk-visual.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,0EAA0E;AAC1E,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAC9B;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,CAoBnF;AAED,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAiC,CAAA;AAEjF,qDAAqD;AACrD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC9F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,kBAAkB,CA8B/E;AAED,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAA;IACtC,mFAAmF;IACnF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,qFAAqF;IACrF,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,uCAAuC;IACvC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,gBAAgB,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAE9C;AAED,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,KAAK,EAAE,EACxB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf;IAAE,KAAK,EAAE,aAAa,EAAE,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAcpD"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Port of Citation-Validator-Lite (upstream/PerryLink, Apache-2.0): citation
3
+ * extraction (`[n]` markers), sentence-bounded claim windows, and fuzzy
4
+ * validation against the cited source. The upstream `fuzzywuzzy`
5
+ * `partial_ratio` is reimplemented as a bounded token-sequence partial ratio
6
+ * (zero dependencies) — the shorter text slides over every token window of
7
+ * the longer one and the best ratio wins, matching the upstream semantics.
8
+ * @module dsh-library/quality/citation
9
+ */
10
+ /** One citation match — the upstream `CitationMatch` dataclass. */
11
+ export interface CitationMatch {
12
+ readonly number: string;
13
+ readonly context: string;
14
+ readonly is_valid: boolean;
15
+ /** Fuzzy score 0..100. */
16
+ readonly score: number;
17
+ readonly start_pos: number;
18
+ readonly end_pos: number;
19
+ readonly reason: string;
20
+ }
21
+ /** The whole validation result — the upstream `ValidationResult` dataclass. */
22
+ export interface ValidationResult {
23
+ readonly results: readonly CitationMatch[];
24
+ readonly threshold: number;
25
+ }
26
+ /**
27
+ * Extract every `[<digits>]` citation marker as (number, start, end) — the
28
+ * upstream `extract_citations` (`r'\[(\d+)\]'`).
29
+ * @param text - the answer text.
30
+ * @returns the markers in scan order.
31
+ */
32
+ export declare function extractCitationNumbers(text: string): Array<{
33
+ number: string;
34
+ start: number;
35
+ end: number;
36
+ }>;
37
+ /**
38
+ * Extract the sentence around a citation position — the upstream
39
+ * `extract_sentence_with_citation`: scan backwards to the nearest sentence
40
+ * ending (`.`, `!`, `?`, newline) and forwards the same way, bounded by the
41
+ * window.
42
+ * @param text - the answer text.
43
+ * @param citationPos - the citation marker position.
44
+ * @param window - maximum half-window in characters.
45
+ * @returns the trimmed sentence context.
46
+ */
47
+ export declare function extractSentenceWithCitation(text: string, citationPos: number, window?: number): string;
48
+ /**
49
+ * Bounded port of `fuzz.partial_ratio`: the best sequence ratio between one
50
+ * text and every token window of the other. Both sides are token-capped so
51
+ * hostilely long sources stay within a fixed quadratic budget.
52
+ * @param claim - the claim text.
53
+ * @param source - the source text.
54
+ * @returns the best ratio as a 0..100 integer score.
55
+ */
56
+ export declare function fuzzyPartialRatio(claim: string, source: string): number;
57
+ /**
58
+ * Validate one citation claim against its source — the upstream
59
+ * `validate_citation` (`fuzz.partial_ratio(claim, source) >= threshold`).
60
+ * @param claim - the claim context.
61
+ * @param source - the cited source text.
62
+ * @param threshold - pass score (0..100).
63
+ * @returns `[isValid, score]`.
64
+ */
65
+ export declare function validateCitation(claim: string, source: string, threshold?: number): [boolean, number];
66
+ /**
67
+ * Validate every citation in an answer — the upstream `validate_citations`.
68
+ * Unknown source numbers are invalid with score 0 and reason
69
+ * "Source not found"; low scores carry a "Low match score: N%" reason.
70
+ * @param answer - the answer text with `[n]` markers.
71
+ * @param sources - source text keyed by citation number.
72
+ * @param threshold - pass score (0..100).
73
+ * @returns the validation result.
74
+ */
75
+ export declare function validateCitations(answer: string, sources: Readonly<Record<string, string>>, threshold?: number): ValidationResult;
76
+ //# sourceMappingURL=citation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"citation.d.ts","sourceRoot":"","sources":["../../../src/quality/citation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,0BAA0B;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAA;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAM1G;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAM,GAAG,MAAM,CAmBnG;AA8BD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAYvE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,SAAK,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAGjG;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,SAAS,SAAK,GAAG,gBAAgB,CAmB7H"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Port of Retrieval-Diversity-Check (upstream/PerryLink, Apache-2.0): the
3
+ * TF-IDF cosine duplicate scan (`check_diversity`) plus the maximal-marginal
4
+ * relevance re-ranking that `library_search` applies to its hybrid-ranked
5
+ * candidates. Pure functions — the upstream numpy/sklearn calls are replaced
6
+ * by the shared token vocabulary.
7
+ * @module dsh-library/quality/diversity
8
+ */
9
+ /** One duplicate pair from {@link checkDiversity}. */
10
+ export interface DuplicatePair {
11
+ readonly first: number;
12
+ readonly second: number;
13
+ readonly similarity: number;
14
+ }
15
+ /** The `check_diversity` result dictionary, ported 1:1. */
16
+ export interface DiversityReport {
17
+ readonly totalTexts: number;
18
+ readonly duplicateCount: number;
19
+ /** Percentage of texts involved in at least one duplicate pair. */
20
+ readonly tokenSavings: number;
21
+ readonly duplicates: readonly DuplicatePair[];
22
+ /** Row-major lower-triangle-free matrix of pairwise cosine similarities. */
23
+ readonly similarityMatrix: readonly (readonly number[])[];
24
+ }
25
+ /**
26
+ * Check a text list for near-duplicates — the upstream `check_diversity`.
27
+ * TF-IDF-lite vectors share one token vocabulary; pairs whose cosine
28
+ * similarity is STRICTLY above `threshold` are duplicates (upstream uses
29
+ * `>`). Fewer than two texts throw, like upstream.
30
+ * @param texts - the texts to compare.
31
+ * @param threshold - similarity threshold (0..1).
32
+ * @returns the diversity report.
33
+ * @throws TypeError on fewer than two texts.
34
+ */
35
+ export declare function checkDiversity(texts: readonly string[], threshold?: number): DiversityReport;
36
+ /** One re-rankable candidate: an item plus its relevance and pair similarity. */
37
+ export interface RerankCandidate {
38
+ readonly id: string;
39
+ /** Pre-existing relevance (hybrid score), used as the MMR relevance term. */
40
+ readonly relevance: number;
41
+ /** Pairwise similarity to one already-selected item. */
42
+ similarityTo(other: RerankCandidate): number;
43
+ }
44
+ /**
45
+ * Maximal marginal relevance over {@link RerankCandidate}s: greedily pick the
46
+ * candidate maximizing `lambda * relevance - (1 - lambda) * maxSimilarity`.
47
+ * `lambda = 1` is pure relevance order, `lambda = 0` pure diversity.
48
+ * @param candidates - the ranked candidate pool.
49
+ * @param lambda - relevance/diversity trade-off within 0..1.
50
+ * @param topK - how many to pick.
51
+ * @returns the picked candidates in selection order.
52
+ */
53
+ export declare function maximalMarginalRelevance<T extends RerankCandidate>(candidates: readonly T[], lambda: number, topK: number): T[];
54
+ //# sourceMappingURL=diversity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diversity.d.ts","sourceRoot":"","sources":["../../../src/quality/diversity.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,sDAAsD;AACtD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAA;IAC7C,4EAA4E;IAC5E,QAAQ,CAAC,gBAAgB,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAA;CAC1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,SAAM,GAAG,eAAe,CAsBzF;AAiBD,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,wDAAwD;IACxD,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAAA;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,eAAe,EAChE,UAAU,EAAE,SAAS,CAAC,EAAE,EACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,CAAC,EAAE,CAsBL"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Port of Few-Shot-Selector (upstream/PerryLink, Apache-2.0): the
3
+ * similarity-ranked example selection and the prompt formatter. The upstream
4
+ * ChromaDB collection + SentenceTransformer model are replaced by the
5
+ * plugin's deterministic hash embedder (zero downloads) — same
6
+ * "embed question, cosine-rank, top-n" pipeline and the same prompt layout.
7
+ * @module dsh-library/quality/few-shot
8
+ */
9
+ /** One QA example in the local store, mirroring the upstream metadata shape. */
10
+ export interface QaExample {
11
+ readonly id: string;
12
+ readonly question: string;
13
+ readonly answer: string;
14
+ readonly category?: string;
15
+ /** Free-form tags, joined by commas in the upstream metadata. */
16
+ readonly tags?: readonly string[];
17
+ }
18
+ /** One selected example plus its similarity to the query. */
19
+ export interface SelectedExample {
20
+ readonly example: QaExample;
21
+ /** Cosine similarity to the query (0..1 for the hash embedder). */
22
+ readonly score: number;
23
+ }
24
+ /** Selection options: how many examples and the embedding dimensionality. */
25
+ export interface FewShotOptions {
26
+ /** How many examples to return (upstream `n_results`). */
27
+ readonly n?: number;
28
+ /** Hash-embedding dimensionality used for ranking. */
29
+ readonly dims?: number;
30
+ }
31
+ /** Whether a QA pair is usable, ported from upstream `validate_qa_pair`. */
32
+ export declare function validateQaPair(question: string, answer: string): boolean;
33
+ /**
34
+ * Rank the example store by cosine similarity to the query and return the
35
+ * top `n` — the upstream `search_similar` with the hash embedder in place of
36
+ * the SentenceTransformer model. An empty query or store throws, like
37
+ * upstream (`ValueError` / `DatabaseNotInitializedError`).
38
+ * @param query - the query text.
39
+ * @param examples - the QA store.
40
+ * @param options - selection options.
41
+ * @returns the selected examples, best first.
42
+ * @throws TypeError on an empty query or empty store.
43
+ */
44
+ export declare function selectFewShot(query: string, examples: readonly QaExample[], options?: FewShotOptions): SelectedExample[];
45
+ /**
46
+ * Format the upstream few-shot prompt: an intro line, one numbered
47
+ * question/answer block per example, then the query — ported 1:1 from
48
+ * `format_prompt`.
49
+ * @param query - the query text.
50
+ * @param selected - the selected examples, in order.
51
+ * @returns the formatted prompt text.
52
+ */
53
+ export declare function formatFewShotPrompt(query: string, selected: readonly SelectedExample[]): string;
54
+ //# sourceMappingURL=few-shot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"few-shot.d.ts","sourceRoot":"","sources":["../../../src/quality/few-shot.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAClC;AAED,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,6EAA6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAA;IACnB,sDAAsD;IACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAExE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,SAAS,EAAE,EAAE,OAAO,GAAE,cAAmB,GAAG,eAAe,EAAE,CAW5H;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,MAAM,CAS/F"}
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Port of Lost-in-Middle-Tester (upstream/PerryLink, Apache-2.0): the probe
3
+ * insertion and position statistics vocabulary, plus the avoidance strategy
4
+ * that `library_search` applies to its retrieved list — the strongest chunks
5
+ * are pinned to the head and tail of the context so the model never meets
6
+ * the key evidence only in the middle.
7
+ * @module dsh-library/quality/lost-middle
8
+ */
9
+ /** One probe trial's outcome, mirroring the upstream `TestResult` shape. */
10
+ export interface ProbeResult {
11
+ /** Relative insertion position within 0..1. */
12
+ readonly position: number;
13
+ readonly probe: string;
14
+ readonly found: boolean;
15
+ }
16
+ /** Default probe prefix, mirroring the upstream `SECRET_CODE_` convention. */
17
+ export declare const PROBE_PREFIX = "SECRET_CODE_";
18
+ /**
19
+ * Deterministic probe text for one trial. The upstream generator draws 4
20
+ * random chars; here the caller supplies the suffix so tests replay.
21
+ * @param suffix - the 4-character uppercase/digit suffix.
22
+ * @returns the full probe string.
23
+ */
24
+ export declare function makeProbe(suffix: string): string;
25
+ /**
26
+ * Insert a probe sentence into one paragraph — the upstream
27
+ * `PasswordInserter.insert`, deterministic instead of random.
28
+ * @param paragraphs - the paragraph list.
29
+ * @param position - relative position within 0..1 (clamped to the list).
30
+ * @param probe - the probe string to insert.
31
+ * @returns the modified list, the probe, and the insertion index.
32
+ */
33
+ export declare function insertProbe(paragraphs: readonly string[], position: number, probe: string): {
34
+ modified: string[];
35
+ probe: string;
36
+ index: number;
37
+ };
38
+ /** Per-position statistics, mirroring the upstream `ResultCollector`. */
39
+ export interface PositionStats {
40
+ readonly successRate: number;
41
+ readonly successCount: number;
42
+ readonly totalCount: number;
43
+ }
44
+ /** Success counts keyed by position (the upstream statistics dictionary). */
45
+ export declare function successByPosition(results: readonly ProbeResult[]): Map<number, PositionStats>;
46
+ /**
47
+ * The upstream prompt template used to test whether a model can surface a
48
+ * probe at a given position.
49
+ * @param document - the joined document text.
50
+ * @returns the model prompt.
51
+ */
52
+ export declare function buildProbePrompt(document: string): string;
53
+ /** One ranked item the avoidance strategy reorders. */
54
+ export interface RankedItem {
55
+ readonly id: string;
56
+ readonly score: number;
57
+ }
58
+ /**
59
+ * Lost-in-the-middle avoidance: reorder a ranked list so the strongest items
60
+ * sit at the head and the tail of the context window (the positions models
61
+ * read most reliably), leaving the weakest in the middle. Within each zone
62
+ * the score order is preserved.
63
+ * @param ranked - the items ranked by score, descending.
64
+ * @param head - how many strongest items to pin to the head.
65
+ * @param tail - how many next-strongest items to pin to the tail.
66
+ * @returns the reordered list (same length, same members).
67
+ */
68
+ export declare function avoidLostMiddle(ranked: readonly RankedItem[], head: number, tail: number): RankedItem[];
69
+ /** One position bin of a middle-penalty report. */
70
+ export interface PositionBin {
71
+ /** Inclusive relative start of the bin (0..1). */
72
+ readonly start: number;
73
+ /** Exclusive relative end of the bin (0..1). */
74
+ readonly end: number;
75
+ readonly count: number;
76
+ readonly meanScore: number;
77
+ }
78
+ /**
79
+ * Bin one ranked list by relative position and fold each bin's mean score —
80
+ * the middle-penalty report: a score trough in the middle bins is the
81
+ * lost-in-the-middle risk signal `library_diagnose` reports.
82
+ * @param ranked - the items in their final context order.
83
+ * @param bins - how many equal-width bins to use.
84
+ * @returns one entry per bin.
85
+ */
86
+ export declare function positionBins(ranked: readonly RankedItem[], bins: number): PositionBin[];
87
+ /**
88
+ * The middle-penalty magnitude: how much the middle bins' mean score drops
89
+ * below the best bin's mean. 0 means no penalty (flat distribution); larger
90
+ * values mean strong content sits at the edges and weak content in the middle.
91
+ * @param bins - a {@link positionBins} report.
92
+ * @returns the penalty within 0..1, or 0 for an empty report.
93
+ */
94
+ export declare function middlePenalty(bins: readonly PositionBin[]): number;
95
+ //# sourceMappingURL=lost-middle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lost-middle.d.ts","sourceRoot":"","sources":["../../../src/quality/lost-middle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED,8EAA8E;AAC9E,eAAO,MAAM,YAAY,iBAAiB,CAAA;AAE1C;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAQtD;AAED,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAiB7F;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAMvG;AAED,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC1B,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,gDAAgD;IAChD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAiBvF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAUlE"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Port of RAG-Purge-Verify (upstream/PerryLink, Apache-2.0): after a
3
+ * document is removed, probe the remaining index with deterministic
4
+ * signatures of the removed content and report any residue. The upstream
5
+ * metadata-filter and payload-text engine probes become token n-gram
6
+ * signature probes over the remaining chunks; `passed` requires zero hits,
7
+ * exactly like the upstream `total_found == 0` gate.
8
+ * @module dsh-library/quality/purge
9
+ */
10
+ /** One remaining index entry the purge verification probes against. */
11
+ export interface RemainingChunk {
12
+ readonly id: string;
13
+ readonly text: string;
14
+ }
15
+ /** One signature probe's outcome — the upstream per-check result dictionary. */
16
+ export interface PurgeProbeResult {
17
+ readonly signature: string;
18
+ readonly foundCount: number;
19
+ readonly residueIds: readonly string[];
20
+ }
21
+ /** The whole verification report — the upstream `verify` return. */
22
+ export interface PurgeReport {
23
+ /** True when no signature matched anything (the upstream pass stamp). */
24
+ readonly passed: boolean;
25
+ readonly totalFound: number;
26
+ readonly probes: readonly PurgeProbeResult[];
27
+ }
28
+ /** Purge verification options, bound to the resolved purge config. */
29
+ export interface PurgeOptions {
30
+ /** Token n-gram width of the signatures. */
31
+ readonly signatureLength?: number;
32
+ /** How many signatures are probed; longer documents sample deterministically. */
33
+ readonly maxProbes?: number;
34
+ }
35
+ /**
36
+ * Deterministically pick up to `maxProbes` signatures from a list: indices
37
+ * are spread evenly across the list so long documents are sampled end to end.
38
+ * @param signatures - the full signature list.
39
+ * @param maxProbes - the probe budget.
40
+ * @returns the sampled signatures in original order.
41
+ */
42
+ export declare function sampleSignatures(signatures: readonly string[], maxProbes: number): string[];
43
+ /**
44
+ * Verify that a removed document left no residue in the remaining index —
45
+ * the upstream `Verifier.verify` flow. Signatures are token n-grams of the
46
+ * removed content; a chunk is residue when it contains every token of one
47
+ * signature (as token-subsequence containment is too strict for chunk
48
+ * boundaries, exact phrase containment is used).
49
+ * @param remaining - the chunks that should remain after removal.
50
+ * @param removedContent - the removed document text.
51
+ * @param options - purge options.
52
+ * @returns the purge report; `passed` is true only on zero residue.
53
+ */
54
+ export declare function verifyPurge(remaining: readonly RemainingChunk[], removedContent: string, options?: PurgeOptions): PurgeReport;
55
+ //# sourceMappingURL=purge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purge.d.ts","sourceRoot":"","sources":["../../../src/quality/purge.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,gFAAgF;AAChF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CACvC;AAED,oEAAoE;AACpE,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAC7C;AAED,sEAAsE;AACtE,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,iFAAiF;IACjF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ3F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,SAAS,cAAc,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,WAAW,CAYjI"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Port of RAG-Reference-Checker (upstream/PerryLink, Apache-2.0): citation
3
+ * extraction (`[n]` markers), the surrounding-context window, and the
4
+ * verify loop that marks each citation valid / suspicious / missing. The
5
+ * upstream SentenceTransformer model (and its `download_model.py`) is
6
+ * replaced by the plugin's deterministic hash embedder — zero downloads, and
7
+ * the similarity threshold is the resolved `citation.minSemantic` config.
8
+ * @module dsh-library/quality/reference
9
+ */
10
+ /** One extracted citation marker: its numeric id and [start, end) span. */
11
+ export interface CitationMarker {
12
+ readonly refId: number;
13
+ readonly start: number;
14
+ readonly end: number;
15
+ }
16
+ /**
17
+ * Extract every `[<digits>]` citation marker — the upstream
18
+ * `extract_citations` (`r'\[(\d+)\]'`), with the numeric id returned as a
19
+ * number like the upstream `int(match.group(1))`.
20
+ * @param text - the answer text.
21
+ * @returns the markers in scan order.
22
+ */
23
+ export declare function extractCitations(text: string): CitationMarker[];
24
+ /**
25
+ * Extract the character window around a citation position — the upstream
26
+ * `extract_context` (`position ± window`, trimmed).
27
+ * @param text - the answer text.
28
+ * @param position - the citation marker position.
29
+ * @param window - half-window size in characters.
30
+ * @returns the trimmed context.
31
+ */
32
+ export declare function extractContext(text: string, position: number, window?: number): string;
33
+ /** One reference document the checker verifies against. */
34
+ export interface ReferenceDocument {
35
+ readonly id: number;
36
+ readonly content: string;
37
+ }
38
+ /** One citation verdict — the upstream per-citation result dictionary. */
39
+ export interface ReferenceVerdict {
40
+ readonly refId: number;
41
+ /** `valid` (similarity ≥ threshold), `suspicious` (below), or `missing` (unknown id). */
42
+ readonly status: 'valid' | 'suspicious' | 'missing';
43
+ /** Semantic similarity, rounded to two decimals like upstream. */
44
+ readonly similarity: number;
45
+ /** The claim context the similarity was computed from. */
46
+ readonly context: string;
47
+ /** Present on suspicious/missing verdicts only. */
48
+ readonly reason?: string;
49
+ }
50
+ /** The whole verification report — the upstream `verify_references` return. */
51
+ export interface ReferenceReport {
52
+ readonly total: number;
53
+ readonly valid: number;
54
+ readonly suspicious: number;
55
+ readonly details: readonly ReferenceVerdict[];
56
+ }
57
+ /** Verification options: similarity threshold and embedding dimensionality. */
58
+ export interface ReferenceOptions {
59
+ /** Similarity threshold (0..1); below it a citation is `suspicious`. */
60
+ readonly threshold?: number;
61
+ /** Hash-embedding dimensionality. */
62
+ readonly dims?: number;
63
+ }
64
+ /**
65
+ * Verify every citation in an answer against the reference list — the
66
+ * upstream `verify_references` with the hash embedder substituted for the
67
+ * model. Unknown reference ids are `missing`; known ids whose context
68
+ * similarity falls below the threshold are `suspicious`.
69
+ * @param answer - the answer text containing `[n]` markers.
70
+ * @param references - the reference documents keyed by numeric id.
71
+ * @param options - verification options.
72
+ * @returns the verification report.
73
+ */
74
+ export declare function verifyReferences(answer: string, references: readonly ReferenceDocument[], options?: ReferenceOptions): ReferenceReport;
75
+ //# sourceMappingURL=reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/quality/reference.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE,CAM/D;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM,CAIlF;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,yFAAyF;IACzF,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,CAAA;IACnD,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,mDAAmD;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAC9C;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,iBAAiB,EAAE,EAAE,OAAO,GAAE,gBAAqB,GAAG,eAAe,CA0B1I"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Port of Context-Relevance-Scorer (upstream/PerryLink, Apache-2.0): the
3
+ * relevance scoring/filtering pipeline that `library_search` runs after
4
+ * retrieval. The upstream cross-encoder model is replaced by a local-rules
5
+ * lexical scorer (zero downloads): token overlap weighted toward rarer
6
+ * query terms, normalized to 0..1 — same `(document, score, passed)` API
7
+ * shape as the upstream `score_batch`/`filter_documents`.
8
+ * @module dsh-library/quality/relevance
9
+ */
10
+ /**
11
+ * Score one document's relevance to a query with the local-rules scorer.
12
+ * Each query token contributes its document frequency share: a query term
13
+ * the document covers at least once contributes fully; the score is the
14
+ * covered-query-weight fraction. Repeated query terms are down-weighted
15
+ * (1/count) so spam cannot inflate coverage.
16
+ * @param query - the query text.
17
+ * @param document - the candidate document text.
18
+ * @returns relevance within 0..1 (0 for an empty query or document).
19
+ */
20
+ export declare function scoreRelevance(query: string, document: string): number;
21
+ /** One scored document, mirroring the upstream `score_batch` tuple. */
22
+ export interface ScoredDocument {
23
+ readonly document: string;
24
+ readonly score: number;
25
+ readonly passed: boolean;
26
+ }
27
+ /**
28
+ * Score a batch of documents against one query — the upstream `score_batch`.
29
+ * @param query - the query text.
30
+ * @param documents - the candidate documents.
31
+ * @param threshold - the pass threshold (0..1); score ≥ threshold passes.
32
+ * @returns one entry per document, in input order.
33
+ */
34
+ export declare function scoreBatch(query: string, documents: readonly string[], threshold?: number): ScoredDocument[];
35
+ /**
36
+ * Keep only documents that pass the threshold — the upstream
37
+ * `filter_documents`, with the local-rules scorer substituted for the model.
38
+ * @param query - the query text.
39
+ * @param documents - the candidate documents.
40
+ * @param threshold - the pass threshold (0..1).
41
+ * @returns the passing documents in input order.
42
+ */
43
+ export declare function filterDocuments(query: string, documents: readonly string[], threshold?: number): string[];
44
+ //# sourceMappingURL=relevance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relevance.d.ts","sourceRoot":"","sources":["../../../src/quality/relevance.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAatE;AAED,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,SAAM,GAAG,cAAc,EAAE,CAKzG;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,SAAM,GAAG,MAAM,EAAE,CAItG"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Shared text utilities for the quality modules: tokenization, term
3
+ * frequencies, and n-gram windows. Pure and deterministic — every scoring
4
+ * module builds on this vocabulary.
5
+ * @module dsh-library/text
6
+ */
7
+ /**
8
+ * Normalize prose for scoring: lowercase and collapse whitespace.
9
+ * Does NOT strip punctuation (token boundaries still cut on it).
10
+ * @param text - input text.
11
+ * @returns the normalized text.
12
+ */
13
+ export declare function normalize(text: string): string;
14
+ /**
15
+ * Tokenize into lowercase word tokens. ASCII words keep their boundaries;
16
+ * every other run of letters counts as one token so CJK text still scores.
17
+ * @param text - input text.
18
+ * @returns the token list.
19
+ */
20
+ export declare function tokenize(text: string): string[];
21
+ /** Deduplicated token set of one text. */
22
+ export declare function tokenSet(text: string): ReadonlySet<string>;
23
+ /**
24
+ * Term-frequency map of one text: token → occurrence count.
25
+ * @param text - input text.
26
+ * @returns the frequency map (plain object, no prototype).
27
+ */
28
+ export declare function termFrequencies(text: string): Record<string, number>;
29
+ /**
30
+ * Character n-grams of a normalized text, for the built-in hash embedder.
31
+ * A space-padded form adds leading/trailing boundary markers so prefixes and
32
+ * suffixes still contribute.
33
+ * @param text - input text.
34
+ * @param n - n-gram width.
35
+ * @returns the n-gram array.
36
+ */
37
+ export declare function charNGrams(text: string, n: number): string[];
38
+ /**
39
+ * Token n-grams of a tokenized text (the purge signature vocabulary).
40
+ * @param tokens - token list from {@link tokenize}.
41
+ * @param n - n-gram width.
42
+ * @returns n-gram tokens joined by spaces, deduplicated.
43
+ */
44
+ export declare function tokenNGrams(tokens: readonly string[], n: number): string[];
45
+ /**
46
+ * FNV-1a 32-bit string hash — the deterministic bucket of the hash embedder.
47
+ * @param text - string to hash.
48
+ * @returns an unsigned 32-bit integer.
49
+ */
50
+ export declare function fnv1a(text: string): number;
51
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAO/C;AAED,0CAA0C;AAC1C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAE1D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIpE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ5D;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1E;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO1C"}