ranui 0.1.1-alpha.2 → 0.1.1-alpha.4

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