ranui 0.1.1-alpha.8 → 0.1.1-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/add-user.98b805f1.js +0 -1
  2. package/dist/book.c3235430.js +0 -1
  3. package/dist/check-circle-fill.0a9e8a28.js +0 -1
  4. package/dist/check-circle.711c4f31.js +0 -1
  5. package/dist/close-circle-fill.726bf59c.js +0 -1
  6. package/dist/close-circle.dda355df.js +0 -1
  7. package/dist/close.9954c08c.js +0 -1
  8. package/dist/components/button/index.d.ts +3 -0
  9. package/dist/components/preview/docx.d.ts +8 -0
  10. package/dist/components/preview/index.d.ts +2 -0
  11. package/dist/components/preview/pdf.d.ts +1 -0
  12. package/dist/components/preview/pptx/colz.d.ts +70 -0
  13. package/dist/components/preview/pptx/index.d.ts +16 -0
  14. package/dist/components/preview/pptx/process_pptx.d.ts +23 -0
  15. package/dist/components/preview/pptx/t_xml.d.ts +1 -0
  16. package/dist/docx.f485e17e.js +2633 -0
  17. package/dist/eye-close.a954b46e.js +0 -1
  18. package/dist/eye.c904f80b.js +0 -1
  19. package/dist/home.f5970edc.js +0 -1
  20. package/dist/index.6f308b40.js +22218 -0
  21. package/dist/index.9f799c47.js +1478 -0
  22. package/dist/index.d.ts +9 -0
  23. package/dist/index.js +11 -1229
  24. package/dist/index.umd.cjs +12 -2
  25. package/dist/info-circle-fill.9dfc3b5e.js +0 -1
  26. package/dist/info-circle.718e6ac4.js +0 -1
  27. package/dist/jszip.min.50449320.js +2658 -0
  28. package/dist/loading.876d0293.js +0 -1
  29. package/dist/lock.26244026.js +0 -1
  30. package/dist/message.5379338a.js +0 -1
  31. package/dist/pdf.51be4380.js +112 -0
  32. package/dist/power-off.050e4c26.js +0 -1
  33. package/dist/preview.de4d53cc.js +0 -1
  34. package/dist/setting.7917f3b2.js +0 -1
  35. package/dist/style.css +1 -1
  36. package/dist/team.b3a3196b.js +0 -1
  37. package/dist/typings.d.ts +1 -0
  38. package/dist/unlock.1e7bed93.js +0 -1
  39. package/dist/user.21cfbfa6.js +0 -1
  40. package/dist/utils/index.d.ts +3 -0
  41. package/dist/warning-circle-fill.b87fec04.js +0 -1
  42. package/dist/warning-circle.b1792bd4.js +0 -1
  43. package/package.json +10 -34
  44. package/readme.md +0 -1
  45. package/dist/add-user.98b805f1.js.map +0 -1
  46. package/dist/book.c3235430.js.map +0 -1
  47. package/dist/check-circle-fill.0a9e8a28.js.map +0 -1
  48. package/dist/check-circle.711c4f31.js.map +0 -1
  49. package/dist/close-circle-fill.726bf59c.js.map +0 -1
  50. package/dist/close-circle.dda355df.js.map +0 -1
  51. package/dist/close.9954c08c.js.map +0 -1
  52. package/dist/component.d.ts +0 -0
  53. package/dist/eye-close.a954b46e.js.map +0 -1
  54. package/dist/eye.c904f80b.js.map +0 -1
  55. package/dist/home.f5970edc.js.map +0 -1
  56. package/dist/index.js.map +0 -1
  57. package/dist/index.umd.cjs.map +0 -1
  58. package/dist/info-circle-fill.9dfc3b5e.js.map +0 -1
  59. package/dist/info-circle.718e6ac4.js.map +0 -1
  60. package/dist/loading.876d0293.js.map +0 -1
  61. package/dist/lock.26244026.js.map +0 -1
  62. package/dist/message.5379338a.js.map +0 -1
  63. package/dist/power-off.050e4c26.js.map +0 -1
  64. package/dist/preview.de4d53cc.js.map +0 -1
  65. package/dist/setting.7917f3b2.js.map +0 -1
  66. package/dist/team.b3a3196b.js.map +0 -1
  67. package/dist/unlock.1e7bed93.js.map +0 -1
  68. package/dist/user.21cfbfa6.js.map +0 -1
  69. package/dist/warning-circle-fill.b87fec04.js.map +0 -1
  70. package/dist/warning-circle.b1792bd4.js.map +0 -1
