@office-open/docx
Advanced tools
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| {"version":3,"file":"core-properties-Bh8_D5Kh.d.mts","names":[],"sources":["../src/parts/bibliography.ts","../src/parts/contenttypes.ts","../src/parts/fonts/font.ts","../src/parts/alt-chunk/alt-chunk-collection.ts","../src/parts/alt-chunk/alt-chunk.ts","../src/shared/shading.ts","../src/shared/track-revision/track-revision.ts","../src/shared/track-revision/track-revision-components/cell-merge.ts","../src/shared/vertical-align.ts","../src/parts/paragraph/formatting/alignment.ts","../src/shared/border.ts","../src/parts/paragraph/formatting/border.ts","../src/parts/paragraph/formatting/cnf-style.ts","../src/parts/paragraph/formatting/indent.ts","../src/parts/paragraph/formatting/break.ts","../src/parts/paragraph/formatting/spacing.ts","../src/parts/paragraph/formatting/style.ts","../src/parts/paragraph/formatting/tab-stop.ts","../src/parts/paragraph/math.ts","../src/shared/constants.ts","../src/parts/paragraph/frame/frame-properties.ts","../src/parts/paragraph/run/empty-children.ts","../src/parts/paragraph/run/east-asian-layout.ts","../src/parts/paragraph/run/emphasis-mark.ts","../src/parts/paragraph/run/formatting.ts","../src/parts/paragraph/run/language.ts","../src/parts/paragraph/run/run-fonts.ts","../src/parts/paragraph/run/underline.ts","../src/parts/paragraph/run/properties.ts","../src/parts/paragraph/run/run.ts","../src/parts/paragraph/properties.ts","../src/parts/paragraph/run/symbol-run.ts","../src/parts/drawing/doc-properties/doc-properties.ts","../src/parts/drawing/inline/graphic/graphic-data/wpg/wpg-group.ts","../src/parts/drawing/inline/graphic/graphic-data/wps/body-properties.ts","../src/parts/drawing/inline/graphic/graphic-data/wps/non-visual-shape-properties.ts","../src/parts/drawing/inline/graphic/graphic-data/wps/wps-shape.ts","../src/shared/media/data.ts","../src/shared/media/media.ts","../src/parts/drawing/text-wrap/text-wrapping.ts","../src/parts/drawing/text-wrap/wrap-tight.ts","../src/parts/drawing/text-wrap/wrap-through.ts","../src/parts/drawing/floating/floating-position.ts","../src/parts/drawing/floating/horizontal-position.ts","../src/parts/drawing/floating/vertical-position.ts","../src/parts/drawing/drawing.ts","../src/parts/drawing/descriptor.ts","../src/parts/paragraph/run/image-run.ts","../src/parts/paragraph/run/chart-run.ts","../src/parts/paragraph/run/smartart-run.ts","../src/parts/paragraph/run/wps-shape-run.ts","../src/parts/paragraph/run/wpg-group-run.ts","../src/parts/paragraph/run/simple-field.ts","../src/parts/paragraph/run/comment-run.ts","../src/parts/paragraph/run/positional-tab.ts","../src/parts/paragraph/run/ruby.ts","../src/parts/paragraph/run/form-field.ts","../src/parts/paragraph/run/smart-tag-run.ts","../src/parts/paragraph/run/proof-error.ts","../src/parts/paragraph/paragraph.ts","../src/parts/table/grid.ts","../src/parts/table/table-cell-spacing.ts","../src/parts/table/table-width.ts","../src/parts/table/table-properties/table-borders.ts","../src/parts/table/table-properties/table-float-properties.ts","../src/parts/table/table-properties/table-layout.ts","../src/parts/table/table-properties/table-look.ts","../src/parts/table/table-properties/table-properties.ts","../src/parts/table/table-properties/table-property-exceptions.ts","../src/parts/table/table-cell/table-cell-components.ts","../src/parts/table/table-row/table-row-height.ts","../src/parts/table/table-row/table-row-properties.ts","../src/parts/table/table-row/table-row.ts","../src/parts/table/table.ts","../src/parts/table/descriptor.ts","../src/parts/table/table-properties/table-cell-margin.ts","../src/parts/table/table-cell/table-cell-properties.ts","../src/parts/table/table-cell/table-cell.ts","../src/parts/custom-xml/custom-xml.ts","../src/parts/document/body/section-properties/properties/column.ts","../src/parts/document/body/section-properties/properties/columns.ts","../src/parts/document/body/section-properties/properties/doc-grid.ts","../src/parts/document/body/section-properties/properties/page-size.ts","../src/parts/document/body/section-properties/properties/page-number.ts","../src/parts/document/body/section-properties/properties/page-borders.ts","../src/parts/document/body/section-properties/properties/page-margin.ts","../src/parts/document/body/section-properties/properties/page-text-direction.ts","../src/parts/document/body/section-properties/properties/line-number.ts","../src/parts/document/body/section-properties/properties/section-type.ts","../src/parts/document/body/section-properties/properties/header-footer-reference.ts","../src/parts/document/body/section-properties/descriptor.ts","../src/parts/sub-doc/sub-doc.ts","../src/parts/table-of-contents/table-of-contents-properties.ts","../src/parts/table-of-contents/sdt-properties.ts","../src/parts/table-of-contents/toc-parse.ts","../src/parts/table-of-contents/descriptor.ts","../src/parts/textbox/types.ts","../src/parts/textbox/shape/shape.ts","../src/shared/section.ts","../src/parts/document/document-attributes.ts","../src/parts/header-footer.ts","../src/parts/document/body/section-properties/properties/footnote-endnote-properties.ts","../src/parts/document/body/section-properties/section-properties.ts","../src/parts/glossary-document.ts","../src/parts/numbering/level.ts","../src/parts/numbering/numbering.ts","../src/parts/numbering/abstract-numbering.ts","../src/parts/numbering/num.ts","../src/parts/settings/compatibility.ts","../src/parts/settings/settings.ts","../src/parts/styles/factory.ts","../src/parts/styles/styles.ts","../src/parts/sub-doc/sub-doc-collection.ts","../src/parts/frameset.ts","../src/parts/web-settings.ts","../src/parse.ts","../src/context.ts","../src/parts/fonts/font-wrapper.ts","../src/parts/fonts/font-table.ts","../src/parts/settings/descriptor.ts","../src/parts/custom-properties.ts","../src/parts/document/document-background/document-background.ts","../src/parts/core-properties.ts"],"mappings":";;;;;;;;;UAkCiB,iBAAA;EACf,IAAA;EACA,KAAA;EACA,MAAA;EACA,IAAA;EACA,KAAA;EACA,GAAA;EACA,SAAA;EACA,OAAA;EACA,MAAA;EACA,KAAA;EACA,KAAA;EACA,SAAA;EACA,IAAA;EACA,GAAA;EACA,OAAA;EACA,WAAA;AAAA;AAAA,UASe,mBAAA;EACf,OAAA,EAAS,iBAAiB;EAC1B,SAAA;AAAA;AAAA,cAmCW,gBAAA,EAAkB,gBAAgB,CAAC,mBAAA;;;UCtF/B,kBAAA;EACf,SAAA;EACA,WAAW;AAAA;AAAA,UAGI,mBAAA;EACf,QAAA;EACA,WAAW;AAAA;AAAA,UAGI,iBAAA;EACf,QAAA,EAAU,kBAAA;EACV,SAAA,EAAW,mBAAmB;AAAA;AAAA,cAWnB,gBAAA,EAAkB,gBAAgB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ACnB,0BAAA;EACA,cAAA;EACA,KAAA,GAAQ,mBAAA;EACR,WAAA,GAAc,kBAAA;EAEd,uBAAA;EAEA,IAAA;EAEA,IAAA;IACE,OAAA;IACA,GAAA;EAAA;EAGF,eAAA,GAAkB,sBAAA;EAElB,sBAAA;EAEA,kBAAA;EAEA,gBAAA;EAEA,eAAA;EAEA,OAAA;IAAY,IAAA;IAAc,GAAA;EAAA;EAE1B,kBAAA,GAAqB,eAAA;EAErB,SAAA,GAAY,eAAA;EAEZ,QAAA,GAAW,uBAAA;EAEX,QAAA,GAAW,eAAA;EAEX,WAAA,GAAc,kBAAA;EAEd,YAAA,GAAe,iBAAA;AAAA;AAAA,UASA,mBAAA;EACf,KAAA;EACA,OAAA;EACA,OAAA;EACA,QAAA;EACA,WAAA;EACA,cAAA;EACA,QAAA;AAAA;AAAA,cAGW,kBAAA,EAAoB,gBAAgB,CAAC,mBAAA"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { A as footnotesDesc, B as settingsDesc, C as fontTableDesc, N as stringifyBodyChild, P as stringifyDocumentXml, S as bibliographyDesc, _ as commentsDesc, c as corePropertiesDesc, g as contentTypesDesc, h as buildContentTypes, k as endnotesDesc, n as DocxWriteContext, o as webSettingsDesc, s as customPropertiesDesc, x as glossaryDesc } from "./context-CERMOUn0.mjs"; | ||
| import { w as DocumentAttributeNamespaces } from "./document-CeM-U6J3.mjs"; | ||
| import { APP_PROPS_XML, OoxmlMimeType, addSmartArtRelationships, createPacker, findAndReplaceImagePlaceholders, formatId, hasPlaceholders, replaceAllPlaceholders, replaceNumberingPlaceholders } from "@office-open/core"; | ||
| import { escapeXml } from "@office-open/xml"; | ||
| import { DEFAULT_DRAWING_XML, getColorXml, getLayoutXml, getStyleXml } from "@office-open/core/smartart"; | ||
| //#region src/parts/fonts/obfuscate-ttf-to-odttf.ts | ||
| /** | ||
| * Font obfuscation module for embedding fonts in WordprocessingML documents. | ||
| * | ||
| * This module implements the OOXML font obfuscation algorithm used to embed | ||
| * fonts in DOCX documents. Obfuscation is required by the OOXML specification | ||
| * to prevent simple extraction of embedded font files. | ||
| * | ||
| * Reference: ECMA-376 Part 2, Section 11.1 (Font Embedding) | ||
| * | ||
| * @module | ||
| */ | ||
| /** Start offset for obfuscation in the font file */ | ||
| const obfuscatedStartOffset = 0; | ||
| /** End offset for obfuscation (first 32 bytes are obfuscated) */ | ||
| const obfuscatedEndOffset = 32; | ||
| /** Expected GUID size (32 hex characters without dashes) */ | ||
| const guidSize = 32; | ||
| /** | ||
| * Obfuscates a TrueType font file for embedding in OOXML documents. | ||
| * | ||
| * The obfuscation algorithm XORs the first 32 bytes of the font file | ||
| * with a reversed byte sequence derived from the font's GUID key. | ||
| * This prevents simple extraction while maintaining font functionality. | ||
| * | ||
| * @param buf - The original font file as a byte array | ||
| * @param fontKey - The GUID key for the font (with or without dashes) | ||
| * @returns The obfuscated font data | ||
| * @throws Error if the fontKey is not a valid 32-character GUID | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * const fontData = readFileSync("font.ttf"); | ||
| * const fontKey = "00000000-0000-0000-0000-000000000000"; | ||
| * const obfuscatedData = obfuscate(fontData, fontKey); | ||
| * ``` | ||
| * | ||
| * @internal | ||
| */ | ||
| const obfuscate = (buf, fontKey) => { | ||
| const guid = fontKey.replace(/-/g, ""); | ||
| if (guid.length !== guidSize) throw new Error(`Error: Cannot extract GUID from font filename: ${fontKey}`); | ||
| const hexNumbers = guid.replace(/(..)/g, "$1 ").trim().split(" ").map((hexString) => parseInt(hexString, 16)); | ||
| hexNumbers.reverse(); | ||
| const obfuscatedBytes = buf.slice(obfuscatedStartOffset, obfuscatedEndOffset).map((byte, i) => byte ^ hexNumbers[i % hexNumbers.length]); | ||
| const out = new Uint8Array(obfuscatedStartOffset + obfuscatedBytes.length + Math.max(0, buf.length - obfuscatedEndOffset)); | ||
| out.set(buf.slice(0, obfuscatedStartOffset)); | ||
| out.set(obfuscatedBytes, obfuscatedStartOffset); | ||
| out.set(buf.slice(obfuscatedEndOffset), obfuscatedStartOffset + obfuscatedBytes.length); | ||
| return out; | ||
| }; | ||
| //#endregion | ||
| //#region src/parts/header-footer.ts | ||
| /** | ||
| * Namespace keys used by header elements. | ||
| * @internal | ||
| */ | ||
| const HEADER_NAMESPACES = [ | ||
| "cx", | ||
| "cx1", | ||
| "cx2", | ||
| "cx3", | ||
| "cx4", | ||
| "cx5", | ||
| "cx6", | ||
| "cx7", | ||
| "cx8", | ||
| "m", | ||
| "mc", | ||
| "o", | ||
| "r", | ||
| "v", | ||
| "w", | ||
| "w10", | ||
| "w14", | ||
| "w15", | ||
| "w16cid", | ||
| "w16se", | ||
| "wne", | ||
| "wp", | ||
| "wp14", | ||
| "wpc", | ||
| "wpg", | ||
| "wpi", | ||
| "wps" | ||
| ]; | ||
| /** | ||
| * Namespace keys used by footer elements. | ||
| * @internal | ||
| */ | ||
| const FOOTER_NAMESPACES = [ | ||
| "m", | ||
| "mc", | ||
| "o", | ||
| "r", | ||
| "v", | ||
| "w", | ||
| "w10", | ||
| "w14", | ||
| "w15", | ||
| "wne", | ||
| "wp", | ||
| "wp14", | ||
| "wpc", | ||
| "wpg", | ||
| "wpi", | ||
| "wps" | ||
| ]; | ||
| /** | ||
| * Serialize a header or footer to XML. | ||
| * | ||
| * Builds the `<w:hdr>` or `<w:ftr>` element with namespace declarations, | ||
| * then serializes each child element via `stringifyBodyChild()`. | ||
| * | ||
| * @param tag - Element tag name ("w:hdr" or "w:ftr") | ||
| * @param namespaces - Namespace keys to declare on the root element | ||
| * @param children - Block-level child elements (raw SectionChild objects) | ||
| * @param ctx - Body context for stringification | ||
| */ | ||
| function stringifyHeaderFooter(tag, namespaces, children, ctx) { | ||
| const attrParts = []; | ||
| for (const ns of namespaces) attrParts.push(`xmlns:${ns}="${escapeXml(DocumentAttributeNamespaces[ns])}"`); | ||
| const attrStr = attrParts.join(" "); | ||
| const childParts = []; | ||
| for (const child of children) childParts.push(stringifyBodyChild(child, ctx)); | ||
| const body = childParts.join(""); | ||
| return body.length === 0 ? `<${tag} ${attrStr}/>` : `<${tag} ${attrStr}>${body}</${tag}>`; | ||
| } | ||
| //#endregion | ||
| //#region src/compiler.ts | ||
| /** | ||
| * DOCX document compiler — pure function entry point. | ||
| * | ||
| * compileDocument() accepts DocumentOptions directly, | ||
| * creates a DocxWriteContext internally, and produces a Zippable result. | ||
| * All XML parts are produced via descriptors or serialize() — | ||
| * no Formatter dependency. | ||
| * | ||
| * @module | ||
| */ | ||
| /** Reusable TextEncoder (stateless, safe to share). */ | ||
| const encoder = new TextEncoder(); | ||
| /** XML declaration prepended to every OOXML part. */ | ||
| const XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"; | ||
| /** | ||
| * Compile document options into a flat file map suitable for fflate zipSync. | ||
| * | ||
| * This is the primary entry point for DOCX generation — accepts DocumentOptions | ||
| * directly. | ||
| */ | ||
| function compileDocument(options, overrides = [], mediaLevel = 0) { | ||
| const ctx = new DocxWriteContext(options); | ||
| const files = {}; | ||
| const xmlifiedFileMapping = xmlifyContext(ctx, /* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()); | ||
| const map = new Map(Object.entries(xmlifiedFileMapping)); | ||
| for (const [, obj] of map) if (Array.isArray(obj)) for (const subFile of obj) files[subFile.path] = typeof subFile.data === "string" ? encoder.encode(subFile.data) : subFile.data; | ||
| else { | ||
| const fileObj = obj; | ||
| files[fileObj.path] = typeof fileObj.data === "string" ? encoder.encode(fileObj.data) : fileObj.data; | ||
| } | ||
| for (const subFile of overrides) files[subFile.path] = typeof subFile.data === "string" ? encoder.encode(subFile.data) : subFile.data; | ||
| const mediaArray = ctx.media.array; | ||
| for (const mediaData of mediaArray) { | ||
| files[`word/media/${mediaData.fileName}`] = [mediaData.data, { level: mediaLevel }]; | ||
| if (mediaData.type === "svg") files[`word/media/${mediaData.fallback.fileName}`] = [mediaData.fallback.data, { level: mediaLevel }]; | ||
| } | ||
| for (const { data: buffer, name, fontKey } of ctx.fontTable.fontOptionsWithKey) { | ||
| const [nameWithoutExtension] = name.split("."); | ||
| files[`word/fonts/${nameWithoutExtension}.odttf`] = obfuscate(buffer, fontKey); | ||
| } | ||
| return files; | ||
| } | ||
| function xmlifyContext(ctx, headerFormattedViews, footerFormattedViews) { | ||
| const mkCtx = (viewWrapper = ctx.document) => ({ | ||
| fileData: ctx, | ||
| file: ctx, | ||
| viewWrapper, | ||
| stringifyChild: stringifyBodyChild, | ||
| addRelationship: (type, target, mode) => ctx.addRelationship(type, target, mode), | ||
| addMedia: (data, type) => ctx.addMedia(data, type) | ||
| }); | ||
| const documentRelationshipCount = ctx.document.relationships.relationshipCount + 1; | ||
| const documentXmlData = XML_DECL + stringifyDocumentXml(ctx, mkCtx(ctx.document)); | ||
| const commentRelationshipCount = ctx.comments.relationships.relationshipCount + 1; | ||
| const commentCtx = mkCtx({ relationships: ctx.comments.relationships }); | ||
| const commentXmlData = XML_DECL + commentsDesc.stringify(ctx._options.comments ?? { children: [] }, commentCtx); | ||
| const footnoteRelationshipCount = ctx.footNotes.relationships.relationshipCount + 1; | ||
| const footnoteCtx = mkCtx({ relationships: ctx.footNotes.relationships }); | ||
| const footnoteXmlData = XML_DECL + (footnotesDesc.stringify({ notes: ctx.footNotes.notes }, footnoteCtx) ?? ""); | ||
| const documentMedia = findAndReplaceImagePlaceholders(documentXmlData, ctx.media.array, documentRelationshipCount); | ||
| const commentMedia = findAndReplaceImagePlaceholders(commentXmlData, ctx.media.array, commentRelationshipCount); | ||
| const footnoteMedia = findAndReplaceImagePlaceholders(footnoteXmlData, ctx.media.array, footnoteRelationshipCount); | ||
| return { | ||
| AppProperties: { | ||
| data: XML_DECL + APP_PROPS_XML, | ||
| path: "docProps/app.xml" | ||
| }, | ||
| Comments: { | ||
| data: (() => { | ||
| return replaceNumberingPlaceholders(commentMedia.referenced.length > 0 ? commentMedia.xml : commentXmlData, ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/comments.xml" | ||
| }, | ||
| CommentsRelationships: { | ||
| data: (() => { | ||
| for (let i = 0; i < commentMedia.referenced.length; i++) ctx.comments.relationships.addRelationship(commentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${commentMedia.referenced[i].fileName}`); | ||
| return XML_DECL + ctx.comments.relationships.serialize(); | ||
| })(), | ||
| path: "word/_rels/comments.xml.rels" | ||
| }, | ||
| ContentTypes: { | ||
| data: XML_DECL + (contentTypesDesc.stringify(buildContentTypes({ | ||
| headerCount: ctx.headers.length, | ||
| footerCount: ctx.footers.length, | ||
| chartCount: ctx.charts.array.length, | ||
| smartArtCount: ctx.smartArts.array.length, | ||
| hasBibliography: !!ctx._options.bibliography, | ||
| hasGlossary: !!ctx.glossaryOptions, | ||
| hasWebSettings: !!ctx.webSettings, | ||
| altChunks: ctx.altChunks.array.map((ac) => ({ | ||
| path: `/word/${ac.path}`, | ||
| contentType: ac.contentType ?? "application/xhtml+xml" | ||
| })), | ||
| subDocs: ctx.subDocs.array.map((sd) => ({ path: `/word/${sd.path}` })) | ||
| }), ctx) ?? ""), | ||
| path: "[Content_Types].xml" | ||
| }, | ||
| CustomProperties: { | ||
| data: XML_DECL + (customPropertiesDesc.stringify({ properties: ctx._options.customProperties ?? [] }, ctx) ?? ""), | ||
| path: "docProps/custom.xml" | ||
| }, | ||
| Document: { | ||
| data: (() => { | ||
| let xmlData = documentMedia.referenced.length > 0 ? documentMedia.xml : documentXmlData; | ||
| if (hasPlaceholders(xmlData)) { | ||
| const mediaCount = documentMedia.referenced.length; | ||
| const chartKeys = ctx.charts.array.map((c) => c.key); | ||
| const smartArtKeys = ctx.smartArts.array.map((s) => s.key); | ||
| const chartOffset = documentRelationshipCount + mediaCount; | ||
| const smartArtOffset = chartOffset + chartKeys.length; | ||
| const entries = []; | ||
| for (let i = 0; i < chartKeys.length; i++) entries.push({ | ||
| prefix: "chart:", | ||
| key: chartKeys[i], | ||
| value: formatId(chartOffset, i, "rId") | ||
| }); | ||
| const saPrefixes = [ | ||
| "smartart:", | ||
| "smartart-lo:", | ||
| "smartart-qs:", | ||
| "smartart-cs:" | ||
| ]; | ||
| for (let i = 0; i < smartArtKeys.length; i++) for (let p = 0; p < saPrefixes.length; p++) entries.push({ | ||
| prefix: saPrefixes[p], | ||
| key: smartArtKeys[i], | ||
| value: formatId(smartArtOffset + p * smartArtKeys.length, i, "rId") | ||
| }); | ||
| for (const { reference, instance, numId } of ctx.numbering.concreteNumbering) entries.push({ | ||
| key: `${reference}-${instance}`, | ||
| value: numId.toString() | ||
| }); | ||
| xmlData = replaceAllPlaceholders(xmlData, entries); | ||
| } else xmlData = replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering); | ||
| return xmlData; | ||
| })(), | ||
| path: "word/document.xml" | ||
| }, | ||
| Endnotes: { | ||
| data: (() => { | ||
| const endnoteCtx = mkCtx({ relationships: ctx.endnotes.relationships }); | ||
| const xmlData = XML_DECL + (endnotesDesc.stringify({ notes: ctx.endnotes.notes }, endnoteCtx) ?? ""); | ||
| const endnoteRelCount = ctx.endnotes.relationships.relationshipCount + 1; | ||
| const endnoteMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, endnoteRelCount); | ||
| if (endnoteMedia.referenced.length > 0) { | ||
| for (let i = 0; i < endnoteMedia.referenced.length; i++) ctx.endnotes.relationships.addRelationship(endnoteRelCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${endnoteMedia.referenced[i].fileName}`); | ||
| return replaceNumberingPlaceholders(endnoteMedia.xml, ctx.numbering.concreteNumbering); | ||
| } | ||
| return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/endnotes.xml" | ||
| }, | ||
| EndnotesRelationships: { | ||
| data: XML_DECL + ctx.endnotes.relationships.serialize(), | ||
| path: "word/_rels/endnotes.xml.rels" | ||
| }, | ||
| FileRelationships: { | ||
| data: XML_DECL + ctx.fileRelationships.serialize(), | ||
| path: "_rels/.rels" | ||
| }, | ||
| FontTable: { | ||
| data: XML_DECL + (fontTableDesc.stringify({ fonts: ctx.fontTable.fontOptionsWithKey }, ctx) ?? ""), | ||
| path: "word/fontTable.xml" | ||
| }, | ||
| FontTableRelationships: { | ||
| data: XML_DECL + ctx.fontTable.relationships.serialize(), | ||
| path: "word/_rels/fontTable.xml.rels" | ||
| }, | ||
| FootNotes: { | ||
| data: (() => { | ||
| return replaceNumberingPlaceholders(footnoteMedia.referenced.length > 0 ? footnoteMedia.xml : footnoteXmlData, ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/footnotes.xml" | ||
| }, | ||
| FootNotesRelationships: { | ||
| data: (() => { | ||
| for (let i = 0; i < footnoteMedia.referenced.length; i++) ctx.footNotes.relationships.addRelationship(footnoteRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${footnoteMedia.referenced[i].fileName}`); | ||
| return XML_DECL + ctx.footNotes.relationships.serialize(); | ||
| })(), | ||
| path: "word/_rels/footnotes.xml.rels" | ||
| }, | ||
| FooterRelationships: ctx.footers.map((entry, index) => { | ||
| const footerCtx = mkCtx({ relationships: entry.relationships }); | ||
| const xmlData = XML_DECL + stringifyHeaderFooter("w:ftr", FOOTER_NAMESPACES, entry.children, footerCtx); | ||
| footerFormattedViews.set(index, xmlData); | ||
| const footerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0); | ||
| for (let i = 0; i < footerMedia.referenced.length; i++) entry.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${footerMedia.referenced[i].fileName}`); | ||
| return { | ||
| data: XML_DECL + entry.relationships.serialize(), | ||
| path: `word/_rels/footer${index + 1}.xml.rels` | ||
| }; | ||
| }), | ||
| Footers: ctx.footers.map((_entry, index) => { | ||
| const tempXmlData = footerFormattedViews.get(index); | ||
| const footerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0); | ||
| return { | ||
| data: replaceNumberingPlaceholders(footerMedia.referenced.length > 0 ? footerMedia.xml : tempXmlData, ctx.numbering.concreteNumbering), | ||
| path: `word/footer${index + 1}.xml` | ||
| }; | ||
| }), | ||
| HeaderRelationships: ctx.headers.map((entry, index) => { | ||
| const headerCtx = mkCtx({ relationships: entry.relationships }); | ||
| const xmlData = XML_DECL + stringifyHeaderFooter("w:hdr", HEADER_NAMESPACES, entry.children, headerCtx); | ||
| headerFormattedViews.set(index, xmlData); | ||
| const headerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0); | ||
| for (let i = 0; i < headerMedia.referenced.length; i++) entry.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${headerMedia.referenced[i].fileName}`); | ||
| return { | ||
| data: XML_DECL + entry.relationships.serialize(), | ||
| path: `word/_rels/header${index + 1}.xml.rels` | ||
| }; | ||
| }), | ||
| Headers: ctx.headers.map((_entry, index) => { | ||
| const tempXmlData = headerFormattedViews.get(index); | ||
| const headerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0); | ||
| return { | ||
| data: replaceNumberingPlaceholders(headerMedia.referenced.length > 0 ? headerMedia.xml : tempXmlData, ctx.numbering.concreteNumbering), | ||
| path: `word/header${index + 1}.xml` | ||
| }; | ||
| }), | ||
| Numbering: { | ||
| data: ctx.numbering.serialize(), | ||
| path: "word/numbering.xml" | ||
| }, | ||
| Properties: { | ||
| data: XML_DECL + (corePropertiesDesc.stringify(ctx._options, ctx) ?? ""), | ||
| path: "docProps/core.xml" | ||
| }, | ||
| Relationships: { | ||
| data: (() => { | ||
| for (let i = 0; i < documentMedia.referenced.length; i++) ctx.document.relationships.addRelationship(documentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${documentMedia.referenced[i].fileName}`); | ||
| const chartOffset = documentRelationshipCount + documentMedia.referenced.length; | ||
| for (let i = 0; i < ctx.charts.array.length; i++) ctx.document.relationships.addRelationship(chartOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", `charts/chart${i + 1}.xml`); | ||
| addSmartArtRelationships(ctx.smartArts.array.map((s) => s.key), (id, type, target) => { | ||
| ctx.document.relationships.addRelationship(id, type, target); | ||
| }, documentRelationshipCount + documentMedia.referenced.length + ctx.charts.array.length, 0, { | ||
| pathPrefix: "", | ||
| styleRelType: "http://schemas.microsoft.com/office/2007/relationships/diagramStyle" | ||
| }); | ||
| ctx.document.relationships.addRelationship(ctx.document.relationships.relationshipCount + 1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", "fontTable.xml"); | ||
| return XML_DECL + ctx.document.relationships.serialize(); | ||
| })(), | ||
| path: "word/_rels/document.xml.rels" | ||
| }, | ||
| Settings: { | ||
| data: XML_DECL + (settingsDesc.stringify(ctx._settingsOptions, ctx) ?? ""), | ||
| path: "word/settings.xml" | ||
| }, | ||
| Styles: { | ||
| data: (() => { | ||
| return replaceNumberingPlaceholders(ctx.styles.serialize(), ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/styles.xml" | ||
| }, | ||
| ...ctx._options.bibliography ? { Bibliography: { | ||
| data: XML_DECL + (bibliographyDesc.stringify(ctx._options.bibliography, ctx) ?? ""), | ||
| path: "word/bibliography.xml" | ||
| } } : {}, | ||
| ...ctx.charts.array.length > 0 ? { Charts: ctx.charts.array.flatMap((chartData, i) => [{ | ||
| data: XML_DECL + chartData.chartSpaceXml, | ||
| path: `word/charts/chart${i + 1}.xml` | ||
| }, { | ||
| data: "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"/>", | ||
| path: `word/charts/_rels/chart${i + 1}.xml.rels` | ||
| }]) } : {}, | ||
| ...ctx.smartArts.array.length > 0 ? { | ||
| DiagramData: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: XML_DECL + smartArtData.dataModelXml, | ||
| path: `word/diagrams/data${i + 1}.xml` | ||
| })), | ||
| DiagramLayout: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: getLayoutXml(smartArtData.layout), | ||
| path: `word/diagrams/layout${i + 1}.xml` | ||
| })), | ||
| DiagramStyle: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: getStyleXml(smartArtData.style), | ||
| path: `word/diagrams/quickStyle${i + 1}.xml` | ||
| })), | ||
| DiagramColors: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: getColorXml(smartArtData.color), | ||
| path: `word/diagrams/colors${i + 1}.xml` | ||
| })), | ||
| DiagramDrawing: ctx.smartArts.array.map((_, i) => ({ | ||
| data: DEFAULT_DRAWING_XML, | ||
| path: `word/diagrams/drawing${i + 1}.xml` | ||
| })) | ||
| } : {}, | ||
| ...ctx.altChunks.array.length > 0 ? { AltChunks: ctx.altChunks.array.map((altChunkData) => ({ | ||
| data: altChunkData.data, | ||
| path: `word/${altChunkData.path}` | ||
| })) } : {}, | ||
| ...ctx.subDocs.array.length > 0 ? { SubDocs: ctx.subDocs.array.map((subDocData) => ({ | ||
| data: subDocData.data, | ||
| path: `word/${subDocData.path}` | ||
| })) } : {}, | ||
| ...ctx.glossaryOptions ? { Glossary: { | ||
| data: (() => { | ||
| const glossaryCtx = mkCtx(void 0); | ||
| return XML_DECL + (glossaryDesc.stringify(ctx.glossaryOptions, glossaryCtx) ?? ""); | ||
| })(), | ||
| path: "word/glossary/document.xml" | ||
| } } : {}, | ||
| ...ctx.webSettings ? { WebSettings: { | ||
| data: XML_DECL + (webSettingsDesc.stringify(ctx._options.webSettings ?? {}, ctx) ?? ""), | ||
| path: "word/webSettings.xml" | ||
| } } : {} | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region src/generate.ts | ||
| /** | ||
| * Pure function API for generating DOCX files. | ||
| * | ||
| * @module | ||
| */ | ||
| /** @internal Packer instance for DOCX generation. */ | ||
| const Packer = createPacker({ | ||
| compile: (options, overrides, mediaLevel) => compileDocument(options, overrides, mediaLevel), | ||
| mimeType: OoxmlMimeType.DOCX | ||
| }); | ||
| /** | ||
| * Generate a DOCX file from pure JSON options. | ||
| * | ||
| * The output format is controlled by `packerOptions.type` (default: `"nodebuffer"` → Buffer). | ||
| * For synchronous generation, use {@link generateDocumentSync}. For streaming, use {@link generateDocumentStream}. | ||
| * | ||
| * @param options - Document options (sections, styles, numbering, etc.) | ||
| * @param packerOptions - Optional packer configuration (type, compression, overrides, etc.) | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * import { generateDocument } from "@office-open/docx"; | ||
| * | ||
| * const buffer = await generateDocument({ sections: [...] }); | ||
| * const bytes = await generateDocument({ sections: [...] }, { type: "uint8array" }); | ||
| * const blob = await generateDocument({ sections: [...] }, { type: "blob" }); | ||
| * ``` | ||
| */ | ||
| function generateDocument(options, packerOptions) { | ||
| return Packer.pack(options, packerOptions); | ||
| } | ||
| /** | ||
| * Synchronously generate a DOCX file from pure JSON options. | ||
| */ | ||
| function generateDocumentSync(options, packerOptions) { | ||
| return Packer.packSync(options, packerOptions); | ||
| } | ||
| /** | ||
| * Generate a DOCX file as a `ReadableStream<Uint8Array>`. | ||
| */ | ||
| function generateDocumentStream(options, packerOptions) { | ||
| return Packer.toStream(options, packerOptions); | ||
| } | ||
| //#endregion | ||
| export { generateDocumentStream as n, generateDocumentSync as r, generateDocument as t }; | ||
| //# sourceMappingURL=generate-DiDgl0bc.mjs.map |
| {"version":3,"file":"generate-DiDgl0bc.mjs","names":[],"sources":["../src/parts/fonts/obfuscate-ttf-to-odttf.ts","../src/parts/header-footer.ts","../src/compiler.ts","../src/generate.ts"],"sourcesContent":["/**\n * Font obfuscation module for embedding fonts in WordprocessingML documents.\n *\n * This module implements the OOXML font obfuscation algorithm used to embed\n * fonts in DOCX documents. Obfuscation is required by the OOXML specification\n * to prevent simple extraction of embedded font files.\n *\n * Reference: ECMA-376 Part 2, Section 11.1 (Font Embedding)\n *\n * @module\n */\n\n/** Start offset for obfuscation in the font file */\nconst obfuscatedStartOffset = 0;\n/** End offset for obfuscation (first 32 bytes are obfuscated) */\nconst obfuscatedEndOffset = 32;\n/** Expected GUID size (32 hex characters without dashes) */\nconst guidSize = 32;\n\n/**\n * Obfuscates a TrueType font file for embedding in OOXML documents.\n *\n * The obfuscation algorithm XORs the first 32 bytes of the font file\n * with a reversed byte sequence derived from the font's GUID key.\n * This prevents simple extraction while maintaining font functionality.\n *\n * @param buf - The original font file as a byte array\n * @param fontKey - The GUID key for the font (with or without dashes)\n * @returns The obfuscated font data\n * @throws Error if the fontKey is not a valid 32-character GUID\n *\n * @example\n * ```typescript\n * const fontData = readFileSync(\"font.ttf\");\n * const fontKey = \"00000000-0000-0000-0000-000000000000\";\n * const obfuscatedData = obfuscate(fontData, fontKey);\n * ```\n *\n * @internal\n */\nexport const obfuscate = (buf: Uint8Array, fontKey: string): Uint8Array => {\n const guid = fontKey.replace(/-/g, \"\");\n if (guid.length !== guidSize) {\n throw new Error(`Error: Cannot extract GUID from font filename: ${fontKey}`);\n }\n\n const hexStrings = guid.replace(/(..)/g, \"$1 \").trim().split(\" \");\n const hexNumbers = hexStrings.map((hexString) => parseInt(hexString, 16));\n hexNumbers.reverse();\n\n const bytesToObfuscate = buf.slice(obfuscatedStartOffset, obfuscatedEndOffset);\n const obfuscatedBytes = bytesToObfuscate.map(\n (byte, i) => byte ^ hexNumbers[i % hexNumbers.length],\n );\n\n const out = new Uint8Array(\n obfuscatedStartOffset + obfuscatedBytes.length + Math.max(0, buf.length - obfuscatedEndOffset),\n );\n out.set(buf.slice(0, obfuscatedStartOffset));\n out.set(obfuscatedBytes, obfuscatedStartOffset);\n out.set(buf.slice(obfuscatedEndOffset), obfuscatedStartOffset + obfuscatedBytes.length);\n return out;\n};\n","/**\n * Header/Footer entry module for WordprocessingML documents.\n *\n * Replaces the former HeaderWrapper/FooterWrapper/Header/Footer/HeaderFooterBase\n * class hierarchy with a simple data structure + pure serialization function.\n *\n * Reference: ISO/IEC 29500-4, wml.xsd, CT_HdrFtr\n *\n * @module\n */\n\nimport type { Relationships } from \"@office-open/core\";\nimport { escapeXml } from \"@office-open/xml\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport { stringifyBodyChild } from \"../body\";\nimport type { BodyContext } from \"../context\";\nimport { DocumentAttributeNamespaces } from \"./document/document-attributes\";\nimport type { DocumentAttributeNamespace } from \"./document/document-attributes\";\n\n/**\n * Simple data structure for a header or footer entry.\n *\n * Replaces HeaderWrapper/FooterWrapper — holds children, relationships,\n * and the reference ID needed for section property references.\n *\n * Children are raw SectionChild objects (plain JSON or class instances).\n */\nexport interface HeaderFooterEntry {\n children: SectionChild[];\n relationships: Relationships;\n referenceId: number;\n}\n\n/**\n * Namespace keys used by header elements.\n * @internal\n */\nexport const HEADER_NAMESPACES: DocumentAttributeNamespace[] = [\n \"cx\",\n \"cx1\",\n \"cx2\",\n \"cx3\",\n \"cx4\",\n \"cx5\",\n \"cx6\",\n \"cx7\",\n \"cx8\",\n \"m\",\n \"mc\",\n \"o\",\n \"r\",\n \"v\",\n \"w\",\n \"w10\",\n \"w14\",\n \"w15\",\n \"w16cid\",\n \"w16se\",\n \"wne\",\n \"wp\",\n \"wp14\",\n \"wpc\",\n \"wpg\",\n \"wpi\",\n \"wps\",\n];\n\n/**\n * Namespace keys used by footer elements.\n * @internal\n */\nexport const FOOTER_NAMESPACES: DocumentAttributeNamespace[] = [\n \"m\",\n \"mc\",\n \"o\",\n \"r\",\n \"v\",\n \"w\",\n \"w10\",\n \"w14\",\n \"w15\",\n \"wne\",\n \"wp\",\n \"wp14\",\n \"wpc\",\n \"wpg\",\n \"wpi\",\n \"wps\",\n];\n\n/**\n * Serialize a header or footer to XML.\n *\n * Builds the `<w:hdr>` or `<w:ftr>` element with namespace declarations,\n * then serializes each child element via `stringifyBodyChild()`.\n *\n * @param tag - Element tag name (\"w:hdr\" or \"w:ftr\")\n * @param namespaces - Namespace keys to declare on the root element\n * @param children - Block-level child elements (raw SectionChild objects)\n * @param ctx - Body context for stringification\n */\nexport function stringifyHeaderFooter(\n tag: string,\n namespaces: DocumentAttributeNamespace[],\n children: SectionChild[],\n ctx: BodyContext,\n): string {\n const attrParts: string[] = [];\n for (const ns of namespaces) {\n attrParts.push(`xmlns:${ns}=\"${escapeXml(DocumentAttributeNamespaces[ns])}\"`);\n }\n const attrStr = attrParts.join(\" \");\n\n const childParts: string[] = [];\n for (const child of children) {\n childParts.push(stringifyBodyChild(child, ctx));\n }\n\n const body = childParts.join(\"\");\n return body.length === 0 ? `<${tag} ${attrStr}/>` : `<${tag} ${attrStr}>${body}</${tag}>`;\n}\n","/**\n * DOCX document compiler — pure function entry point.\n *\n * compileDocument() accepts DocumentOptions directly,\n * creates a DocxWriteContext internally, and produces a Zippable result.\n * All XML parts are produced via descriptors or serialize() —\n * no Formatter dependency.\n *\n * @module\n */\n\nimport {\n addSmartArtRelationships,\n findAndReplaceImagePlaceholders,\n formatId,\n hasPlaceholders,\n replaceAllPlaceholders,\n replaceNumberingPlaceholders,\n} from \"@office-open/core\";\nimport type { XmlifyedFile, ZipOptions, Zippable } from \"@office-open/core\";\nimport { APP_PROPS_XML } from \"@office-open/core\";\nimport {\n DEFAULT_DRAWING_XML,\n getColorXml,\n getLayoutXml,\n getStyleXml,\n} from \"@office-open/core/smartart\";\nimport type { DocumentOptions } from \"@parts/core-properties\";\nimport { obfuscate } from \"@parts/fonts/obfuscate-ttf-to-odttf\";\nimport { HEADER_NAMESPACES, FOOTER_NAMESPACES, stringifyHeaderFooter } from \"@parts/header-footer\";\n\nimport { stringifyDocumentXml, stringifyBodyChild, type BodyContext } from \"./body\";\nimport { DocxWriteContext } from \"./context\";\nimport {\n corePropertiesDesc,\n customPropertiesDesc,\n contentTypesDesc,\n buildContentTypes,\n fontTableDesc,\n webSettingsDesc,\n commentsDesc,\n bibliographyDesc,\n settingsDesc,\n footnotesDesc,\n endnotesDesc,\n glossaryDesc,\n} from \"./parts\";\n\n/** Reusable TextEncoder (stateless, safe to share). */\nconst encoder = new TextEncoder();\n\n/** XML declaration prepended to every OOXML part. */\nconst XML_DECL = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>';\n\n/** Extended context for header/footer formatted view caching. */\ntype DocxContext = BodyContext & {\n headerFormattedViews?: Map<number, string>;\n footerFormattedViews?: Map<number, string>;\n};\n\n// ── Public API ──\n\n/**\n * Compile document options into a flat file map suitable for fflate zipSync.\n *\n * This is the primary entry point for DOCX generation — accepts DocumentOptions\n * directly.\n */\nexport function compileDocument(\n options: DocumentOptions,\n overrides: XmlifyedFile[] = [],\n mediaLevel: number = 0,\n): Zippable {\n const ctx = new DocxWriteContext(options);\n const files: Zippable = {};\n\n const headerFormattedViews = new Map<number, string>();\n const footerFormattedViews = new Map<number, string>();\n\n const xmlifiedFileMapping = xmlifyContext(ctx, headerFormattedViews, footerFormattedViews);\n const map = new Map<string, XmlifyedFile | XmlifyedFile[]>(Object.entries(xmlifiedFileMapping));\n\n for (const [, obj] of map) {\n if (Array.isArray(obj)) {\n for (const subFile of obj as XmlifyedFile[]) {\n files[subFile.path] =\n typeof subFile.data === \"string\" ? encoder.encode(subFile.data) : subFile.data;\n }\n } else {\n const fileObj = obj as XmlifyedFile;\n files[fileObj.path] =\n typeof fileObj.data === \"string\" ? encoder.encode(fileObj.data) : fileObj.data;\n }\n }\n\n for (const subFile of overrides) {\n files[subFile.path] =\n typeof subFile.data === \"string\" ? encoder.encode(subFile.data) : subFile.data;\n }\n\n // Media files\n const mediaArray = ctx.media.array;\n for (const mediaData of mediaArray) {\n files[`word/media/${mediaData.fileName}`] = [\n mediaData.data as Uint8Array,\n { level: mediaLevel as ZipOptions[\"level\"] },\n ];\n if (mediaData.type === \"svg\") {\n files[`word/media/${mediaData.fallback.fileName}`] = [\n mediaData.fallback.data as Uint8Array,\n { level: mediaLevel as ZipOptions[\"level\"] },\n ];\n }\n }\n\n // Font files\n for (const { data: buffer, name, fontKey } of ctx.fontTable.fontOptionsWithKey) {\n const [nameWithoutExtension] = name.split(\".\");\n files[`word/fonts/${nameWithoutExtension}.odttf`] = obfuscate(buffer, fontKey);\n }\n\n return files;\n}\n\n// ── Internal ──\n\n/**\n * Complete mapping of all XML files in an OOXML document package.\n */\ninterface XmlifyedFileMapping {\n Document: XmlifyedFile;\n Styles: XmlifyedFile;\n Properties: XmlifyedFile;\n Numbering: XmlifyedFile;\n Relationships: XmlifyedFile;\n FileRelationships: XmlifyedFile;\n Headers: XmlifyedFile[];\n Footers: XmlifyedFile[];\n HeaderRelationships: XmlifyedFile[];\n FooterRelationships: XmlifyedFile[];\n ContentTypes: XmlifyedFile;\n CustomProperties: XmlifyedFile;\n AppProperties: XmlifyedFile;\n FootNotes: XmlifyedFile;\n FootNotesRelationships: XmlifyedFile;\n Endnotes: XmlifyedFile;\n EndnotesRelationships: XmlifyedFile;\n Settings: XmlifyedFile;\n Comments?: XmlifyedFile;\n CommentsRelationships?: XmlifyedFile;\n FontTable?: XmlifyedFile;\n FontTableRelationships?: XmlifyedFile;\n Bibliography?: XmlifyedFile;\n Charts?: XmlifyedFile[];\n DiagramData?: XmlifyedFile[];\n DiagramLayout?: XmlifyedFile[];\n DiagramStyle?: XmlifyedFile[];\n DiagramColors?: XmlifyedFile[];\n DiagramDrawing?: XmlifyedFile[];\n AltChunks?: XmlifyedFile[];\n SubDocs?: XmlifyedFile[];\n Glossary?: XmlifyedFile;\n WebSettings?: XmlifyedFile;\n}\n\nfunction xmlifyContext(\n ctx: DocxWriteContext,\n headerFormattedViews: Map<number, string>,\n footerFormattedViews: Map<number, string>,\n): XmlifyedFileMapping {\n const mkCtx = (viewWrapper: DocxContext[\"viewWrapper\"] = ctx.document): DocxContext => ({\n fileData: ctx,\n file: ctx,\n viewWrapper,\n stringifyChild: stringifyBodyChild,\n addRelationship: (type: string, target: string, mode?: string) =>\n ctx.addRelationship(type, target, mode),\n addMedia: (data: Uint8Array, type: string) => ctx.addMedia(data, type),\n });\n\n const documentRelationshipCount = ctx.document.relationships.relationshipCount + 1;\n const docCtx = mkCtx(ctx.document);\n const documentXmlData = XML_DECL + stringifyDocumentXml(ctx, docCtx);\n\n const commentRelationshipCount = ctx.comments.relationships.relationshipCount + 1;\n const commentCtx = mkCtx({ relationships: ctx.comments.relationships });\n const commentXmlData =\n XML_DECL + commentsDesc.stringify(ctx._options.comments ?? { children: [] }, commentCtx);\n\n const footnoteRelationshipCount = ctx.footNotes.relationships.relationshipCount + 1;\n const footnoteCtx = mkCtx({\n relationships: ctx.footNotes.relationships,\n });\n const footnoteXmlData =\n XML_DECL + (footnotesDesc.stringify({ notes: ctx.footNotes.notes }, footnoteCtx) ?? \"\");\n\n const documentMedia = findAndReplaceImagePlaceholders(\n documentXmlData,\n ctx.media.array,\n documentRelationshipCount,\n );\n const commentMedia = findAndReplaceImagePlaceholders(\n commentXmlData,\n ctx.media.array,\n commentRelationshipCount,\n );\n const footnoteMedia = findAndReplaceImagePlaceholders(\n footnoteXmlData,\n ctx.media.array,\n footnoteRelationshipCount,\n );\n\n return {\n AppProperties: {\n data: XML_DECL + APP_PROPS_XML,\n path: \"docProps/app.xml\",\n },\n Comments: {\n data: (() => {\n const xmlData = commentMedia.referenced.length > 0 ? commentMedia.xml : commentXmlData;\n return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/comments.xml\",\n },\n CommentsRelationships: {\n data: (() => {\n for (let i = 0; i < commentMedia.referenced.length; i++) {\n ctx.comments.relationships.addRelationship(\n commentRelationshipCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${commentMedia.referenced[i].fileName}`,\n );\n }\n return XML_DECL + ctx.comments.relationships.serialize();\n })(),\n path: \"word/_rels/comments.xml.rels\",\n },\n ContentTypes: {\n data:\n XML_DECL +\n (contentTypesDesc.stringify(\n buildContentTypes({\n headerCount: ctx.headers.length,\n footerCount: ctx.footers.length,\n chartCount: ctx.charts.array.length,\n smartArtCount: ctx.smartArts.array.length,\n hasBibliography: !!ctx._options.bibliography,\n hasGlossary: !!ctx.glossaryOptions,\n hasWebSettings: !!ctx.webSettings,\n altChunks: ctx.altChunks.array.map((ac) => ({\n path: `/word/${ac.path}`,\n contentType: ac.contentType ?? \"application/xhtml+xml\",\n })),\n subDocs: ctx.subDocs.array.map((sd) => ({ path: `/word/${sd.path}` })),\n }),\n ctx,\n ) ?? \"\"),\n path: \"[Content_Types].xml\",\n },\n CustomProperties: {\n data:\n XML_DECL +\n (customPropertiesDesc.stringify({ properties: ctx._options.customProperties ?? [] }, ctx) ??\n \"\"),\n path: \"docProps/custom.xml\",\n },\n Document: {\n data: (() => {\n let xmlData = documentMedia.referenced.length > 0 ? documentMedia.xml : documentXmlData;\n if (hasPlaceholders(xmlData)) {\n const mediaCount = documentMedia.referenced.length;\n const chartKeys = ctx.charts.array.map((c) => c.key);\n const smartArtKeys = ctx.smartArts.array.map((s) => s.key);\n const chartOffset = documentRelationshipCount + mediaCount;\n const smartArtOffset = chartOffset + chartKeys.length;\n\n // Build combined replacement entries for charts, smartart, and numbering\n const entries: Array<{ prefix?: string; key: string; value: string }> = [];\n for (let i = 0; i < chartKeys.length; i++) {\n entries.push({\n prefix: \"chart:\",\n key: chartKeys[i],\n value: formatId(chartOffset, i, \"rId\"),\n });\n }\n const saPrefixes = [\"smartart:\", \"smartart-lo:\", \"smartart-qs:\", \"smartart-cs:\"];\n for (let i = 0; i < smartArtKeys.length; i++) {\n for (let p = 0; p < saPrefixes.length; p++) {\n entries.push({\n prefix: saPrefixes[p],\n key: smartArtKeys[i],\n value: formatId(smartArtOffset + p * smartArtKeys.length, i, \"rId\"),\n });\n }\n }\n for (const { reference, instance, numId } of ctx.numbering.concreteNumbering) {\n entries.push({ key: `${reference}-${instance}`, value: numId.toString() });\n }\n xmlData = replaceAllPlaceholders(xmlData, entries);\n } else {\n xmlData = replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n }\n return xmlData;\n })(),\n path: \"word/document.xml\",\n },\n Endnotes: {\n data: (() => {\n const endnoteCtx = mkCtx({\n relationships: ctx.endnotes.relationships,\n });\n const xmlData =\n XML_DECL + (endnotesDesc.stringify({ notes: ctx.endnotes.notes }, endnoteCtx) ?? \"\");\n const endnoteRelCount = ctx.endnotes.relationships.relationshipCount + 1;\n const endnoteMedia = findAndReplaceImagePlaceholders(\n xmlData,\n ctx.media.array,\n endnoteRelCount,\n );\n if (endnoteMedia.referenced.length > 0) {\n for (let i = 0; i < endnoteMedia.referenced.length; i++) {\n ctx.endnotes.relationships.addRelationship(\n endnoteRelCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${endnoteMedia.referenced[i].fileName}`,\n );\n }\n return replaceNumberingPlaceholders(endnoteMedia.xml, ctx.numbering.concreteNumbering);\n }\n return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/endnotes.xml\",\n },\n EndnotesRelationships: {\n data: XML_DECL + ctx.endnotes.relationships.serialize(),\n path: \"word/_rels/endnotes.xml.rels\",\n },\n FileRelationships: {\n data: XML_DECL + ctx.fileRelationships.serialize(),\n path: \"_rels/.rels\",\n },\n FontTable: {\n data:\n XML_DECL +\n (fontTableDesc.stringify({ fonts: ctx.fontTable.fontOptionsWithKey }, ctx) ?? \"\"),\n path: \"word/fontTable.xml\",\n },\n FontTableRelationships: {\n data: XML_DECL + ctx.fontTable.relationships.serialize(),\n path: \"word/_rels/fontTable.xml.rels\",\n },\n FootNotes: {\n data: (() => {\n const xmlData = footnoteMedia.referenced.length > 0 ? footnoteMedia.xml : footnoteXmlData;\n return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/footnotes.xml\",\n },\n FootNotesRelationships: {\n data: (() => {\n for (let i = 0; i < footnoteMedia.referenced.length; i++) {\n ctx.footNotes.relationships.addRelationship(\n footnoteRelationshipCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${footnoteMedia.referenced[i].fileName}`,\n );\n }\n return XML_DECL + ctx.footNotes.relationships.serialize();\n })(),\n path: \"word/_rels/footnotes.xml.rels\",\n },\n FooterRelationships: ctx.footers.map((entry, index) => {\n const footerCtx = mkCtx({ relationships: entry.relationships });\n const xmlData =\n XML_DECL + stringifyHeaderFooter(\"w:ftr\", FOOTER_NAMESPACES, entry.children, footerCtx);\n footerFormattedViews.set(index, xmlData);\n const footerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0);\n\n for (let i = 0; i < footerMedia.referenced.length; i++) {\n entry.relationships.addRelationship(\n i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${footerMedia.referenced[i].fileName}`,\n );\n }\n\n return {\n data: XML_DECL + entry.relationships.serialize(),\n path: `word/_rels/footer${index + 1}.xml.rels`,\n };\n }),\n Footers: ctx.footers.map((_entry, index) => {\n const tempXmlData = footerFormattedViews.get(index)!;\n const footerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0);\n const xmlData = footerMedia.referenced.length > 0 ? footerMedia.xml : tempXmlData;\n\n return {\n data: replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering),\n path: `word/footer${index + 1}.xml`,\n };\n }),\n HeaderRelationships: ctx.headers.map((entry, index) => {\n const headerCtx = mkCtx({ relationships: entry.relationships });\n const xmlData =\n XML_DECL + stringifyHeaderFooter(\"w:hdr\", HEADER_NAMESPACES, entry.children, headerCtx);\n headerFormattedViews.set(index, xmlData);\n const headerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0);\n\n for (let i = 0; i < headerMedia.referenced.length; i++) {\n entry.relationships.addRelationship(\n i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${headerMedia.referenced[i].fileName}`,\n );\n }\n\n return {\n data: XML_DECL + entry.relationships.serialize(),\n path: `word/_rels/header${index + 1}.xml.rels`,\n };\n }),\n Headers: ctx.headers.map((_entry, index) => {\n const tempXmlData = headerFormattedViews.get(index)!;\n const headerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0);\n const xmlData = headerMedia.referenced.length > 0 ? headerMedia.xml : tempXmlData;\n\n return {\n data: replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering),\n path: `word/header${index + 1}.xml`,\n };\n }),\n Numbering: {\n data: ctx.numbering.serialize(),\n path: \"word/numbering.xml\",\n },\n Properties: {\n data: XML_DECL + (corePropertiesDesc.stringify(ctx._options, ctx) ?? \"\"),\n path: \"docProps/core.xml\",\n },\n Relationships: {\n data: (() => {\n for (let i = 0; i < documentMedia.referenced.length; i++) {\n ctx.document.relationships.addRelationship(\n documentRelationshipCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${documentMedia.referenced[i].fileName}`,\n );\n }\n\n const chartOffset = documentRelationshipCount + documentMedia.referenced.length;\n for (let i = 0; i < ctx.charts.array.length; i++) {\n ctx.document.relationships.addRelationship(\n chartOffset + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\",\n `charts/chart${i + 1}.xml`,\n );\n }\n\n addSmartArtRelationships(\n ctx.smartArts.array.map((s) => s.key),\n (id, type, target) => {\n ctx.document.relationships.addRelationship(id, type, target);\n },\n documentRelationshipCount + documentMedia.referenced.length + ctx.charts.array.length,\n 0,\n {\n pathPrefix: \"\",\n styleRelType: \"http://schemas.microsoft.com/office/2007/relationships/diagramStyle\",\n },\n );\n\n ctx.document.relationships.addRelationship(\n ctx.document.relationships.relationshipCount + 1,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable\",\n \"fontTable.xml\",\n );\n\n return XML_DECL + ctx.document.relationships.serialize();\n })(),\n path: \"word/_rels/document.xml.rels\",\n },\n Settings: {\n data: XML_DECL + (settingsDesc.stringify(ctx._settingsOptions, ctx) ?? \"\"),\n path: \"word/settings.xml\",\n },\n Styles: {\n data: (() => {\n const xmlStyles = ctx.styles.serialize();\n return replaceNumberingPlaceholders(xmlStyles, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/styles.xml\",\n },\n ...(ctx._options.bibliography\n ? {\n Bibliography: {\n data: XML_DECL + (bibliographyDesc.stringify(ctx._options.bibliography, ctx) ?? \"\"),\n path: \"word/bibliography.xml\",\n },\n }\n : {}),\n ...(ctx.charts.array.length > 0\n ? {\n Charts: ctx.charts.array.flatMap((chartData, i) => [\n {\n data: XML_DECL + chartData.chartSpaceXml,\n path: `word/charts/chart${i + 1}.xml`,\n },\n {\n data: '<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"/>',\n path: `word/charts/_rels/chart${i + 1}.xml.rels`,\n },\n ]),\n }\n : {}),\n ...(ctx.smartArts.array.length > 0\n ? {\n DiagramData: ctx.smartArts.array.map((smartArtData, i) => ({\n data: XML_DECL + smartArtData.dataModelXml,\n path: `word/diagrams/data${i + 1}.xml`,\n })),\n DiagramLayout: ctx.smartArts.array.map((smartArtData, i) => ({\n data: getLayoutXml(smartArtData.layout),\n path: `word/diagrams/layout${i + 1}.xml`,\n })),\n DiagramStyle: ctx.smartArts.array.map((smartArtData, i) => ({\n data: getStyleXml(smartArtData.style),\n path: `word/diagrams/quickStyle${i + 1}.xml`,\n })),\n DiagramColors: ctx.smartArts.array.map((smartArtData, i) => ({\n data: getColorXml(smartArtData.color),\n path: `word/diagrams/colors${i + 1}.xml`,\n })),\n DiagramDrawing: ctx.smartArts.array.map((_, i) => ({\n data: DEFAULT_DRAWING_XML,\n path: `word/diagrams/drawing${i + 1}.xml`,\n })),\n }\n : {}),\n ...(ctx.altChunks.array.length > 0\n ? {\n AltChunks: ctx.altChunks.array.map((altChunkData) => ({\n data: altChunkData.data,\n path: `word/${altChunkData.path}`,\n })),\n }\n : {}),\n ...(ctx.subDocs.array.length > 0\n ? {\n SubDocs: ctx.subDocs.array.map((subDocData) => ({\n data: subDocData.data,\n path: `word/${subDocData.path}`,\n })),\n }\n : {}),\n ...(ctx.glossaryOptions\n ? {\n Glossary: {\n data: (() => {\n const glossaryCtx = mkCtx(undefined);\n return XML_DECL + (glossaryDesc.stringify(ctx.glossaryOptions!, glossaryCtx) ?? \"\");\n })(),\n path: \"word/glossary/document.xml\",\n },\n }\n : {}),\n ...(ctx.webSettings\n ? {\n WebSettings: {\n data: XML_DECL + (webSettingsDesc.stringify(ctx._options.webSettings ?? {}, ctx) ?? \"\"),\n path: \"word/webSettings.xml\",\n },\n }\n : {}),\n };\n}\n","/**\n * Pure function API for generating DOCX files.\n *\n * @module\n */\n\nimport { createPacker, OoxmlMimeType } from \"@office-open/core\";\nimport type { OutputByType, OutputType, PackerOptions } from \"@office-open/core\";\nimport type { DocumentOptions } from \"@parts/core-properties\";\n\nimport { compileDocument } from \"./compiler\";\n\n/** @internal Packer instance for DOCX generation. */\nconst Packer = createPacker<DocumentOptions>({\n compile: (options, overrides, mediaLevel) => compileDocument(options, overrides, mediaLevel),\n mimeType: OoxmlMimeType.DOCX,\n});\n\n/**\n * Generate a DOCX file from pure JSON options.\n *\n * The output format is controlled by `packerOptions.type` (default: `\"nodebuffer\"` → Buffer).\n * For synchronous generation, use {@link generateDocumentSync}. For streaming, use {@link generateDocumentStream}.\n *\n * @param options - Document options (sections, styles, numbering, etc.)\n * @param packerOptions - Optional packer configuration (type, compression, overrides, etc.)\n *\n * @example\n * ```typescript\n * import { generateDocument } from \"@office-open/docx\";\n *\n * const buffer = await generateDocument({ sections: [...] });\n * const bytes = await generateDocument({ sections: [...] }, { type: \"uint8array\" });\n * const blob = await generateDocument({ sections: [...] }, { type: \"blob\" });\n * ```\n */\nexport function generateDocument<T extends OutputType = \"nodebuffer\">(\n options: DocumentOptions,\n packerOptions?: PackerOptions<T>,\n): Promise<OutputByType[T]> {\n return Packer.pack(options, packerOptions) as Promise<OutputByType[T]>;\n}\n\n/**\n * Synchronously generate a DOCX file from pure JSON options.\n */\nexport function generateDocumentSync<T extends OutputType = \"nodebuffer\">(\n options: DocumentOptions,\n packerOptions?: PackerOptions<T>,\n): OutputByType[T] {\n return Packer.packSync(options, packerOptions) as OutputByType[T];\n}\n\n/**\n * Generate a DOCX file as a `ReadableStream<Uint8Array>`.\n */\nexport function generateDocumentStream(\n options: DocumentOptions,\n packerOptions?: PackerOptions,\n): ReadableStream<Uint8Array> {\n return Packer.toStream(options, packerOptions);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,MAAM,wBAAwB;;AAE9B,MAAM,sBAAsB;;AAE5B,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;AAuBjB,MAAa,aAAa,KAAiB,YAAgC;CACzE,MAAM,OAAO,QAAQ,QAAQ,MAAM,EAAE;CACrC,IAAI,KAAK,WAAW,UAClB,MAAM,IAAI,MAAM,kDAAkD,SAAS;CAI7E,MAAM,aADa,KAAK,QAAQ,SAAS,KAAK,EAAE,KAAK,EAAE,MAAM,GACjC,EAAE,KAAK,cAAc,SAAS,WAAW,EAAE,CAAC;CACxE,WAAW,QAAQ;CAGnB,MAAM,kBADmB,IAAI,MAAM,uBAAuB,mBACnB,EAAE,KACtC,MAAM,MAAM,OAAO,WAAW,IAAI,WAAW,OAChD;CAEA,MAAM,MAAM,IAAI,WACd,wBAAwB,gBAAgB,SAAS,KAAK,IAAI,GAAG,IAAI,SAAS,mBAAmB,CAC/F;CACA,IAAI,IAAI,IAAI,MAAM,GAAG,qBAAqB,CAAC;CAC3C,IAAI,IAAI,iBAAiB,qBAAqB;CAC9C,IAAI,IAAI,IAAI,MAAM,mBAAmB,GAAG,wBAAwB,gBAAgB,MAAM;CACtF,OAAO;AACT;;;;;;;ACxBA,MAAa,oBAAkD;CAC7D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;AAMA,MAAa,oBAAkD;CAC7D;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AAaA,SAAgB,sBACd,KACA,YACA,UACA,KACQ;CACR,MAAM,YAAsB,CAAC;CAC7B,KAAK,MAAM,MAAM,YACf,UAAU,KAAK,SAAS,GAAG,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ACJ,EACE,aAAa;GACX,MAAM,YAAY,gBAAgB,UAAU,IAAI,SAAS,eAAe,CAAC,GAAG,GAAG,KAAK;GACpF,MAAM;EACR,EACF,IACA,CAAC;CACP;AACF;;;;;;;;;ACjjBA,MAAM,SAAS,aAA8B;CAC3C,UAAU,SAAS,WAAW,eAAe,gBAAgB,SAAS,WAAW,UAAU;CAC3F,UAAU,cAAc;AAC1B,CAAC;;;;;;;;;;;;;;;;;;;AAoBD,SAAgB,iBACd,SACA,eAC0B;CAC1B,OAAO,OAAO,KAAK,SAAS,aAAa;AAC3C;;;;AAKA,SAAgB,qBACd,SACA,eACiB;CACjB,OAAO,OAAO,SAAS,SAAS,aAAa;AAC/C;;;;AAKA,SAAgB,uBACd,SACA,eAC4B;CAC5B,OAAO,OAAO,SAAS,SAAS,aAAa;AAC/C"} |
| import { A as footnotesDesc, B as settingsDesc, C as fontTableDesc, H as buildNumberingCache, I as parseToc, K as parseNumberingDefinitions, M as parseParagraphProperties, O as parseSdtBlock, S as bibliographyDesc, U as buildStyleCache, W as parseStyleDefinitions, _ as commentsDesc, c as corePropertiesDesc, f as setBodyParseChild, g as contentTypesDesc, j as parseParagraph, k as endnotesDesc, o as webSettingsDesc, s as customPropertiesDesc, t as DocxReadContext, x as glossaryDesc } from "./context-CERMOUn0.mjs"; | ||
| import { E as tableDesc, T as setTableParseChild, t as parseSectionPropertiesEl } from "./document-CeM-U6J3.mjs"; | ||
| import { parseArchive, toUint8Array } from "@office-open/core"; | ||
| import { attr, findChild, stringify } from "@office-open/xml"; | ||
| //#region src/parts/alt-chunk/alt-chunk-parse.ts | ||
| /** | ||
| * AltChunk parser for DOCX documents. | ||
| * | ||
| * Parses w:altChunk elements and extracts embedded content from the ZIP. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse a w:altChunk element into AltChunkOptions. | ||
| * Reads the referenced data from the ZIP package. | ||
| */ | ||
| function parseAltChunk(el, ctx) { | ||
| const rId = attr(el, "r:id"); | ||
| if (!rId) throw new Error("w:altChunk missing r:id attribute"); | ||
| const path = ctx.docx.partRefs.afChunks.get(rId); | ||
| if (!path) throw new Error(`AltChunk relationship ${rId} not found`); | ||
| const data = ctx.docx.doc.getRaw(path); | ||
| if (!data) throw new Error(`AltChunk data not found at ${path}`); | ||
| const ext = path.split(".").pop() ?? "txt"; | ||
| let contentType; | ||
| let extension; | ||
| switch (ext) { | ||
| case "html": | ||
| contentType = "text/html"; | ||
| extension = "html"; | ||
| break; | ||
| case "rtf": | ||
| contentType = "application/rtf"; | ||
| extension = "rtf"; | ||
| break; | ||
| default: | ||
| contentType = "text/plain"; | ||
| extension = "txt"; | ||
| break; | ||
| } | ||
| return { | ||
| data, | ||
| contentType, | ||
| extension | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region src/parts/custom-xml/custom-xml-parse.ts | ||
| /** | ||
| * Parser for custom XML block elements (w:customXml). | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse w:customXml element into CustomXmlBlockOptions. | ||
| * | ||
| * Uses a callback for child parsing to avoid circular dependencies | ||
| * (same pattern as parseTable). | ||
| */ | ||
| function parseCustomXmlBlock(el, ctx, parseChild) { | ||
| const opts = {}; | ||
| const element = attr(el, "w:element"); | ||
| if (element) opts.element = element; | ||
| const uri = attr(el, "w:uri"); | ||
| if (uri) opts.uri = uri; | ||
| const xmlPr = findChild(el, "w:customXmlPr"); | ||
| if (xmlPr) opts.customXmlPr = parseCustomXmlPr(xmlPr); | ||
| const children = []; | ||
| for (const child of el.elements ?? []) { | ||
| if (child.name === "w:customXmlPr") continue; | ||
| const parsed = parseChild(child, ctx); | ||
| children.push(parsed); | ||
| } | ||
| if (children.length > 0) opts.children = children; | ||
| return opts; | ||
| } | ||
| function parseCustomXmlPr(el) { | ||
| const opts = {}; | ||
| const placeholder = findChild(el, "w:placeholder"); | ||
| if (placeholder) { | ||
| const val = attr(placeholder, "w:val"); | ||
| if (val) opts.placeholder = val; | ||
| } | ||
| const attributes = []; | ||
| for (const child of el.elements ?? []) { | ||
| if (child.name !== "w:attr") continue; | ||
| const name = attr(child, "w:name"); | ||
| const val = attr(child, "w:val"); | ||
| if (name && val) { | ||
| const attrOpts = { | ||
| name, | ||
| val | ||
| }; | ||
| const uriVal = attr(child, "w:uri"); | ||
| if (uriVal) attrOpts.uri = uriVal; | ||
| attributes.push(attrOpts); | ||
| } | ||
| } | ||
| if (attributes.length > 0) opts.attributes = attributes; | ||
| return opts; | ||
| } | ||
| //#endregion | ||
| //#region src/parts/sub-doc/sub-doc-parse.ts | ||
| /** | ||
| * SubDoc parser for DOCX documents. | ||
| * | ||
| * Parses w:subDoc elements and extracts embedded document data. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse a w:subDoc element into SubDocOptions. | ||
| * Reads the referenced document data from the ZIP package. | ||
| */ | ||
| function parseSubDoc(el, ctx) { | ||
| const rId = attr(el, "r:id"); | ||
| if (!rId) throw new Error("w:subDoc missing r:id attribute"); | ||
| const path = ctx.docx.partRefs.subDocs.get(rId); | ||
| if (!path) throw new Error(`SubDoc relationship ${rId} not found`); | ||
| const data = ctx.docx.doc.getRaw(path); | ||
| if (!data) throw new Error(`SubDoc data not found at ${path}`); | ||
| return { data }; | ||
| } | ||
| //#endregion | ||
| //#region src/parts/textbox/textbox-parse.ts | ||
| /** | ||
| * Textbox parser for DOCX documents. | ||
| * | ||
| * Parses w:pict → v:shape → v:textbox → w:txbxContent elements. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse VML shape style string into VmlShapeStyle-like object. | ||
| */ | ||
| function parseVmlStyle(styleStr) { | ||
| const style = {}; | ||
| for (const part of styleStr.split(";")) { | ||
| const [key, val] = part.split(":").map((s) => s.trim()); | ||
| if (key && val) style[key] = val; | ||
| } | ||
| return style; | ||
| } | ||
| /** | ||
| * Parse a w:pict element that contains a textbox. | ||
| * Returns an object suitable for the { textbox: ... } SectionChild variant. | ||
| */ | ||
| function parseTextbox(el, ctx, parseChildren) { | ||
| const shape = findDeep$1(el, "v:shape")[0]; | ||
| if (!shape) return {}; | ||
| const opts = {}; | ||
| const styleAttr = attr(shape, "style"); | ||
| if (styleAttr) opts.style = parseVmlStyle(styleAttr); | ||
| const textbox = findDeep$1(shape, "v:textbox")[0]; | ||
| if (textbox) { | ||
| const txbxContent = findChild(textbox, "w:txbxContent"); | ||
| if (txbxContent) { | ||
| const childList = parseChildren(txbxContent.elements ?? [], ctx); | ||
| if (childList.length > 0) opts.children = childList; | ||
| } | ||
| } | ||
| return opts; | ||
| } | ||
| function findDeep$1(parent, name) { | ||
| const result = []; | ||
| for (const child of parent.elements ?? []) { | ||
| if (child.name === name) result.push(child); | ||
| result.push(...findDeep$1(child, name)); | ||
| } | ||
| return result; | ||
| } | ||
| //#endregion | ||
| //#region src/parse/body.ts | ||
| /** | ||
| * Body parser for DOCX documents. | ||
| * | ||
| * Parses w:body → SectionOptions[] by splitting at w:sectPr boundaries. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse w:sectPr element into SectionPropertiesOptions. | ||
| * Delegates to the section properties descriptor's parse method. | ||
| */ | ||
| function parseSectionProperties(el, ctx) { | ||
| const opts = parseSectionPropertiesEl(el); | ||
| const headerRefs = {}; | ||
| const footerRefs = {}; | ||
| for (const child of el.elements ?? []) { | ||
| if (child.name === "w:headerReference") { | ||
| const rId = attr(child, "r:id"); | ||
| const type = attr(child, "w:type"); | ||
| if (rId && type) { | ||
| const headerChildren = parseHeaderFooterRef(rId, ctx); | ||
| if (headerChildren) headerRefs[type] = headerChildren; | ||
| } | ||
| } | ||
| if (child.name === "w:footerReference") { | ||
| const rId = attr(child, "r:id"); | ||
| const type = attr(child, "w:type"); | ||
| if (rId && type) { | ||
| const footerChildren = parseHeaderFooterRef(rId, ctx); | ||
| if (footerChildren) footerRefs[type] = footerChildren; | ||
| } | ||
| } | ||
| } | ||
| if (Object.keys(headerRefs).length > 0) opts.parsedHeaders = headerRefs; | ||
| if (Object.keys(footerRefs).length > 0) opts.parsedFooters = footerRefs; | ||
| return opts; | ||
| } | ||
| /** | ||
| * Parse a header/footer reference by following the relationship to its XML part. | ||
| */ | ||
| function parseHeaderFooterRef(rId, ctx) { | ||
| const path = ctx.docx.partRefs.headers.get(rId) ?? ctx.docx.partRefs.footers.get(rId); | ||
| if (!path) return void 0; | ||
| const partEl = ctx.docx.doc.get(path); | ||
| if (!partEl) return void 0; | ||
| const children = []; | ||
| for (const child of partEl.elements ?? []) { | ||
| const sectionChild = parseSectionChild(child, ctx); | ||
| if (sectionChild !== void 0) children.push(sectionChild); | ||
| } | ||
| return children.length > 0 ? children : void 0; | ||
| } | ||
| /** | ||
| * Parse a single body child element into a SectionChild. | ||
| */ | ||
| function parseSectionChild(el, ctx) { | ||
| switch (el.name) { | ||
| case "w:p": { | ||
| const pict = findChild(el, "w:pict"); | ||
| if (pict) { | ||
| if (findDeepElement(pict, "v:textbox")) return { textbox: parseTextbox(pict, ctx, parseSectionChildrenElements) }; | ||
| } | ||
| return { paragraph: parseParagraph(el, ctx) }; | ||
| } | ||
| case "w:tbl": return { table: tableDesc.parse(el, ctx) }; | ||
| case "w:sdt": { | ||
| const tocResult = parseToc(el, ctx); | ||
| if (tocResult) return { toc: tocResult }; | ||
| const sdtResult = parseSdtBlock(el, ctx, parseSectionChildrenElements); | ||
| return { sdt: { | ||
| properties: sdtResult.properties, | ||
| children: sdtResult.children | ||
| } }; | ||
| } | ||
| case "w:altChunk": return { altChunk: parseAltChunk(el, ctx) }; | ||
| case "w:subDoc": return { subDoc: parseSubDoc(el, ctx) }; | ||
| case "w:customXml": return { customXml: parseCustomXmlBlock(el, ctx, parseSectionChild) }; | ||
| default: return { rawXml: stringify(el) }; | ||
| } | ||
| } | ||
| /** | ||
| * Find a deep descendant element by name. | ||
| */ | ||
| function findDeepElement(parent, name) { | ||
| for (const child of parent.elements ?? []) { | ||
| if (child.name === name) return child; | ||
| const found = findDeepElement(child, name); | ||
| if (found) return found; | ||
| } | ||
| } | ||
| /** | ||
| * Parse w:body element into SectionOptions[]. | ||
| * | ||
| * Splits body content at w:sectPr boundaries to create sections. | ||
| * The last w:sectPr (child of w:body directly) defines the last section. | ||
| * Previous w:sectPr elements appear inside w:pPr elements. | ||
| */ | ||
| function parseBody(body, ctx) { | ||
| setBodyParseChild(parseSectionChild); | ||
| const bodyChildren = []; | ||
| const boundaries = []; | ||
| for (const child of body.elements ?? []) if (child.name === "w:sectPr") boundaries.push({ | ||
| index: bodyChildren.length, | ||
| sectPr: child | ||
| }); | ||
| else { | ||
| bodyChildren.push(child); | ||
| if (child.name === "w:p") { | ||
| const pPr = findChild(child, "w:pPr"); | ||
| if (pPr) { | ||
| const sectPr = findChild(pPr, "w:sectPr"); | ||
| if (sectPr) boundaries.push({ | ||
| index: bodyChildren.length, | ||
| sectPr | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| if (boundaries.length === 0) return [{ children: bodyChildren.map((el) => parseSectionChild(el, ctx)) }]; | ||
| const sections = []; | ||
| let start = 0; | ||
| for (let i = 0; i < boundaries.length; i++) { | ||
| const boundary = boundaries[i]; | ||
| const endIdx = i < boundaries.length - 1 ? Math.max(start, boundary.index - 1) : boundary.index; | ||
| const sectionElements = bodyChildren.slice(start, endIdx); | ||
| const parsedProps = parseSectionProperties(boundary.sectPr, ctx); | ||
| const rawProps = parsedProps; | ||
| const parsedHeaders = rawProps.parsedHeaders; | ||
| const parsedFooters = rawProps.parsedFooters; | ||
| const cleanProps = { ...parsedProps }; | ||
| delete cleanProps.parsedHeaders; | ||
| delete cleanProps.parsedFooters; | ||
| const section = { | ||
| children: sectionElements.map((el) => parseSectionChild(el, ctx)), | ||
| properties: cleanProps, | ||
| ...parsedHeaders ? { headers: parsedHeaders } : {}, | ||
| ...parsedFooters ? { footers: parsedFooters } : {} | ||
| }; | ||
| sections.push(section); | ||
| start = boundary.index; | ||
| } | ||
| return sections; | ||
| } | ||
| /** | ||
| * Parse a list of elements into SectionChild[]. | ||
| * Used by SDT and textbox parsers for their content. | ||
| */ | ||
| function parseSectionChildrenElements(elements, ctx) { | ||
| return elements.map((el) => parseSectionChild(el, ctx)); | ||
| } | ||
| //#endregion | ||
| //#region src/parse.ts | ||
| function resolveRelsPath(target) { | ||
| if (target.startsWith("/")) return target.slice(1); | ||
| if (target.startsWith("../")) return target.replace("../", ""); | ||
| return `word/${target}`; | ||
| } | ||
| function parseDocPartRefs(doc) { | ||
| const refs = { | ||
| headers: /* @__PURE__ */ new Map(), | ||
| footers: /* @__PURE__ */ new Map(), | ||
| hyperlinks: /* @__PURE__ */ new Map(), | ||
| charts: /* @__PURE__ */ new Map(), | ||
| diagramData: /* @__PURE__ */ new Map(), | ||
| media: /* @__PURE__ */ new Map(), | ||
| afChunks: /* @__PURE__ */ new Map(), | ||
| subDocs: /* @__PURE__ */ new Map() | ||
| }; | ||
| const relsEl = doc.get("word/_rels/document.xml.rels"); | ||
| if (!relsEl) return refs; | ||
| for (const child of relsEl.elements ?? []) { | ||
| if (child.name !== "Relationship") continue; | ||
| const type = attr(child, "Type") ?? ""; | ||
| const target = attr(child, "Target") ?? ""; | ||
| const id = attr(child, "Id") ?? ""; | ||
| if (!target) continue; | ||
| const path = resolveRelsPath(target); | ||
| if (type.includes("/header")) refs.headers.set(id, path); | ||
| else if (type.includes("/footer")) refs.footers.set(id, path); | ||
| else if (type.includes("/footnotes")) refs.footnotes = path; | ||
| else if (type.includes("/endnotes")) refs.endnotes = path; | ||
| else if (type.includes("/comments")) refs.comments = path; | ||
| else if (type.includes("/chart")) refs.charts.set(id, path); | ||
| else if (type.includes("/diagramData")) refs.diagramData.set(id, path); | ||
| else if (type.includes("/image") || type.includes("/media")) refs.media.set(id, path); | ||
| else if (type.includes("/aFChunk")) refs.afChunks.set(id, path); | ||
| else if (type.includes("/subDocument")) refs.subDocs.set(id, path); | ||
| else if (type.includes("/bibliography")) refs.bibliography = path; | ||
| else if (type.includes("/glossaryDocument")) refs.glossary = path; | ||
| else if (type.includes("/hyperlink")) refs.hyperlinks.set(id, target); | ||
| } | ||
| return refs; | ||
| } | ||
| function parseRootRels(doc) { | ||
| const relsEl = doc.get("_rels/.rels"); | ||
| if (!relsEl) return {}; | ||
| let coreProps; | ||
| let appProps; | ||
| let customProps; | ||
| for (const child of relsEl.elements ?? []) { | ||
| if (child.name !== "Relationship") continue; | ||
| const type = attr(child, "Type") ?? ""; | ||
| const target = attr(child, "Target") ?? ""; | ||
| if (!target) continue; | ||
| const path = target.startsWith("/") ? target.slice(1) : target; | ||
| if (type.includes("/core-properties")) coreProps = path; | ||
| else if (type.includes("/extended-properties")) appProps = path; | ||
| else if (type.includes("/custom-properties")) customProps = path; | ||
| } | ||
| return { | ||
| coreProps, | ||
| appProps, | ||
| customProps | ||
| }; | ||
| } | ||
| /** | ||
| * Parse a .docx file and convert it into DocumentOptions. | ||
| * | ||
| * This is the main public API for parsing DOCX files. | ||
| * The returned options can be passed directly to `new Document(parsed)` | ||
| * to recreate the document. | ||
| * | ||
| * @param data - Raw bytes of a .docx file | ||
| * @returns Document options including sections and metadata | ||
| */ | ||
| function parseDocument(data) { | ||
| const docx = parseDocx(data); | ||
| const ctx = new DocxReadContext(docx, buildStyleCache(docx.styles), buildNumberingCache(docx.numbering)); | ||
| setTableParseChild(parseSectionChild); | ||
| setBodyParseChild(parseSectionChild); | ||
| const opts = { sections: parseBody(docx.body, ctx) }; | ||
| if (docx.background) { | ||
| const bg = {}; | ||
| const color = attr(docx.background, "w:color"); | ||
| if (color) bg.color = color; | ||
| if (Object.keys(bg).length > 0) opts.background = bg; | ||
| } | ||
| if (docx.coreProps) { | ||
| const corePropsEl = docx.doc.get(docx.coreProps); | ||
| if (corePropsEl) { | ||
| const cp = corePropertiesDesc.parse(corePropsEl, ctx); | ||
| if (cp.title) opts.title = cp.title; | ||
| if (cp.subject) opts.subject = cp.subject; | ||
| if (cp.creator) opts.creator = cp.creator; | ||
| if (cp.keywords) opts.keywords = cp.keywords; | ||
| if (cp.description) opts.description = cp.description; | ||
| if (cp.lastModifiedBy) opts.lastModifiedBy = cp.lastModifiedBy; | ||
| if (cp.revision) opts.revision = cp.revision; | ||
| } | ||
| } | ||
| if (docx.settings) Object.assign(opts, settingsDesc.parse(docx.settings, ctx)); | ||
| if (docx.webSettings) { | ||
| const wsOpts = webSettingsDesc.parse(docx.webSettings, ctx); | ||
| if (Object.keys(wsOpts).length > 0) opts.webSettings = wsOpts; | ||
| } | ||
| if (docx.customProps) { | ||
| const customPropsEl = docx.doc.get(docx.customProps); | ||
| if (customPropsEl) { | ||
| const cpResult = customPropertiesDesc.parse(customPropsEl, ctx); | ||
| if (cpResult.properties && cpResult.properties.length > 0) opts.customProperties = cpResult.properties; | ||
| } | ||
| } | ||
| if (docx.partRefs.comments) { | ||
| const commentsEl = docx.doc.get(docx.partRefs.comments); | ||
| if (commentsEl) { | ||
| const children = commentsDesc.parse(commentsEl, ctx).children; | ||
| if (children && children.length > 0) opts.comments = { children }; | ||
| } | ||
| } | ||
| if (docx.partRefs.footnotes) { | ||
| const footnotesEl = docx.doc.get(docx.partRefs.footnotes); | ||
| if (footnotesEl) { | ||
| const fnResult = footnotesDesc.parse(footnotesEl, ctx); | ||
| const footnotesMap = {}; | ||
| for (const [id, paragraphs] of fnResult.notes) footnotesMap[String(id)] = { children: paragraphs }; | ||
| if (Object.keys(footnotesMap).length > 0) opts.footnotes = footnotesMap; | ||
| } | ||
| } | ||
| if (docx.partRefs.endnotes) { | ||
| const endnotesEl = docx.doc.get(docx.partRefs.endnotes); | ||
| if (endnotesEl) { | ||
| const enResult = endnotesDesc.parse(endnotesEl, ctx); | ||
| const endnotesMap = {}; | ||
| for (const [id, paragraphs] of enResult.notes) endnotesMap[String(id)] = { children: paragraphs }; | ||
| if (Object.keys(endnotesMap).length > 0) opts.endnotes = endnotesMap; | ||
| } | ||
| } | ||
| if (docx.styles) { | ||
| const styleOpts = parseStyleDefinitions(docx.styles, parseParagraphProperties, ctx); | ||
| if (styleOpts) opts.styles = styleOpts; | ||
| } | ||
| if (docx.numbering) { | ||
| const numOpts = parseNumberingDefinitions(docx.numbering); | ||
| if (numOpts) opts.numbering = numOpts; | ||
| } | ||
| if (docx.fontTable) { | ||
| const ftResult = fontTableDesc.parse(docx.fontTable, ctx); | ||
| if (ftResult.fonts && ftResult.fonts.length > 0) opts.fonts = ftResult.fonts; | ||
| } | ||
| if (docx.partRefs.bibliography) { | ||
| const bibEl = docx.doc.get(docx.partRefs.bibliography); | ||
| if (bibEl) { | ||
| const bibResult = bibliographyDesc.parse(bibEl, ctx); | ||
| if (bibResult.sources && bibResult.sources.length > 0) opts.bibliography = bibResult; | ||
| } | ||
| } | ||
| if (docx.partRefs.glossary) { | ||
| const glossaryEl = docx.doc.get(docx.partRefs.glossary); | ||
| if (glossaryEl) { | ||
| const glossaryResult = glossaryDesc.parse(glossaryEl, ctx); | ||
| if (glossaryResult.parts && glossaryResult.parts.length > 0) opts.glossary = glossaryResult; | ||
| } | ||
| } | ||
| if (docx.contentTypes) { | ||
| const ctResult = contentTypesDesc.parse(docx.contentTypes, ctx); | ||
| if (ctResult) opts.contentTypes = ctResult; | ||
| } | ||
| return opts; | ||
| } | ||
| function parseDocx(data) { | ||
| const doc = parseArchive(toUint8Array(data)); | ||
| const documentEl = doc.get("word/document.xml"); | ||
| if (!documentEl) throw new Error("word/document.xml not found"); | ||
| const body = documentEl.elements?.find((e) => e.name === "w:body"); | ||
| if (!body) throw new Error("w:body not found in word/document.xml"); | ||
| const background = documentEl.elements?.find((e) => e.name === "w:background"); | ||
| const styles = doc.get("word/styles.xml"); | ||
| const numbering = doc.get("word/numbering.xml"); | ||
| const settings = doc.get("word/settings.xml"); | ||
| const fontTable = doc.get("word/fontTable.xml"); | ||
| const webSettings = doc.get("word/webSettings.xml"); | ||
| const partRefs = parseDocPartRefs(doc); | ||
| const { coreProps, appProps, customProps } = parseRootRels(doc); | ||
| return { | ||
| doc, | ||
| body, | ||
| background, | ||
| styles, | ||
| numbering, | ||
| settings, | ||
| fontTable, | ||
| webSettings, | ||
| partRefs, | ||
| coreProps, | ||
| appProps, | ||
| customProps, | ||
| contentTypes: doc.get("[Content_Types].xml") | ||
| }; | ||
| } | ||
| //#endregion | ||
| export { parseDocument as n, parseDocx as r, parseArchive as t }; | ||
| //# sourceMappingURL=parse-BIJM6_8Y.mjs.map |
| {"version":3,"file":"parse-BIJM6_8Y.mjs","names":["findDeep"],"sources":["../src/parts/alt-chunk/alt-chunk-parse.ts","../src/parts/custom-xml/custom-xml-parse.ts","../src/parts/sub-doc/sub-doc-parse.ts","../src/parts/textbox/textbox-parse.ts","../src/parse/body.ts","../src/parse.ts"],"sourcesContent":["/**\n * AltChunk parser for DOCX documents.\n *\n * Parses w:altChunk elements and extracts embedded content from the ZIP.\n *\n * @module\n */\nimport { attr } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport type { AltChunkOptions } from \"@parts/alt-chunk/alt-chunk\";\n\nimport type { DocxReadContext } from \"../../context\";\n\n/**\n * Parse a w:altChunk element into AltChunkOptions.\n * Reads the referenced data from the ZIP package.\n */\nexport function parseAltChunk(el: Element, ctx: DocxReadContext): AltChunkOptions {\n const rId = attr(el, \"r:id\");\n if (!rId) {\n throw new Error(\"w:altChunk missing r:id attribute\");\n }\n\n // Look up the path from relationships\n const path = ctx.docx.partRefs.afChunks.get(rId);\n if (!path) {\n throw new Error(`AltChunk relationship ${rId} not found`);\n }\n\n // Read raw data from ZIP\n const data = ctx.docx.doc.getRaw(path);\n if (!data) {\n throw new Error(`AltChunk data not found at ${path}`);\n }\n\n // Determine content type from extension\n const ext = path.split(\".\").pop() ?? \"txt\";\n let contentType: \"text/html\" | \"application/rtf\" | \"text/plain\";\n let extension: \"html\" | \"rtf\" | \"txt\";\n\n switch (ext) {\n case \"html\":\n contentType = \"text/html\";\n extension = \"html\";\n break;\n case \"rtf\":\n contentType = \"application/rtf\";\n extension = \"rtf\";\n break;\n default:\n contentType = \"text/plain\";\n extension = \"txt\";\n break;\n }\n\n return {\n data,\n contentType,\n extension,\n };\n}\n","/**\n * Parser for custom XML block elements (w:customXml).\n *\n * @module\n */\nimport { attr, findChild } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport type { DocxReadContext } from \"../../context\";\nimport type { CustomXmlBlockOptions, CustomXmlPrOptions } from \"./custom-xml\";\n\n/**\n * Parse w:customXml element into CustomXmlBlockOptions.\n *\n * Uses a callback for child parsing to avoid circular dependencies\n * (same pattern as parseTable).\n */\nexport function parseCustomXmlBlock(\n el: Element,\n ctx: DocxReadContext,\n parseChild: (el: Element, ctx: DocxReadContext) => SectionChild,\n): CustomXmlBlockOptions {\n const opts: Record<string, unknown> = {};\n\n // Required attribute\n const element = attr(el, \"w:element\");\n if (element) opts.element = element;\n\n // Optional URI\n const uri = attr(el, \"w:uri\");\n if (uri) opts.uri = uri;\n\n // Parse w:customXmlPr\n const xmlPr = findChild(el, \"w:customXmlPr\");\n if (xmlPr) {\n opts.customXmlPr = parseCustomXmlPr(xmlPr);\n }\n\n // Parse block-level children\n const children: SectionChild[] = [];\n for (const child of el.elements ?? []) {\n if (child.name === \"w:customXmlPr\") continue;\n const parsed = parseChild(child, ctx);\n children.push(parsed);\n }\n if (children.length > 0) opts.children = children;\n\n return opts as unknown as CustomXmlBlockOptions;\n}\n\nfunction parseCustomXmlPr(el: Element): CustomXmlPrOptions {\n const opts: Record<string, unknown> = {};\n\n const placeholder = findChild(el, \"w:placeholder\");\n if (placeholder) {\n const val = attr(placeholder, \"w:val\");\n if (val) opts.placeholder = val;\n }\n\n const attributes: { name: string; val: string; uri?: string }[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"w:attr\") continue;\n const name = attr(child, \"w:name\");\n const val = attr(child, \"w:val\");\n if (name && val) {\n const attrOpts: { name: string; val: string; uri?: string } = { name, val };\n const uriVal = attr(child, \"w:uri\");\n if (uriVal) attrOpts.uri = uriVal;\n attributes.push(attrOpts);\n }\n }\n if (attributes.length > 0) opts.attributes = attributes;\n\n return opts as unknown as CustomXmlPrOptions;\n}\n","/**\n * SubDoc parser for DOCX documents.\n *\n * Parses w:subDoc elements and extracts embedded document data.\n *\n * @module\n */\nimport { attr } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport type { SubDocOptions } from \"@parts/sub-doc/sub-doc\";\n\nimport type { DocxReadContext } from \"../../context\";\n\n/**\n * Parse a w:subDoc element into SubDocOptions.\n * Reads the referenced document data from the ZIP package.\n */\nexport function parseSubDoc(el: Element, ctx: DocxReadContext): SubDocOptions {\n const rId = attr(el, \"r:id\");\n if (!rId) {\n throw new Error(\"w:subDoc missing r:id attribute\");\n }\n\n const path = ctx.docx.partRefs.subDocs.get(rId);\n if (!path) {\n throw new Error(`SubDoc relationship ${rId} not found`);\n }\n\n const data = ctx.docx.doc.getRaw(path);\n if (!data) {\n throw new Error(`SubDoc data not found at ${path}`);\n }\n\n return { data };\n}\n","/**\n * Textbox parser for DOCX documents.\n *\n * Parses w:pict → v:shape → v:textbox → w:txbxContent elements.\n *\n * @module\n */\nimport { attr, findChild } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\n\nimport type { DocxReadContext } from \"../../context\";\n\n/**\n * Parse VML shape style string into VmlShapeStyle-like object.\n */\nfunction parseVmlStyle(styleStr: string): Record<string, string> {\n const style: Record<string, string> = {};\n for (const part of styleStr.split(\";\")) {\n const [key, val] = part.split(\":\").map((s) => s.trim());\n if (key && val) style[key] = val;\n }\n return style;\n}\n\n/**\n * Parse a w:pict element that contains a textbox.\n * Returns an object suitable for the { textbox: ... } SectionChild variant.\n */\nexport function parseTextbox(\n el: Element,\n ctx: DocxReadContext,\n parseChildren: (elements: Element[], ctx: DocxReadContext) => unknown[],\n): {\n style?: Record<string, string>;\n children?: unknown[];\n} {\n const shape = findDeep(el, \"v:shape\")[0];\n if (!shape) return {};\n\n const opts: Record<string, unknown> = {};\n\n // Parse VML style\n const styleAttr = attr(shape, \"style\");\n if (styleAttr) {\n opts.style = parseVmlStyle(styleAttr);\n }\n\n // Parse textbox content\n const textbox = findDeep(shape, \"v:textbox\")[0];\n if (textbox) {\n const txbxContent = findChild(textbox, \"w:txbxContent\");\n if (txbxContent) {\n const childList = parseChildren(txbxContent.elements ?? [], ctx);\n if (childList.length > 0) opts.children = childList;\n }\n }\n\n return opts as { style?: Record<string, string>; children?: unknown[] };\n}\n\n// Simple deep finder\nfunction findDeep(parent: Element, name: string): Element[] {\n const result: Element[] = [];\n for (const child of parent.elements ?? []) {\n if (child.name === name) result.push(child);\n result.push(...findDeep(child, name));\n }\n return result;\n}\n","/**\n * Body parser for DOCX documents.\n *\n * Parses w:body → SectionOptions[] by splitting at w:sectPr boundaries.\n *\n * @module\n */\nimport { attr, findChild, stringify } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport { parseAltChunk } from \"@parts/alt-chunk/alt-chunk-parse\";\nimport { parseCustomXmlBlock } from \"@parts/custom-xml/custom-xml-parse\";\nimport { parseSectionPropertiesEl } from \"@parts/document/body/section-properties/descriptor\";\nimport type { SectionPropertiesOptions } from \"@parts/document/body/section-properties/section-properties\";\nimport { parseSdtBlock } from \"@parts/sdt/sdt-parse\";\nimport { parseSubDoc } from \"@parts/sub-doc/sub-doc-parse\";\nimport { parseToc } from \"@parts/table-of-contents/toc-parse\";\nimport { tableDesc } from \"@parts/table/descriptor\";\nimport type { TableOptions } from \"@parts/table/table\";\nimport { parseTextbox } from \"@parts/textbox/textbox-parse\";\nimport type { SectionOptions } from \"@shared/section\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport { parseParagraph } from \"../body\";\nimport { DocxReadContext } from \"../context\";\nimport { setBodyParseChild } from \"../parts\";\n\n// ── Section properties parser ────────────────────────────────────────────────\n\n/**\n * Parse w:sectPr element into SectionPropertiesOptions.\n * Delegates to the section properties descriptor's parse method.\n */\nfunction parseSectionProperties(el: Element, ctx: DocxReadContext): SectionPropertiesOptions {\n const opts = parseSectionPropertiesEl(el) as Record<string, unknown>;\n\n // Headers/footers - parse from references and store in a separate field\n const headerRefs: Record<string, unknown> = {};\n const footerRefs: Record<string, unknown> = {};\n\n for (const child of el.elements ?? []) {\n if (child.name === \"w:headerReference\") {\n const rId = attr(child, \"r:id\");\n const type = attr(child, \"w:type\");\n if (rId && type) {\n const headerChildren = parseHeaderFooterRef(rId, ctx);\n if (headerChildren) headerRefs[type] = headerChildren;\n }\n }\n if (child.name === \"w:footerReference\") {\n const rId = attr(child, \"r:id\");\n const type = attr(child, \"w:type\");\n if (rId && type) {\n const footerChildren = parseHeaderFooterRef(rId, ctx);\n if (footerChildren) footerRefs[type] = footerChildren;\n }\n }\n }\n\n if (Object.keys(headerRefs).length > 0) {\n opts.parsedHeaders = headerRefs;\n }\n if (Object.keys(footerRefs).length > 0) {\n opts.parsedFooters = footerRefs;\n }\n\n return opts as SectionPropertiesOptions;\n}\n\n/**\n * Parse a header/footer reference by following the relationship to its XML part.\n */\nfunction parseHeaderFooterRef(rId: string, ctx: DocxReadContext): SectionChild[] | undefined {\n const path = ctx.docx.partRefs.headers.get(rId) ?? ctx.docx.partRefs.footers.get(rId);\n if (!path) return undefined;\n\n const partEl = ctx.docx.doc.get(path);\n if (!partEl) return undefined;\n\n // The header/footer XML root element contains w:p, w:tbl, etc.\n const children: SectionChild[] = [];\n for (const child of partEl.elements ?? []) {\n const sectionChild = parseSectionChild(child, ctx);\n if (sectionChild !== undefined) {\n children.push(sectionChild);\n }\n }\n\n return children.length > 0 ? children : undefined;\n}\n\n// ── Section child dispatch ───────────────────────────────────────────────────\n\n/**\n * Parse a single body child element into a SectionChild.\n */\nexport function parseSectionChild(el: Element, ctx: DocxReadContext): SectionChild {\n switch (el.name) {\n case \"w:p\": {\n // Check for textbox (w:pict containing v:textbox)\n const pict = findChild(el, \"w:pict\");\n if (pict) {\n const textbox = findDeepElement(pict, \"v:textbox\");\n if (textbox) {\n const textboxOpts = parseTextbox(pict, ctx, parseSectionChildrenElements);\n return { textbox: textboxOpts as SectionChild extends { textbox: infer T } ? T : never };\n }\n }\n\n return { paragraph: parseParagraph(el, ctx) };\n }\n case \"w:tbl\":\n return { table: tableDesc.parse(el, ctx) as TableOptions };\n case \"w:sdt\": {\n // Try TOC first\n const tocResult = parseToc(el, ctx);\n if (tocResult) {\n return { toc: tocResult };\n }\n // Otherwise parse as generic SDT block\n const sdtResult = parseSdtBlock(el, ctx, parseSectionChildrenElements);\n return {\n sdt: {\n properties: sdtResult.properties,\n children: sdtResult.children as SectionChild[] | undefined,\n },\n };\n }\n case \"w:altChunk\":\n return { altChunk: parseAltChunk(el, ctx) };\n case \"w:subDoc\":\n return { subDoc: parseSubDoc(el, ctx) };\n case \"w:customXml\":\n return { customXml: parseCustomXmlBlock(el, ctx, parseSectionChild) };\n default:\n return { rawXml: stringify(el) };\n }\n}\n\n/**\n * Find a deep descendant element by name.\n */\nfunction findDeepElement(parent: Element, name: string): Element | undefined {\n for (const child of parent.elements ?? []) {\n if (child.name === name) return child;\n const found = findDeepElement(child, name);\n if (found) return found;\n }\n return undefined;\n}\n\n// ── Body parsing with section splitting ───────────────────────────────────────\n\n/**\n * Parse w:body element into SectionOptions[].\n *\n * Splits body content at w:sectPr boundaries to create sections.\n * The last w:sectPr (child of w:body directly) defines the last section.\n * Previous w:sectPr elements appear inside w:pPr elements.\n */\nexport function parseBody(body: Element, ctx: DocxReadContext): SectionOptions[] {\n // Register the body child parser for descriptor parse callbacks\n setBodyParseChild(parseSectionChild);\n\n // Collect body children and detect section breaks\n interface SectionBoundary {\n index: number;\n sectPr: Element;\n }\n\n const bodyChildren: Element[] = [];\n const boundaries: SectionBoundary[] = [];\n\n for (const child of body.elements ?? []) {\n if (child.name === \"w:sectPr\") {\n // Final section properties (last section)\n boundaries.push({ index: bodyChildren.length, sectPr: child });\n } else {\n bodyChildren.push(child);\n\n // Check for inline sectPr in paragraph properties\n if (child.name === \"w:p\") {\n const pPr = findChild(child, \"w:pPr\");\n if (pPr) {\n const sectPr = findChild(pPr, \"w:sectPr\");\n if (sectPr) {\n boundaries.push({ index: bodyChildren.length, sectPr });\n }\n }\n }\n }\n }\n\n // If no boundaries, the whole body is one section\n if (boundaries.length === 0) {\n return [\n {\n children: bodyChildren.map((el) => parseSectionChild(el, ctx)),\n },\n ];\n }\n\n // Split into sections\n const sections: SectionOptions[] = [];\n let start = 0;\n\n for (let i = 0; i < boundaries.length; i++) {\n const boundary = boundaries[i];\n // For inline sectPr (inside w:pPr), the containing paragraph was pushed to\n // bodyChildren. Exclude it — it's a section break marker, not content.\n // The last boundary uses a body-level sectPr, so no paragraph to exclude.\n const isInlineSectPr = i < boundaries.length - 1;\n const endIdx = isInlineSectPr ? Math.max(start, boundary.index - 1) : boundary.index;\n const sectionElements = bodyChildren.slice(start, endIdx);\n const parsedProps = parseSectionProperties(boundary.sectPr, ctx);\n const rawProps = parsedProps as Record<string, unknown>;\n\n // Extract headers/footers that were stored as parsedHeaders/parsedFooters\n const parsedHeaders = rawProps.parsedHeaders as Record<string, SectionChild[]> | undefined;\n const parsedFooters = rawProps.parsedFooters as Record<string, SectionChild[]> | undefined;\n\n // Build clean properties without internal fields\n const cleanProps = { ...parsedProps };\n delete (cleanProps as Record<string, unknown>).parsedHeaders;\n delete (cleanProps as Record<string, unknown>).parsedFooters;\n\n const section = {\n children: sectionElements.map((el) => parseSectionChild(el, ctx)),\n properties: cleanProps,\n ...(parsedHeaders ? { headers: parsedHeaders } : {}),\n ...(parsedFooters ? { footers: parsedFooters } : {}),\n } as SectionOptions;\n\n sections.push(section);\n start = boundary.index;\n }\n\n // If there are elements after the last boundary, they form the last section\n // with the body-level w:sectPr (already captured)\n // Actually the body-level sectPr IS the last boundary\n\n return sections;\n}\n\n/**\n * Parse a list of elements into SectionChild[].\n * Used by SDT and textbox parsers for their content.\n */\nfunction parseSectionChildrenElements(elements: Element[], ctx: DocxReadContext): SectionChild[] {\n return elements.map((el) => parseSectionChild(el, ctx));\n}\n","import type { ParsedArchive } from \"@office-open/core\";\nimport { parseArchive } from \"@office-open/core\";\nimport type { DataType } from \"@office-open/core\";\nimport { toUint8Array } from \"@office-open/core\";\nimport { attr } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport { bibliographyDesc } from \"@parts/bibliography\";\nimport { setBodyParseChild } from \"@parts/bodychildren\";\nimport { commentsDesc } from \"@parts/comments\";\nimport { contentTypesDesc } from \"@parts/contenttypes\";\nimport { corePropertiesDesc } from \"@parts/core-properties\";\nimport type { DocumentOptions } from \"@parts/core-properties\";\nimport { customPropertiesDesc } from \"@parts/custom-properties\";\nimport { endnotesDesc } from \"@parts/endnotes/descriptor\";\nimport { fontTableDesc } from \"@parts/fonts/descriptor\";\nimport { footnotesDesc } from \"@parts/footnotes/descriptor\";\nimport { glossaryDesc } from \"@parts/glossary-document\";\nimport { parseNumberingDefinitions } from \"@parts/numbering/numbering\";\nimport { settingsDesc } from \"@parts/settings/descriptor\";\nimport { buildStyleCache, buildNumberingCache, parseStyleDefinitions } from \"@parts/styles/styles\";\nimport { setTableParseChild } from \"@parts/table/descriptor\";\nimport { webSettingsDesc } from \"@parts/web-settings\";\n\nimport { parseParagraphProperties } from \"./body\";\nimport { DocxReadContext } from \"./context\";\nimport { parseBody, parseSectionChild } from \"./parse/body\";\n\nexport { parseArchive };\n\n/**\n * All part paths extracted from the DOCX package.\n * Field names correspond directly to the OOXML directory structure.\n */\nexport interface DocxPartRefs {\n /** word/headerN.xml keyed by rId */\n headers: Map<string, string>;\n /** word/footerN.xml keyed by rId */\n footers: Map<string, string>;\n /** word/footnotes.xml */\n footnotes?: string;\n /** word/endnotes.xml */\n endnotes?: string;\n /** word/comments.xml */\n comments?: string;\n /** Hyperlink targets keyed by rId (external URLs) */\n hyperlinks: Map<string, string>;\n /** word/charts/chartN.xml keyed by rId */\n charts: Map<string, string>;\n /** word/diagrams/dataN.xml keyed by rId */\n diagramData: Map<string, string>;\n /** word/media/* keyed by rId */\n media: Map<string, string>;\n /** Alternative format chunks (word/afchunkN.*) keyed by rId */\n afChunks: Map<string, string>;\n /** Sub-documents (word/subdocs/subdocN.docx) keyed by rId */\n subDocs: Map<string, string>;\n /** word/bibliography.xml */\n bibliography?: string;\n /** word/glossary/document.xml */\n glossary?: string;\n}\n\nexport interface DocxDocument {\n doc: ParsedArchive;\n /** word/document.xml → w:body element */\n body: Element;\n /** word/document.xml → w:background element */\n background?: Element;\n /** word/styles.xml */\n styles?: Element;\n /** word/numbering.xml */\n numbering?: Element;\n /** word/settings.xml */\n settings?: Element;\n /** word/fontTable.xml */\n fontTable?: Element;\n /** word/webSettings.xml */\n webSettings?: Element;\n partRefs: DocxPartRefs;\n /** docProps/core.xml */\n coreProps?: string;\n /** docProps/app.xml */\n appProps?: string;\n /** docProps/custom.xml */\n customProps?: string;\n /** [Content_Types].xml */\n contentTypes?: Element;\n}\n\nfunction resolveRelsPath(target: string): string {\n if (target.startsWith(\"/\")) return target.slice(1);\n if (target.startsWith(\"../\")) return target.replace(\"../\", \"\");\n return `word/${target}`;\n}\n\nfunction parseDocPartRefs(doc: ParsedArchive): DocxPartRefs {\n const refs: DocxPartRefs = {\n headers: new Map(),\n footers: new Map(),\n hyperlinks: new Map(),\n charts: new Map(),\n diagramData: new Map(),\n media: new Map(),\n afChunks: new Map(),\n subDocs: new Map(),\n };\n\n const relsEl = doc.get(\"word/_rels/document.xml.rels\");\n if (!relsEl) return refs;\n\n for (const child of relsEl.elements ?? []) {\n if (child.name !== \"Relationship\") continue;\n const type = attr(child, \"Type\") ?? \"\";\n const target = attr(child, \"Target\") ?? \"\";\n const id = attr(child, \"Id\") ?? \"\";\n if (!target) continue;\n\n const path = resolveRelsPath(target);\n\n if (type.includes(\"/header\")) {\n refs.headers.set(id, path);\n } else if (type.includes(\"/footer\")) {\n refs.footers.set(id, path);\n } else if (type.includes(\"/footnotes\")) {\n refs.footnotes = path;\n } else if (type.includes(\"/endnotes\")) {\n refs.endnotes = path;\n } else if (type.includes(\"/comments\")) {\n refs.comments = path;\n } else if (type.includes(\"/chart\")) {\n refs.charts.set(id, path);\n } else if (type.includes(\"/diagramData\")) {\n refs.diagramData.set(id, path);\n } else if (type.includes(\"/image\") || type.includes(\"/media\")) {\n refs.media.set(id, path);\n } else if (type.includes(\"/aFChunk\")) {\n refs.afChunks.set(id, path);\n } else if (type.includes(\"/subDocument\")) {\n refs.subDocs.set(id, path);\n } else if (type.includes(\"/bibliography\")) {\n refs.bibliography = path;\n } else if (type.includes(\"/glossaryDocument\")) {\n refs.glossary = path;\n } else if (type.includes(\"/hyperlink\")) {\n refs.hyperlinks.set(id, target);\n }\n }\n\n return refs;\n}\n\nfunction parseRootRels(doc: ParsedArchive): {\n coreProps?: string;\n appProps?: string;\n customProps?: string;\n} {\n const relsEl = doc.get(\"_rels/.rels\");\n if (!relsEl) return {};\n\n let coreProps: string | undefined;\n let appProps: string | undefined;\n let customProps: string | undefined;\n\n for (const child of relsEl.elements ?? []) {\n if (child.name !== \"Relationship\") continue;\n const type = attr(child, \"Type\") ?? \"\";\n const target = attr(child, \"Target\") ?? \"\";\n if (!target) continue;\n\n const path = target.startsWith(\"/\") ? target.slice(1) : target;\n\n if (type.includes(\"/core-properties\")) {\n coreProps = path;\n } else if (type.includes(\"/extended-properties\")) {\n appProps = path;\n } else if (type.includes(\"/custom-properties\")) {\n customProps = path;\n }\n }\n\n return { coreProps, appProps, customProps };\n}\n\n/**\n * Parse a .docx file and convert it into DocumentOptions.\n *\n * This is the main public API for parsing DOCX files.\n * The returned options can be passed directly to `new Document(parsed)`\n * to recreate the document.\n *\n * @param data - Raw bytes of a .docx file\n * @returns Document options including sections and metadata\n */\nexport function parseDocument(data: DataType): DocumentOptions {\n const docx = parseDocx(data);\n const ctx = new DocxReadContext(\n docx,\n buildStyleCache(docx.styles),\n buildNumberingCache(docx.numbering),\n );\n\n // Register the child parser for table and body child descriptors\n setTableParseChild(parseSectionChild);\n setBodyParseChild(parseSectionChild);\n\n const sections = parseBody(docx.body, ctx);\n\n const opts: Record<string, unknown> = { sections };\n\n // Background (w:background in document.xml)\n if (docx.background) {\n const bg: Record<string, unknown> = {};\n const color = attr(docx.background, \"w:color\");\n if (color) bg.color = color;\n if (Object.keys(bg).length > 0) opts.background = bg;\n }\n\n // Core properties\n if (docx.coreProps) {\n const corePropsEl = docx.doc.get(docx.coreProps);\n if (corePropsEl) {\n const cp = corePropertiesDesc.parse(corePropsEl, ctx);\n if (cp.title) opts.title = cp.title;\n if (cp.subject) opts.subject = cp.subject;\n if (cp.creator) opts.creator = cp.creator;\n if (cp.keywords) opts.keywords = cp.keywords;\n if (cp.description) opts.description = cp.description;\n if (cp.lastModifiedBy) opts.lastModifiedBy = cp.lastModifiedBy;\n if (cp.revision) opts.revision = cp.revision;\n }\n }\n\n // Settings\n if (docx.settings) {\n Object.assign(opts, settingsDesc.parse(docx.settings, ctx));\n }\n\n // Web settings\n if (docx.webSettings) {\n const wsOpts = webSettingsDesc.parse(docx.webSettings, ctx);\n if (Object.keys(wsOpts).length > 0) opts.webSettings = wsOpts;\n }\n\n // Custom properties\n if (docx.customProps) {\n const customPropsEl = docx.doc.get(docx.customProps);\n if (customPropsEl) {\n const cpResult = customPropertiesDesc.parse(customPropsEl, ctx);\n if (cpResult.properties && cpResult.properties.length > 0) {\n opts.customProperties = cpResult.properties;\n }\n }\n }\n\n // Comments content\n if (docx.partRefs.comments) {\n const commentsEl = docx.doc.get(docx.partRefs.comments);\n if (commentsEl) {\n const commentsResult = commentsDesc.parse(commentsEl, ctx);\n const children = commentsResult.children;\n if (children && children.length > 0) {\n opts.comments = { children } as unknown as DocumentOptions[\"comments\"];\n }\n }\n }\n\n // Footnotes content\n if (docx.partRefs.footnotes) {\n const footnotesEl = docx.doc.get(docx.partRefs.footnotes);\n if (footnotesEl) {\n const fnResult = footnotesDesc.parse(footnotesEl, ctx);\n const footnotesMap: Record<string, { children: unknown[] }> = {};\n for (const [id, paragraphs] of fnResult.notes) {\n footnotesMap[String(id)] = { children: paragraphs };\n }\n if (Object.keys(footnotesMap).length > 0) opts.footnotes = footnotesMap;\n }\n }\n\n // Endnotes content\n if (docx.partRefs.endnotes) {\n const endnotesEl = docx.doc.get(docx.partRefs.endnotes);\n if (endnotesEl) {\n const enResult = endnotesDesc.parse(endnotesEl, ctx);\n const endnotesMap: Record<string, { children: unknown[] }> = {};\n for (const [id, paragraphs] of enResult.notes) {\n endnotesMap[String(id)] = { children: paragraphs };\n }\n if (Object.keys(endnotesMap).length > 0) opts.endnotes = endnotesMap;\n }\n }\n\n // Styles definitions\n if (docx.styles) {\n const styleOpts = parseStyleDefinitions(docx.styles, parseParagraphProperties, ctx);\n if (styleOpts) opts.styles = styleOpts;\n }\n\n // Numbering definitions\n if (docx.numbering) {\n const numOpts = parseNumberingDefinitions(docx.numbering);\n if (numOpts) opts.numbering = numOpts;\n }\n\n // Font table\n if (docx.fontTable) {\n const ftResult = fontTableDesc.parse(docx.fontTable, ctx);\n if (ftResult.fonts && ftResult.fonts.length > 0) opts.fonts = ftResult.fonts;\n }\n\n // Bibliography\n if (docx.partRefs.bibliography) {\n const bibEl = docx.doc.get(docx.partRefs.bibliography);\n if (bibEl) {\n const bibResult = bibliographyDesc.parse(bibEl, ctx);\n if (bibResult.sources && bibResult.sources.length > 0) opts.bibliography = bibResult;\n }\n }\n\n // Glossary document\n if (docx.partRefs.glossary) {\n const glossaryEl = docx.doc.get(docx.partRefs.glossary);\n if (glossaryEl) {\n const glossaryResult = glossaryDesc.parse(glossaryEl, ctx);\n if (glossaryResult.parts && glossaryResult.parts.length > 0) opts.glossary = glossaryResult;\n }\n }\n\n // Content types\n if (docx.contentTypes) {\n const ctResult = contentTypesDesc.parse(docx.contentTypes, ctx);\n if (ctResult) opts.contentTypes = ctResult;\n }\n\n return opts as unknown as DocumentOptions;\n}\n\nexport function parseDocx(data: DataType): DocxDocument {\n const uint8 = toUint8Array(data);\n const doc = parseArchive(uint8);\n\n const documentEl = doc.get(\"word/document.xml\");\n if (!documentEl) throw new Error(\"word/document.xml not found\");\n const body = documentEl.elements?.find((e) => e.name === \"w:body\");\n if (!body) throw new Error(\"w:body not found in word/document.xml\");\n const background = documentEl.elements?.find((e) => e.name === \"w:background\");\n\n const styles = doc.get(\"word/styles.xml\");\n const numbering = doc.get(\"word/numbering.xml\");\n const settings = doc.get(\"word/settings.xml\");\n const fontTable = doc.get(\"word/fontTable.xml\");\n const webSettings = doc.get(\"word/webSettings.xml\");\n\n const partRefs = parseDocPartRefs(doc);\n const { coreProps, appProps, customProps } = parseRootRels(doc);\n\n const contentTypes = doc.get(\"[Content_Types].xml\");\n\n return {\n doc,\n body,\n background,\n styles,\n numbering,\n settings,\n fontTable,\n webSettings,\n partRefs,\n coreProps,\n appProps,\n customProps,\n contentTypes,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc,IAAa,KAAuC;CAChF,MAAM,MAAM,KAAK,IAAI,MAAM;CAC3B,IAAI,CAAC,KACH,MAAM,IAAI,MAAM,mCAAmC;CAIrD,MAAM,OAAO,IAAI,KAAK,SAAS,SAAS,IAAI,GAAG;CAC/C,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,yBAAyB,IAAI,WAAW;CAI1D,MAAM,OAAO,IAAI,KAAK,IAAI,OAAO,IAAI;CACrC,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,8BAA8B,MAAM;CAItD,MAAM,MAAM,KAAK,MAAM,GAAG,EAAE,IAAI,KAAK;CACrC,IAAI;CACJ,IAAI;CAEJ,QAAQ,KAAR;EACE,KAAK;GACH,cAAc;GACd,YAAY;GACZ;EACF,KAAK;GACH,cAAc;GACd,YAAY;GACZ;EACF;GACE,cAAc;GACd,YAAY;GACZ;CACJ;CAEA,OAAO;EACL;EACA;EACA;CACF;AACF;;;;;;;;;;;;;;AC1CA,SAAgB,oBACd,IACA,KACA,YACuB;CACvB,MAAM,OAAgC,CAAC;CAGvC,MAAM,UAAU,KAAK,IAAI,WAAW;CACpC,IAAI,SAAS,KAAK,UAAU;CAG5B,MAAM,MAAM,KAAK,IAAI,OAAO;CAC5B,IAAI,KAAK,KAAK,MAAM;CAGpB,MAAM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S,GAAG,KAAK,WAAW;EAC/E;CACF;CAGA,IAAI,KAAK,cAAc;EACrB,MAAM,WAAW,iBAAiB,MAAM,KAAK,cAAc,GAAG;EAC9D,IAAI,UAAU,KAAK,eAAe;CACpC;CAEA,OAAO;AACT;AAEA,SAAgB,UAAU,MAA8B;CAEtD,MAAM,MAAM,aADE,aAAa,IACE,CAAC;CAE9B,MAAM,aAAa,IAAI,IAAI,mBAAmB;CAC9C,IAAI,CAAC,YAAY,MAAM,IAAI,MAAM,6BAA6B;CAC9D,MAAM,OAAO,WAAW,UAAU,MAAM,MAAM,EAAE,SAAS,QAAQ;CACjE,IAAI,CAAC,MAAM,MAAM,IAAI,MAAM,uCAAuC;CAClE,MAAM,aAAa,WAAW,UAAU,MAAM,MAAM,EAAE,SAAS,cAAc;CAE7E,MAAM,SAAS,IAAI,IAAI,iBAAiB;CACxC,MAAM,YAAY,IAAI,IAAI,oBAAoB;CAC9C,MAAM,WAAW,IAAI,IAAI,mBAAmB;CAC5C,MAAM,YAAY,IAAI,IAAI,oBAAoB;CAC9C,MAAM,cAAc,IAAI,IAAI,sBAAsB;CAElD,MAAM,WAAW,iBAAiB,GAAG;CACrC,MAAM,EAAE,WAAW,UAAU,gBAAgB,cAAc,GAAG;CAI9D,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAfmB,IAAI,IAAI,qBAehB;CACb;AACF"} |
@@ -1,2 +0,2 @@ | ||
| import { n as DocumentOptions } from "./core-properties-C79Z-ZPE.mjs"; | ||
| import { n as DocumentOptions } from "./core-properties-Bh8_D5Kh.mjs"; | ||
| import { OutputByType, OutputType, PackerOptions } from "@office-open/core"; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
| import { n as generateDocumentStream, r as generateDocumentSync, t as generateDocument } from "./generate-DQ6qeP58.mjs"; | ||
| import { n as generateDocumentStream, r as generateDocumentSync, t as generateDocument } from "./generate-DiDgl0bc.mjs"; | ||
| export { generateDocument, generateDocumentStream, generateDocumentSync }; |
+3
-4
@@ -1,2 +0,2 @@ | ||
| import { $ as SettingsOptions, $a as buildContentTypes, $i as ChildOffset, $n as ImageChild, $r as DayShort, $t as PageTextDirectionType, A as StylesOptions, Aa as BreakTypeValue, Ai as FlatTextOptions, An as TableRowPropertiesChangeOptions, Ar as LevelParagraphStylePropertiesOptions, At as SdtDataBindingOptions, B as HyphenationOptions, Ba as VerticalAlignTable, Bi as MediaTransformation, Bn as TablePropertiesOptionsBase, Br as HighlightColor, Bt as SubDocOptions, C as WebSettingsOptions, Ca as TabStopDefinition, Ci as SmartArtOptions, Cn as CustomXmlRunOptions, Cr as SimpleFieldOptions, Ct as DocumentAttributeNamespaces, D as SubDocCollection, Da as LineRuleType, Di as WpsShapeCoreOptions, Dn as TableOptions, Dr as ImageOptions, Dt as stringifyTableOfContents, E as webSettingsDesc, Ea as HeadingLevel, Ei as resetDrawingIdGen, En as tableDesc, Er as ChartOptions, Et as VmlShapeStyle, F as CaptionOptions, Fa as BorderStyle, Fi as TextVertOverflowType, Fn as TextDirection, Fr as TextAlignmentType, Ft as SdtLock, G as MailMergeSourceType, Ga as ShadingType, Gi as MediaData, Gn as RelativeVerticalPosition, Gr as TextEffect, Gt as HeaderFooterReferenceType, H as MailMergeDest, Ha as CellMergeAttributes, Hi as ChartMediaData, Hn as TableLayoutType, Hr as RunPropertiesChangeOptions, Ht as sectionPropertiesDesc, I as CaptionsOptions, Ia as AlignmentType, Ii as TextVerticalType, In as VerticalMergeType, Ir as TextboxTightWrapType, It as SdtPropertiesOptions, J as OdsoFieldType, Ja as AltChunkData, Ji as WORKAROUND2, Jn as TABLE_BORDERS_NONE, Jr as EmphasisMarkType, Jt as SectionType, K as MathPropertiesOptions, Ka as AltChunkOptions, Ki as MediaDataTransformation, Kn as TableAnchorType, Kr as UnderlineType, Kt as HeaderFooterType, L as DocumentProtectionOptions, La as SectionVerticalAlign, Li as VerticalAnchor, Ln as TablePropertyExOptions, Lr as PageNumber, Lt as SdtTextOptions, M as buildStyleCache, Ma as CnfConditionalOptions, Mi as PresetTextShapeOptions, Mn as TableRowPropertiesOptionsBase, Mr as ParagraphPropertiesOptions, Mt as SdtDateOptions, N as parseStyleDefinitions, Na as BordersOptions, Ni as TextBodyWrappingType, Nn as HeightRule, Nr as ParagraphPropertiesOptionsBase, Nt as SdtDropDownListOptions, O as SubDocData, Oa as SpacingProperties, Oi as WpsShapeOptions, On as TableRowOptions, Or as createImageData, Ot as parseToc, P as AutoCaptionOptions, Pa as BorderOptions, Pi as TextHorzOverflowType, Pn as TableCellBordersOptions, Pr as ParagraphStylePropertiesOptions, Pt as SdtListItem, Q as RsidsOptions, Qa as ContentTypesInput, Qi as ChildExtent, Qn as ChartChild, Qr as DayLong, Qt as createLineNumberType, R as EndnotePropertiesOptions, Ra as TableVerticalAlign, Ri as createBodyProperties, Rn as TablePropertiesChangeOptions, Rr as ParagraphRunOptions, Rt as StyleLevel, S as WebSettingsInput, Sa as LeaderType, Si as SmartArtNode, Sn as CustomXmlRowOptions, Sr as CommentsOptions, St as DocumentAttributeNamespace, T as framesetXml, Ta as TabStopType, Ti as drawingDesc, Tn as setTableParseChild, Tr as WpsShapeRunOptions, Tt as SectionOptions, U as MailMergeDocType, Ua as VerticalMergeRevisionType, Ui as ExtendedMediaData, Un as OverlapType, Ur as RunPropertiesOptions, Ut as stringifySectionPropertiesXml, V as MailMergeDataType, Va as createVerticalAlign, Vi as createTransformation, Vn as TableLookOptions, Vr as ParagraphRunPropertiesOptions, Vt as parseSectionPropertiesEl, W as MailMergeOptions, Wa as ShadingAttributesProperties, Wi as GroupChildMediaData, Wn as RelativeHorizontalPosition, Wr as RunStylePropertiesOptions, Wt as HeaderFooterReferenceOptions, X as ReadModeInkLockDownOptions, Xa as ContentTypeDefault, Xi as WpgMediaData, Xn as TableWidthProperties, Xr as CarriageReturn, Xt as LineNumberAttributes, Y as OdsoOptions, Ya as CharacterSet, Yi as WpgCommonMediaData, Yn as TableBordersOptions, Yr as AnnotationReference, Yt as createSectionType, Z as RevisionViewOptions, Za as ContentTypeOverride, Zi as WpsMediaData, Zn as WidthType, Zr as ContinuationSeparator, Zt as LineNumberRestartFormat, _ as parseDocument, _a as TextWrappingType, _i as XYFrameOptions, _n as CustomXmlAttributeOptions, _r as PositionalTabAlignment, _t as SectionPropertiesChangeOptions, a as DocumentBackgroundOptions, aa as createVerticalPosition, ai as NoBreakHyphen, an as PageBordersOptions, ar as ProofErrorTypeValue, at as NumberingOptions, b as DivOptions, ba as SpaceType, bi as MathScriptType, bn as CustomXmlDataBindingOptions, br as PositionalTabRelativeTo, bt as sectionMarginDefaults, c as customPropertiesDesc, ca as HorizontalPositionOptions, ci as SoftHyphen, cn as createPageNumberType, cr as DropDownListOptions, ct as LevelSuffix, d as BodyContext, da as VerticalPositionOptions, di as YearShort, dn as createPageSize, dr as FormFieldTextOptions, dt as DocPartGallery, ea as GroupChild, ei as EndnoteReference, en as PageMarginAttributes, eo as contentTypesDesc, er as MathChild, et as WriteProtectionOptions, f as DocxReadContext, fa as VerticalPositionRelativeFrom, fi as AlignmentFrameOptions, fn as DocGridAttributesProperties, fr as FormFieldTextType, ft as DocPartOptions, g as parseArchive, ga as TextWrappingSide, gi as FrameWrap, gn as ColumnAttributes, gr as RubyOptions, gt as HeaderFooterGroup, h as DocxPartRefs, ha as TextWrapping, hi as FrameOptions, hn as ColumnsAttributes, hr as RubyAlign, ht as glossaryDesc, i as BackgroundImageOptions, ia as DrawingOptions, ii as MonthShort, in as PageBorderZOrder, ir as ProofErrorType, it as Numbering, j as buildNumberingCache, ja as IndentAttributesProperties, ji as NormalAutofitOptions, jn as TableRowPropertiesOptions, jr as ParagraphPropertiesChangeOptions, jt as SdtDateMappingType, k as Styles, ka as BreakType, ki as BodyPropertiesOptions, kn as CnfStyleOptions, kr as SymbolRunOptions, kt as SdtComboBoxOptions, l as settingsDesc, la as HorizontalPositionRelativeFrom, li as Tab, ln as PageOrientation, lr as FormFieldCommonOptions, lt as LevelsOptions, m as DocxDocument, ma as createWrapTight, mi as FrameAnchorType, mn as createDocumentGrid, mr as createFormFieldData, mt as GlossaryDocumentOptions, n as DocumentOptions, na as WpgGroupOptions, ni as LastRenderedPageBreak, nn as PageBorderDisplay, no as SourceTypeOptions, nr as ParagraphOptions, nt as ConcreteNumberingOptions, o as CustomPropertiesInput, oa as createHorizontalPosition, oi as PageNumberElement, on as PageNumberSeparator, or as SmartTagRunOptions, ot as parseNumberingDefinitions, p as DocxWriteContext, pa as createWrapThrough, pi as DropCapType, pn as DocumentGridType, pr as TextInputOptions, pt as DocPartType, q as OdsoFieldMapDataOptions, qa as AltChunkCollection, qi as SmartArtMediaData, qn as TableFloatOptions, qr as FontAttributesProperties, qt as createHeaderFooterReference, r as corePropertiesDesc, ra as Distance, ri as MonthLong, rn as PageBorderOffsetFrom, ro as bibliographyDesc, rr as SmartArtChild, rt as AbstractNumberingOptions, s as CustomPropertyOptions, sa as Floating, si as Separator, sn as PageNumberTypeAttributes, sr as CheckBoxOptions, st as LevelFormat, t as CorePropertiesInput, ta as WpgGroupCoreOptions, ti as FootnoteReferenceElement, tn as createPageMargin, to as BibliographyOptions, tr as ParagraphJsonChild, tt as CompatibilityOptions, u as EmbeddedFontOptionsWithKey, ua as Margins, ui as YearLong, un as PageSizeAttributes, ur as FormFieldOptions, ut as DocPartBehavior, v as parseDocx, va as HorizontalPositionAlign, vi as MathInput, vn as CustomXmlBlockOptions, vr as PositionalTabLeader, vt as SectionPropertiesOptions, w as frameXml, wa as TabStopPosition, wi as DrawingDescriptorOptions, wn as TableCellOptions, wr as WpgGroupRunOptions, wt as SectionChild, x as TargetScreenSize, xa as VerticalPositionAlign, xi as MathStyleType, xn as CustomXmlPrOptions, xr as CommentOptions, xt as sectionPageSizeDefaults, y as DivBorderOptions, ya as NumberFormat, yi as MathRunPropertiesOptions, yn as CustomXmlCellOptions, yr as PositionalTabOptions, yt as SectionPropertiesOptionsBase, z as FootnotePropertiesOptions, za as VerticalAlignSection, zi as Media, zn as TablePropertiesOptions, zr as RunOptions, zt as TableOfContentsOptions } from "./core-properties-C79Z-ZPE.mjs"; | ||
| import { $ as SettingsOptions, $a as buildContentTypes, $i as MonthLong, $n as ImageChild, $r as ExtendedMediaData, $t as PageTextDirectionType, A as StylesOptions, Aa as BreakTypeValue, Ai as ParagraphStylePropertiesOptions, An as TableRowPropertiesChangeOptions, Ar as createImageData, At as SdtDataBindingOptions, B as HyphenationOptions, Ba as VerticalAlignTable, Bi as RunStylePropertiesOptions, Bn as TablePropertiesOptionsBase, Br as HorizontalPositionRelativeFrom, Bt as SubDocOptions, C as WebSettingsOptions, Ca as TabStopDefinition, Ci as WpgGroupCoreOptions, Cn as CustomXmlRunOptions, Cr as SimpleFieldOptions, Ct as DocumentAttributeNamespaces, D as SubDocCollection, Da as LineRuleType, Di as ParagraphPropertiesChangeOptions, Dn as TableOptions, Dr as SmartArtOptions, Dt as stringifyTableOfContents, E as webSettingsDesc, Ea as HeadingLevel, Ei as LevelParagraphStylePropertiesOptions, En as tableDesc, Er as SmartArtNode, Et as VmlShapeStyle, F as CaptionOptions, Fa as BorderStyle, Fi as RunOptions, Fn as TextDirection, Fr as DrawingOptions, Ft as SdtLock, G as MailMergeSourceType, Ga as ShadingType, Gi as AnnotationReference, Gn as RelativeVerticalPosition, Gr as createWrapTight, Gt as HeaderFooterReferenceType, H as MailMergeDest, Ha as CellMergeAttributes, Hi as UnderlineType, Hn as TableLayoutType, Hr as VerticalPositionOptions, Ht as sectionPropertiesDesc, I as CaptionsOptions, Ia as AlignmentType, Ii as HighlightColor, In as VerticalMergeType, Ir as createVerticalPosition, It as SdtPropertiesOptions, J as OdsoFieldType, Ja as AltChunkData, Ji as DayLong, Jn as TABLE_BORDERS_NONE, Jr as TextWrappingType, Jt as SectionType, K as MathPropertiesOptions, Ka as AltChunkOptions, Ki as CarriageReturn, Kn as TableAnchorType, Kr as TextWrapping, Kt as HeaderFooterType, L as DocumentProtectionOptions, La as SectionVerticalAlign, Li as ParagraphRunPropertiesOptions, Ln as TablePropertyExOptions, Lr as createHorizontalPosition, Lt as SdtTextOptions, M as buildStyleCache, Ma as CnfConditionalOptions, Mi as TextboxTightWrapType, Mn as TableRowPropertiesOptionsBase, Mr as drawingDesc, Mt as SdtDateOptions, N as parseStyleDefinitions, Na as BordersOptions, Ni as PageNumber, Nn as HeightRule, Nr as resetDrawingIdGen, Nt as SdtDropDownListOptions, O as SubDocData, Oa as SpacingProperties, Oi as ParagraphPropertiesOptions, On as TableRowOptions, Or as ChartOptions, Ot as parseToc, P as AutoCaptionOptions, Pa as BorderOptions, Pi as ParagraphRunOptions, Pn as TableCellBordersOptions, Pr as Distance, Pt as SdtListItem, Q as RsidsOptions, Qa as ContentTypesInput, Qi as LastRenderedPageBreak, Qn as ChartChild, Qr as ChartMediaData, Qt as createLineNumberType, R as EndnotePropertiesOptions, Ra as TableVerticalAlign, Ri as RunPropertiesChangeOptions, Rn as TablePropertiesChangeOptions, Rr as Floating, Rt as StyleLevel, S as WebSettingsInput, Sa as LeaderType, Si as GroupChild, Sn as CustomXmlRowOptions, Sr as CommentsOptions, St as DocumentAttributeNamespace, T as framesetXml, Ta as TabStopType, Ti as SymbolRunOptions, Tn as setTableParseChild, Tr as WpsShapeRunOptions, Tt as SectionOptions, U as MailMergeDocType, Ua as VerticalMergeRevisionType, Ui as FontAttributesProperties, Un as OverlapType, Ur as VerticalPositionRelativeFrom, Ut as stringifySectionPropertiesXml, V as MailMergeDataType, Va as createVerticalAlign, Vi as TextEffect, Vn as TableLookOptions, Vr as Margins, Vt as parseSectionPropertiesEl, W as MailMergeOptions, Wa as ShadingAttributesProperties, Wi as EmphasisMarkType, Wn as RelativeHorizontalPosition, Wr as createWrapThrough, Wt as HeaderFooterReferenceOptions, X as ReadModeInkLockDownOptions, Xa as ContentTypeDefault, Xi as EndnoteReference, Xn as TableWidthProperties, Xr as MediaTransformation, Xt as LineNumberAttributes, Y as OdsoOptions, Ya as CharacterSet, Yi as DayShort, Yn as TableBordersOptions, Yr as Media, Yt as createSectionType, Z as RevisionViewOptions, Za as ContentTypeOverride, Zi as FootnoteReferenceElement, Zn as WidthType, Zr as createTransformation, Zt as LineNumberRestartFormat, _ as parseDocument, _a as VerticalPositionAlign, _i as TextVerticalType, _n as CustomXmlAttributeOptions, _r as PositionalTabAlignment, _t as SectionPropertiesChangeOptions, a as DocumentBackgroundOptions, aa as Tab, ai as WpgCommonMediaData, an as PageBordersOptions, ar as ProofErrorTypeValue, at as NumberingOptions, b as DivOptions, ba as MathScriptType, bi as ChildExtent, bn as CustomXmlDataBindingOptions, br as PositionalTabRelativeTo, bt as sectionMarginDefaults, c as customPropertiesDesc, ca as AlignmentFrameOptions, ci as WpsShapeCoreOptions, cn as createPageNumberType, cr as DropDownListOptions, ct as LevelSuffix, d as BodyContext, da as FrameOptions, di as FlatTextOptions, dn as createPageSize, dr as FormFieldTextOptions, dt as DocPartGallery, ea as MonthShort, ei as GroupChildMediaData, en as PageMarginAttributes, eo as contentTypesDesc, er as MathChild, et as WriteProtectionOptions, f as DocxReadContext, fa as FrameWrap, fi as NormalAutofitOptions, fn as DocGridAttributesProperties, fr as FormFieldTextType, ft as DocPartOptions, g as parseArchive, ga as SpaceType, gi as TextVertOverflowType, gn as ColumnAttributes, gr as RubyOptions, gt as HeaderFooterGroup, h as DocxPartRefs, ha as NumberFormat, hi as TextHorzOverflowType, hn as ColumnsAttributes, hr as RubyAlign, ht as glossaryDesc, i as BackgroundImageOptions, ia as SoftHyphen, ii as WORKAROUND2, in as PageBorderZOrder, ir as ProofErrorType, it as Numbering, j as buildNumberingCache, ja as IndentAttributesProperties, ji as TextAlignmentType, jn as TableRowPropertiesOptions, jr as DrawingDescriptorOptions, jt as SdtDateMappingType, k as Styles, ka as BreakType, ki as ParagraphPropertiesOptionsBase, kn as CnfStyleOptions, kr as ImageOptions, kt as SdtComboBoxOptions, l as settingsDesc, la as DropCapType, li as WpsShapeOptions, ln as PageOrientation, lr as FormFieldCommonOptions, lt as LevelsOptions, m as DocxDocument, ma as HorizontalPositionAlign, mi as TextBodyWrappingType, mn as createDocumentGrid, mr as createFormFieldData, mt as GlossaryDocumentOptions, n as DocumentOptions, na as PageNumberElement, ni as MediaDataTransformation, nn as PageBorderDisplay, no as SourceTypeOptions, nr as ParagraphOptions, nt as ConcreteNumberingOptions, o as CustomPropertiesInput, oa as YearLong, oi as WpgMediaData, on as PageNumberSeparator, or as SmartTagRunOptions, ot as parseNumberingDefinitions, p as DocxWriteContext, pa as XYFrameOptions, pi as PresetTextShapeOptions, pn as DocumentGridType, pr as TextInputOptions, pt as DocPartType, q as OdsoFieldMapDataOptions, qa as AltChunkCollection, qi as ContinuationSeparator, qn as TableFloatOptions, qr as TextWrappingSide, qt as createHeaderFooterReference, r as corePropertiesDesc, ra as Separator, ri as SmartArtMediaData, rn as PageBorderOffsetFrom, ro as bibliographyDesc, rr as SmartArtChild, rt as AbstractNumberingOptions, s as CustomPropertyOptions, sa as YearShort, si as WpsMediaData, sn as PageNumberTypeAttributes, sr as CheckBoxOptions, st as LevelFormat, t as CorePropertiesInput, ta as NoBreakHyphen, ti as MediaData, tn as createPageMargin, to as BibliographyOptions, tr as ParagraphChild, tt as CompatibilityOptions, u as EmbeddedFontOptionsWithKey, ua as FrameAnchorType, ui as BodyPropertiesOptions, un as PageSizeAttributes, ur as FormFieldOptions, ut as DocPartBehavior, v as parseDocx, va as MathInput, vi as VerticalAnchor, vn as CustomXmlBlockOptions, vr as PositionalTabLeader, vt as SectionPropertiesOptions, w as frameXml, wa as TabStopPosition, wi as WpgGroupOptions, wn as TableCellOptions, wr as WpgGroupRunOptions, wt as SectionChild, x as TargetScreenSize, xa as MathStyleType, xi as ChildOffset, xn as CustomXmlPrOptions, xr as CommentOptions, xt as sectionPageSizeDefaults, y as DivBorderOptions, ya as MathRunPropertiesOptions, yi as createBodyProperties, yn as CustomXmlCellOptions, yr as PositionalTabOptions, yt as SectionPropertiesOptionsBase, z as FootnotePropertiesOptions, za as VerticalAlignSection, zi as RunPropertiesOptions, zn as TablePropertiesOptions, zr as HorizontalPositionOptions, zt as TableOfContentsOptions } from "./core-properties-Bh8_D5Kh.mjs"; | ||
| import { generateDocument, generateDocumentStream, generateDocumentSync } from "./generate.mjs"; | ||
@@ -148,4 +148,3 @@ import { InputDataType, Patch, PatchDocumentOptions, PatchDocumentOutputType, PatchType, patchDetector, patchDocument } from "./patch/index.mjs"; | ||
| declare function stringifyRunInline(opts: RunOptions, ctx: BodyContext): string; | ||
| type ParagraphChild = ParagraphJsonChild | RunOptions; | ||
| declare function stringifyJsonChild(child: ParagraphChild, ctx: BodyContext): string | string[] | undefined; | ||
| declare function stringifyChildDispatch(child: ParagraphChild, ctx: BodyContext): string | string[] | undefined; | ||
| declare function stringifyParagraphInline(opts: string | ParagraphOptions, ctx: BodyContext): string; | ||
@@ -182,3 +181,3 @@ //#endregion | ||
| //#endregion | ||
| export { AbstractNumberingOptions, AlignmentFrameOptions, AlignmentType, AltChunkCollection, AltChunkData, AltChunkOptions, AnnotationReference, AutoCaptionOptions, BackgroundImageOptions, BibliographyOptions, type BodyContext, BodyPropertiesOptions, BookmarkOptions, BorderOptions, BorderStyle, BordersOptions, BreakType, BreakTypeValue, CaptionOptions, CaptionsOptions, CarriageReturn, CellMergeAttributes, CharacterSet, ChartChild, ChartMediaData, ChartOptions, CheckBoxOptions, ChildExtent, ChildOffset, CnfConditionalOptions, CnfStyleOptions, ColumnAttributes, ColumnsAttributes, CommentOptions, CommentsOptions, type CompatibilityOptions, type CompressionOptions, ConcreteNumberingOptions, ContentTypeDefault, ContentTypeOverride, ContentTypesInput, ContinuationSeparator, CorePropertiesInput, CustomPropertiesInput, CustomPropertyOptions, type CustomXmlAttributeOptions, CustomXmlBlockDescriptorOptions, type CustomXmlBlockOptions, type CustomXmlCellOptions, type CustomXmlDataBindingOptions, type CustomXmlPrOptions, type CustomXmlRowOptions, type CustomXmlRunOptions, DayLong, DayShort, DirOptions, Distance, DivBorderOptions, DivOptions, DocGridAttributesProperties, DocPartBehavior, DocPartGallery, DocPartOptions, DocPartType, DocumentAttributeNamespace, DocumentAttributeNamespaces, DocumentBackgroundOptions, DocumentGridType, DocumentOptions, DocumentProtectionOptions, DocxDocument, DocxPartRefs, type DocxReadContext, type DocxWriteContext, DrawingDescriptorOptions, DrawingOptions, DropCapType, DropDownListOptions, EditGroup, EditGroupType, EmphasisMarkType, EndnoteOptions, EndnotePropertiesOptions, EndnoteReference, EndnoteType, EndnotesData, ExtendedMediaData, ExternalHyperlinkOptions, FlatTextOptions, Floating, FontAttributesProperties, FontTableInput, FootnoteOptions, FootnotePropertiesOptions, FootnoteReferenceElement, FootnoteType, FootnotesData, FormFieldCommonOptions, FormFieldOptions, FormFieldTextOptions, FormFieldTextType, FrameAnchorType, FrameOptions, FrameWrap, GlossaryDocumentOptions, GroupChild, GroupChildMediaData, HeaderFooterGroup, HeaderFooterReferenceOptions, HeaderFooterReferenceType, HeaderFooterType, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionOptions, HorizontalPositionRelativeFrom, HyperlinkType, HyphenationOptions, ImageChild, ImageOptions, IndentAttributesProperties, InputDataType, InternalHyperlinkOptions, LastRenderedPageBreak, LeaderType, LevelFormat, LevelParagraphStylePropertiesOptions, LevelSuffix, LevelsOptions, LineNumberAttributes, LineNumberRestartFormat, LineRuleType, MailMergeDataType, MailMergeDest, MailMergeDocType, MailMergeOptions, MailMergeSourceType, Margins, MathChild, MathInput, MathPropertiesOptions, MathRunPropertiesOptions, MathScriptType, MathStyleType, Media, MediaData, MediaDataTransformation, MediaTransformation, MonthLong, MonthShort, NoBreakHyphen, NormalAutofitOptions, NumberFormat, NumberedItemReferenceFormat, NumberedItemReferenceOptions, Numbering, NumberingOptions, type ObjectElementOptions, type ObjectEmbedOptions, type ObjectLinkOptions, OdsoFieldMapDataOptions, OdsoFieldType, OdsoOptions, type OutputByType, type OutputType, OverlapType, type PackerOptions, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBordersOptions, PageMarginAttributes, PageNumber, PageNumberElement, PageNumberSeparator, PageNumberTypeAttributes, PageOrientation, PageSizeAttributes, PageTextDirectionType, ParagraphChild, ParagraphJsonChild, ParagraphOptions, ParagraphPropertiesChangeOptions, ParagraphPropertiesOptions, ParagraphPropertiesOptionsBase, ParagraphRunOptions, ParagraphRunPropertiesOptions, ParagraphStylePropertiesOptions, Patch, PatchDocumentOptions, PatchDocumentOutputType, PatchType, PermStartOptions, PositionalTabAlignment, PositionalTabLeader, PositionalTabOptions, PositionalTabRelativeTo, PresetTextShapeOptions, ProofErrorType, ProofErrorTypeValue, ReadModeInkLockDownOptions, RelationshipEntry, RelationshipsInput, RelativeHorizontalPosition, RelativeVerticalPosition, RevisionViewOptions, RsidsOptions, RubyAlign, RubyOptions, RunOptions, RunPropertiesChangeOptions, RunPropertiesOptions, RunStylePropertiesOptions, SdtChildOptions, SdtComboBoxOptions, SdtDataBindingOptions, SdtDateMappingType, SdtDateOptions, SdtDropDownListOptions, SdtListItem, SdtLock, SdtPropertiesOptions, SdtTextOptions, SectionChild, SectionOptions, SectionPropertiesChangeOptions, SectionPropertiesOptions, SectionPropertiesOptionsBase, SectionType, SectionVerticalAlign, Separator, SettingsOptions, ShadingAttributesProperties, ShadingType, SimpleFieldOptions, SmartArtChild, SmartArtMediaData, SmartArtNode, SmartArtOptions, SmartTagRunOptions, SoftHyphen, SourceTypeOptions, SpaceType, SpacingProperties, StyleLevel, Styles, StylesOptions, SubDocCollection, SubDocData, SubDocOptions, SymbolRunOptions, TABLE_BORDERS_NONE, Tab, TabStopDefinition, TabStopPosition, TabStopType, TableAnchorType, TableBordersOptions, TableCellBordersOptions, TableCellOptions, TableFloatOptions, TableLayoutType, TableLookOptions, TableOfContentsOptions, TableOptions, TablePropertiesChangeOptions, TablePropertiesOptions, TablePropertiesOptionsBase, TablePropertyExOptions, TableRowOptions, TableRowPropertiesChangeOptions, TableRowPropertiesOptions, TableRowPropertiesOptionsBase, TableVerticalAlign, TableWidthProperties, TargetScreenSize, TextAlignmentType, TextBodyWrappingType, TextDirection, TextEffect, TextHorzOverflowType, TextInputOptions, TextVertOverflowType, TextVerticalType, TextWrapping, TextWrappingSide, TextWrappingType, TextboxOptions, TextboxTightWrapType, UnderlineType, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionOptions, VerticalPositionRelativeFrom, WORKAROUND2, WebSettingsInput, WebSettingsOptions, WidthType, WpgCommonMediaData, WpgGroupCoreOptions, WpgGroupOptions, WpgGroupRunOptions, WpgMediaData, WpsMediaData, WpsShapeCoreOptions, WpsShapeOptions, WpsShapeRunOptions, WriteProtectionOptions, XYFrameOptions, YearLong, YearShort, altChunkDesc, bibliographyDesc, buildContentTypes, buildNumberingCache, buildStyleCache, commentsDesc, contentTypesDesc, corePropertiesDesc, createBodyProperties, createDocumentGrid, createFormFieldData, createHeaderFooterReference, createHorizontalPosition, createImageData, createLineNumberType, createPageMargin, createPageNumberType, createPageSize, createSectionType, createTransformation, createVerticalAlign, createVerticalPosition, createWrapThrough, createWrapTight, customPropertiesDesc, customXmlBlockDesc, drawingDesc, endnotesDesc, fontTableDesc, footnotesDesc, frameXml, framesetXml, generateDocument, generateDocumentStream, generateDocumentSync, glossaryDesc, parseArchive, parseDocument, parseDocx, parseNumberingDefinitions, parseSdtBlock, parseSectionPropertiesEl, parseStyleDefinitions, parseToc, patchDetector, patchDocument, relationshipsDesc, resetDrawingIdGen, sdtBlockDesc, sectionMarginDefaults, sectionPageSizeDefaults, sectionPropertiesDesc, setBodyParseChild, setTableParseChild, settingsDesc, stringifyJsonChild, stringifyParagraphInline, stringifyRunInline, stringifySectionPropertiesXml, stringifyTableOfContents, subDocDesc, tableDesc, webSettingsDesc }; | ||
| export { AbstractNumberingOptions, AlignmentFrameOptions, AlignmentType, AltChunkCollection, AltChunkData, AltChunkOptions, AnnotationReference, AutoCaptionOptions, BackgroundImageOptions, BibliographyOptions, type BodyContext, BodyPropertiesOptions, BookmarkOptions, BorderOptions, BorderStyle, BordersOptions, BreakType, BreakTypeValue, CaptionOptions, CaptionsOptions, CarriageReturn, CellMergeAttributes, CharacterSet, ChartChild, ChartMediaData, ChartOptions, CheckBoxOptions, ChildExtent, ChildOffset, CnfConditionalOptions, CnfStyleOptions, ColumnAttributes, ColumnsAttributes, CommentOptions, CommentsOptions, type CompatibilityOptions, type CompressionOptions, ConcreteNumberingOptions, ContentTypeDefault, ContentTypeOverride, ContentTypesInput, ContinuationSeparator, CorePropertiesInput, CustomPropertiesInput, CustomPropertyOptions, type CustomXmlAttributeOptions, CustomXmlBlockDescriptorOptions, type CustomXmlBlockOptions, type CustomXmlCellOptions, type CustomXmlDataBindingOptions, type CustomXmlPrOptions, type CustomXmlRowOptions, type CustomXmlRunOptions, DayLong, DayShort, DirOptions, Distance, DivBorderOptions, DivOptions, DocGridAttributesProperties, DocPartBehavior, DocPartGallery, DocPartOptions, DocPartType, DocumentAttributeNamespace, DocumentAttributeNamespaces, DocumentBackgroundOptions, DocumentGridType, DocumentOptions, DocumentProtectionOptions, DocxDocument, DocxPartRefs, type DocxReadContext, type DocxWriteContext, DrawingDescriptorOptions, DrawingOptions, DropCapType, DropDownListOptions, EditGroup, EditGroupType, EmphasisMarkType, EndnoteOptions, EndnotePropertiesOptions, EndnoteReference, EndnoteType, EndnotesData, ExtendedMediaData, ExternalHyperlinkOptions, FlatTextOptions, Floating, FontAttributesProperties, FontTableInput, FootnoteOptions, FootnotePropertiesOptions, FootnoteReferenceElement, FootnoteType, FootnotesData, FormFieldCommonOptions, FormFieldOptions, FormFieldTextOptions, FormFieldTextType, FrameAnchorType, FrameOptions, FrameWrap, GlossaryDocumentOptions, GroupChild, GroupChildMediaData, HeaderFooterGroup, HeaderFooterReferenceOptions, HeaderFooterReferenceType, HeaderFooterType, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionOptions, HorizontalPositionRelativeFrom, HyperlinkType, HyphenationOptions, ImageChild, ImageOptions, IndentAttributesProperties, InputDataType, InternalHyperlinkOptions, LastRenderedPageBreak, LeaderType, LevelFormat, LevelParagraphStylePropertiesOptions, LevelSuffix, LevelsOptions, LineNumberAttributes, LineNumberRestartFormat, LineRuleType, MailMergeDataType, MailMergeDest, MailMergeDocType, MailMergeOptions, MailMergeSourceType, Margins, MathChild, MathInput, MathPropertiesOptions, MathRunPropertiesOptions, MathScriptType, MathStyleType, Media, MediaData, MediaDataTransformation, MediaTransformation, MonthLong, MonthShort, NoBreakHyphen, NormalAutofitOptions, NumberFormat, NumberedItemReferenceFormat, NumberedItemReferenceOptions, Numbering, NumberingOptions, type ObjectElementOptions, type ObjectEmbedOptions, type ObjectLinkOptions, OdsoFieldMapDataOptions, OdsoFieldType, OdsoOptions, type OutputByType, type OutputType, OverlapType, type PackerOptions, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBordersOptions, PageMarginAttributes, PageNumber, PageNumberElement, PageNumberSeparator, PageNumberTypeAttributes, PageOrientation, PageSizeAttributes, PageTextDirectionType, ParagraphChild, ParagraphOptions, ParagraphPropertiesChangeOptions, ParagraphPropertiesOptions, ParagraphPropertiesOptionsBase, ParagraphRunOptions, ParagraphRunPropertiesOptions, ParagraphStylePropertiesOptions, Patch, PatchDocumentOptions, PatchDocumentOutputType, PatchType, PermStartOptions, PositionalTabAlignment, PositionalTabLeader, PositionalTabOptions, PositionalTabRelativeTo, PresetTextShapeOptions, ProofErrorType, ProofErrorTypeValue, ReadModeInkLockDownOptions, RelationshipEntry, RelationshipsInput, RelativeHorizontalPosition, RelativeVerticalPosition, RevisionViewOptions, RsidsOptions, RubyAlign, RubyOptions, RunOptions, RunPropertiesChangeOptions, RunPropertiesOptions, RunStylePropertiesOptions, SdtChildOptions, SdtComboBoxOptions, SdtDataBindingOptions, SdtDateMappingType, SdtDateOptions, SdtDropDownListOptions, SdtListItem, SdtLock, SdtPropertiesOptions, SdtTextOptions, SectionChild, SectionOptions, SectionPropertiesChangeOptions, SectionPropertiesOptions, SectionPropertiesOptionsBase, SectionType, SectionVerticalAlign, Separator, SettingsOptions, ShadingAttributesProperties, ShadingType, SimpleFieldOptions, SmartArtChild, SmartArtMediaData, SmartArtNode, SmartArtOptions, SmartTagRunOptions, SoftHyphen, SourceTypeOptions, SpaceType, SpacingProperties, StyleLevel, Styles, StylesOptions, SubDocCollection, SubDocData, SubDocOptions, SymbolRunOptions, TABLE_BORDERS_NONE, Tab, TabStopDefinition, TabStopPosition, TabStopType, TableAnchorType, TableBordersOptions, TableCellBordersOptions, TableCellOptions, TableFloatOptions, TableLayoutType, TableLookOptions, TableOfContentsOptions, TableOptions, TablePropertiesChangeOptions, TablePropertiesOptions, TablePropertiesOptionsBase, TablePropertyExOptions, TableRowOptions, TableRowPropertiesChangeOptions, TableRowPropertiesOptions, TableRowPropertiesOptionsBase, TableVerticalAlign, TableWidthProperties, TargetScreenSize, TextAlignmentType, TextBodyWrappingType, TextDirection, TextEffect, TextHorzOverflowType, TextInputOptions, TextVertOverflowType, TextVerticalType, TextWrapping, TextWrappingSide, TextWrappingType, TextboxOptions, TextboxTightWrapType, UnderlineType, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionOptions, VerticalPositionRelativeFrom, WORKAROUND2, WebSettingsInput, WebSettingsOptions, WidthType, WpgCommonMediaData, WpgGroupCoreOptions, WpgGroupOptions, WpgGroupRunOptions, WpgMediaData, WpsMediaData, WpsShapeCoreOptions, WpsShapeOptions, WpsShapeRunOptions, WriteProtectionOptions, XYFrameOptions, YearLong, YearShort, altChunkDesc, bibliographyDesc, buildContentTypes, buildNumberingCache, buildStyleCache, commentsDesc, contentTypesDesc, corePropertiesDesc, createBodyProperties, createDocumentGrid, createFormFieldData, createHeaderFooterReference, createHorizontalPosition, createImageData, createLineNumberType, createPageMargin, createPageNumberType, createPageSize, createSectionType, createTransformation, createVerticalAlign, createVerticalPosition, createWrapThrough, createWrapTight, customPropertiesDesc, customXmlBlockDesc, drawingDesc, endnotesDesc, fontTableDesc, footnotesDesc, frameXml, framesetXml, generateDocument, generateDocumentStream, generateDocumentSync, glossaryDesc, parseArchive, parseDocument, parseDocx, parseNumberingDefinitions, parseSdtBlock, parseSectionPropertiesEl, parseStyleDefinitions, parseToc, patchDetector, patchDocument, relationshipsDesc, resetDrawingIdGen, sdtBlockDesc, sectionMarginDefaults, sectionPageSizeDefaults, sectionPropertiesDesc, setBodyParseChild, setTableParseChild, settingsDesc, stringifyChildDispatch, stringifyParagraphInline, stringifyRunInline, stringifySectionPropertiesXml, stringifyTableOfContents, subDocDesc, tableDesc, webSettingsDesc }; | ||
| //# sourceMappingURL=index.d.mts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.mts","names":[],"sources":["../src/parts/paragraph/links/hyperlink.ts","../src/parts/paragraph/links/bookmark.ts","../src/parts/paragraph/links/numbered-item-ref.ts","../src/parts/paragraph/links/bidi.ts","../src/parts/footnotes/footnote/footnote.ts","../src/parts/footnotes/descriptor.ts","../src/parts/endnotes/endnote/endnote.ts","../src/parts/endnotes/descriptor.ts","../src/parts/sdt/sdt-parse.ts","../src/parts/perm-start.ts","../src/parts/fonts/descriptor.ts","../src/parts/textbox/textbox.ts","../src/parts/object/object-element.ts","../src/parts/comments.ts","../src/parts/inline.ts","../src/parts/relationships.ts","../src/parts/bodychildren.ts"],"mappings":";;;;;;;;cAUa,aAAA;EAAA,SAKH,QAAA;EAAA,SAAA,QAAA;AAAA;AAAA,UAKO,wBAAA;EAEf,MAAA;EAEA,OAAO;AAAA;AAAA,UAMQ,wBAAA;EAEf,IAAA;EAEA,OAAA;EAEA,QAAA;AAAA;;;UC3Be,eAAA;EAEf,EAAE;AAAA;;;aCKQ,2BAAA;EACV,IAAA;EAIA,QAAA;EAIA,UAAA;EAIA,YAAA;AAAA;AAAA,UAGe,4BAAA;EAKf,SAAA;EAKA,eAAA,GAAkB,2BAA2B;AA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.d.mts","names":[],"sources":["../src/parts/paragraph/links/hyperlink.ts","../src/parts/paragraph/links/bookmark.ts","../src/parts/paragraph/links/numbered-item-ref.ts","../src/parts/paragraph/links/bidi.ts","../src/parts/footnotes/footnote/footnote.ts","../src/parts/footnotes/descriptor.ts","../src/parts/endnotes/endnote/endnote.ts","../src/parts/endnotes/descriptor.ts","../src/parts/sdt/sdt-parse.ts","../src/parts/perm-start.ts","../src/parts/fonts/descriptor.ts","../src/parts/textbox/textbox.ts","../src/parts/object/object-element.ts","../src/parts/comments.ts","../src/parts/inline.ts","../src/parts/relationships.ts","../src/parts/bodychildren.ts"],"mappings":";;;;;;;;cAUa,aAAA;EAAA,SAKH,QAAA;EAAA,SAAA,QAAA;AAAA;AAAA,UAKO,wBAAA;EAEf,MAAA;EAEA,OAAO;AAAA;AAAA,UAMQ,wBAAA;EAEf,IAAA;EAEA,OAAA;EAEA,QAAA;AAAA;;;UC3Be,eAAA;EAEf,EAAE;AAAA;;;aCKQ,2BAAA;EACV,IAAA;EAIA,QAAA;EAIA,UAAA;EAIA,YAAA;AAAA;AAAA,UAGe,4BAAA;EAKf,SAAA;EAKA,eAAA,GAAkB,2BAA2B;AAAA;;;UCjC9B,UAAA;EAEf,GAAG;AAAA;;;cCQQ,YAAA;EAAA,SAKH,SAAA;EAAA,SAAA,sBAAA;AAAA;AAAA,UAWO,eAAA;EAEf,EAAA;EAEA,IAAA,WAAe,YAAA,eAA2B,YAAA;EAE1C,QAAA,GAAW,gBAAA;AAAA;;;UClBI,aAAA;EACf,KAAA,EAAO,GAAG,UAAU,gBAAA;AAAA;AAAA,cA6CT,aAAA,EAAe,gBAAA,CAAiB,aAAA,EAAe,WAAA;;;cC9D/C,WAAA;EAAA,SAIH,sBAAA;EAAA,SAAA,SAAA;AAAA;AAAA,UAEO,cAAA;EACf,EAAA;EACA,IAAA,WAAe,WAAA,eAA0B,WAAA;EACzC,QAAA,GAAW,gBAAA;AAAA;;;UCOI,YAAA;EACf,KAAA,EAAO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C/mBD,iBAAA;EACf,EAAA;EACA,IAAA;EACA,MAAA;EACA,UAAA;AAAA;AAAA,UAGe,kBAAA;EACf,aAAA,EAAe,iBAAiB;AAAA;AAAA,cAGrB,iBAAA,EAAmB,gBAAgB,CAAC,kBAAA;;;cC4BpC,YAAA,EAAc,gBAAA,CAAiB,eAAA,EAAiB,WAAA;AAAA,cA2EhD,UAAA,EAAY,gBAAA,CAAiB,aAAA,EAAe,WAAA;AAAA,UAmCxC,eAAA;EACf,UAAA,EAAY,oBAAA;EACZ,QAAA,GAAW,YAAY;AAAA;AAAA,iBA2ST,iBAAA,CACd,MAAA,GAAS,EAAA,EAAI,OAAA,EAAS,GAAA,EAAK,eAAA,KAAoB,YAAA;AAAA,cAcpC,YAAA,EAAc,gBAAA,CAAiB,eAAA,EAAiB,WAAA;AAAA,UA+C5C,+BAAA;EACf,OAAA;EACA,GAAA;EACA,WAAA,GAAc,kBAAA;EACd,QAAA,GAAW,YAAY;AAAA;AAAA,cAsBZ,kBAAA,EAAoB,gBAAA,CAAiB,+BAAA,EAAiC,WAAA"} |
+5
-5
@@ -1,6 +0,6 @@ | ||
| import { $ as RelativeVerticalPosition, A as footnotesDesc, B as settingsDesc, C as fontTableDesc, D as EditGroupType, E as AltChunkCollection, F as stringifyTableOfContents, G as Numbering, H as buildNumberingCache, I as parseToc, J as LevelSuffix, K as parseNumberingDefinitions, L as SdtDateMappingType, O as parseSdtBlock, Q as RelativeHorizontalPosition, R as SdtLock, S as bibliographyDesc, T as SubDocCollection, U as buildStyleCache, V as Styles, W as parseStyleDefinitions, X as TableLayoutType, Y as TABLE_BORDERS_NONE, Z as OverlapType, _ as commentsDesc, _t as AlignmentType, a as framesetXml, at as PositionalTabAlignment, b as DocPartType, c as corePropertiesDesc, ct as EmphasisMarkType, d as sdtBlockDesc, dt as HighlightColor, et as TableAnchorType, f as setBodyParseChild, ft as TextEffect, g as contentTypesDesc, gt as HeadingLevel, h as buildContentTypes, ht as TextboxTightWrapType, i as frameXml, it as RubyAlign, k as endnotesDesc, l as altChunkDesc, lt as UnderlineType, m as relationshipsDesc, mt as TextAlignmentType, nt as FormFieldTextType, o as webSettingsDesc, ot as PositionalTabLeader, p as subDocDesc, pt as PageNumber, q as LevelFormat, r as TargetScreenSize, rt as createFormFieldData, s as customPropertiesDesc, st as PositionalTabRelativeTo, tt as ProofErrorType, u as customXmlBlockDesc, ut as createImageData, v as DocPartBehavior, w as CharacterSet, x as glossaryDesc, y as DocPartGallery, z as StyleLevel } from "./context-DkABanLH.mjs"; | ||
| import { $ as TextHorzOverflowType, B as HorizontalPositionAlign, C as createPageSize, D as stringifyJsonChild, E as tableDesc, G as createWrapTight, H as SpaceType, I as createVerticalPosition, J as WidthType, K as TextWrappingSide, L as createHorizontalPosition, N as drawingDesc, O as stringifyParagraphInline, P as resetDrawingIdGen, Q as TextBodyWrappingType, R as HorizontalPositionRelativeFrom, S as PageOrientation, T as setTableParseChild, U as VerticalPositionAlign, V as NumberFormat, W as createWrapThrough, X as TextDirection, Y as BorderStyle, Z as VerticalMergeType, _ as DocumentGridType, a as HeaderFooterType, at as Media, b as sectionPageSizeDefaults, c as createSectionType, d as createPageMargin, et as TextVertOverflowType, f as PageBorderDisplay, g as createPageNumberType, h as PageNumberSeparator, i as HeaderFooterReferenceType, it as WORKAROUND2, k as stringifyRunInline, l as LineNumberRestartFormat, m as PageBorderZOrder, n as sectionPropertiesDesc, nt as VerticalAnchor, o as createHeaderFooterReference, ot as createTransformation, p as PageBorderOffsetFrom, q as TextWrappingType, r as stringifySectionPropertiesXml, rt as createBodyProperties, s as SectionType, t as parseSectionPropertiesEl, tt as TextVerticalType, u as createLineNumberType, v as createDocumentGrid, w as DocumentAttributeNamespaces, x as PageTextDirectionType, y as sectionMarginDefaults, z as VerticalPositionRelativeFrom } from "./document-Ch4dyBB4.mjs"; | ||
| import { $ as RelativeVerticalPosition, A as footnotesDesc, B as settingsDesc, C as fontTableDesc, D as EditGroupType, E as AltChunkCollection, F as stringifyTableOfContents, G as Numbering, H as buildNumberingCache, I as parseToc, J as LevelSuffix, K as parseNumberingDefinitions, L as SdtDateMappingType, O as parseSdtBlock, Q as RelativeHorizontalPosition, R as SdtLock, S as bibliographyDesc, T as SubDocCollection, U as buildStyleCache, V as Styles, W as parseStyleDefinitions, X as TableLayoutType, Y as TABLE_BORDERS_NONE, Z as OverlapType, _ as commentsDesc, _t as AlignmentType, a as framesetXml, at as PositionalTabAlignment, b as DocPartType, c as corePropertiesDesc, ct as EmphasisMarkType, d as sdtBlockDesc, dt as HighlightColor, et as TableAnchorType, f as setBodyParseChild, ft as TextEffect, g as contentTypesDesc, gt as HeadingLevel, h as buildContentTypes, ht as TextboxTightWrapType, i as frameXml, it as RubyAlign, k as endnotesDesc, l as altChunkDesc, lt as UnderlineType, m as relationshipsDesc, mt as TextAlignmentType, nt as FormFieldTextType, o as webSettingsDesc, ot as PositionalTabLeader, p as subDocDesc, pt as PageNumber, q as LevelFormat, r as TargetScreenSize, rt as createFormFieldData, s as customPropertiesDesc, st as PositionalTabRelativeTo, tt as ProofErrorType, u as customXmlBlockDesc, ut as createImageData, v as DocPartBehavior, w as CharacterSet, x as glossaryDesc, y as DocPartGallery, z as StyleLevel } from "./context-CERMOUn0.mjs"; | ||
| import { $ as TextHorzOverflowType, B as HorizontalPositionAlign, C as createPageSize, D as stringifyChildDispatch, E as tableDesc, G as createWrapTight, H as SpaceType, I as createVerticalPosition, J as WidthType, K as TextWrappingSide, L as createHorizontalPosition, N as drawingDesc, O as stringifyParagraphInline, P as resetDrawingIdGen, Q as TextBodyWrappingType, R as HorizontalPositionRelativeFrom, S as PageOrientation, T as setTableParseChild, U as VerticalPositionAlign, V as NumberFormat, W as createWrapThrough, X as TextDirection, Y as BorderStyle, Z as VerticalMergeType, _ as DocumentGridType, a as HeaderFooterType, at as Media, b as sectionPageSizeDefaults, c as createSectionType, d as createPageMargin, et as TextVertOverflowType, f as PageBorderDisplay, g as createPageNumberType, h as PageNumberSeparator, i as HeaderFooterReferenceType, it as WORKAROUND2, k as stringifyRunInline, l as LineNumberRestartFormat, m as PageBorderZOrder, n as sectionPropertiesDesc, nt as VerticalAnchor, o as createHeaderFooterReference, ot as createTransformation, p as PageBorderOffsetFrom, q as TextWrappingType, r as stringifySectionPropertiesXml, rt as createBodyProperties, s as SectionType, t as parseSectionPropertiesEl, tt as TextVerticalType, u as createLineNumberType, v as createDocumentGrid, w as DocumentAttributeNamespaces, x as PageTextDirectionType, y as sectionMarginDefaults, z as VerticalPositionRelativeFrom } from "./document-CeM-U6J3.mjs"; | ||
| import { PatchType, patchDetector, patchDocument } from "./patch/index.mjs"; | ||
| import { n as parseDocument, r as parseDocx, t as parseArchive } from "./parse-0XGa3h9q.mjs"; | ||
| import { n as generateDocumentStream, r as generateDocumentSync, t as generateDocument } from "./generate-DQ6qeP58.mjs"; | ||
| import { n as parseDocument, r as parseDocx, t as parseArchive } from "./parse-BIJM6_8Y.mjs"; | ||
| import { n as generateDocumentStream, r as generateDocumentSync, t as generateDocument } from "./generate-DiDgl0bc.mjs"; | ||
| //#region src/parts/paragraph/formatting/break.ts | ||
@@ -399,4 +399,4 @@ /** | ||
| //#endregion | ||
| export { AlignmentType, AltChunkCollection, BorderStyle, BreakType, CharacterSet, DocPartBehavior, DocPartGallery, DocPartType, DocumentAttributeNamespaces, DocumentGridType, DropCapType, EditGroupType, EmphasisMarkType, EndnoteType, FootnoteType, FormFieldTextType, FrameAnchorType, FrameWrap, HeaderFooterReferenceType, HeaderFooterType, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HyperlinkType, LeaderType, LevelFormat, LevelSuffix, LineNumberRestartFormat, LineRuleType, Media, NumberFormat, NumberedItemReferenceFormat, Numbering, OverlapType, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageNumber, PageNumberSeparator, PageOrientation, PageTextDirectionType, PatchType, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, ProofErrorType, RelativeHorizontalPosition, RelativeVerticalPosition, RubyAlign, SdtDateMappingType, SdtLock, SectionType, ShadingType, SpaceType, StyleLevel, Styles, SubDocCollection, TABLE_BORDERS_NONE, TabStopPosition, TabStopType, TableAnchorType, TableLayoutType, TargetScreenSize, TextAlignmentType, TextBodyWrappingType, TextDirection, TextEffect, TextHorzOverflowType, TextVertOverflowType, TextVerticalType, TextWrappingSide, TextWrappingType, TextboxTightWrapType, UnderlineType, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WidthType, altChunkDesc, bibliographyDesc, buildContentTypes, buildNumberingCache, buildStyleCache, commentsDesc, contentTypesDesc, corePropertiesDesc, createBodyProperties, createDocumentGrid, createFormFieldData, createHeaderFooterReference, createHorizontalPosition, createImageData, createLineNumberType, createPageMargin, createPageNumberType, createPageSize, createSectionType, createTransformation, createVerticalAlign, createVerticalPosition, createWrapThrough, createWrapTight, customPropertiesDesc, customXmlBlockDesc, drawingDesc, endnotesDesc, fontTableDesc, footnotesDesc, frameXml, framesetXml, generateDocument, generateDocumentStream, generateDocumentSync, glossaryDesc, parseArchive, parseDocument, parseDocx, parseNumberingDefinitions, parseSdtBlock, parseSectionPropertiesEl, parseStyleDefinitions, parseToc, patchDetector, patchDocument, relationshipsDesc, resetDrawingIdGen, sdtBlockDesc, sectionMarginDefaults, sectionPageSizeDefaults, sectionPropertiesDesc, setBodyParseChild, setTableParseChild, settingsDesc, stringifyJsonChild, stringifyParagraphInline, stringifyRunInline, stringifySectionPropertiesXml, stringifyTableOfContents, subDocDesc, tableDesc, webSettingsDesc }; | ||
| export { AlignmentType, AltChunkCollection, BorderStyle, BreakType, CharacterSet, DocPartBehavior, DocPartGallery, DocPartType, DocumentAttributeNamespaces, DocumentGridType, DropCapType, EditGroupType, EmphasisMarkType, EndnoteType, FootnoteType, FormFieldTextType, FrameAnchorType, FrameWrap, HeaderFooterReferenceType, HeaderFooterType, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HyperlinkType, LeaderType, LevelFormat, LevelSuffix, LineNumberRestartFormat, LineRuleType, Media, NumberFormat, NumberedItemReferenceFormat, Numbering, OverlapType, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageNumber, PageNumberSeparator, PageOrientation, PageTextDirectionType, PatchType, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, ProofErrorType, RelativeHorizontalPosition, RelativeVerticalPosition, RubyAlign, SdtDateMappingType, SdtLock, SectionType, ShadingType, SpaceType, StyleLevel, Styles, SubDocCollection, TABLE_BORDERS_NONE, TabStopPosition, TabStopType, TableAnchorType, TableLayoutType, TargetScreenSize, TextAlignmentType, TextBodyWrappingType, TextDirection, TextEffect, TextHorzOverflowType, TextVertOverflowType, TextVerticalType, TextWrappingSide, TextWrappingType, TextboxTightWrapType, UnderlineType, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WidthType, altChunkDesc, bibliographyDesc, buildContentTypes, buildNumberingCache, buildStyleCache, commentsDesc, contentTypesDesc, corePropertiesDesc, createBodyProperties, createDocumentGrid, createFormFieldData, createHeaderFooterReference, createHorizontalPosition, createImageData, createLineNumberType, createPageMargin, createPageNumberType, createPageSize, createSectionType, createTransformation, createVerticalAlign, createVerticalPosition, createWrapThrough, createWrapTight, customPropertiesDesc, customXmlBlockDesc, drawingDesc, endnotesDesc, fontTableDesc, footnotesDesc, frameXml, framesetXml, generateDocument, generateDocumentStream, generateDocumentSync, glossaryDesc, parseArchive, parseDocument, parseDocx, parseNumberingDefinitions, parseSdtBlock, parseSectionPropertiesEl, parseStyleDefinitions, parseToc, patchDetector, patchDocument, relationshipsDesc, resetDrawingIdGen, sdtBlockDesc, sectionMarginDefaults, sectionPageSizeDefaults, sectionPropertiesDesc, setBodyParseChild, setTableParseChild, settingsDesc, stringifyChildDispatch, stringifyParagraphInline, stringifyRunInline, stringifySectionPropertiesXml, stringifyTableOfContents, subDocDesc, tableDesc, webSettingsDesc }; | ||
| //# sourceMappingURL=index.mjs.map |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { _ as parseDocument, g as parseArchive, h as DocxPartRefs, m as DocxDocument, v as parseDocx } from "./core-properties-C79Z-ZPE.mjs"; | ||
| import { _ as parseDocument, g as parseArchive, h as DocxPartRefs, m as DocxDocument, v as parseDocx } from "./core-properties-Bh8_D5Kh.mjs"; | ||
| export { DocxDocument, DocxPartRefs, parseArchive, parseDocument, parseDocx }; |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { n as parseDocument, r as parseDocx, t as parseArchive } from "./parse-0XGa3h9q.mjs"; | ||
| import { n as parseDocument, r as parseDocx, t as parseArchive } from "./parse-BIJM6_8Y.mjs"; | ||
| export { parseArchive, parseDocument, parseDocx }; |
@@ -1,2 +0,2 @@ | ||
| import { wt as SectionChild } from "../core-properties-C79Z-ZPE.mjs"; | ||
| import { wt as SectionChild } from "../core-properties-Bh8_D5Kh.mjs"; | ||
| import { OutputByType, OutputType } from "@office-open/core"; | ||
@@ -3,0 +3,0 @@ import { Buffer } from "\u0000polyfill-node.buffer"; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/patch/from-docx.ts","../../src/patch/patch-detector.ts"],"mappings":";;;;;KAgHY,aAAA,GAAgB,MAAA,uBAA6B,UAAA,GAAa,WAAA,GAAc,IAAA;AAAA,cAOvE,SAAA;EAAA,SAGH,QAAA;EAAA,SAAA,SAAA;AAAA;AAAA,UAEA,cAAA;EACR,IAAA,SAAa,SAAA,CAAU,SAAS;EAChC,QAAA;AAAA;AAAA,UAGQ,SAAA;EACR,IAAA,SAAa,SAAA,CAAU,QAAA;EACvB,QAAA,EAAU,YAAY;AAAA;AAAA,KAaZ,KAAA,GAAQ,cAAA,GAAiB,SAAS;AAAA,KAElC,uBAAA,GAA0B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AiC,uBAAA,GAA0B,uBAAA;EAAyB,UAAA;EAAA,IAAA;EAAA,OAAA;EAAA,kBAAA;EAAA,qBAAA;EAAA;AAAA,GAO9F,oBAAA,CAAqB,CAAA,MAAK,OAAA,CAAQ,YAAA,CAAa,CAAA;;;UChLxC,oBAAA;EACR,IAAA,EAAM,aAAa;AAAA;AAAA,cA4BR,aAAA;EAAuB;AAAA,GAAU,oBAAA,KAAuB,OAAA"} |
@@ -1,2 +0,2 @@ | ||
| import { D as stringifyJsonChild, E as tableDesc, O as stringifyParagraphInline, at as Media, k as stringifyRunInline, w as DocumentAttributeNamespaces } from "../document-Ch4dyBB4.mjs"; | ||
| import { D as stringifyChildDispatch, E as tableDesc, O as stringifyParagraphInline, at as Media, k as stringifyRunInline, w as DocumentAttributeNamespaces } from "../document-CeM-U6J3.mjs"; | ||
| import { DOCX_NS, OoxmlMimeType, TargetModeType, appendContentType, appendRelationship, createReplacer, createTraverser, getNextRelationshipIndex, getReferencedMedia, replaceImagePlaceholders, strFromU8, toJson, toUint8Array, unzipSync, zipAndConvert } from "@office-open/core"; | ||
@@ -47,3 +47,3 @@ import { escapeXml, js2xml, xml2js } from "@office-open/xml"; | ||
| else { | ||
| const jr = stringifyJsonChild(child, currentPatchCtx); | ||
| const jr = stringifyChildDispatch(child, currentPatchCtx); | ||
| if (jr !== void 0) xmlStr = Array.isArray(jr) ? jr.join("") : jr; | ||
@@ -50,0 +50,0 @@ else xmlStr = stringifyRunInline(child, currentPatchCtx); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.mjs","names":[],"sources":["../../src/patch/from-docx.ts","../../src/patch/patch-detector.ts"],"sourcesContent":["import { TargetModeType } from \"@office-open/core\";\nimport {\n DOCX_NS,\n OoxmlMimeType,\n appendContentType,\n appendRelationship,\n createReplacer,\n getNextRelationshipIndex,\n getReferencedMedia,\n replaceImagePlaceholders,\n strFromU8,\n toJson,\n unzipSync,\n zipAndConvert,\n} from \"@office-open/core\";\nimport type { OutputByType, OutputType } from \"@office-open/core\";\nimport { toUint8Array } from \"@office-open/core\";\nimport { escapeXml, js2xml, xml2js } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport { DocumentAttributeNamespaces } from \"@parts/document\";\nimport { stringifyJsonChild, stringifyParagraphInline, stringifyRunInline } from \"@parts/inline\";\nimport type { ParagraphChild } from \"@parts/inline\";\nimport type { ParagraphOptions } from \"@parts/paragraph/paragraph\";\nimport type { RunOptions } from \"@parts/paragraph/run/run\";\nimport { tableDesc } from \"@parts/table/descriptor\";\nimport type { TableOptions } from \"@parts/table/table\";\nimport { Media } from \"@shared/media\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport type { BodyContext } from \"../context\";\nimport type { ViewWrapper } from \"../context\";\n\n/** Reusable TextEncoder (stateless, safe to share). */\nconst encoder = new TextEncoder();\n\n/**\n * Document patching module for modifying existing .docx files.\n *\n * Uses compile-path stringifiers (zero class instantiation) to serialize\n * patch content — no Formatter, no XmlComponent instances.\n *\n * @module\n */\n\n// ── Patch content stringification ──\n\n/**\n * Lightweight BodyContext adapter for patch serialization.\n * Captures hyperlink and image relationships for post-processing.\n */\nfunction createPatchContext(\n file: { media: Media },\n hyperlinkSink: Array<{ id: string; link: string }>,\n): BodyContext {\n return {\n fileData: file as unknown as BodyContext[\"fileData\"],\n file: file as unknown as BodyContext[\"file\"],\n viewWrapper: {\n relationships: {\n addRelationship: (linkId: string, _type: string, target: string, _mode?: string) => {\n hyperlinkSink.push({ id: linkId, link: target });\n },\n relationshipCount: 0,\n },\n } as unknown as BodyContext[\"viewWrapper\"],\n stringifyChild: () => \"\",\n addRelationship: () => \"\",\n addMedia: () => \"\",\n };\n}\n\nconst docxReplacer = createReplacer({\n ns: DOCX_NS,\n formatChild: (child: unknown): Element[] => {\n let xmlStr: string;\n\n if (typeof child === \"string\") {\n // Plain string → simple run\n xmlStr = `<w:r><w:t xml:space=\"preserve\">${escapeXml(child)}</w:t></w:r>`;\n } else if (typeof child === \"object\" && child !== null) {\n const obj = child as Record<string, unknown>;\n // SectionChild level (paragraph / table) — for DOCUMENT patches\n if (\"paragraph\" in obj) {\n xmlStr = stringifyParagraphInline(obj.paragraph as ParagraphOptions, currentPatchCtx);\n } else if (\"table\" in obj) {\n xmlStr = tableDesc.stringify(obj.table as TableOptions, currentPatchCtx) ?? \"\";\n } else {\n // ParagraphChild level — for PARAGRAPH patches\n // Try compile-path JSON child dispatch first\n const jr = stringifyJsonChild(child as ParagraphChild, currentPatchCtx);\n if (jr !== undefined) {\n xmlStr = Array.isArray(jr) ? jr.join(\"\") : jr;\n } else {\n // RunOptions (plain objects with text/children/bold/etc.)\n xmlStr = stringifyRunInline(child as RunOptions, currentPatchCtx);\n }\n }\n } else {\n xmlStr = \"<w:r/>\";\n }\n\n const jsonObj = xml2js(xmlStr, { captureSpacesBetweenElements: true });\n return [jsonObj.elements![0]];\n },\n});\n\n/** Current patch context — set per file in the main loop. */\nlet currentPatchCtx: BodyContext;\n\n/**\n * Supported input data types for document patching.\n */\nexport type InputDataType = Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob;\n\n/**\n * Patch type enumeration.\n *\n * @publicApi\n */\nexport const PatchType = {\n DOCUMENT: \"file\",\n PARAGRAPH: \"paragraph\",\n} as const;\n\ninterface ParagraphPatch {\n type: typeof PatchType.PARAGRAPH;\n children: unknown[];\n}\n\ninterface FilePatch {\n type: typeof PatchType.DOCUMENT;\n children: SectionChild[];\n}\n\ninterface ImageRelationshipAddition {\n key: string;\n mediaDatas: { fileName: string }[];\n}\n\ninterface HyperlinkRelationshipAddition {\n key: string;\n hyperlink: { id: string; link: string };\n}\n\nexport type Patch = ParagraphPatch | FilePatch;\n\nexport type PatchDocumentOutputType = OutputType;\n\nexport interface PatchDocumentOptions<T extends PatchDocumentOutputType = PatchDocumentOutputType> {\n outputType: T;\n data: InputDataType;\n patches: Readonly<Record<string, Patch>>;\n keepOriginalStyles?: boolean;\n placeholderDelimiters?: Readonly<{\n start: string;\n end: string;\n }>;\n recursive?: boolean;\n}\n\nconst UTF16LE = new Uint8Array([0xff, 0xfe]);\nconst UTF16BE = new Uint8Array([0xfe, 0xff]);\n\nconst compareByteArrays = (a: Uint8Array, b: Uint8Array): boolean => {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Patches an existing .docx document by replacing placeholders with new content.\n *\n * @publicApi\n */\nexport const patchDocument = async <T extends PatchDocumentOutputType = PatchDocumentOutputType>({\n outputType,\n data,\n patches,\n keepOriginalStyles = true,\n placeholderDelimiters = { end: \"}}\", start: \"{{\" } as const,\n recursive = true,\n}: PatchDocumentOptions<T>): Promise<OutputByType[T]> => {\n const zipContent = unzipSync(toUint8Array(data));\n const contexts = new Map<string, BodyContext>();\n const media = new Media();\n const file = { media } as BodyContext[\"file\"];\n\n const map = new Map<string, Element>();\n\n const imageRelationshipAdditions: ImageRelationshipAddition[] = [];\n const hyperlinkRelationshipAdditions: HyperlinkRelationshipAddition[] = [];\n let hasMedia = false;\n\n const binaryContentMap = new Map<string, Uint8Array>();\n\n for (const [key, value] of Object.entries(zipContent)) {\n const startBytes = value.slice(0, 2);\n if (compareByteArrays(startBytes, UTF16LE) || compareByteArrays(startBytes, UTF16BE)) {\n binaryContentMap.set(key, value);\n continue;\n }\n\n if (!key.endsWith(\".xml\") && !key.endsWith(\".rels\")) {\n binaryContentMap.set(key, value);\n continue;\n }\n\n const json = toJson(strFromU8(value));\n\n if (key === \"word/document.xml\") {\n const document = json.elements?.find((i) => i.name === \"w:document\");\n if (document && document.attributes) {\n for (const ns of [\"mc\", \"wp\", \"r\", \"w15\", \"m\"] as const) {\n document.attributes[`xmlns:${ns}`] = DocumentAttributeNamespaces[ns];\n }\n document.attributes[\"mc:Ignorable\"] =\n `${document.attributes[\"mc:Ignorable\"] || \"\"} w15`.trim();\n }\n }\n\n if (key.startsWith(\"word/\") && !key.endsWith(\".xml.rels\")) {\n const hyperlinkSink: Array<{ id: string; link: string }> = [];\n\n const context: BodyContext = {\n fileData: file,\n file,\n viewWrapper: {\n relationships: {\n addRelationship: (\n linkId: string,\n _: string,\n target: string,\n __: (typeof TargetModeType)[keyof typeof TargetModeType],\n ) => {\n hyperlinkRelationshipAdditions.push({\n hyperlink: {\n id: linkId,\n link: target,\n },\n key,\n });\n },\n },\n } as unknown as ViewWrapper,\n stringifyChild: () => \"\",\n addRelationship: () => \"\",\n addMedia: () => \"\",\n };\n contexts.set(key, context);\n\n if (!placeholderDelimiters?.start.trim() || !placeholderDelimiters?.end.trim()) {\n throw new Error(\"Both start and end delimiters must be non-empty strings.\");\n }\n\n const { start, end } = placeholderDelimiters;\n\n // Create compile-path context for stringifying patch children\n const patchCtx = createPatchContext(file, hyperlinkSink);\n currentPatchCtx = patchCtx;\n\n for (const [patchKey, patchValue] of Object.entries(patches)) {\n const patchText = `${start}${patchKey}${end}`;\n while (true) {\n const { didFindOccurrence } = docxReplacer({\n context,\n json,\n keepOriginalStyles,\n patch: patchValue,\n patchText,\n });\n if (!recursive || !didFindOccurrence) {\n break;\n }\n }\n }\n\n // Flush hyperlink relationships captured by the compile-path context\n for (const hl of hyperlinkSink) {\n hyperlinkRelationshipAdditions.push({\n hyperlink: { id: hl.id, link: hl.link },\n key,\n });\n }\n\n const mediaDatas = getReferencedMedia(JSON.stringify(json), media.array);\n if (mediaDatas.length > 0) {\n hasMedia = true;\n imageRelationshipAdditions.push({\n key,\n mediaDatas,\n });\n }\n }\n\n map.set(key, json);\n }\n\n for (const { key, mediaDatas } of imageRelationshipAdditions) {\n const relationshipKey = `word/_rels/${key.split(\"/\").pop()}.rels`;\n const relationshipsJson = map.get(relationshipKey) ?? createRelationshipFile();\n map.set(relationshipKey, relationshipsJson);\n\n const index = getNextRelationshipIndex(relationshipsJson);\n const newJson = replaceImagePlaceholders(\n JSON.stringify(map.get(key)),\n mediaDatas,\n index,\n \"plain\",\n );\n map.set(key, JSON.parse(newJson) as Element);\n\n for (let i = 0; i < mediaDatas.length; i++) {\n const { fileName } = mediaDatas[i];\n appendRelationship(\n relationshipsJson,\n index + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${fileName}`,\n );\n }\n }\n\n for (const { key, hyperlink } of hyperlinkRelationshipAdditions) {\n const relationshipKey = `word/_rels/${key.split(\"/\").pop()}.rels`;\n\n const relationshipsJson = map.get(relationshipKey) ?? createRelationshipFile();\n map.set(relationshipKey, relationshipsJson);\n\n appendRelationship(\n relationshipsJson,\n hyperlink.id,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",\n hyperlink.link,\n TargetModeType.EXTERNAL,\n );\n }\n\n if (hasMedia) {\n const contentTypesJson = map.get(\"[Content_Types].xml\");\n\n if (!contentTypesJson) {\n throw new Error(\"Could not find content types file\");\n }\n\n appendContentType(contentTypesJson, \"image/png\", \"png\");\n appendContentType(contentTypesJson, \"image/jpeg\", \"jpeg\");\n appendContentType(contentTypesJson, \"image/jpeg\", \"jpg\");\n appendContentType(contentTypesJson, \"image/bmp\", \"bmp\");\n appendContentType(contentTypesJson, \"image/gif\", \"gif\");\n appendContentType(contentTypesJson, \"image/svg+xml\", \"svg\");\n }\n\n const files: Record<string, Uint8Array> = {};\n\n for (const [key, value] of map) {\n files[key] = encoder.encode(js2xml(value));\n }\n\n for (const [key, value] of binaryContentMap) {\n files[key] = value;\n }\n\n for (const { data: mediaData, fileName } of media.array) {\n files[`word/media/${fileName}`] =\n mediaData instanceof Uint8Array ? mediaData : new Uint8Array(mediaData);\n }\n\n return await zipAndConvert(files, outputType, OoxmlMimeType.DOCX);\n};\n\nconst createRelationshipFile = (): Element => ({\n declaration: {\n attributes: {\n encoding: \"UTF-8\",\n standalone: \"yes\",\n version: \"1.0\",\n },\n },\n elements: [\n {\n attributes: {\n xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\",\n },\n elements: [],\n name: \"Relationships\",\n type: \"element\",\n },\n ],\n});\n","/**\n * Patch detector for discovering placeholders in document templates.\n *\n * @module\n */\nimport { DOCX_NS, createTraverser, strFromU8, toJson, unzipSync } from \"@office-open/core\";\nimport { toUint8Array } from \"@office-open/core\";\n\nimport type { InputDataType } from \"./from-docx\";\n\n/**\n * Options for patch detection.\n *\n * @property data - The document template to scan for placeholders\n */\ninterface PatchDetectorOptions {\n data: InputDataType;\n}\n\n/**\n * Detects all placeholders present in a document template.\n *\n * Scans through all XML content in a .docx file to find placeholder text\n * enclosed in delimiters (default: {{placeholder}}). This is useful for\n * discovering what patches a template expects before performing replacement.\n *\n * @param options - Patch detector configuration\n * @returns Array of placeholder keys found in the document\n *\n * @example\n * ```typescript\n * const placeholders = await patchDetector({ data: templateBuffer });\n * // Returns: [\"name\", \"date\", \"address\"] if template contains {{name}}, {{date}}, {{address}}\n *\n * // Use detected placeholders to create patches\n * const patches = {};\n * for (const key of placeholders) {\n * patches[key] = {\n * type: PatchType.PARAGRAPH,\n * children: [new TextRun(getUserData(key))],\n * };\n * });\n * ```\n */\nexport const patchDetector = async ({ data }: PatchDetectorOptions): Promise<string[]> => {\n const zipContent = unzipSync(toUint8Array(data));\n const patches = new Set<string>();\n\n for (const [key, value] of Object.entries(zipContent)) {\n if (!key.endsWith(\".xml\") && !key.endsWith(\".rels\")) {\n continue;\n }\n if (key.startsWith(\"word/\") && !key.endsWith(\".xml.rels\")) {\n const json = toJson(strFromU8(value));\n const { traverse } = createTraverser(DOCX_NS);\n for (const p of traverse(json)) {\n for (const patch of findPatchKeys(p.text)) {\n patches.add(patch);\n }\n }\n }\n }\n return [...patches];\n};\n\n/**\n * Extracts placeholder keys from text using regex pattern.\n *\n * @param text - Text to search for placeholders\n * @returns Array of placeholder keys (without delimiters)\n */\nconst findPatchKeys = (text: string): string[] => {\n const pattern = /(?<=\\{\\{).+?(?=\\}\\})/gs;\n return text.match(pattern) ?? [];\n};\n"],"mappings":";;;;;AAiCA,MAAM,UAAU,IAAI,YAAY;;;;;;;;;;;;;AAiBhC,SAAS,mBAC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AAU,CAAC;EACX,MAAM;EACN,MAAM;CACR,CACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9VA,MAAa,gBAAgB,OAAO,EAAE,WAAoD;CACxF,MAAM,aAAa,UAAU,aAAa,IAAI,CAAC;CAC/C,MAAM,0BAAU,IAAI,IAAY;CAEhC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,UAAU,GAAG;EACrD,IAAI,CAAC,IAAI,SAAS,MAAM,KAAK,CAAC,IAAI,SAAS,OAAO,GAChD;EAEF,IAAI,IAAI,WAAW,OAAO,KAAK,CAAC,IAAI,SAAS,WAAW,GAAG;GACzD,MAAM,OAAO,OAAO,UAAU,KAAK,CAAC;GACpC,MAAM,EAAE,aAAa,gBAAgB,OAAO;GAC5C,KAAK,MAAM,KAAK,SAAS,IAAI,GAC3B,KAAK,MAAM,SAAS,cAAc,EAAE,IAAI,GACtC,QAAQ,IAAI,KAAK;EAGvB;CACF;CACA,OAAO,CAAC,GAAG,OAAO;AACpB;;;;;;;AAQA,MAAM,iBAAiB,SAA2B;CAEhD,OAAO,KAAK,MAAM,wBAAO,KAAK,CAAC;AACjC"} | ||
| {"version":3,"file":"index.mjs","names":[],"sources":["../../src/patch/from-docx.ts","../../src/patch/patch-detector.ts"],"sourcesContent":["import { TargetModeType } from \"@office-open/core\";\nimport {\n DOCX_NS,\n OoxmlMimeType,\n appendContentType,\n appendRelationship,\n createReplacer,\n getNextRelationshipIndex,\n getReferencedMedia,\n replaceImagePlaceholders,\n strFromU8,\n toJson,\n unzipSync,\n zipAndConvert,\n} from \"@office-open/core\";\nimport type { OutputByType, OutputType } from \"@office-open/core\";\nimport { toUint8Array } from \"@office-open/core\";\nimport { escapeXml, js2xml, xml2js } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport { DocumentAttributeNamespaces } from \"@parts/document\";\nimport {\n stringifyChildDispatch,\n stringifyParagraphInline,\n stringifyRunInline,\n} from \"@parts/inline\";\nimport type { ParagraphChild } from \"@parts/paragraph/paragraph\";\nimport type { ParagraphOptions } from \"@parts/paragraph/paragraph\";\nimport type { RunOptions } from \"@parts/paragraph/run/run\";\nimport { tableDesc } from \"@parts/table/descriptor\";\nimport type { TableOptions } from \"@parts/table/table\";\nimport { Media } from \"@shared/media\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport type { BodyContext } from \"../context\";\nimport type { ViewWrapper } from \"../context\";\n\n/** Reusable TextEncoder (stateless, safe to share). */\nconst encoder = new TextEncoder();\n\n/**\n * Document patching module for modifying existing .docx files.\n *\n * Uses compile-path stringifiers (zero class instantiation) to serialize\n * patch content — no Formatter, no XmlComponent instances.\n *\n * @module\n */\n\n// ── Patch content stringification ──\n\n/**\n * Lightweight BodyContext adapter for patch serialization.\n * Captures hyperlink and image relationships for post-processing.\n */\nfunction createPatchContext(\n file: { media: Media },\n hyperlinkSink: Array<{ id: string; link: string }>,\n): BodyContext {\n return {\n fileData: file as unknown as BodyContext[\"fileData\"],\n file: file as unknown as BodyContext[\"file\"],\n viewWrapper: {\n relationships: {\n addRelationship: (linkId: string, _type: string, target: string, _mode?: string) => {\n hyperlinkSink.push({ id: linkId, link: target });\n },\n relationshipCount: 0,\n },\n } as unknown as BodyContext[\"viewWrapper\"],\n stringifyChild: () => \"\",\n addRelationship: () => \"\",\n addMedia: () => \"\",\n };\n}\n\nconst docxReplacer = createReplacer({\n ns: DOCX_NS,\n formatChild: (child: unknown): Element[] => {\n let xmlStr: string;\n\n if (typeof child === \"string\") {\n // Plain string → simple run\n xmlStr = `<w:r><w:t xml:space=\"preserve\">${escapeXml(child)}</w:t></w:r>`;\n } else if (typeof child === \"object\" && child !== null) {\n const obj = child as Record<string, unknown>;\n // SectionChild level (paragraph / table) — for DOCUMENT patches\n if (\"paragraph\" in obj) {\n xmlStr = stringifyParagraphInline(obj.paragraph as ParagraphOptions, currentPatchCtx);\n } else if (\"table\" in obj) {\n xmlStr = tableDesc.stringify(obj.table as TableOptions, currentPatchCtx) ?? \"\";\n } else {\n // ParagraphChild level — for PARAGRAPH patches\n // Try compile-path JSON child dispatch first\n const jr = stringifyChildDispatch(child as ParagraphChild, currentPatchCtx);\n if (jr !== undefined) {\n xmlStr = Array.isArray(jr) ? jr.join(\"\") : jr;\n } else {\n // RunOptions (plain objects with text/children/bold/etc.)\n xmlStr = stringifyRunInline(child as RunOptions, currentPatchCtx);\n }\n }\n } else {\n xmlStr = \"<w:r/>\";\n }\n\n const jsonObj = xml2js(xmlStr, { captureSpacesBetweenElements: true });\n return [jsonObj.elements![0]];\n },\n});\n\n/** Current patch context — set per file in the main loop. */\nlet currentPatchCtx: BodyContext;\n\n/**\n * Supported input data types for document patching.\n */\nexport type InputDataType = Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob;\n\n/**\n * Patch type enumeration.\n *\n * @publicApi\n */\nexport const PatchType = {\n DOCUMENT: \"file\",\n PARAGRAPH: \"paragraph\",\n} as const;\n\ninterface ParagraphPatch {\n type: typeof PatchType.PARAGRAPH;\n children: unknown[];\n}\n\ninterface FilePatch {\n type: typeof PatchType.DOCUMENT;\n children: SectionChild[];\n}\n\ninterface ImageRelationshipAddition {\n key: string;\n mediaDatas: { fileName: string }[];\n}\n\ninterface HyperlinkRelationshipAddition {\n key: string;\n hyperlink: { id: string; link: string };\n}\n\nexport type Patch = ParagraphPatch | FilePatch;\n\nexport type PatchDocumentOutputType = OutputType;\n\nexport interface PatchDocumentOptions<T extends PatchDocumentOutputType = PatchDocumentOutputType> {\n outputType: T;\n data: InputDataType;\n patches: Readonly<Record<string, Patch>>;\n keepOriginalStyles?: boolean;\n placeholderDelimiters?: Readonly<{\n start: string;\n end: string;\n }>;\n recursive?: boolean;\n}\n\nconst UTF16LE = new Uint8Array([0xff, 0xfe]);\nconst UTF16BE = new Uint8Array([0xfe, 0xff]);\n\nconst compareByteArrays = (a: Uint8Array, b: Uint8Array): boolean => {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Patches an existing .docx document by replacing placeholders with new content.\n *\n * @publicApi\n */\nexport const patchDocument = async <T extends PatchDocumentOutputType = PatchDocumentOutputType>({\n outputType,\n data,\n patches,\n keepOriginalStyles = true,\n placeholderDelimiters = { end: \"}}\", start: \"{{\" } as const,\n recursive = true,\n}: PatchDocumentOptions<T>): Promise<OutputByType[T]> => {\n const zipContent = unzipSync(toUint8Array(data));\n const contexts = new Map<string, BodyContext>();\n const media = new Media();\n const file = { media } as BodyContext[\"file\"];\n\n const map = new Map<string, Element>();\n\n const imageRelationshipAdditions: ImageRelationshipAddition[] = [];\n const hyperlinkRelationshipAdditions: HyperlinkRelationshipAddition[] = [];\n let hasMedia = false;\n\n const binaryContentMap = new Map<string, Uint8Array>();\n\n for (const [key, value] of Object.entries(zipContent)) {\n const startBytes = value.slice(0, 2);\n if (compareByteArrays(startBytes, UTF16LE) || compareByteArrays(startBytes, UTF16BE)) {\n binaryContentMap.set(key, value);\n continue;\n }\n\n if (!key.endsWith(\".xml\") && !key.endsWith(\".rels\")) {\n binaryContentMap.set(key, value);\n continue;\n }\n\n const json = toJson(strFromU8(value));\n\n if (key === \"word/document.xml\") {\n const document = json.elements?.find((i) => i.name === \"w:document\");\n if (document && document.attributes) {\n for (const ns of [\"mc\", \"wp\", \"r\", \"w15\", \"m\"] as const) {\n document.attributes[`xmlns:${ns}`] = DocumentAttributeNamespaces[ns];\n }\n document.attributes[\"mc:Ignorable\"] =\n `${document.attributes[\"mc:Ignorable\"] || \"\"} w15`.trim();\n }\n }\n\n if (key.startsWith(\"word/\") && !key.endsWith(\".xml.rels\")) {\n const hyperlinkSink: Array<{ id: string; link: string }> = [];\n\n const context: BodyContext = {\n fileData: file,\n file,\n viewWrapper: {\n relationships: {\n addRelationship: (\n linkId: string,\n _: string,\n target: string,\n __: (typeof TargetModeType)[keyof typeof TargetModeType],\n ) => {\n hyperlinkRelationshipAdditions.push({\n hyperlink: {\n id: linkId,\n link: target,\n },\n key,\n });\n },\n },\n } as unknown as ViewWrapper,\n stringifyChild: () => \"\",\n addRelationship: () => \"\",\n addMedia: () => \"\",\n };\n contexts.set(key, context);\n\n if (!placeholderDelimiters?.start.trim() || !placeholderDelimiters?.end.trim()) {\n throw new Error(\"Both start and end delimiters must be non-empty strings.\");\n }\n\n const { start, end } = placeholderDelimiters;\n\n // Create compile-path context for stringifying patch children\n const patchCtx = createPatchContext(file, hyperlinkSink);\n currentPatchCtx = patchCtx;\n\n for (const [patchKey, patchValue] of Object.entries(patches)) {\n const patchText = `${start}${patchKey}${end}`;\n while (true) {\n const { didFindOccurrence } = docxReplacer({\n context,\n json,\n keepOriginalStyles,\n patch: patchValue,\n patchText,\n });\n if (!recursive || !didFindOccurrence) {\n break;\n }\n }\n }\n\n // Flush hyperlink relationships captured by the compile-path context\n for (const hl of hyperlinkSink) {\n hyperlinkRelationshipAdditions.push({\n hyperlink: { id: hl.id, link: hl.link },\n key,\n });\n }\n\n const mediaDatas = getReferencedMedia(JSON.stringify(json), media.array);\n if (mediaDatas.length > 0) {\n hasMedia = true;\n imageRelationshipAdditions.push({\n key,\n mediaDatas,\n });\n }\n }\n\n map.set(key, json);\n }\n\n for (const { key, mediaDatas } of imageRelationshipAdditions) {\n const relationshipKey = `word/_rels/${key.split(\"/\").pop()}.rels`;\n const relationshipsJson = map.get(relationshipKey) ?? createRelationshipFile();\n map.set(relationshipKey, relationshipsJson);\n\n const index = getNextRelationshipIndex(relationshipsJson);\n const newJson = replaceImagePlaceholders(\n JSON.stringify(map.get(key)),\n mediaDatas,\n index,\n \"plain\",\n );\n map.set(key, JSON.parse(newJson) as Element);\n\n for (let i = 0; i < mediaDatas.length; i++) {\n const { fileName } = mediaDatas[i];\n appendRelationship(\n relationshipsJson,\n index + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${fileName}`,\n );\n }\n }\n\n for (const { key, hyperlink } of hyperlinkRelationshipAdditions) {\n const relationshipKey = `word/_rels/${key.split(\"/\").pop()}.rels`;\n\n const relationshipsJson = map.get(relationshipKey) ?? createRelationshipFile();\n map.set(relationshipKey, relationshipsJson);\n\n appendRelationship(\n relationshipsJson,\n hyperlink.id,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\",\n hyperlink.link,\n TargetModeType.EXTERNAL,\n );\n }\n\n if (hasMedia) {\n const contentTypesJson = map.get(\"[Content_Types].xml\");\n\n if (!contentTypesJson) {\n throw new Error(\"Could not find content types file\");\n }\n\n appendContentType(contentTypesJson, \"image/png\", \"png\");\n appendContentType(contentTypesJson, \"image/jpeg\", \"jpeg\");\n appendContentType(contentTypesJson, \"image/jpeg\", \"jpg\");\n appendContentType(contentTypesJson, \"image/bmp\", \"bmp\");\n appendContentType(contentTypesJson, \"image/gif\", \"gif\");\n appendContentType(contentTypesJson, \"image/svg+xml\", \"svg\");\n }\n\n const files: Record<string, Uint8Array> = {};\n\n for (const [key, value] of map) {\n files[key] = encoder.encode(js2xml(value));\n }\n\n for (const [key, value] of binaryContentMap) {\n files[key] = value;\n }\n\n for (const { data: mediaData, fileName } of media.array) {\n files[`word/media/${fileName}`] =\n mediaData instanceof Uint8Array ? mediaData : new Uint8Array(mediaData);\n }\n\n return await zipAndConvert(files, outputType, OoxmlMimeType.DOCX);\n};\n\nconst createRelationshipFile = (): Element => ({\n declaration: {\n attributes: {\n encoding: \"UTF-8\",\n standalone: \"yes\",\n version: \"1.0\",\n },\n },\n elements: [\n {\n attributes: {\n xmlns: \"http://schemas.openxmlformats.org/package/2006/relationships\",\n },\n elements: [],\n name: \"Relationships\",\n type: \"element\",\n },\n ],\n});\n","/**\n * Patch detector for discovering placeholders in document templates.\n *\n * @module\n */\nimport { DOCX_NS, createTraverser, strFromU8, toJson, unzipSync } from \"@office-open/core\";\nimport { toUint8Array } from \"@office-open/core\";\n\nimport type { InputDataType } from \"./from-docx\";\n\n/**\n * Options for patch detection.\n *\n * @property data - The document template to scan for placeholders\n */\ninterface PatchDetectorOptions {\n data: InputDataType;\n}\n\n/**\n * Detects all placeholders present in a document template.\n *\n * Scans through all XML content in a .docx file to find placeholder text\n * enclosed in delimiters (default: {{placeholder}}). This is useful for\n * discovering what patches a template expects before performing replacement.\n *\n * @param options - Patch detector configuration\n * @returns Array of placeholder keys found in the document\n *\n * @example\n * ```typescript\n * const placeholders = await patchDetector({ data: templateBuffer });\n * // Returns: [\"name\", \"date\", \"address\"] if template contains {{name}}, {{date}}, {{address}}\n *\n * // Use detected placeholders to create patches\n * const patches = {};\n * for (const key of placeholders) {\n * patches[key] = {\n * type: PatchType.PARAGRAPH,\n * children: [new TextRun(getUserData(key))],\n * };\n * });\n * ```\n */\nexport const patchDetector = async ({ data }: PatchDetectorOptions): Promise<string[]> => {\n const zipContent = unzipSync(toUint8Array(data));\n const patches = new Set<string>();\n\n for (const [key, value] of Object.entries(zipContent)) {\n if (!key.endsWith(\".xml\") && !key.endsWith(\".rels\")) {\n continue;\n }\n if (key.startsWith(\"word/\") && !key.endsWith(\".xml.rels\")) {\n const json = toJson(strFromU8(value));\n const { traverse } = createTraverser(DOCX_NS);\n for (const p of traverse(json)) {\n for (const patch of findPatchKeys(p.text)) {\n patches.add(patch);\n }\n }\n }\n }\n return [...patches];\n};\n\n/**\n * Extracts placeholder keys from text using regex pattern.\n *\n * @param text - Text to search for placeholders\n * @returns Array of placeholder keys (without delimiters)\n */\nconst findPatchKeys = (text: string): string[] => {\n const pattern = /(?<=\\{\\{).+?(?=\\}\\})/gs;\n return text.match(pattern) ?? [];\n};\n"],"mappings":";;;;;AAqCA,MAAM,UAAU,IAAI,YAAY;;;;;;;;;;;;;AAiBhC,SAAS,mBACP,MACA,eACa;CACb,OAAO;EACL,UAAU;EACJ;EACN,aAAa,EACX,eAAe;GACb,kBAAkB,QAAgB,OAAe,QAAgB,UAAmB;IAClF,cAAc,KAAK;KAAE,IAAI;KAAQ,MAAM;IAAO,CAAC;GACjD;GACA,mBAAmB;EACrB,EACF;EACA,sBAAsB;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CAEhC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,UAAU,GAAG;EACrD,IAAI,CAAC,IAAI,SAAS,MAAM,KAAK,CAAC,IAAI,SAAS,OAAO,GAChD;EAEF,IAAI,IAAI,WAAW,OAAO,KAAK,CAAC,IAAI,SAAS,WAAW,GAAG;GACzD,MAAM,OAAO,OAAO,UAAU,KAAK,CAAC;GACpC,MAAM,EAAE,aAAa,gBAAgB,OAAO;GAC5C,KAAK,MAAM,KAAK,SAAS,IAAI,GAC3B,KAAK,MAAM,SAAS,cAAc,EAAE,IAAI,GACtC,QAAQ,IAAI,KAAK;EAGvB;CACF;CACA,OAAO,CAAC,GAAG,OAAO;AACpB;;;;;;;AAQA,MAAM,iBAAiB,SAA2B;CAEhD,OAAO,KAAK,MAAM,wBAAO,KAAK,CAAC;AACjC"} |
+3
-3
| { | ||
| "name": "@office-open/docx", | ||
| "version": "0.9.1", | ||
| "version": "0.9.2", | ||
| "description": "Generate, parse, and patch .docx documents with a declarative TypeScript API", | ||
@@ -56,4 +56,4 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@office-open/core": "0.9.1", | ||
| "@office-open/xml": "0.9.1" | ||
| "@office-open/core": "0.9.2", | ||
| "@office-open/xml": "0.9.2" | ||
| }, | ||
@@ -60,0 +60,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| {"version":3,"file":"core-properties-C79Z-ZPE.d.mts","names":[],"sources":["../src/parts/bibliography.ts","../src/parts/contenttypes.ts","../src/parts/fonts/font.ts","../src/parts/alt-chunk/alt-chunk-collection.ts","../src/parts/alt-chunk/alt-chunk.ts","../src/shared/shading.ts","../src/shared/track-revision/track-revision.ts","../src/shared/track-revision/track-revision-components/cell-merge.ts","../src/shared/vertical-align.ts","../src/parts/paragraph/formatting/alignment.ts","../src/shared/border.ts","../src/parts/paragraph/formatting/border.ts","../src/parts/paragraph/formatting/cnf-style.ts","../src/parts/paragraph/formatting/indent.ts","../src/parts/paragraph/formatting/break.ts","../src/parts/paragraph/formatting/spacing.ts","../src/parts/paragraph/formatting/style.ts","../src/parts/paragraph/formatting/tab-stop.ts","../src/parts/drawing/doc-properties/doc-properties.ts","../src/shared/constants.ts","../src/parts/drawing/text-wrap/text-wrapping.ts","../src/parts/drawing/text-wrap/wrap-tight.ts","../src/parts/drawing/text-wrap/wrap-through.ts","../src/parts/drawing/floating/floating-position.ts","../src/parts/drawing/floating/horizontal-position.ts","../src/parts/drawing/floating/vertical-position.ts","../src/parts/drawing/drawing.ts","../src/parts/drawing/inline/graphic/graphic-data/wpg/wpg-group.ts","../src/shared/media/data.ts","../src/shared/media/media.ts","../src/parts/drawing/inline/graphic/graphic-data/wps/body-properties.ts","../src/parts/drawing/inline/graphic/graphic-data/wps/non-visual-shape-properties.ts","../src/parts/drawing/inline/graphic/graphic-data/wps/wps-shape.ts","../src/parts/drawing/descriptor.ts","../src/parts/paragraph/run/smartart-run.ts","../src/parts/paragraph/math.ts","../src/parts/paragraph/frame/frame-properties.ts","../src/parts/paragraph/run/empty-children.ts","../src/parts/paragraph/run/east-asian-layout.ts","../src/parts/paragraph/run/emphasis-mark.ts","../src/parts/paragraph/run/formatting.ts","../src/parts/paragraph/run/language.ts","../src/parts/paragraph/run/run-fonts.ts","../src/parts/paragraph/run/underline.ts","../src/parts/paragraph/run/properties.ts","../src/parts/paragraph/run/run.ts","../src/parts/paragraph/properties.ts","../src/parts/paragraph/run/symbol-run.ts","../src/parts/paragraph/run/image-run.ts","../src/parts/paragraph/run/chart-run.ts","../src/parts/paragraph/run/wps-shape-run.ts","../src/parts/paragraph/run/wpg-group-run.ts","../src/parts/paragraph/run/simple-field.ts","../src/parts/paragraph/run/comment-run.ts","../src/parts/paragraph/run/positional-tab.ts","../src/parts/paragraph/run/ruby.ts","../src/parts/paragraph/run/form-field.ts","../src/parts/paragraph/run/smart-tag-run.ts","../src/parts/paragraph/run/proof-error.ts","../src/parts/paragraph/paragraph.ts","../src/parts/table/grid.ts","../src/parts/table/table-cell-spacing.ts","../src/parts/table/table-width.ts","../src/parts/table/table-properties/table-borders.ts","../src/parts/table/table-properties/table-float-properties.ts","../src/parts/table/table-properties/table-layout.ts","../src/parts/table/table-properties/table-look.ts","../src/parts/table/table-properties/table-properties.ts","../src/parts/table/table-properties/table-property-exceptions.ts","../src/parts/table/table-cell/table-cell-components.ts","../src/parts/table/table-row/table-row-height.ts","../src/parts/table/table-row/table-row-properties.ts","../src/parts/table/table-row/table-row.ts","../src/parts/table/table.ts","../src/parts/table/descriptor.ts","../src/parts/table/table-properties/table-cell-margin.ts","../src/parts/table/table-cell/table-cell-properties.ts","../src/parts/table/table-cell/table-cell.ts","../src/parts/custom-xml/custom-xml.ts","../src/parts/document/body/section-properties/properties/column.ts","../src/parts/document/body/section-properties/properties/columns.ts","../src/parts/document/body/section-properties/properties/doc-grid.ts","../src/parts/document/body/section-properties/properties/page-size.ts","../src/parts/document/body/section-properties/properties/page-number.ts","../src/parts/document/body/section-properties/properties/page-borders.ts","../src/parts/document/body/section-properties/properties/page-margin.ts","../src/parts/document/body/section-properties/properties/page-text-direction.ts","../src/parts/document/body/section-properties/properties/line-number.ts","../src/parts/document/body/section-properties/properties/section-type.ts","../src/parts/document/body/section-properties/properties/header-footer-reference.ts","../src/parts/document/body/section-properties/descriptor.ts","../src/parts/sub-doc/sub-doc.ts","../src/parts/table-of-contents/table-of-contents-properties.ts","../src/parts/table-of-contents/sdt-properties.ts","../src/parts/table-of-contents/toc-parse.ts","../src/parts/table-of-contents/descriptor.ts","../src/parts/textbox/types.ts","../src/parts/textbox/shape/shape.ts","../src/shared/section.ts","../src/parts/document/document-attributes.ts","../src/parts/header-footer.ts","../src/parts/document/body/section-properties/properties/footnote-endnote-properties.ts","../src/parts/document/body/section-properties/section-properties.ts","../src/parts/glossary-document.ts","../src/parts/numbering/level.ts","../src/parts/numbering/numbering.ts","../src/parts/numbering/abstract-numbering.ts","../src/parts/numbering/num.ts","../src/parts/settings/compatibility.ts","../src/parts/settings/settings.ts","../src/parts/styles/factory.ts","../src/parts/styles/styles.ts","../src/parts/sub-doc/sub-doc-collection.ts","../src/parts/frameset.ts","../src/parts/web-settings.ts","../src/parse.ts","../src/context.ts","../src/parts/fonts/font-wrapper.ts","../src/parts/fonts/font-table.ts","../src/parts/settings/descriptor.ts","../src/parts/custom-properties.ts","../src/parts/document/document-background/document-background.ts","../src/parts/core-properties.ts"],"mappings":";;;;;;;;;UAkCiB,iBAAA;EACf,IAAA;EACA,KAAA;EACA,MAAA;EACA,IAAA;EACA,KAAA;EACA,GAAA;EACA,SAAA;EACA,OAAA;EACA,MAAA;EACA,KAAA;EACA,KAAA;EACA,SAAA;EACA,IAAA;EACA,GAAA;EACA,OAAA;EACA,WAAA;AAAA;AAAA,UASe,mBAAA;EACf,OAAA,EAAS,iBAAiB;EAC1B,SAAA;AAAA;AAAA,cAmCW,gBAAA,EAAkB,gBAAgB,CAAC,mBAAA;;;UCtF/B,kBAAA;EACf,SAAA;EACA,WAAW;AAAA;AAAA,UAGI,mBAAA;EACf,QAAA;EACA,WAAW;AAAA;AAAA,UAGI,iBAAA;EACf,QAAA,EAAU,kBAAA;EACV,SAAA,EAAW,mBAAmB;AAAA;AAAA,cAWnB,gBAAA,EAAkB,gBAAgB,CAAC,iBAAA;AAAA,iBAoChC,iBAAA,CACd,MAAA;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,aAAA;EACA,eAAA;EACA,WAAA;EACA,cAAA;EACA,SAAA;IAAc,IAAA;IAAc,WAAA;EAAA;EAC5B,OAAA;IAAY,IAAA;EAAA;AAAA,IAEb,iBAAiB;;;cC3CP,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;UC7BI,YAAA;EAEf,GAAA;EAEA,IAAA,EAAM,UAAU;EAEhB,IAAA;EAEA,SAAA;EAEA,WAAA;AAAA;AAAA,cASW,kBAAA;EAAA,QACH,GAAA;;EAMD,WAAA,CAAY,GAAA,UAAa,IAAA,EAA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AAA,UASA,mBAAA;EACf,KAAA;EACA,OAAA;EACA,OAAA;EACA,QAAA;EACA,WAAA;EACA,cAAA;EACA,QAAA;AAAA;AAAA,cAGW,kBAAA,EAAoB,gBAAgB,CAAC,mBAAA"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { A as footnotesDesc, B as settingsDesc, C as fontTableDesc, N as stringifyBodyChild, P as stringifyDocumentXml, S as bibliographyDesc, _ as commentsDesc, c as corePropertiesDesc, g as contentTypesDesc, h as buildContentTypes, k as endnotesDesc, n as DocxWriteContext, o as webSettingsDesc, s as customPropertiesDesc, x as glossaryDesc } from "./context-DkABanLH.mjs"; | ||
| import { w as DocumentAttributeNamespaces } from "./document-Ch4dyBB4.mjs"; | ||
| import { APP_PROPS_XML, OoxmlMimeType, addSmartArtRelationships, createPacker, findAndReplaceImagePlaceholders, formatId, hasPlaceholders, replaceAllPlaceholders, replaceNumberingPlaceholders } from "@office-open/core"; | ||
| import { escapeXml } from "@office-open/xml"; | ||
| import { DEFAULT_DRAWING_XML, getColorXml, getLayoutXml, getStyleXml } from "@office-open/core/smartart"; | ||
| //#region src/parts/fonts/obfuscate-ttf-to-odttf.ts | ||
| /** | ||
| * Font obfuscation module for embedding fonts in WordprocessingML documents. | ||
| * | ||
| * This module implements the OOXML font obfuscation algorithm used to embed | ||
| * fonts in DOCX documents. Obfuscation is required by the OOXML specification | ||
| * to prevent simple extraction of embedded font files. | ||
| * | ||
| * Reference: ECMA-376 Part 2, Section 11.1 (Font Embedding) | ||
| * | ||
| * @module | ||
| */ | ||
| /** Start offset for obfuscation in the font file */ | ||
| const obfuscatedStartOffset = 0; | ||
| /** End offset for obfuscation (first 32 bytes are obfuscated) */ | ||
| const obfuscatedEndOffset = 32; | ||
| /** Expected GUID size (32 hex characters without dashes) */ | ||
| const guidSize = 32; | ||
| /** | ||
| * Obfuscates a TrueType font file for embedding in OOXML documents. | ||
| * | ||
| * The obfuscation algorithm XORs the first 32 bytes of the font file | ||
| * with a reversed byte sequence derived from the font's GUID key. | ||
| * This prevents simple extraction while maintaining font functionality. | ||
| * | ||
| * @param buf - The original font file as a byte array | ||
| * @param fontKey - The GUID key for the font (with or without dashes) | ||
| * @returns The obfuscated font data | ||
| * @throws Error if the fontKey is not a valid 32-character GUID | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * const fontData = readFileSync("font.ttf"); | ||
| * const fontKey = "00000000-0000-0000-0000-000000000000"; | ||
| * const obfuscatedData = obfuscate(fontData, fontKey); | ||
| * ``` | ||
| * | ||
| * @internal | ||
| */ | ||
| const obfuscate = (buf, fontKey) => { | ||
| const guid = fontKey.replace(/-/g, ""); | ||
| if (guid.length !== guidSize) throw new Error(`Error: Cannot extract GUID from font filename: ${fontKey}`); | ||
| const hexNumbers = guid.replace(/(..)/g, "$1 ").trim().split(" ").map((hexString) => parseInt(hexString, 16)); | ||
| hexNumbers.reverse(); | ||
| const obfuscatedBytes = buf.slice(obfuscatedStartOffset, obfuscatedEndOffset).map((byte, i) => byte ^ hexNumbers[i % hexNumbers.length]); | ||
| const out = new Uint8Array(obfuscatedStartOffset + obfuscatedBytes.length + Math.max(0, buf.length - obfuscatedEndOffset)); | ||
| out.set(buf.slice(0, obfuscatedStartOffset)); | ||
| out.set(obfuscatedBytes, obfuscatedStartOffset); | ||
| out.set(buf.slice(obfuscatedEndOffset), obfuscatedStartOffset + obfuscatedBytes.length); | ||
| return out; | ||
| }; | ||
| //#endregion | ||
| //#region src/parts/header-footer.ts | ||
| /** | ||
| * Namespace keys used by header elements. | ||
| * @internal | ||
| */ | ||
| const HEADER_NAMESPACES = [ | ||
| "cx", | ||
| "cx1", | ||
| "cx2", | ||
| "cx3", | ||
| "cx4", | ||
| "cx5", | ||
| "cx6", | ||
| "cx7", | ||
| "cx8", | ||
| "m", | ||
| "mc", | ||
| "o", | ||
| "r", | ||
| "v", | ||
| "w", | ||
| "w10", | ||
| "w14", | ||
| "w15", | ||
| "w16cid", | ||
| "w16se", | ||
| "wne", | ||
| "wp", | ||
| "wp14", | ||
| "wpc", | ||
| "wpg", | ||
| "wpi", | ||
| "wps" | ||
| ]; | ||
| /** | ||
| * Namespace keys used by footer elements. | ||
| * @internal | ||
| */ | ||
| const FOOTER_NAMESPACES = [ | ||
| "m", | ||
| "mc", | ||
| "o", | ||
| "r", | ||
| "v", | ||
| "w", | ||
| "w10", | ||
| "w14", | ||
| "w15", | ||
| "wne", | ||
| "wp", | ||
| "wp14", | ||
| "wpc", | ||
| "wpg", | ||
| "wpi", | ||
| "wps" | ||
| ]; | ||
| /** | ||
| * Serialize a header or footer to XML. | ||
| * | ||
| * Builds the `<w:hdr>` or `<w:ftr>` element with namespace declarations, | ||
| * then serializes each child element via `stringifyBodyChild()`. | ||
| * | ||
| * @param tag - Element tag name ("w:hdr" or "w:ftr") | ||
| * @param namespaces - Namespace keys to declare on the root element | ||
| * @param children - Block-level child elements (raw SectionChild objects) | ||
| * @param ctx - Body context for stringification | ||
| */ | ||
| function stringifyHeaderFooter(tag, namespaces, children, ctx) { | ||
| const attrParts = []; | ||
| for (const ns of namespaces) attrParts.push(`xmlns:${ns}="${escapeXml(DocumentAttributeNamespaces[ns])}"`); | ||
| const attrStr = attrParts.join(" "); | ||
| const childParts = []; | ||
| for (const child of children) childParts.push(stringifyBodyChild(child, ctx)); | ||
| const body = childParts.join(""); | ||
| return body.length === 0 ? `<${tag} ${attrStr}/>` : `<${tag} ${attrStr}>${body}</${tag}>`; | ||
| } | ||
| //#endregion | ||
| //#region src/compiler.ts | ||
| /** | ||
| * DOCX document compiler — pure function entry point. | ||
| * | ||
| * compileDocument() accepts DocumentOptions directly, | ||
| * creates a DocxWriteContext internally, and produces a Zippable result. | ||
| * All XML parts are produced via descriptors or serialize() — | ||
| * no Formatter dependency. | ||
| * | ||
| * @module | ||
| */ | ||
| /** Reusable TextEncoder (stateless, safe to share). */ | ||
| const encoder = new TextEncoder(); | ||
| /** XML declaration prepended to every OOXML part. */ | ||
| const XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"; | ||
| /** | ||
| * Compile document options into a flat file map suitable for fflate zipSync. | ||
| * | ||
| * This is the primary entry point for DOCX generation — accepts DocumentOptions | ||
| * directly. | ||
| */ | ||
| function compileDocument(options, overrides = [], mediaLevel = 0) { | ||
| const ctx = new DocxWriteContext(options); | ||
| const files = {}; | ||
| const xmlifiedFileMapping = xmlifyContext(ctx, /* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()); | ||
| const map = new Map(Object.entries(xmlifiedFileMapping)); | ||
| for (const [, obj] of map) if (Array.isArray(obj)) for (const subFile of obj) files[subFile.path] = typeof subFile.data === "string" ? encoder.encode(subFile.data) : subFile.data; | ||
| else { | ||
| const fileObj = obj; | ||
| files[fileObj.path] = typeof fileObj.data === "string" ? encoder.encode(fileObj.data) : fileObj.data; | ||
| } | ||
| for (const subFile of overrides) files[subFile.path] = typeof subFile.data === "string" ? encoder.encode(subFile.data) : subFile.data; | ||
| const mediaArray = ctx.media.array; | ||
| for (const mediaData of mediaArray) { | ||
| files[`word/media/${mediaData.fileName}`] = [mediaData.data, { level: mediaLevel }]; | ||
| if (mediaData.type === "svg") files[`word/media/${mediaData.fallback.fileName}`] = [mediaData.fallback.data, { level: mediaLevel }]; | ||
| } | ||
| for (const { data: buffer, name, fontKey } of ctx.fontTable.fontOptionsWithKey) { | ||
| const [nameWithoutExtension] = name.split("."); | ||
| files[`word/fonts/${nameWithoutExtension}.odttf`] = obfuscate(buffer, fontKey); | ||
| } | ||
| return files; | ||
| } | ||
| function xmlifyContext(ctx, headerFormattedViews, footerFormattedViews) { | ||
| const mkCtx = (viewWrapper = ctx.document) => ({ | ||
| fileData: ctx, | ||
| file: ctx, | ||
| viewWrapper, | ||
| stringifyChild: stringifyBodyChild, | ||
| addRelationship: (type, target, mode) => ctx.addRelationship(type, target, mode), | ||
| addMedia: (data, type) => ctx.addMedia(data, type) | ||
| }); | ||
| const documentRelationshipCount = ctx.document.relationships.relationshipCount + 1; | ||
| const documentXmlData = XML_DECL + stringifyDocumentXml(ctx, mkCtx(ctx.document)); | ||
| const commentRelationshipCount = ctx.comments.relationships.relationshipCount + 1; | ||
| const commentCtx = mkCtx({ relationships: ctx.comments.relationships }); | ||
| const commentXmlData = XML_DECL + commentsDesc.stringify(ctx._options.comments ?? { children: [] }, commentCtx); | ||
| const footnoteRelationshipCount = ctx.footNotes.relationships.relationshipCount + 1; | ||
| const footnoteCtx = mkCtx({ relationships: ctx.footNotes.relationships }); | ||
| const footnoteXmlData = XML_DECL + (footnotesDesc.stringify({ notes: ctx.footNotes.notes }, footnoteCtx) ?? ""); | ||
| const documentMedia = findAndReplaceImagePlaceholders(documentXmlData, ctx.media.array, documentRelationshipCount); | ||
| const commentMedia = findAndReplaceImagePlaceholders(commentXmlData, ctx.media.array, commentRelationshipCount); | ||
| const footnoteMedia = findAndReplaceImagePlaceholders(footnoteXmlData, ctx.media.array, footnoteRelationshipCount); | ||
| return { | ||
| AppProperties: { | ||
| data: XML_DECL + APP_PROPS_XML, | ||
| path: "docProps/app.xml" | ||
| }, | ||
| Comments: { | ||
| data: (() => { | ||
| return replaceNumberingPlaceholders(commentMedia.referenced.length > 0 ? commentMedia.xml : commentXmlData, ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/comments.xml" | ||
| }, | ||
| CommentsRelationships: { | ||
| data: (() => { | ||
| for (let i = 0; i < commentMedia.referenced.length; i++) ctx.comments.relationships.addRelationship(commentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${commentMedia.referenced[i].fileName}`); | ||
| return XML_DECL + ctx.comments.relationships.serialize(); | ||
| })(), | ||
| path: "word/_rels/comments.xml.rels" | ||
| }, | ||
| ContentTypes: { | ||
| data: XML_DECL + (contentTypesDesc.stringify(buildContentTypes({ | ||
| headerCount: ctx.headers.length, | ||
| footerCount: ctx.footers.length, | ||
| chartCount: ctx.charts.array.length, | ||
| smartArtCount: ctx.smartArts.array.length, | ||
| hasBibliography: !!ctx._options.bibliography, | ||
| hasGlossary: !!ctx.glossaryOptions, | ||
| hasWebSettings: !!ctx.webSettings, | ||
| altChunks: ctx.altChunks.array.map((ac) => ({ | ||
| path: `/word/${ac.path}`, | ||
| contentType: ac.contentType ?? "application/xhtml+xml" | ||
| })), | ||
| subDocs: ctx.subDocs.array.map((sd) => ({ path: `/word/${sd.path}` })) | ||
| }), ctx) ?? ""), | ||
| path: "[Content_Types].xml" | ||
| }, | ||
| CustomProperties: { | ||
| data: XML_DECL + (customPropertiesDesc.stringify({ properties: ctx._options.customProperties ?? [] }, ctx) ?? ""), | ||
| path: "docProps/custom.xml" | ||
| }, | ||
| Document: { | ||
| data: (() => { | ||
| let xmlData = documentMedia.referenced.length > 0 ? documentMedia.xml : documentXmlData; | ||
| if (hasPlaceholders(xmlData)) { | ||
| const mediaCount = documentMedia.referenced.length; | ||
| const chartKeys = ctx.charts.array.map((c) => c.key); | ||
| const smartArtKeys = ctx.smartArts.array.map((s) => s.key); | ||
| const chartOffset = documentRelationshipCount + mediaCount; | ||
| const smartArtOffset = chartOffset + chartKeys.length; | ||
| const entries = []; | ||
| for (let i = 0; i < chartKeys.length; i++) entries.push({ | ||
| prefix: "chart:", | ||
| key: chartKeys[i], | ||
| value: formatId(chartOffset, i, "rId") | ||
| }); | ||
| const saPrefixes = [ | ||
| "smartart:", | ||
| "smartart-lo:", | ||
| "smartart-qs:", | ||
| "smartart-cs:" | ||
| ]; | ||
| for (let i = 0; i < smartArtKeys.length; i++) for (let p = 0; p < saPrefixes.length; p++) entries.push({ | ||
| prefix: saPrefixes[p], | ||
| key: smartArtKeys[i], | ||
| value: formatId(smartArtOffset + p * smartArtKeys.length, i, "rId") | ||
| }); | ||
| for (const { reference, instance, numId } of ctx.numbering.concreteNumbering) entries.push({ | ||
| key: `${reference}-${instance}`, | ||
| value: numId.toString() | ||
| }); | ||
| xmlData = replaceAllPlaceholders(xmlData, entries); | ||
| } else xmlData = replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering); | ||
| return xmlData; | ||
| })(), | ||
| path: "word/document.xml" | ||
| }, | ||
| Endnotes: { | ||
| data: (() => { | ||
| const endnoteCtx = mkCtx({ relationships: ctx.endnotes.relationships }); | ||
| const xmlData = XML_DECL + (endnotesDesc.stringify({ notes: ctx.endnotes.notes }, endnoteCtx) ?? ""); | ||
| const endnoteRelCount = ctx.endnotes.relationships.relationshipCount + 1; | ||
| const endnoteMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, endnoteRelCount); | ||
| if (endnoteMedia.referenced.length > 0) { | ||
| for (let i = 0; i < endnoteMedia.referenced.length; i++) ctx.endnotes.relationships.addRelationship(endnoteRelCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${endnoteMedia.referenced[i].fileName}`); | ||
| return replaceNumberingPlaceholders(endnoteMedia.xml, ctx.numbering.concreteNumbering); | ||
| } | ||
| return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/endnotes.xml" | ||
| }, | ||
| EndnotesRelationships: { | ||
| data: XML_DECL + ctx.endnotes.relationships.serialize(), | ||
| path: "word/_rels/endnotes.xml.rels" | ||
| }, | ||
| FileRelationships: { | ||
| data: XML_DECL + ctx.fileRelationships.serialize(), | ||
| path: "_rels/.rels" | ||
| }, | ||
| FontTable: { | ||
| data: XML_DECL + (fontTableDesc.stringify({ fonts: ctx.fontTable.fontOptionsWithKey }, ctx) ?? ""), | ||
| path: "word/fontTable.xml" | ||
| }, | ||
| FontTableRelationships: { | ||
| data: XML_DECL + ctx.fontTable.relationships.serialize(), | ||
| path: "word/_rels/fontTable.xml.rels" | ||
| }, | ||
| FootNotes: { | ||
| data: (() => { | ||
| return replaceNumberingPlaceholders(footnoteMedia.referenced.length > 0 ? footnoteMedia.xml : footnoteXmlData, ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/footnotes.xml" | ||
| }, | ||
| FootNotesRelationships: { | ||
| data: (() => { | ||
| for (let i = 0; i < footnoteMedia.referenced.length; i++) ctx.footNotes.relationships.addRelationship(footnoteRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${footnoteMedia.referenced[i].fileName}`); | ||
| return XML_DECL + ctx.footNotes.relationships.serialize(); | ||
| })(), | ||
| path: "word/_rels/footnotes.xml.rels" | ||
| }, | ||
| FooterRelationships: ctx.footers.map((entry, index) => { | ||
| const footerCtx = mkCtx({ relationships: entry.relationships }); | ||
| const xmlData = XML_DECL + stringifyHeaderFooter("w:ftr", FOOTER_NAMESPACES, entry.children, footerCtx); | ||
| footerFormattedViews.set(index, xmlData); | ||
| const footerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0); | ||
| for (let i = 0; i < footerMedia.referenced.length; i++) entry.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${footerMedia.referenced[i].fileName}`); | ||
| return { | ||
| data: XML_DECL + entry.relationships.serialize(), | ||
| path: `word/_rels/footer${index + 1}.xml.rels` | ||
| }; | ||
| }), | ||
| Footers: ctx.footers.map((_entry, index) => { | ||
| const tempXmlData = footerFormattedViews.get(index); | ||
| const footerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0); | ||
| return { | ||
| data: replaceNumberingPlaceholders(footerMedia.referenced.length > 0 ? footerMedia.xml : tempXmlData, ctx.numbering.concreteNumbering), | ||
| path: `word/footer${index + 1}.xml` | ||
| }; | ||
| }), | ||
| HeaderRelationships: ctx.headers.map((entry, index) => { | ||
| const headerCtx = mkCtx({ relationships: entry.relationships }); | ||
| const xmlData = XML_DECL + stringifyHeaderFooter("w:hdr", HEADER_NAMESPACES, entry.children, headerCtx); | ||
| headerFormattedViews.set(index, xmlData); | ||
| const headerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0); | ||
| for (let i = 0; i < headerMedia.referenced.length; i++) entry.relationships.addRelationship(i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${headerMedia.referenced[i].fileName}`); | ||
| return { | ||
| data: XML_DECL + entry.relationships.serialize(), | ||
| path: `word/_rels/header${index + 1}.xml.rels` | ||
| }; | ||
| }), | ||
| Headers: ctx.headers.map((_entry, index) => { | ||
| const tempXmlData = headerFormattedViews.get(index); | ||
| const headerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0); | ||
| return { | ||
| data: replaceNumberingPlaceholders(headerMedia.referenced.length > 0 ? headerMedia.xml : tempXmlData, ctx.numbering.concreteNumbering), | ||
| path: `word/header${index + 1}.xml` | ||
| }; | ||
| }), | ||
| Numbering: { | ||
| data: ctx.numbering.serialize(), | ||
| path: "word/numbering.xml" | ||
| }, | ||
| Properties: { | ||
| data: XML_DECL + (corePropertiesDesc.stringify(ctx._options, ctx) ?? ""), | ||
| path: "docProps/core.xml" | ||
| }, | ||
| Relationships: { | ||
| data: (() => { | ||
| for (let i = 0; i < documentMedia.referenced.length; i++) ctx.document.relationships.addRelationship(documentRelationshipCount + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", `media/${documentMedia.referenced[i].fileName}`); | ||
| const chartOffset = documentRelationshipCount + documentMedia.referenced.length; | ||
| for (let i = 0; i < ctx.charts.array.length; i++) ctx.document.relationships.addRelationship(chartOffset + i, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart", `charts/chart${i + 1}.xml`); | ||
| addSmartArtRelationships(ctx.smartArts.array.map((s) => s.key), (id, type, target) => { | ||
| ctx.document.relationships.addRelationship(id, type, target); | ||
| }, documentRelationshipCount + documentMedia.referenced.length + ctx.charts.array.length, 0, { | ||
| pathPrefix: "", | ||
| styleRelType: "http://schemas.microsoft.com/office/2007/relationships/diagramStyle" | ||
| }); | ||
| ctx.document.relationships.addRelationship(ctx.document.relationships.relationshipCount + 1, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", "fontTable.xml"); | ||
| return XML_DECL + ctx.document.relationships.serialize(); | ||
| })(), | ||
| path: "word/_rels/document.xml.rels" | ||
| }, | ||
| Settings: { | ||
| data: XML_DECL + (settingsDesc.stringify(ctx._settingsOptions, ctx) ?? ""), | ||
| path: "word/settings.xml" | ||
| }, | ||
| Styles: { | ||
| data: (() => { | ||
| return replaceNumberingPlaceholders(ctx.styles.serialize(), ctx.numbering.concreteNumbering); | ||
| })(), | ||
| path: "word/styles.xml" | ||
| }, | ||
| ...ctx._options.bibliography ? { Bibliography: { | ||
| data: XML_DECL + (bibliographyDesc.stringify(ctx._options.bibliography, ctx) ?? ""), | ||
| path: "word/bibliography.xml" | ||
| } } : {}, | ||
| ...ctx.charts.array.length > 0 ? { Charts: ctx.charts.array.flatMap((chartData, i) => [{ | ||
| data: XML_DECL + chartData.chartSpaceXml, | ||
| path: `word/charts/chart${i + 1}.xml` | ||
| }, { | ||
| data: "<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"/>", | ||
| path: `word/charts/_rels/chart${i + 1}.xml.rels` | ||
| }]) } : {}, | ||
| ...ctx.smartArts.array.length > 0 ? { | ||
| DiagramData: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: XML_DECL + smartArtData.dataModelXml, | ||
| path: `word/diagrams/data${i + 1}.xml` | ||
| })), | ||
| DiagramLayout: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: getLayoutXml(smartArtData.layout), | ||
| path: `word/diagrams/layout${i + 1}.xml` | ||
| })), | ||
| DiagramStyle: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: getStyleXml(smartArtData.style), | ||
| path: `word/diagrams/quickStyle${i + 1}.xml` | ||
| })), | ||
| DiagramColors: ctx.smartArts.array.map((smartArtData, i) => ({ | ||
| data: getColorXml(smartArtData.color), | ||
| path: `word/diagrams/colors${i + 1}.xml` | ||
| })), | ||
| DiagramDrawing: ctx.smartArts.array.map((_, i) => ({ | ||
| data: DEFAULT_DRAWING_XML, | ||
| path: `word/diagrams/drawing${i + 1}.xml` | ||
| })) | ||
| } : {}, | ||
| ...ctx.altChunks.array.length > 0 ? { AltChunks: ctx.altChunks.array.map((altChunkData) => ({ | ||
| data: altChunkData.data, | ||
| path: `word/${altChunkData.path}` | ||
| })) } : {}, | ||
| ...ctx.subDocs.array.length > 0 ? { SubDocs: ctx.subDocs.array.map((subDocData) => ({ | ||
| data: subDocData.data, | ||
| path: `word/${subDocData.path}` | ||
| })) } : {}, | ||
| ...ctx.glossaryOptions ? { Glossary: { | ||
| data: (() => { | ||
| const glossaryCtx = mkCtx(void 0); | ||
| return XML_DECL + (glossaryDesc.stringify(ctx.glossaryOptions, glossaryCtx) ?? ""); | ||
| })(), | ||
| path: "word/glossary/document.xml" | ||
| } } : {}, | ||
| ...ctx.webSettings ? { WebSettings: { | ||
| data: XML_DECL + (webSettingsDesc.stringify(ctx._options.webSettings ?? {}, ctx) ?? ""), | ||
| path: "word/webSettings.xml" | ||
| } } : {} | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region src/generate.ts | ||
| /** | ||
| * Pure function API for generating DOCX files. | ||
| * | ||
| * @module | ||
| */ | ||
| /** @internal Packer instance for DOCX generation. */ | ||
| const Packer = createPacker({ | ||
| compile: (options, overrides, mediaLevel) => compileDocument(options, overrides, mediaLevel), | ||
| mimeType: OoxmlMimeType.DOCX | ||
| }); | ||
| /** | ||
| * Generate a DOCX file from pure JSON options. | ||
| * | ||
| * The output format is controlled by `packerOptions.type` (default: `"nodebuffer"` → Buffer). | ||
| * For synchronous generation, use {@link generateDocumentSync}. For streaming, use {@link generateDocumentStream}. | ||
| * | ||
| * @param options - Document options (sections, styles, numbering, etc.) | ||
| * @param packerOptions - Optional packer configuration (type, compression, overrides, etc.) | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * import { generateDocument } from "@office-open/docx"; | ||
| * | ||
| * const buffer = await generateDocument({ sections: [...] }); | ||
| * const bytes = await generateDocument({ sections: [...] }, { type: "uint8array" }); | ||
| * const blob = await generateDocument({ sections: [...] }, { type: "blob" }); | ||
| * ``` | ||
| */ | ||
| function generateDocument(options, packerOptions) { | ||
| return Packer.pack(options, packerOptions); | ||
| } | ||
| /** | ||
| * Synchronously generate a DOCX file from pure JSON options. | ||
| */ | ||
| function generateDocumentSync(options, packerOptions) { | ||
| return Packer.packSync(options, packerOptions); | ||
| } | ||
| /** | ||
| * Generate a DOCX file as a `ReadableStream<Uint8Array>`. | ||
| */ | ||
| function generateDocumentStream(options, packerOptions) { | ||
| return Packer.toStream(options, packerOptions); | ||
| } | ||
| //#endregion | ||
| export { generateDocumentStream as n, generateDocumentSync as r, generateDocument as t }; | ||
| //# sourceMappingURL=generate-DQ6qeP58.mjs.map |
| {"version":3,"file":"generate-DQ6qeP58.mjs","names":[],"sources":["../src/parts/fonts/obfuscate-ttf-to-odttf.ts","../src/parts/header-footer.ts","../src/compiler.ts","../src/generate.ts"],"sourcesContent":["/**\n * Font obfuscation module for embedding fonts in WordprocessingML documents.\n *\n * This module implements the OOXML font obfuscation algorithm used to embed\n * fonts in DOCX documents. Obfuscation is required by the OOXML specification\n * to prevent simple extraction of embedded font files.\n *\n * Reference: ECMA-376 Part 2, Section 11.1 (Font Embedding)\n *\n * @module\n */\n\n/** Start offset for obfuscation in the font file */\nconst obfuscatedStartOffset = 0;\n/** End offset for obfuscation (first 32 bytes are obfuscated) */\nconst obfuscatedEndOffset = 32;\n/** Expected GUID size (32 hex characters without dashes) */\nconst guidSize = 32;\n\n/**\n * Obfuscates a TrueType font file for embedding in OOXML documents.\n *\n * The obfuscation algorithm XORs the first 32 bytes of the font file\n * with a reversed byte sequence derived from the font's GUID key.\n * This prevents simple extraction while maintaining font functionality.\n *\n * @param buf - The original font file as a byte array\n * @param fontKey - The GUID key for the font (with or without dashes)\n * @returns The obfuscated font data\n * @throws Error if the fontKey is not a valid 32-character GUID\n *\n * @example\n * ```typescript\n * const fontData = readFileSync(\"font.ttf\");\n * const fontKey = \"00000000-0000-0000-0000-000000000000\";\n * const obfuscatedData = obfuscate(fontData, fontKey);\n * ```\n *\n * @internal\n */\nexport const obfuscate = (buf: Uint8Array, fontKey: string): Uint8Array => {\n const guid = fontKey.replace(/-/g, \"\");\n if (guid.length !== guidSize) {\n throw new Error(`Error: Cannot extract GUID from font filename: ${fontKey}`);\n }\n\n const hexStrings = guid.replace(/(..)/g, \"$1 \").trim().split(\" \");\n const hexNumbers = hexStrings.map((hexString) => parseInt(hexString, 16));\n hexNumbers.reverse();\n\n const bytesToObfuscate = buf.slice(obfuscatedStartOffset, obfuscatedEndOffset);\n const obfuscatedBytes = bytesToObfuscate.map(\n (byte, i) => byte ^ hexNumbers[i % hexNumbers.length],\n );\n\n const out = new Uint8Array(\n obfuscatedStartOffset + obfuscatedBytes.length + Math.max(0, buf.length - obfuscatedEndOffset),\n );\n out.set(buf.slice(0, obfuscatedStartOffset));\n out.set(obfuscatedBytes, obfuscatedStartOffset);\n out.set(buf.slice(obfuscatedEndOffset), obfuscatedStartOffset + obfuscatedBytes.length);\n return out;\n};\n","/**\n * Header/Footer entry module for WordprocessingML documents.\n *\n * Replaces the former HeaderWrapper/FooterWrapper/Header/Footer/HeaderFooterBase\n * class hierarchy with a simple data structure + pure serialization function.\n *\n * Reference: ISO/IEC 29500-4, wml.xsd, CT_HdrFtr\n *\n * @module\n */\n\nimport type { Relationships } from \"@office-open/core\";\nimport { escapeXml } from \"@office-open/xml\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport { stringifyBodyChild } from \"../body\";\nimport type { BodyContext } from \"../context\";\nimport { DocumentAttributeNamespaces } from \"./document/document-attributes\";\nimport type { DocumentAttributeNamespace } from \"./document/document-attributes\";\n\n/**\n * Simple data structure for a header or footer entry.\n *\n * Replaces HeaderWrapper/FooterWrapper — holds children, relationships,\n * and the reference ID needed for section property references.\n *\n * Children are raw SectionChild objects (plain JSON or class instances).\n */\nexport interface HeaderFooterEntry {\n children: SectionChild[];\n relationships: Relationships;\n referenceId: number;\n}\n\n/**\n * Namespace keys used by header elements.\n * @internal\n */\nexport const HEADER_NAMESPACES: DocumentAttributeNamespace[] = [\n \"cx\",\n \"cx1\",\n \"cx2\",\n \"cx3\",\n \"cx4\",\n \"cx5\",\n \"cx6\",\n \"cx7\",\n \"cx8\",\n \"m\",\n \"mc\",\n \"o\",\n \"r\",\n \"v\",\n \"w\",\n \"w10\",\n \"w14\",\n \"w15\",\n \"w16cid\",\n \"w16se\",\n \"wne\",\n \"wp\",\n \"wp14\",\n \"wpc\",\n \"wpg\",\n \"wpi\",\n \"wps\",\n];\n\n/**\n * Namespace keys used by footer elements.\n * @internal\n */\nexport const FOOTER_NAMESPACES: DocumentAttributeNamespace[] = [\n \"m\",\n \"mc\",\n \"o\",\n \"r\",\n \"v\",\n \"w\",\n \"w10\",\n \"w14\",\n \"w15\",\n \"wne\",\n \"wp\",\n \"wp14\",\n \"wpc\",\n \"wpg\",\n \"wpi\",\n \"wps\",\n];\n\n/**\n * Serialize a header or footer to XML.\n *\n * Builds the `<w:hdr>` or `<w:ftr>` element with namespace declarations,\n * then serializes each child element via `stringifyBodyChild()`.\n *\n * @param tag - Element tag name (\"w:hdr\" or \"w:ftr\")\n * @param namespaces - Namespace keys to declare on the root element\n * @param children - Block-level child elements (raw SectionChild objects)\n * @param ctx - Body context for stringification\n */\nexport function stringifyHeaderFooter(\n tag: string,\n namespaces: DocumentAttributeNamespace[],\n children: SectionChild[],\n ctx: BodyContext,\n): string {\n const attrParts: string[] = [];\n for (const ns of namespaces) {\n attrParts.push(`xmlns:${ns}=\"${escapeXml(DocumentAttributeNamespaces[ns])}\"`);\n }\n const attrStr = attrParts.join(\" \");\n\n const childParts: string[] = [];\n for (const child of children) {\n childParts.push(stringifyBodyChild(child, ctx));\n }\n\n const body = childParts.join(\"\");\n return body.length === 0 ? `<${tag} ${attrStr}/>` : `<${tag} ${attrStr}>${body}</${tag}>`;\n}\n","/**\n * DOCX document compiler — pure function entry point.\n *\n * compileDocument() accepts DocumentOptions directly,\n * creates a DocxWriteContext internally, and produces a Zippable result.\n * All XML parts are produced via descriptors or serialize() —\n * no Formatter dependency.\n *\n * @module\n */\n\nimport {\n addSmartArtRelationships,\n findAndReplaceImagePlaceholders,\n formatId,\n hasPlaceholders,\n replaceAllPlaceholders,\n replaceNumberingPlaceholders,\n} from \"@office-open/core\";\nimport type { XmlifyedFile, ZipOptions, Zippable } from \"@office-open/core\";\nimport { APP_PROPS_XML } from \"@office-open/core\";\nimport {\n DEFAULT_DRAWING_XML,\n getColorXml,\n getLayoutXml,\n getStyleXml,\n} from \"@office-open/core/smartart\";\nimport type { DocumentOptions } from \"@parts/core-properties\";\nimport { obfuscate } from \"@parts/fonts/obfuscate-ttf-to-odttf\";\nimport { HEADER_NAMESPACES, FOOTER_NAMESPACES, stringifyHeaderFooter } from \"@parts/header-footer\";\n\nimport { stringifyDocumentXml, stringifyBodyChild, type BodyContext } from \"./body\";\nimport { DocxWriteContext } from \"./context\";\nimport {\n corePropertiesDesc,\n customPropertiesDesc,\n contentTypesDesc,\n buildContentTypes,\n fontTableDesc,\n webSettingsDesc,\n commentsDesc,\n bibliographyDesc,\n settingsDesc,\n footnotesDesc,\n endnotesDesc,\n glossaryDesc,\n} from \"./parts\";\n\n/** Reusable TextEncoder (stateless, safe to share). */\nconst encoder = new TextEncoder();\n\n/** XML declaration prepended to every OOXML part. */\nconst XML_DECL = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>';\n\n/** Extended context for header/footer formatted view caching. */\ntype DocxContext = BodyContext & {\n headerFormattedViews?: Map<number, string>;\n footerFormattedViews?: Map<number, string>;\n};\n\n// ── Public API ──\n\n/**\n * Compile document options into a flat file map suitable for fflate zipSync.\n *\n * This is the primary entry point for DOCX generation — accepts DocumentOptions\n * directly.\n */\nexport function compileDocument(\n options: DocumentOptions,\n overrides: XmlifyedFile[] = [],\n mediaLevel: number = 0,\n): Zippable {\n const ctx = new DocxWriteContext(options);\n const files: Zippable = {};\n\n const headerFormattedViews = new Map<number, string>();\n const footerFormattedViews = new Map<number, string>();\n\n const xmlifiedFileMapping = xmlifyContext(ctx, headerFormattedViews, footerFormattedViews);\n const map = new Map<string, XmlifyedFile | XmlifyedFile[]>(Object.entries(xmlifiedFileMapping));\n\n for (const [, obj] of map) {\n if (Array.isArray(obj)) {\n for (const subFile of obj as XmlifyedFile[]) {\n files[subFile.path] =\n typeof subFile.data === \"string\" ? encoder.encode(subFile.data) : subFile.data;\n }\n } else {\n const fileObj = obj as XmlifyedFile;\n files[fileObj.path] =\n typeof fileObj.data === \"string\" ? encoder.encode(fileObj.data) : fileObj.data;\n }\n }\n\n for (const subFile of overrides) {\n files[subFile.path] =\n typeof subFile.data === \"string\" ? encoder.encode(subFile.data) : subFile.data;\n }\n\n // Media files\n const mediaArray = ctx.media.array;\n for (const mediaData of mediaArray) {\n files[`word/media/${mediaData.fileName}`] = [\n mediaData.data as Uint8Array,\n { level: mediaLevel as ZipOptions[\"level\"] },\n ];\n if (mediaData.type === \"svg\") {\n files[`word/media/${mediaData.fallback.fileName}`] = [\n mediaData.fallback.data as Uint8Array,\n { level: mediaLevel as ZipOptions[\"level\"] },\n ];\n }\n }\n\n // Font files\n for (const { data: buffer, name, fontKey } of ctx.fontTable.fontOptionsWithKey) {\n const [nameWithoutExtension] = name.split(\".\");\n files[`word/fonts/${nameWithoutExtension}.odttf`] = obfuscate(buffer, fontKey);\n }\n\n return files;\n}\n\n// ── Internal ──\n\n/**\n * Complete mapping of all XML files in an OOXML document package.\n */\ninterface XmlifyedFileMapping {\n Document: XmlifyedFile;\n Styles: XmlifyedFile;\n Properties: XmlifyedFile;\n Numbering: XmlifyedFile;\n Relationships: XmlifyedFile;\n FileRelationships: XmlifyedFile;\n Headers: XmlifyedFile[];\n Footers: XmlifyedFile[];\n HeaderRelationships: XmlifyedFile[];\n FooterRelationships: XmlifyedFile[];\n ContentTypes: XmlifyedFile;\n CustomProperties: XmlifyedFile;\n AppProperties: XmlifyedFile;\n FootNotes: XmlifyedFile;\n FootNotesRelationships: XmlifyedFile;\n Endnotes: XmlifyedFile;\n EndnotesRelationships: XmlifyedFile;\n Settings: XmlifyedFile;\n Comments?: XmlifyedFile;\n CommentsRelationships?: XmlifyedFile;\n FontTable?: XmlifyedFile;\n FontTableRelationships?: XmlifyedFile;\n Bibliography?: XmlifyedFile;\n Charts?: XmlifyedFile[];\n DiagramData?: XmlifyedFile[];\n DiagramLayout?: XmlifyedFile[];\n DiagramStyle?: XmlifyedFile[];\n DiagramColors?: XmlifyedFile[];\n DiagramDrawing?: XmlifyedFile[];\n AltChunks?: XmlifyedFile[];\n SubDocs?: XmlifyedFile[];\n Glossary?: XmlifyedFile;\n WebSettings?: XmlifyedFile;\n}\n\nfunction xmlifyContext(\n ctx: DocxWriteContext,\n headerFormattedViews: Map<number, string>,\n footerFormattedViews: Map<number, string>,\n): XmlifyedFileMapping {\n const mkCtx = (viewWrapper: DocxContext[\"viewWrapper\"] = ctx.document): DocxContext => ({\n fileData: ctx,\n file: ctx,\n viewWrapper,\n stringifyChild: stringifyBodyChild,\n addRelationship: (type: string, target: string, mode?: string) =>\n ctx.addRelationship(type, target, mode),\n addMedia: (data: Uint8Array, type: string) => ctx.addMedia(data, type),\n });\n\n const documentRelationshipCount = ctx.document.relationships.relationshipCount + 1;\n const docCtx = mkCtx(ctx.document);\n const documentXmlData = XML_DECL + stringifyDocumentXml(ctx, docCtx);\n\n const commentRelationshipCount = ctx.comments.relationships.relationshipCount + 1;\n const commentCtx = mkCtx({ relationships: ctx.comments.relationships });\n const commentXmlData =\n XML_DECL + commentsDesc.stringify(ctx._options.comments ?? { children: [] }, commentCtx);\n\n const footnoteRelationshipCount = ctx.footNotes.relationships.relationshipCount + 1;\n const footnoteCtx = mkCtx({\n relationships: ctx.footNotes.relationships,\n });\n const footnoteXmlData =\n XML_DECL + (footnotesDesc.stringify({ notes: ctx.footNotes.notes }, footnoteCtx) ?? \"\");\n\n const documentMedia = findAndReplaceImagePlaceholders(\n documentXmlData,\n ctx.media.array,\n documentRelationshipCount,\n );\n const commentMedia = findAndReplaceImagePlaceholders(\n commentXmlData,\n ctx.media.array,\n commentRelationshipCount,\n );\n const footnoteMedia = findAndReplaceImagePlaceholders(\n footnoteXmlData,\n ctx.media.array,\n footnoteRelationshipCount,\n );\n\n return {\n AppProperties: {\n data: XML_DECL + APP_PROPS_XML,\n path: \"docProps/app.xml\",\n },\n Comments: {\n data: (() => {\n const xmlData = commentMedia.referenced.length > 0 ? commentMedia.xml : commentXmlData;\n return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/comments.xml\",\n },\n CommentsRelationships: {\n data: (() => {\n for (let i = 0; i < commentMedia.referenced.length; i++) {\n ctx.comments.relationships.addRelationship(\n commentRelationshipCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${commentMedia.referenced[i].fileName}`,\n );\n }\n return XML_DECL + ctx.comments.relationships.serialize();\n })(),\n path: \"word/_rels/comments.xml.rels\",\n },\n ContentTypes: {\n data:\n XML_DECL +\n (contentTypesDesc.stringify(\n buildContentTypes({\n headerCount: ctx.headers.length,\n footerCount: ctx.footers.length,\n chartCount: ctx.charts.array.length,\n smartArtCount: ctx.smartArts.array.length,\n hasBibliography: !!ctx._options.bibliography,\n hasGlossary: !!ctx.glossaryOptions,\n hasWebSettings: !!ctx.webSettings,\n altChunks: ctx.altChunks.array.map((ac) => ({\n path: `/word/${ac.path}`,\n contentType: ac.contentType ?? \"application/xhtml+xml\",\n })),\n subDocs: ctx.subDocs.array.map((sd) => ({ path: `/word/${sd.path}` })),\n }),\n ctx,\n ) ?? \"\"),\n path: \"[Content_Types].xml\",\n },\n CustomProperties: {\n data:\n XML_DECL +\n (customPropertiesDesc.stringify({ properties: ctx._options.customProperties ?? [] }, ctx) ??\n \"\"),\n path: \"docProps/custom.xml\",\n },\n Document: {\n data: (() => {\n let xmlData = documentMedia.referenced.length > 0 ? documentMedia.xml : documentXmlData;\n if (hasPlaceholders(xmlData)) {\n const mediaCount = documentMedia.referenced.length;\n const chartKeys = ctx.charts.array.map((c) => c.key);\n const smartArtKeys = ctx.smartArts.array.map((s) => s.key);\n const chartOffset = documentRelationshipCount + mediaCount;\n const smartArtOffset = chartOffset + chartKeys.length;\n\n // Build combined replacement entries for charts, smartart, and numbering\n const entries: Array<{ prefix?: string; key: string; value: string }> = [];\n for (let i = 0; i < chartKeys.length; i++) {\n entries.push({\n prefix: \"chart:\",\n key: chartKeys[i],\n value: formatId(chartOffset, i, \"rId\"),\n });\n }\n const saPrefixes = [\"smartart:\", \"smartart-lo:\", \"smartart-qs:\", \"smartart-cs:\"];\n for (let i = 0; i < smartArtKeys.length; i++) {\n for (let p = 0; p < saPrefixes.length; p++) {\n entries.push({\n prefix: saPrefixes[p],\n key: smartArtKeys[i],\n value: formatId(smartArtOffset + p * smartArtKeys.length, i, \"rId\"),\n });\n }\n }\n for (const { reference, instance, numId } of ctx.numbering.concreteNumbering) {\n entries.push({ key: `${reference}-${instance}`, value: numId.toString() });\n }\n xmlData = replaceAllPlaceholders(xmlData, entries);\n } else {\n xmlData = replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n }\n return xmlData;\n })(),\n path: \"word/document.xml\",\n },\n Endnotes: {\n data: (() => {\n const endnoteCtx = mkCtx({\n relationships: ctx.endnotes.relationships,\n });\n const xmlData =\n XML_DECL + (endnotesDesc.stringify({ notes: ctx.endnotes.notes }, endnoteCtx) ?? \"\");\n const endnoteRelCount = ctx.endnotes.relationships.relationshipCount + 1;\n const endnoteMedia = findAndReplaceImagePlaceholders(\n xmlData,\n ctx.media.array,\n endnoteRelCount,\n );\n if (endnoteMedia.referenced.length > 0) {\n for (let i = 0; i < endnoteMedia.referenced.length; i++) {\n ctx.endnotes.relationships.addRelationship(\n endnoteRelCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${endnoteMedia.referenced[i].fileName}`,\n );\n }\n return replaceNumberingPlaceholders(endnoteMedia.xml, ctx.numbering.concreteNumbering);\n }\n return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/endnotes.xml\",\n },\n EndnotesRelationships: {\n data: XML_DECL + ctx.endnotes.relationships.serialize(),\n path: \"word/_rels/endnotes.xml.rels\",\n },\n FileRelationships: {\n data: XML_DECL + ctx.fileRelationships.serialize(),\n path: \"_rels/.rels\",\n },\n FontTable: {\n data:\n XML_DECL +\n (fontTableDesc.stringify({ fonts: ctx.fontTable.fontOptionsWithKey }, ctx) ?? \"\"),\n path: \"word/fontTable.xml\",\n },\n FontTableRelationships: {\n data: XML_DECL + ctx.fontTable.relationships.serialize(),\n path: \"word/_rels/fontTable.xml.rels\",\n },\n FootNotes: {\n data: (() => {\n const xmlData = footnoteMedia.referenced.length > 0 ? footnoteMedia.xml : footnoteXmlData;\n return replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/footnotes.xml\",\n },\n FootNotesRelationships: {\n data: (() => {\n for (let i = 0; i < footnoteMedia.referenced.length; i++) {\n ctx.footNotes.relationships.addRelationship(\n footnoteRelationshipCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${footnoteMedia.referenced[i].fileName}`,\n );\n }\n return XML_DECL + ctx.footNotes.relationships.serialize();\n })(),\n path: \"word/_rels/footnotes.xml.rels\",\n },\n FooterRelationships: ctx.footers.map((entry, index) => {\n const footerCtx = mkCtx({ relationships: entry.relationships });\n const xmlData =\n XML_DECL + stringifyHeaderFooter(\"w:ftr\", FOOTER_NAMESPACES, entry.children, footerCtx);\n footerFormattedViews.set(index, xmlData);\n const footerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0);\n\n for (let i = 0; i < footerMedia.referenced.length; i++) {\n entry.relationships.addRelationship(\n i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${footerMedia.referenced[i].fileName}`,\n );\n }\n\n return {\n data: XML_DECL + entry.relationships.serialize(),\n path: `word/_rels/footer${index + 1}.xml.rels`,\n };\n }),\n Footers: ctx.footers.map((_entry, index) => {\n const tempXmlData = footerFormattedViews.get(index)!;\n const footerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0);\n const xmlData = footerMedia.referenced.length > 0 ? footerMedia.xml : tempXmlData;\n\n return {\n data: replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering),\n path: `word/footer${index + 1}.xml`,\n };\n }),\n HeaderRelationships: ctx.headers.map((entry, index) => {\n const headerCtx = mkCtx({ relationships: entry.relationships });\n const xmlData =\n XML_DECL + stringifyHeaderFooter(\"w:hdr\", HEADER_NAMESPACES, entry.children, headerCtx);\n headerFormattedViews.set(index, xmlData);\n const headerMedia = findAndReplaceImagePlaceholders(xmlData, ctx.media.array, 0);\n\n for (let i = 0; i < headerMedia.referenced.length; i++) {\n entry.relationships.addRelationship(\n i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${headerMedia.referenced[i].fileName}`,\n );\n }\n\n return {\n data: XML_DECL + entry.relationships.serialize(),\n path: `word/_rels/header${index + 1}.xml.rels`,\n };\n }),\n Headers: ctx.headers.map((_entry, index) => {\n const tempXmlData = headerFormattedViews.get(index)!;\n const headerMedia = findAndReplaceImagePlaceholders(tempXmlData, ctx.media.array, 0);\n const xmlData = headerMedia.referenced.length > 0 ? headerMedia.xml : tempXmlData;\n\n return {\n data: replaceNumberingPlaceholders(xmlData, ctx.numbering.concreteNumbering),\n path: `word/header${index + 1}.xml`,\n };\n }),\n Numbering: {\n data: ctx.numbering.serialize(),\n path: \"word/numbering.xml\",\n },\n Properties: {\n data: XML_DECL + (corePropertiesDesc.stringify(ctx._options, ctx) ?? \"\"),\n path: \"docProps/core.xml\",\n },\n Relationships: {\n data: (() => {\n for (let i = 0; i < documentMedia.referenced.length; i++) {\n ctx.document.relationships.addRelationship(\n documentRelationshipCount + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\",\n `media/${documentMedia.referenced[i].fileName}`,\n );\n }\n\n const chartOffset = documentRelationshipCount + documentMedia.referenced.length;\n for (let i = 0; i < ctx.charts.array.length; i++) {\n ctx.document.relationships.addRelationship(\n chartOffset + i,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\",\n `charts/chart${i + 1}.xml`,\n );\n }\n\n addSmartArtRelationships(\n ctx.smartArts.array.map((s) => s.key),\n (id, type, target) => {\n ctx.document.relationships.addRelationship(id, type, target);\n },\n documentRelationshipCount + documentMedia.referenced.length + ctx.charts.array.length,\n 0,\n {\n pathPrefix: \"\",\n styleRelType: \"http://schemas.microsoft.com/office/2007/relationships/diagramStyle\",\n },\n );\n\n ctx.document.relationships.addRelationship(\n ctx.document.relationships.relationshipCount + 1,\n \"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable\",\n \"fontTable.xml\",\n );\n\n return XML_DECL + ctx.document.relationships.serialize();\n })(),\n path: \"word/_rels/document.xml.rels\",\n },\n Settings: {\n data: XML_DECL + (settingsDesc.stringify(ctx._settingsOptions, ctx) ?? \"\"),\n path: \"word/settings.xml\",\n },\n Styles: {\n data: (() => {\n const xmlStyles = ctx.styles.serialize();\n return replaceNumberingPlaceholders(xmlStyles, ctx.numbering.concreteNumbering);\n })(),\n path: \"word/styles.xml\",\n },\n ...(ctx._options.bibliography\n ? {\n Bibliography: {\n data: XML_DECL + (bibliographyDesc.stringify(ctx._options.bibliography, ctx) ?? \"\"),\n path: \"word/bibliography.xml\",\n },\n }\n : {}),\n ...(ctx.charts.array.length > 0\n ? {\n Charts: ctx.charts.array.flatMap((chartData, i) => [\n {\n data: XML_DECL + chartData.chartSpaceXml,\n path: `word/charts/chart${i + 1}.xml`,\n },\n {\n data: '<Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"/>',\n path: `word/charts/_rels/chart${i + 1}.xml.rels`,\n },\n ]),\n }\n : {}),\n ...(ctx.smartArts.array.length > 0\n ? {\n DiagramData: ctx.smartArts.array.map((smartArtData, i) => ({\n data: XML_DECL + smartArtData.dataModelXml,\n path: `word/diagrams/data${i + 1}.xml`,\n })),\n DiagramLayout: ctx.smartArts.array.map((smartArtData, i) => ({\n data: getLayoutXml(smartArtData.layout),\n path: `word/diagrams/layout${i + 1}.xml`,\n })),\n DiagramStyle: ctx.smartArts.array.map((smartArtData, i) => ({\n data: getStyleXml(smartArtData.style),\n path: `word/diagrams/quickStyle${i + 1}.xml`,\n })),\n DiagramColors: ctx.smartArts.array.map((smartArtData, i) => ({\n data: getColorXml(smartArtData.color),\n path: `word/diagrams/colors${i + 1}.xml`,\n })),\n DiagramDrawing: ctx.smartArts.array.map((_, i) => ({\n data: DEFAULT_DRAWING_XML,\n path: `word/diagrams/drawing${i + 1}.xml`,\n })),\n }\n : {}),\n ...(ctx.altChunks.array.length > 0\n ? {\n AltChunks: ctx.altChunks.array.map((altChunkData) => ({\n data: altChunkData.data,\n path: `word/${altChunkData.path}`,\n })),\n }\n : {}),\n ...(ctx.subDocs.array.length > 0\n ? {\n SubDocs: ctx.subDocs.array.map((subDocData) => ({\n data: subDocData.data,\n path: `word/${subDocData.path}`,\n })),\n }\n : {}),\n ...(ctx.glossaryOptions\n ? {\n Glossary: {\n data: (() => {\n const glossaryCtx = mkCtx(undefined);\n return XML_DECL + (glossaryDesc.stringify(ctx.glossaryOptions!, glossaryCtx) ?? \"\");\n })(),\n path: \"word/glossary/document.xml\",\n },\n }\n : {}),\n ...(ctx.webSettings\n ? {\n WebSettings: {\n data: XML_DECL + (webSettingsDesc.stringify(ctx._options.webSettings ?? {}, ctx) ?? \"\"),\n path: \"word/webSettings.xml\",\n },\n }\n : {}),\n };\n}\n","/**\n * Pure function API for generating DOCX files.\n *\n * @module\n */\n\nimport { createPacker, OoxmlMimeType } from \"@office-open/core\";\nimport type { OutputByType, OutputType, PackerOptions } from \"@office-open/core\";\nimport type { DocumentOptions } from \"@parts/core-properties\";\n\nimport { compileDocument } from \"./compiler\";\n\n/** @internal Packer instance for DOCX generation. */\nconst Packer = createPacker<DocumentOptions>({\n compile: (options, overrides, mediaLevel) => compileDocument(options, overrides, mediaLevel),\n mimeType: OoxmlMimeType.DOCX,\n});\n\n/**\n * Generate a DOCX file from pure JSON options.\n *\n * The output format is controlled by `packerOptions.type` (default: `\"nodebuffer\"` → Buffer).\n * For synchronous generation, use {@link generateDocumentSync}. For streaming, use {@link generateDocumentStream}.\n *\n * @param options - Document options (sections, styles, numbering, etc.)\n * @param packerOptions - Optional packer configuration (type, compression, overrides, etc.)\n *\n * @example\n * ```typescript\n * import { generateDocument } from \"@office-open/docx\";\n *\n * const buffer = await generateDocument({ sections: [...] });\n * const bytes = await generateDocument({ sections: [...] }, { type: \"uint8array\" });\n * const blob = await generateDocument({ sections: [...] }, { type: \"blob\" });\n * ```\n */\nexport function generateDocument<T extends OutputType = \"nodebuffer\">(\n options: DocumentOptions,\n packerOptions?: PackerOptions<T>,\n): Promise<OutputByType[T]> {\n return Packer.pack(options, packerOptions) as Promise<OutputByType[T]>;\n}\n\n/**\n * Synchronously generate a DOCX file from pure JSON options.\n */\nexport function generateDocumentSync<T extends OutputType = \"nodebuffer\">(\n options: DocumentOptions,\n packerOptions?: PackerOptions<T>,\n): OutputByType[T] {\n return Packer.packSync(options, packerOptions) as OutputByType[T];\n}\n\n/**\n * Generate a DOCX file as a `ReadableStream<Uint8Array>`.\n */\nexport function generateDocumentStream(\n options: DocumentOptions,\n packerOptions?: PackerOptions,\n): ReadableStream<Uint8Array> {\n return Packer.toStream(options, packerOptions);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,MAAM,wBAAwB;;AAE9B,MAAM,sBAAsB;;AAE5B,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;AAuBjB,MAAa,aAAa,KAAiB,YAAgC;CACzE,MAAM,OAAO,QAAQ,QAAQ,MAAM,EAAE;CACrC,IAAI,KAAK,WAAW,UAClB,MAAM,IAAI,MAAM,kDAAkD,SAAS;CAI7E,MAAM,aADa,KAAK,QAAQ,SAAS,KAAK,EAAE,KAAK,EAAE,MAAM,GACjC,EAAE,KAAK,cAAc,SAAS,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AS,aAAa;AAC/C;;;;AAKA,SAAgB,uBACd,SACA,eAC4B;CAC5B,OAAO,OAAO,SAAS,SAAS,aAAa;AAC/C"} |
| import { A as footnotesDesc, B as settingsDesc, C as fontTableDesc, H as buildNumberingCache, I as parseToc, K as parseNumberingDefinitions, M as parseParagraphProperties, O as parseSdtBlock, S as bibliographyDesc, U as buildStyleCache, W as parseStyleDefinitions, _ as commentsDesc, c as corePropertiesDesc, f as setBodyParseChild, g as contentTypesDesc, j as parseParagraph, k as endnotesDesc, o as webSettingsDesc, s as customPropertiesDesc, t as DocxReadContext, x as glossaryDesc } from "./context-DkABanLH.mjs"; | ||
| import { E as tableDesc, T as setTableParseChild, t as parseSectionPropertiesEl } from "./document-Ch4dyBB4.mjs"; | ||
| import { parseArchive, toUint8Array } from "@office-open/core"; | ||
| import { attr, findChild, stringify } from "@office-open/xml"; | ||
| //#region src/parts/alt-chunk/alt-chunk-parse.ts | ||
| /** | ||
| * AltChunk parser for DOCX documents. | ||
| * | ||
| * Parses w:altChunk elements and extracts embedded content from the ZIP. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse a w:altChunk element into AltChunkOptions. | ||
| * Reads the referenced data from the ZIP package. | ||
| */ | ||
| function parseAltChunk(el, ctx) { | ||
| const rId = attr(el, "r:id"); | ||
| if (!rId) throw new Error("w:altChunk missing r:id attribute"); | ||
| const path = ctx.docx.partRefs.afChunks.get(rId); | ||
| if (!path) throw new Error(`AltChunk relationship ${rId} not found`); | ||
| const data = ctx.docx.doc.getRaw(path); | ||
| if (!data) throw new Error(`AltChunk data not found at ${path}`); | ||
| const ext = path.split(".").pop() ?? "txt"; | ||
| let contentType; | ||
| let extension; | ||
| switch (ext) { | ||
| case "html": | ||
| contentType = "text/html"; | ||
| extension = "html"; | ||
| break; | ||
| case "rtf": | ||
| contentType = "application/rtf"; | ||
| extension = "rtf"; | ||
| break; | ||
| default: | ||
| contentType = "text/plain"; | ||
| extension = "txt"; | ||
| break; | ||
| } | ||
| return { | ||
| data, | ||
| contentType, | ||
| extension | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region src/parts/custom-xml/custom-xml-parse.ts | ||
| /** | ||
| * Parser for custom XML block elements (w:customXml). | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse w:customXml element into CustomXmlBlockOptions. | ||
| * | ||
| * Uses a callback for child parsing to avoid circular dependencies | ||
| * (same pattern as parseTable). | ||
| */ | ||
| function parseCustomXmlBlock(el, ctx, parseChild) { | ||
| const opts = {}; | ||
| const element = attr(el, "w:element"); | ||
| if (element) opts.element = element; | ||
| const uri = attr(el, "w:uri"); | ||
| if (uri) opts.uri = uri; | ||
| const xmlPr = findChild(el, "w:customXmlPr"); | ||
| if (xmlPr) opts.customXmlPr = parseCustomXmlPr(xmlPr); | ||
| const children = []; | ||
| for (const child of el.elements ?? []) { | ||
| if (child.name === "w:customXmlPr") continue; | ||
| const parsed = parseChild(child, ctx); | ||
| children.push(parsed); | ||
| } | ||
| if (children.length > 0) opts.children = children; | ||
| return opts; | ||
| } | ||
| function parseCustomXmlPr(el) { | ||
| const opts = {}; | ||
| const placeholder = findChild(el, "w:placeholder"); | ||
| if (placeholder) { | ||
| const val = attr(placeholder, "w:val"); | ||
| if (val) opts.placeholder = val; | ||
| } | ||
| const attributes = []; | ||
| for (const child of el.elements ?? []) { | ||
| if (child.name !== "w:attr") continue; | ||
| const name = attr(child, "w:name"); | ||
| const val = attr(child, "w:val"); | ||
| if (name && val) { | ||
| const attrOpts = { | ||
| name, | ||
| val | ||
| }; | ||
| const uriVal = attr(child, "w:uri"); | ||
| if (uriVal) attrOpts.uri = uriVal; | ||
| attributes.push(attrOpts); | ||
| } | ||
| } | ||
| if (attributes.length > 0) opts.attributes = attributes; | ||
| return opts; | ||
| } | ||
| //#endregion | ||
| //#region src/parts/sub-doc/sub-doc-parse.ts | ||
| /** | ||
| * SubDoc parser for DOCX documents. | ||
| * | ||
| * Parses w:subDoc elements and extracts embedded document data. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse a w:subDoc element into SubDocOptions. | ||
| * Reads the referenced document data from the ZIP package. | ||
| */ | ||
| function parseSubDoc(el, ctx) { | ||
| const rId = attr(el, "r:id"); | ||
| if (!rId) throw new Error("w:subDoc missing r:id attribute"); | ||
| const path = ctx.docx.partRefs.subDocs.get(rId); | ||
| if (!path) throw new Error(`SubDoc relationship ${rId} not found`); | ||
| const data = ctx.docx.doc.getRaw(path); | ||
| if (!data) throw new Error(`SubDoc data not found at ${path}`); | ||
| return { data }; | ||
| } | ||
| //#endregion | ||
| //#region src/parts/textbox/textbox-parse.ts | ||
| /** | ||
| * Textbox parser for DOCX documents. | ||
| * | ||
| * Parses w:pict → v:shape → v:textbox → w:txbxContent elements. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse VML shape style string into VmlShapeStyle-like object. | ||
| */ | ||
| function parseVmlStyle(styleStr) { | ||
| const style = {}; | ||
| for (const part of styleStr.split(";")) { | ||
| const [key, val] = part.split(":").map((s) => s.trim()); | ||
| if (key && val) style[key] = val; | ||
| } | ||
| return style; | ||
| } | ||
| /** | ||
| * Parse a w:pict element that contains a textbox. | ||
| * Returns an object suitable for the { textbox: ... } SectionChild variant. | ||
| */ | ||
| function parseTextbox(el, ctx, parseChildren) { | ||
| const shape = findDeep$1(el, "v:shape")[0]; | ||
| if (!shape) return {}; | ||
| const opts = {}; | ||
| const styleAttr = attr(shape, "style"); | ||
| if (styleAttr) opts.style = parseVmlStyle(styleAttr); | ||
| const textbox = findDeep$1(shape, "v:textbox")[0]; | ||
| if (textbox) { | ||
| const txbxContent = findChild(textbox, "w:txbxContent"); | ||
| if (txbxContent) { | ||
| const childList = parseChildren(txbxContent.elements ?? [], ctx); | ||
| if (childList.length > 0) opts.children = childList; | ||
| } | ||
| } | ||
| return opts; | ||
| } | ||
| function findDeep$1(parent, name) { | ||
| const result = []; | ||
| for (const child of parent.elements ?? []) { | ||
| if (child.name === name) result.push(child); | ||
| result.push(...findDeep$1(child, name)); | ||
| } | ||
| return result; | ||
| } | ||
| //#endregion | ||
| //#region src/parse/body.ts | ||
| /** | ||
| * Body parser for DOCX documents. | ||
| * | ||
| * Parses w:body → SectionOptions[] by splitting at w:sectPr boundaries. | ||
| * | ||
| * @module | ||
| */ | ||
| /** | ||
| * Parse w:sectPr element into SectionPropertiesOptions. | ||
| * Delegates to the section properties descriptor's parse method. | ||
| */ | ||
| function parseSectionProperties(el, ctx) { | ||
| const opts = parseSectionPropertiesEl(el); | ||
| const headerRefs = {}; | ||
| const footerRefs = {}; | ||
| for (const child of el.elements ?? []) { | ||
| if (child.name === "w:headerReference") { | ||
| const rId = attr(child, "r:id"); | ||
| const type = attr(child, "w:type"); | ||
| if (rId && type) { | ||
| const headerChildren = parseHeaderFooterRef(rId, ctx); | ||
| if (headerChildren) headerRefs[type] = headerChildren; | ||
| } | ||
| } | ||
| if (child.name === "w:footerReference") { | ||
| const rId = attr(child, "r:id"); | ||
| const type = attr(child, "w:type"); | ||
| if (rId && type) { | ||
| const footerChildren = parseHeaderFooterRef(rId, ctx); | ||
| if (footerChildren) footerRefs[type] = footerChildren; | ||
| } | ||
| } | ||
| } | ||
| if (Object.keys(headerRefs).length > 0) opts.parsedHeaders = headerRefs; | ||
| if (Object.keys(footerRefs).length > 0) opts.parsedFooters = footerRefs; | ||
| return opts; | ||
| } | ||
| /** | ||
| * Parse a header/footer reference by following the relationship to its XML part. | ||
| */ | ||
| function parseHeaderFooterRef(rId, ctx) { | ||
| const path = ctx.docx.partRefs.headers.get(rId) ?? ctx.docx.partRefs.footers.get(rId); | ||
| if (!path) return void 0; | ||
| const partEl = ctx.docx.doc.get(path); | ||
| if (!partEl) return void 0; | ||
| const children = []; | ||
| for (const child of partEl.elements ?? []) { | ||
| const sectionChild = parseSectionChild(child, ctx); | ||
| if (sectionChild !== void 0) children.push(sectionChild); | ||
| } | ||
| return children.length > 0 ? children : void 0; | ||
| } | ||
| /** | ||
| * Parse a single body child element into a SectionChild. | ||
| */ | ||
| function parseSectionChild(el, ctx) { | ||
| switch (el.name) { | ||
| case "w:p": { | ||
| const pict = findChild(el, "w:pict"); | ||
| if (pict) { | ||
| if (findDeepElement(pict, "v:textbox")) return { textbox: parseTextbox(pict, ctx, parseSectionChildrenElements) }; | ||
| } | ||
| return { paragraph: parseParagraph(el, ctx) }; | ||
| } | ||
| case "w:tbl": return { table: tableDesc.parse(el, ctx) }; | ||
| case "w:sdt": { | ||
| const tocResult = parseToc(el, ctx); | ||
| if (tocResult) return { toc: tocResult }; | ||
| const sdtResult = parseSdtBlock(el, ctx, parseSectionChildrenElements); | ||
| return { sdt: { | ||
| properties: sdtResult.properties, | ||
| children: sdtResult.children | ||
| } }; | ||
| } | ||
| case "w:altChunk": return { altChunk: parseAltChunk(el, ctx) }; | ||
| case "w:subDoc": return { subDoc: parseSubDoc(el, ctx) }; | ||
| case "w:customXml": return { customXml: parseCustomXmlBlock(el, ctx, parseSectionChild) }; | ||
| default: return { rawXml: stringify(el) }; | ||
| } | ||
| } | ||
| /** | ||
| * Find a deep descendant element by name. | ||
| */ | ||
| function findDeepElement(parent, name) { | ||
| for (const child of parent.elements ?? []) { | ||
| if (child.name === name) return child; | ||
| const found = findDeepElement(child, name); | ||
| if (found) return found; | ||
| } | ||
| } | ||
| /** | ||
| * Parse w:body element into SectionOptions[]. | ||
| * | ||
| * Splits body content at w:sectPr boundaries to create sections. | ||
| * The last w:sectPr (child of w:body directly) defines the last section. | ||
| * Previous w:sectPr elements appear inside w:pPr elements. | ||
| */ | ||
| function parseBody(body, ctx) { | ||
| setBodyParseChild(parseSectionChild); | ||
| const bodyChildren = []; | ||
| const boundaries = []; | ||
| for (const child of body.elements ?? []) if (child.name === "w:sectPr") boundaries.push({ | ||
| index: bodyChildren.length, | ||
| sectPr: child | ||
| }); | ||
| else { | ||
| bodyChildren.push(child); | ||
| if (child.name === "w:p") { | ||
| const pPr = findChild(child, "w:pPr"); | ||
| if (pPr) { | ||
| const sectPr = findChild(pPr, "w:sectPr"); | ||
| if (sectPr) boundaries.push({ | ||
| index: bodyChildren.length, | ||
| sectPr | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| if (boundaries.length === 0) return [{ children: bodyChildren.map((el) => parseSectionChild(el, ctx)) }]; | ||
| const sections = []; | ||
| let start = 0; | ||
| for (let i = 0; i < boundaries.length; i++) { | ||
| const boundary = boundaries[i]; | ||
| const endIdx = i < boundaries.length - 1 ? Math.max(start, boundary.index - 1) : boundary.index; | ||
| const sectionElements = bodyChildren.slice(start, endIdx); | ||
| const parsedProps = parseSectionProperties(boundary.sectPr, ctx); | ||
| const rawProps = parsedProps; | ||
| const parsedHeaders = rawProps.parsedHeaders; | ||
| const parsedFooters = rawProps.parsedFooters; | ||
| const cleanProps = { ...parsedProps }; | ||
| delete cleanProps.parsedHeaders; | ||
| delete cleanProps.parsedFooters; | ||
| const section = { | ||
| children: sectionElements.map((el) => parseSectionChild(el, ctx)), | ||
| properties: cleanProps, | ||
| ...parsedHeaders ? { headers: parsedHeaders } : {}, | ||
| ...parsedFooters ? { footers: parsedFooters } : {} | ||
| }; | ||
| sections.push(section); | ||
| start = boundary.index; | ||
| } | ||
| return sections; | ||
| } | ||
| /** | ||
| * Parse a list of elements into SectionChild[]. | ||
| * Used by SDT and textbox parsers for their content. | ||
| */ | ||
| function parseSectionChildrenElements(elements, ctx) { | ||
| return elements.map((el) => parseSectionChild(el, ctx)); | ||
| } | ||
| //#endregion | ||
| //#region src/parse.ts | ||
| function resolveRelsPath(target) { | ||
| if (target.startsWith("/")) return target.slice(1); | ||
| if (target.startsWith("../")) return target.replace("../", ""); | ||
| return `word/${target}`; | ||
| } | ||
| function parseDocPartRefs(doc) { | ||
| const refs = { | ||
| headers: /* @__PURE__ */ new Map(), | ||
| footers: /* @__PURE__ */ new Map(), | ||
| hyperlinks: /* @__PURE__ */ new Map(), | ||
| charts: /* @__PURE__ */ new Map(), | ||
| diagramData: /* @__PURE__ */ new Map(), | ||
| media: /* @__PURE__ */ new Map(), | ||
| afChunks: /* @__PURE__ */ new Map(), | ||
| subDocs: /* @__PURE__ */ new Map() | ||
| }; | ||
| const relsEl = doc.get("word/_rels/document.xml.rels"); | ||
| if (!relsEl) return refs; | ||
| for (const child of relsEl.elements ?? []) { | ||
| if (child.name !== "Relationship") continue; | ||
| const type = attr(child, "Type") ?? ""; | ||
| const target = attr(child, "Target") ?? ""; | ||
| const id = attr(child, "Id") ?? ""; | ||
| if (!target) continue; | ||
| const path = resolveRelsPath(target); | ||
| if (type.includes("/header")) refs.headers.set(id, path); | ||
| else if (type.includes("/footer")) refs.footers.set(id, path); | ||
| else if (type.includes("/footnotes")) refs.footnotes = path; | ||
| else if (type.includes("/endnotes")) refs.endnotes = path; | ||
| else if (type.includes("/comments")) refs.comments = path; | ||
| else if (type.includes("/chart")) refs.charts.set(id, path); | ||
| else if (type.includes("/diagramData")) refs.diagramData.set(id, path); | ||
| else if (type.includes("/image") || type.includes("/media")) refs.media.set(id, path); | ||
| else if (type.includes("/aFChunk")) refs.afChunks.set(id, path); | ||
| else if (type.includes("/subDocument")) refs.subDocs.set(id, path); | ||
| else if (type.includes("/bibliography")) refs.bibliography = path; | ||
| else if (type.includes("/glossaryDocument")) refs.glossary = path; | ||
| else if (type.includes("/hyperlink")) refs.hyperlinks.set(id, target); | ||
| } | ||
| return refs; | ||
| } | ||
| function parseRootRels(doc) { | ||
| const relsEl = doc.get("_rels/.rels"); | ||
| if (!relsEl) return {}; | ||
| let coreProps; | ||
| let appProps; | ||
| let customProps; | ||
| for (const child of relsEl.elements ?? []) { | ||
| if (child.name !== "Relationship") continue; | ||
| const type = attr(child, "Type") ?? ""; | ||
| const target = attr(child, "Target") ?? ""; | ||
| if (!target) continue; | ||
| const path = target.startsWith("/") ? target.slice(1) : target; | ||
| if (type.includes("/core-properties")) coreProps = path; | ||
| else if (type.includes("/extended-properties")) appProps = path; | ||
| else if (type.includes("/custom-properties")) customProps = path; | ||
| } | ||
| return { | ||
| coreProps, | ||
| appProps, | ||
| customProps | ||
| }; | ||
| } | ||
| /** | ||
| * Parse a .docx file and convert it into DocumentOptions. | ||
| * | ||
| * This is the main public API for parsing DOCX files. | ||
| * The returned options can be passed directly to `new Document(parsed)` | ||
| * to recreate the document. | ||
| * | ||
| * @param data - Raw bytes of a .docx file | ||
| * @returns Document options including sections and metadata | ||
| */ | ||
| function parseDocument(data) { | ||
| const docx = parseDocx(data); | ||
| const ctx = new DocxReadContext(docx, buildStyleCache(docx.styles), buildNumberingCache(docx.numbering)); | ||
| setTableParseChild(parseSectionChild); | ||
| setBodyParseChild(parseSectionChild); | ||
| const opts = { sections: parseBody(docx.body, ctx) }; | ||
| if (docx.background) { | ||
| const bg = {}; | ||
| const color = attr(docx.background, "w:color"); | ||
| if (color) bg.color = color; | ||
| if (Object.keys(bg).length > 0) opts.background = bg; | ||
| } | ||
| if (docx.coreProps) { | ||
| const corePropsEl = docx.doc.get(docx.coreProps); | ||
| if (corePropsEl) { | ||
| const cp = corePropertiesDesc.parse(corePropsEl, ctx); | ||
| if (cp.title) opts.title = cp.title; | ||
| if (cp.subject) opts.subject = cp.subject; | ||
| if (cp.creator) opts.creator = cp.creator; | ||
| if (cp.keywords) opts.keywords = cp.keywords; | ||
| if (cp.description) opts.description = cp.description; | ||
| if (cp.lastModifiedBy) opts.lastModifiedBy = cp.lastModifiedBy; | ||
| if (cp.revision) opts.revision = cp.revision; | ||
| } | ||
| } | ||
| if (docx.settings) Object.assign(opts, settingsDesc.parse(docx.settings, ctx)); | ||
| if (docx.webSettings) { | ||
| const wsOpts = webSettingsDesc.parse(docx.webSettings, ctx); | ||
| if (Object.keys(wsOpts).length > 0) opts.webSettings = wsOpts; | ||
| } | ||
| if (docx.customProps) { | ||
| const customPropsEl = docx.doc.get(docx.customProps); | ||
| if (customPropsEl) { | ||
| const cpResult = customPropertiesDesc.parse(customPropsEl, ctx); | ||
| if (cpResult.properties && cpResult.properties.length > 0) opts.customProperties = cpResult.properties; | ||
| } | ||
| } | ||
| if (docx.partRefs.comments) { | ||
| const commentsEl = docx.doc.get(docx.partRefs.comments); | ||
| if (commentsEl) { | ||
| const children = commentsDesc.parse(commentsEl, ctx).children; | ||
| if (children && children.length > 0) opts.comments = { children }; | ||
| } | ||
| } | ||
| if (docx.partRefs.footnotes) { | ||
| const footnotesEl = docx.doc.get(docx.partRefs.footnotes); | ||
| if (footnotesEl) { | ||
| const fnResult = footnotesDesc.parse(footnotesEl, ctx); | ||
| const footnotesMap = {}; | ||
| for (const [id, paragraphs] of fnResult.notes) footnotesMap[String(id)] = { children: paragraphs }; | ||
| if (Object.keys(footnotesMap).length > 0) opts.footnotes = footnotesMap; | ||
| } | ||
| } | ||
| if (docx.partRefs.endnotes) { | ||
| const endnotesEl = docx.doc.get(docx.partRefs.endnotes); | ||
| if (endnotesEl) { | ||
| const enResult = endnotesDesc.parse(endnotesEl, ctx); | ||
| const endnotesMap = {}; | ||
| for (const [id, paragraphs] of enResult.notes) endnotesMap[String(id)] = { children: paragraphs }; | ||
| if (Object.keys(endnotesMap).length > 0) opts.endnotes = endnotesMap; | ||
| } | ||
| } | ||
| if (docx.styles) { | ||
| const styleOpts = parseStyleDefinitions(docx.styles, parseParagraphProperties, ctx); | ||
| if (styleOpts) opts.styles = styleOpts; | ||
| } | ||
| if (docx.numbering) { | ||
| const numOpts = parseNumberingDefinitions(docx.numbering); | ||
| if (numOpts) opts.numbering = numOpts; | ||
| } | ||
| if (docx.fontTable) { | ||
| const ftResult = fontTableDesc.parse(docx.fontTable, ctx); | ||
| if (ftResult.fonts && ftResult.fonts.length > 0) opts.fonts = ftResult.fonts; | ||
| } | ||
| if (docx.partRefs.bibliography) { | ||
| const bibEl = docx.doc.get(docx.partRefs.bibliography); | ||
| if (bibEl) { | ||
| const bibResult = bibliographyDesc.parse(bibEl, ctx); | ||
| if (bibResult.sources && bibResult.sources.length > 0) opts.bibliography = bibResult; | ||
| } | ||
| } | ||
| if (docx.partRefs.glossary) { | ||
| const glossaryEl = docx.doc.get(docx.partRefs.glossary); | ||
| if (glossaryEl) { | ||
| const glossaryResult = glossaryDesc.parse(glossaryEl, ctx); | ||
| if (glossaryResult.parts && glossaryResult.parts.length > 0) opts.glossary = glossaryResult; | ||
| } | ||
| } | ||
| if (docx.contentTypes) { | ||
| const ctResult = contentTypesDesc.parse(docx.contentTypes, ctx); | ||
| if (ctResult) opts.contentTypes = ctResult; | ||
| } | ||
| return opts; | ||
| } | ||
| function parseDocx(data) { | ||
| const doc = parseArchive(toUint8Array(data)); | ||
| const documentEl = doc.get("word/document.xml"); | ||
| if (!documentEl) throw new Error("word/document.xml not found"); | ||
| const body = documentEl.elements?.find((e) => e.name === "w:body"); | ||
| if (!body) throw new Error("w:body not found in word/document.xml"); | ||
| const background = documentEl.elements?.find((e) => e.name === "w:background"); | ||
| const styles = doc.get("word/styles.xml"); | ||
| const numbering = doc.get("word/numbering.xml"); | ||
| const settings = doc.get("word/settings.xml"); | ||
| const fontTable = doc.get("word/fontTable.xml"); | ||
| const webSettings = doc.get("word/webSettings.xml"); | ||
| const partRefs = parseDocPartRefs(doc); | ||
| const { coreProps, appProps, customProps } = parseRootRels(doc); | ||
| return { | ||
| doc, | ||
| body, | ||
| background, | ||
| styles, | ||
| numbering, | ||
| settings, | ||
| fontTable, | ||
| webSettings, | ||
| partRefs, | ||
| coreProps, | ||
| appProps, | ||
| customProps, | ||
| contentTypes: doc.get("[Content_Types].xml") | ||
| }; | ||
| } | ||
| //#endregion | ||
| export { parseDocument as n, parseDocx as r, parseArchive as t }; | ||
| //# sourceMappingURL=parse-0XGa3h9q.mjs.map |
| {"version":3,"file":"parse-0XGa3h9q.mjs","names":["findDeep"],"sources":["../src/parts/alt-chunk/alt-chunk-parse.ts","../src/parts/custom-xml/custom-xml-parse.ts","../src/parts/sub-doc/sub-doc-parse.ts","../src/parts/textbox/textbox-parse.ts","../src/parse/body.ts","../src/parse.ts"],"sourcesContent":["/**\n * AltChunk parser for DOCX documents.\n *\n * Parses w:altChunk elements and extracts embedded content from the ZIP.\n *\n * @module\n */\nimport { attr } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport type { AltChunkOptions } from \"@parts/alt-chunk/alt-chunk\";\n\nimport type { DocxReadContext } from \"../../context\";\n\n/**\n * Parse a w:altChunk element into AltChunkOptions.\n * Reads the referenced data from the ZIP package.\n */\nexport function parseAltChunk(el: Element, ctx: DocxReadContext): AltChunkOptions {\n const rId = attr(el, \"r:id\");\n if (!rId) {\n throw new Error(\"w:altChunk missing r:id attribute\");\n }\n\n // Look up the path from relationships\n const path = ctx.docx.partRefs.afChunks.get(rId);\n if (!path) {\n throw new Error(`AltChunk relationship ${rId} not found`);\n }\n\n // Read raw data from ZIP\n const data = ctx.docx.doc.getRaw(path);\n if (!data) {\n throw new Error(`AltChunk data not found at ${path}`);\n }\n\n // Determine content type from extension\n const ext = path.split(\".\").pop() ?? \"txt\";\n let contentType: \"text/html\" | \"application/rtf\" | \"text/plain\";\n let extension: \"html\" | \"rtf\" | \"txt\";\n\n switch (ext) {\n case \"html\":\n contentType = \"text/html\";\n extension = \"html\";\n break;\n case \"rtf\":\n contentType = \"application/rtf\";\n extension = \"rtf\";\n break;\n default:\n contentType = \"text/plain\";\n extension = \"txt\";\n break;\n }\n\n return {\n data,\n contentType,\n extension,\n };\n}\n","/**\n * Parser for custom XML block elements (w:customXml).\n *\n * @module\n */\nimport { attr, findChild } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport type { DocxReadContext } from \"../../context\";\nimport type { CustomXmlBlockOptions, CustomXmlPrOptions } from \"./custom-xml\";\n\n/**\n * Parse w:customXml element into CustomXmlBlockOptions.\n *\n * Uses a callback for child parsing to avoid circular dependencies\n * (same pattern as parseTable).\n */\nexport function parseCustomXmlBlock(\n el: Element,\n ctx: DocxReadContext,\n parseChild: (el: Element, ctx: DocxReadContext) => SectionChild,\n): CustomXmlBlockOptions {\n const opts: Record<string, unknown> = {};\n\n // Required attribute\n const element = attr(el, \"w:element\");\n if (element) opts.element = element;\n\n // Optional URI\n const uri = attr(el, \"w:uri\");\n if (uri) opts.uri = uri;\n\n // Parse w:customXmlPr\n const xmlPr = findChild(el, \"w:customXmlPr\");\n if (xmlPr) {\n opts.customXmlPr = parseCustomXmlPr(xmlPr);\n }\n\n // Parse block-level children\n const children: SectionChild[] = [];\n for (const child of el.elements ?? []) {\n if (child.name === \"w:customXmlPr\") continue;\n const parsed = parseChild(child, ctx);\n children.push(parsed);\n }\n if (children.length > 0) opts.children = children;\n\n return opts as unknown as CustomXmlBlockOptions;\n}\n\nfunction parseCustomXmlPr(el: Element): CustomXmlPrOptions {\n const opts: Record<string, unknown> = {};\n\n const placeholder = findChild(el, \"w:placeholder\");\n if (placeholder) {\n const val = attr(placeholder, \"w:val\");\n if (val) opts.placeholder = val;\n }\n\n const attributes: { name: string; val: string; uri?: string }[] = [];\n for (const child of el.elements ?? []) {\n if (child.name !== \"w:attr\") continue;\n const name = attr(child, \"w:name\");\n const val = attr(child, \"w:val\");\n if (name && val) {\n const attrOpts: { name: string; val: string; uri?: string } = { name, val };\n const uriVal = attr(child, \"w:uri\");\n if (uriVal) attrOpts.uri = uriVal;\n attributes.push(attrOpts);\n }\n }\n if (attributes.length > 0) opts.attributes = attributes;\n\n return opts as unknown as CustomXmlPrOptions;\n}\n","/**\n * SubDoc parser for DOCX documents.\n *\n * Parses w:subDoc elements and extracts embedded document data.\n *\n * @module\n */\nimport { attr } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport type { SubDocOptions } from \"@parts/sub-doc/sub-doc\";\n\nimport type { DocxReadContext } from \"../../context\";\n\n/**\n * Parse a w:subDoc element into SubDocOptions.\n * Reads the referenced document data from the ZIP package.\n */\nexport function parseSubDoc(el: Element, ctx: DocxReadContext): SubDocOptions {\n const rId = attr(el, \"r:id\");\n if (!rId) {\n throw new Error(\"w:subDoc missing r:id attribute\");\n }\n\n const path = ctx.docx.partRefs.subDocs.get(rId);\n if (!path) {\n throw new Error(`SubDoc relationship ${rId} not found`);\n }\n\n const data = ctx.docx.doc.getRaw(path);\n if (!data) {\n throw new Error(`SubDoc data not found at ${path}`);\n }\n\n return { data };\n}\n","/**\n * Textbox parser for DOCX documents.\n *\n * Parses w:pict → v:shape → v:textbox → w:txbxContent elements.\n *\n * @module\n */\nimport { attr, findChild } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\n\nimport type { DocxReadContext } from \"../../context\";\n\n/**\n * Parse VML shape style string into VmlShapeStyle-like object.\n */\nfunction parseVmlStyle(styleStr: string): Record<string, string> {\n const style: Record<string, string> = {};\n for (const part of styleStr.split(\";\")) {\n const [key, val] = part.split(\":\").map((s) => s.trim());\n if (key && val) style[key] = val;\n }\n return style;\n}\n\n/**\n * Parse a w:pict element that contains a textbox.\n * Returns an object suitable for the { textbox: ... } SectionChild variant.\n */\nexport function parseTextbox(\n el: Element,\n ctx: DocxReadContext,\n parseChildren: (elements: Element[], ctx: DocxReadContext) => unknown[],\n): {\n style?: Record<string, string>;\n children?: unknown[];\n} {\n const shape = findDeep(el, \"v:shape\")[0];\n if (!shape) return {};\n\n const opts: Record<string, unknown> = {};\n\n // Parse VML style\n const styleAttr = attr(shape, \"style\");\n if (styleAttr) {\n opts.style = parseVmlStyle(styleAttr);\n }\n\n // Parse textbox content\n const textbox = findDeep(shape, \"v:textbox\")[0];\n if (textbox) {\n const txbxContent = findChild(textbox, \"w:txbxContent\");\n if (txbxContent) {\n const childList = parseChildren(txbxContent.elements ?? [], ctx);\n if (childList.length > 0) opts.children = childList;\n }\n }\n\n return opts as { style?: Record<string, string>; children?: unknown[] };\n}\n\n// Simple deep finder\nfunction findDeep(parent: Element, name: string): Element[] {\n const result: Element[] = [];\n for (const child of parent.elements ?? []) {\n if (child.name === name) result.push(child);\n result.push(...findDeep(child, name));\n }\n return result;\n}\n","/**\n * Body parser for DOCX documents.\n *\n * Parses w:body → SectionOptions[] by splitting at w:sectPr boundaries.\n *\n * @module\n */\nimport { attr, findChild, stringify } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport { parseAltChunk } from \"@parts/alt-chunk/alt-chunk-parse\";\nimport { parseCustomXmlBlock } from \"@parts/custom-xml/custom-xml-parse\";\nimport { parseSectionPropertiesEl } from \"@parts/document/body/section-properties/descriptor\";\nimport type { SectionPropertiesOptions } from \"@parts/document/body/section-properties/section-properties\";\nimport { parseSdtBlock } from \"@parts/sdt/sdt-parse\";\nimport { parseSubDoc } from \"@parts/sub-doc/sub-doc-parse\";\nimport { parseToc } from \"@parts/table-of-contents/toc-parse\";\nimport { tableDesc } from \"@parts/table/descriptor\";\nimport { parseTextbox } from \"@parts/textbox/textbox-parse\";\nimport type { SectionOptions } from \"@shared/section\";\nimport type { SectionChild } from \"@shared/section\";\n\nimport { parseParagraph } from \"../body\";\nimport { DocxReadContext } from \"../context\";\nimport { setBodyParseChild } from \"../parts\";\n\n// ── Section properties parser ────────────────────────────────────────────────\n\n/**\n * Parse w:sectPr element into SectionPropertiesOptions.\n * Delegates to the section properties descriptor's parse method.\n */\nfunction parseSectionProperties(el: Element, ctx: DocxReadContext): SectionPropertiesOptions {\n const opts = parseSectionPropertiesEl(el) as Record<string, unknown>;\n\n // Headers/footers - parse from references and store in a separate field\n const headerRefs: Record<string, unknown> = {};\n const footerRefs: Record<string, unknown> = {};\n\n for (const child of el.elements ?? []) {\n if (child.name === \"w:headerReference\") {\n const rId = attr(child, \"r:id\");\n const type = attr(child, \"w:type\");\n if (rId && type) {\n const headerChildren = parseHeaderFooterRef(rId, ctx);\n if (headerChildren) headerRefs[type] = headerChildren;\n }\n }\n if (child.name === \"w:footerReference\") {\n const rId = attr(child, \"r:id\");\n const type = attr(child, \"w:type\");\n if (rId && type) {\n const footerChildren = parseHeaderFooterRef(rId, ctx);\n if (footerChildren) footerRefs[type] = footerChildren;\n }\n }\n }\n\n if (Object.keys(headerRefs).length > 0) {\n opts.parsedHeaders = headerRefs;\n }\n if (Object.keys(footerRefs).length > 0) {\n opts.parsedFooters = footerRefs;\n }\n\n return opts as SectionPropertiesOptions;\n}\n\n/**\n * Parse a header/footer reference by following the relationship to its XML part.\n */\nfunction parseHeaderFooterRef(rId: string, ctx: DocxReadContext): SectionChild[] | undefined {\n const path = ctx.docx.partRefs.headers.get(rId) ?? ctx.docx.partRefs.footers.get(rId);\n if (!path) return undefined;\n\n const partEl = ctx.docx.doc.get(path);\n if (!partEl) return undefined;\n\n // The header/footer XML root element contains w:p, w:tbl, etc.\n const children: SectionChild[] = [];\n for (const child of partEl.elements ?? []) {\n const sectionChild = parseSectionChild(child, ctx);\n if (sectionChild !== undefined) {\n children.push(sectionChild);\n }\n }\n\n return children.length > 0 ? children : undefined;\n}\n\n// ── Section child dispatch ───────────────────────────────────────────────────\n\n/**\n * Parse a single body child element into a SectionChild.\n */\nexport function parseSectionChild(el: Element, ctx: DocxReadContext): SectionChild {\n switch (el.name) {\n case \"w:p\": {\n // Check for textbox (w:pict containing v:textbox)\n const pict = findChild(el, \"w:pict\");\n if (pict) {\n const textbox = findDeepElement(pict, \"v:textbox\");\n if (textbox) {\n const textboxOpts = parseTextbox(pict, ctx, parseSectionChildrenElements);\n return { textbox: textboxOpts as SectionChild extends { textbox: infer T } ? T : never };\n }\n }\n\n return { paragraph: parseParagraph(el, ctx) };\n }\n case \"w:tbl\":\n return { table: tableDesc.parse(el, ctx) as import(\"@parts/table/table\").TableOptions };\n case \"w:sdt\": {\n // Try TOC first\n const tocResult = parseToc(el, ctx);\n if (tocResult) {\n return { toc: tocResult };\n }\n // Otherwise parse as generic SDT block\n const sdtResult = parseSdtBlock(el, ctx, parseSectionChildrenElements);\n return {\n sdt: {\n properties: sdtResult.properties,\n children: sdtResult.children as SectionChild[] | undefined,\n },\n };\n }\n case \"w:altChunk\":\n return { altChunk: parseAltChunk(el, ctx) };\n case \"w:subDoc\":\n return { subDoc: parseSubDoc(el, ctx) };\n case \"w:customXml\":\n return { customXml: parseCustomXmlBlock(el, ctx, parseSectionChild) };\n default:\n return { rawXml: stringify(el) };\n }\n}\n\n/**\n * Find a deep descendant element by name.\n */\nfunction findDeepElement(parent: Element, name: string): Element | undefined {\n for (const child of parent.elements ?? []) {\n if (child.name === name) return child;\n const found = findDeepElement(child, name);\n if (found) return found;\n }\n return undefined;\n}\n\n// ── Body parsing with section splitting ───────────────────────────────────────\n\n/**\n * Parse w:body element into SectionOptions[].\n *\n * Splits body content at w:sectPr boundaries to create sections.\n * The last w:sectPr (child of w:body directly) defines the last section.\n * Previous w:sectPr elements appear inside w:pPr elements.\n */\nexport function parseBody(body: Element, ctx: DocxReadContext): SectionOptions[] {\n // Register the body child parser for descriptor parse callbacks\n setBodyParseChild(parseSectionChild);\n\n // Collect body children and detect section breaks\n interface SectionBoundary {\n index: number;\n sectPr: Element;\n }\n\n const bodyChildren: Element[] = [];\n const boundaries: SectionBoundary[] = [];\n\n for (const child of body.elements ?? []) {\n if (child.name === \"w:sectPr\") {\n // Final section properties (last section)\n boundaries.push({ index: bodyChildren.length, sectPr: child });\n } else {\n bodyChildren.push(child);\n\n // Check for inline sectPr in paragraph properties\n if (child.name === \"w:p\") {\n const pPr = findChild(child, \"w:pPr\");\n if (pPr) {\n const sectPr = findChild(pPr, \"w:sectPr\");\n if (sectPr) {\n boundaries.push({ index: bodyChildren.length, sectPr });\n }\n }\n }\n }\n }\n\n // If no boundaries, the whole body is one section\n if (boundaries.length === 0) {\n return [\n {\n children: bodyChildren.map((el) => parseSectionChild(el, ctx)),\n },\n ];\n }\n\n // Split into sections\n const sections: SectionOptions[] = [];\n let start = 0;\n\n for (let i = 0; i < boundaries.length; i++) {\n const boundary = boundaries[i];\n // For inline sectPr (inside w:pPr), the containing paragraph was pushed to\n // bodyChildren. Exclude it — it's a section break marker, not content.\n // The last boundary uses a body-level sectPr, so no paragraph to exclude.\n const isInlineSectPr = i < boundaries.length - 1;\n const endIdx = isInlineSectPr ? Math.max(start, boundary.index - 1) : boundary.index;\n const sectionElements = bodyChildren.slice(start, endIdx);\n const parsedProps = parseSectionProperties(boundary.sectPr, ctx);\n const rawProps = parsedProps as Record<string, unknown>;\n\n // Extract headers/footers that were stored as parsedHeaders/parsedFooters\n const parsedHeaders = rawProps.parsedHeaders as Record<string, SectionChild[]> | undefined;\n const parsedFooters = rawProps.parsedFooters as Record<string, SectionChild[]> | undefined;\n\n // Build clean properties without internal fields\n const cleanProps = { ...parsedProps };\n delete (cleanProps as Record<string, unknown>).parsedHeaders;\n delete (cleanProps as Record<string, unknown>).parsedFooters;\n\n const section = {\n children: sectionElements.map((el) => parseSectionChild(el, ctx)),\n properties: cleanProps,\n ...(parsedHeaders ? { headers: parsedHeaders } : {}),\n ...(parsedFooters ? { footers: parsedFooters } : {}),\n } as SectionOptions;\n\n sections.push(section);\n start = boundary.index;\n }\n\n // If there are elements after the last boundary, they form the last section\n // with the body-level w:sectPr (already captured)\n // Actually the body-level sectPr IS the last boundary\n\n return sections;\n}\n\n/**\n * Parse a list of elements into SectionChild[].\n * Used by SDT and textbox parsers for their content.\n */\nfunction parseSectionChildrenElements(elements: Element[], ctx: DocxReadContext): SectionChild[] {\n return elements.map((el) => parseSectionChild(el, ctx));\n}\n","import type { ParsedArchive } from \"@office-open/core\";\nimport { parseArchive } from \"@office-open/core\";\nimport type { DataType } from \"@office-open/core\";\nimport { toUint8Array } from \"@office-open/core\";\nimport { attr } from \"@office-open/xml\";\nimport type { Element } from \"@office-open/xml\";\nimport { bibliographyDesc } from \"@parts/bibliography\";\nimport { setBodyParseChild } from \"@parts/bodychildren\";\nimport { commentsDesc } from \"@parts/comments\";\nimport { contentTypesDesc } from \"@parts/contenttypes\";\nimport { corePropertiesDesc } from \"@parts/core-properties\";\nimport type { DocumentOptions } from \"@parts/core-properties\";\nimport { customPropertiesDesc } from \"@parts/custom-properties\";\nimport { endnotesDesc } from \"@parts/endnotes/descriptor\";\nimport { fontTableDesc } from \"@parts/fonts/descriptor\";\nimport { footnotesDesc } from \"@parts/footnotes/descriptor\";\nimport { glossaryDesc } from \"@parts/glossary-document\";\nimport { parseNumberingDefinitions } from \"@parts/numbering/numbering\";\nimport { settingsDesc } from \"@parts/settings/descriptor\";\nimport { buildStyleCache, buildNumberingCache, parseStyleDefinitions } from \"@parts/styles/styles\";\nimport { setTableParseChild } from \"@parts/table/descriptor\";\nimport { webSettingsDesc } from \"@parts/web-settings\";\n\nimport { parseParagraphProperties } from \"./body\";\nimport { DocxReadContext } from \"./context\";\nimport { parseBody, parseSectionChild } from \"./parse/body\";\n\nexport { parseArchive };\n\n/**\n * All part paths extracted from the DOCX package.\n * Field names correspond directly to the OOXML directory structure.\n */\nexport interface DocxPartRefs {\n /** word/headerN.xml keyed by rId */\n headers: Map<string, string>;\n /** word/footerN.xml keyed by rId */\n footers: Map<string, string>;\n /** word/footnotes.xml */\n footnotes?: string;\n /** word/endnotes.xml */\n endnotes?: string;\n /** word/comments.xml */\n comments?: string;\n /** Hyperlink targets keyed by rId (external URLs) */\n hyperlinks: Map<string, string>;\n /** word/charts/chartN.xml keyed by rId */\n charts: Map<string, string>;\n /** word/diagrams/dataN.xml keyed by rId */\n diagramData: Map<string, string>;\n /** word/media/* keyed by rId */\n media: Map<string, string>;\n /** Alternative format chunks (word/afchunkN.*) keyed by rId */\n afChunks: Map<string, string>;\n /** Sub-documents (word/subdocs/subdocN.docx) keyed by rId */\n subDocs: Map<string, string>;\n /** word/bibliography.xml */\n bibliography?: string;\n /** word/glossary/document.xml */\n glossary?: string;\n}\n\nexport interface DocxDocument {\n doc: ParsedArchive;\n /** word/document.xml → w:body element */\n body: Element;\n /** word/document.xml → w:background element */\n background?: Element;\n /** word/styles.xml */\n styles?: Element;\n /** word/numbering.xml */\n numbering?: Element;\n /** word/settings.xml */\n settings?: Element;\n /** word/fontTable.xml */\n fontTable?: Element;\n /** word/webSettings.xml */\n webSettings?: Element;\n partRefs: DocxPartRefs;\n /** docProps/core.xml */\n coreProps?: string;\n /** docProps/app.xml */\n appProps?: string;\n /** docProps/custom.xml */\n customProps?: string;\n /** [Content_Types].xml */\n contentTypes?: Element;\n}\n\nfunction resolveRelsPath(target: string): string {\n if (target.startsWith(\"/\")) return target.slice(1);\n if (target.startsWith(\"../\")) return target.replace(\"../\", \"\");\n return `word/${target}`;\n}\n\nfunction parseDocPartRefs(doc: ParsedArchive): DocxPartRefs {\n const refs: DocxPartRefs = {\n headers: new Map(),\n footers: new Map(),\n hyperlinks: new Map(),\n charts: new Map(),\n diagramData: new Map(),\n media: new Map(),\n afChunks: new Map(),\n subDocs: new Map(),\n };\n\n const relsEl = doc.get(\"word/_rels/document.xml.rels\");\n if (!relsEl) return refs;\n\n for (const child of relsEl.elements ?? []) {\n if (child.name !== \"Relationship\") continue;\n const type = attr(child, \"Type\") ?? \"\";\n const target = attr(child, \"Target\") ?? \"\";\n const id = attr(child, \"Id\") ?? \"\";\n if (!target) continue;\n\n const path = resolveRelsPath(target);\n\n if (type.includes(\"/header\")) {\n refs.headers.set(id, path);\n } else if (type.includes(\"/footer\")) {\n refs.footers.set(id, path);\n } else if (type.includes(\"/footnotes\")) {\n refs.footnotes = path;\n } else if (type.includes(\"/endnotes\")) {\n refs.endnotes = path;\n } else if (type.includes(\"/comments\")) {\n refs.comments = path;\n } else if (type.includes(\"/chart\")) {\n refs.charts.set(id, path);\n } else if (type.includes(\"/diagramData\")) {\n refs.diagramData.set(id, path);\n } else if (type.includes(\"/image\") || type.includes(\"/media\")) {\n refs.media.set(id, path);\n } else if (type.includes(\"/aFChunk\")) {\n refs.afChunks.set(id, path);\n } else if (type.includes(\"/subDocument\")) {\n refs.subDocs.set(id, path);\n } else if (type.includes(\"/bibliography\")) {\n refs.bibliography = path;\n } else if (type.includes(\"/glossaryDocument\")) {\n refs.glossary = path;\n } else if (type.includes(\"/hyperlink\")) {\n refs.hyperlinks.set(id, target);\n }\n }\n\n return refs;\n}\n\nfunction parseRootRels(doc: ParsedArchive): {\n coreProps?: string;\n appProps?: string;\n customProps?: string;\n} {\n const relsEl = doc.get(\"_rels/.rels\");\n if (!relsEl) return {};\n\n let coreProps: string | undefined;\n let appProps: string | undefined;\n let customProps: string | undefined;\n\n for (const child of relsEl.elements ?? []) {\n if (child.name !== \"Relationship\") continue;\n const type = attr(child, \"Type\") ?? \"\";\n const target = attr(child, \"Target\") ?? \"\";\n if (!target) continue;\n\n const path = target.startsWith(\"/\") ? target.slice(1) : target;\n\n if (type.includes(\"/core-properties\")) {\n coreProps = path;\n } else if (type.includes(\"/extended-properties\")) {\n appProps = path;\n } else if (type.includes(\"/custom-properties\")) {\n customProps = path;\n }\n }\n\n return { coreProps, appProps, customProps };\n}\n\n/**\n * Parse a .docx file and convert it into DocumentOptions.\n *\n * This is the main public API for parsing DOCX files.\n * The returned options can be passed directly to `new Document(parsed)`\n * to recreate the document.\n *\n * @param data - Raw bytes of a .docx file\n * @returns Document options including sections and metadata\n */\nexport function parseDocument(data: DataType): DocumentOptions {\n const docx = parseDocx(data);\n const ctx = new DocxReadContext(\n docx,\n buildStyleCache(docx.styles),\n buildNumberingCache(docx.numbering),\n );\n\n // Register the child parser for table and body child descriptors\n setTableParseChild(parseSectionChild);\n setBodyParseChild(parseSectionChild);\n\n const sections = parseBody(docx.body, ctx);\n\n const opts: Record<string, unknown> = { sections };\n\n // Background (w:background in document.xml)\n if (docx.background) {\n const bg: Record<string, unknown> = {};\n const color = attr(docx.background, \"w:color\");\n if (color) bg.color = color;\n if (Object.keys(bg).length > 0) opts.background = bg;\n }\n\n // Core properties\n if (docx.coreProps) {\n const corePropsEl = docx.doc.get(docx.coreProps);\n if (corePropsEl) {\n const cp = corePropertiesDesc.parse(corePropsEl, ctx);\n if (cp.title) opts.title = cp.title;\n if (cp.subject) opts.subject = cp.subject;\n if (cp.creator) opts.creator = cp.creator;\n if (cp.keywords) opts.keywords = cp.keywords;\n if (cp.description) opts.description = cp.description;\n if (cp.lastModifiedBy) opts.lastModifiedBy = cp.lastModifiedBy;\n if (cp.revision) opts.revision = cp.revision;\n }\n }\n\n // Settings\n if (docx.settings) {\n Object.assign(opts, settingsDesc.parse(docx.settings, ctx));\n }\n\n // Web settings\n if (docx.webSettings) {\n const wsOpts = webSettingsDesc.parse(docx.webSettings, ctx);\n if (Object.keys(wsOpts).length > 0) opts.webSettings = wsOpts;\n }\n\n // Custom properties\n if (docx.customProps) {\n const customPropsEl = docx.doc.get(docx.customProps);\n if (customPropsEl) {\n const cpResult = customPropertiesDesc.parse(customPropsEl, ctx);\n if (cpResult.properties && cpResult.properties.length > 0) {\n opts.customProperties = cpResult.properties;\n }\n }\n }\n\n // Comments content\n if (docx.partRefs.comments) {\n const commentsEl = docx.doc.get(docx.partRefs.comments);\n if (commentsEl) {\n const commentsResult = commentsDesc.parse(commentsEl, ctx);\n const children = commentsResult.children;\n if (children && children.length > 0) {\n opts.comments = { children } as unknown as DocumentOptions[\"comments\"];\n }\n }\n }\n\n // Footnotes content\n if (docx.partRefs.footnotes) {\n const footnotesEl = docx.doc.get(docx.partRefs.footnotes);\n if (footnotesEl) {\n const fnResult = footnotesDesc.parse(footnotesEl, ctx);\n const footnotesMap: Record<string, { children: unknown[] }> = {};\n for (const [id, paragraphs] of fnResult.notes) {\n footnotesMap[String(id)] = { children: paragraphs };\n }\n if (Object.keys(footnotesMap).length > 0) opts.footnotes = footnotesMap;\n }\n }\n\n // Endnotes content\n if (docx.partRefs.endnotes) {\n const endnotesEl = docx.doc.get(docx.partRefs.endnotes);\n if (endnotesEl) {\n const enResult = endnotesDesc.parse(endnotesEl, ctx);\n const endnotesMap: Record<string, { children: unknown[] }> = {};\n for (const [id, paragraphs] of enResult.notes) {\n endnotesMap[String(id)] = { children: paragraphs };\n }\n if (Object.keys(endnotesMap).length > 0) opts.endnotes = endnotesMap;\n }\n }\n\n // Styles definitions\n if (docx.styles) {\n const styleOpts = parseStyleDefinitions(docx.styles, parseParagraphProperties, ctx);\n if (styleOpts) opts.styles = styleOpts;\n }\n\n // Numbering definitions\n if (docx.numbering) {\n const numOpts = parseNumberingDefinitions(docx.numbering);\n if (numOpts) opts.numbering = numOpts;\n }\n\n // Font table\n if (docx.fontTable) {\n const ftResult = fontTableDesc.parse(docx.fontTable, ctx);\n if (ftResult.fonts && ftResult.fonts.length > 0) opts.fonts = ftResult.fonts;\n }\n\n // Bibliography\n if (docx.partRefs.bibliography) {\n const bibEl = docx.doc.get(docx.partRefs.bibliography);\n if (bibEl) {\n const bibResult = bibliographyDesc.parse(bibEl, ctx);\n if (bibResult.sources && bibResult.sources.length > 0) opts.bibliography = bibResult;\n }\n }\n\n // Glossary document\n if (docx.partRefs.glossary) {\n const glossaryEl = docx.doc.get(docx.partRefs.glossary);\n if (glossaryEl) {\n const glossaryResult = glossaryDesc.parse(glossaryEl, ctx);\n if (glossaryResult.parts && glossaryResult.parts.length > 0) opts.glossary = glossaryResult;\n }\n }\n\n // Content types\n if (docx.contentTypes) {\n const ctResult = contentTypesDesc.parse(docx.contentTypes, ctx);\n if (ctResult) opts.contentTypes = ctResult;\n }\n\n return opts as unknown as DocumentOptions;\n}\n\nexport function parseDocx(data: DataType): DocxDocument {\n const uint8 = toUint8Array(data);\n const doc = parseArchive(uint8);\n\n const documentEl = doc.get(\"word/document.xml\");\n if (!documentEl) throw new Error(\"word/document.xml not found\");\n const body = documentEl.elements?.find((e) => e.name === \"w:body\");\n if (!body) throw new Error(\"w:body not found in word/document.xml\");\n const background = documentEl.elements?.find((e) => e.name === \"w:background\");\n\n const styles = doc.get(\"word/styles.xml\");\n const numbering = doc.get(\"word/numbering.xml\");\n const settings = doc.get(\"word/settings.xml\");\n const fontTable = doc.get(\"word/fontTable.xml\");\n const webSettings = doc.get(\"word/webSettings.xml\");\n\n const partRefs = parseDocPartRefs(doc);\n const { coreProps, appProps, customProps } = parseRootRels(doc);\n\n const contentTypes = doc.get(\"[Content_Types].xml\");\n\n return {\n doc,\n body,\n background,\n styles,\n numbering,\n settings,\n fontTable,\n webSettings,\n partRefs,\n coreProps,\n appProps,\n customProps,\n contentTypes,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAAgB,cAAc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CAClE,MAAM,aAAa,WAAW,UAAU,MAAM,MAAM,EAAE,SAAS,cAAc;CAE7E,MAAM,SAAS,IAAI,IAAI,iBAAiB;CACxC,MAAM,YAAY,IAAI,IAAI,oBAAoB;CAC9C,MAAM,WAAW,IAAI,IAAI,mBAAmB;CAC5C,MAAM,YAAY,IAAI,IAAI,oBAAoB;CAC9C,MAAM,cAAc,IAAI,IAAI,sBAAsB;CAElD,MAAM,WAAW,iBAAiB,GAAG;CACrC,MAAM,EAAE,WAAW,UAAU,gBAAgB,cAAc,GAAG;CAI9D,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAfmB,IAAI,IAAI,qBAehB;CACb;AACF"} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11837
0.07%1619258
-0.02%+ Added
+ Added
- Removed
- Removed
Updated
Updated