@claritylabs/cl-sdk 3.2.4 → 3.2.5
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/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5584,10 +5584,13 @@ function isTableCellSpan(span) {
|
|
|
5584
5584
|
}
|
|
5585
5585
|
function isOperationalEvidenceAnchor(span) {
|
|
5586
5586
|
const sourceUnit3 = spanSourceUnit(span);
|
|
5587
|
-
if (sourceUnit3 === "
|
|
5587
|
+
if (sourceUnit3 === "table_cell") return false;
|
|
5588
5588
|
if (sourceUnit3 === "table" || sourceUnit3 === "table_row") return true;
|
|
5589
5589
|
const text = cleanText([span.text, span.formNumber].filter(Boolean).join(" "), "");
|
|
5590
5590
|
if (!text) return false;
|
|
5591
|
+
if (sourceUnit3 === "page") {
|
|
5592
|
+
return hasSubstantiveDeclarationsScheduleText(text) || /\b(declarations?|named insured|policy number|policy period|effective date|expiration date|premium|total due|producer)\b/i.test(text);
|
|
5593
|
+
}
|
|
5591
5594
|
if (/\bitem\s+\d+\.?\s*(?:named insured|policy number|policy period|renewal|form of business|coverage parts?|premium|extended reporting|producer|forms? and endorsements?)\b/i.test(text)) return true;
|
|
5592
5595
|
if (/\b(policy\s*(number|period)|effective date|expiration date|expiry date|named insured|insurer|carrier|broker|producer|premium|total due)\b/i.test(text)) return true;
|
|
5593
5596
|
if (/\b(coverage part|forms? and endorsements?|attached at inception|endorsement\s+(?:no\.?|number|#)?\s*[A-Z0-9])\b/i.test(text)) return true;
|
|
@@ -5644,7 +5647,7 @@ function operationalProfileEvidence(sourceTree, sourceSpans) {
|
|
|
5644
5647
|
});
|
|
5645
5648
|
const detailEntries = entries.filter((entry) => entry.sourceUnit !== "page");
|
|
5646
5649
|
const pageEntries = entries.filter((entry) => entry.sourceUnit === "page");
|
|
5647
|
-
return
|
|
5650
|
+
return [...detailEntries, ...pageEntries].slice(0, 180);
|
|
5648
5651
|
}
|
|
5649
5652
|
function sourceTreeRootId(sourceTree) {
|
|
5650
5653
|
return sourceTree.find((node) => node.kind === "document")?.id;
|