import FS from 'fs'; import path from 'path'; import JSZip from 'jszip'; const file = path.join( 'C:/Users/Administrator/Desktop/IN2026A0418001_final_20260713 1.docx' ); const xml = await (await JSZip.loadAsync(FS.readFileSync(file))).file('word/document.xml').async('string'); const paras = xml.split(/<\/w:p>/); function plainOf(p) { return [...p.matchAll(/]*)?>([\s\S]*?)<\/w:t>/g)] .map((x) => x[1]) .join('') .replace(/&/g, '&') .replace(/\s+/g, ' ') .trim(); } function blipCount(p) { return (p.match(/a:blip/g) || []).length; } function drawingCount(p) { return (p.match(/