f-docx-editor 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1798 @@
1
+ "use strict";
2
+ ((typeof self !== 'undefined' ? self : this)["webpackChunkf_docx_editor"] = (typeof self !== 'undefined' ? self : this)["webpackChunkf_docx_editor"] || []).push([[817],{
3
+
4
+ /***/ 817:
5
+ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
6
+
7
+
8
+ // EXPORTS
9
+ __webpack_require__.d(__webpack_exports__, {
10
+ createDocx: function() { return /* reexport */ chunk_UCZVMHB5_e; },
11
+ repackDocx: function() { return /* reexport */ chunk_UCZVMHB5_J; }
12
+ });
13
+
14
+ // UNUSED EXPORTS: COMMENTS_CONTENT_TYPE, COMMENTS_EXTENDED_CONTENT_TYPE, COMMENTS_EXTENSIBLE_CONTENT_TYPE, COMMENTS_IDS_CONTENT_TYPE, addMedia, addRelationship, applyUpdatesToZip, collectHeaderFooterUpdates, createEmptyDocx, default, findMaxRId, isDocxBuffer, repackDocxFromRaw, updateCoreProperties, updateDocumentXml, updateMultipleFiles, updateXmlFile, validateDocx
15
+
16
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
17
+ var es_array_includes = __webpack_require__(4423);
18
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
19
+ var es_array_push = __webpack_require__(4114);
20
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.detached.js
21
+ var es_array_buffer_detached = __webpack_require__(6573);
22
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.transfer.js
23
+ var es_array_buffer_transfer = __webpack_require__(8100);
24
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.transfer-to-fixed-length.js
25
+ var es_array_buffer_transfer_to_fixed_length = __webpack_require__(7936);
26
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
27
+ var es_iterator_constructor = __webpack_require__(8111);
28
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
29
+ var es_iterator_for_each = __webpack_require__(7588);
30
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
31
+ var es_iterator_map = __webpack_require__(1701);
32
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.get-or-insert.js
33
+ var es_map_get_or_insert = __webpack_require__(5367);
34
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.get-or-insert-computed.js
35
+ var es_map_get_or_insert_computed = __webpack_require__(2731);
36
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.difference.v2.js
37
+ var es_set_difference_v2 = __webpack_require__(7642);
38
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.intersection.v2.js
39
+ var es_set_intersection_v2 = __webpack_require__(8004);
40
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-disjoint-from.v2.js
41
+ var es_set_is_disjoint_from_v2 = __webpack_require__(3853);
42
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-subset-of.v2.js
43
+ var es_set_is_subset_of_v2 = __webpack_require__(5876);
44
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.is-superset-of.v2.js
45
+ var es_set_is_superset_of_v2 = __webpack_require__(2475);
46
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.symmetric-difference.v2.js
47
+ var es_set_symmetric_difference_v2 = __webpack_require__(5024);
48
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.union.v2.js
49
+ var es_set_union_v2 = __webpack_require__(1698);
50
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.with.js
51
+ var es_typed_array_with = __webpack_require__(9577);
52
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.set-from-base64.js
53
+ var es_uint8_array_set_from_base64 = __webpack_require__(6632);
54
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.set-from-hex.js
55
+ var es_uint8_array_set_from_hex = __webpack_require__(4226);
56
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.to-base64.js
57
+ var es_uint8_array_to_base64 = __webpack_require__(9486);
58
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.to-hex.js
59
+ var es_uint8_array_to_hex = __webpack_require__(456);
60
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js
61
+ var web_dom_exception_stack = __webpack_require__(4979);
62
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.find.js
63
+ var es_iterator_find = __webpack_require__(116);
64
+ // EXTERNAL MODULE: ./node_modules/@eigenpal/docx-editor-core/dist/chunk-LE67NTCN.mjs
65
+ var chunk_LE67NTCN = __webpack_require__(1800);
66
+ ;// ./node_modules/@eigenpal/docx-editor-core/dist/chunk-LDKESXXK.mjs
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+ function a(e) {
83
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
84
+ }
85
+ function o(e) {
86
+ return e == null || !Number.isFinite(e) ? "0" : String(Math.round(e));
87
+ }
88
+ function xe(e, t) {
89
+ if (!e || e.style === "none" || e.style === "nil") return "";
90
+ let n = [`w:val="${e.style}"`];
91
+ return e.size !== void 0 && n.push(`w:sz="${o(e.size)}"`), e.space !== void 0 && n.push(`w:space="${o(e.space)}"`), e.color && (e.color.auto ? n.push('w:color="auto"') : e.color.rgb && n.push(`w:color="${e.color.rgb}"`), e.color.themeColor && n.push(`w:themeColor="${e.color.themeColor}"`), e.color.themeTint && n.push(`w:themeTint="${e.color.themeTint}"`), e.color.themeShade && n.push(`w:themeShade="${e.color.themeShade}"`)), e.shadow && n.push('w:shadow="true"'), e.frame && n.push('w:frame="true"'), `<w:${t} ${n.join(" ")}/>`;
92
+ }
93
+ var ye = ["top", "left", "bottom", "right", "between", "bar"];
94
+ function H(e) {
95
+ if (!e) return "";
96
+ let t = [];
97
+ for (let n of ye) {
98
+ let r = xe(e[n], n);
99
+ r && t.push(r);
100
+ }
101
+ return t.length === 0 ? "" : `<w:pBdr>${t.join("")}</w:pBdr>`;
102
+ }
103
+ function O(e) {
104
+ if (!e) return "";
105
+ let t = [];
106
+ return e.pattern ? t.push(`w:val="${e.pattern}"`) : t.push('w:val="clear"'), e.color?.rgb ? t.push(`w:color="${e.color.rgb}"`) : e.color?.auto && t.push('w:color="auto"'), e.fill?.rgb ? t.push(`w:fill="${e.fill.rgb}"`) : e.fill?.auto && t.push('w:fill="auto"'), e.fill?.themeColor && t.push(`w:themeFill="${e.fill.themeColor}"`), e.fill?.themeTint && t.push(`w:themeFillTint="${e.fill.themeTint}"`), e.fill?.themeShade && t.push(`w:themeFillShade="${e.fill.themeShade}"`), t.length === 0 ? "" : `<w:shd ${t.join(" ")}/>`;
107
+ }
108
+ function N(e) {
109
+ return !e || e.length === 0 ? "" : `<w:tabs>${e.map(n => {
110
+ let r = [`w:val="${n.alignment}"`, `w:pos="${o(n.position)}"`];
111
+ return n.leader && n.leader !== "none" && r.push(`w:leader="${n.leader}"`), `<w:tab ${r.join(" ")}/>`;
112
+ }).join("")}</w:tabs>`;
113
+ }
114
+ function W(e) {
115
+ let t = [];
116
+ return e.spaceBefore !== void 0 && t.push(`w:before="${o(e.spaceBefore)}"`), e.spaceAfter !== void 0 && t.push(`w:after="${o(e.spaceAfter)}"`), e.lineSpacing !== void 0 && t.push(`w:line="${o(e.lineSpacing)}"`), e.lineSpacingRule && t.push(`w:lineRule="${e.lineSpacingRule}"`), e.beforeAutospacing && t.push('w:beforeAutospacing="1"'), e.afterAutospacing && t.push('w:afterAutospacing="1"'), t.length === 0 ? "" : `<w:spacing ${t.join(" ")}/>`;
117
+ }
118
+ function G(e) {
119
+ let t = [];
120
+ return e.indentLeft !== void 0 && t.push(`w:left="${o(e.indentLeft)}"`), e.indentRight !== void 0 && t.push(`w:right="${o(e.indentRight)}"`), e.indentFirstLine !== void 0 && (e.hangingIndent ? t.push(`w:hanging="${o(Math.abs(e.indentFirstLine))}"`) : e.indentFirstLine !== 0 && t.push(`w:firstLine="${o(e.indentFirstLine)}"`)), t.length === 0 ? "" : `<w:ind ${t.join(" ")}/>`;
121
+ }
122
+ function V(e) {
123
+ if (!e) return "";
124
+ let t = [];
125
+ return e.ilvl !== void 0 && t.push(`<w:ilvl w:val="${o(e.ilvl)}"/>`), e.numId !== void 0 && t.push(`<w:numId w:val="${o(e.numId)}"/>`), t.length === 0 ? "" : `<w:numPr>${t.join("")}</w:numPr>`;
126
+ }
127
+ function U(e) {
128
+ if (!e) return "";
129
+ let t = [];
130
+ return e.width !== void 0 && t.push(`w:w="${o(e.width)}"`), e.height !== void 0 && t.push(`w:h="${o(e.height)}"`), e.hAnchor && t.push(`w:hAnchor="${e.hAnchor}"`), e.vAnchor && t.push(`w:vAnchor="${e.vAnchor}"`), e.x !== void 0 && t.push(`w:x="${o(e.x)}"`), e.y !== void 0 && t.push(`w:y="${o(e.y)}"`), e.xAlign && t.push(`w:xAlign="${e.xAlign}"`), e.yAlign && t.push(`w:yAlign="${e.yAlign}"`), e.wrap && t.push(`w:wrap="${e.wrap}"`), t.length === 0 ? "" : `<w:framePr ${t.join(" ")}/>`;
131
+ }
132
+ function q(e) {
133
+ let t = [`w:id="${e.id}"`, `w:name="${a(e.name)}"`];
134
+ return e.colFirst !== void 0 && t.push(`w:colFirst="${e.colFirst}"`), e.colLast !== void 0 && t.push(`w:colLast="${e.colLast}"`), `<w:bookmarkStart ${t.join(" ")}/>`;
135
+ }
136
+ function Y(e) {
137
+ return `<w:bookmarkEnd w:id="${e.id}"/>`;
138
+ }
139
+ function E(e) {
140
+ let t = [];
141
+ e.rId && t.push(`r:id="${e.rId}"`), e.anchor && t.push(`w:anchor="${a(e.anchor)}"`), e.tooltip && t.push(`w:tooltip="${a(e.tooltip)}"`), e.target && t.push(`w:tgtFrame="${a(e.target)}"`), e.history === false && t.push('w:history="0"'), e.docLocation && t.push(`w:docLocation="${a(e.docLocation)}"`);
142
+ let n = e.children.map(i => i.type === "run" ? d(i) : i.type === "bookmarkStart" ? q(i) : i.type === "bookmarkEnd" ? Y(i) : "").join("");
143
+ return `<w:hyperlink${t.length > 0 ? " " + t.join(" ") : ""}>${n}</w:hyperlink>`;
144
+ }
145
+ function Z(e) {
146
+ let t = [],
147
+ n = e.content.find(c => c.type === "run"),
148
+ r = n?.formatting ? P(n.formatting) : "",
149
+ i = ['w:fldCharType="begin"'];
150
+ e.fldLock && i.push('w:fldLock="true"'), t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`);
151
+ let l = e.instruction.startsWith(" ") || e.instruction.endsWith(" ") || e.instruction.includes(" ") ? ' xml:space="preserve"' : "";
152
+ t.push(`<w:r>${r}<w:instrText${l}>${a(e.instruction)}</w:instrText></w:r>`), t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`);
153
+ for (let c of e.content) c.type === "run" && t.push(d(c));
154
+ return t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`), t.join("");
155
+ }
156
+ function J(e) {
157
+ let t = [],
158
+ n = e.fieldResult?.[0]?.formatting,
159
+ r = n ? P(n) : "",
160
+ i = ['w:fldCharType="begin"'];
161
+ if (e.fldLock && i.push('w:fldLock="true"'), t.push(`<w:r>${r}<w:fldChar ${i.join(" ")}/></w:r>`), e.fieldCode.length > 0) t.push(...e.fieldCode.map(s => d(s)));else {
162
+ let l = e.instruction.startsWith(" ") || e.instruction.endsWith(" ") || e.instruction.includes(" ") ? ' xml:space="preserve"' : "";
163
+ t.push(`<w:r>${r}<w:instrText${l}>${a(e.instruction)}</w:instrText></w:r>`);
164
+ }
165
+ return t.push(`<w:r>${r}<w:fldChar w:fldCharType="separate"/></w:r>`), t.push(...e.fieldResult.map(s => d(s))), t.push(`<w:r>${r}<w:fldChar w:fldCharType="end"/></w:r>`), t.join("");
166
+ }
167
+ function K(e) {
168
+ let t = e.properties,
169
+ n = [];
170
+ switch (t.alias && n.push(`<w:alias w:val="${a(t.alias)}"/>`), t.tag && n.push(`<w:tag w:val="${a(t.tag)}"/>`), t.lock && t.lock !== "unlocked" && n.push(`<w:lock w:val="${t.lock}"/>`), t.showingPlaceholder && n.push("<w:showingPlcHdr/>"), t.sdtType) {
171
+ case "plainText":
172
+ n.push("<w:text/>");
173
+ break;
174
+ case "date":
175
+ t.dateFormat ? n.push(`<w:date w:fullDate="${a(t.dateFormat)}"/>`) : n.push("<w:date/>");
176
+ break;
177
+ case "dropdown":
178
+ {
179
+ let i = (t.listItems ?? []).map(s => `<w:listItem w:displayText="${a(s.displayText)}" w:value="${a(s.value)}"/>`).join("");
180
+ n.push(`<w:dropDownList>${i}</w:dropDownList>`);
181
+ break;
182
+ }
183
+ case "comboBox":
184
+ {
185
+ let i = (t.listItems ?? []).map(s => `<w:listItem w:displayText="${a(s.displayText)}" w:value="${a(s.value)}"/>`).join("");
186
+ n.push(`<w:comboBox>${i}</w:comboBox>`);
187
+ break;
188
+ }
189
+ case "checkbox":
190
+ n.push(`<w14:checkbox><w14:checked w14:val="${t.checked ? "1" : "0"}"/></w14:checkbox>`);
191
+ break;
192
+ case "picture":
193
+ n.push("<w:picture/>");
194
+ break;
195
+ }
196
+ let r = e.content.map(i => {
197
+ switch (i.type) {
198
+ case "run":
199
+ return d(i);
200
+ case "hyperlink":
201
+ return E(i);
202
+ case "simpleField":
203
+ return Z(i);
204
+ case "complexField":
205
+ return J(i);
206
+ case "inlineSdt":
207
+ return K(i);
208
+ case "mathEquation":
209
+ return i.ommlXml || "";
210
+ default:
211
+ return i;
212
+ }
213
+ }).join("");
214
+ return `<w:sdt><w:sdtPr>${n.join("")}</w:sdtPr><w:sdtContent>${r}</w:sdtContent></w:sdt>`;
215
+ }
216
+ function _(e, t) {
217
+ let n = [`w:id="${t.id}"`, `w:name="${a(t.name)}"`];
218
+ return `<w:${e} ${n.join(" ")}/>`;
219
+ }
220
+ function z(e, t) {
221
+ let n = t.info,
222
+ r = Number.isInteger(n.id) && n.id >= 0 ? n.id : 0,
223
+ i = typeof n.author == "string" ? n.author.trim() : "",
224
+ s = i.length > 0 ? i : "Unknown",
225
+ l = typeof n.date == "string" ? n.date.trim() : void 0,
226
+ c = [`w:id="${r}"`, `w:author="${a(s)}"`];
227
+ l && c.push(`w:date="${a(l)}"`);
228
+ let p = t.content.map(f => f.type === "run" ? e === "del" || e === "moveFrom" ? d(f).replace(/<w:t\b/g, "<w:delText").replace(/<\/w:t>/g, "</w:delText>").replace(/<w:instrText\b/g, "<w:delInstrText").replace(/<\/w:instrText>/g, "</w:delInstrText>") : d(f) : f.type === "hyperlink" ? E(f) : "").join("");
229
+ return `<w:${e} ${c.join(" ")}>${p}</w:${e}>`;
230
+ }
231
+ function Q(e) {
232
+ switch (e.type) {
233
+ case "run":
234
+ return d(e);
235
+ case "hyperlink":
236
+ return E(e);
237
+ case "bookmarkStart":
238
+ return q(e);
239
+ case "bookmarkEnd":
240
+ return Y(e);
241
+ case "simpleField":
242
+ return Z(e);
243
+ case "complexField":
244
+ return J(e);
245
+ case "inlineSdt":
246
+ return K(e);
247
+ case "commentRangeStart":
248
+ return `<w:commentRangeStart w:id="${e.id}"/>`;
249
+ case "commentRangeEnd":
250
+ return `<w:commentRangeEnd w:id="${e.id}"/><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:commentReference w:id="${e.id}"/></w:r>`;
251
+ case "insertion":
252
+ return z("ins", e);
253
+ case "deletion":
254
+ return z("del", e);
255
+ case "moveFrom":
256
+ return z("moveFrom", e);
257
+ case "moveTo":
258
+ return z("moveTo", e);
259
+ case "moveFromRangeStart":
260
+ return _("moveFromRangeStart", e);
261
+ case "moveFromRangeEnd":
262
+ return `<w:moveFromRangeEnd w:id="${e.id}"/>`;
263
+ case "moveToRangeStart":
264
+ return _("moveToRangeStart", e);
265
+ case "moveToRangeEnd":
266
+ return `<w:moveToRangeEnd w:id="${e.id}"/>`;
267
+ case "mathEquation":
268
+ return e.ommlXml || "";
269
+ default:
270
+ return "";
271
+ }
272
+ }
273
+ function ee(e, t) {
274
+ let n = [];
275
+ if (e) {
276
+ e.styleId && n.push(`<w:pStyle w:val="${a(e.styleId)}"/>`), e.keepNext && n.push("<w:keepNext/>"), e.keepLines && n.push("<w:keepLines/>"), e.contextualSpacing && n.push("<w:contextualSpacing/>"), e.pageBreakBefore && n.push("<w:pageBreakBefore/>");
277
+ let r = U(e.frame);
278
+ r && n.push(r), e.widowControl === false ? n.push('<w:widowControl w:val="0"/>') : e.widowControl === true && n.push("<w:widowControl/>");
279
+ let i = V(e.numPr);
280
+ i && n.push(i);
281
+ let s = H(e.borders);
282
+ s && n.push(s);
283
+ let l = O(e.shading);
284
+ l && n.push(l);
285
+ let c = N(e.tabs);
286
+ c && n.push(c), e.suppressLineNumbers && n.push("<w:suppressLineNumbers/>"), e.suppressAutoHyphens && n.push("<w:suppressAutoHyphens/>");
287
+ let p = W(e);
288
+ p && n.push(p);
289
+ let f = G(e);
290
+ if (f && n.push(f), e.bidi && n.push("<w:bidi/>"), e.alignment && n.push(`<w:jc w:val="${e.alignment}"/>`), e.outlineLevel !== void 0 && n.push(`<w:outlineLvl w:val="${e.outlineLevel}"/>`), e.runProperties) {
291
+ let u = P(e.runProperties);
292
+ u && n.push(u);
293
+ }
294
+ }
295
+ return t && t.length > 0 && n.push(...t.map(r => be(r))), n.length === 0 ? "" : `<w:pPr>${n.join("")}</w:pPr>`;
296
+ }
297
+ function Pe(e) {
298
+ return !e.startsWith("<w:pPr>") || !e.endsWith("</w:pPr>") ? "" : e.slice(7, -8);
299
+ }
300
+ function be(e) {
301
+ let t = Number.isInteger(e.info.id) && e.info.id >= 0 ? e.info.id : 0,
302
+ n = typeof e.info.author == "string" ? e.info.author.trim() : "",
303
+ r = n.length > 0 ? n : "Unknown",
304
+ i = typeof e.info.date == "string" ? e.info.date.trim() : void 0,
305
+ s = typeof e.info.rsid == "string" ? e.info.rsid.trim() : void 0,
306
+ l = [`w:id="${t}"`, `w:author="${a(r)}"`];
307
+ i && l.push(`w:date="${a(i)}"`), s && l.push(`w:rsid="${a(s)}"`);
308
+ let c = ee(e.previousFormatting) || "<w:pPr/>",
309
+ p = Pe(c),
310
+ f = p.length > 0 ? `<w:pPr>${p}</w:pPr>` : "<w:pPr/>";
311
+ return `<w:pPrChange ${l.join(" ")}>${f}</w:pPrChange>`;
312
+ }
313
+ function $(e) {
314
+ let t = [],
315
+ n = [];
316
+ e.paraId && n.push(`w14:paraId="${e.paraId}"`), e.textId && n.push(`w14:textId="${e.textId}"`);
317
+ let r = n.length > 0 ? " " + n.join(" ") : "",
318
+ i = ee(e.formatting, e.propertyChanges);
319
+ i && t.push(i);
320
+ let s = !!e.renderedPageBreakBefore;
321
+ for (let l of e.content) {
322
+ let c = Q(l);
323
+ if (c) {
324
+ if (s) {
325
+ let p = Ce(c);
326
+ p && (c = p, s = false);
327
+ }
328
+ t.push(c);
329
+ }
330
+ }
331
+ return `<w:p${r}>${t.join("")}</w:p>`;
332
+ }
333
+ function Ce(e) {
334
+ let t = /<w:r(?=[\s>/])[^>]*>/;
335
+ return t.test(e) ? e.replace(t, n => `${n}<w:lastRenderedPageBreak/>`) : null;
336
+ }
337
+ var te = 1e5;
338
+ function M() {
339
+ te = 1e5;
340
+ }
341
+ function ne(e) {
342
+ return e != null && e !== "" && e !== 0 ? String(e) : String(te++);
343
+ }
344
+ function L(e) {
345
+ if (!e) return "";
346
+ if (e.rgb) return `<a:srgbClr val="${e.rgb.replace("#", "")}"/>`;
347
+ if (e.themeColor) {
348
+ let t = `<a:schemeClr val="${e.themeColor}"`;
349
+ return e.themeTint ? t += `><a:tint val="${e.themeTint}"/></a:schemeClr>` : e.themeShade ? t += `><a:shade val="${e.themeShade}"/></a:schemeClr>` : t += "/>", t;
350
+ }
351
+ return "";
352
+ }
353
+ function Te(e) {
354
+ if (!e || e.type === "none") return "<a:noFill/>";
355
+ if (e.type === "solid" && e.color) return `<a:solidFill>${L(e.color)}</a:solidFill>`;
356
+ if (e.type === "gradient" && e.gradient) {
357
+ let t = e.gradient,
358
+ n = t.stops.map(i => `<a:gs pos="${i.position}">${L(i.color)}</a:gs>`).join(""),
359
+ r = t.type === "linear" ? `<a:lin ang="${(t.angle || 0) * 6e4}" scaled="1"/>` : "";
360
+ return `<a:gradFill><a:gsLst>${n}</a:gsLst>${r}</a:gradFill>`;
361
+ }
362
+ return "";
363
+ }
364
+ function re(e) {
365
+ if (!e) return "";
366
+ let t = [];
367
+ e.width != null && t.push(`w="${e.width}"`), e.cap && t.push(`cap="${e.cap}"`);
368
+ let n = [];
369
+ return e.color && n.push(`<a:solidFill>${L(e.color)}</a:solidFill>`), e.style && e.style !== "solid" && n.push(`<a:prstDash val="${e.style}"/>`), e.headEnd && n.push(`<a:headEnd type="${e.headEnd.type}"${e.headEnd.width ? ` w="${e.headEnd.width}"` : ""}${e.headEnd.length ? ` len="${e.headEnd.length}"` : ""}/>`), e.tailEnd && n.push(`<a:tailEnd type="${e.tailEnd.type}"${e.tailEnd.width ? ` w="${e.tailEnd.width}"` : ""}${e.tailEnd.length ? ` len="${e.tailEnd.length}"` : ""}/>`), n.length === 0 && t.length === 0 ? "" : `<a:ln${t.length ? " " + t.join(" ") : ""}>${n.join("")}</a:ln>`;
370
+ }
371
+ function ie(e) {
372
+ let t = [],
373
+ n = e.horizontal;
374
+ t.push(`<wp:positionH relativeFrom="${n.relativeTo}">`), n.alignment ? t.push(`<wp:align>${n.alignment}</wp:align>`) : t.push(`<wp:posOffset>${o(n.posOffset)}</wp:posOffset>`), t.push("</wp:positionH>");
375
+ let r = e.vertical;
376
+ return t.push(`<wp:positionV relativeFrom="${r.relativeTo}">`), r.alignment ? t.push(`<wp:align>${r.alignment}</wp:align>`) : t.push(`<wp:posOffset>${o(r.posOffset)}</wp:posOffset>`), t.push("</wp:positionV>"), t.join("");
377
+ }
378
+ function oe(e) {
379
+ let t = e.wrapText ? ` wrapText="${e.wrapText}"` : ' wrapText="bothSides"';
380
+ switch (e.type) {
381
+ case "square":
382
+ return `<wp:wrapSquare${t}/>`;
383
+ case "tight":
384
+ return `<wp:wrapTight${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;
385
+ case "through":
386
+ return `<wp:wrapThrough${t}><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/><wp:lineTo x="0" y="21600"/><wp:lineTo x="21600" y="21600"/><wp:lineTo x="21600" y="0"/><wp:lineTo x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`;
387
+ case "topAndBottom":
388
+ return "<wp:wrapTopAndBottom/>";
389
+ case "behind":
390
+ case "inFront":
391
+ return "<wp:wrapNone/>";
392
+ default:
393
+ return "<wp:wrapNone/>";
394
+ }
395
+ }
396
+ function ve(e, t) {
397
+ let n = e.size.width,
398
+ r = e.size.height,
399
+ i = e.rId || "rId1",
400
+ s = t,
401
+ l = e.filename || `image${s}`,
402
+ c = "";
403
+ e.transform?.rotation && (c += ` rot="${Math.round(e.transform.rotation * 6e4)}"`), e.transform?.flipH && (c += ' flipH="1"'), e.transform?.flipV && (c += ' flipV="1"');
404
+ let p = e.opacity !== void 0 && e.opacity < 1 ? `<a:alphaModFix amt="${Math.round(Math.max(0, Math.min(1, e.opacity)) * 1e5)}"/>` : "",
405
+ f = p ? `<a:blip r:embed="${i}">${p}</a:blip>` : `<a:blip r:embed="${i}"/>`,
406
+ u = [];
407
+ e.crop?.left && u.push(`l="${Math.round(e.crop.left * 1e5)}"`), e.crop?.top && u.push(`t="${Math.round(e.crop.top * 1e5)}"`), e.crop?.right && u.push(`r="${Math.round(e.crop.right * 1e5)}"`), e.crop?.bottom && u.push(`b="${Math.round(e.crop.bottom * 1e5)}"`);
408
+ let b = u.length > 0 ? `<a:srcRect ${u.join(" ")}/>` : "";
409
+ return ['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">', '<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">', '<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">', "<pic:nvPicPr>", `<pic:cNvPr id="${s}" name="${a(l)}"${e.alt ? ` descr="${a(e.alt)}"` : ""}/>`, "<pic:cNvPicPr/>", "</pic:nvPicPr>", "<pic:blipFill>", f, b, "<a:stretch><a:fillRect/></a:stretch>", "</pic:blipFill>", "<pic:spPr>", `<a:xfrm${c}>`, '<a:off x="0" y="0"/>', `<a:ext cx="${o(n)}" cy="${o(r)}"/>`, "</a:xfrm>", '<a:prstGeom prst="rect"><a:avLst/></a:prstGeom>', e.outline ? re(e.outline) : "", "</pic:spPr>", "</pic:pic>", "</a:graphicData>", "</a:graphic>"].join("");
410
+ }
411
+ function se(e) {
412
+ let t = e.image,
413
+ n = t.wrap.type !== "inline",
414
+ r = t.size.width,
415
+ i = t.size.height,
416
+ s = t.wrap.distT ?? 0,
417
+ l = t.wrap.distB ?? 0,
418
+ c = t.wrap.distL ?? 0,
419
+ p = t.wrap.distR ?? 0,
420
+ f = t.padding?.left ?? 0,
421
+ u = t.padding?.top ?? 0,
422
+ b = t.padding?.right ?? 0,
423
+ C = t.padding?.bottom ?? 0,
424
+ F = `<wp:effectExtent l="${o(f)}" t="${o(u)}" r="${o(b)}" b="${o(C)}"/>`,
425
+ m = ne(t.id),
426
+ k = t.title || t.filename || `Picture ${m}`,
427
+ v = ve(t, m);
428
+ if (!n) return ["<w:drawing>", `<wp:inline distT="${o(s)}" distB="${o(l)}" distL="${o(c)}" distR="${o(p)}">`, `<wp:extent cx="${o(r)}" cy="${o(i)}"/>`, F, `<wp:docPr id="${m}" name="${a(k)}"${t.alt ? ` descr="${a(t.alt)}"` : ""}${t.decorative ? ' hidden="1"' : ""}/>`, '<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>', v, "</wp:inline>", "</w:drawing>"].join("");
429
+ let B = t.wrap.type === "behind" ? "1" : "0",
430
+ A = t.position ? ie(t.position) : '<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',
431
+ D = oe(t.wrap);
432
+ return ["<w:drawing>", `<wp:anchor distT="${o(s)}" distB="${o(l)}" distL="${o(c)}" distR="${o(p)}" simplePos="0" relativeHeight="251658240" behindDoc="${B}" locked="0" layoutInCell="${t.layoutInCell === false ? "0" : "1"}" allowOverlap="${t.allowOverlap === false ? "0" : "1"}">`, '<wp:simplePos x="0" y="0"/>', A, `<wp:extent cx="${o(r)}" cy="${o(i)}"/>`, F, D, `<wp:docPr id="${m}" name="${a(k)}"${t.alt ? ` descr="${a(t.alt)}"` : ""}/>`, '<wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr>', v, "</wp:anchor>", "</w:drawing>"].join("");
433
+ }
434
+ function Se(e) {
435
+ return e.map(t => $(t)).join("");
436
+ }
437
+ function ae(e) {
438
+ let t = e.shape,
439
+ n = t.size.width,
440
+ r = t.size.height,
441
+ i = t.shapeType === "textBox",
442
+ s = t.wrap && t.wrap.type !== "inline",
443
+ l = t.wrap?.distT ?? 0,
444
+ c = t.wrap?.distB ?? 0,
445
+ p = t.wrap?.distL ?? 0,
446
+ f = t.wrap?.distR ?? 0,
447
+ u = ne(t.id),
448
+ b = t.name || (i ? `TextBox ${u}` : `Shape ${u}`),
449
+ C = "";
450
+ t.transform?.rotation && (C += ` rot="${Math.round(t.transform.rotation * 6e4)}"`), t.transform?.flipH && (C += ' flipH="1"'), t.transform?.flipV && (C += ' flipV="1"');
451
+ let F = ["<wps:spPr>", `<a:xfrm${C}>`, '<a:off x="0" y="0"/>', `<a:ext cx="${o(n)}" cy="${o(r)}"/>`, "</a:xfrm>", `<a:prstGeom prst="${t.shapeType === "textBox" ? "rect" : t.shapeType}"><a:avLst/></a:prstGeom>`, Te(t.fill), re(t.outline), "</wps:spPr>"].join(""),
452
+ m = "";
453
+ if (t.textBody) {
454
+ let h = t.textBody,
455
+ g = ['rot="0"', 'vert="horz"'];
456
+ h.anchor && g.push(`anchor="${h.anchor === "middle" ? "ctr" : h.anchor}"`), h.anchorCenter && g.push('anchorCtr="1"'), h.margins && (h.margins.left != null && g.push(`lIns="${o(h.margins.left)}"`), h.margins.top != null && g.push(`tIns="${o(h.margins.top)}"`), h.margins.right != null && g.push(`rIns="${o(h.margins.right)}"`), h.margins.bottom != null && g.push(`bIns="${o(h.margins.bottom)}"`)), i ? m = ["<wps:txbx><w:txbxContent>", Se(h.content), "</w:txbxContent></wps:txbx>", `<wps:bodyPr ${g.join(" ")}/>`].join("") : m = [`<wps:bodyPr ${g.join(" ")}/>`].join("");
457
+ }
458
+ let v = ['<a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">', '<a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape">', ["<wps:wsp>", `<wps:cNvSpPr${i ? ' txBox="1"' : ""}/>`, F, m, "</wps:wsp>"].join(""), "</a:graphicData>", "</a:graphic>"].join("");
459
+ if (!s) return ["<w:drawing>", `<wp:inline distT="${o(l)}" distB="${o(c)}" distL="${o(p)}" distR="${o(f)}">`, `<wp:extent cx="${o(n)}" cy="${o(r)}"/>`, '<wp:effectExtent l="0" t="0" r="0" b="0"/>', `<wp:docPr id="${u}" name="${a(b)}"/>`, "<wp:cNvGraphicFramePr/>", v, "</wp:inline>", "</w:drawing>"].join("");
460
+ let B = t.wrap?.type === "behind" ? "1" : "0",
461
+ A = t.position ? ie(t.position) : '<wp:positionH relativeFrom="column"><wp:posOffset>0</wp:posOffset></wp:positionH><wp:positionV relativeFrom="paragraph"><wp:posOffset>0</wp:posOffset></wp:positionV>',
462
+ D = oe(t.wrap);
463
+ return ["<w:drawing>", `<wp:anchor distT="${o(l)}" distB="${o(c)}" distL="${o(p)}" distR="${o(f)}" simplePos="0" relativeHeight="251658240" behindDoc="${B}" locked="0" layoutInCell="1" allowOverlap="1">`, '<wp:simplePos x="0" y="0"/>', A, `<wp:extent cx="${o(n)}" cy="${o(r)}"/>`, '<wp:effectExtent l="0" t="0" r="0" b="0"/>', D, `<wp:docPr id="${u}" name="${a(b)}"/>`, "<wp:cNvGraphicFramePr/>", v, "</wp:anchor>", "</w:drawing>"].join("");
464
+ }
465
+ var Fe = new Set(["black", "blue", "cyan", "darkBlue", "darkCyan", "darkGray", "darkGreen", "darkMagenta", "darkRed", "darkYellow", "green", "lightGray", "magenta", "red", "white", "yellow"]);
466
+ function ze(e) {
467
+ if (!e) return "";
468
+ let t = [];
469
+ return e.auto ? t.push('w:val="auto"') : e.rgb && t.push(`w:val="${e.rgb}"`), e.themeColor && t.push(`w:themeColor="${e.themeColor}"`), e.themeTint && t.push(`w:themeTint="${e.themeTint}"`), e.themeShade && t.push(`w:themeShade="${e.themeShade}"`), t.length === 0 ? "" : `<w:color ${t.join(" ")}/>`;
470
+ }
471
+ function Re(e) {
472
+ if (!e) return "";
473
+ let t = [];
474
+ return e.pattern ? t.push(`w:val="${e.pattern}"`) : t.push('w:val="clear"'), e.color?.rgb ? t.push(`w:color="${e.color.rgb}"`) : e.color?.auto && t.push('w:color="auto"'), e.fill?.rgb ? t.push(`w:fill="${e.fill.rgb}"`) : e.fill?.auto && t.push('w:fill="auto"'), e.fill?.themeColor && t.push(`w:themeFill="${e.fill.themeColor}"`), e.fill?.themeTint && t.push(`w:themeFillTint="${e.fill.themeTint}"`), e.fill?.themeShade && t.push(`w:themeFillShade="${e.fill.themeShade}"`), t.length === 0 ? "" : `<w:shd ${t.join(" ")}/>`;
475
+ }
476
+ function P(e) {
477
+ if (!e) return "";
478
+ let t = [];
479
+ if (e.styleId && t.push(`<w:rStyle w:val="${a(e.styleId)}"/>`), e.fontFamily) {
480
+ let i = [];
481
+ e.fontFamily.ascii && i.push(`w:ascii="${a(e.fontFamily.ascii)}"`), e.fontFamily.hAnsi && i.push(`w:hAnsi="${a(e.fontFamily.hAnsi)}"`), e.fontFamily.eastAsia && i.push(`w:eastAsia="${a(e.fontFamily.eastAsia)}"`), e.fontFamily.cs && i.push(`w:cs="${a(e.fontFamily.cs)}"`), e.fontFamily.asciiTheme && i.push(`w:asciiTheme="${e.fontFamily.asciiTheme}"`), e.fontFamily.hAnsiTheme && i.push(`w:hAnsiTheme="${e.fontFamily.hAnsiTheme}"`), e.fontFamily.eastAsiaTheme && i.push(`w:eastAsiaTheme="${e.fontFamily.eastAsiaTheme}"`), e.fontFamily.csTheme && i.push(`w:csTheme="${e.fontFamily.csTheme}"`), i.length > 0 && t.push(`<w:rFonts ${i.join(" ")}/>`);
482
+ }
483
+ e.bold === true ? t.push("<w:b/>") : e.bold === false && t.push('<w:b w:val="0"/>'), e.boldCs === true ? t.push("<w:bCs/>") : e.boldCs === false && t.push('<w:bCs w:val="0"/>'), e.italic === true ? t.push("<w:i/>") : e.italic === false && t.push('<w:i w:val="0"/>'), e.italicCs === true ? t.push("<w:iCs/>") : e.italicCs === false && t.push('<w:iCs w:val="0"/>'), e.allCaps && t.push("<w:caps/>"), e.smallCaps && t.push("<w:smallCaps/>"), e.strike && t.push("<w:strike/>"), e.doubleStrike && t.push("<w:dstrike/>"), e.outline && t.push("<w:outline/>"), e.shadow && t.push("<w:shadow/>"), e.emboss && t.push("<w:emboss/>"), e.imprint && t.push("<w:imprint/>"), e.hidden && t.push("<w:vanish/>");
484
+ let n = ze(e.color);
485
+ if (n && t.push(n), e.spacing !== void 0 && t.push(`<w:spacing w:val="${o(e.spacing)}"/>`), e.scale !== void 0 && t.push(`<w:w w:val="${o(e.scale)}"/>`), e.kerning !== void 0 && t.push(`<w:kern w:val="${o(e.kerning)}"/>`), e.position !== void 0 && t.push(`<w:position w:val="${o(e.position)}"/>`), e.fontSize !== void 0 && t.push(`<w:sz w:val="${o(e.fontSize)}"/>`), e.fontSizeCs !== void 0 && t.push(`<w:szCs w:val="${o(e.fontSizeCs)}"/>`), e.highlight && e.highlight !== "none") {
486
+ if (Fe.has(e.highlight)) t.push(`<w:highlight w:val="${e.highlight}"/>`);else if (!e.shading) {
487
+ let i = e.highlight.replace(/^#/, "");
488
+ /^[0-9a-fA-F]{6}$/.test(i) && t.push(`<w:shd w:val="clear" w:color="auto" w:fill="${i}"/>`);
489
+ }
490
+ }
491
+ if (e.underline) {
492
+ let i = [`w:val="${e.underline.style}"`];
493
+ e.underline.color && (e.underline.color.rgb && i.push(`w:color="${e.underline.color.rgb}"`), e.underline.color.themeColor && i.push(`w:themeColor="${e.underline.color.themeColor}"`), e.underline.color.themeTint && i.push(`w:themeTint="${e.underline.color.themeTint}"`), e.underline.color.themeShade && i.push(`w:themeShade="${e.underline.color.themeShade}"`)), t.push(`<w:u ${i.join(" ")}/>`);
494
+ }
495
+ e.effect && e.effect !== "none" && t.push(`<w:effect w:val="${e.effect}"/>`), e.emphasisMark && e.emphasisMark !== "none" && t.push(`<w:em w:val="${e.emphasisMark}"/>`);
496
+ let r = Re(e.shading);
497
+ return r && t.push(r), e.vertAlign && e.vertAlign !== "baseline" && t.push(`<w:vertAlign w:val="${e.vertAlign}"/>`), e.rtl && t.push("<w:rtl/>"), e.cs && t.push("<w:cs/>"), t.length === 0 ? "" : `<w:rPr>${t.join("")}</w:rPr>`;
498
+ }
499
+ function Ie(e) {
500
+ return !e.startsWith("<w:rPr>") || !e.endsWith("</w:rPr>") ? "" : e.slice(7, -8);
501
+ }
502
+ function je(e) {
503
+ let t = Number.isInteger(e.info.id) && e.info.id >= 0 ? e.info.id : 0,
504
+ n = typeof e.info.author == "string" ? e.info.author.trim() : "",
505
+ r = n.length > 0 ? n : "Unknown",
506
+ i = typeof e.info.date == "string" ? e.info.date.trim() : void 0,
507
+ s = typeof e.info.rsid == "string" ? e.info.rsid.trim() : void 0,
508
+ l = [`w:id="${t}"`, `w:author="${a(r)}"`];
509
+ i && l.push(`w:date="${a(i)}"`), s && l.push(`w:rsid="${a(s)}"`);
510
+ let c = P(e.previousFormatting) || "<w:rPr/>";
511
+ return `<w:rPrChange ${l.join(" ")}>${c}</w:rPrChange>`;
512
+ }
513
+ function ke(e, t) {
514
+ let n = P(e),
515
+ r = n ? Ie(n) : "",
516
+ i = (t ?? []).map(je).join(""),
517
+ s = `${r}${i}`;
518
+ return s ? `<w:rPr>${s}</w:rPr>` : "";
519
+ }
520
+ function Be(e) {
521
+ return `<w:t${e.preserveSpace || e.text.startsWith(" ") || e.text.endsWith(" ") || e.text.includes(" ") ? ' xml:space="preserve"' : ""}>${a(e.text)}</w:t>`;
522
+ }
523
+ function Ae(e) {
524
+ return "<w:tab/>";
525
+ }
526
+ function De(e) {
527
+ let t = [];
528
+ return e.breakType === "page" ? t.push('w:type="page"') : e.breakType === "column" ? t.push('w:type="column"') : e.breakType === "textWrapping" && (t.push('w:type="textWrapping"'), e.clear && e.clear !== "none" && t.push(`w:clear="${e.clear}"`)), t.length === 0 ? "<w:br/>" : `<w:br ${t.join(" ")}/>`;
529
+ }
530
+ function Xe(e) {
531
+ return `<w:sym w:font="${a(e.font)}" w:char="${a(e.char)}"/>`;
532
+ }
533
+ function Ee(e) {
534
+ return e.type === "footnoteRef" ? `<w:footnoteReference w:id="${e.id}"/>` : `<w:endnoteReference w:id="${e.id}"/>`;
535
+ }
536
+ function Le(e) {
537
+ let t = [`w:fldCharType="${e.charType}"`];
538
+ return e.fldLock && t.push('w:fldLock="true"'), e.dirty && t.push('w:dirty="true"'), `<w:fldChar ${t.join(" ")}/>`;
539
+ }
540
+ function Me(e) {
541
+ return `<w:instrText${e.text.startsWith(" ") || e.text.endsWith(" ") || e.text.includes(" ") ? ' xml:space="preserve"' : ""}>${a(e.text)}</w:instrText>`;
542
+ }
543
+ function He(e) {
544
+ return "<w:softHyphen/>";
545
+ }
546
+ function Oe(e) {
547
+ return "<w:noBreakHyphen/>";
548
+ }
549
+ function Ne(e) {
550
+ switch (e.type) {
551
+ case "text":
552
+ return Be(e);
553
+ case "tab":
554
+ return Ae();
555
+ case "break":
556
+ return De(e);
557
+ case "symbol":
558
+ return Xe(e);
559
+ case "footnoteRef":
560
+ case "endnoteRef":
561
+ return Ee(e);
562
+ case "fieldChar":
563
+ return Le(e);
564
+ case "instrText":
565
+ return Me(e);
566
+ case "softHyphen":
567
+ return He();
568
+ case "noBreakHyphen":
569
+ return Oe();
570
+ case "drawing":
571
+ return se(e);
572
+ case "shape":
573
+ return ae(e);
574
+ default:
575
+ return "";
576
+ }
577
+ }
578
+ function d(e) {
579
+ let t = [],
580
+ n = ke(e.formatting, e.propertyChanges);
581
+ n && t.push(n);
582
+ for (let r of e.content) {
583
+ let i = Ne(r);
584
+ i && t.push(i);
585
+ }
586
+ return `<w:r>${t.join("")}</w:r>`;
587
+ }
588
+ function We(e) {
589
+ let t = Number.isInteger(e.id) && e.id >= 0 ? e.id : 0,
590
+ n = typeof e.author == "string" ? e.author.trim() : "",
591
+ r = n.length > 0 ? n : "Unknown",
592
+ i = typeof e.date == "string" ? e.date.trim() : void 0;
593
+ return {
594
+ id: t,
595
+ author: r,
596
+ date: i
597
+ };
598
+ }
599
+ function y(e, t) {
600
+ let n = We(e),
601
+ r = [`w:id="${n.id}"`, `w:author="${a(n.author)}"`];
602
+ return n.date && r.push(`w:date="${a(n.date)}"`), t && t.trim().length > 0 && r.push(`w:rsid="${a(t.trim())}"`), r.join(" ");
603
+ }
604
+ function x(e, t) {
605
+ if (!e) return "";
606
+ let n = [`w:w="${o(e.value)}"`, `w:type="${e.type}"`];
607
+ return `<w:${t} ${n.join(" ")}/>`;
608
+ }
609
+ function T(e, t) {
610
+ if (!e || e.style === "none" || e.style === "nil") return "";
611
+ let n = [`w:val="${e.style}"`];
612
+ return e.size !== void 0 && n.push(`w:sz="${o(e.size)}"`), e.space !== void 0 && n.push(`w:space="${o(e.space)}"`), e.color && (e.color.auto ? n.push('w:color="auto"') : e.color.rgb && n.push(`w:color="${e.color.rgb}"`), e.color.themeColor && n.push(`w:themeColor="${e.color.themeColor}"`), e.color.themeTint && n.push(`w:themeTint="${e.color.themeTint}"`), e.color.themeShade && n.push(`w:themeShade="${e.color.themeShade}"`)), e.shadow && n.push('w:shadow="true"'), e.frame && n.push('w:frame="true"'), `<w:${t} ${n.join(" ")}/>`;
613
+ }
614
+ function ce(e, t) {
615
+ if (!e) return "";
616
+ let n = [];
617
+ if (e.top) {
618
+ let r = T(e.top, "top");
619
+ r && n.push(r);
620
+ }
621
+ if (e.left) {
622
+ let r = T(e.left, "left");
623
+ r && n.push(r);
624
+ }
625
+ if (e.bottom) {
626
+ let r = T(e.bottom, "bottom");
627
+ r && n.push(r);
628
+ }
629
+ if (e.right) {
630
+ let r = T(e.right, "right");
631
+ r && n.push(r);
632
+ }
633
+ if (e.insideH) {
634
+ let r = T(e.insideH, "insideH");
635
+ r && n.push(r);
636
+ }
637
+ if (e.insideV) {
638
+ let r = T(e.insideV, "insideV");
639
+ r && n.push(r);
640
+ }
641
+ return n.length === 0 ? "" : `<w:${t}>${n.join("")}</w:${t}>`;
642
+ }
643
+ function le(e, t) {
644
+ if (!e) return "";
645
+ let n = [];
646
+ return e.top && n.push(x(e.top, "top")), e.left && n.push(x(e.left, "left")), e.bottom && n.push(x(e.bottom, "bottom")), e.right && n.push(x(e.right, "right")), n.length === 0 ? "" : `<w:${t}>${n.join("")}</w:${t}>`;
647
+ }
648
+ function pe(e) {
649
+ if (!e) return "";
650
+ let t = [];
651
+ return e.pattern ? t.push(`w:val="${e.pattern}"`) : t.push('w:val="clear"'), e.color?.rgb ? t.push(`w:color="${e.color.rgb}"`) : e.color?.auto && t.push('w:color="auto"'), e.fill?.rgb ? t.push(`w:fill="${e.fill.rgb}"`) : e.fill?.auto && t.push('w:fill="auto"'), e.fill?.themeColor && t.push(`w:themeFill="${e.fill.themeColor}"`), e.fill?.themeTint && t.push(`w:themeFillTint="${e.fill.themeTint}"`), e.fill?.themeShade && t.push(`w:themeFillShade="${e.fill.themeShade}"`), t.length === 0 ? "" : `<w:shd ${t.join(" ")}/>`;
652
+ }
653
+ function Ge(e) {
654
+ if (!e) return "";
655
+ let t = [];
656
+ return e.firstRow && t.push('w:firstRow="1"'), e.lastRow && t.push('w:lastRow="1"'), e.firstColumn && t.push('w:firstColumn="1"'), e.lastColumn && t.push('w:lastColumn="1"'), e.noHBand && t.push('w:noHBand="1"'), e.noVBand && t.push('w:noVBand="1"'), t.length === 0 ? "" : `<w:tblLook ${t.join(" ")}/>`;
657
+ }
658
+ function Ve(e) {
659
+ if (!e) return "";
660
+ let t = [];
661
+ return e.horzAnchor && t.push(`w:horzAnchor="${e.horzAnchor}"`), e.vertAnchor && t.push(`w:vertAnchor="${e.vertAnchor}"`), e.tblpX !== void 0 && t.push(`w:tblpX="${o(e.tblpX)}"`), e.tblpXSpec && t.push(`w:tblpXSpec="${e.tblpXSpec}"`), e.tblpY !== void 0 && t.push(`w:tblpY="${o(e.tblpY)}"`), e.tblpYSpec && t.push(`w:tblpYSpec="${e.tblpYSpec}"`), e.topFromText !== void 0 && t.push(`w:topFromText="${o(e.topFromText)}"`), e.bottomFromText !== void 0 && t.push(`w:bottomFromText="${o(e.bottomFromText)}"`), e.leftFromText !== void 0 && t.push(`w:leftFromText="${o(e.leftFromText)}"`), e.rightFromText !== void 0 && t.push(`w:rightFromText="${o(e.rightFromText)}"`), t.length === 0 ? "" : `<w:tblpPr ${t.join(" ")}/>`;
662
+ }
663
+ function ue(e, t) {
664
+ let n = [];
665
+ if (e) {
666
+ e.styleId && n.push(`<w:tblStyle w:val="${a(e.styleId)}"/>`);
667
+ let r = Ve(e.floating);
668
+ r && n.push(r), e.bidi && n.push("<w:bidiVisual/>");
669
+ let i = x(e.width, "tblW");
670
+ i && n.push(i), e.justification && n.push(`<w:jc w:val="${e.justification}"/>`);
671
+ let s = x(e.cellSpacing, "tblCellSpacing");
672
+ s && n.push(s);
673
+ let l = x(e.indent, "tblInd");
674
+ l && n.push(l);
675
+ let c = ce(e.borders, "tblBorders");
676
+ c && n.push(c);
677
+ let p = le(e.cellMargins, "tblCellMar");
678
+ p && n.push(p), e.layout && n.push(`<w:tblLayout w:type="${e.layout}"/>`);
679
+ let f = pe(e.shading);
680
+ f && n.push(f);
681
+ let u = Ge(e.look);
682
+ u && n.push(u), e.overlap && n.push(`<w:tblOverlap w:val="${e.overlap}"/>`);
683
+ }
684
+ return t && t.length > 0 && n.push(...t.map(r => _e(r))), n.length === 0 ? "" : `<w:tblPr>${n.join("")}</w:tblPr>`;
685
+ }
686
+ function Ue(e) {
687
+ return !e.startsWith("<w:tblPr>") || !e.endsWith("</w:tblPr>") ? "" : e.slice(9, -10);
688
+ }
689
+ function _e(e) {
690
+ let t = y(e.info, e.info.rsid),
691
+ n = ue(e.previousFormatting) || "<w:tblPr/>",
692
+ r = Ue(n),
693
+ i = r.length > 0 ? `<w:tblPr>${r}</w:tblPr>` : "<w:tblPr/>";
694
+ return `<w:tblPrChange ${t}>${i}</w:tblPrChange>`;
695
+ }
696
+ function fe(e, t, n) {
697
+ let r = [];
698
+ if (e) {
699
+ if (e.cantSplit && r.push("<w:cantSplit/>"), e.header && r.push("<w:tblHeader/>"), e.height) {
700
+ let i = [`w:val="${o(e.height.value)}"`];
701
+ e.heightRule && i.push(`w:hRule="${e.heightRule}"`), r.push(`<w:trHeight ${i.join(" ")}/>`);
702
+ }
703
+ e.justification && r.push(`<w:jc w:val="${e.justification}"/>`), e.hidden && r.push("<w:hidden/>");
704
+ }
705
+ return n && (n.type === "tableRowInsertion" ? r.push(`<w:ins ${y(n.info)}/>`) : n.type === "tableRowDeletion" && r.push(`<w:del ${y(n.info)}/>`)), t && t.length > 0 && r.push(...t.map(i => Ye(i))), r.length === 0 ? "" : `<w:trPr>${r.join("")}</w:trPr>`;
706
+ }
707
+ function qe(e) {
708
+ return !e.startsWith("<w:trPr>") || !e.endsWith("</w:trPr>") ? "" : e.slice(8, -9);
709
+ }
710
+ function Ye(e) {
711
+ let t = y(e.info, e.info.rsid),
712
+ n = fe(e.previousFormatting) || "<w:trPr/>",
713
+ r = qe(n),
714
+ i = r.length > 0 ? `<w:trPr>${r}</w:trPr>` : "<w:trPr/>";
715
+ return `<w:trPrChange ${t}>${i}</w:trPrChange>`;
716
+ }
717
+ function Ze(e) {
718
+ if (!e) return "";
719
+ let n = [e.firstRow ? "1" : "0", e.lastRow ? "1" : "0", e.firstColumn ? "1" : "0", e.lastColumn ? "1" : "0", e.oddVBand ? "1" : "0", e.evenVBand ? "1" : "0", e.oddHBand ? "1" : "0", e.evenHBand ? "1" : "0", e.nwCell ? "1" : "0", e.neCell ? "1" : "0", e.swCell ? "1" : "0", e.seCell ? "1" : "0"].join("");
720
+ return n === "000000000000" ? "" : `<w:cnfStyle w:val="${n}"/>`;
721
+ }
722
+ function he(e, t, n) {
723
+ let r = [];
724
+ if (e) {
725
+ let i = Ze(e.conditionalFormat);
726
+ i && r.push(i);
727
+ let s = x(e.width, "tcW");
728
+ s && r.push(s), e.gridSpan && e.gridSpan > 1 && r.push(`<w:gridSpan w:val="${o(e.gridSpan)}"/>`), e.vMerge && (e.vMerge === "restart" ? r.push('<w:vMerge w:val="restart"/>') : r.push("<w:vMerge/>"));
729
+ let l = ce(e.borders, "tcBorders");
730
+ l && r.push(l);
731
+ let c = pe(e.shading);
732
+ c && r.push(c), e.noWrap && r.push("<w:noWrap/>");
733
+ let p = le(e.margins, "tcMar");
734
+ p && r.push(p), e.textDirection && r.push(`<w:textDirection w:val="${e.textDirection}"/>`), e.fitText && r.push("<w:tcFitText/>"), e.verticalAlign && r.push(`<w:vAlign w:val="${e.verticalAlign}"/>`), e.hideMark && r.push("<w:hideMark/>");
735
+ }
736
+ return n && (n.type === "tableCellInsertion" ? r.push(`<w:cellIns ${y(n.info)}/>`) : n.type === "tableCellDeletion" ? r.push(`<w:cellDel ${y(n.info)}/>`) : n.type === "tableCellMerge" && r.push(`<w:cellMerge ${y(n.info)}/>`)), t && t.length > 0 && r.push(...t.map(i => Ke(i))), r.length === 0 ? "" : `<w:tcPr>${r.join("")}</w:tcPr>`;
737
+ }
738
+ function Je(e) {
739
+ return !e.startsWith("<w:tcPr>") || !e.endsWith("</w:tcPr>") ? "" : e.slice(8, -9);
740
+ }
741
+ function Ke(e) {
742
+ let t = y(e.info, e.info.rsid),
743
+ n = he(e.previousFormatting) || "<w:tcPr/>",
744
+ r = Je(n),
745
+ i = r.length > 0 ? `<w:tcPr>${r}</w:tcPr>` : "<w:tcPr/>";
746
+ return `<w:tcPrChange ${t}>${i}</w:tcPrChange>`;
747
+ }
748
+ function Qe(e) {
749
+ return !e || e.length === 0 ? "" : `<w:tblGrid>${e.map(n => `<w:gridCol w:w="${o(n)}"/>`).join("")}</w:tblGrid>`;
750
+ }
751
+ function et(e) {
752
+ let t = [];
753
+ for (let n of e) n.type === "paragraph" ? t.push($(n)) : n.type === "table" && t.push(S(n));
754
+ return t.length === 0 && t.push("<w:p/>"), t.join("");
755
+ }
756
+ function tt(e) {
757
+ let t = [],
758
+ n = he(e.formatting, e.propertyChanges, e.structuralChange);
759
+ return n && t.push(n), t.push(et(e.content)), `<w:tc>${t.join("")}</w:tc>`;
760
+ }
761
+ function nt(e) {
762
+ let t = [],
763
+ n = fe(e.formatting, e.propertyChanges, e.structuralChange);
764
+ n && t.push(n);
765
+ for (let r of e.cells) t.push(tt(r));
766
+ return `<w:tr>${t.join("")}</w:tr>`;
767
+ }
768
+ function S(e) {
769
+ let t = [],
770
+ n = ue(e.formatting, e.propertyChanges);
771
+ n && t.push(n);
772
+ let r = Qe(e.columnWidths);
773
+ r && t.push(r);
774
+ for (let i of e.rows) t.push(nt(i));
775
+ return `<w:tbl>${t.join("")}</w:tbl>`;
776
+ }
777
+ var w = {
778
+ wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
779
+ mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
780
+ o: "urn:schemas-microsoft-com:office:office",
781
+ r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
782
+ m: "http://schemas.openxmlformats.org/officeDocument/2006/math",
783
+ v: "urn:schemas-microsoft-com:vml",
784
+ wp14: "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
785
+ wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
786
+ w10: "urn:schemas-microsoft-com:office:word",
787
+ w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
788
+ w14: "http://schemas.microsoft.com/office/word/2010/wordml",
789
+ w15: "http://schemas.microsoft.com/office/word/2012/wordml",
790
+ wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
791
+ wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
792
+ };
793
+ function rt() {
794
+ let e = {
795
+ wpc: w.wpc,
796
+ mc: w.mc,
797
+ o: w.o,
798
+ r: w.r,
799
+ m: w.m,
800
+ v: w.v,
801
+ wp14: w.wp14,
802
+ wp: w.wp,
803
+ w10: w.w10,
804
+ w: w.w,
805
+ w14: w.w14,
806
+ w15: w.w15,
807
+ wpg: w.wpg,
808
+ wps: w.wps
809
+ };
810
+ return Object.entries(e).map(([t, n]) => `xmlns:${t}="${n}"`).join(" ");
811
+ }
812
+ function R(e, t) {
813
+ if (!e || e.style === "none" || e.style === "nil") return "";
814
+ let n = [`w:val="${e.style}"`];
815
+ return e.size !== void 0 && n.push(`w:sz="${o(e.size)}"`), e.space !== void 0 && n.push(`w:space="${o(e.space)}"`), e.color && (e.color.auto ? n.push('w:color="auto"') : e.color.rgb && n.push(`w:color="${e.color.rgb}"`), e.color.themeColor && n.push(`w:themeColor="${e.color.themeColor}"`), e.color.themeTint && n.push(`w:themeTint="${e.color.themeTint}"`), e.color.themeShade && n.push(`w:themeShade="${e.color.themeShade}"`)), e.shadow && n.push('w:shadow="true"'), e.frame && n.push('w:frame="true"'), `<w:${t} ${n.join(" ")}/>`;
816
+ }
817
+ function it(e) {
818
+ return `<w:headerReference ${[`w:type="${e.type}"`, `r:id="${e.rId}"`].join(" ")}/>`;
819
+ }
820
+ function ot(e) {
821
+ return `<w:footerReference ${[`w:type="${e.type}"`, `r:id="${e.rId}"`].join(" ")}/>`;
822
+ }
823
+ function st(e) {
824
+ if (!e) return "";
825
+ let t = [];
826
+ return e.position && t.push(`<w:pos w:val="${e.position}"/>`), e.numFmt && t.push(`<w:numFmt w:val="${e.numFmt}"/>`), e.numStart !== void 0 && t.push(`<w:numStart w:val="${e.numStart}"/>`), e.numRestart && t.push(`<w:numRestart w:val="${e.numRestart}"/>`), t.length === 0 ? "" : `<w:footnotePr>${t.join("")}</w:footnotePr>`;
827
+ }
828
+ function at(e) {
829
+ if (!e) return "";
830
+ let t = [];
831
+ return e.position && t.push(`<w:pos w:val="${e.position}"/>`), e.numFmt && t.push(`<w:numFmt w:val="${e.numFmt}"/>`), e.numStart !== void 0 && t.push(`<w:numStart w:val="${e.numStart}"/>`), e.numRestart && t.push(`<w:numRestart w:val="${e.numRestart}"/>`), t.length === 0 ? "" : `<w:endnotePr>${t.join("")}</w:endnotePr>`;
832
+ }
833
+ function ct(e) {
834
+ let t = [];
835
+ return e.pageWidth !== void 0 && t.push(`w:w="${o(e.pageWidth)}"`), e.pageHeight !== void 0 && t.push(`w:h="${o(e.pageHeight)}"`), e.orientation === "landscape" && t.push('w:orient="landscape"'), t.length === 0 ? "" : `<w:pgSz ${t.join(" ")}/>`;
836
+ }
837
+ function lt(e) {
838
+ let t = [];
839
+ return e.marginTop !== void 0 && t.push(`w:top="${o(e.marginTop)}"`), e.marginRight !== void 0 && t.push(`w:right="${o(e.marginRight)}"`), e.marginBottom !== void 0 && t.push(`w:bottom="${o(e.marginBottom)}"`), e.marginLeft !== void 0 && t.push(`w:left="${o(e.marginLeft)}"`), e.headerDistance !== void 0 && t.push(`w:header="${o(e.headerDistance)}"`), e.footerDistance !== void 0 && t.push(`w:footer="${o(e.footerDistance)}"`), e.gutter !== void 0 && t.push(`w:gutter="${o(e.gutter)}"`), t.length === 0 ? "" : `<w:pgMar ${t.join(" ")}/>`;
840
+ }
841
+ function pt(e) {
842
+ if (!e.columnCount && !e.columns?.length) return "";
843
+ let t = [];
844
+ e.columnCount !== void 0 && e.columnCount > 1 && t.push(`w:num="${o(e.columnCount)}"`), e.columnSpace !== void 0 && t.push(`w:space="${o(e.columnSpace)}"`), e.equalWidth !== void 0 && t.push(`w:equalWidth="${e.equalWidth ? "1" : "0"}"`), e.separator && t.push('w:sep="1"');
845
+ let n = "";
846
+ return e.columns && e.columns.length > 0 && (n = e.columns.map(i => {
847
+ let s = [];
848
+ return i.width !== void 0 && s.push(`w:w="${o(i.width)}"`), i.space !== void 0 && s.push(`w:space="${o(i.space)}"`), `<w:col ${s.join(" ")}/>`;
849
+ }).join("")), t.length === 0 && !n ? "" : `<w:cols${t.length > 0 ? " " + t.join(" ") : ""}>${n}</w:cols>`;
850
+ }
851
+ function ut(e) {
852
+ if (!e.lineNumbers) return "";
853
+ let t = e.lineNumbers,
854
+ n = [];
855
+ return t.countBy !== void 0 && n.push(`w:countBy="${o(t.countBy)}"`), t.start !== void 0 && n.push(`w:start="${o(t.start)}"`), t.distance !== void 0 && n.push(`w:distance="${o(t.distance)}"`), t.restart && n.push(`w:restart="${t.restart}"`), n.length === 0 ? "" : `<w:lnNumType ${n.join(" ")}/>`;
856
+ }
857
+ function ft(e) {
858
+ if (!e.pageBorders) return "";
859
+ let t = e.pageBorders,
860
+ n = [],
861
+ r = [];
862
+ if (t.display && n.push(`w:display="${t.display}"`), t.offsetFrom && n.push(`w:offsetFrom="${t.offsetFrom}"`), t.zOrder && n.push(`w:zOrder="${t.zOrder}"`), t.top) {
863
+ let s = R(t.top, "top");
864
+ s && r.push(s);
865
+ }
866
+ if (t.left) {
867
+ let s = R(t.left, "left");
868
+ s && r.push(s);
869
+ }
870
+ if (t.bottom) {
871
+ let s = R(t.bottom, "bottom");
872
+ s && r.push(s);
873
+ }
874
+ if (t.right) {
875
+ let s = R(t.right, "right");
876
+ s && r.push(s);
877
+ }
878
+ return r.length === 0 ? "" : `<w:pgBorders${n.length > 0 ? " " + n.join(" ") : ""}>${r.join("")}</w:pgBorders>`;
879
+ }
880
+ function ht(e) {
881
+ if (!e.docGrid) return "";
882
+ let t = e.docGrid,
883
+ n = [];
884
+ return t.type && n.push(`w:type="${t.type}"`), t.linePitch !== void 0 && n.push(`w:linePitch="${t.linePitch}"`), t.charSpace !== void 0 && n.push(`w:charSpace="${t.charSpace}"`), n.length === 0 ? "" : `<w:docGrid ${n.join(" ")}/>`;
885
+ }
886
+ function wt(e) {
887
+ if (!e) return "";
888
+ let t = [];
889
+ if (e.headerReferences) for (let u of e.headerReferences) t.push(it(u));
890
+ if (e.footerReferences) for (let u of e.footerReferences) t.push(ot(u));
891
+ let n = st(e.footnotePr);
892
+ n && t.push(n);
893
+ let r = at(e.endnotePr);
894
+ r && t.push(r), e.sectionStart && t.push(`<w:type w:val="${e.sectionStart}"/>`);
895
+ let i = ct(e);
896
+ i && t.push(i);
897
+ let s = lt(e);
898
+ if (s && t.push(s), e.paperSrcFirst !== void 0 || e.paperSrcOther !== void 0) {
899
+ let u = [];
900
+ e.paperSrcFirst !== void 0 && u.push(`w:first="${e.paperSrcFirst}"`), e.paperSrcOther !== void 0 && u.push(`w:other="${e.paperSrcOther}"`), t.push(`<w:paperSrc ${u.join(" ")}/>`);
901
+ }
902
+ let l = ft(e);
903
+ l && t.push(l);
904
+ let c = ut(e);
905
+ c && t.push(c);
906
+ let p = pt(e);
907
+ p && t.push(p);
908
+ let f = ht(e);
909
+ return f && t.push(f), e.verticalAlign && t.push(`<w:vAlign w:val="${e.verticalAlign}"/>`), e.bidi && t.push("<w:bidi/>"), e.titlePg && t.push("<w:titlePg/>"), e.evenAndOddHeaders && t.push("<w:evenAndOddHeaders/>"), t.length === 0 ? "" : `<w:sectPr>${t.join("")}</w:sectPr>`;
910
+ }
911
+ function we(e) {
912
+ if (e.type === "paragraph") return $(e);
913
+ if (e.type === "table") return S(e);
914
+ if (e.type === "blockSdt") {
915
+ let t = e.content.map(i => we(i)).join(""),
916
+ n = e.properties,
917
+ r = [];
918
+ return n.alias && r.push(`<w:alias w:val="${n.alias}"/>`), n.tag && r.push(`<w:tag w:val="${n.tag}"/>`), `<w:sdt><w:sdtPr>${r.join("")}</w:sdtPr><w:sdtContent>${t}</w:sdtContent></w:sdt>`;
919
+ }
920
+ return "";
921
+ }
922
+ function dt(e) {
923
+ return e.map(t => we(t)).join("");
924
+ }
925
+ function mt(e) {
926
+ let t = [];
927
+ return t.push(dt(e.content)), e.finalSectionProperties && t.push(wt(e.finalSectionProperties)), t.join("");
928
+ }
929
+ function Ut(e) {
930
+ M();
931
+ let t = [];
932
+ t.push('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>');
933
+ let n = rt();
934
+ return t.push(`<w:document ${n} mc:Ignorable="w14 w15 wp14">`), t.push("<w:body>"), t.push(mt(e.package.document)), t.push("</w:body>"), t.push("</w:document>"), t.join("");
935
+ }
936
+ var gt = {
937
+ wpc: "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",
938
+ mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
939
+ o: "urn:schemas-microsoft-com:office:office",
940
+ r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
941
+ m: "http://schemas.openxmlformats.org/officeDocument/2006/math",
942
+ v: "urn:schemas-microsoft-com:vml",
943
+ wp14: "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",
944
+ wp: "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",
945
+ w10: "urn:schemas-microsoft-com:office:word",
946
+ w: "http://schemas.openxmlformats.org/wordprocessingml/2006/main",
947
+ w14: "http://schemas.microsoft.com/office/word/2010/wordml",
948
+ w15: "http://schemas.microsoft.com/office/word/2012/wordml",
949
+ wpg: "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",
950
+ wps: "http://schemas.microsoft.com/office/word/2010/wordprocessingShape"
951
+ };
952
+ function $t() {
953
+ return Object.entries(gt).map(([e, t]) => `xmlns:${e}="${t}"`).join(" ");
954
+ }
955
+ function xt(e) {
956
+ return e.type === "paragraph" ? $(e) : e.type === "table" ? S(e) : "";
957
+ }
958
+ function Zt(e) {
959
+ let t = e.type === "header" ? "w:hdr" : "w:ftr",
960
+ n = $t(),
961
+ r = e.content.map(i => xt(i)).join("");
962
+ return r || (r = "<w:p><w:pPr/></w:p>"), `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
963
+ <${t} ${n}>${r}</${t}>`;
964
+ }
965
+ var I = 'xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"',
966
+ j = 'mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14"';
967
+ function $e(e) {
968
+ let t = "<w:r>",
969
+ n = [];
970
+ e.formatting?.bold && n.push("<w:b/>"), e.formatting?.italic && n.push("<w:i/>"), n.length > 0 && (t += `<w:rPr>${n.join("")}</w:rPr>`);
971
+ for (let r of e.content) if (r.type === "text") {
972
+ let i = r.text !== r.text.trim() || r.text.includes(" ");
973
+ t += i ? `<w:t xml:space="preserve">${a(r.text)}</w:t>` : `<w:t>${a(r.text)}</w:t>`;
974
+ } else r.type === "break" && (t += "<w:br/>");
975
+ return t += "</w:r>", t;
976
+ }
977
+ function de(e, t) {
978
+ let n = t ? `<w:p w14:paraId="${t}">` : "<w:p>";
979
+ for (let r of e.content) r.type === "run" && (n += $e(r));
980
+ return n += "</w:p>", n;
981
+ }
982
+ function me(e, t) {
983
+ let n = t ? `<w:p w14:paraId="${t}">` : "<w:p>";
984
+ n += '<w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r>';
985
+ for (let r of e.content) r.type === "run" && (n += $e(r));
986
+ return n += "</w:p>", n;
987
+ }
988
+ function ge(e, t) {
989
+ let n = (0,chunk_LE67NTCN.a)(),
990
+ r = [`w:id="${e.id}"`];
991
+ if (e.author && r.push(`w:author="${a(e.author)}"`), e.initials ? r.push(`w:initials="${a(e.initials)}"`) : r.push('w:initials=""'), e.date) {
992
+ let s = e.date.replace(/\.\d{3}Z$/, "Z");
993
+ r.push(`w:date="${a(s)}"`);
994
+ }
995
+ let i = `<w:comment ${r.join(" ")}>`;
996
+ if (e.content && e.content.length > 0) {
997
+ if (e.content.length === 1) i += me(e.content[0], n);else {
998
+ i += me(e.content[0]);
999
+ for (let s = 1; s < e.content.length - 1; s++) i += de(e.content[s]);
1000
+ i += de(e.content[e.content.length - 1], n);
1001
+ }
1002
+ } else i += `<w:p w14:paraId="${n}"><w:r><w:rPr><w:rStyle w:val="CommentReference"/></w:rPr><w:annotationRef/></w:r></w:p>`;
1003
+ return i += "</w:comment>", t.push({
1004
+ commentId: e.id,
1005
+ lastParaId: n,
1006
+ durableId: (0,chunk_LE67NTCN.a)(),
1007
+ parentId: e.parentId,
1008
+ done: e.done
1009
+ }), i;
1010
+ }
1011
+ function yt(e) {
1012
+ if (!e || e.length === 0) return {
1013
+ xml: "",
1014
+ paraInfos: []
1015
+ };
1016
+ let t = [],
1017
+ n = [];
1018
+ for (let s of e) (s.parentId == null ? t : n).push(s);
1019
+ let r = [],
1020
+ i = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments ${I} ${j}>`;
1021
+ for (let s of t) i += ge(s, r);
1022
+ for (let s of n) i += ge(s, r);
1023
+ return i += "</w:comments>", {
1024
+ xml: i,
1025
+ paraInfos: r
1026
+ };
1027
+ }
1028
+ function en(e) {
1029
+ return yt(e).xml;
1030
+ }
1031
+ function tn(e) {
1032
+ if (e.length === 0) return "";
1033
+ let t = new Map();
1034
+ for (let r of e) t.set(r.commentId, r.lastParaId);
1035
+ let n = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx ${I} ${j}>`;
1036
+ for (let r of e) {
1037
+ let i = `w15:paraId="${r.lastParaId}" w15:done="${r.done ? "1" : "0"}"`;
1038
+ if (r.parentId != null) {
1039
+ let s = t.get(r.parentId);
1040
+ s && (i += ` w15:paraIdParent="${s}"`);
1041
+ }
1042
+ n += `<w15:commentEx ${i} />`;
1043
+ }
1044
+ return n += "</w15:commentsEx>", n;
1045
+ }
1046
+ function nn(e) {
1047
+ if (e.length === 0) return "";
1048
+ let t = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cid:commentsIds ${I} ${j}>`;
1049
+ for (let n of e) t += `<w16cid:commentId w16cid:paraId="${n.lastParaId}" w16cid:durableId="${n.durableId}" />`;
1050
+ return t += "</w16cid:commentsIds>", t;
1051
+ }
1052
+ function rn(e, t) {
1053
+ if (e.length === 0) return "";
1054
+ let n = new Map();
1055
+ for (let i of t) n.set(i.id, i);
1056
+ let r = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w16cex:commentsExtensible ${I} ${j}>`;
1057
+ for (let i of e) {
1058
+ let s = n.get(i.commentId);
1059
+ if (!s?.date) continue;
1060
+ let l = i.durableId,
1061
+ c = (s.date.endsWith("Z") ? s.date : s.date + "Z").replace(/\.\d{3}Z$/, "Z");
1062
+ r += `<w16cex:commentExtensible w16cex:durableId="${l}" w16cex:dateUtc="${c}"/>`;
1063
+ }
1064
+ return r += "</w16cex:commentsExtensible>", r;
1065
+ }
1066
+
1067
+ // EXTERNAL MODULE: ./node_modules/@eigenpal/docx-editor-core/dist/chunk-6LOYA7G5.mjs
1068
+ var chunk_6LOYA7G5 = __webpack_require__(8423);
1069
+ // EXTERNAL MODULE: ./node_modules/jszip/dist/jszip.min.js
1070
+ var jszip_min = __webpack_require__(4813);
1071
+ ;// ./node_modules/@eigenpal/docx-editor-core/dist/chunk-UCZVMHB5.mjs
1072
+ /* unused harmony import specifier */ var g$1;
1073
+ /* unused harmony import specifier */ var chunk_UCZVMHB5_a;
1074
+ /* unused harmony import specifier */ var chunk_UCZVMHB5_y;
1075
+
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+ var chunk_UCZVMHB5_j = `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1102
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"></Relationships>`;
1103
+ function chunk_UCZVMHB5_E(r) {
1104
+ return r.startsWith("/") ? r.slice(1) : `word/${r}`;
1105
+ }
1106
+ function chunk_UCZVMHB5_P(r) {
1107
+ let e = [{
1108
+ relsPath: "word/_rels/document.xml.rels",
1109
+ blocks: r.package.document.content
1110
+ }],
1111
+ t = r.package.relationships;
1112
+ if (!t) return e;
1113
+ let o$1 = (n, c) => {
1114
+ if (n) for (let [a, s] of n.entries()) {
1115
+ let i = t.get(a);
1116
+ if (!i || i.type !== c || !i.target) continue;
1117
+ let l = chunk_UCZVMHB5_E(i.target).replace(/^word\//, "");
1118
+ e.push({
1119
+ relsPath: `word/_rels/${l}.rels`,
1120
+ blocks: s.content
1121
+ });
1122
+ }
1123
+ };
1124
+ return o$1(r.package.headers, chunk_6LOYA7G5.o.header), o$1(r.package.footers, chunk_6LOYA7G5.o.footer), e;
1125
+ }
1126
+ async function chunk_UCZVMHB5_T(r, e) {
1127
+ let t = r.file(e);
1128
+ return (t ? await t.async("text") : chunk_UCZVMHB5_j).replace(/<Relationships([^>]*)\/>/, "<Relationships$1></Relationships>");
1129
+ }
1130
+ function g(r) {
1131
+ let e = 0;
1132
+ for (let t of r.matchAll(/Id="rId(\d+)"/g)) {
1133
+ let o = parseInt(t[1], 10);
1134
+ o > e && (e = o);
1135
+ }
1136
+ return e;
1137
+ }
1138
+ function D(r, e) {
1139
+ return e || {
1140
+ png: "image/png",
1141
+ jpg: "image/jpeg",
1142
+ jpeg: "image/jpeg",
1143
+ gif: "image/gif",
1144
+ bmp: "image/bmp",
1145
+ tif: "image/tiff",
1146
+ tiff: "image/tiff",
1147
+ svg: "image/svg+xml",
1148
+ webp: "image/webp",
1149
+ wmf: "image/x-wmf",
1150
+ emf: "image/x-emf"
1151
+ }[r] || "application/octet-stream";
1152
+ }
1153
+ function k(r) {
1154
+ let e = [];
1155
+ for (let t of r) if (t.type === "paragraph") {
1156
+ for (let o of t.content) if (o.type === "run") for (let n of o.content) n.type === "drawing" && n.image.src?.startsWith("data:") && e.push(n.image);
1157
+ } else if (t.type === "table") for (let o of t.rows) for (let n of o.cells) e.push(...k(n.content));
1158
+ return e;
1159
+ }
1160
+ var chunk_UCZVMHB5_W = {
1161
+ "image/png": "png",
1162
+ "image/jpeg": "jpeg",
1163
+ "image/gif": "gif",
1164
+ "image/bmp": "bmp",
1165
+ "image/tiff": "tiff",
1166
+ "image/webp": "webp",
1167
+ "image/svg+xml": "svg"
1168
+ };
1169
+ function chunk_UCZVMHB5_z(r) {
1170
+ let e = r.match(/^data:([^;]+);base64,(.+)$/);
1171
+ if (!e) throw new Error("Invalid data URL");
1172
+ let t = atob(e[2]),
1173
+ o = new Uint8Array(t.length);
1174
+ for (let n = 0; n < t.length; n++) o[n] = t.charCodeAt(n);
1175
+ return {
1176
+ data: o.buffer,
1177
+ extension: chunk_UCZVMHB5_W[e[1]] || "png"
1178
+ };
1179
+ }
1180
+ async function chunk_UCZVMHB5_q(r, e, t) {
1181
+ if (e.size === 0) return;
1182
+ let o = r.file("[Content_Types].xml");
1183
+ if (!o) return;
1184
+ let n = await o.async("text"),
1185
+ c = false;
1186
+ for (let a of e) if (!n.includes(`Extension="${a}"`)) {
1187
+ let s = D(a, "");
1188
+ n = n.replace("</Types>", `<Default Extension="${a}" ContentType="${s}"/></Types>`), c = true;
1189
+ }
1190
+ c && r.file("[Content_Types].xml", n, {
1191
+ compression: "DEFLATE",
1192
+ compressionOptions: {
1193
+ level: t
1194
+ }
1195
+ });
1196
+ }
1197
+ function chunk_UCZVMHB5_V(r) {
1198
+ let e = 0;
1199
+ return r.forEach(t => {
1200
+ let o = t.match(/^word\/media\/image(\d+)\./);
1201
+ if (o) {
1202
+ let n = parseInt(o[1], 10);
1203
+ n > e && (e = n);
1204
+ }
1205
+ }), e;
1206
+ }
1207
+ async function A(r, e, t) {
1208
+ let o$1 = chunk_UCZVMHB5_V(e),
1209
+ n = new Set();
1210
+ for (let {
1211
+ relsPath: c,
1212
+ blocks: a
1213
+ } of r) {
1214
+ let s = k(a);
1215
+ if (s.length === 0) continue;
1216
+ let i = await chunk_UCZVMHB5_T(e, c),
1217
+ p = g(i),
1218
+ l = [];
1219
+ for (let d of s) {
1220
+ let {
1221
+ data: u,
1222
+ extension: x
1223
+ } = chunk_UCZVMHB5_z(d.src);
1224
+ o$1++, p++;
1225
+ let v = `image${o$1}.${x}`,
1226
+ R = `rId${p}`;
1227
+ e.file(`word/media/${v}`, u, {
1228
+ compression: "DEFLATE",
1229
+ compressionOptions: {
1230
+ level: t
1231
+ }
1232
+ }), l.push(`<Relationship Id="${R}" Type="${chunk_6LOYA7G5.o.image}" Target="media/${v}"/>`), n.add(x), d.rId = R;
1233
+ }
1234
+ let m = i.replace("</Relationships>", l.join("") + "</Relationships>");
1235
+ e.file(c, m, {
1236
+ compression: "DEFLATE",
1237
+ compressionOptions: {
1238
+ level: t
1239
+ }
1240
+ });
1241
+ }
1242
+ await chunk_UCZVMHB5_q(e, n, t);
1243
+ }
1244
+ function chunk_UCZVMHB5_S(r) {
1245
+ let e = [];
1246
+ for (let t of r) if (t.type === "paragraph") for (let o of t.content) o.type === "hyperlink" && o.href && !o.rId && !o.anchor && e.push(o);else if (t.type === "table") for (let o of t.rows) for (let n of o.cells) e.push(...chunk_UCZVMHB5_S(n.content));
1247
+ return e;
1248
+ }
1249
+ async function chunk_UCZVMHB5_I(r, e, t) {
1250
+ for (let {
1251
+ relsPath: o$1,
1252
+ blocks: n
1253
+ } of r) {
1254
+ let c = chunk_UCZVMHB5_S(n);
1255
+ if (c.length === 0) continue;
1256
+ let a$1 = await chunk_UCZVMHB5_T(e, o$1),
1257
+ s = g(a$1),
1258
+ i = [];
1259
+ for (let l of c) {
1260
+ s++;
1261
+ let m = `rId${s}`;
1262
+ i.push(`<Relationship Id="${m}" Type="${chunk_6LOYA7G5.o.hyperlink}" Target="${a(l.href)}" TargetMode="External"/>`), l.rId = m;
1263
+ }
1264
+ let p = a$1.replace("</Relationships>", i.join("") + "</Relationships>");
1265
+ e.file(o$1, p, {
1266
+ compression: "DEFLATE",
1267
+ compressionOptions: {
1268
+ level: t
1269
+ }
1270
+ });
1271
+ }
1272
+ }
1273
+ var chunk_UCZVMHB5_G = "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",
1274
+ chunk_UCZVMHB5_K = "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",
1275
+ chunk_UCZVMHB5_L = "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",
1276
+ X = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml",
1277
+ chunk_UCZVMHB5_Z = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml",
1278
+ chunk_UCZVMHB5_H = "application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtensible+xml";
1279
+ async function chunk_UCZVMHB5_O(r, e, t) {
1280
+ let o$1 = r.package.relationships;
1281
+ if (!o$1) return;
1282
+ let n = [];
1283
+ for (let [p, l] of o$1) {
1284
+ if (!l.target) continue;
1285
+ let m = l.type === chunk_6LOYA7G5.o.header ? chunk_UCZVMHB5_G : l.type === chunk_6LOYA7G5.o.footer ? chunk_UCZVMHB5_K : null;
1286
+ m && n.push({
1287
+ rId: p,
1288
+ target: l.target.replace(/^(\/?word\/)/, ""),
1289
+ contentType: m,
1290
+ relType: l.type
1291
+ });
1292
+ }
1293
+ if (n.length === 0) return;
1294
+ let c = e.file("[Content_Types].xml");
1295
+ if (c) {
1296
+ let p = await c.async("text"),
1297
+ l = false;
1298
+ for (let {
1299
+ target: m,
1300
+ contentType: d
1301
+ } of n) {
1302
+ let u = `/word/${m}`;
1303
+ p.includes(`PartName="${u}"`) || (p = p.replace("</Types>", `<Override PartName="${u}" ContentType="${d}"/></Types>`), l = true);
1304
+ }
1305
+ l && e.file("[Content_Types].xml", p, {
1306
+ compression: "DEFLATE",
1307
+ compressionOptions: {
1308
+ level: t
1309
+ }
1310
+ });
1311
+ }
1312
+ let a = "word/_rels/document.xml.rels",
1313
+ s = await chunk_UCZVMHB5_T(e, a),
1314
+ i = false;
1315
+ for (let {
1316
+ rId: p,
1317
+ relType: l,
1318
+ target: m
1319
+ } of n) s.includes(`Id="${p}"`) || (s = s.replace("</Relationships>", `<Relationship Id="${p}" Type="${l}" Target="${m}"/></Relationships>`), i = true);
1320
+ i && e.file(a, s, {
1321
+ compression: "DEFLATE",
1322
+ compressionOptions: {
1323
+ level: t
1324
+ }
1325
+ });
1326
+ }
1327
+ async function chunk_UCZVMHB5_Q(r, e) {
1328
+ let t = [{
1329
+ partName: "/word/comments.xml",
1330
+ contentType: chunk_UCZVMHB5_L,
1331
+ target: "comments.xml",
1332
+ relType: chunk_6LOYA7G5.o.comments
1333
+ }, {
1334
+ partName: "/word/commentsExtended.xml",
1335
+ contentType: X,
1336
+ target: "commentsExtended.xml",
1337
+ relType: chunk_6LOYA7G5.o.commentsExtended
1338
+ }, {
1339
+ partName: "/word/commentsIds.xml",
1340
+ contentType: chunk_UCZVMHB5_Z,
1341
+ target: "commentsIds.xml",
1342
+ relType: chunk_6LOYA7G5.o.commentsIds
1343
+ }, {
1344
+ partName: "/word/commentsExtensible.xml",
1345
+ contentType: chunk_UCZVMHB5_H,
1346
+ target: "commentsExtensible.xml",
1347
+ relType: chunk_6LOYA7G5.o.commentsExtensible
1348
+ }],
1349
+ o$1 = r.file("[Content_Types].xml");
1350
+ if (o$1) {
1351
+ let a = await o$1.async("text"),
1352
+ s = false;
1353
+ for (let {
1354
+ partName: i,
1355
+ contentType: p
1356
+ } of t) a.includes(i) || (a = a.replace("</Types>", `<Override PartName="${i}" ContentType="${p}"/></Types>`), s = true);
1357
+ s && r.file("[Content_Types].xml", a, {
1358
+ compression: "DEFLATE",
1359
+ compressionOptions: {
1360
+ level: e
1361
+ }
1362
+ });
1363
+ }
1364
+ let n = "word/_rels/document.xml.rels",
1365
+ c = r.file(n);
1366
+ if (c) {
1367
+ let a = await c.async("text"),
1368
+ s = false;
1369
+ for (let {
1370
+ target: i,
1371
+ relType: p
1372
+ } of t) if (!a.includes(i)) {
1373
+ let l = `rId${g(a) + 1}`;
1374
+ a = a.replace("</Relationships>", `<Relationship Id="${l}" Type="${p}" Target="${i}"/></Relationships>`), s = true;
1375
+ }
1376
+ s && r.file(n, a, {
1377
+ compression: "DEFLATE",
1378
+ compressionOptions: {
1379
+ level: e
1380
+ }
1381
+ });
1382
+ }
1383
+ }
1384
+ async function b(r, e, t) {
1385
+ let o = r.package.document.comments;
1386
+ if (!o || o.length === 0) return;
1387
+ let {
1388
+ xml: n,
1389
+ paraInfos: c
1390
+ } = yt(o);
1391
+ e.file("word/comments.xml", n, {
1392
+ compression: "DEFLATE",
1393
+ compressionOptions: {
1394
+ level: t
1395
+ }
1396
+ });
1397
+ let a = tn(c);
1398
+ a && e.file("word/commentsExtended.xml", a, {
1399
+ compression: "DEFLATE",
1400
+ compressionOptions: {
1401
+ level: t
1402
+ }
1403
+ });
1404
+ let s = nn(c);
1405
+ s && e.file("word/commentsIds.xml", s, {
1406
+ compression: "DEFLATE",
1407
+ compressionOptions: {
1408
+ level: t
1409
+ }
1410
+ });
1411
+ let i$1 = rn(c, o);
1412
+ i$1 && e.file("word/commentsExtensible.xml", i$1, {
1413
+ compression: "DEFLATE",
1414
+ compressionOptions: {
1415
+ level: t
1416
+ }
1417
+ }), await chunk_UCZVMHB5_Q(e, t);
1418
+ }
1419
+ function chunk_UCZVMHB5_U(r) {
1420
+ let e = new Map(),
1421
+ t = r.package.relationships;
1422
+ if (!t) return e;
1423
+ let o$1 = [{
1424
+ map: r.package.headers,
1425
+ type: chunk_6LOYA7G5.o.header
1426
+ }, {
1427
+ map: r.package.footers,
1428
+ type: chunk_6LOYA7G5.o.footer
1429
+ }];
1430
+ for (let {
1431
+ map: n,
1432
+ type: c
1433
+ } of o$1) if (n) for (let [a, s] of n.entries()) {
1434
+ let i = t.get(a);
1435
+ i && i.type === c && i.target && e.set(chunk_UCZVMHB5_E(i.target), Zt(s));
1436
+ }
1437
+ return e;
1438
+ }
1439
+ function F(r, e, t) {
1440
+ let o = {
1441
+ level: t
1442
+ };
1443
+ for (let [n, c] of chunk_UCZVMHB5_U(r)) e.file(n, c, {
1444
+ compression: "DEFLATE",
1445
+ compressionOptions: o
1446
+ });
1447
+ }
1448
+ async function C() {
1449
+ let r = new jszip_min();
1450
+ r.file("[Content_Types].xml", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1451
+ <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
1452
+ <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
1453
+ <Default Extension="xml" ContentType="application/xml"/>
1454
+ <Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/>
1455
+ <Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/>
1456
+ <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
1457
+ <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/>
1458
+ </Types>`), r.file("_rels/.rels", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1459
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
1460
+ <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/>
1461
+ <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>
1462
+ <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
1463
+ </Relationships>`), r.file("word/_rels/document.xml.rels", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1464
+ <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
1465
+ <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>
1466
+ </Relationships>`), r.file("word/document.xml", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1467
+ <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
1468
+ <w:body>
1469
+ <w:p>
1470
+ <w:r>
1471
+ <w:t></w:t>
1472
+ </w:r>
1473
+ </w:p>
1474
+ <w:sectPr>
1475
+ <w:pgSz w:w="12240" w:h="15840"/>
1476
+ <w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
1477
+ </w:sectPr>
1478
+ </w:body>
1479
+ </w:document>`), r.file("word/styles.xml", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1480
+ <w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
1481
+ <w:docDefaults>
1482
+ <w:rPrDefault>
1483
+ <w:rPr>
1484
+ <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
1485
+ <w:sz w:val="22"/>
1486
+ </w:rPr>
1487
+ </w:rPrDefault>
1488
+ <w:pPrDefault>
1489
+ <w:pPr>
1490
+ <w:spacing w:after="200" w:line="276" w:lineRule="auto"/>
1491
+ </w:pPr>
1492
+ </w:pPrDefault>
1493
+ </w:docDefaults>
1494
+ <w:style w:type="paragraph" w:default="1" w:styleId="Normal">
1495
+ <w:name w:val="Normal"/>
1496
+ </w:style>
1497
+ </w:styles>`);
1498
+ let e = new Date().toISOString();
1499
+ return r.file("docProps/core.xml", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1500
+ <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1501
+ <dc:creator>EigenPal DOCX Editor</dc:creator>
1502
+ <dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created>
1503
+ <dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified>
1504
+ </cp:coreProperties>`), r.file("docProps/app.xml", `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1505
+ <Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties">
1506
+ <Application>EigenPal DOCX Editor</Application>
1507
+ <AppVersion>1.0.0</AppVersion>
1508
+ </Properties>`), r.generateAsync({
1509
+ type: "arraybuffer",
1510
+ compression: "DEFLATE",
1511
+ compressionOptions: {
1512
+ level: 6
1513
+ }
1514
+ });
1515
+ }
1516
+ async function chunk_UCZVMHB5_J(r, e = {}) {
1517
+ if (!r.originalBuffer) throw new Error("Cannot repack document: no original buffer for round-trip. Use createDocx() for new documents.");
1518
+ let {
1519
+ compressionLevel: t = 6,
1520
+ updateModifiedDate: o = true,
1521
+ modifiedBy: n
1522
+ } = e,
1523
+ c = r,
1524
+ a = await jszip_min.loadAsync(r.originalBuffer),
1525
+ s = new jszip_min();
1526
+ for (let [m, d] of Object.entries(a.files)) {
1527
+ if (d.dir) {
1528
+ s.folder(m.replace(/\/$/, ""));
1529
+ continue;
1530
+ }
1531
+ let u = await d.async("arraybuffer");
1532
+ s.file(m, u, {
1533
+ compression: "DEFLATE",
1534
+ compressionOptions: {
1535
+ level: t
1536
+ }
1537
+ });
1538
+ }
1539
+ let i = chunk_UCZVMHB5_P(c);
1540
+ await A(i, s, t), await chunk_UCZVMHB5_I(i, s, t);
1541
+ let p = Ut(c);
1542
+ if (s.file("word/document.xml", p, {
1543
+ compression: "DEFLATE",
1544
+ compressionOptions: {
1545
+ level: t
1546
+ }
1547
+ }), F(c, s, t), await chunk_UCZVMHB5_O(c, s, t), await b(c, s, t), o) {
1548
+ let m = "docProps/core.xml",
1549
+ d = a.file(m);
1550
+ if (d) {
1551
+ let u = await d.async("text"),
1552
+ x = chunk_UCZVMHB5_Y(u, {
1553
+ updateModifiedDate: o,
1554
+ modifiedBy: n
1555
+ });
1556
+ s.file(m, x, {
1557
+ compression: "DEFLATE",
1558
+ compressionOptions: {
1559
+ level: t
1560
+ }
1561
+ });
1562
+ }
1563
+ }
1564
+ return await s.generateAsync({
1565
+ type: "arraybuffer",
1566
+ compression: "DEFLATE",
1567
+ compressionOptions: {
1568
+ level: t
1569
+ }
1570
+ });
1571
+ }
1572
+ async function chunk_UCZVMHB5_be(r, e, t = {}) {
1573
+ let {
1574
+ compressionLevel: o = 6,
1575
+ updateModifiedDate: n = true,
1576
+ modifiedBy: c
1577
+ } = t,
1578
+ a = r,
1579
+ s = new chunk_UCZVMHB5_y();
1580
+ for (let [m, d] of Object.entries(e.originalZip.files)) {
1581
+ if (d.dir) {
1582
+ s.folder(m.replace(/\/$/, ""));
1583
+ continue;
1584
+ }
1585
+ let u = await d.async("arraybuffer");
1586
+ s.file(m, u, {
1587
+ compression: "DEFLATE",
1588
+ compressionOptions: {
1589
+ level: o
1590
+ }
1591
+ });
1592
+ }
1593
+ let i = chunk_UCZVMHB5_P(a);
1594
+ await A(i, s, o), await chunk_UCZVMHB5_I(i, s, o);
1595
+ let p = g$1(a);
1596
+ if (s.file("word/document.xml", p, {
1597
+ compression: "DEFLATE",
1598
+ compressionOptions: {
1599
+ level: o
1600
+ }
1601
+ }), F(a, s, o), await chunk_UCZVMHB5_O(a, s, o), await b(a, s, o), n && e.corePropsXml) {
1602
+ let m = chunk_UCZVMHB5_Y(e.corePropsXml, {
1603
+ updateModifiedDate: n,
1604
+ modifiedBy: c
1605
+ });
1606
+ s.file("docProps/core.xml", m, {
1607
+ compression: "DEFLATE",
1608
+ compressionOptions: {
1609
+ level: o
1610
+ }
1611
+ });
1612
+ }
1613
+ return await s.generateAsync({
1614
+ type: "arraybuffer",
1615
+ compression: "DEFLATE",
1616
+ compressionOptions: {
1617
+ level: o
1618
+ }
1619
+ });
1620
+ }
1621
+ async function chunk_UCZVMHB5_Fe(r, e, t = {}) {
1622
+ let {
1623
+ compressionLevel: o = 6
1624
+ } = t,
1625
+ n = await chunk_UCZVMHB5_y.loadAsync(r);
1626
+ return n.file("word/document.xml", e, {
1627
+ compression: "DEFLATE",
1628
+ compressionOptions: {
1629
+ level: o
1630
+ }
1631
+ }), n.generateAsync({
1632
+ type: "arraybuffer",
1633
+ compression: "DEFLATE",
1634
+ compressionOptions: {
1635
+ level: o
1636
+ }
1637
+ });
1638
+ }
1639
+ async function chunk_UCZVMHB5_Ce(r, e, t, o = {}) {
1640
+ let {
1641
+ compressionLevel: n = 6
1642
+ } = o,
1643
+ c = await chunk_UCZVMHB5_y.loadAsync(r);
1644
+ return c.file(e, t, {
1645
+ compression: "DEFLATE",
1646
+ compressionOptions: {
1647
+ level: n
1648
+ }
1649
+ }), c.generateAsync({
1650
+ type: "arraybuffer",
1651
+ compression: "DEFLATE",
1652
+ compressionOptions: {
1653
+ level: n
1654
+ }
1655
+ });
1656
+ }
1657
+ async function chunk_UCZVMHB5_ve(r, e, t = {}) {
1658
+ let o = await chunk_UCZVMHB5_y.loadAsync(r);
1659
+ return chunk_UCZVMHB5_te(o, e, t);
1660
+ }
1661
+ async function chunk_UCZVMHB5_te(r, e, t = {}) {
1662
+ let {
1663
+ compressionLevel: o = 6
1664
+ } = t;
1665
+ for (let [n, c] of e) r.file(n, c, {
1666
+ compression: "DEFLATE",
1667
+ compressionOptions: {
1668
+ level: o
1669
+ }
1670
+ });
1671
+ return r.generateAsync({
1672
+ type: "arraybuffer",
1673
+ compression: "DEFLATE",
1674
+ compressionOptions: {
1675
+ level: o
1676
+ }
1677
+ });
1678
+ }
1679
+ async function chunk_UCZVMHB5_oe(r, e) {
1680
+ let t = await chunk_UCZVMHB5_y.loadAsync(r),
1681
+ o = "word/_rels/document.xml.rels",
1682
+ n = t.file(o);
1683
+ if (!n) throw new Error("document.xml.rels not found in DOCX");
1684
+ let c = await n.async("text"),
1685
+ a$1 = `rId${g(c) + 1}`,
1686
+ s = e.targetMode === "External" ? ' TargetMode="External"' : "",
1687
+ i = `<Relationship Id="${a$1}" Type="${e.type}" Target="${chunk_UCZVMHB5_a(e.target)}"${s}/>`,
1688
+ p = c.replace("</Relationships>", `${i}</Relationships>`);
1689
+ return t.file(o, p), {
1690
+ buffer: await t.generateAsync({
1691
+ type: "arraybuffer",
1692
+ compression: "DEFLATE",
1693
+ compressionOptions: {
1694
+ level: 6
1695
+ }
1696
+ }),
1697
+ rId: a$1
1698
+ };
1699
+ }
1700
+ async function chunk_UCZVMHB5_Re(r, e, t, o) {
1701
+ let n = await chunk_UCZVMHB5_y.loadAsync(r),
1702
+ c = `word/media/${e}`;
1703
+ n.file(c, t);
1704
+ let a = await chunk_UCZVMHB5_oe(await n.generateAsync({
1705
+ type: "arraybuffer"
1706
+ }), {
1707
+ type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
1708
+ target: `media/${e}`
1709
+ }),
1710
+ s = n.file("[Content_Types].xml");
1711
+ if (s) {
1712
+ let i = await s.async("text"),
1713
+ p = e.split(".").pop()?.toLowerCase() || "";
1714
+ if (!i.includes(`Extension="${p}"`) && p) {
1715
+ let m = D(p, o),
1716
+ d = `<Default Extension="${p}" ContentType="${m}"/>`,
1717
+ u = i.replace("</Types>", `${d}</Types>`),
1718
+ x = await chunk_UCZVMHB5_y.loadAsync(a.buffer);
1719
+ return x.file("[Content_Types].xml", u), {
1720
+ buffer: await x.generateAsync({
1721
+ type: "arraybuffer",
1722
+ compression: "DEFLATE",
1723
+ compressionOptions: {
1724
+ level: 6
1725
+ }
1726
+ }),
1727
+ rId: a.rId,
1728
+ path: c
1729
+ };
1730
+ }
1731
+ }
1732
+ return {
1733
+ buffer: a.buffer,
1734
+ rId: a.rId,
1735
+ path: c
1736
+ };
1737
+ }
1738
+ function chunk_UCZVMHB5_Y(r, e) {
1739
+ let t = r;
1740
+ if (e.updateModifiedDate) {
1741
+ let o = new Date().toISOString();
1742
+ t.includes("<dcterms:modified") ? t = t.replace(/<dcterms:modified[^>]*>[^<]*<\/dcterms:modified>/, `<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified>`) : t = t.replace("</cp:coreProperties>", `<dcterms:modified xsi:type="dcterms:W3CDTF">${o}</dcterms:modified></cp:coreProperties>`);
1743
+ }
1744
+ return e.modifiedBy && (t.includes("<cp:lastModifiedBy") ? t = t.replace(/<cp:lastModifiedBy>[^<]*<\/cp:lastModifiedBy>/, `<cp:lastModifiedBy>${a(e.modifiedBy)}</cp:lastModifiedBy>`) : t = t.replace("</cp:coreProperties>", `<cp:lastModifiedBy>${a(e.modifiedBy)}</cp:lastModifiedBy></cp:coreProperties>`)), t;
1745
+ }
1746
+ async function chunk_UCZVMHB5_Me(r) {
1747
+ let e = [],
1748
+ t = [];
1749
+ try {
1750
+ let o = await chunk_UCZVMHB5_y.loadAsync(r),
1751
+ n = ["[Content_Types].xml", "word/document.xml"];
1752
+ for (let i of n) o.file(i) || e.push(`Missing required file: ${i}`);
1753
+ let c = ["_rels/.rels", "word/_rels/document.xml.rels", "word/styles.xml"];
1754
+ for (let i of c) o.file(i) || t.push(`Missing recommended file: ${i}`);
1755
+ let a = o.file("word/document.xml");
1756
+ if (a) {
1757
+ let i = await a.async("text");
1758
+ i.includes("<?xml") || t.push("document.xml missing XML declaration"), i.includes("<w:document") || e.push("document.xml missing w:document element"), i.includes("<w:body>") || e.push("document.xml missing w:body element");
1759
+ }
1760
+ let s = o.file("[Content_Types].xml");
1761
+ if (s) {
1762
+ let i = await s.async("text");
1763
+ !i.includes("word/document.xml") && !i.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml") && t.push("Content_Types.xml may be missing document.xml type declaration");
1764
+ }
1765
+ } catch (o) {
1766
+ e.push(`Failed to read as ZIP: ${o instanceof Error ? o.message : "Unknown error"}`);
1767
+ }
1768
+ return {
1769
+ valid: e.length === 0,
1770
+ errors: e,
1771
+ warnings: t
1772
+ };
1773
+ }
1774
+ function chunk_UCZVMHB5_Ne(r) {
1775
+ if (r.byteLength < 4) return false;
1776
+ let e = new Uint8Array(r);
1777
+ return e[0] === 80 && e[1] === 75;
1778
+ }
1779
+ async function chunk_UCZVMHB5_e(r) {
1780
+ let e = await C(),
1781
+ t = {
1782
+ ...r,
1783
+ originalBuffer: e
1784
+ };
1785
+ return chunk_UCZVMHB5_J(t);
1786
+ }
1787
+ var chunk_UCZVMHB5_$e = (/* unused pure expression or super */ null && (chunk_UCZVMHB5_J));
1788
+
1789
+ ;// ./node_modules/@eigenpal/docx-editor-core/dist/docx/rezip.mjs
1790
+
1791
+
1792
+
1793
+
1794
+
1795
+
1796
+ /***/ })
1797
+
1798
+ }]);