@@ -0,0 +1,2633 @@
1
+ import { r as requireJszip_min } from "./jszip.min.50449320.js";
2
+ var docxPreview_min = { exports: {} };
3
+ (function(module, exports) {
4
+ !function(e, t) {
5
+ module.exports = t(requireJszip_min());
6
+ }(globalThis, (e) => (() => {
7
+ var t = { 438: (e2, t2, r2) => {
8
+ r2.r(t2), r2.d(t2, { default: () => d });
9
+ var a2 = r2(537), s = r2.n(a2), n = r2(645), l = r2.n(n), o = r2(806), i = r2.n(o), c = new URL(r2(583), r2.b), u = l()(s()), p = i()(c);
10
+ u.push([e2.id, `@namespace "http://www.w3.org/1998/Math/MathML";math{display:inline-block;line-height:initial}mfrac{display:inline-block;vertical-align:-50%;text-align:center}mfrac>:first-child{border-bottom:solid thin currentColor}mfrac>*{display:block}msub>:nth-child(2){font-size:smaller;vertical-align:sub}msup>:nth-child(2){font-size:smaller;vertical-align:super}munder,mover,munderover{display:inline-flex;flex-flow:column nowrap;vertical-align:middle;text-align:center}munder>:not(:first-child),mover>:not(:first-child),munderover>:not(:first-child){font-size:smaller}munderover>:last-child{order:-1}mroot,msqrt{position:relative;display:inline-block;border-top:solid thin currentColor;margin-top:.5px;vertical-align:middle;margin-left:1ch}mroot:before,msqrt:before{content:"";display:inline-block;position:absolute;width:1ch;left:-1ch;top:-1px;bottom:0;background-image:url(${p})}`, "", { version: 3, sources: ["webpack://./src/mathml.scss"], names: [], mappings: "AAAA,+CAAA,CAEA,KACI,oBAAA,CACA,mBAAA,CAGJ,MACI,oBAAA,CACA,mBAAA,CACA,iBAAA,CAEA,mBACI,qCAAA,CAGJ,QACI,aAAA,CAKJ,mBACI,iBAAA,CACA,kBAAA,CAKJ,mBACI,iBAAA,CACA,oBAAA,CAIR,wBACI,mBAAA,CACA,uBAAA,CACA,qBAAA,CACA,iBAAA,CAEA,iFACI,iBAAA,CAKJ,uBAAA,QAAA,CAGJ,YACI,iBAAA,CACA,oBAAA,CACA,kCAAA,CACA,eAAA,CACA,qBAAA,CACA,eAAA,CAEA,0BACI,UAAA,CACA,oBAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CACA,QAAA,CACA,QAAA,CACA,wDAAA", sourcesContent: [`@namespace "http://www.w3.org/1998/Math/MathML";\r
11
+ \r
12
+ math {\r
13
+ display: inline-block;\r
14
+ line-height: initial;\r
15
+ }\r
16
+ \r
17
+ mfrac {\r
18
+ display: inline-block;\r
19
+ vertical-align: -50%;\r
20
+ text-align: center;\r
21
+ \r
22
+ &>:first-child {\r
23
+ border-bottom: solid thin currentColor;\r
24
+ }\r
25
+ \r
26
+ &>* {\r
27
+ display: block;\r
28
+ }\r
29
+ }\r
30
+ \r
31
+ msub {\r
32
+ &>:nth-child(2) {\r
33
+ font-size: smaller;\r
34
+ vertical-align: sub;\r
35
+ }\r
36
+ }\r
37
+ \r
38
+ msup {\r
39
+ &>:nth-child(2) {\r
40
+ font-size: smaller;\r
41
+ vertical-align: super;\r
42
+ }\r
43
+ }\r
44
+ \r
45
+ munder, mover, munderover {\r
46
+ display: inline-flex;\r
47
+ flex-flow: column nowrap;\r
48
+ vertical-align: middle;\r
49
+ text-align: center;\r
50
+ \r
51
+ &>:not(:first-child) {\r
52
+ font-size: smaller;\r
53
+ }\r
54
+ }\r
55
+ \r
56
+ munderover {\r
57
+ &>:last-child { order: -1; }\r
58
+ }\r
59
+ \r
60
+ mroot, msqrt {\r
61
+ position: relative;\r
62
+ display: inline-block;\r
63
+ border-top: solid thin currentColor; \r
64
+ margin-top: 0.5px;\r
65
+ vertical-align: middle; \r
66
+ margin-left: 1ch; \r
67
+ \r
68
+ &:before {\r
69
+ content: "";\r
70
+ display: inline-block;\r
71
+ position: absolute;\r
72
+ width: 1ch;\r
73
+ left: -1ch;\r
74
+ top: -1px;\r
75
+ bottom: 0;\r
76
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 100' preserveAspectRatio='none'%3E%3Cpath d='m0,75 l5,0 l5,25 l10,-100' stroke='black' fill='none' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");\r
77
+ }\r
78
+ }`], sourceRoot: "" }]);
79
+ const d = u.toString();
80
+ }, 645: (e2) => {
81
+ e2.exports = function(e3) {
82
+ var t2 = [];
83
+ return t2.toString = function() {
84
+ return this.map(function(t3) {
85
+ var r2 = "", a2 = void 0 !== t3[5];
86
+ return t3[4] && (r2 += "@supports (".concat(t3[4], ") {")), t3[2] && (r2 += "@media ".concat(t3[2], " {")), a2 && (r2 += "@layer".concat(t3[5].length > 0 ? " ".concat(t3[5]) : "", " {")), r2 += e3(t3), a2 && (r2 += "}"), t3[2] && (r2 += "}"), t3[4] && (r2 += "}"), r2;
87
+ }).join("");
88
+ }, t2.i = function(e4, r2, a2, s, n) {
89
+ "string" == typeof e4 && (e4 = [[null, e4, void 0]]);
90
+ var l = {};
91
+ if (a2)
92
+ for (var o = 0; o < this.length; o++) {
93
+ var i = this[o][0];
94
+ null != i && (l[i] = true);
95
+ }
96
+ for (var c = 0; c < e4.length; c++) {
97
+ var u = [].concat(e4[c]);
98
+ a2 && l[u[0]] || (void 0 !== n && (void 0 === u[5] || (u[1] = "@layer".concat(u[5].length > 0 ? " ".concat(u[5]) : "", " {").concat(u[1], "}")), u[5] = n), r2 && (u[2] ? (u[1] = "@media ".concat(u[2], " {").concat(u[1], "}"), u[2] = r2) : u[2] = r2), s && (u[4] ? (u[1] = "@supports (".concat(u[4], ") {").concat(u[1], "}"), u[4] = s) : u[4] = "".concat(s)), t2.push(u));
99
+ }
100
+ }, t2;
101
+ };
102
+ }, 806: (e2) => {
103
+ e2.exports = function(e3, t2) {
104
+ return t2 || (t2 = {}), e3 ? (e3 = String(e3.__esModule ? e3.default : e3), /^['"].*['"]$/.test(e3) && (e3 = e3.slice(1, -1)), t2.hash && (e3 += t2.hash), /["'() \t\n]|(%20)/.test(e3) || t2.needQuotes ? '"'.concat(e3.replace(/"/g, '\\"').replace(/\n/g, "\\n"), '"') : e3) : e3;
105
+ };
106
+ }, 537: (e2) => {
107
+ e2.exports = function(e3) {
108
+ var t2 = e3[1], r2 = e3[3];
109
+ if (!r2)
110
+ return t2;
111
+ if ("function" == typeof btoa) {
112
+ var a2 = btoa(unescape(encodeURIComponent(JSON.stringify(r2)))), s = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a2), n = "/*# ".concat(s, " */");
113
+ return [t2].concat([n]).join("\n");
114
+ }
115
+ return [t2].join("\n");
116
+ };
117
+ }, 522: (e2, t2, r2) => {
118
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.OpenXmlPackage = void 0;
119
+ const a2 = r2(626), s = r2(472), n = r2(593), l = r2(461);
120
+ class o {
121
+ constructor(e3, t3) {
122
+ this._zip = e3, this.options = t3, this.xmlParser = new s.XmlParser();
123
+ }
124
+ get(e3) {
125
+ return this._zip.files[function(e4) {
126
+ return e4.startsWith("/") ? e4.substr(1) : e4;
127
+ }(e3)];
128
+ }
129
+ update(e3, t3) {
130
+ this._zip.file(e3, t3);
131
+ }
132
+ static async load(e3, t3) {
133
+ const r3 = await a2.loadAsync(e3);
134
+ return new o(r3, t3);
135
+ }
136
+ save(e3 = "blob") {
137
+ return this._zip.generateAsync({ type: e3 });
138
+ }
139
+ load(e3, t3 = "string") {
140
+ var r3, a3;
141
+ return null !== (a3 = null === (r3 = this.get(e3)) || void 0 === r3 ? void 0 : r3.async(t3)) && void 0 !== a3 ? a3 : Promise.resolve(null);
142
+ }
143
+ async loadRelationships(e3 = null) {
144
+ let t3 = "_rels/.rels";
145
+ if (null != e3) {
146
+ const [r4, a3] = (0, n.splitPath)(e3);
147
+ t3 = `${r4}_rels/${a3}.rels`;
148
+ }
149
+ const r3 = await this.load(t3);
150
+ return r3 ? (0, l.parseRelationships)(this.parseXmlDocument(r3).firstElementChild, this.xmlParser) : null;
151
+ }
152
+ parseXmlDocument(e3) {
153
+ return (0, s.parseXmlString)(e3, this.options.trimXmlDeclaration);
154
+ }
155
+ }
156
+ t2.OpenXmlPackage = o;
157
+ }, 530: (e2, t2, r2) => {
158
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.Part = void 0;
159
+ const a2 = r2(472);
160
+ t2.Part = class {
161
+ constructor(e3, t3) {
162
+ this._package = e3, this.path = t3;
163
+ }
164
+ async load() {
165
+ this.rels = await this._package.loadRelationships(this.path);
166
+ const e3 = await this._package.load(this.path), t3 = this._package.parseXmlDocument(e3);
167
+ this._package.options.keepOrigin && (this._xmlDocument = t3), this.parseXml(t3.firstElementChild);
168
+ }
169
+ save() {
170
+ this._package.update(this.path, (0, a2.serializeXmlString)(this._xmlDocument));
171
+ }
172
+ parseXml(e3) {
173
+ }
174
+ };
175
+ }, 461: (e2, t2) => {
176
+ var r2;
177
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseRelationships = t2.RelationshipTypes = void 0, function(e3) {
178
+ e3.OfficeDocument = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", e3.FontTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", e3.Image = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", e3.Numbering = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", e3.Styles = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", e3.StylesWithEffects = "http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects", e3.Theme = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", e3.Settings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", e3.WebSettings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings", e3.Hyperlink = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", e3.Footnotes = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", e3.Endnotes = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes", e3.Footer = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", e3.Header = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", e3.ExtendedProperties = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", e3.CoreProperties = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", e3.CustomProperties = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties";
179
+ }(r2 || (t2.RelationshipTypes = r2 = {})), t2.parseRelationships = function(e3, t3) {
180
+ return t3.elements(e3).map((e4) => ({ id: t3.attr(e4, "Id"), type: t3.attr(e4, "Type"), target: t3.attr(e4, "Target"), targetMode: t3.attr(e4, "TargetMode") }));
181
+ };
182
+ }, 168: (e2, t2, r2) => {
183
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.DocumentParser = t2.autos = void 0;
184
+ const a2 = r2(120), s = r2(109), n = r2(59), l = r2(472), o = r2(488), i = r2(172), c = r2(149), u = r2(320);
185
+ t2.autos = { shd: "inherit", color: "black", borderColor: "black", highlight: "transparent" };
186
+ const p = [], d = { oMath: a2.DomType.MmlMath, oMathPara: a2.DomType.MmlMathParagraph, f: a2.DomType.MmlFraction, num: a2.DomType.MmlNumerator, den: a2.DomType.MmlDenominator, rad: a2.DomType.MmlRadical, deg: a2.DomType.MmlDegree, e: a2.DomType.MmlBase, sSup: a2.DomType.MmlSuperscript, sSub: a2.DomType.MmlSubscript, sup: a2.DomType.MmlSuperArgument, sub: a2.DomType.MmlSubArgument, d: a2.DomType.MmlDelimiter, nary: a2.DomType.MmlNary };
187
+ t2.DocumentParser = class {
188
+ constructor(e3) {
189
+ this.options = Object.assign({ ignoreWidth: false, debug: false }, e3);
190
+ }
191
+ parseNotes(e3, t3, r3) {
192
+ var a3 = [];
193
+ for (let s2 of l.default.elements(e3, t3)) {
194
+ const e4 = new r3();
195
+ e4.id = l.default.attr(s2, "id"), e4.noteType = l.default.attr(s2, "type"), e4.children = this.parseBodyElements(s2), a3.push(e4);
196
+ }
197
+ return a3;
198
+ }
199
+ parseDocumentFile(e3) {
200
+ var t3 = l.default.element(e3, "body"), r3 = l.default.element(e3, "background"), s2 = l.default.element(t3, "sectPr");
201
+ return { type: a2.DomType.Document, children: this.parseBodyElements(t3), props: s2 ? (0, n.parseSectionProperties)(s2, l.default) : {}, cssStyle: r3 ? this.parseBackground(r3) : {} };
202
+ }
203
+ parseBackground(e3) {
204
+ var t3 = {}, r3 = m.colorAttr(e3, "color");
205
+ return r3 && (t3["background-color"] = r3), t3;
206
+ }
207
+ parseBodyElements(e3) {
208
+ var t3 = [];
209
+ for (let r3 of l.default.elements(e3))
210
+ switch (r3.localName) {
211
+ case "p":
212
+ t3.push(this.parseParagraph(r3));
213
+ break;
214
+ case "tbl":
215
+ t3.push(this.parseTable(r3));
216
+ break;
217
+ case "sdt":
218
+ t3.push(...this.parseSdt(r3, (e4) => this.parseBodyElements(e4)));
219
+ }
220
+ return t3;
221
+ }
222
+ parseStylesFile(e3) {
223
+ var t3 = [];
224
+ return m.foreach(e3, (e4) => {
225
+ switch (e4.localName) {
226
+ case "style":
227
+ t3.push(this.parseStyle(e4));
228
+ break;
229
+ case "docDefaults":
230
+ t3.push(this.parseDefaultStyles(e4));
231
+ }
232
+ }), t3;
233
+ }
234
+ parseDefaultStyles(e3) {
235
+ var t3 = { id: null, name: null, target: null, basedOn: null, styles: [] };
236
+ return m.foreach(e3, (e4) => {
237
+ switch (e4.localName) {
238
+ case "rPrDefault":
239
+ var r3 = l.default.element(e4, "rPr");
240
+ r3 && t3.styles.push({ target: "span", values: this.parseDefaultProperties(r3, {}) });
241
+ break;
242
+ case "pPrDefault":
243
+ var a3 = l.default.element(e4, "pPr");
244
+ a3 && t3.styles.push({ target: "p", values: this.parseDefaultProperties(a3, {}) });
245
+ }
246
+ }), t3;
247
+ }
248
+ parseStyle(e3) {
249
+ var t3 = { id: l.default.attr(e3, "styleId"), isDefault: l.default.boolAttr(e3, "default"), name: null, target: null, basedOn: null, styles: [], linked: null };
250
+ switch (l.default.attr(e3, "type")) {
251
+ case "paragraph":
252
+ t3.target = "p";
253
+ break;
254
+ case "table":
255
+ t3.target = "table";
256
+ break;
257
+ case "character":
258
+ t3.target = "span";
259
+ }
260
+ return m.foreach(e3, (e4) => {
261
+ switch (e4.localName) {
262
+ case "basedOn":
263
+ t3.basedOn = l.default.attr(e4, "val");
264
+ break;
265
+ case "name":
266
+ t3.name = l.default.attr(e4, "val");
267
+ break;
268
+ case "link":
269
+ t3.linked = l.default.attr(e4, "val");
270
+ break;
271
+ case "next":
272
+ t3.next = l.default.attr(e4, "val");
273
+ break;
274
+ case "aliases":
275
+ t3.aliases = l.default.attr(e4, "val").split(",");
276
+ break;
277
+ case "pPr":
278
+ t3.styles.push({ target: "p", values: this.parseDefaultProperties(e4, {}) }), t3.paragraphProps = (0, s.parseParagraphProperties)(e4, l.default);
279
+ break;
280
+ case "rPr":
281
+ t3.styles.push({ target: "span", values: this.parseDefaultProperties(e4, {}) }), t3.runProps = (0, o.parseRunProperties)(e4, l.default);
282
+ break;
283
+ case "tblPr":
284
+ case "tcPr":
285
+ t3.styles.push({ target: "td", values: this.parseDefaultProperties(e4, {}) });
286
+ break;
287
+ case "tblStylePr":
288
+ for (let r3 of this.parseTableStyle(e4))
289
+ t3.styles.push(r3);
290
+ break;
291
+ case "rsid":
292
+ case "qFormat":
293
+ case "hidden":
294
+ case "semiHidden":
295
+ case "unhideWhenUsed":
296
+ case "autoRedefine":
297
+ case "uiPriority":
298
+ break;
299
+ default:
300
+ this.options.debug && console.warn(`DOCX: Unknown style element: ${e4.localName}`);
301
+ }
302
+ }), t3;
303
+ }
304
+ parseTableStyle(e3) {
305
+ var t3 = [], r3 = l.default.attr(e3, "type"), a3 = "", s2 = "";
306
+ switch (r3) {
307
+ case "firstRow":
308
+ s2 = ".first-row", a3 = "tr.first-row td";
309
+ break;
310
+ case "lastRow":
311
+ s2 = ".last-row", a3 = "tr.last-row td";
312
+ break;
313
+ case "firstCol":
314
+ s2 = ".first-col", a3 = "td.first-col";
315
+ break;
316
+ case "lastCol":
317
+ s2 = ".last-col", a3 = "td.last-col";
318
+ break;
319
+ case "band1Vert":
320
+ s2 = ":not(.no-vband)", a3 = "td.odd-col";
321
+ break;
322
+ case "band2Vert":
323
+ s2 = ":not(.no-vband)", a3 = "td.even-col";
324
+ break;
325
+ case "band1Horz":
326
+ s2 = ":not(.no-hband)", a3 = "tr.odd-row";
327
+ break;
328
+ case "band2Horz":
329
+ s2 = ":not(.no-hband)", a3 = "tr.even-row";
330
+ break;
331
+ default:
332
+ return [];
333
+ }
334
+ return m.foreach(e3, (e4) => {
335
+ switch (e4.localName) {
336
+ case "pPr":
337
+ t3.push({ target: `${a3} p`, mod: s2, values: this.parseDefaultProperties(e4, {}) });
338
+ break;
339
+ case "rPr":
340
+ t3.push({ target: `${a3} span`, mod: s2, values: this.parseDefaultProperties(e4, {}) });
341
+ break;
342
+ case "tblPr":
343
+ case "tcPr":
344
+ t3.push({ target: a3, mod: s2, values: this.parseDefaultProperties(e4, {}) });
345
+ }
346
+ }), t3;
347
+ }
348
+ parseNumberingFile(e3) {
349
+ var t3 = [], r3 = {}, a3 = [];
350
+ return m.foreach(e3, (e4) => {
351
+ switch (e4.localName) {
352
+ case "abstractNum":
353
+ this.parseAbstractNumbering(e4, a3).forEach((e5) => t3.push(e5));
354
+ break;
355
+ case "numPicBullet":
356
+ a3.push(this.parseNumberingPicBullet(e4));
357
+ break;
358
+ case "num":
359
+ var s2 = l.default.attr(e4, "numId"), n2 = l.default.elementAttr(e4, "abstractNumId", "val");
360
+ r3[n2] = s2;
361
+ }
362
+ }), t3.forEach((e4) => e4.id = r3[e4.id]), t3;
363
+ }
364
+ parseNumberingPicBullet(e3) {
365
+ var t3 = l.default.element(e3, "pict"), r3 = t3 && l.default.element(t3, "shape"), a3 = r3 && l.default.element(r3, "imagedata");
366
+ return a3 ? { id: l.default.intAttr(e3, "numPicBulletId"), src: l.default.attr(a3, "id"), style: l.default.attr(r3, "style") } : null;
367
+ }
368
+ parseAbstractNumbering(e3, t3) {
369
+ var r3 = [], a3 = l.default.attr(e3, "abstractNumId");
370
+ return m.foreach(e3, (e4) => {
371
+ "lvl" === e4.localName && r3.push(this.parseNumberingLevel(a3, e4, t3));
372
+ }), r3;
373
+ }
374
+ parseNumberingLevel(e3, t3, r3) {
375
+ var a3 = { id: e3, level: l.default.intAttr(t3, "ilvl"), pStyleName: void 0, pStyle: {}, rStyle: {}, suff: "tab" };
376
+ return m.foreach(t3, (e4) => {
377
+ switch (e4.localName) {
378
+ case "pPr":
379
+ this.parseDefaultProperties(e4, a3.pStyle);
380
+ break;
381
+ case "rPr":
382
+ this.parseDefaultProperties(e4, a3.rStyle);
383
+ break;
384
+ case "lvlPicBulletId":
385
+ var t4 = l.default.intAttr(e4, "val");
386
+ a3.bullet = r3.find((e5) => e5.id == t4);
387
+ break;
388
+ case "lvlText":
389
+ a3.levelText = l.default.attr(e4, "val");
390
+ break;
391
+ case "pStyle":
392
+ a3.pStyleName = l.default.attr(e4, "val");
393
+ break;
394
+ case "numFmt":
395
+ a3.format = l.default.attr(e4, "val");
396
+ break;
397
+ case "suff":
398
+ a3.suff = l.default.attr(e4, "val");
399
+ }
400
+ }), a3;
401
+ }
402
+ parseSdt(e3, t3) {
403
+ const r3 = l.default.element(e3, "sdtContent");
404
+ return r3 ? t3(r3) : [];
405
+ }
406
+ parseInserted(e3, t3) {
407
+ var r3, s2;
408
+ return { type: a2.DomType.Inserted, children: null !== (s2 = null === (r3 = t3(e3)) || void 0 === r3 ? void 0 : r3.children) && void 0 !== s2 ? s2 : [] };
409
+ }
410
+ parseDeleted(e3, t3) {
411
+ var r3, s2;
412
+ return { type: a2.DomType.Deleted, children: null !== (s2 = null === (r3 = t3(e3)) || void 0 === r3 ? void 0 : r3.children) && void 0 !== s2 ? s2 : [] };
413
+ }
414
+ parseParagraph(e3) {
415
+ var t3 = { type: a2.DomType.Paragraph, children: [] };
416
+ for (let r3 of l.default.elements(e3))
417
+ switch (r3.localName) {
418
+ case "pPr":
419
+ this.parseParagraphProperties(r3, t3);
420
+ break;
421
+ case "r":
422
+ t3.children.push(this.parseRun(r3, t3));
423
+ break;
424
+ case "hyperlink":
425
+ t3.children.push(this.parseHyperlink(r3, t3));
426
+ break;
427
+ case "bookmarkStart":
428
+ t3.children.push((0, i.parseBookmarkStart)(r3, l.default));
429
+ break;
430
+ case "bookmarkEnd":
431
+ t3.children.push((0, i.parseBookmarkEnd)(r3, l.default));
432
+ break;
433
+ case "oMath":
434
+ case "oMathPara":
435
+ t3.children.push(this.parseMathElement(r3));
436
+ break;
437
+ case "sdt":
438
+ t3.children.push(...this.parseSdt(r3, (e4) => this.parseParagraph(e4).children));
439
+ break;
440
+ case "ins":
441
+ t3.children.push(this.parseInserted(r3, (e4) => this.parseParagraph(e4)));
442
+ break;
443
+ case "del":
444
+ t3.children.push(this.parseDeleted(r3, (e4) => this.parseParagraph(e4)));
445
+ }
446
+ return t3;
447
+ }
448
+ parseParagraphProperties(e3, t3) {
449
+ this.parseDefaultProperties(e3, t3.cssStyle = {}, null, (e4) => {
450
+ if ((0, s.parseParagraphProperty)(e4, t3, l.default))
451
+ return true;
452
+ switch (e4.localName) {
453
+ case "pStyle":
454
+ t3.styleName = l.default.attr(e4, "val");
455
+ break;
456
+ case "cnfStyle":
457
+ t3.className = f.classNameOfCnfStyle(e4);
458
+ break;
459
+ case "framePr":
460
+ this.parseFrame(e4, t3);
461
+ break;
462
+ case "rPr":
463
+ break;
464
+ default:
465
+ return false;
466
+ }
467
+ return true;
468
+ });
469
+ }
470
+ parseFrame(e3, t3) {
471
+ "drop" == l.default.attr(e3, "dropCap") && (t3.cssStyle.float = "left");
472
+ }
473
+ parseHyperlink(e3, t3) {
474
+ var r3 = { type: a2.DomType.Hyperlink, parent: t3, children: [] }, s2 = l.default.attr(e3, "anchor"), n2 = l.default.attr(e3, "id");
475
+ return s2 && (r3.href = "#" + s2), n2 && (r3.id = n2), m.foreach(e3, (e4) => {
476
+ "r" === e4.localName && r3.children.push(this.parseRun(e4, r3));
477
+ }), r3;
478
+ }
479
+ parseRun(e3, t3) {
480
+ var r3 = { type: a2.DomType.Run, parent: t3, children: [] };
481
+ return m.foreach(e3, (e4) => {
482
+ switch ((e4 = this.checkAlternateContent(e4)).localName) {
483
+ case "t":
484
+ r3.children.push({ type: a2.DomType.Text, text: e4.textContent });
485
+ break;
486
+ case "delText":
487
+ r3.children.push({ type: a2.DomType.DeletedText, text: e4.textContent });
488
+ break;
489
+ case "fldSimple":
490
+ r3.children.push({ type: a2.DomType.SimpleField, instruction: l.default.attr(e4, "instr"), lock: l.default.boolAttr(e4, "lock", false), dirty: l.default.boolAttr(e4, "dirty", false) });
491
+ break;
492
+ case "instrText":
493
+ r3.fieldRun = true, r3.children.push({ type: a2.DomType.Instruction, text: e4.textContent });
494
+ break;
495
+ case "fldChar":
496
+ r3.fieldRun = true, r3.children.push({ type: a2.DomType.ComplexField, charType: l.default.attr(e4, "fldCharType"), lock: l.default.boolAttr(e4, "lock", false), dirty: l.default.boolAttr(e4, "dirty", false) });
497
+ break;
498
+ case "noBreakHyphen":
499
+ r3.children.push({ type: a2.DomType.NoBreakHyphen });
500
+ break;
501
+ case "br":
502
+ r3.children.push({ type: a2.DomType.Break, break: l.default.attr(e4, "type") || "textWrapping" });
503
+ break;
504
+ case "lastRenderedPageBreak":
505
+ r3.children.push({ type: a2.DomType.Break, break: "lastRenderedPageBreak" });
506
+ break;
507
+ case "sym":
508
+ r3.children.push({ type: a2.DomType.Symbol, font: l.default.attr(e4, "font"), char: l.default.attr(e4, "char") });
509
+ break;
510
+ case "tab":
511
+ r3.children.push({ type: a2.DomType.Tab });
512
+ break;
513
+ case "footnoteReference":
514
+ r3.children.push({ type: a2.DomType.FootnoteReference, id: l.default.attr(e4, "id") });
515
+ break;
516
+ case "endnoteReference":
517
+ r3.children.push({ type: a2.DomType.EndnoteReference, id: l.default.attr(e4, "id") });
518
+ break;
519
+ case "drawing":
520
+ let t4 = this.parseDrawing(e4);
521
+ t4 && (r3.children = [t4]);
522
+ break;
523
+ case "pict":
524
+ r3.children.push(this.parseVmlPicture(e4));
525
+ break;
526
+ case "rPr":
527
+ this.parseRunProperties(e4, r3);
528
+ }
529
+ }), r3;
530
+ }
531
+ parseMathElement(e3) {
532
+ const t3 = `${e3.localName}Pr`, r3 = { type: d[e3.localName], children: [] };
533
+ for (const n2 of l.default.elements(e3))
534
+ if (d[n2.localName])
535
+ r3.children.push(this.parseMathElement(n2));
536
+ else if ("r" == n2.localName) {
537
+ var s2 = this.parseRun(n2);
538
+ s2.type = a2.DomType.MmlRun, r3.children.push(s2);
539
+ } else
540
+ n2.localName == t3 && (r3.props = this.parseMathProperies(n2));
541
+ return r3;
542
+ }
543
+ parseMathProperies(e3) {
544
+ const t3 = {};
545
+ for (const r3 of l.default.elements(e3))
546
+ switch (r3.localName) {
547
+ case "chr":
548
+ t3.char = l.default.attr(r3, "val");
549
+ break;
550
+ case "degHide":
551
+ t3.hideDegree = l.default.boolAttr(r3, "val");
552
+ break;
553
+ case "begChr":
554
+ t3.beginChar = l.default.attr(r3, "val");
555
+ break;
556
+ case "endChr":
557
+ t3.endChar = l.default.attr(r3, "val");
558
+ }
559
+ return t3;
560
+ }
561
+ parseRunProperties(e3, t3) {
562
+ this.parseDefaultProperties(e3, t3.cssStyle = {}, null, (e4) => {
563
+ switch (e4.localName) {
564
+ case "rStyle":
565
+ t3.styleName = l.default.attr(e4, "val");
566
+ break;
567
+ case "vertAlign":
568
+ t3.verticalAlign = f.valueOfVertAlign(e4, true);
569
+ break;
570
+ default:
571
+ return false;
572
+ }
573
+ return true;
574
+ });
575
+ }
576
+ parseVmlPicture(e3) {
577
+ const t3 = { type: a2.DomType.VmlPicture, children: [] };
578
+ for (const r3 of l.default.elements(e3)) {
579
+ const e4 = (0, u.parseVmlElement)(r3);
580
+ e4 && t3.children.push(e4);
581
+ }
582
+ return t3;
583
+ }
584
+ checkAlternateContent(e3) {
585
+ var t3;
586
+ if ("AlternateContent" != e3.localName)
587
+ return e3;
588
+ var r3 = l.default.element(e3, "Choice");
589
+ if (r3) {
590
+ var a3 = l.default.attr(r3, "Requires"), s2 = e3.lookupNamespaceURI(a3);
591
+ if (p.includes(s2))
592
+ return r3.firstElementChild;
593
+ }
594
+ return null === (t3 = l.default.element(e3, "Fallback")) || void 0 === t3 ? void 0 : t3.firstElementChild;
595
+ }
596
+ parseDrawing(e3) {
597
+ for (var t3 of l.default.elements(e3))
598
+ switch (t3.localName) {
599
+ case "inline":
600
+ case "anchor":
601
+ return this.parseDrawingWrapper(t3);
602
+ }
603
+ }
604
+ parseDrawingWrapper(e3) {
605
+ var t3, r3 = { type: a2.DomType.Drawing, children: [], cssStyle: {} }, s2 = "anchor" == e3.localName;
606
+ let n2 = null, o2 = l.default.boolAttr(e3, "simplePos"), i2 = { relative: "page", align: "left", offset: "0" }, u2 = { relative: "page", align: "top", offset: "0" };
607
+ for (var p2 of l.default.elements(e3))
608
+ switch (p2.localName) {
609
+ case "simplePos":
610
+ o2 && (i2.offset = l.default.lengthAttr(p2, "x", c.LengthUsage.Emu), u2.offset = l.default.lengthAttr(p2, "y", c.LengthUsage.Emu));
611
+ break;
612
+ case "extent":
613
+ r3.cssStyle.width = l.default.lengthAttr(p2, "cx", c.LengthUsage.Emu), r3.cssStyle.height = l.default.lengthAttr(p2, "cy", c.LengthUsage.Emu);
614
+ break;
615
+ case "positionH":
616
+ case "positionV":
617
+ if (!o2) {
618
+ let e4 = "positionH" == p2.localName ? i2 : u2;
619
+ var d2 = l.default.element(p2, "align"), h2 = l.default.element(p2, "posOffset");
620
+ e4.relative = null !== (t3 = l.default.attr(p2, "relativeFrom")) && void 0 !== t3 ? t3 : e4.relative, d2 && (e4.align = d2.textContent), h2 && (e4.offset = m.sizeValue(h2, c.LengthUsage.Emu));
621
+ }
622
+ break;
623
+ case "wrapTopAndBottom":
624
+ n2 = "wrapTopAndBottom";
625
+ break;
626
+ case "wrapNone":
627
+ n2 = "wrapNone";
628
+ break;
629
+ case "graphic":
630
+ var f2 = this.parseGraphic(p2);
631
+ f2 && r3.children.push(f2);
632
+ }
633
+ return "wrapTopAndBottom" == n2 ? (r3.cssStyle.display = "block", i2.align && (r3.cssStyle["text-align"] = i2.align, r3.cssStyle.width = "100%")) : "wrapNone" == n2 ? (r3.cssStyle.display = "block", r3.cssStyle.position = "relative", r3.cssStyle.width = "0px", r3.cssStyle.height = "0px", i2.offset && (r3.cssStyle.left = i2.offset), u2.offset && (r3.cssStyle.top = u2.offset)) : !s2 || "left" != i2.align && "right" != i2.align || (r3.cssStyle.float = i2.align), r3;
634
+ }
635
+ parseGraphic(e3) {
636
+ var t3 = l.default.element(e3, "graphicData");
637
+ for (let e4 of l.default.elements(t3))
638
+ if ("pic" === e4.localName)
639
+ return this.parsePicture(e4);
640
+ return null;
641
+ }
642
+ parsePicture(e3) {
643
+ var t3 = { type: a2.DomType.Image, src: "", cssStyle: {} }, r3 = l.default.element(e3, "blipFill"), s2 = l.default.element(r3, "blip");
644
+ t3.src = l.default.attr(s2, "embed");
645
+ var n2 = l.default.element(e3, "spPr"), o2 = l.default.element(n2, "xfrm");
646
+ for (var i2 of (t3.cssStyle.position = "relative", l.default.elements(o2)))
647
+ switch (i2.localName) {
648
+ case "ext":
649
+ t3.cssStyle.width = l.default.lengthAttr(i2, "cx", c.LengthUsage.Emu), t3.cssStyle.height = l.default.lengthAttr(i2, "cy", c.LengthUsage.Emu);
650
+ break;
651
+ case "off":
652
+ t3.cssStyle.left = l.default.lengthAttr(i2, "x", c.LengthUsage.Emu), t3.cssStyle.top = l.default.lengthAttr(i2, "y", c.LengthUsage.Emu);
653
+ }
654
+ return t3;
655
+ }
656
+ parseTable(e3) {
657
+ var t3 = { type: a2.DomType.Table, children: [] };
658
+ return m.foreach(e3, (e4) => {
659
+ switch (e4.localName) {
660
+ case "tr":
661
+ t3.children.push(this.parseTableRow(e4));
662
+ break;
663
+ case "tblGrid":
664
+ t3.columns = this.parseTableColumns(e4);
665
+ break;
666
+ case "tblPr":
667
+ this.parseTableProperties(e4, t3);
668
+ }
669
+ }), t3;
670
+ }
671
+ parseTableColumns(e3) {
672
+ var t3 = [];
673
+ return m.foreach(e3, (e4) => {
674
+ "gridCol" === e4.localName && t3.push({ width: l.default.lengthAttr(e4, "w") });
675
+ }), t3;
676
+ }
677
+ parseTableProperties(e3, t3) {
678
+ switch (t3.cssStyle = {}, t3.cellStyle = {}, this.parseDefaultProperties(e3, t3.cssStyle, t3.cellStyle, (e4) => {
679
+ switch (e4.localName) {
680
+ case "tblStyle":
681
+ t3.styleName = l.default.attr(e4, "val");
682
+ break;
683
+ case "tblLook":
684
+ t3.className = f.classNameOftblLook(e4);
685
+ break;
686
+ case "tblpPr":
687
+ this.parseTablePosition(e4, t3);
688
+ break;
689
+ case "tblStyleColBandSize":
690
+ t3.colBandSize = l.default.intAttr(e4, "val");
691
+ break;
692
+ case "tblStyleRowBandSize":
693
+ t3.rowBandSize = l.default.intAttr(e4, "val");
694
+ break;
695
+ default:
696
+ return false;
697
+ }
698
+ return true;
699
+ }), t3.cssStyle["text-align"]) {
700
+ case "center":
701
+ delete t3.cssStyle["text-align"], t3.cssStyle["margin-left"] = "auto", t3.cssStyle["margin-right"] = "auto";
702
+ break;
703
+ case "right":
704
+ delete t3.cssStyle["text-align"], t3.cssStyle["margin-left"] = "auto";
705
+ }
706
+ }
707
+ parseTablePosition(e3, t3) {
708
+ var r3 = l.default.lengthAttr(e3, "topFromText"), a3 = l.default.lengthAttr(e3, "bottomFromText"), s2 = l.default.lengthAttr(e3, "rightFromText"), n2 = l.default.lengthAttr(e3, "leftFromText");
709
+ t3.cssStyle.float = "left", t3.cssStyle["margin-bottom"] = f.addSize(t3.cssStyle["margin-bottom"], a3), t3.cssStyle["margin-left"] = f.addSize(t3.cssStyle["margin-left"], n2), t3.cssStyle["margin-right"] = f.addSize(t3.cssStyle["margin-right"], s2), t3.cssStyle["margin-top"] = f.addSize(t3.cssStyle["margin-top"], r3);
710
+ }
711
+ parseTableRow(e3) {
712
+ var t3 = { type: a2.DomType.Row, children: [] };
713
+ return m.foreach(e3, (e4) => {
714
+ switch (e4.localName) {
715
+ case "tc":
716
+ t3.children.push(this.parseTableCell(e4));
717
+ break;
718
+ case "trPr":
719
+ this.parseTableRowProperties(e4, t3);
720
+ }
721
+ }), t3;
722
+ }
723
+ parseTableRowProperties(e3, t3) {
724
+ t3.cssStyle = this.parseDefaultProperties(e3, {}, null, (e4) => {
725
+ switch (e4.localName) {
726
+ case "cnfStyle":
727
+ t3.className = f.classNameOfCnfStyle(e4);
728
+ break;
729
+ case "tblHeader":
730
+ t3.isHeader = l.default.boolAttr(e4, "val");
731
+ break;
732
+ default:
733
+ return false;
734
+ }
735
+ return true;
736
+ });
737
+ }
738
+ parseTableCell(e3) {
739
+ var t3 = { type: a2.DomType.Cell, children: [] };
740
+ return m.foreach(e3, (e4) => {
741
+ switch (e4.localName) {
742
+ case "tbl":
743
+ t3.children.push(this.parseTable(e4));
744
+ break;
745
+ case "p":
746
+ t3.children.push(this.parseParagraph(e4));
747
+ break;
748
+ case "tcPr":
749
+ this.parseTableCellProperties(e4, t3);
750
+ }
751
+ }), t3;
752
+ }
753
+ parseTableCellProperties(e3, t3) {
754
+ t3.cssStyle = this.parseDefaultProperties(e3, {}, null, (e4) => {
755
+ var r3;
756
+ switch (e4.localName) {
757
+ case "gridSpan":
758
+ t3.span = l.default.intAttr(e4, "val", null);
759
+ break;
760
+ case "vMerge":
761
+ t3.verticalMerge = null !== (r3 = l.default.attr(e4, "val")) && void 0 !== r3 ? r3 : "continue";
762
+ break;
763
+ case "cnfStyle":
764
+ t3.className = f.classNameOfCnfStyle(e4);
765
+ break;
766
+ default:
767
+ return false;
768
+ }
769
+ return true;
770
+ });
771
+ }
772
+ parseDefaultProperties(e3, r3 = null, a3 = null, s2 = null) {
773
+ return r3 = r3 || {}, m.foreach(e3, (n2) => {
774
+ if (!(null == s2 ? void 0 : s2(n2)))
775
+ switch (n2.localName) {
776
+ case "jc":
777
+ r3["text-align"] = f.valueOfJc(n2);
778
+ break;
779
+ case "textAlignment":
780
+ r3["vertical-align"] = f.valueOfTextAlignment(n2);
781
+ break;
782
+ case "color":
783
+ r3.color = m.colorAttr(n2, "val", null, t2.autos.color);
784
+ break;
785
+ case "sz":
786
+ r3["font-size"] = r3["min-height"] = l.default.lengthAttr(n2, "val", c.LengthUsage.FontSize);
787
+ break;
788
+ case "shd":
789
+ r3["background-color"] = m.colorAttr(n2, "fill", null, t2.autos.shd);
790
+ break;
791
+ case "highlight":
792
+ r3["background-color"] = m.colorAttr(n2, "val", null, t2.autos.highlight);
793
+ break;
794
+ case "vertAlign":
795
+ break;
796
+ case "position":
797
+ r3.verticalAlign = l.default.lengthAttr(n2, "val", c.LengthUsage.FontSize);
798
+ break;
799
+ case "tcW":
800
+ if (this.options.ignoreWidth)
801
+ break;
802
+ case "tblW":
803
+ r3.width = f.valueOfSize(n2, "w");
804
+ break;
805
+ case "trHeight":
806
+ this.parseTrHeight(n2, r3);
807
+ break;
808
+ case "strike":
809
+ r3["text-decoration"] = l.default.boolAttr(n2, "val", true) ? "line-through" : "none";
810
+ break;
811
+ case "b":
812
+ r3["font-weight"] = l.default.boolAttr(n2, "val", true) ? "bold" : "normal";
813
+ break;
814
+ case "i":
815
+ r3["font-style"] = l.default.boolAttr(n2, "val", true) ? "italic" : "normal";
816
+ break;
817
+ case "caps":
818
+ r3["text-transform"] = l.default.boolAttr(n2, "val", true) ? "uppercase" : "none";
819
+ break;
820
+ case "smallCaps":
821
+ r3["text-transform"] = l.default.boolAttr(n2, "val", true) ? "lowercase" : "none";
822
+ break;
823
+ case "u":
824
+ this.parseUnderline(n2, r3);
825
+ break;
826
+ case "ind":
827
+ case "tblInd":
828
+ this.parseIndentation(n2, r3);
829
+ break;
830
+ case "rFonts":
831
+ this.parseFont(n2, r3);
832
+ break;
833
+ case "tblBorders":
834
+ this.parseBorderProperties(n2, a3 || r3);
835
+ break;
836
+ case "tblCellSpacing":
837
+ r3["border-spacing"] = f.valueOfMargin(n2), r3["border-collapse"] = "separate";
838
+ break;
839
+ case "pBdr":
840
+ this.parseBorderProperties(n2, r3);
841
+ break;
842
+ case "bdr":
843
+ r3.border = f.valueOfBorder(n2);
844
+ break;
845
+ case "tcBorders":
846
+ this.parseBorderProperties(n2, r3);
847
+ break;
848
+ case "vanish":
849
+ l.default.boolAttr(n2, "val", true) && (r3.display = "none");
850
+ break;
851
+ case "kern":
852
+ case "noWrap":
853
+ break;
854
+ case "tblCellMar":
855
+ case "tcMar":
856
+ this.parseMarginProperties(n2, a3 || r3);
857
+ break;
858
+ case "tblLayout":
859
+ r3["table-layout"] = f.valueOfTblLayout(n2);
860
+ break;
861
+ case "vAlign":
862
+ r3["vertical-align"] = f.valueOfTextAlignment(n2);
863
+ break;
864
+ case "spacing":
865
+ "pPr" == e3.localName && this.parseSpacing(n2, r3);
866
+ break;
867
+ case "wordWrap":
868
+ l.default.boolAttr(n2, "val") && (r3["overflow-wrap"] = "break-word");
869
+ break;
870
+ case "bCs":
871
+ case "iCs":
872
+ case "szCs":
873
+ case "tabs":
874
+ case "outlineLvl":
875
+ case "contextualSpacing":
876
+ case "tblStyleColBandSize":
877
+ case "tblStyleRowBandSize":
878
+ case "webHidden":
879
+ case "pageBreakBefore":
880
+ case "suppressLineNumbers":
881
+ case "keepLines":
882
+ case "keepNext":
883
+ case "lang":
884
+ case "widowControl":
885
+ case "bidi":
886
+ case "rtl":
887
+ case "noProof":
888
+ break;
889
+ default:
890
+ this.options.debug && console.warn(`DOCX: Unknown document element: ${e3.localName}.${n2.localName}`);
891
+ }
892
+ }), r3;
893
+ }
894
+ parseUnderline(e3, t3) {
895
+ var r3 = l.default.attr(e3, "val");
896
+ if (null != r3) {
897
+ switch (r3) {
898
+ case "dash":
899
+ case "dashDotDotHeavy":
900
+ case "dashDotHeavy":
901
+ case "dashedHeavy":
902
+ case "dashLong":
903
+ case "dashLongHeavy":
904
+ case "dotDash":
905
+ case "dotDotDash":
906
+ t3["text-decoration-style"] = "dashed";
907
+ break;
908
+ case "dotted":
909
+ case "dottedHeavy":
910
+ t3["text-decoration-style"] = "dotted";
911
+ break;
912
+ case "double":
913
+ t3["text-decoration-style"] = "double";
914
+ break;
915
+ case "single":
916
+ case "thick":
917
+ case "words":
918
+ t3["text-decoration"] = "underline";
919
+ break;
920
+ case "wave":
921
+ case "wavyDouble":
922
+ case "wavyHeavy":
923
+ t3["text-decoration-style"] = "wavy";
924
+ break;
925
+ case "none":
926
+ t3["text-decoration"] = "none";
927
+ }
928
+ var a3 = m.colorAttr(e3, "color");
929
+ a3 && (t3["text-decoration-color"] = a3);
930
+ }
931
+ }
932
+ parseFont(e3, t3) {
933
+ var r3 = [l.default.attr(e3, "ascii"), f.themeValue(e3, "asciiTheme")].filter((e4) => e4).join(", ");
934
+ r3.length > 0 && (t3["font-family"] = r3);
935
+ }
936
+ parseIndentation(e3, t3) {
937
+ var r3 = l.default.lengthAttr(e3, "firstLine"), a3 = l.default.lengthAttr(e3, "hanging"), s2 = l.default.lengthAttr(e3, "left"), n2 = l.default.lengthAttr(e3, "start"), o2 = l.default.lengthAttr(e3, "right"), i2 = l.default.lengthAttr(e3, "end");
938
+ r3 && (t3["text-indent"] = r3), a3 && (t3["text-indent"] = `-${a3}`), (s2 || n2) && (t3["margin-left"] = s2 || n2), (o2 || i2) && (t3["margin-right"] = o2 || i2);
939
+ }
940
+ parseSpacing(e3, t3) {
941
+ var r3 = l.default.lengthAttr(e3, "before"), a3 = l.default.lengthAttr(e3, "after"), s2 = l.default.intAttr(e3, "line", null), n2 = l.default.attr(e3, "lineRule");
942
+ if (r3 && (t3["margin-top"] = r3), a3 && (t3["margin-bottom"] = a3), null !== s2)
943
+ switch (n2) {
944
+ case "auto":
945
+ t3["line-height"] = `${(s2 / 240).toFixed(2)}`;
946
+ break;
947
+ case "atLeast":
948
+ t3["line-height"] = `calc(100% + ${s2 / 20}pt)`;
949
+ break;
950
+ default:
951
+ t3["line-height"] = t3["min-height"] = s2 / 20 + "pt";
952
+ }
953
+ }
954
+ parseMarginProperties(e3, t3) {
955
+ m.foreach(e3, (e4) => {
956
+ switch (e4.localName) {
957
+ case "left":
958
+ t3["padding-left"] = f.valueOfMargin(e4);
959
+ break;
960
+ case "right":
961
+ t3["padding-right"] = f.valueOfMargin(e4);
962
+ break;
963
+ case "top":
964
+ t3["padding-top"] = f.valueOfMargin(e4);
965
+ break;
966
+ case "bottom":
967
+ t3["padding-bottom"] = f.valueOfMargin(e4);
968
+ }
969
+ });
970
+ }
971
+ parseTrHeight(e3, t3) {
972
+ l.default.attr(e3, "hRule"), t3.height = l.default.lengthAttr(e3, "val");
973
+ }
974
+ parseBorderProperties(e3, t3) {
975
+ m.foreach(e3, (e4) => {
976
+ switch (e4.localName) {
977
+ case "start":
978
+ case "left":
979
+ t3["border-left"] = f.valueOfBorder(e4);
980
+ break;
981
+ case "end":
982
+ case "right":
983
+ t3["border-right"] = f.valueOfBorder(e4);
984
+ break;
985
+ case "top":
986
+ t3["border-top"] = f.valueOfBorder(e4);
987
+ break;
988
+ case "bottom":
989
+ t3["border-bottom"] = f.valueOfBorder(e4);
990
+ }
991
+ });
992
+ }
993
+ };
994
+ const h = ["black", "blue", "cyan", "darkBlue", "darkCyan", "darkGray", "darkGreen", "darkMagenta", "darkRed", "darkYellow", "green", "lightGray", "magenta", "none", "red", "white", "yellow"];
995
+ class m {
996
+ static foreach(e3, t3) {
997
+ for (var r3 = 0; r3 < e3.childNodes.length; r3++) {
998
+ let a3 = e3.childNodes[r3];
999
+ a3.nodeType == Node.ELEMENT_NODE && t3(a3);
1000
+ }
1001
+ }
1002
+ static colorAttr(e3, t3, r3 = null, a3 = "black") {
1003
+ var s2 = l.default.attr(e3, t3);
1004
+ if (s2)
1005
+ return "auto" == s2 ? a3 : h.includes(s2) ? s2 : `#${s2}`;
1006
+ var n2 = l.default.attr(e3, "themeColor");
1007
+ return n2 ? `var(--docx-${n2}-color)` : r3;
1008
+ }
1009
+ static sizeValue(e3, t3 = c.LengthUsage.Dxa) {
1010
+ return (0, c.convertLength)(e3.textContent, t3);
1011
+ }
1012
+ }
1013
+ class f {
1014
+ static themeValue(e3, t3) {
1015
+ var r3 = l.default.attr(e3, t3);
1016
+ return r3 ? `var(--docx-${r3}-font)` : null;
1017
+ }
1018
+ static valueOfSize(e3, t3) {
1019
+ var r3 = c.LengthUsage.Dxa;
1020
+ switch (l.default.attr(e3, "type")) {
1021
+ case "dxa":
1022
+ break;
1023
+ case "pct":
1024
+ r3 = c.LengthUsage.Percent;
1025
+ break;
1026
+ case "auto":
1027
+ return "auto";
1028
+ }
1029
+ return l.default.lengthAttr(e3, t3, r3);
1030
+ }
1031
+ static valueOfMargin(e3) {
1032
+ return l.default.lengthAttr(e3, "w");
1033
+ }
1034
+ static valueOfBorder(e3) {
1035
+ if ("nil" == l.default.attr(e3, "val"))
1036
+ return "none";
1037
+ var r3 = m.colorAttr(e3, "color");
1038
+ return `${l.default.lengthAttr(e3, "sz", c.LengthUsage.Border)} solid ${"auto" == r3 ? t2.autos.borderColor : r3}`;
1039
+ }
1040
+ static valueOfTblLayout(e3) {
1041
+ return "fixed" == l.default.attr(e3, "val") ? "fixed" : "auto";
1042
+ }
1043
+ static classNameOfCnfStyle(e3) {
1044
+ const t3 = l.default.attr(e3, "val");
1045
+ return ["first-row", "last-row", "first-col", "last-col", "odd-col", "even-col", "odd-row", "even-row", "ne-cell", "nw-cell", "se-cell", "sw-cell"].filter((e4, r3) => "1" == t3[r3]).join(" ");
1046
+ }
1047
+ static valueOfJc(e3) {
1048
+ var t3 = l.default.attr(e3, "val");
1049
+ switch (t3) {
1050
+ case "start":
1051
+ case "left":
1052
+ return "left";
1053
+ case "center":
1054
+ return "center";
1055
+ case "end":
1056
+ case "right":
1057
+ return "right";
1058
+ case "both":
1059
+ return "justify";
1060
+ }
1061
+ return t3;
1062
+ }
1063
+ static valueOfVertAlign(e3, t3 = false) {
1064
+ var r3 = l.default.attr(e3, "val");
1065
+ switch (r3) {
1066
+ case "subscript":
1067
+ return "sub";
1068
+ case "superscript":
1069
+ return t3 ? "sup" : "super";
1070
+ }
1071
+ return t3 ? null : r3;
1072
+ }
1073
+ static valueOfTextAlignment(e3) {
1074
+ var t3 = l.default.attr(e3, "val");
1075
+ switch (t3) {
1076
+ case "auto":
1077
+ case "baseline":
1078
+ return "baseline";
1079
+ case "top":
1080
+ return "top";
1081
+ case "center":
1082
+ return "middle";
1083
+ case "bottom":
1084
+ return "bottom";
1085
+ }
1086
+ return t3;
1087
+ }
1088
+ static addSize(e3, t3) {
1089
+ return null == e3 ? t3 : null == t3 ? e3 : `calc(${e3} + ${t3})`;
1090
+ }
1091
+ static classNameOftblLook(e3) {
1092
+ const t3 = l.default.hexAttr(e3, "val", 0);
1093
+ let r3 = "";
1094
+ return (l.default.boolAttr(e3, "firstRow") || 32 & t3) && (r3 += " first-row"), (l.default.boolAttr(e3, "lastRow") || 64 & t3) && (r3 += " last-row"), (l.default.boolAttr(e3, "firstColumn") || 128 & t3) && (r3 += " first-col"), (l.default.boolAttr(e3, "lastColumn") || 256 & t3) && (r3 += " last-col"), (l.default.boolAttr(e3, "noHBand") || 512 & t3) && (r3 += " no-hband"), (l.default.boolAttr(e3, "noVBand") || 1024 & t3) && (r3 += " no-vband"), r3.trim();
1095
+ }
1096
+ }
1097
+ }, 162: (e2, t2, r2) => {
1098
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CorePropsPart = void 0;
1099
+ const a2 = r2(530), s = r2(614);
1100
+ class n extends a2.Part {
1101
+ parseXml(e3) {
1102
+ this.props = (0, s.parseCoreProps)(e3, this._package.xmlParser);
1103
+ }
1104
+ }
1105
+ t2.CorePropsPart = n;
1106
+ }, 614: (e2, t2) => {
1107
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseCoreProps = void 0, t2.parseCoreProps = function(e3, t3) {
1108
+ const r2 = {};
1109
+ for (let a2 of t3.elements(e3))
1110
+ switch (a2.localName) {
1111
+ case "title":
1112
+ r2.title = a2.textContent;
1113
+ break;
1114
+ case "description":
1115
+ r2.description = a2.textContent;
1116
+ break;
1117
+ case "subject":
1118
+ r2.subject = a2.textContent;
1119
+ break;
1120
+ case "creator":
1121
+ r2.creator = a2.textContent;
1122
+ break;
1123
+ case "keywords":
1124
+ r2.keywords = a2.textContent;
1125
+ break;
1126
+ case "language":
1127
+ r2.language = a2.textContent;
1128
+ break;
1129
+ case "lastModifiedBy":
1130
+ r2.lastModifiedBy = a2.textContent;
1131
+ break;
1132
+ case "revision":
1133
+ a2.textContent && (r2.revision = parseInt(a2.textContent));
1134
+ }
1135
+ return r2;
1136
+ };
1137
+ }, 177: (e2, t2, r2) => {
1138
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.CustomPropsPart = void 0;
1139
+ const a2 = r2(530), s = r2(821);
1140
+ class n extends a2.Part {
1141
+ parseXml(e3) {
1142
+ this.props = (0, s.parseCustomProps)(e3, this._package.xmlParser);
1143
+ }
1144
+ }
1145
+ t2.CustomPropsPart = n;
1146
+ }, 821: (e2, t2) => {
1147
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseCustomProps = void 0, t2.parseCustomProps = function(e3, t3) {
1148
+ return t3.elements(e3, "property").map((e4) => {
1149
+ const r2 = e4.firstChild;
1150
+ return { formatId: t3.attr(e4, "fmtid"), name: t3.attr(e4, "name"), type: r2.nodeName, value: r2.textContent };
1151
+ });
1152
+ };
1153
+ }, 665: (e2, t2, r2) => {
1154
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.ExtendedPropsPart = void 0;
1155
+ const a2 = r2(530), s = r2(668);
1156
+ class n extends a2.Part {
1157
+ parseXml(e3) {
1158
+ this.props = (0, s.parseExtendedProps)(e3, this._package.xmlParser);
1159
+ }
1160
+ }
1161
+ t2.ExtendedPropsPart = n;
1162
+ }, 668: (e2, t2) => {
1163
+ function r2(e3) {
1164
+ if (void 0 !== e3)
1165
+ return parseInt(e3);
1166
+ }
1167
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseExtendedProps = void 0, t2.parseExtendedProps = function(e3, t3) {
1168
+ const a2 = {};
1169
+ for (let s of t3.elements(e3))
1170
+ switch (s.localName) {
1171
+ case "Template":
1172
+ a2.template = s.textContent;
1173
+ break;
1174
+ case "Pages":
1175
+ a2.pages = r2(s.textContent);
1176
+ break;
1177
+ case "Words":
1178
+ a2.words = r2(s.textContent);
1179
+ break;
1180
+ case "Characters":
1181
+ a2.characters = r2(s.textContent);
1182
+ break;
1183
+ case "Application":
1184
+ a2.application = s.textContent;
1185
+ break;
1186
+ case "Lines":
1187
+ a2.lines = r2(s.textContent);
1188
+ break;
1189
+ case "Paragraphs":
1190
+ a2.paragraphs = r2(s.textContent);
1191
+ break;
1192
+ case "Company":
1193
+ a2.company = s.textContent;
1194
+ break;
1195
+ case "AppVersion":
1196
+ a2.appVersion = s.textContent;
1197
+ }
1198
+ return a2;
1199
+ };
1200
+ }, 172: (e2, t2, r2) => {
1201
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseBookmarkEnd = t2.parseBookmarkStart = void 0;
1202
+ const a2 = r2(120);
1203
+ t2.parseBookmarkStart = function(e3, t3) {
1204
+ return { type: a2.DomType.BookmarkStart, id: t3.attr(e3, "id"), name: t3.attr(e3, "name"), colFirst: t3.intAttr(e3, "colFirst"), colLast: t3.intAttr(e3, "colLast") };
1205
+ }, t2.parseBookmarkEnd = function(e3, t3) {
1206
+ return { type: a2.DomType.BookmarkEnd, id: t3.attr(e3, "id") };
1207
+ };
1208
+ }, 191: (e2, t2, r2) => {
1209
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseBorders = t2.parseBorder = void 0;
1210
+ const a2 = r2(149);
1211
+ function s(e3, t3) {
1212
+ return { type: t3.attr(e3, "val"), color: t3.attr(e3, "color"), size: t3.lengthAttr(e3, "sz", a2.LengthUsage.Border), offset: t3.lengthAttr(e3, "space", a2.LengthUsage.Point), frame: t3.boolAttr(e3, "frame"), shadow: t3.boolAttr(e3, "shadow") };
1213
+ }
1214
+ t2.parseBorder = s, t2.parseBorders = function(e3, t3) {
1215
+ var r3 = {};
1216
+ for (let a3 of t3.elements(e3))
1217
+ switch (a3.localName) {
1218
+ case "left":
1219
+ r3.left = s(a3, t3);
1220
+ break;
1221
+ case "top":
1222
+ r3.top = s(a3, t3);
1223
+ break;
1224
+ case "right":
1225
+ r3.right = s(a3, t3);
1226
+ break;
1227
+ case "bottom":
1228
+ r3.bottom = s(a3, t3);
1229
+ }
1230
+ return r3;
1231
+ };
1232
+ }, 149: (e2, t2) => {
1233
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseCommonProperty = t2.convertPercentage = t2.convertBoolean = t2.convertLength = t2.LengthUsage = t2.ns = void 0, t2.ns = { wordml: "http://schemas.openxmlformats.org/wordprocessingml/2006/main", drawingml: "http://schemas.openxmlformats.org/drawingml/2006/main", picture: "http://schemas.openxmlformats.org/drawingml/2006/picture", compatibility: "http://schemas.openxmlformats.org/markup-compatibility/2006", math: "http://schemas.openxmlformats.org/officeDocument/2006/math" }, t2.LengthUsage = { Dxa: { mul: 0.05, unit: "pt" }, Emu: { mul: 1 / 12700, unit: "pt" }, FontSize: { mul: 0.5, unit: "pt" }, Border: { mul: 0.125, unit: "pt" }, Point: { mul: 1, unit: "pt" }, Percent: { mul: 0.02, unit: "%" }, LineHeight: { mul: 1 / 240, unit: "" }, VmlEmu: { mul: 1 / 12700, unit: "" } }, t2.convertLength = function(e3, r2 = t2.LengthUsage.Dxa) {
1234
+ return null == e3 || /.+(p[xt]|[%])$/.test(e3) ? e3 : `${(parseInt(e3) * r2.mul).toFixed(2)}${r2.unit}`;
1235
+ }, t2.convertBoolean = function(e3, t3 = false) {
1236
+ switch (e3) {
1237
+ case "1":
1238
+ case "on":
1239
+ case "true":
1240
+ return true;
1241
+ case "0":
1242
+ case "off":
1243
+ case "false":
1244
+ return false;
1245
+ default:
1246
+ return t3;
1247
+ }
1248
+ }, t2.convertPercentage = function(e3) {
1249
+ return e3 ? parseInt(e3) / 100 : null;
1250
+ }, t2.parseCommonProperty = function(e3, r2, a2) {
1251
+ if (e3.namespaceURI != t2.ns.wordml)
1252
+ return false;
1253
+ switch (e3.localName) {
1254
+ case "color":
1255
+ r2.color = a2.attr(e3, "val");
1256
+ break;
1257
+ case "sz":
1258
+ r2.fontSize = a2.lengthAttr(e3, "val", t2.LengthUsage.FontSize);
1259
+ break;
1260
+ default:
1261
+ return false;
1262
+ }
1263
+ return true;
1264
+ };
1265
+ }, 448: (e2, t2, r2) => {
1266
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.DocumentPart = void 0;
1267
+ const a2 = r2(530);
1268
+ class s extends a2.Part {
1269
+ constructor(e3, t3, r3) {
1270
+ super(e3, t3), this._documentParser = r3;
1271
+ }
1272
+ parseXml(e3) {
1273
+ this.body = this._documentParser.parseDocumentFile(e3);
1274
+ }
1275
+ }
1276
+ t2.DocumentPart = s;
1277
+ }, 120: (e2, t2) => {
1278
+ var r2;
1279
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.DomType = void 0, function(e3) {
1280
+ e3.Document = "document", e3.Paragraph = "paragraph", e3.Run = "run", e3.Break = "break", e3.NoBreakHyphen = "noBreakHyphen", e3.Table = "table", e3.Row = "row", e3.Cell = "cell", e3.Hyperlink = "hyperlink", e3.Drawing = "drawing", e3.Image = "image", e3.Text = "text", e3.Tab = "tab", e3.Symbol = "symbol", e3.BookmarkStart = "bookmarkStart", e3.BookmarkEnd = "bookmarkEnd", e3.Footer = "footer", e3.Header = "header", e3.FootnoteReference = "footnoteReference", e3.EndnoteReference = "endnoteReference", e3.Footnote = "footnote", e3.Endnote = "endnote", e3.SimpleField = "simpleField", e3.ComplexField = "complexField", e3.Instruction = "instruction", e3.VmlPicture = "vmlPicture", e3.MmlMath = "mmlMath", e3.MmlMathParagraph = "mmlMathParagraph", e3.MmlFraction = "mmlFraction", e3.MmlNumerator = "mmlNumerator", e3.MmlDenominator = "mmlDenominator", e3.MmlRadical = "mmlRadical", e3.MmlBase = "mmlBase", e3.MmlDegree = "mmlDegree", e3.MmlSuperscript = "mmlSuperscript", e3.MmlSubscript = "mmlSubscript", e3.MmlSubArgument = "mmlSubArgument", e3.MmlSuperArgument = "mmlSuperArgument", e3.MmlNary = "mmlNary", e3.MmlDelimiter = "mmlDelimiter", e3.MmlRun = "mmlRun", e3.VmlElement = "vmlElement", e3.Inserted = "inserted", e3.Deleted = "deleted", e3.DeletedText = "deletedText";
1281
+ }(r2 || (t2.DomType = r2 = {}));
1282
+ }, 931: (e2, t2) => {
1283
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseLineSpacing = void 0, t2.parseLineSpacing = function(e3, t3) {
1284
+ return { before: t3.lengthAttr(e3, "before"), after: t3.lengthAttr(e3, "after"), line: t3.intAttr(e3, "line"), lineRule: t3.attr(e3, "lineRule") };
1285
+ };
1286
+ }, 109: (e2, t2, r2) => {
1287
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseNumbering = t2.parseTabs = t2.parseParagraphProperty = t2.parseParagraphProperties = void 0;
1288
+ const a2 = r2(149), s = r2(59), n = r2(931), l = r2(488);
1289
+ function o(e3, t3, r3) {
1290
+ if (e3.namespaceURI != a2.ns.wordml)
1291
+ return false;
1292
+ if ((0, a2.parseCommonProperty)(e3, t3, r3))
1293
+ return true;
1294
+ switch (e3.localName) {
1295
+ case "tabs":
1296
+ t3.tabs = i(e3, r3);
1297
+ break;
1298
+ case "sectPr":
1299
+ t3.sectionProps = (0, s.parseSectionProperties)(e3, r3);
1300
+ break;
1301
+ case "numPr":
1302
+ t3.numbering = c(e3, r3);
1303
+ break;
1304
+ case "spacing":
1305
+ return t3.lineSpacing = (0, n.parseLineSpacing)(e3, r3), false;
1306
+ case "textAlignment":
1307
+ return t3.textAlignment = r3.attr(e3, "val"), false;
1308
+ case "keepNext":
1309
+ t3.keepLines = r3.boolAttr(e3, "val", true);
1310
+ break;
1311
+ case "keepNext":
1312
+ t3.keepNext = r3.boolAttr(e3, "val", true);
1313
+ break;
1314
+ case "pageBreakBefore":
1315
+ t3.pageBreakBefore = r3.boolAttr(e3, "val", true);
1316
+ break;
1317
+ case "outlineLvl":
1318
+ t3.outlineLevel = r3.intAttr(e3, "val");
1319
+ break;
1320
+ case "pStyle":
1321
+ t3.styleName = r3.attr(e3, "val");
1322
+ break;
1323
+ case "rPr":
1324
+ t3.runProps = (0, l.parseRunProperties)(e3, r3);
1325
+ break;
1326
+ default:
1327
+ return false;
1328
+ }
1329
+ return true;
1330
+ }
1331
+ function i(e3, t3) {
1332
+ return t3.elements(e3, "tab").map((e4) => ({ position: t3.lengthAttr(e4, "pos"), leader: t3.attr(e4, "leader"), style: t3.attr(e4, "val") }));
1333
+ }
1334
+ function c(e3, t3) {
1335
+ var r3 = {};
1336
+ for (let a3 of t3.elements(e3))
1337
+ switch (a3.localName) {
1338
+ case "numId":
1339
+ r3.id = t3.attr(a3, "val");
1340
+ break;
1341
+ case "ilvl":
1342
+ r3.level = t3.intAttr(a3, "val");
1343
+ }
1344
+ return r3;
1345
+ }
1346
+ t2.parseParagraphProperties = function(e3, t3) {
1347
+ let r3 = {};
1348
+ for (let a3 of t3.elements(e3))
1349
+ o(a3, r3, t3);
1350
+ return r3;
1351
+ }, t2.parseParagraphProperty = o, t2.parseTabs = i, t2.parseNumbering = c;
1352
+ }, 488: (e2, t2, r2) => {
1353
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseRunProperty = t2.parseRunProperties = void 0;
1354
+ const a2 = r2(149);
1355
+ function s(e3, t3, r3) {
1356
+ return !!(0, a2.parseCommonProperty)(e3, t3, r3);
1357
+ }
1358
+ t2.parseRunProperties = function(e3, t3) {
1359
+ let r3 = {};
1360
+ for (let a3 of t3.elements(e3))
1361
+ s(a3, r3, t3);
1362
+ return r3;
1363
+ }, t2.parseRunProperty = s;
1364
+ }, 59: (e2, t2, r2) => {
1365
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseSectionProperties = t2.SectionType = void 0;
1366
+ const a2 = r2(472), s = r2(191);
1367
+ var n;
1368
+ function l(e3, t3) {
1369
+ return { numberOfColumns: t3.intAttr(e3, "num"), space: t3.lengthAttr(e3, "space"), separator: t3.boolAttr(e3, "sep"), equalWidth: t3.boolAttr(e3, "equalWidth", true), columns: t3.elements(e3, "col").map((e4) => ({ width: t3.lengthAttr(e4, "w"), space: t3.lengthAttr(e4, "space") })) };
1370
+ }
1371
+ function o(e3, t3) {
1372
+ return { chapSep: t3.attr(e3, "chapSep"), chapStyle: t3.attr(e3, "chapStyle"), format: t3.attr(e3, "fmt"), start: t3.intAttr(e3, "start") };
1373
+ }
1374
+ function i(e3, t3) {
1375
+ return { id: t3.attr(e3, "id"), type: t3.attr(e3, "type") };
1376
+ }
1377
+ !function(e3) {
1378
+ e3.Continuous = "continuous", e3.NextPage = "nextPage", e3.NextColumn = "nextColumn", e3.EvenPage = "evenPage", e3.OddPage = "oddPage";
1379
+ }(n || (t2.SectionType = n = {})), t2.parseSectionProperties = function(e3, t3 = a2.default) {
1380
+ var r3, n2, c = {};
1381
+ for (let a3 of t3.elements(e3))
1382
+ switch (a3.localName) {
1383
+ case "pgSz":
1384
+ c.pageSize = { width: t3.lengthAttr(a3, "w"), height: t3.lengthAttr(a3, "h"), orientation: t3.attr(a3, "orient") };
1385
+ break;
1386
+ case "type":
1387
+ c.type = t3.attr(a3, "val");
1388
+ break;
1389
+ case "pgMar":
1390
+ c.pageMargins = { left: t3.lengthAttr(a3, "left"), right: t3.lengthAttr(a3, "right"), top: t3.lengthAttr(a3, "top"), bottom: t3.lengthAttr(a3, "bottom"), header: t3.lengthAttr(a3, "header"), footer: t3.lengthAttr(a3, "footer"), gutter: t3.lengthAttr(a3, "gutter") };
1391
+ break;
1392
+ case "cols":
1393
+ c.columns = l(a3, t3);
1394
+ break;
1395
+ case "headerReference":
1396
+ (null !== (r3 = c.headerRefs) && void 0 !== r3 ? r3 : c.headerRefs = []).push(i(a3, t3));
1397
+ break;
1398
+ case "footerReference":
1399
+ (null !== (n2 = c.footerRefs) && void 0 !== n2 ? n2 : c.footerRefs = []).push(i(a3, t3));
1400
+ break;
1401
+ case "titlePg":
1402
+ c.titlePage = t3.boolAttr(a3, "val", true);
1403
+ break;
1404
+ case "pgBorders":
1405
+ c.pageBorders = (0, s.parseBorders)(a3, t3);
1406
+ break;
1407
+ case "pgNumType":
1408
+ c.pageNumber = o(a3, t3);
1409
+ }
1410
+ return c;
1411
+ };
1412
+ }, 667: (e2, t2, r2) => {
1413
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.renderAsync = t2.praseAsync = t2.defaultOptions = void 0;
1414
+ const a2 = r2(213), s = r2(168), n = r2(932);
1415
+ t2.defaultOptions = { ignoreHeight: false, ignoreWidth: false, ignoreFonts: false, breakPages: true, debug: false, experimental: false, className: "docx", inWrapper: true, trimXmlDeclaration: true, ignoreLastRenderedPageBreak: true, renderHeaders: true, renderFooters: true, renderFootnotes: true, renderEndnotes: true, useBase64URL: false, useMathMLPolyfill: false, renderChanges: false }, t2.praseAsync = function(e3, r3 = null) {
1416
+ const n2 = Object.assign(Object.assign({}, t2.defaultOptions), r3);
1417
+ return a2.WordDocument.load(e3, new s.DocumentParser(n2), n2);
1418
+ }, t2.renderAsync = async function(e3, r3, l = null, o = null) {
1419
+ const i = Object.assign(Object.assign({}, t2.defaultOptions), o), c = new n.HtmlRenderer(window.document), u = await a2.WordDocument.load(e3, new s.DocumentParser(i), i);
1420
+ return c.render(u, r3, l, i), u;
1421
+ };
1422
+ }, 380: (e2, t2, r2) => {
1423
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.FontTablePart = void 0;
1424
+ const a2 = r2(530), s = r2(512);
1425
+ class n extends a2.Part {
1426
+ parseXml(e3) {
1427
+ this.fonts = (0, s.parseFonts)(e3, this._package.xmlParser);
1428
+ }
1429
+ }
1430
+ t2.FontTablePart = n;
1431
+ }, 512: (e2, t2) => {
1432
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseEmbedFontRef = t2.parseFont = t2.parseFonts = void 0;
1433
+ const r2 = { embedRegular: "regular", embedBold: "bold", embedItalic: "italic", embedBoldItalic: "boldItalic" };
1434
+ function a2(e3, t3) {
1435
+ let r3 = { name: t3.attr(e3, "name"), embedFontRefs: [] };
1436
+ for (let a3 of t3.elements(e3))
1437
+ switch (a3.localName) {
1438
+ case "family":
1439
+ r3.family = t3.attr(a3, "val");
1440
+ break;
1441
+ case "altName":
1442
+ r3.altName = t3.attr(a3, "val");
1443
+ break;
1444
+ case "embedRegular":
1445
+ case "embedBold":
1446
+ case "embedItalic":
1447
+ case "embedBoldItalic":
1448
+ r3.embedFontRefs.push(s(a3, t3));
1449
+ }
1450
+ return r3;
1451
+ }
1452
+ function s(e3, t3) {
1453
+ return { id: t3.attr(e3, "id"), key: t3.attr(e3, "fontKey"), type: r2[e3.localName] };
1454
+ }
1455
+ t2.parseFonts = function(e3, t3) {
1456
+ return t3.elements(e3).map((e4) => a2(e4, t3));
1457
+ }, t2.parseFont = a2, t2.parseEmbedFontRef = s;
1458
+ }, 984: (e2, t2, r2) => {
1459
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.WmlFooter = t2.WmlHeader = void 0;
1460
+ const a2 = r2(120);
1461
+ t2.WmlHeader = class {
1462
+ constructor() {
1463
+ this.type = a2.DomType.Header, this.children = [], this.cssStyle = {};
1464
+ }
1465
+ }, t2.WmlFooter = class {
1466
+ constructor() {
1467
+ this.type = a2.DomType.Footer, this.children = [], this.cssStyle = {};
1468
+ }
1469
+ };
1470
+ }, 985: (e2, t2, r2) => {
1471
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.FooterPart = t2.HeaderPart = t2.BaseHeaderFooterPart = void 0;
1472
+ const a2 = r2(530), s = r2(984);
1473
+ class n extends a2.Part {
1474
+ constructor(e3, t3, r3) {
1475
+ super(e3, t3), this._documentParser = r3;
1476
+ }
1477
+ parseXml(e3) {
1478
+ this.rootElement = this.createRootElement(), this.rootElement.children = this._documentParser.parseBodyElements(e3);
1479
+ }
1480
+ }
1481
+ t2.BaseHeaderFooterPart = n, t2.HeaderPart = class extends n {
1482
+ createRootElement() {
1483
+ return new s.WmlHeader();
1484
+ }
1485
+ }, t2.FooterPart = class extends n {
1486
+ createRootElement() {
1487
+ return new s.WmlFooter();
1488
+ }
1489
+ };
1490
+ }, 932: (e2, t2, r2) => {
1491
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.HtmlRenderer = void 0;
1492
+ const a2 = r2(120), s = r2(593), n = r2(630), l = r2(438), o = "http://www.w3.org/1998/Math/MathML";
1493
+ function i(e3, t3, r3) {
1494
+ return u(void 0, e3, t3, r3);
1495
+ }
1496
+ function c(e3, t3, r3) {
1497
+ return u("http://www.w3.org/2000/svg", e3, t3, r3);
1498
+ }
1499
+ function u(e3, t3, r3, a3) {
1500
+ var s2 = e3 ? document.createElementNS(e3, t3) : document.createElement(t3);
1501
+ return Object.assign(s2, r3), a3 && d(s2, a3), s2;
1502
+ }
1503
+ function p(e3) {
1504
+ e3.innerHTML = "";
1505
+ }
1506
+ function d(e3, t3) {
1507
+ t3.forEach((t4) => e3.appendChild((0, s.isString)(t4) ? document.createTextNode(t4) : t4));
1508
+ }
1509
+ function h(e3) {
1510
+ return i("style", { innerHTML: e3 });
1511
+ }
1512
+ function m(e3, t3) {
1513
+ e3.appendChild(document.createComment(t3));
1514
+ }
1515
+ t2.HtmlRenderer = class {
1516
+ constructor(e3) {
1517
+ this.htmlDocument = e3, this.className = "docx", this.styleMap = {}, this.currentPart = null, this.tableVerticalMerges = [], this.currentVerticalMerge = null, this.tableCellPositions = [], this.currentCellPosition = null, this.footnoteMap = {}, this.endnoteMap = {}, this.currentEndnoteIds = [], this.usedHederFooterParts = [], this.currentTabs = [], this.tabsTimeout = 0, this.createElement = i;
1518
+ }
1519
+ render(e3, t3, r3 = null, a3) {
1520
+ var n2;
1521
+ this.document = e3, this.options = a3, this.className = a3.className, this.rootSelector = a3.inWrapper ? `.${this.className}-wrapper` : ":root", this.styleMap = null, p(r3 = r3 || t3), p(t3), m(r3, "docxjs library predefined styles"), r3.appendChild(this.renderDefaultStyle()), !window.MathMLElement && a3.useMathMLPolyfill && (m(r3, "docxjs mathml polyfill styles"), r3.appendChild(h(l.default))), e3.themePart && (m(r3, "docxjs document theme values"), this.renderTheme(e3.themePart, r3)), null != e3.stylesPart && (this.styleMap = this.processStyles(e3.stylesPart.styles), m(r3, "docxjs document styles"), r3.appendChild(this.renderStyles(e3.stylesPart.styles))), e3.numberingPart && (this.prodessNumberings(e3.numberingPart.domNumberings), m(r3, "docxjs document numbering styles"), r3.appendChild(this.renderNumbering(e3.numberingPart.domNumberings, r3))), e3.footnotesPart && (this.footnoteMap = (0, s.keyBy)(e3.footnotesPart.notes, (e4) => e4.id)), e3.endnotesPart && (this.endnoteMap = (0, s.keyBy)(e3.endnotesPart.notes, (e4) => e4.id)), e3.settingsPart && (this.defaultTabSize = null === (n2 = e3.settingsPart.settings) || void 0 === n2 ? void 0 : n2.defaultTabStop), !a3.ignoreFonts && e3.fontTablePart && this.renderFontTable(e3.fontTablePart, r3);
1522
+ var o2 = this.renderSections(e3.documentPart.body);
1523
+ this.options.inWrapper ? t3.appendChild(this.renderWrapper(o2)) : d(t3, o2), this.refreshTabStops();
1524
+ }
1525
+ renderTheme(e3, t3) {
1526
+ var r3, a3;
1527
+ const s2 = {}, n2 = null === (r3 = e3.theme) || void 0 === r3 ? void 0 : r3.fontScheme;
1528
+ n2 && (n2.majorFont && (s2["--docx-majorHAnsi-font"] = n2.majorFont.latinTypeface), n2.minorFont && (s2["--docx-minorHAnsi-font"] = n2.minorFont.latinTypeface));
1529
+ const l2 = null === (a3 = e3.theme) || void 0 === a3 ? void 0 : a3.colorScheme;
1530
+ if (l2)
1531
+ for (let [e4, t4] of Object.entries(l2.colors))
1532
+ s2[`--docx-${e4}-color`] = `#${t4}`;
1533
+ const o2 = this.styleToString(`.${this.className}`, s2);
1534
+ t3.appendChild(h(o2));
1535
+ }
1536
+ renderFontTable(e3, t3) {
1537
+ for (let r3 of e3.fonts)
1538
+ for (let e4 of r3.embedFontRefs)
1539
+ this.document.loadFont(e4.id, e4.key).then((a3) => {
1540
+ const s2 = { "font-family": r3.name, src: `url(${a3})` };
1541
+ "bold" != e4.type && "boldItalic" != e4.type || (s2["font-weight"] = "bold"), "italic" != e4.type && "boldItalic" != e4.type || (s2["font-style"] = "italic"), m(t3, `docxjs ${r3.name} font`);
1542
+ const n2 = this.styleToString("@font-face", s2);
1543
+ t3.appendChild(h(n2)), this.refreshTabStops();
1544
+ });
1545
+ }
1546
+ processStyleName(e3) {
1547
+ return e3 ? `${this.className}_${(0, s.escapeClassName)(e3)}` : this.className;
1548
+ }
1549
+ processStyles(e3) {
1550
+ const t3 = (0, s.keyBy)(e3.filter((e4) => null != e4.id), (e4) => e4.id);
1551
+ for (const a3 of e3.filter((e4) => e4.basedOn)) {
1552
+ var r3 = t3[a3.basedOn];
1553
+ if (r3) {
1554
+ a3.paragraphProps = (0, s.mergeDeep)(a3.paragraphProps, r3.paragraphProps), a3.runProps = (0, s.mergeDeep)(a3.runProps, r3.runProps);
1555
+ for (const e4 of r3.styles) {
1556
+ const t4 = a3.styles.find((t5) => t5.target == e4.target);
1557
+ t4 ? this.copyStyleProperties(e4.values, t4.values) : a3.styles.push(Object.assign(Object.assign({}, e4), { values: Object.assign({}, e4.values) }));
1558
+ }
1559
+ } else
1560
+ this.options.debug && console.warn(`Can't find base style ${a3.basedOn}`);
1561
+ }
1562
+ for (let t4 of e3)
1563
+ t4.cssName = this.processStyleName(t4.id);
1564
+ return t3;
1565
+ }
1566
+ prodessNumberings(e3) {
1567
+ var t3;
1568
+ for (let r3 of e3.filter((e4) => e4.pStyleName)) {
1569
+ const e4 = this.findStyle(r3.pStyleName);
1570
+ (null === (t3 = null == e4 ? void 0 : e4.paragraphProps) || void 0 === t3 ? void 0 : t3.numbering) && (e4.paragraphProps.numbering.level = r3.level);
1571
+ }
1572
+ }
1573
+ processElement(e3) {
1574
+ if (e3.children)
1575
+ for (var t3 of e3.children)
1576
+ t3.parent = e3, t3.type == a2.DomType.Table ? this.processTable(t3) : this.processElement(t3);
1577
+ }
1578
+ processTable(e3) {
1579
+ for (var t3 of e3.children)
1580
+ for (var r3 of t3.children)
1581
+ r3.cssStyle = this.copyStyleProperties(e3.cellStyle, r3.cssStyle, ["border-left", "border-right", "border-top", "border-bottom", "padding-left", "padding-right", "padding-top", "padding-bottom"]), this.processElement(r3);
1582
+ }
1583
+ copyStyleProperties(e3, t3, r3 = null) {
1584
+ if (!e3)
1585
+ return t3;
1586
+ for (var a3 of (null == t3 && (t3 = {}), null == r3 && (r3 = Object.getOwnPropertyNames(e3)), r3))
1587
+ e3.hasOwnProperty(a3) && !t3.hasOwnProperty(a3) && (t3[a3] = e3[a3]);
1588
+ return t3;
1589
+ }
1590
+ createSection(e3, t3) {
1591
+ var r3 = this.createElement("section", { className: e3 });
1592
+ return t3 && (t3.pageMargins && (r3.style.paddingLeft = t3.pageMargins.left, r3.style.paddingRight = t3.pageMargins.right, r3.style.paddingTop = t3.pageMargins.top, r3.style.paddingBottom = t3.pageMargins.bottom), t3.pageSize && (this.options.ignoreWidth || (r3.style.width = t3.pageSize.width), this.options.ignoreHeight || (r3.style.minHeight = t3.pageSize.height)), t3.columns && t3.columns.numberOfColumns && (r3.style.columnCount = `${t3.columns.numberOfColumns}`, r3.style.columnGap = t3.columns.space, t3.columns.separator && (r3.style.columnRule = "1px solid black"))), r3;
1593
+ }
1594
+ renderSections(e3) {
1595
+ const t3 = [];
1596
+ this.processElement(e3);
1597
+ const r3 = this.splitBySection(e3.children);
1598
+ let a3 = null;
1599
+ for (let n2 = 0, l2 = r3.length; n2 < l2; n2++) {
1600
+ this.currentFootnoteIds = [];
1601
+ const o2 = r3[n2], i2 = o2.sectProps || e3.props, c2 = this.createSection(this.className, i2);
1602
+ this.renderStyleValues(e3.cssStyle, c2), this.options.renderHeaders && this.renderHeaderFooter(i2.headerRefs, i2, t3.length, a3 != i2, c2);
1603
+ var s2 = this.createElement("article");
1604
+ this.renderElements(o2.elements, s2), c2.appendChild(s2), this.options.renderFootnotes && this.renderNotes(this.currentFootnoteIds, this.footnoteMap, c2), this.options.renderEndnotes && n2 == l2 - 1 && this.renderNotes(this.currentEndnoteIds, this.endnoteMap, c2), this.options.renderFooters && this.renderHeaderFooter(i2.footerRefs, i2, t3.length, a3 != i2, c2), t3.push(c2), a3 = i2;
1605
+ }
1606
+ return t3;
1607
+ }
1608
+ renderHeaderFooter(e3, t3, r3, a3, s2) {
1609
+ var n2, l2;
1610
+ if (e3) {
1611
+ var o2 = null !== (l2 = null !== (n2 = t3.titlePage && a3 ? e3.find((e4) => "first" == e4.type) : null) && void 0 !== n2 ? n2 : r3 % 2 == 1 ? e3.find((e4) => "even" == e4.type) : null) && void 0 !== l2 ? l2 : e3.find((e4) => "default" == e4.type), i2 = o2 && this.document.findPartByRelId(o2.id, this.document.documentPart);
1612
+ i2 && (this.currentPart = i2, this.usedHederFooterParts.includes(i2.path) || (this.processElement(i2.rootElement), this.usedHederFooterParts.push(i2.path)), this.renderElements([i2.rootElement], s2), this.currentPart = null);
1613
+ }
1614
+ }
1615
+ isPageBreakElement(e3) {
1616
+ return e3.type == a2.DomType.Break && ("lastRenderedPageBreak" == e3.break ? !this.options.ignoreLastRenderedPageBreak : "page" == e3.break);
1617
+ }
1618
+ splitBySection(e3) {
1619
+ var t3, r3 = { sectProps: null, elements: [] }, s2 = [r3];
1620
+ for (let u3 of e3) {
1621
+ if (u3.type == a2.DomType.Paragraph) {
1622
+ const e4 = this.findStyle(u3.styleName);
1623
+ (null === (t3 = null == e4 ? void 0 : e4.paragraphProps) || void 0 === t3 ? void 0 : t3.pageBreakBefore) && (r3.sectProps = n2, r3 = { sectProps: null, elements: [] }, s2.push(r3));
1624
+ }
1625
+ if (r3.elements.push(u3), u3.type == a2.DomType.Paragraph) {
1626
+ const e4 = u3;
1627
+ var n2 = e4.sectionProps, l2 = -1, o2 = -1;
1628
+ if (this.options.breakPages && e4.children && (l2 = e4.children.findIndex((e5) => {
1629
+ var t4, r4;
1630
+ return -1 != (o2 = null !== (r4 = null === (t4 = e5.children) || void 0 === t4 ? void 0 : t4.findIndex(this.isPageBreakElement.bind(this))) && void 0 !== r4 ? r4 : -1);
1631
+ })), (n2 || -1 != l2) && (r3.sectProps = n2, r3 = { sectProps: null, elements: [] }, s2.push(r3)), -1 != l2) {
1632
+ let t4 = e4.children[l2], a3 = o2 < t4.children.length - 1;
1633
+ if (l2 < e4.children.length - 1 || a3) {
1634
+ var i2 = u3.children, c2 = Object.assign(Object.assign({}, u3), { children: i2.slice(l2) });
1635
+ if (u3.children = i2.slice(0, l2), r3.elements.push(c2), a3) {
1636
+ let e5 = t4.children, r4 = Object.assign(Object.assign({}, t4), { children: e5.slice(0, o2) });
1637
+ u3.children.push(r4), t4.children = e5.slice(o2);
1638
+ }
1639
+ }
1640
+ }
1641
+ }
1642
+ }
1643
+ let u2 = null;
1644
+ for (let e4 = s2.length - 1; e4 >= 0; e4--)
1645
+ null == s2[e4].sectProps ? s2[e4].sectProps = u2 : u2 = s2[e4].sectProps;
1646
+ return s2;
1647
+ }
1648
+ renderWrapper(e3) {
1649
+ return this.createElement("div", { className: `${this.className}-wrapper` }, e3);
1650
+ }
1651
+ renderDefaultStyle() {
1652
+ var e3 = this.className;
1653
+ return h(`
1654
+ .${e3}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; }
1655
+ .${e3}-wrapper>section.${e3} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
1656
+ .${e3} { color: black; }
1657
+ section.${e3} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
1658
+ section.${e3}>article { margin-bottom: auto; }
1659
+ .${e3} table { border-collapse: collapse; }
1660
+ .${e3} table td, .${e3} table th { vertical-align: top; }
1661
+ .${e3} p { margin: 0pt; min-height: 1em; }
1662
+ .${e3} span { white-space: pre-wrap; overflow-wrap: break-word; }
1663
+ .${e3} a { color: inherit; text-decoration: inherit; }
1664
+ `);
1665
+ }
1666
+ renderNumbering(e3, t3) {
1667
+ var r3 = "", a3 = [];
1668
+ for (var s2 of e3) {
1669
+ var n2 = `p.${this.numberingClass(s2.id, s2.level)}`, l2 = "none";
1670
+ if (s2.bullet) {
1671
+ let e4 = `--${this.className}-${s2.bullet.src}`.toLowerCase();
1672
+ r3 += this.styleToString(`${n2}:before`, { content: "' '", display: "inline-block", background: `var(${e4})` }, s2.bullet.style), this.document.loadNumberingImage(s2.bullet.src).then((r4) => {
1673
+ var a4 = `${this.rootSelector} { ${e4}: url(${r4}) }`;
1674
+ t3.appendChild(h(a4));
1675
+ });
1676
+ } else if (s2.levelText) {
1677
+ let e4 = this.numberingCounter(s2.id, s2.level);
1678
+ s2.level > 0 ? r3 += this.styleToString(`p.${this.numberingClass(s2.id, s2.level - 1)}`, { "counter-reset": e4 }) : a3.push(e4), r3 += this.styleToString(`${n2}:before`, Object.assign({ content: this.levelTextToContent(s2.levelText, s2.suff, s2.id, this.numFormatToCssValue(s2.format)), "counter-increment": e4 }, s2.rStyle));
1679
+ } else
1680
+ l2 = this.numFormatToCssValue(s2.format);
1681
+ r3 += this.styleToString(n2, Object.assign({ display: "list-item", "list-style-position": "inside", "list-style-type": l2 }, s2.pStyle));
1682
+ }
1683
+ return a3.length > 0 && (r3 += this.styleToString(this.rootSelector, { "counter-reset": a3.join(" ") })), h(r3);
1684
+ }
1685
+ renderStyles(e3) {
1686
+ var t3, r3 = "";
1687
+ const a3 = this.styleMap, n2 = (0, s.keyBy)(e3.filter((e4) => e4.isDefault), (e4) => e4.target);
1688
+ for (const s2 of e3) {
1689
+ var l2 = s2.styles;
1690
+ if (s2.linked) {
1691
+ var o2 = s2.linked && a3[s2.linked];
1692
+ o2 ? l2 = l2.concat(o2.styles) : this.options.debug && console.warn(`Can't find linked style ${s2.linked}`);
1693
+ }
1694
+ for (const e4 of l2) {
1695
+ var i2 = `${null !== (t3 = s2.target) && void 0 !== t3 ? t3 : ""}.${s2.cssName}`;
1696
+ s2.target != e4.target && (i2 += ` ${e4.target}`), n2[s2.target] == s2 && (i2 = `.${this.className} ${s2.target}, ` + i2), r3 += this.styleToString(i2, e4.values);
1697
+ }
1698
+ }
1699
+ return h(r3);
1700
+ }
1701
+ renderNotes(e3, t3, r3) {
1702
+ var a3 = e3.map((e4) => t3[e4]).filter((e4) => e4);
1703
+ if (a3.length > 0) {
1704
+ var s2 = this.createElement("ol", null, this.renderElements(a3));
1705
+ r3.appendChild(s2);
1706
+ }
1707
+ }
1708
+ renderElement(e3) {
1709
+ switch (e3.type) {
1710
+ case a2.DomType.Paragraph:
1711
+ return this.renderParagraph(e3);
1712
+ case a2.DomType.BookmarkStart:
1713
+ return this.renderBookmarkStart(e3);
1714
+ case a2.DomType.BookmarkEnd:
1715
+ return null;
1716
+ case a2.DomType.Run:
1717
+ return this.renderRun(e3);
1718
+ case a2.DomType.Table:
1719
+ return this.renderTable(e3);
1720
+ case a2.DomType.Row:
1721
+ return this.renderTableRow(e3);
1722
+ case a2.DomType.Cell:
1723
+ return this.renderTableCell(e3);
1724
+ case a2.DomType.Hyperlink:
1725
+ return this.renderHyperlink(e3);
1726
+ case a2.DomType.Drawing:
1727
+ return this.renderDrawing(e3);
1728
+ case a2.DomType.Image:
1729
+ return this.renderImage(e3);
1730
+ case a2.DomType.Text:
1731
+ case a2.DomType.Text:
1732
+ return this.renderText(e3);
1733
+ case a2.DomType.DeletedText:
1734
+ return this.renderDeletedText(e3);
1735
+ case a2.DomType.Tab:
1736
+ return this.renderTab(e3);
1737
+ case a2.DomType.Symbol:
1738
+ return this.renderSymbol(e3);
1739
+ case a2.DomType.Break:
1740
+ return this.renderBreak(e3);
1741
+ case a2.DomType.Footer:
1742
+ return this.renderContainer(e3, "footer");
1743
+ case a2.DomType.Header:
1744
+ return this.renderContainer(e3, "header");
1745
+ case a2.DomType.Footnote:
1746
+ case a2.DomType.Endnote:
1747
+ return this.renderContainer(e3, "li");
1748
+ case a2.DomType.FootnoteReference:
1749
+ return this.renderFootnoteReference(e3);
1750
+ case a2.DomType.EndnoteReference:
1751
+ return this.renderEndnoteReference(e3);
1752
+ case a2.DomType.NoBreakHyphen:
1753
+ return this.createElement("wbr");
1754
+ case a2.DomType.VmlPicture:
1755
+ return this.renderVmlPicture(e3);
1756
+ case a2.DomType.VmlElement:
1757
+ return this.renderVmlElement(e3);
1758
+ case a2.DomType.MmlMath:
1759
+ return this.renderContainerNS(e3, o, "math", { xmlns: o });
1760
+ case a2.DomType.MmlMathParagraph:
1761
+ return this.renderContainer(e3, "span");
1762
+ case a2.DomType.MmlFraction:
1763
+ return this.renderContainerNS(e3, o, "mfrac");
1764
+ case a2.DomType.MmlNumerator:
1765
+ case a2.DomType.MmlDenominator:
1766
+ return this.renderContainerNS(e3, o, "mrow");
1767
+ case a2.DomType.MmlRadical:
1768
+ return this.renderMmlRadical(e3);
1769
+ case a2.DomType.MmlDegree:
1770
+ return this.renderContainerNS(e3, o, "mn");
1771
+ case a2.DomType.MmlSuperscript:
1772
+ return this.renderContainerNS(e3, o, "msup");
1773
+ case a2.DomType.MmlSubscript:
1774
+ return this.renderContainerNS(e3, o, "msub");
1775
+ case a2.DomType.MmlBase:
1776
+ return this.renderContainerNS(e3, o, "mrow");
1777
+ case a2.DomType.MmlSuperArgument:
1778
+ case a2.DomType.MmlSubArgument:
1779
+ return this.renderContainerNS(e3, o, "mn");
1780
+ case a2.DomType.MmlDelimiter:
1781
+ return this.renderMmlDelimiter(e3);
1782
+ case a2.DomType.MmlRun:
1783
+ return this.renderMmlRun(e3);
1784
+ case a2.DomType.MmlNary:
1785
+ return this.renderMmlNary(e3);
1786
+ case a2.DomType.Inserted:
1787
+ return this.renderInserted(e3);
1788
+ case a2.DomType.Deleted:
1789
+ return this.renderDeleted(e3);
1790
+ }
1791
+ return null;
1792
+ }
1793
+ renderChildren(e3, t3) {
1794
+ return this.renderElements(e3.children, t3);
1795
+ }
1796
+ renderElements(e3, t3) {
1797
+ if (null == e3)
1798
+ return null;
1799
+ var r3 = e3.flatMap((e4) => this.renderElement(e4)).filter((e4) => null != e4);
1800
+ return t3 && d(t3, r3), r3;
1801
+ }
1802
+ renderContainer(e3, t3, r3) {
1803
+ return this.createElement(t3, r3, this.renderChildren(e3));
1804
+ }
1805
+ renderContainerNS(e3, t3, r3, a3) {
1806
+ return u(t3, r3, a3, this.renderChildren(e3));
1807
+ }
1808
+ renderParagraph(e3) {
1809
+ var t3, r3, a3, s2, n2 = this.createElement("p");
1810
+ const l2 = this.findStyle(e3.styleName);
1811
+ null !== (t3 = e3.tabs) && void 0 !== t3 || (e3.tabs = null === (r3 = null == l2 ? void 0 : l2.paragraphProps) || void 0 === r3 ? void 0 : r3.tabs), this.renderClass(e3, n2), this.renderChildren(e3, n2), this.renderStyleValues(e3.cssStyle, n2), this.renderCommonProperties(n2.style, e3);
1812
+ const o2 = null !== (a3 = e3.numbering) && void 0 !== a3 ? a3 : null === (s2 = null == l2 ? void 0 : l2.paragraphProps) || void 0 === s2 ? void 0 : s2.numbering;
1813
+ return o2 && n2.classList.add(this.numberingClass(o2.id, o2.level)), n2;
1814
+ }
1815
+ renderRunProperties(e3, t3) {
1816
+ this.renderCommonProperties(e3, t3);
1817
+ }
1818
+ renderCommonProperties(e3, t3) {
1819
+ null != t3 && (t3.color && (e3.color = t3.color), t3.fontSize && (e3["font-size"] = t3.fontSize));
1820
+ }
1821
+ renderHyperlink(e3) {
1822
+ var t3 = this.createElement("a");
1823
+ if (this.renderChildren(e3, t3), this.renderStyleValues(e3.cssStyle, t3), e3.href)
1824
+ t3.href = e3.href;
1825
+ else if (e3.id) {
1826
+ const r3 = this.document.documentPart.rels.find((t4) => t4.id == e3.id && "External" === t4.targetMode);
1827
+ t3.href = null == r3 ? void 0 : r3.target;
1828
+ }
1829
+ return t3;
1830
+ }
1831
+ renderDrawing(e3) {
1832
+ var t3 = this.createElement("div");
1833
+ return t3.style.display = "inline-block", t3.style.position = "relative", t3.style.textIndent = "0px", this.renderChildren(e3, t3), this.renderStyleValues(e3.cssStyle, t3), t3;
1834
+ }
1835
+ renderImage(e3) {
1836
+ let t3 = this.createElement("img");
1837
+ return this.renderStyleValues(e3.cssStyle, t3), this.document && this.document.loadDocumentImage(e3.src, this.currentPart).then((e4) => {
1838
+ t3.src = e4;
1839
+ }), t3;
1840
+ }
1841
+ renderText(e3) {
1842
+ return this.htmlDocument.createTextNode(e3.text);
1843
+ }
1844
+ renderDeletedText(e3) {
1845
+ return this.options.renderEndnotes ? this.htmlDocument.createTextNode(e3.text) : null;
1846
+ }
1847
+ renderBreak(e3) {
1848
+ return "textWrapping" == e3.break ? this.createElement("br") : null;
1849
+ }
1850
+ renderInserted(e3) {
1851
+ return this.options.renderChanges ? this.renderContainer(e3, "ins") : this.renderChildren(e3);
1852
+ }
1853
+ renderDeleted(e3) {
1854
+ return this.options.renderChanges ? this.renderContainer(e3, "del") : null;
1855
+ }
1856
+ renderSymbol(e3) {
1857
+ var t3 = this.createElement("span");
1858
+ return t3.style.fontFamily = e3.font, t3.innerHTML = `&#x${e3.char};`, t3;
1859
+ }
1860
+ renderFootnoteReference(e3) {
1861
+ var t3 = this.createElement("sup");
1862
+ return this.currentFootnoteIds.push(e3.id), t3.textContent = `${this.currentFootnoteIds.length}`, t3;
1863
+ }
1864
+ renderEndnoteReference(e3) {
1865
+ var t3 = this.createElement("sup");
1866
+ return this.currentEndnoteIds.push(e3.id), t3.textContent = `${this.currentEndnoteIds.length}`, t3;
1867
+ }
1868
+ renderTab(e3) {
1869
+ var t3, r3 = this.createElement("span");
1870
+ if (r3.innerHTML = "&emsp;", this.options.experimental) {
1871
+ r3.className = this.tabStopClass();
1872
+ var s2 = null === (t3 = function(e4, t4) {
1873
+ for (var r4 = e4.parent; null != r4 && r4.type != t4; )
1874
+ r4 = r4.parent;
1875
+ return r4;
1876
+ }(e3, a2.DomType.Paragraph)) || void 0 === t3 ? void 0 : t3.tabs;
1877
+ this.currentTabs.push({ stops: s2, span: r3 });
1878
+ }
1879
+ return r3;
1880
+ }
1881
+ renderBookmarkStart(e3) {
1882
+ var t3 = this.createElement("span");
1883
+ return t3.id = e3.name, t3;
1884
+ }
1885
+ renderRun(e3) {
1886
+ if (e3.fieldRun)
1887
+ return null;
1888
+ const t3 = this.createElement("span");
1889
+ if (e3.id && (t3.id = e3.id), this.renderClass(e3, t3), this.renderStyleValues(e3.cssStyle, t3), e3.verticalAlign) {
1890
+ const r3 = this.createElement(e3.verticalAlign);
1891
+ this.renderChildren(e3, r3), t3.appendChild(r3);
1892
+ } else
1893
+ this.renderChildren(e3, t3);
1894
+ return t3;
1895
+ }
1896
+ renderTable(e3) {
1897
+ let t3 = this.createElement("table");
1898
+ return this.tableCellPositions.push(this.currentCellPosition), this.tableVerticalMerges.push(this.currentVerticalMerge), this.currentVerticalMerge = {}, this.currentCellPosition = { col: 0, row: 0 }, e3.columns && t3.appendChild(this.renderTableColumns(e3.columns)), this.renderClass(e3, t3), this.renderChildren(e3, t3), this.renderStyleValues(e3.cssStyle, t3), this.currentVerticalMerge = this.tableVerticalMerges.pop(), this.currentCellPosition = this.tableCellPositions.pop(), t3;
1899
+ }
1900
+ renderTableColumns(e3) {
1901
+ let t3 = this.createElement("colgroup");
1902
+ for (let r3 of e3) {
1903
+ let e4 = this.createElement("col");
1904
+ r3.width && (e4.style.width = r3.width), t3.appendChild(e4);
1905
+ }
1906
+ return t3;
1907
+ }
1908
+ renderTableRow(e3) {
1909
+ let t3 = this.createElement("tr");
1910
+ return this.currentCellPosition.col = 0, this.renderClass(e3, t3), this.renderChildren(e3, t3), this.renderStyleValues(e3.cssStyle, t3), this.currentCellPosition.row++, t3;
1911
+ }
1912
+ renderTableCell(e3) {
1913
+ let t3 = this.createElement("td");
1914
+ const r3 = this.currentCellPosition.col;
1915
+ return e3.verticalMerge ? "restart" == e3.verticalMerge ? (this.currentVerticalMerge[r3] = t3, t3.rowSpan = 1) : this.currentVerticalMerge[r3] && (this.currentVerticalMerge[r3].rowSpan += 1, t3.style.display = "none") : this.currentVerticalMerge[r3] = null, this.renderClass(e3, t3), this.renderChildren(e3, t3), this.renderStyleValues(e3.cssStyle, t3), e3.span && (t3.colSpan = e3.span), this.currentCellPosition.col += t3.colSpan, t3;
1916
+ }
1917
+ renderVmlPicture(e3) {
1918
+ var t3 = i("div");
1919
+ return this.renderChildren(e3, t3), t3;
1920
+ }
1921
+ renderVmlElement(e3) {
1922
+ var t3, r3, a3 = c("svg");
1923
+ a3.setAttribute("style", e3.cssStyleText);
1924
+ const s2 = c(e3.tagName);
1925
+ return Object.entries(e3.attrs).forEach(([e4, t4]) => s2.setAttribute(e4, t4)), (null === (t3 = e3.imageHref) || void 0 === t3 ? void 0 : t3.id) && (null === (r3 = this.document) || void 0 === r3 || r3.loadDocumentImage(e3.imageHref.id, this.currentPart).then((e4) => s2.setAttribute("href", e4))), a3.appendChild(s2), requestAnimationFrame(() => {
1926
+ const e4 = a3.firstElementChild.getBBox();
1927
+ a3.setAttribute("width", `${Math.ceil(e4.x + e4.width)}`), a3.setAttribute("height", `${Math.ceil(e4.y + e4.height)}`);
1928
+ }), a3;
1929
+ }
1930
+ renderMmlRadical(e3) {
1931
+ var t3;
1932
+ const r3 = e3.children.find((e4) => e4.type == a2.DomType.MmlBase);
1933
+ if (null === (t3 = e3.props) || void 0 === t3 ? void 0 : t3.hideDegree)
1934
+ return u(o, "msqrt", null, this.renderElements([r3]));
1935
+ const s2 = e3.children.find((e4) => e4.type == a2.DomType.MmlDegree);
1936
+ return u(o, "mroot", null, this.renderElements([r3, s2]));
1937
+ }
1938
+ renderMmlDelimiter(e3) {
1939
+ var t3, r3;
1940
+ const a3 = [];
1941
+ return a3.push(u(o, "mo", null, [null !== (t3 = e3.props.beginChar) && void 0 !== t3 ? t3 : "("])), a3.push(...this.renderElements(e3.children)), a3.push(u(o, "mo", null, [null !== (r3 = e3.props.endChar) && void 0 !== r3 ? r3 : ")"])), u(o, "mrow", null, a3);
1942
+ }
1943
+ renderMmlNary(e3) {
1944
+ var t3;
1945
+ const r3 = [], n2 = (0, s.keyBy)(e3.children, (e4) => e4.type), l2 = n2[a2.DomType.MmlSuperArgument], i2 = n2[a2.DomType.MmlSubArgument], c2 = l2 ? u(o, "mo", null, (0, s.asArray)(this.renderElement(l2))) : null, p2 = i2 ? u(o, "mo", null, (0, s.asArray)(this.renderElement(i2))) : null;
1946
+ if (null === (t3 = e3.props) || void 0 === t3 ? void 0 : t3.char) {
1947
+ const t4 = u(o, "mo", null, [e3.props.char]);
1948
+ c2 || p2 ? r3.push(u(o, "munderover", null, [t4, p2, c2])) : c2 ? r3.push(u(o, "mover", null, [t4, c2])) : p2 ? r3.push(u(o, "munder", null, [t4, p2])) : r3.push(t4);
1949
+ }
1950
+ return r3.push(...this.renderElements(n2[a2.DomType.MmlBase].children)), u(o, "mrow", null, r3);
1951
+ }
1952
+ renderMmlRun(e3) {
1953
+ const t3 = u(o, "ms");
1954
+ return this.renderClass(e3, t3), this.renderStyleValues(e3.cssStyle, t3), this.renderChildren(e3, t3), t3;
1955
+ }
1956
+ renderStyleValues(e3, t3) {
1957
+ Object.assign(t3.style, e3);
1958
+ }
1959
+ renderClass(e3, t3) {
1960
+ e3.className && (t3.className = e3.className), e3.styleName && t3.classList.add(this.processStyleName(e3.styleName));
1961
+ }
1962
+ findStyle(e3) {
1963
+ var t3;
1964
+ return e3 && (null === (t3 = this.styleMap) || void 0 === t3 ? void 0 : t3[e3]);
1965
+ }
1966
+ numberingClass(e3, t3) {
1967
+ return `${this.className}-num-${e3}-${t3}`;
1968
+ }
1969
+ tabStopClass() {
1970
+ return `${this.className}-tab-stop`;
1971
+ }
1972
+ styleToString(e3, t3, r3 = null) {
1973
+ let a3 = `${e3} {\r
1974
+ `;
1975
+ for (const e4 in t3)
1976
+ a3 += ` ${e4}: ${t3[e4]};\r
1977
+ `;
1978
+ return r3 && (a3 += r3), a3 + "}\r\n";
1979
+ }
1980
+ numberingCounter(e3, t3) {
1981
+ return `${this.className}-num-${e3}-${t3}`;
1982
+ }
1983
+ levelTextToContent(e3, t3, r3, a3) {
1984
+ var s2;
1985
+ return `"${e3.replace(/%\d*/g, (e4) => {
1986
+ let t4 = parseInt(e4.substring(1), 10) - 1;
1987
+ return `"counter(${this.numberingCounter(r3, t4)}, ${a3})"`;
1988
+ })}${null !== (s2 = { tab: "\\9", space: "\\a0" }[t3]) && void 0 !== s2 ? s2 : ""}"`;
1989
+ }
1990
+ numFormatToCssValue(e3) {
1991
+ var t3;
1992
+ return null !== (t3 = { none: "none", bullet: "disc", decimal: "decimal", lowerLetter: "lower-alpha", upperLetter: "upper-alpha", lowerRoman: "lower-roman", upperRoman: "upper-roman", decimalZero: "decimal-leading-zero", aiueo: "katakana", aiueoFullWidth: "katakana", chineseCounting: "simp-chinese-informal", chineseCountingThousand: "simp-chinese-informal", chineseLegalSimplified: "simp-chinese-formal", chosung: "hangul-consonant", ideographDigital: "cjk-ideographic", ideographTraditional: "cjk-heavenly-stem", ideographLegalTraditional: "trad-chinese-formal", ideographZodiac: "cjk-earthly-branch", iroha: "katakana-iroha", irohaFullWidth: "katakana-iroha", japaneseCounting: "japanese-informal", japaneseDigitalTenThousand: "cjk-decimal", japaneseLegal: "japanese-formal", thaiNumbers: "thai", koreanCounting: "korean-hangul-formal", koreanDigital: "korean-hangul-formal", koreanDigital2: "korean-hanja-informal", hebrew1: "hebrew", hebrew2: "hebrew", hindiNumbers: "devanagari", ganada: "hangul", taiwaneseCounting: "cjk-ideographic", taiwaneseCountingThousand: "cjk-ideographic", taiwaneseDigital: "cjk-decimal" }[e3]) && void 0 !== t3 ? t3 : e3;
1993
+ }
1994
+ refreshTabStops() {
1995
+ this.options.experimental && (clearTimeout(this.tabsTimeout), this.tabsTimeout = setTimeout(() => {
1996
+ const e3 = (0, n.computePixelToPoint)();
1997
+ for (let t3 of this.currentTabs)
1998
+ (0, n.updateTabStop)(t3.span, t3.stops, this.defaultTabSize, e3);
1999
+ }, 500));
2000
+ }
2001
+ };
2002
+ }, 630: (e2, t2) => {
2003
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.updateTabStop = t2.computePixelToPoint = void 0;
2004
+ const r2 = { pos: 0, leader: "none", style: "left" };
2005
+ function a2(e3) {
2006
+ return parseFloat(e3);
2007
+ }
2008
+ t2.computePixelToPoint = function(e3 = document.body) {
2009
+ const t3 = document.createElement("div");
2010
+ t3.style.width = "100pt", e3.appendChild(t3);
2011
+ const r3 = 100 / t3.offsetWidth;
2012
+ return e3.removeChild(t3), r3;
2013
+ }, t2.updateTabStop = function(e3, t3, s, n = 0.75) {
2014
+ const l = e3.closest("p"), o = e3.getBoundingClientRect(), i = l.getBoundingClientRect(), c = getComputedStyle(l), u = (null == t3 ? void 0 : t3.length) > 0 ? t3.map((e4) => ({ pos: a2(e4.position), leader: e4.leader, style: e4.style })).sort((e4, t4) => e4.pos - t4.pos) : [r2], p = u[u.length - 1], d = i.width * n, h = a2(s);
2015
+ let m = p.pos + h;
2016
+ if (m < d)
2017
+ for (; m < d && u.length < 50; m += h)
2018
+ u.push(Object.assign(Object.assign({}, r2), { pos: m }));
2019
+ const f = parseFloat(c.marginLeft), g = i.left + f, b = (o.left - g) * n, y = u.find((e4) => "clear" != e4.style && e4.pos > b);
2020
+ if (null == y)
2021
+ return;
2022
+ let v = 1;
2023
+ if ("right" == y.style || "center" == y.style) {
2024
+ const t4 = Array.from(l.querySelectorAll(`.${e3.className}`)), r3 = t4.indexOf(e3) + 1, a3 = document.createRange();
2025
+ a3.setStart(e3, 1), r3 < t4.length ? a3.setEndBefore(t4[r3]) : a3.setEndAfter(l);
2026
+ const s2 = "center" == y.style ? 0.5 : 1, o2 = a3.getBoundingClientRect(), c2 = o2.left + s2 * o2.width - (i.left - f);
2027
+ v = y.pos - c2 * n;
2028
+ } else
2029
+ v = y.pos - b;
2030
+ switch (e3.innerHTML = "&nbsp;", e3.style.textDecoration = "inherit", e3.style.wordSpacing = `${v.toFixed(0)}pt`, y.leader) {
2031
+ case "dot":
2032
+ case "middleDot":
2033
+ e3.style.textDecoration = "underline", e3.style.textDecorationStyle = "dotted";
2034
+ break;
2035
+ case "hyphen":
2036
+ case "heavy":
2037
+ case "underscore":
2038
+ e3.style.textDecoration = "underline";
2039
+ }
2040
+ };
2041
+ }, 881: (e2, t2, r2) => {
2042
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.WmlEndnote = t2.WmlFootnote = t2.WmlBaseNote = void 0;
2043
+ const a2 = r2(120);
2044
+ class s {
2045
+ constructor() {
2046
+ this.children = [], this.cssStyle = {};
2047
+ }
2048
+ }
2049
+ t2.WmlBaseNote = s, t2.WmlFootnote = class extends s {
2050
+ constructor() {
2051
+ super(...arguments), this.type = a2.DomType.Footnote;
2052
+ }
2053
+ }, t2.WmlEndnote = class extends s {
2054
+ constructor() {
2055
+ super(...arguments), this.type = a2.DomType.Endnote;
2056
+ }
2057
+ };
2058
+ }, 735: (e2, t2, r2) => {
2059
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.EndnotesPart = t2.FootnotesPart = t2.BaseNotePart = void 0;
2060
+ const a2 = r2(530), s = r2(881);
2061
+ class n extends a2.Part {
2062
+ constructor(e3, t3, r3) {
2063
+ super(e3, t3), this._documentParser = r3;
2064
+ }
2065
+ }
2066
+ t2.BaseNotePart = n, t2.FootnotesPart = class extends n {
2067
+ constructor(e3, t3, r3) {
2068
+ super(e3, t3, r3);
2069
+ }
2070
+ parseXml(e3) {
2071
+ this.notes = this._documentParser.parseNotes(e3, "footnote", s.WmlFootnote);
2072
+ }
2073
+ }, t2.EndnotesPart = class extends n {
2074
+ constructor(e3, t3, r3) {
2075
+ super(e3, t3, r3);
2076
+ }
2077
+ parseXml(e3) {
2078
+ this.notes = this._documentParser.parseNotes(e3, "endnote", s.WmlEndnote);
2079
+ }
2080
+ };
2081
+ }, 527: (e2, t2, r2) => {
2082
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.NumberingPart = void 0;
2083
+ const a2 = r2(530), s = r2(682);
2084
+ class n extends a2.Part {
2085
+ constructor(e3, t3, r3) {
2086
+ super(e3, t3), this._documentParser = r3;
2087
+ }
2088
+ parseXml(e3) {
2089
+ Object.assign(this, (0, s.parseNumberingPart)(e3, this._package.xmlParser)), this.domNumberings = this._documentParser.parseNumberingFile(e3);
2090
+ }
2091
+ }
2092
+ t2.NumberingPart = n;
2093
+ }, 682: (e2, t2, r2) => {
2094
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseNumberingBulletPicture = t2.parseNumberingLevelOverrride = t2.parseNumberingLevel = t2.parseAbstractNumbering = t2.parseNumbering = t2.parseNumberingPart = void 0;
2095
+ const a2 = r2(109), s = r2(488);
2096
+ function n(e3, t3) {
2097
+ let r3 = { id: t3.attr(e3, "numId"), overrides: [] };
2098
+ for (let a3 of t3.elements(e3))
2099
+ switch (a3.localName) {
2100
+ case "abstractNumId":
2101
+ r3.abstractId = t3.attr(a3, "val");
2102
+ break;
2103
+ case "lvlOverride":
2104
+ r3.overrides.push(i(a3, t3));
2105
+ }
2106
+ return r3;
2107
+ }
2108
+ function l(e3, t3) {
2109
+ let r3 = { id: t3.attr(e3, "abstractNumId"), levels: [] };
2110
+ for (let a3 of t3.elements(e3))
2111
+ switch (a3.localName) {
2112
+ case "name":
2113
+ r3.name = t3.attr(a3, "val");
2114
+ break;
2115
+ case "multiLevelType":
2116
+ r3.multiLevelType = t3.attr(a3, "val");
2117
+ break;
2118
+ case "numStyleLink":
2119
+ r3.numberingStyleLink = t3.attr(a3, "val");
2120
+ break;
2121
+ case "styleLink":
2122
+ r3.styleLink = t3.attr(a3, "val");
2123
+ break;
2124
+ case "lvl":
2125
+ r3.levels.push(o(a3, t3));
2126
+ }
2127
+ return r3;
2128
+ }
2129
+ function o(e3, t3) {
2130
+ let r3 = { level: t3.intAttr(e3, "ilvl") };
2131
+ for (let n2 of t3.elements(e3))
2132
+ switch (n2.localName) {
2133
+ case "start":
2134
+ r3.start = t3.attr(n2, "val");
2135
+ break;
2136
+ case "lvlRestart":
2137
+ r3.restart = t3.intAttr(n2, "val");
2138
+ break;
2139
+ case "numFmt":
2140
+ r3.format = t3.attr(n2, "val");
2141
+ break;
2142
+ case "lvlText":
2143
+ r3.text = t3.attr(n2, "val");
2144
+ break;
2145
+ case "lvlJc":
2146
+ r3.justification = t3.attr(n2, "val");
2147
+ break;
2148
+ case "lvlPicBulletId":
2149
+ r3.bulletPictureId = t3.attr(n2, "val");
2150
+ break;
2151
+ case "pStyle":
2152
+ r3.paragraphStyle = t3.attr(n2, "val");
2153
+ break;
2154
+ case "pPr":
2155
+ r3.paragraphProps = (0, a2.parseParagraphProperties)(n2, t3);
2156
+ break;
2157
+ case "rPr":
2158
+ r3.runProps = (0, s.parseRunProperties)(n2, t3);
2159
+ }
2160
+ return r3;
2161
+ }
2162
+ function i(e3, t3) {
2163
+ let r3 = { level: t3.intAttr(e3, "ilvl") };
2164
+ for (let a3 of t3.elements(e3))
2165
+ switch (a3.localName) {
2166
+ case "startOverride":
2167
+ r3.start = t3.intAttr(a3, "val");
2168
+ break;
2169
+ case "lvl":
2170
+ r3.numberingLevel = o(a3, t3);
2171
+ }
2172
+ return r3;
2173
+ }
2174
+ function c(e3, t3) {
2175
+ var r3 = t3.element(e3, "pict"), a3 = r3 && t3.element(r3, "shape"), s2 = a3 && t3.element(a3, "imagedata");
2176
+ return s2 ? { id: t3.attr(e3, "numPicBulletId"), referenceId: t3.attr(s2, "id"), style: t3.attr(a3, "style") } : null;
2177
+ }
2178
+ t2.parseNumberingPart = function(e3, t3) {
2179
+ let r3 = { numberings: [], abstractNumberings: [], bulletPictures: [] };
2180
+ for (let a3 of t3.elements(e3))
2181
+ switch (a3.localName) {
2182
+ case "num":
2183
+ r3.numberings.push(n(a3, t3));
2184
+ break;
2185
+ case "abstractNum":
2186
+ r3.abstractNumberings.push(l(a3, t3));
2187
+ break;
2188
+ case "numPicBullet":
2189
+ r3.bulletPictures.push(c(a3, t3));
2190
+ }
2191
+ return r3;
2192
+ }, t2.parseNumbering = n, t2.parseAbstractNumbering = l, t2.parseNumberingLevel = o, t2.parseNumberingLevelOverrride = i, t2.parseNumberingBulletPicture = c;
2193
+ }, 472: (e2, t2, r2) => {
2194
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.XmlParser = t2.serializeXmlString = t2.parseXmlString = void 0;
2195
+ const a2 = r2(149);
2196
+ t2.parseXmlString = function(e3, t3 = false) {
2197
+ var r3;
2198
+ t3 && (e3 = e3.replace(/<[?].*[?]>/, "")), e3 = 65279 === (r3 = e3).charCodeAt(0) ? r3.substring(1) : r3;
2199
+ const a3 = new DOMParser().parseFromString(e3, "application/xml"), s2 = null === (n2 = a3.getElementsByTagName("parsererror")[0]) || void 0 === n2 ? void 0 : n2.textContent;
2200
+ var n2;
2201
+ if (s2)
2202
+ throw new Error(s2);
2203
+ return a3;
2204
+ }, t2.serializeXmlString = function(e3) {
2205
+ return new XMLSerializer().serializeToString(e3);
2206
+ };
2207
+ class s {
2208
+ elements(e3, t3 = null) {
2209
+ const r3 = [];
2210
+ for (let a3 = 0, s2 = e3.childNodes.length; a3 < s2; a3++) {
2211
+ let s3 = e3.childNodes.item(a3);
2212
+ 1 != s3.nodeType || null != t3 && s3.localName != t3 || r3.push(s3);
2213
+ }
2214
+ return r3;
2215
+ }
2216
+ element(e3, t3) {
2217
+ for (let r3 = 0, a3 = e3.childNodes.length; r3 < a3; r3++) {
2218
+ let a4 = e3.childNodes.item(r3);
2219
+ if (1 == a4.nodeType && a4.localName == t3)
2220
+ return a4;
2221
+ }
2222
+ return null;
2223
+ }
2224
+ elementAttr(e3, t3, r3) {
2225
+ var a3 = this.element(e3, t3);
2226
+ return a3 ? this.attr(a3, r3) : void 0;
2227
+ }
2228
+ attrs(e3) {
2229
+ return Array.from(e3.attributes);
2230
+ }
2231
+ attr(e3, t3) {
2232
+ for (let r3 = 0, a3 = e3.attributes.length; r3 < a3; r3++) {
2233
+ let a4 = e3.attributes.item(r3);
2234
+ if (a4.localName == t3)
2235
+ return a4.value;
2236
+ }
2237
+ return null;
2238
+ }
2239
+ intAttr(e3, t3, r3 = null) {
2240
+ var a3 = this.attr(e3, t3);
2241
+ return a3 ? parseInt(a3) : r3;
2242
+ }
2243
+ hexAttr(e3, t3, r3 = null) {
2244
+ var a3 = this.attr(e3, t3);
2245
+ return a3 ? parseInt(a3, 16) : r3;
2246
+ }
2247
+ floatAttr(e3, t3, r3 = null) {
2248
+ var a3 = this.attr(e3, t3);
2249
+ return a3 ? parseFloat(a3) : r3;
2250
+ }
2251
+ boolAttr(e3, t3, r3 = null) {
2252
+ return (0, a2.convertBoolean)(this.attr(e3, t3), r3);
2253
+ }
2254
+ lengthAttr(e3, t3, r3 = a2.LengthUsage.Dxa) {
2255
+ return (0, a2.convertLength)(this.attr(e3, t3), r3);
2256
+ }
2257
+ }
2258
+ t2.XmlParser = s;
2259
+ const n = new s();
2260
+ t2.default = n;
2261
+ }, 287: (e2, t2, r2) => {
2262
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.SettingsPart = void 0;
2263
+ const a2 = r2(530), s = r2(846);
2264
+ class n extends a2.Part {
2265
+ constructor(e3, t3) {
2266
+ super(e3, t3);
2267
+ }
2268
+ parseXml(e3) {
2269
+ this.settings = (0, s.parseSettings)(e3, this._package.xmlParser);
2270
+ }
2271
+ }
2272
+ t2.SettingsPart = n;
2273
+ }, 846: (e2, t2) => {
2274
+ function r2(e3, t3) {
2275
+ var r3 = { defaultNoteIds: [] };
2276
+ for (let a2 of t3.elements(e3))
2277
+ switch (a2.localName) {
2278
+ case "numFmt":
2279
+ r3.nummeringFormat = t3.attr(a2, "val");
2280
+ break;
2281
+ case "footnote":
2282
+ case "endnote":
2283
+ r3.defaultNoteIds.push(t3.attr(a2, "id"));
2284
+ }
2285
+ return r3;
2286
+ }
2287
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseNoteProperties = t2.parseSettings = void 0, t2.parseSettings = function(e3, t3) {
2288
+ var a2 = {};
2289
+ for (let s of t3.elements(e3))
2290
+ switch (s.localName) {
2291
+ case "defaultTabStop":
2292
+ a2.defaultTabStop = t3.lengthAttr(s, "val");
2293
+ break;
2294
+ case "footnotePr":
2295
+ a2.footnoteProps = r2(s, t3);
2296
+ break;
2297
+ case "endnotePr":
2298
+ a2.endnoteProps = r2(s, t3);
2299
+ break;
2300
+ case "autoHyphenation":
2301
+ a2.autoHyphenation = t3.boolAttr(s, "val");
2302
+ }
2303
+ return a2;
2304
+ }, t2.parseNoteProperties = r2;
2305
+ }, 240: (e2, t2, r2) => {
2306
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.StylesPart = void 0;
2307
+ const a2 = r2(530);
2308
+ class s extends a2.Part {
2309
+ constructor(e3, t3, r3) {
2310
+ super(e3, t3), this._documentParser = r3;
2311
+ }
2312
+ parseXml(e3) {
2313
+ this.styles = this._documentParser.parseStylesFile(e3);
2314
+ }
2315
+ }
2316
+ t2.StylesPart = s;
2317
+ }, 893: (e2, t2, r2) => {
2318
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.ThemePart = void 0;
2319
+ const a2 = r2(530), s = r2(55);
2320
+ class n extends a2.Part {
2321
+ constructor(e3, t3) {
2322
+ super(e3, t3);
2323
+ }
2324
+ parseXml(e3) {
2325
+ this.theme = (0, s.parseTheme)(e3, this._package.xmlParser);
2326
+ }
2327
+ }
2328
+ t2.ThemePart = n;
2329
+ }, 55: (e2, t2) => {
2330
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseFontInfo = t2.parseFontScheme = t2.parseColorScheme = t2.parseTheme = t2.DmlTheme = void 0;
2331
+ class r2 {
2332
+ }
2333
+ function a2(e3, t3) {
2334
+ var r3 = { name: t3.attr(e3, "name"), colors: {} };
2335
+ for (let n2 of t3.elements(e3)) {
2336
+ var a3 = t3.element(n2, "srgbClr"), s2 = t3.element(n2, "sysClr");
2337
+ a3 ? r3.colors[n2.localName] = t3.attr(a3, "val") : s2 && (r3.colors[n2.localName] = t3.attr(s2, "lastClr"));
2338
+ }
2339
+ return r3;
2340
+ }
2341
+ function s(e3, t3) {
2342
+ var r3 = { name: t3.attr(e3, "name") };
2343
+ for (let a3 of t3.elements(e3))
2344
+ switch (a3.localName) {
2345
+ case "majorFont":
2346
+ r3.majorFont = n(a3, t3);
2347
+ break;
2348
+ case "minorFont":
2349
+ r3.minorFont = n(a3, t3);
2350
+ }
2351
+ return r3;
2352
+ }
2353
+ function n(e3, t3) {
2354
+ return { latinTypeface: t3.elementAttr(e3, "latin", "typeface"), eaTypeface: t3.elementAttr(e3, "ea", "typeface"), csTypeface: t3.elementAttr(e3, "cs", "typeface") };
2355
+ }
2356
+ t2.DmlTheme = r2, t2.parseTheme = function(e3, t3) {
2357
+ var n2 = new r2(), l = t3.element(e3, "themeElements");
2358
+ for (let e4 of t3.elements(l))
2359
+ switch (e4.localName) {
2360
+ case "clrScheme":
2361
+ n2.colorScheme = a2(e4, t3);
2362
+ break;
2363
+ case "fontScheme":
2364
+ n2.fontScheme = s(e4, t3);
2365
+ }
2366
+ return n2;
2367
+ }, t2.parseColorScheme = a2, t2.parseFontScheme = s, t2.parseFontInfo = n;
2368
+ }, 593: (e2, t2) => {
2369
+ function r2(e3) {
2370
+ return e3 && "object" == typeof e3 && !Array.isArray(e3);
2371
+ }
2372
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.asArray = t2.formatCssRules = t2.parseCssRules = t2.mergeDeep = t2.isString = t2.isObject = t2.blobToBase64 = t2.keyBy = t2.resolvePath = t2.splitPath = t2.escapeClassName = void 0, t2.escapeClassName = function(e3) {
2373
+ return null == e3 ? void 0 : e3.replace(/[ .]+/g, "-").replace(/[&]+/g, "and").toLowerCase();
2374
+ }, t2.splitPath = function(e3) {
2375
+ let t3 = e3.lastIndexOf("/") + 1;
2376
+ return [0 == t3 ? "" : e3.substring(0, t3), 0 == t3 ? e3 : e3.substring(t3)];
2377
+ }, t2.resolvePath = function(e3, t3) {
2378
+ try {
2379
+ const r3 = "http://docx/";
2380
+ return new URL(e3, r3 + t3).toString().substring(r3.length);
2381
+ } catch (r3) {
2382
+ return `${t3}${e3}`;
2383
+ }
2384
+ }, t2.keyBy = function(e3, t3) {
2385
+ return e3.reduce((e4, r3) => (e4[t3(r3)] = r3, e4), {});
2386
+ }, t2.blobToBase64 = function(e3) {
2387
+ return new Promise((t3, r3) => {
2388
+ const a2 = new FileReader();
2389
+ a2.onloadend = () => t3(a2.result), a2.onerror = () => r3(), a2.readAsDataURL(e3);
2390
+ });
2391
+ }, t2.isObject = r2, t2.isString = function(e3) {
2392
+ return e3 && "string" == typeof e3 || e3 instanceof String;
2393
+ }, t2.mergeDeep = function e3(t3, ...a2) {
2394
+ var s;
2395
+ if (!a2.length)
2396
+ return t3;
2397
+ const n = a2.shift();
2398
+ if (r2(t3) && r2(n))
2399
+ for (const a3 in n)
2400
+ r2(n[a3]) ? e3(null !== (s = t3[a3]) && void 0 !== s ? s : t3[a3] = {}, n[a3]) : t3[a3] = n[a3];
2401
+ return e3(t3, ...a2);
2402
+ }, t2.parseCssRules = function(e3) {
2403
+ const t3 = {};
2404
+ for (const r3 of e3.split(";")) {
2405
+ const [e4, a2] = r3.split(":");
2406
+ t3[e4] = a2;
2407
+ }
2408
+ return t3;
2409
+ }, t2.formatCssRules = function(e3) {
2410
+ return Object.entries(e3).map((e4, t3) => `${e4}: ${t3}`).join(";");
2411
+ }, t2.asArray = function(e3) {
2412
+ return Array.isArray(e3) ? e3 : [e3];
2413
+ };
2414
+ }, 320: (e2, t2, r2) => {
2415
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.parseVmlElement = t2.VmlElement = void 0;
2416
+ const a2 = r2(149), s = r2(120), n = r2(472);
2417
+ class l {
2418
+ constructor() {
2419
+ this.type = s.DomType.VmlElement, this.attrs = {}, this.chidren = [];
2420
+ }
2421
+ }
2422
+ function o(e3) {
2423
+ var t3;
2424
+ return { stroke: n.default.attr(e3, "color"), "stroke-width": null !== (t3 = n.default.lengthAttr(e3, "weight", a2.LengthUsage.Emu)) && void 0 !== t3 ? t3 : "1px" };
2425
+ }
2426
+ function i(e3) {
2427
+ return e3.split(",");
2428
+ }
2429
+ t2.VmlElement = l, t2.parseVmlElement = function e3(t3) {
2430
+ var r3 = new l();
2431
+ switch (t3.localName) {
2432
+ case "rect":
2433
+ r3.tagName = "rect", Object.assign(r3.attrs, { width: "100%", height: "100%" });
2434
+ break;
2435
+ case "oval":
2436
+ r3.tagName = "ellipse", Object.assign(r3.attrs, { cx: "50%", cy: "50%", rx: "50%", ry: "50%" });
2437
+ break;
2438
+ case "line":
2439
+ r3.tagName = "line";
2440
+ break;
2441
+ case "shape":
2442
+ r3.tagName = "g";
2443
+ break;
2444
+ default:
2445
+ return null;
2446
+ }
2447
+ for (const e4 of n.default.attrs(t3))
2448
+ switch (e4.localName) {
2449
+ case "style":
2450
+ r3.cssStyleText = e4.value;
2451
+ break;
2452
+ case "fillcolor":
2453
+ r3.attrs.fill = e4.value;
2454
+ break;
2455
+ case "from":
2456
+ const [t4, a3] = i(e4.value);
2457
+ Object.assign(r3.attrs, { x1: t4, y1: a3 });
2458
+ break;
2459
+ case "to":
2460
+ const [s2, n2] = i(e4.value);
2461
+ Object.assign(r3.attrs, { x2: s2, y2: n2 });
2462
+ }
2463
+ for (const a3 of n.default.elements(t3))
2464
+ switch (a3.localName) {
2465
+ case "stroke":
2466
+ Object.assign(r3.attrs, o(a3));
2467
+ break;
2468
+ case "fill":
2469
+ Object.assign(r3.attrs, {});
2470
+ break;
2471
+ case "imagedata":
2472
+ r3.tagName = "image", Object.assign(r3.attrs, { width: "100%", height: "100%" }), r3.imageHref = { id: n.default.attr(a3, "id"), title: n.default.attr(a3, "title") };
2473
+ break;
2474
+ default:
2475
+ const t4 = e3(a3);
2476
+ t4 && r3.chidren.push(t4);
2477
+ }
2478
+ return r3;
2479
+ };
2480
+ }, 213: (e2, t2, r2) => {
2481
+ Object.defineProperty(t2, "__esModule", { value: true }), t2.deobfuscate = t2.WordDocument = void 0;
2482
+ const a2 = r2(461), s = r2(380), n = r2(522), l = r2(448), o = r2(593), i = r2(527), c = r2(240), u = r2(985), p = r2(665), d = r2(162), h = r2(893), m = r2(735), f = r2(287), g = r2(177), b = [{ type: a2.RelationshipTypes.OfficeDocument, target: "word/document.xml" }, { type: a2.RelationshipTypes.ExtendedProperties, target: "docProps/app.xml" }, { type: a2.RelationshipTypes.CoreProperties, target: "docProps/core.xml" }, { type: a2.RelationshipTypes.CustomProperties, target: "docProps/custom.xml" }];
2483
+ class y {
2484
+ constructor() {
2485
+ this.parts = [], this.partsMap = {};
2486
+ }
2487
+ static async load(e3, t3, r3) {
2488
+ var a3 = new y();
2489
+ return a3._options = r3, a3._parser = t3, a3._package = await n.OpenXmlPackage.load(e3, r3), a3.rels = await a3._package.loadRelationships(), await Promise.all(b.map((e4) => {
2490
+ var t4;
2491
+ const r4 = null !== (t4 = a3.rels.find((t5) => t5.type === e4.type)) && void 0 !== t4 ? t4 : e4;
2492
+ return a3.loadRelationshipPart(r4.target, r4.type);
2493
+ })), a3;
2494
+ }
2495
+ save(e3 = "blob") {
2496
+ return this._package.save(e3);
2497
+ }
2498
+ async loadRelationshipPart(e3, t3) {
2499
+ var r3;
2500
+ if (this.partsMap[e3])
2501
+ return this.partsMap[e3];
2502
+ if (!this._package.get(e3))
2503
+ return null;
2504
+ let n2 = null;
2505
+ switch (t3) {
2506
+ case a2.RelationshipTypes.OfficeDocument:
2507
+ this.documentPart = n2 = new l.DocumentPart(this._package, e3, this._parser);
2508
+ break;
2509
+ case a2.RelationshipTypes.FontTable:
2510
+ this.fontTablePart = n2 = new s.FontTablePart(this._package, e3);
2511
+ break;
2512
+ case a2.RelationshipTypes.Numbering:
2513
+ this.numberingPart = n2 = new i.NumberingPart(this._package, e3, this._parser);
2514
+ break;
2515
+ case a2.RelationshipTypes.Styles:
2516
+ this.stylesPart = n2 = new c.StylesPart(this._package, e3, this._parser);
2517
+ break;
2518
+ case a2.RelationshipTypes.Theme:
2519
+ this.themePart = n2 = new h.ThemePart(this._package, e3);
2520
+ break;
2521
+ case a2.RelationshipTypes.Footnotes:
2522
+ this.footnotesPart = n2 = new m.FootnotesPart(this._package, e3, this._parser);
2523
+ break;
2524
+ case a2.RelationshipTypes.Endnotes:
2525
+ this.endnotesPart = n2 = new m.EndnotesPart(this._package, e3, this._parser);
2526
+ break;
2527
+ case a2.RelationshipTypes.Footer:
2528
+ n2 = new u.FooterPart(this._package, e3, this._parser);
2529
+ break;
2530
+ case a2.RelationshipTypes.Header:
2531
+ n2 = new u.HeaderPart(this._package, e3, this._parser);
2532
+ break;
2533
+ case a2.RelationshipTypes.CoreProperties:
2534
+ this.corePropsPart = n2 = new d.CorePropsPart(this._package, e3);
2535
+ break;
2536
+ case a2.RelationshipTypes.ExtendedProperties:
2537
+ this.extendedPropsPart = n2 = new p.ExtendedPropsPart(this._package, e3);
2538
+ break;
2539
+ case a2.RelationshipTypes.CustomProperties:
2540
+ n2 = new g.CustomPropsPart(this._package, e3);
2541
+ break;
2542
+ case a2.RelationshipTypes.Settings:
2543
+ this.settingsPart = n2 = new f.SettingsPart(this._package, e3);
2544
+ }
2545
+ if (null == n2)
2546
+ return Promise.resolve(null);
2547
+ if (this.partsMap[e3] = n2, this.parts.push(n2), await n2.load(), (null === (r3 = n2.rels) || void 0 === r3 ? void 0 : r3.length) > 0) {
2548
+ const [e4] = (0, o.splitPath)(n2.path);
2549
+ await Promise.all(n2.rels.map((t4) => this.loadRelationshipPart((0, o.resolvePath)(t4.target, e4), t4.type)));
2550
+ }
2551
+ return n2;
2552
+ }
2553
+ async loadDocumentImage(e3, t3) {
2554
+ const r3 = await this.loadResource(null != t3 ? t3 : this.documentPart, e3, "blob");
2555
+ return this.blobToURL(r3);
2556
+ }
2557
+ async loadNumberingImage(e3) {
2558
+ const t3 = await this.loadResource(this.numberingPart, e3, "blob");
2559
+ return this.blobToURL(t3);
2560
+ }
2561
+ async loadFont(e3, t3) {
2562
+ const r3 = await this.loadResource(this.fontTablePart, e3, "uint8array");
2563
+ return r3 ? this.blobToURL(new Blob([v(r3, t3)])) : r3;
2564
+ }
2565
+ blobToURL(e3) {
2566
+ return e3 ? this._options.useBase64URL ? (0, o.blobToBase64)(e3) : URL.createObjectURL(e3) : null;
2567
+ }
2568
+ findPartByRelId(e3, t3 = null) {
2569
+ var r3, a3 = (null !== (r3 = t3.rels) && void 0 !== r3 ? r3 : this.rels).find((t4) => t4.id == e3);
2570
+ const s2 = t3 ? (0, o.splitPath)(t3.path)[0] : "";
2571
+ return a3 ? this.partsMap[(0, o.resolvePath)(a3.target, s2)] : null;
2572
+ }
2573
+ getPathById(e3, t3) {
2574
+ const r3 = e3.rels.find((e4) => e4.id == t3), [a3] = (0, o.splitPath)(e3.path);
2575
+ return r3 ? (0, o.resolvePath)(r3.target, a3) : null;
2576
+ }
2577
+ loadResource(e3, t3, r3) {
2578
+ const a3 = this.getPathById(e3, t3);
2579
+ return a3 ? this._package.load(a3, r3) : Promise.resolve(null);
2580
+ }
2581
+ }
2582
+ function v(e3, t3) {
2583
+ const r3 = t3.replace(/{|}|-/g, ""), a3 = new Array(16);
2584
+ for (let e4 = 0; e4 < 16; e4++)
2585
+ a3[16 - e4 - 1] = parseInt(r3.substr(2 * e4, 2), 16);
2586
+ for (let t4 = 0; t4 < 32; t4++)
2587
+ e3[t4] = e3[t4] ^ a3[t4 % 16];
2588
+ return e3;
2589
+ }
2590
+ t2.WordDocument = y, t2.deobfuscate = v;
2591
+ }, 583: (e2) => {
2592
+ e2.exports = "data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 20 100%27 preserveAspectRatio=%27none%27%3E%3Cpath d=%27m0,75 l5,0 l5,25 l10,-100%27 stroke=%27black%27 fill=%27none%27 vector-effect=%27non-scaling-stroke%27/%3E%3C/svg%3E";
2593
+ }, 626: (t2) => {
2594
+ t2.exports = e;
2595
+ } }, r = {};
2596
+ function a(e2) {
2597
+ var s = r[e2];
2598
+ if (void 0 !== s)
2599
+ return s.exports;
2600
+ var n = r[e2] = { id: e2, exports: {} };
2601
+ return t[e2](n, n.exports, a), n.exports;
2602
+ }
2603
+ return a.m = t, a.n = (e2) => {
2604
+ var t2 = e2 && e2.__esModule ? () => e2.default : () => e2;
2605
+ return a.d(t2, { a: t2 }), t2;
2606
+ }, a.d = (e2, t2) => {
2607
+ for (var r2 in t2)
2608
+ a.o(t2, r2) && !a.o(e2, r2) && Object.defineProperty(e2, r2, { enumerable: true, get: t2[r2] });
2609
+ }, a.o = (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2), a.r = (e2) => {
2610
+ "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
2611
+ }, a.b = document.baseURI || self.location.href, a(667);
2612
+ })());
2613
+ })(docxPreview_min);
2614
+ const renderDocx = (options) => {
2615
+ if (typeof window !== "undefined") {
2616
+ const { bodyContainer, styleContainer, buffer, docxOptions = {} } = options;
2617
+ const defaultOptions = {
2618
+ className: "docx",
2619
+ ignoreLastRenderedPageBreak: false
2620
+ };
2621
+ const configuration = Object.assign({}, defaultOptions, docxOptions);
2622
+ if (bodyContainer) {
2623
+ return docxPreview_min.exports.renderAsync(buffer, bodyContainer, styleContainer, configuration);
2624
+ } else {
2625
+ const contain = document.createElement("div");
2626
+ document.body.appendChild(contain);
2627
+ return docxPreview_min.exports.renderAsync(buffer, contain, styleContainer, configuration);
2628
+ }
2629
+ }
2630
+ };
2631
+ export {
2632
+ renderDocx
2633
+ };