Commit 85f462bc authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: docx-preview error missing jszip

parent 7f2f4054
......@@ -24,7 +24,8 @@
"file-saver",
"pdfjs-dist",
"iso3166-2-db",
"lodash"
"lodash",
"docx-preview"
],
"outputPath": "dist/DLCM-Frontend",
"index": "src/index.html",
......
diff --git a/node_modules/docx-preview/dist/docx-preview.js b/node_modules/docx-preview/dist/docx-preview.js
index 6c0547e..9e2448a 100644
--- a/node_modules/docx-preview/dist/docx-preview.js
+++ b/node_modules/docx-preview/dist/docx-preview.js
@@ -1,6 +1,6 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("JSZip"));
+ module.exports = factory(require("jszip"));
else if(typeof define === 'function' && define.amd)
define(["JSZip"], factory);
else if(typeof exports === 'object')
diff --git a/node_modules/docx-preview/dist/docx-preview.min.js b/node_modules/docx-preview/dist/docx-preview.min.js
index 938240f..b88fa05 100644
--- a/node_modules/docx-preview/dist/docx-preview.min.js
+++ b/node_modules/docx-preview/dist/docx-preview.min.js
@@ -1,2 +1,2 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("JSZip")):"function"==typeof define&&define.amd?define(["JSZip"],t):"object"==typeof exports?exports.docx=t(require("JSZip")):e.docx=t(e.JSZip)}(self,(function(e){return(()=>{"use strict";var t={522:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OpenXmlPackage=void 0;var n=r(290),a=r(472),o=r(593),s=r(461),l=function(){function e(e,t){this._zip=e,this.options=t,this.xmlParser=new a.XmlParser}return e.prototype.get=function(e){return this._zip.files[function(e){return e.startsWith("/")?e.substr(1):e}(e)]},e.prototype.update=function(e,t){this._zip.file(e,t)},e.load=function(t,r){return n.loadAsync(t).then((function(t){return new e(t,r)}))},e.prototype.save=function(e){return void 0===e&&(e="blob"),this._zip.generateAsync({type:e})},e.prototype.load=function(e,t){var r,n;return void 0===t&&(t="string"),null!==(n=null===(r=this.get(e))||void 0===r?void 0:r.async(t))&&void 0!==n?n:Promise.resolve(null)},e.prototype.loadRelationships=function(e){var t=this;void 0===e&&(e=null);var r="_rels/.rels";if(null!=e){var n=(0,o.splitPath)(e);r=n[0]+"_rels/"+n[1]+".rels"}return this.load(r).then((function(e){return e?(0,s.parseRelationships)(t.parseXmlDocument(e).firstElementChild,t.xmlParser):null}))},e.prototype.parseXmlDocument=function(e){return(0,a.parseXmlString)(e,this.options.trimXmlDeclaration)},e}();t.OpenXmlPackage=l},530:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Part=void 0;var n=r(472),a=function(){function e(e,t){this._package=e,this.path=t}return e.prototype.load=function(){var e=this;return Promise.all([this._package.loadRelationships(this.path).then((function(t){e.rels=t})),this._package.load(this.path).then((function(t){var r=e._package.parseXmlDocument(t);e._package.options.keepOrigin&&(e._xmlDocument=r),e.parseXml(r.firstElementChild)}))])},e.prototype.save=function(){this._package.update(this.path,(0,n.serializeXmlString)(this._xmlDocument))},e.prototype.parseXml=function(e){},e}();t.Part=a},461:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelationships=t.RelationshipTypes=void 0,(r=t.RelationshipTypes||(t.RelationshipTypes={})).OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",r.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",r.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",r.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",r.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",r.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",r.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",r.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",r.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",r.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",r.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",r.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",r.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",r.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",t.parseRelationships=function(e,t){return t.elements(e).map((function(e){return{id:t.attr(e,"Id"),type:t.attr(e,"Type"),target:t.attr(e,"Target"),targetMode:t.attr(e,"TargetMode")}}))}},168:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentParser=t.autos=void 0;var n=r(445),a=r(593),o=r(797),s=r(269),l=r(472),i=r(679),c=r(979),p=r(662);t.autos={shd:"white",color:"black",highlight:"transparent"};var u,h=function(){function e(){this.skipDeclaration=!0,this.ignoreWidth=!1,this.debug=!1}return e.prototype.parseFooter=function(e){var t=new c.WmlFooter;return t.children=this.parseBodyElements(e),t},e.prototype.parseHeader=function(e){var t=new p.WmlHeader;return t.children=this.parseBodyElements(e),t},e.prototype.parseDocumentFile=function(e){var t=l.default.element(e,"body"),r=l.default.element(t,"sectPr");return{type:n.DomType.Document,children:this.parseBodyElements(t),props:r?(0,s.parseSectionProperties)(r,l.default):null,cssStyle:{}}},e.prototype.parseBodyElements=function(e){var t=this,r=[];return f.foreach(e,(function(e){switch(e.localName){case"p":r.push(t.parseParagraph(e));break;case"tbl":r.push(t.parseTable(e))}})),r},e.prototype.parseStylesFile=function(e){var t=this,r=[];return f.foreach(e,(function(e){switch(e.localName){case"style":r.push(t.parseStyle(e));break;case"docDefaults":r.push(t.parseDefaultStyles(e))}})),r},e.prototype.parseDefaultStyles=function(e){var t=this,r={id:null,name:null,target:null,basedOn:null,styles:[]};return f.foreach(e,(function(e){switch(e.localName){case"rPrDefault":var n=l.default.element(e,"rPr");n&&r.styles.push({target:"span",values:t.parseDefaultProperties(n,{})});break;case"pPrDefault":var a=l.default.element(e,"pPr");a&&r.styles.push({target:"p",values:t.parseDefaultProperties(a,{})})}})),r},e.prototype.parseStyle=function(e){var t=this,r={id:f.stringAttr(e,"styleId"),isDefault:f.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(f.stringAttr(e,"type")){case"paragraph":r.target="p";break;case"table":r.target="table";break;case"character":r.target="span"}return f.foreach(e,(function(e){switch(e.localName){case"basedOn":r.basedOn=f.className(e,"val");break;case"name":r.name=f.stringAttr(e,"val");break;case"link":r.linked=f.className(e,"val");break;case"next":r.next=f.className(e,"val");break;case"aliases":r.aliases=f.stringAttr(e,"val").split(",");break;case"pPr":r.styles.push({target:"p",values:t.parseDefaultProperties(e,{})}),r.paragraphProps=(0,o.parseParagraphProperties)(e,l.default);break;case"rPr":r.styles.push({target:"span",values:t.parseDefaultProperties(e,{})}),r.runProps=(0,o.parseParagraphProperties)(e,l.default);break;case"tblPr":case"tcPr":r.styles.push({target:"td",values:t.parseDefaultProperties(e,{})});break;case"tblStylePr":for(var n=0,a=t.parseTableStyle(e);n<a.length;n++){var s=a[n];r.styles.push(s)}break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:t.debug&&console.warn("DOCX: Unknown style element: "+e.localName)}})),r},e.prototype.parseTableStyle=function(e){var t=this,r=[],n=f.stringAttr(e,"type"),a="";switch(n){case"firstRow":a="tr.first-row td";break;case"lastRow":a="tr.last-row td";break;case"firstCol":a="td.first-col";break;case"lastCol":a="td.last-col";break;case"band1Vert":a="td.odd-col";break;case"band2Vert":a="td.even-col";break;case"band1Horz":a="tr.odd-row";break;case"band2Horz":a="tr.even-row";break;default:return[]}return f.foreach(e,(function(e){switch(e.localName){case"pPr":r.push({target:a+" p",values:t.parseDefaultProperties(e,{})});break;case"rPr":r.push({target:a+" span",values:t.parseDefaultProperties(e,{})});break;case"tblPr":case"tcPr":r.push({target:a,values:t.parseDefaultProperties(e,{})})}})),r},e.prototype.parseNumberingFile=function(e){var t=this,r=[],n={},a=[];return f.foreach(e,(function(e){switch(e.localName){case"abstractNum":t.parseAbstractNumbering(e,a).forEach((function(e){return r.push(e)}));break;case"numPicBullet":a.push(t.parseNumberingPicBullet(e));break;case"num":var o=f.stringAttr(e,"numId"),s=f.elementStringAttr(e,"abstractNumId","val");n[s]=o}})),r.forEach((function(e){return e.id=n[e.id]})),r},e.prototype.parseNumberingPicBullet=function(e){var t=l.default.element(e,"pict"),r=t&&l.default.element(t,"shape"),n=r&&l.default.element(r,"imagedata");return n?{id:f.intAttr(e,"numPicBulletId"),src:f.stringAttr(n,"id"),style:f.stringAttr(r,"style")}:null},e.prototype.parseAbstractNumbering=function(e,t){var r=this,n=[],a=f.stringAttr(e,"abstractNumId");return f.foreach(e,(function(e){"lvl"===e.localName&&n.push(r.parseNumberingLevel(a,e,t))})),n},e.prototype.parseNumberingLevel=function(e,t,r){var n=this,a={id:e,level:f.intAttr(t,"ilvl"),pStyle:{},rStyle:{},suff:"tab"};return f.foreach(t,(function(e){switch(e.localName){case"pPr":n.parseDefaultProperties(e,a.pStyle);break;case"rPr":n.parseDefaultProperties(e,a.rStyle);break;case"lvlPicBulletId":var t=f.intAttr(e,"val");a.bullet=r.filter((function(e){return e.id==t}))[0];break;case"lvlText":a.levelText=f.stringAttr(e,"val");break;case"numFmt":a.format=f.stringAttr(e,"val");break;case"suff":a.suff=f.stringAttr(e,"val")}})),a},e.prototype.parseParagraph=function(e){var t=this,r={type:n.DomType.Paragraph,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"r":r.children.push(t.parseRun(e,r));break;case"hyperlink":r.children.push(t.parseHyperlink(e,r));break;case"bookmarkStart":r.children.push((0,i.parseBookmarkStart)(e,l.default));break;case"bookmarkEnd":r.children.push((0,i.parseBookmarkEnd)(e,l.default));break;case"pPr":t.parseParagraphProperties(e,r)}})),r},e.prototype.parseParagraphProperties=function(e,t){var r=this;this.parseDefaultProperties(e,t.cssStyle={},null,(function(e){if((0,o.parseParagraphProperty)(e,t,l.default))return!0;switch(e.localName){case"pStyle":a.addElementClass(t,f.className(e,"val"));break;case"cnfStyle":a.addElementClass(t,d.classNameOfCnfStyle(e));break;case"framePr":r.parseFrame(e,t);break;case"rPr":break;default:return!1}return!0}))},e.prototype.parseFrame=function(e,t){"drop"==f.stringAttr(e,"dropCap")&&(t.cssStyle.float="left")},e.prototype.parseHyperlink=function(e,t){var r=this,a={type:n.DomType.Hyperlink,parent:t,children:[]},o=f.stringAttr(e,"anchor");return o&&(a.href="#"+o),f.foreach(e,(function(e){"r"===e.localName&&a.children.push(r.parseRun(e,a))})),a},e.prototype.parseRun=function(e,t){var r=this,a={type:n.DomType.Run,parent:t,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"t":a.children.push({type:n.DomType.Text,text:e.textContent});break;case"fldChar":a.fldCharType=f.stringAttr(e,"fldCharType");break;case"br":a.children.push({type:n.DomType.Break,break:f.stringAttr(e,"type")||"textWrapping"});break;case"lastRenderedPageBreak":a.children.push({type:n.DomType.Break,break:"page"});break;case"sym":a.children.push({type:n.DomType.Symbol,font:f.stringAttr(e,"font"),char:f.stringAttr(e,"char")});break;case"tab":a.children.push({type:n.DomType.Tab});break;case"instrText":a.instrText=e.textContent;break;case"drawing":var t=r.parseDrawing(e);t&&(a.children=[t]);break;case"rPr":r.parseRunProperties(e,a)}})),a},e.prototype.parseRunProperties=function(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,(function(e){switch(e.localName){case"rStyle":t.className=f.className(e,"val");break;case"vertAlign":switch(f.stringAttr(e,"val")){case"subscript":t.wrapper="sub";break;case"superscript":t.wrapper="sup"}break;default:return!1}return!0}))},e.prototype.parseDrawing=function(e){for(var t=0,r=l.default.elements(e);t<r.length;t++){var n=r[t];switch(n.localName){case"inline":case"anchor":return this.parseDrawingWrapper(n)}}},e.prototype.parseDrawingWrapper=function(e){for(var t={type:n.DomType.Drawing,children:[],cssStyle:{}},r="anchor"==e.localName,a=null,o=f.boolAttr(e,"simplePos"),s={relative:"page",align:"left",offset:"0"},i={relative:"page",align:"top",offset:"0"},c=0,p=l.default.elements(e);c<p.length;c++){var h=p[c];switch(h.localName){case"simplePos":o&&(s.offset=f.sizeAttr(h,"x",u.Emu),i.offset=f.sizeAttr(h,"y",u.Emu));break;case"extent":t.cssStyle.width=f.sizeAttr(h,"cx",u.Emu),t.cssStyle.height=f.sizeAttr(h,"cy",u.Emu);break;case"positionH":case"positionV":if(!o){var d="positionH"==h.localName?s:i,m=l.default.element(h,"align"),y=l.default.element(h,"posOffset");m&&(d.align=m.textContent),y&&(d.offset=f.sizeValue(y,u.Emu))}break;case"wrapTopAndBottom":a="wrapTopAndBottom";break;case"wrapNone":a="wrapNone";break;case"graphic":var g=this.parseGraphic(h);g&&t.children.push(g)}}return"wrapTopAndBottom"==a?(t.cssStyle.display="block",s.align&&(t.cssStyle["text-align"]=s.align,t.cssStyle.width="100%")):"wrapNone"==a?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",s.offset&&(t.cssStyle.left=s.offset),i.offset&&(t.cssStyle.top=i.offset)):!r||"left"!=s.align&&"right"!=s.align||(t.cssStyle.float=s.align),t},e.prototype.parseGraphic=function(e){for(var t=l.default.element(e,"graphicData"),r=0,n=l.default.elements(t);r<n.length;r++){var a=n[r];if("pic"===a.localName)return this.parsePicture(a)}return null},e.prototype.parsePicture=function(e){var t={type:n.DomType.Image,src:"",cssStyle:{}},r=l.default.element(e,"blipFill"),a=l.default.element(r,"blip");t.src=f.stringAttr(a,"embed");var o=l.default.element(e,"spPr"),s=l.default.element(o,"xfrm");t.cssStyle.position="relative";for(var i=0,c=l.default.elements(s);i<c.length;i++){var p=c[i];switch(p.localName){case"ext":t.cssStyle.width=f.sizeAttr(p,"cx",u.Emu),t.cssStyle.height=f.sizeAttr(p,"cy",u.Emu);break;case"off":t.cssStyle.left=f.sizeAttr(p,"x",u.Emu),t.cssStyle.top=f.sizeAttr(p,"y",u.Emu)}}return t},e.prototype.parseTable=function(e){var t=this,r={type:n.DomType.Table,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"tr":r.children.push(t.parseTableRow(e));break;case"tblGrid":r.columns=t.parseTableColumns(e);break;case"tblPr":t.parseTableProperties(e,r)}})),r},e.prototype.parseTableColumns=function(e){var t=[];return f.foreach(e,(function(e){"gridCol"===e.localName&&t.push({width:f.sizeAttr(e,"w")})})),t},e.prototype.parseTableProperties=function(e,t){var r=this;switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,(function(e){switch(e.localName){case"tblStyle":t.className=f.className(e,"val");break;case"tblLook":a.addElementClass(t,d.classNameOftblLook(e));break;case"tblpPr":r.parseTablePosition(e,t);break;default:return!1}return!0})),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto"}},e.prototype.parseTablePosition=function(e,t){var r=f.sizeAttr(e,"topFromText"),n=f.sizeAttr(e,"bottomFromText"),a=f.sizeAttr(e,"rightFromText"),o=f.sizeAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=d.addSize(t.cssStyle["margin-bottom"],n),t.cssStyle["margin-left"]=d.addSize(t.cssStyle["margin-left"],o),t.cssStyle["margin-right"]=d.addSize(t.cssStyle["margin-right"],a),t.cssStyle["margin-top"]=d.addSize(t.cssStyle["margin-top"],r)},e.prototype.parseTableRow=function(e){var t=this,r={type:n.DomType.Row,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"tc":r.children.push(t.parseTableCell(e));break;case"trPr":t.parseTableRowProperties(e,r)}})),r},e.prototype.parseTableRowProperties=function(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,(function(e){return"cnfStyle"===e.localName&&(t.className=d.classNameOfCnfStyle(e),!0)}))},e.prototype.parseTableCell=function(e){var t=this,r={type:n.DomType.Cell,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"tbl":r.children.push(t.parseTable(e));break;case"p":r.children.push(t.parseParagraph(e));break;case"tcPr":t.parseTableCellProperties(e,r)}})),r},e.prototype.parseTableCellProperties=function(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,(function(e){switch(e.localName){case"gridSpan":t.span=f.intAttr(e,"val",null);break;case"vMerge":break;case"cnfStyle":t.className=d.classNameOfCnfStyle(e);break;default:return!1}return!0}))},e.prototype.parseDefaultProperties=function(e,r,n,a){var o=this;return void 0===r&&(r=null),void 0===n&&(n=null),void 0===a&&(a=null),r=r||{},f.foreach(e,(function(s){switch(s.localName){case"jc":r["text-align"]=d.valueOfJc(s);break;case"textAlignment":r["vertical-align"]=d.valueOfTextAlignment(s);break;case"color":r.color=f.colorAttr(s,"val",null,t.autos.color);break;case"sz":r["font-size"]=r["min-height"]=f.sizeAttr(s,"val",u.FontSize);break;case"shd":r["background-color"]=f.colorAttr(s,"fill",null,t.autos.shd);break;case"highlight":r["background-color"]=f.colorAttr(s,"val",null,t.autos.highlight);break;case"tcW":if(o.ignoreWidth)break;case"tblW":r.width=d.valueOfSize(s,"w");break;case"trHeight":o.parseTrHeight(s,r);break;case"strike":r["text-decoration"]=d.valueOfStrike(s);break;case"b":r["font-weight"]=d.valueOfBold(s);break;case"i":r["font-style"]="italic";break;case"u":o.parseUnderline(s,r);break;case"ind":case"tblInd":o.parseIndentation(s,r);break;case"rFonts":o.parseFont(s,r);break;case"tblBorders":o.parseBorderProperties(s,n||r);break;case"tblCellSpacing":r["border-spacing"]=d.valueOfMargin(s),r["border-collapse"]="separate";break;case"pBdr":o.parseBorderProperties(s,r);break;case"bdr":r.border=d.valueOfBorder(s);break;case"tcBorders":o.parseBorderProperties(s,r);break;case"noWrap":break;case"tblCellMar":case"tcMar":o.parseMarginProperties(s,n||r);break;case"tblLayout":r["table-layout"]=d.valueOfTblLayout(s);break;case"vAlign":r["vertical-align"]=d.valueOfTextAlignment(s);break;case"spacing":"pPr"==e.localName&&o.parseSpacing(s,r);break;case"lang":case"noProof":case"webHidden":break;default:null==a||a(s)||o.debug&&console.warn("DOCX: Unknown document element: "+s.localName)}})),r},e.prototype.parseUnderline=function(e,t){var r=f.stringAttr(e,"val");if(null!=r&&"none"!=r){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration-style"]="dashed";break;case"dotted":case"dottedHeavy":t["text-decoration-style"]="dotted";break;case"double":t["text-decoration-style"]="double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration-style"]="wavy"}var n=f.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}},e.prototype.parseFont=function(e,t){var r=f.stringAttr(e,"ascii");r&&(t["font-family"]=r)},e.prototype.parseIndentation=function(e,t){var r=f.sizeAttr(e,"firstLine"),n=f.sizeAttr(e,"hanging"),a=f.sizeAttr(e,"left"),o=f.sizeAttr(e,"start"),s=f.sizeAttr(e,"right"),l=f.sizeAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]="-"+n),(a||o)&&(t["margin-left"]=a||o),(s||l)&&(t["margin-right"]=s||l)},e.prototype.parseSpacing=function(e,t){var r=f.sizeAttr(e,"before"),n=f.sizeAttr(e,"after"),a=f.intAttr(e,"line",null),o=f.stringAttr(e,"lineRule");if(r&&(t["margin-top"]=r),n&&(t["margin-bottom"]=n),null!==a)switch(o){case"auto":t["line-height"]=""+(a/240).toFixed(2);break;case"atLeast":t["line-height"]="calc(100% + "+a/20+"pt)";break;default:t["line-height"]=t["min-height"]=a/20+"pt"}},e.prototype.parseMarginProperties=function(e,t){f.foreach(e,(function(e){switch(e.localName){case"left":t["padding-left"]=d.valueOfMargin(e);break;case"right":t["padding-right"]=d.valueOfMargin(e);break;case"top":t["padding-top"]=d.valueOfMargin(e);break;case"bottom":t["padding-bottom"]=d.valueOfMargin(e)}}))},e.prototype.parseTrHeight=function(e,t){f.stringAttr(e,"hRule"),t.height=f.sizeAttr(e,"val")},e.prototype.parseBorderProperties=function(e,t){f.foreach(e,(function(e){switch(e.localName){case"start":case"left":t["border-left"]=d.valueOfBorder(e);break;case"end":case"right":t["border-right"]=d.valueOfBorder(e);break;case"top":t["border-top"]=d.valueOfBorder(e);break;case"bottom":t["border-bottom"]=d.valueOfBorder(e)}}))},e}();t.DocumentParser=h,function(e){e[e.FontSize=0]="FontSize",e[e.Dxa=1]="Dxa",e[e.Emu=2]="Emu",e[e.Border=3]="Border",e[e.Percent=4]="Percent"}(u||(u={}));var f=function(){function e(){}return e.foreach=function(e,t){for(var r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];1==n.nodeType&&t(n)}},e.elementStringAttr=function(t,r,n){var a=l.default.element(t,r);return a?e.stringAttr(a,n):null},e.stringAttr=function(e,t){return l.default.attr(e,t)},e.colorAttr=function(t,r,n,a){void 0===n&&(n=null),void 0===a&&(a="black");var o=e.stringAttr(t,r);switch(o){case"yellow":return o;case"auto":return a}return o?"#"+o:n},e.boolAttr=function(e,t,r){return void 0===r&&(r=!1),l.default.boolAttr(e,t,r)},e.intAttr=function(t,r,n){return void 0===n&&(n=0),e.stringAttr(t,r)?parseInt(e.stringAttr(t,r)):n},e.sizeAttr=function(t,r,n){return void 0===n&&(n=u.Dxa),e.convertSize(e.stringAttr(t,r),n)},e.sizeValue=function(t,r){return void 0===r&&(r=u.Dxa),e.convertSize(t.textContent,r)},e.convertSize=function(e,t){if(void 0===t&&(t=u.Dxa),null==e||/.+p[xt]$/.test(e))return e;var r=parseInt(e);switch(t){case u.Dxa:return(.05*r).toFixed(2)+"pt";case u.Emu:return(r/12700).toFixed(2)+"pt";case u.FontSize:return(.5*r).toFixed(2)+"pt";case u.Border:return(.125*r).toFixed(2)+"pt";case u.Percent:return(.02*r).toFixed(2)+"%"}return e},e.className=function(t,r){var n=e.stringAttr(t,r);return n&&n.replace(/[ .]+/g,"-").replace(/[&]+/g,"and")},e}(),d=function(){function e(){}return e.valueOfBold=function(e){return f.boolAttr(e,"val",!0)?"bold":"normal"},e.valueOfSize=function(e,t){var r=u.Dxa;switch(f.stringAttr(e,"type")){case"dxa":break;case"pct":r=u.Percent}return f.sizeAttr(e,t,r)},e.valueOfStrike=function(e){return f.boolAttr(e,"val",!0)?"line-through":"none"},e.valueOfMargin=function(e){return f.sizeAttr(e,"w")},e.valueOfBorder=function(e){if("nil"==f.stringAttr(e,"val"))return"none";var t=f.colorAttr(e,"color");return f.sizeAttr(e,"sz",u.Border)+" solid "+("auto"==t?"black":t)},e.valueOfTblLayout=function(e){return"fixed"==f.stringAttr(e,"val")?"fixed":"auto"},e.classNameOfCnfStyle=function(e){var t="",r=f.stringAttr(e,"val");return"1"==r[0]&&(t+=" first-row"),"1"==r[1]&&(t+=" last-row"),"1"==r[2]&&(t+=" first-col"),"1"==r[3]&&(t+=" last-col"),"1"==r[4]&&(t+=" odd-col"),"1"==r[5]&&(t+=" even-col"),"1"==r[6]&&(t+=" odd-row"),"1"==r[7]&&(t+=" even-row"),"1"==r[8]&&(t+=" ne-cell"),"1"==r[9]&&(t+=" nw-cell"),"1"==r[10]&&(t+=" se-cell"),"1"==r[11]&&(t+=" sw-cell"),t.trim()},e.valueOfJc=function(e){var t=f.stringAttr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t},e.valueOfTextAlignment=function(e){var t=f.stringAttr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t},e.addSize=function(e,t){return null==e?t:null==t?e:"calc("+e+" + "+t+")"},e.checkMask=function(e,t){return(e&t)==t},e.classNameOftblLook=function(e){var t="";return f.boolAttr(e,"firstColumn")&&(t+=" first-col"),f.boolAttr(e,"firstRow")&&(t+=" first-row"),f.boolAttr(e,"lastColumn")&&(t+=" lat-col"),f.boolAttr(e,"lastRow")&&(t+=" last-row"),f.boolAttr(e,"noHBand")&&(t+=" no-hband"),f.boolAttr(e,"noVBand")&&(t+=" no-vband"),t.trim()},e}()},162:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CorePropsPart=void 0;var o=r(530),s=r(614),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.parseXml=function(e){this.props=(0,s.parseCoreProps)(e,this._package.xmlParser)},t}(o.Part);t.CorePropsPart=l},614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoreProps=void 0,t.parseCoreProps=function(e,t){for(var r={},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"title":r.title=o.textContent;break;case"description":r.description=o.textContent;break;case"subject":r.subject=o.textContent;break;case"creator":r.creator=o.textContent;break;case"keywords":r.keywords=o.textContent;break;case"language":r.language=o.textContent;break;case"lastModifiedBy":r.lastModifiedBy=o.textContent;break;case"revision":o.textContent&&(r.revision=parseInt(o.textContent))}}return r}},665:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedPropsPart=void 0;var o=r(530),s=r(668),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.parseXml=function(e){this.props=(0,s.parseExtendedProps)(e,this._package.xmlParser)},t}(o.Part);t.ExtendedPropsPart=l},668:(e,t)=>{function r(e){if(void 0!==e)return parseInt(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.parseExtendedProps=void 0,t.parseExtendedProps=function(e,t){for(var n={},a=0,o=t.elements(e);a<o.length;a++){var s=o[a];switch(s.localName){case"Template":n.template=s.textContent;break;case"Pages":n.pages=r(s.textContent);break;case"Words":n.words=r(s.textContent);break;case"Characters":n.characters=r(s.textContent);break;case"Application":n.application=s.textContent;break;case"Lines":n.lines=r(s.textContent);break;case"Paragraphs":n.paragraphs=r(s.textContent);break;case"Company":n.company=s.textContent;break;case"AppVersion":n.appVersion=s.textContent}}return n}},667:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.renderAsync=void 0;var a=r(213),o=r(168),s=r(932);t.renderAsync=function(e,t,r,l){void 0===r&&(r=null),void 0===l&&(l=null);var i=new o.DocumentParser,c=new s.HtmlRenderer(window.document),p=n({ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,trimXmlDeclaration:!0},l);return i.ignoreWidth=p.ignoreWidth,i.debug=p.debug||i.debug,c.className=p.className||"docx",c.inWrapper=p.inWrapper,a.WordDocument.load(e,i,{trimXmlDeclaration:p.trimXmlDeclaration}).then((function(e){return c.render(e,t,r,p),e}))}},679:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBookmarkEnd=t.parseBookmarkStart=void 0;var n=r(445);t.parseBookmarkStart=function(e,t){return{type:n.DomType.BookmarkStart,id:t.attr(e,"id"),name:t.attr(e,"name"),colFirst:t.intAttr(e,"colFirst"),colLast:t.intAttr(e,"colLast")}},t.parseBookmarkEnd=function(e,t){return{type:n.DomType.BookmarkEnd,id:t.attr(e,"id")}}},186:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCommonProperty=t.convertLength=t.LengthUsage=t.ns=void 0,t.ns={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},t.LengthUsage={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:1/240,unit:null}},t.convertLength=function(e,r){return void 0===r&&(r=t.LengthUsage.Dxa),e?{value:parseInt(e)*r.mul,type:r.unit}:null},t.parseCommonProperty=function(e,r,n){if(e.namespaceURI!=t.ns.wordml)return!1;switch(e.localName){case"color":r.color=n.attr(e,"val");break;case"sz":r.fontSize=n.lengthAttr(e,"val",t.LengthUsage.FontSize);break;default:return!1}return!0}},478:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.body=this._documentParser.parseDocumentFile(e)},t}(r(530).Part);t.DocumentPart=o},445:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DomType=void 0,(r=t.DomType||(t.DomType={})).Document="document",r.Paragraph="paragraph",r.Run="run",r.Break="break",r.Table="table",r.Row="row",r.Cell="cell",r.Hyperlink="hyperlink",r.Drawing="drawing",r.Image="image",r.Text="text",r.Tab="tab",r.Symbol="symbol",r.BookmarkStart="bookmarkStart",r.BookmarkEnd="bookmarkEnd",r.Footer="footer",r.Header="header"},520:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLineSpacing=void 0,t.parseLineSpacing=function(e,t){return{before:t.lengthAttr(e,"before"),after:t.lengthAttr(e,"after"),line:t.intAttr(e,"line"),lineRule:t.attr(e,"lineRule")}}},797:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumbering=t.parseTabs=t.parseParagraphProperty=t.parseParagraphProperties=void 0;var n=r(186),a=r(269),o=r(520),s=r(235);function l(e,t,r){if(e.namespaceURI!=n.ns.wordml)return!1;if((0,n.parseCommonProperty)(e,t,r))return!0;switch(e.localName){case"tabs":t.tabs=i(e,r);break;case"sectPr":t.sectionProps=(0,a.parseSectionProperties)(e,r);break;case"numPr":t.numbering=c(e,r);break;case"spacing":return t.lineSpacing=(0,o.parseLineSpacing)(e,r),!1;case"textAlignment":return t.textAlignment=r.attr(e,"val"),!1;case"keepNext":t.keepLines=r.boolAttr(e,"val",!0);break;case"keepNext":t.keepNext=r.boolAttr(e,"val",!0);break;case"pageBreakBefore":t.pageBreakBefore=r.boolAttr(e,"val",!0);break;case"outlineLvl":t.outlineLevel=r.intAttr(e,"val");break;case"pStyle":t.styleName=r.attr(e,"val");break;case"rPr":t.runProps=(0,s.parseRunProperties)(e,r);break;default:return!1}return!0}function i(e,t){return t.elements(e,"tab").map((function(e){return{position:t.lengthAttr(e,"pos"),leader:t.attr(e,"leader"),style:t.attr(e,"val")}}))}function c(e,t){for(var r={},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"numId":r.id=t.attr(o,"val");break;case"ilvl":r.level=t.intAttr(o,"val")}}return r}t.parseParagraphProperties=function(e,t){for(var r={},n=0,a=t.elements(e);n<a.length;n++)l(a[n],r,t);return r},t.parseParagraphProperty=l,t.parseTabs=i,t.parseNumbering=c},235:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRunProperty=t.parseRunProperties=void 0;var n=r(186);function a(e,t,r){return!!(0,n.parseCommonProperty)(e,t,r)}t.parseRunProperties=function(e,t){for(var r={},n=0,o=t.elements(e);n<o.length;n++)a(o[n],r,t);return r},t.parseRunProperty=a},269:(e,t)=>{function r(e,t){return{numberOfColumns:t.intAttr(e,"num"),space:t.lengthAttr(e,"space"),separator:t.boolAttr(e,"sep"),equalWidth:t.boolAttr(e,"equalWidth",!0),columns:t.elements(e,"col").map((function(e){return{width:t.lengthAttr(e,"w"),space:t.lengthAttr(e,"space")}}))}}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.parseSectionProperties=t.SectionType=void 0,(n=t.SectionType||(t.SectionType={})).Continuous="continuous",n.NextPage="nextPage",n.NextColumn="nextColumn",n.EvenPage="evenPage",n.OddPage="oddPage",t.parseSectionProperties=function(e,t){for(var n={},a=0,o=t.elements(e);a<o.length;a++){var s=o[a];switch(s.localName){case"pgSz":n.pageSize={width:t.lengthAttr(s,"w"),height:t.lengthAttr(s,"h"),orientation:t.attr(s,"orient")};break;case"type":n.type=t.attr(s,"val");break;case"pgMar":n.pageMargins={left:t.lengthAttr(s,"left"),right:t.lengthAttr(s,"right"),top:t.lengthAttr(s,"top"),bottom:t.lengthAttr(s,"bottom"),header:t.lengthAttr(s,"header"),footer:t.lengthAttr(s,"footer"),gutter:t.lengthAttr(s,"gutter")};break;case"cols":n.columns=r(s,t)}}return n}},380:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontTablePart=void 0;var o=r(530),s=r(512),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.parseXml=function(e){this.fonts=(0,s.parseFonts)(e,this._package.xmlParser)},t}(o.Part);t.FontTablePart=l},512:(e,t)=>{function r(e,t){for(var r={name:t.attr(e,"name")},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"family":r.family=t.attr(o,"val");break;case"altName":r.altName=t.attr(o,"val");break;case"embedRegular":r.fontKey=t.attr(o,"fontKey"),r.refId=t.attr(o,"id")}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.parseFont=t.parseFonts=void 0,t.parseFonts=function(e,t){return t.elements(e).map((function(e){return r(e,t)}))},t.parseFont=r},279:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.FooterPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.footerElement=this._documentParser.parseFooter(e)},t}(r(530).Part);t.FooterPart=o},979:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WmlFooter=void 0;var n=r(445);t.WmlFooter=function(){this.type=n.DomType.Footer,this.children=[],this.cssStyle={}}},602:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.headerElement=this._documentParser.parseHeader(e)},t}(r(530).Part);t.HeaderPart=o},662:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WmlHeader=void 0;var n=r(445);t.WmlHeader=function(){this.type=n.DomType.Header,this.children=[],this.cssStyle={}}},932:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlRenderer=void 0;var a=r(445),o=r(593),s=r(630),l=function(){function e(e){this.htmlDocument=e,this.inWrapper=!0,this.className="docx"}return e.prototype.render=function(e,t,r,n){void 0===r&&(r=null),this.document=e,this.options=n,this.styleMap=null,c(r=r||t),c(t),u(r,"docxjs library predefined styles"),r.appendChild(this.renderDefaultStyle()),null!=e.stylesPart&&(this.styleMap=this.processStyles(e.stylesPart.styles),u(r,"docx document styles"),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(u(r,"docx document numbering styles"),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),!n.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var a=this.renderSections(e.documentPart.body);if(this.inWrapper){var o=this.renderWrapper();i(o,a),t.appendChild(o)}else i(t,a)},e.prototype.renderFontTable=function(e,t){for(var r=function(e){n.document.loadFont(e.refId,e.fontKey).then((function(r){var n='@font-face {\n font-family: "'+e.name+'";\n src: url('+r+");\n }";u(t,"Font "+e.name),t.appendChild(p(n))}))},n=this,a=0,o=e.fonts.filter((function(e){return e.refId}));a<o.length;a++)r(o[a])},e.prototype.processClassName=function(e){return e?this.className+"_"+e:this.className},e.prototype.processStyles=function(e){for(var t={},r=0,n=e.filter((function(e){return null!=e.id}));r<n.length;r++)t[(d=n[r]).id]=d;for(var a=0,o=e.filter((function(e){return e.basedOn}));a<o.length;a++){var s=t[(d=o[a]).basedOn];if(s)for(var l,i=function(e){(l=s.styles.filter((function(t){return t.target==e.target})))&&l.length>0&&c.copyStyleProperties(l[0].values,e.values)},c=this,p=0,u=d.styles;p<u.length;p++)i(u[p]);else this.options.debug&&console.warn("Can't find base style "+d.basedOn)}for(var h=0,f=e;h<f.length;h++){var d;(d=f[h]).cssName=this.processClassName(this.escapeClassName(d.id))}return t},e.prototype.processElement=function(e){if(e.children)for(var t=0,r=e.children;t<r.length;t++){var n=r[t];n.className=this.processClassName(n.className),n.parent=e,n.type==a.DomType.Table?this.processTable(n):this.processElement(n)}},e.prototype.processTable=function(e){for(var t=0,r=e.children;t<r.length;t++)for(var n=0,a=r[t].children;n<a.length;n++){var o=a[n];o.cssStyle=this.copyStyleProperties(e.cellStyle,o.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(o)}},e.prototype.copyStyleProperties=function(e,t,r){if(void 0===r&&(r=null),!e)return t;null==t&&(t={}),null==r&&(r=Object.getOwnPropertyNames(e));for(var n=0,a=r;n<a.length;n++){var o=a[n];e.hasOwnProperty(o)&&!t.hasOwnProperty(o)&&(t[o]=e[o])}return t},e.prototype.createSection=function(e,t){var r=this.htmlDocument.createElement("section");return r.className=e,t&&(t.pageMargins&&(r.style.paddingLeft=this.renderLength(t.pageMargins.left),r.style.paddingRight=this.renderLength(t.pageMargins.right),r.style.paddingTop=this.renderLength(t.pageMargins.top),r.style.paddingBottom=this.renderLength(t.pageMargins.bottom)),t.pageSize&&(this.options.ignoreWidth||(r.style.width=this.renderLength(t.pageSize.width)),this.options.ignoreHeight||(r.style.minHeight=this.renderLength(t.pageSize.height))),t.columns&&t.columns.numberOfColumns&&(r.style.columnCount=""+t.columns.numberOfColumns,r.style.columnGap=this.renderLength(t.columns.space),t.columns.separator&&(r.style.columnRule="1px solid black"))),r},e.prototype.renderSections=function(e){var t=[];this.processElement(e);for(var r=0,n=this.splitBySection(e.children);r<n.length;r++){var a=n[r],o=this.createSection(this.className,a.sectProps||e.props);this.renderElements(a.elements,e,o),t.push(o)}return t},e.prototype.splitBySection=function(e){for(var t,r={sectProps:null,elements:[]},o=[r],s=0,l=e;s<l.length;s++){var i=l[s];if(i.type==a.DomType.Paragraph){var c=i.styleName,p=this.styleMap&&c?this.styleMap[c]:null;(null===(t=null==p?void 0:p.paragraphProps)||void 0===t?void 0:t.pageBreakBefore)&&(r.sectProps=h,r={sectProps:null,elements:[]},o.push(r))}if(r.elements.push(i),i.type==a.DomType.Paragraph){var u=i,h=u.sectionProps,f=-1,d=-1;if(this.options.breakPages&&u.children&&(f=u.children.findIndex((function(e){var t,r;return-1!=(d=null!==(r=null===(t=e.children)||void 0===t?void 0:t.findIndex((function(e){return"page"==e.break})))&&void 0!==r?r:-1)}))),(h||-1!=f)&&(r.sectProps=h,r={sectProps:null,elements:[]},o.push(r)),-1!=f){var m=u.children[f],y=d<m.children.length-1;if(f<u.children.length-1||y){var g=i.children,b=n(n({},i),{children:g.slice(f)});if(i.children=g.slice(0,f),r.elements.push(b),y){var v=m.children,P=n(n({},m),{children:v.slice(0,d)});i.children.push(P),m.children=v.slice(d)}}}}}for(var k=null,w=o.length-1;w>=0;w--)null==o[w].sectProps?o[w].sectProps=k:k=o[w].sectProps;return o},e.prototype.renderLength=function(e){return e?""+e.value+e.type:null},e.prototype.renderWrapper=function(){var e=document.createElement("div");return e.className=this.className+"-wrapper",e},e.prototype.renderDefaultStyle=function(){var e=this.className;return p("\n."+e+"-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } \n."+e+"-wrapper section."+e+" { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }\n."+e+" { color: black; }\nsection."+e+" { box-sizing: border-box; }\n."+e+" table { border-collapse: collapse; }\n."+e+" table td, ."+e+" table th { vertical-align: top; }\n."+e+" p { margin: 0pt; min-height: 1em; }\n."+e+" span { white-space: pre-wrap; }\n")},e.prototype.renderNumbering=function(e,t){for(var r,a,o=this,s="",l=[],i=function(){if(r="p."+c.numberingClass(f.id,f.level),a="none",f.bullet){var e=("--"+c.className+"-"+f.bullet.src).toLowerCase();s+=c.styleToString(r+":before",{content:"' '",display:"inline-block",background:"var("+e+")"},f.bullet.style),c.document.loadNumberingImage(f.bullet.src).then((function(r){var n="."+o.className+"-wrapper { "+e+": url("+r+") }";t.appendChild(p(n))}))}else if(f.levelText){var i=c.numberingCounter(f.id,f.level);f.level>0?s+=c.styleToString("p."+c.numberingClass(f.id,f.level-1),{"counter-reset":i}):l.push(i),s+=c.styleToString(r+":before",n({content:c.levelTextToContent(f.levelText,f.suff,f.id,c.numFormatToCssValue(f.format)),"counter-increment":i},f.rStyle))}else a=c.numFormatToCssValue(f.format);s+=c.styleToString(r,n({display:"list-item","list-style-position":"inside","list-style-type":a},f.pStyle))},c=this,u=0,h=e;u<h.length;u++){var f=h[u];i()}return l.length>0&&(s+=this.styleToString("."+this.className+"-wrapper",{"counter-reset":l.join(" ")})),p(s)},e.prototype.renderStyles=function(e){for(var t="",r=this.styleMap,n=0,a=e;n<a.length;n++){var o=a[n],s=o.styles;if(o.linked){var l=o.linked&&r[o.linked];l?s=s.concat(l.styles):this.options.debug&&console.warn("Can't find linked style "+o.linked)}for(var i=0,c=s;i<c.length;i++){var u=c[i],h="";o.target==u.target?h+=o.target+"."+o.cssName:o.target?h+=o.target+"."+o.cssName+" "+u.target:h+="."+o.cssName+" "+u.target,o.isDefault&&o.target&&(h="."+this.className+" "+o.target+", "+h),t+=this.styleToString(h,u.values)}}return p(t)},e.prototype.renderElement=function(e,t){switch(e.type){case a.DomType.Paragraph:return this.renderParagraph(e);case a.DomType.BookmarkStart:return this.renderBookmarkStart(e);case a.DomType.BookmarkEnd:return null;case a.DomType.Run:return this.renderRun(e);case a.DomType.Table:return this.renderTable(e);case a.DomType.Row:return this.renderTableRow(e);case a.DomType.Cell:return this.renderTableCell(e);case a.DomType.Hyperlink:return this.renderHyperlink(e);case a.DomType.Drawing:return this.renderDrawing(e);case a.DomType.Image:return this.renderImage(e);case a.DomType.Text:return this.renderText(e);case a.DomType.Tab:return this.renderTab(e);case a.DomType.Symbol:return this.renderSymbol(e);case a.DomType.Break:return this.renderBreak(e)}return null},e.prototype.renderChildren=function(e,t){return this.renderElements(e.children,e,t)},e.prototype.renderElements=function(e,t,r){var n=this;if(null==e)return null;var a=e.map((function(e){return n.renderElement(e,t)})).filter((function(e){return null!=e}));if(r)for(var o=0,s=a;o<s.length;o++){var l=s[o];r.appendChild(l)}return a},e.prototype.renderParagraph=function(e){var t=this.htmlDocument.createElement("p");if(this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProeprties(t.style,e),e.numbering){var r=this.numberingClass(e.numbering.id,e.numbering.level);t.className=(0,o.appendClass)(t.className,r)}if(e.styleName){var n=this.processClassName(this.escapeClassName(e.styleName));t.className=(0,o.appendClass)(t.className,n)}return t},e.prototype.renderRunProperties=function(e,t){this.renderCommonProeprties(e,t)},e.prototype.renderCommonProeprties=function(e,t){null!=t&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=this.renderLength(t.fontSize)))},e.prototype.renderHyperlink=function(e){var t=this.htmlDocument.createElement("a");return this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.href&&(t.href=e.href),t},e.prototype.renderDrawing=function(e){var t=this.htmlDocument.createElement("div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t},e.prototype.renderImage=function(e){var t=this.htmlDocument.createElement("img");return this.renderStyleValues(e.cssStyle,t),this.document&&this.document.loadDocumentImage(e.src).then((function(e){t.src=e})),t},e.prototype.renderText=function(e){return this.htmlDocument.createTextNode(e.text)},e.prototype.renderBreak=function(e){return"textWrapping"==e.break?this.htmlDocument.createElement("br"):null},e.prototype.renderSymbol=function(e){var t=this.htmlDocument.createElement("span");return t.style.fontFamily=e.font,t.innerHTML="&#x"+e.char+";",t},e.prototype.renderTab=function(e){var t=this.htmlDocument.createElement("span");return t.innerHTML="&emsp;",this.options.experimental&&setTimeout((function(){var r=function(e,t){for(var r=e.parent;null!=r&&r.type!=t;)r=r.parent;return r}(e,a.DomType.Paragraph);null!=r.tabs&&(r.tabs.sort((function(e,t){return e.position.value-t.position.value})),t.style.display="inline-block",(0,s.updateTabStop)(t,r.tabs))}),0),t},e.prototype.renderBookmarkStart=function(e){var t=this.htmlDocument.createElement("span");return t.id=e.name,t},e.prototype.renderRun=function(e){if(e.fldCharType||e.instrText)return null;var t=this.htmlDocument.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.href){var r=this.htmlDocument.createElement("a");return r.href=e.href,r.appendChild(t),r}if(e.wrapper){var n=this.htmlDocument.createElement(e.wrapper);return n.appendChild(t),n}return t},e.prototype.renderTable=function(e){var t=this.htmlDocument.createElement("table");return e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t},e.prototype.renderTableColumns=function(e){for(var t=this.htmlDocument.createElement("colGroup"),r=0,n=e;r<n.length;r++){var a=n[r],o=this.htmlDocument.createElement("col");a.width&&(o.style.width=a.width),t.appendChild(o)}return t},e.prototype.renderTableRow=function(e){var t=this.htmlDocument.createElement("tr");return this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t},e.prototype.renderTableCell=function(e){var t=this.htmlDocument.createElement("td");return this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),t},e.prototype.renderStyleValues=function(e,t){if(null!=e)for(var r in e)e.hasOwnProperty(r)&&(t.style[r]=e[r])},e.prototype.renderClass=function(e,t){e.className&&(t.className=e.className)},e.prototype.numberingClass=function(e,t){return this.className+"-num-"+e+"-"+t},e.prototype.styleToString=function(e,t,r){void 0===r&&(r=null);var n=e+" {\r\n";for(var a in t)n+=" "+a+": "+t[a]+";\r\n";return r&&(n+=";"+r),n+"}\r\n"},e.prototype.numberingCounter=function(e,t){return this.className+"-num-"+e+"-"+t},e.prototype.levelTextToContent=function(e,t,r,n){var a,o=this;return'"'+e.replace(/%\d*/g,(function(e){var t=parseInt(e.substring(1),10)-1;return'"counter('+o.numberingCounter(r,t)+", "+n+')"'}))+(null!==(a={tab:"\\9",space:"\\a0"}[t])&&void 0!==a?a:"")+'"'},e.prototype.numFormatToCssValue=function(e){return{none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman"}[e]||e},e.prototype.escapeClassName=function(e){return null==e?void 0:e.replace(/[ .]+/g,"-").replace(/[&]+/g,"and")},e}();function i(e,t){for(var r=0,n=t;r<n.length;r++){var a=n[r];e.appendChild(a)}}function c(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function p(e){var t=document.createElement("style");return t.innerHTML=e,t}function u(e,t){e.appendChild(document.createComment(t))}t.HtmlRenderer=l},630:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateTabStop=void 0,t.updateTabStop=function(e,t,r){void 0===r&&(r=.75);var n=e.closest("p"),a=e.getBoundingClientRect(),o=n.getBoundingClientRect(),s=(a.left-o.left)*r,l=t.find((function(e){return"clear"!=e.style&&e.position.value>s}));if(null!=l)switch(e.style.display="inline-block",e.style.width=l.position.value-s+"pt",l.leader){case"dot":case"middleDot":e.style.borderBottom="1px black dotted";break;case"hyphen":case"heavy":case"underscore":e.style.borderBottom="1px black solid"}}},527:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NumberingPart=void 0;var o=r(530),s=r(682),l=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){Object.assign(this,(0,s.parseNumberingPart)(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)},t}(o.Part);t.NumberingPart=l},682:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumberingBulletPicture=t.parseNumberingLevelOverrride=t.parseNumberingLevel=t.parseAbstractNumbering=t.parseNumbering=t.parseNumberingPart=void 0;var n=r(797),a=r(235);function o(e,t){for(var r={id:t.attr(e,"numId"),overrides:[]},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"abstractNumId":r.abstractId=t.attr(o,"val");break;case"lvlOverride":r.overrides.push(i(o,t))}}return r}function s(e,t){for(var r={id:t.attr(e,"abstractNumId"),levels:[]},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"name":r.name=t.attr(o,"val");break;case"multiLevelType":r.multiLevelType=t.attr(o,"val");break;case"numStyleLink":r.numberingStyleLink=t.attr(o,"val");break;case"styleLink":r.styleLink=t.attr(o,"val");break;case"lvl":r.levels.push(l(o,t))}}return r}function l(e,t){for(var r={level:t.intAttr(e,"ilvl")},o=0,s=t.elements(e);o<s.length;o++){var l=s[o];switch(l.localName){case"start":r.start=t.attr(l,"val");break;case"lvlRestart":r.restart=t.intAttr(l,"val");break;case"numFmt":r.format=t.attr(l,"val");break;case"lvlText":r.text=t.attr(l,"val");break;case"lvlJc":r.justification=t.attr(l,"val");break;case"lvlPicBulletId":r.bulletPictureId=t.attr(l,"val");break;case"pPr":r.paragraphProps=(0,n.parseParagraphProperties)(l,t);break;case"rPr":r.runProps=(0,a.parseRunProperties)(l,t)}}return r}function i(e,t){for(var r={level:t.intAttr(e,"ilvl")},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"startOverride":r.start=t.intAttr(o,"val");break;case"lvl":r.numberingLevel=l(o,t)}}return r}function c(e,t){var r=t.element(e,"pict"),n=r&&t.element(r,"shape"),a=n&&t.element(n,"imagedata");return a?{id:t.attr(e,"numPicBulletId"),referenceId:t.attr(a,"id"),style:t.attr(n,"style")}:null}t.parseNumberingPart=function(e,t){for(var r={numberings:[],abstractNumberings:[],bulletPictures:[]},n=0,a=t.elements(e);n<a.length;n++){var l=a[n];switch(l.localName){case"num":r.numberings.push(o(l,t));break;case"abstractNum":r.abstractNumberings.push(s(l,t));break;case"numPicBullet":r.bulletPictures.push(c(l,t))}}return r},t.parseNumbering=o,t.parseAbstractNumbering=s,t.parseNumberingLevel=l,t.parseNumberingLevelOverrride=i,t.parseNumberingBulletPicture=c},472:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XmlParser=t.serializeXmlString=t.parseXmlString=void 0;var n=r(186);t.parseXmlString=function(e,t){void 0===t&&(t=!1),t&&(e=e.replace(/<[?].*[?]>/,""));var r,n=(new DOMParser).parseFromString(e,"application/xml"),a=null===(r=n.getElementsByTagName("parsererror")[0])||void 0===r?void 0:r.textContent;if(a)throw new Error(a);return n},t.serializeXmlString=function(e){return(new XMLSerializer).serializeToString(e)};var a=function(){function e(){}return e.prototype.parse=function(e,t){return void 0===t&&(t=!0),t&&(e=e.replace(/<[?].*[?]>/,"")),(new DOMParser).parseFromString(e,"application/xml").firstChild},e.prototype.elements=function(e,t){void 0===t&&(t=null);for(var r=[],n=0,a=e.childNodes.length;n<a;n++){var o=e.childNodes.item(n);1!=o.nodeType||null!=t&&o.localName!=t||r.push(o)}return r},e.prototype.element=function(e,t){for(var r=0,n=e.childNodes.length;r<n;r++){var a=e.childNodes.item(r);if(1==a.nodeType&&a.localName==t)return a}return null},e.prototype.elementAttr=function(e,t,r){var n=this.element(e,t);return n?this.attr(n,r):void 0},e.prototype.attr=function(e,t){for(var r=0,n=e.attributes.length;r<n;r++){var a=e.attributes.item(r);if(a.localName==t)return a.value}return null},e.prototype.intAttr=function(e,t,r){void 0===r&&(r=null);var n=this.attr(e,t);return n?parseInt(n):r},e.prototype.floatAttr=function(e,t,r){void 0===r&&(r=null);var n=this.attr(e,t);return n?parseFloat(n):r},e.prototype.boolAttr=function(e,t,r){switch(void 0===r&&(r=null),this.attr(e,t)){case"1":return!0;case"0":return!1;default:return r}},e.prototype.lengthAttr=function(e,t,r){return void 0===r&&(r=n.LengthUsage.Dxa),(0,n.convertLength)(this.attr(e,t),r)},e}();t.XmlParser=a;var o=new a;t.default=o},240:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.StylesPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.styles=this._documentParser.parseStylesFile(e)},t}(r(530).Part);t.StylesPart=o},893:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ThemePart=void 0;var o=r(530),s=r(55),l=function(e){function t(t,r){return e.call(this,t,r)||this}return a(t,e),t.prototype.parseXml=function(e){this.theme=(0,s.parseTheme)(e,this._package.xmlParser)},t}(o.Part);t.ThemePart=l},55:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseFontInfo=t.parseFontScheme=t.parseColorScheme=t.parseTheme=t.DmlTheme=void 0;var r=function(){};function n(e,t){for(var r={name:t.attr(e,"name"),colors:{}},n=0,a=t.elements(e);n<a.length;n++){var o=a[n],s=t.element(o,"srgbClr"),l=t.element(o,"sysClr");s?r.colors[o.localName]=t.attr(s,"val"):l&&(r.colors[o.localName]=t.attr(l,"lastClr"))}return r}function a(e,t){for(var r={name:t.attr(e,"name")},n=0,a=t.elements(e);n<a.length;n++){var s=a[n];switch(s.localName){case"majorFont":r.majorFont=o(s,t);break;case"minorFont":r.minorFont=o(s,t)}}return r}function o(e,t){return{latinTypeface:t.elementAttr(e,"latin","typeface"),eaTypeface:t.elementAttr(e,"ea","typeface"),csTypeface:t.elementAttr(e,"cs","typeface")}}t.DmlTheme=r,t.parseTheme=function(e,t){for(var o=new r,s=t.element(e,"themeElements"),l=0,i=t.elements(s);l<i.length;l++){var c=i[l];switch(c.localName){case"clrScheme":o.colorScheme=n(c,t);break;case"fontScheme":o.fontScheme=a(c,t)}}return o},t.parseColorScheme=n,t.parseFontScheme=a,t.parseFontInfo=o},593:function(e,t){var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};function n(e,t){return e?e+" "+t:t}function a(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeDeep=t.isObject=t.keyBy=t.resolvePath=t.splitPath=t.appendClass=t.addElementClass=void 0,t.addElementClass=function(e,t){return e.className=n(e.className,t)},t.appendClass=n,t.splitPath=function(e){var t=e.lastIndexOf("/")+1;return[0==t?"":e.substring(0,t),0==t?e:e.substring(t)]},t.resolvePath=function(e,t){try{var r="file://docx/";return new URL(e,r+t).toString().substr(r.length)}catch(r){return""+t+e}},t.keyBy=function(e,t){return e.reduce((function(e,r){return e[t(r)]=r,e}),{})},t.isObject=a,t.mergeDeep=function e(t){for(var n,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];if(!o.length)return t;var l=o.shift();if(a(t)&&a(l))for(var i in l)if(a(l[i])){var c=null!==(n=t[i])&&void 0!==n?n:t[i]={};e(c,l[i])}else t[i]=l[i];return e.apply(void 0,r([t],o,!1))}},213:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.deobfuscate=t.WordDocument=void 0;var n=r(461),a=r(380),o=r(522),s=r(478),l=r(593),i=r(527),c=r(240),p=r(279),u=r(602),h=r(665),f=r(162),d=r(893),m=[{type:n.RelationshipTypes.OfficeDocument,target:"word/document.xml"},{type:n.RelationshipTypes.ExtendedProperties,target:"docProps/app.xml"},{type:n.RelationshipTypes.CoreProperties,target:"docProps/core.xml"}],y=function(){function e(){this.parts=[],this.partsMap={}}return e.load=function(t,r,n){var a=new e;return a._parser=r,o.OpenXmlPackage.load(t,n).then((function(e){return a._package=e,a._package.loadRelationships()})).then((function(e){a.rels=e;var t=m.map((function(t){var r,n=null!==(r=e.find((function(e){return e.type===t.type})))&&void 0!==r?r:t;return a.loadRelationshipPart(n.target,n.type)}));return Promise.all(t)})).then((function(){return a}))},e.prototype.save=function(e){return void 0===e&&(e="blob"),this._package.save(e)},e.prototype.loadRelationshipPart=function(e,t){var r=this;if(this.partsMap[e])return Promise.resolve(this.partsMap[e]);if(!this._package.get(e))return Promise.resolve(null);var o=null;switch(t){case n.RelationshipTypes.OfficeDocument:this.documentPart=o=new s.DocumentPart(this._package,e,this._parser);break;case n.RelationshipTypes.FontTable:this.fontTablePart=o=new a.FontTablePart(this._package,e);break;case n.RelationshipTypes.Numbering:this.numberingPart=o=new i.NumberingPart(this._package,e,this._parser);break;case n.RelationshipTypes.Styles:this.stylesPart=o=new c.StylesPart(this._package,e,this._parser);break;case n.RelationshipTypes.Theme:o=new d.ThemePart(this._package,e);break;case n.RelationshipTypes.Footer:o=new p.FooterPart(this._package,e,this._parser);break;case n.RelationshipTypes.Header:o=new u.HeaderPart(this._package,e,this._parser);break;case n.RelationshipTypes.CoreProperties:this.corePropsPart=o=new f.CorePropsPart(this._package,e);break;case n.RelationshipTypes.ExtendedProperties:this.extendedPropsPart=o=new h.ExtendedPropsPart(this._package,e)}return null==o?Promise.resolve(null):(this.partsMap[e]=o,this.parts.push(o),o.load().then((function(){if(null==o.rels||0==o.rels.length)return o;var e=(0,l.splitPath)(o.path)[0],t=o.rels.map((function(t){return r.loadRelationshipPart((0,l.resolvePath)(t.target,e),t.type)}));return Promise.all(t).then((function(){return o}))})))},e.prototype.loadDocumentImage=function(e){return this.loadResource(this.documentPart,e,"blob").then((function(e){return e?URL.createObjectURL(e):null}))},e.prototype.loadNumberingImage=function(e){return this.loadResource(this.numberingPart,e,"blob").then((function(e){return e?URL.createObjectURL(e):null}))},e.prototype.loadFont=function(e,t){return this.loadResource(this.fontTablePart,e,"uint8array").then((function(e){return e?URL.createObjectURL(new Blob([g(e,t)])):e}))},e.prototype.getPathById=function(e,t){var r=e.rels.find((function(e){return e.id==t})),n=(0,l.splitPath)(e.path)[0];return r?(0,l.resolvePath)(r.target,n):null},e.prototype.loadResource=function(e,t,r){var n=this.getPathById(e,t);return n?this._package.load(n,r):Promise.resolve(null)},e}();function g(e,t){for(var r=t.replace(/{|}|-/g,""),n=new Array(16),a=0;a<16;a++)n[16-a-1]=parseInt(r.substr(2*a,2),16);for(a=0;a<32;a++)e[a]=e[a]^n[a%16];return e}t.WordDocument=y,t.deobfuscate=g},290:t=>{t.exports=e}},r={};return function e(n){var a=r[n];if(void 0!==a)return a.exports;var o=r[n]={exports:{}};return t[n].call(o.exports,o,o.exports,e),o.exports}(667)})()}));
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jszip")):"function"==typeof define&&define.amd?define(["JSZip"],t):"object"==typeof exports?exports.docx=t(require("JSZip")):e.docx=t(e.JSZip)}(self,(function(e){return(()=>{"use strict";var t={522:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OpenXmlPackage=void 0;var n=r(290),a=r(472),o=r(593),s=r(461),l=function(){function e(e,t){this._zip=e,this.options=t,this.xmlParser=new a.XmlParser}return e.prototype.get=function(e){return this._zip.files[function(e){return e.startsWith("/")?e.substr(1):e}(e)]},e.prototype.update=function(e,t){this._zip.file(e,t)},e.load=function(t,r){return n.loadAsync(t).then((function(t){return new e(t,r)}))},e.prototype.save=function(e){return void 0===e&&(e="blob"),this._zip.generateAsync({type:e})},e.prototype.load=function(e,t){var r,n;return void 0===t&&(t="string"),null!==(n=null===(r=this.get(e))||void 0===r?void 0:r.async(t))&&void 0!==n?n:Promise.resolve(null)},e.prototype.loadRelationships=function(e){var t=this;void 0===e&&(e=null);var r="_rels/.rels";if(null!=e){var n=(0,o.splitPath)(e);r=n[0]+"_rels/"+n[1]+".rels"}return this.load(r).then((function(e){return e?(0,s.parseRelationships)(t.parseXmlDocument(e).firstElementChild,t.xmlParser):null}))},e.prototype.parseXmlDocument=function(e){return(0,a.parseXmlString)(e,this.options.trimXmlDeclaration)},e}();t.OpenXmlPackage=l},530:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Part=void 0;var n=r(472),a=function(){function e(e,t){this._package=e,this.path=t}return e.prototype.load=function(){var e=this;return Promise.all([this._package.loadRelationships(this.path).then((function(t){e.rels=t})),this._package.load(this.path).then((function(t){var r=e._package.parseXmlDocument(t);e._package.options.keepOrigin&&(e._xmlDocument=r),e.parseXml(r.firstElementChild)}))])},e.prototype.save=function(){this._package.update(this.path,(0,n.serializeXmlString)(this._xmlDocument))},e.prototype.parseXml=function(e){},e}();t.Part=a},461:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.parseRelationships=t.RelationshipTypes=void 0,(r=t.RelationshipTypes||(t.RelationshipTypes={})).OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",r.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",r.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",r.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",r.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",r.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",r.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",r.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",r.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",r.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",r.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",r.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",r.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",r.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",t.parseRelationships=function(e,t){return t.elements(e).map((function(e){return{id:t.attr(e,"Id"),type:t.attr(e,"Type"),target:t.attr(e,"Target"),targetMode:t.attr(e,"TargetMode")}}))}},168:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentParser=t.autos=void 0;var n=r(445),a=r(593),o=r(797),s=r(269),l=r(472),i=r(679),c=r(979),p=r(662);t.autos={shd:"white",color:"black",highlight:"transparent"};var u,h=function(){function e(){this.skipDeclaration=!0,this.ignoreWidth=!1,this.debug=!1}return e.prototype.parseFooter=function(e){var t=new c.WmlFooter;return t.children=this.parseBodyElements(e),t},e.prototype.parseHeader=function(e){var t=new p.WmlHeader;return t.children=this.parseBodyElements(e),t},e.prototype.parseDocumentFile=function(e){var t=l.default.element(e,"body"),r=l.default.element(t,"sectPr");return{type:n.DomType.Document,children:this.parseBodyElements(t),props:r?(0,s.parseSectionProperties)(r,l.default):null,cssStyle:{}}},e.prototype.parseBodyElements=function(e){var t=this,r=[];return f.foreach(e,(function(e){switch(e.localName){case"p":r.push(t.parseParagraph(e));break;case"tbl":r.push(t.parseTable(e))}})),r},e.prototype.parseStylesFile=function(e){var t=this,r=[];return f.foreach(e,(function(e){switch(e.localName){case"style":r.push(t.parseStyle(e));break;case"docDefaults":r.push(t.parseDefaultStyles(e))}})),r},e.prototype.parseDefaultStyles=function(e){var t=this,r={id:null,name:null,target:null,basedOn:null,styles:[]};return f.foreach(e,(function(e){switch(e.localName){case"rPrDefault":var n=l.default.element(e,"rPr");n&&r.styles.push({target:"span",values:t.parseDefaultProperties(n,{})});break;case"pPrDefault":var a=l.default.element(e,"pPr");a&&r.styles.push({target:"p",values:t.parseDefaultProperties(a,{})})}})),r},e.prototype.parseStyle=function(e){var t=this,r={id:f.stringAttr(e,"styleId"),isDefault:f.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(f.stringAttr(e,"type")){case"paragraph":r.target="p";break;case"table":r.target="table";break;case"character":r.target="span"}return f.foreach(e,(function(e){switch(e.localName){case"basedOn":r.basedOn=f.className(e,"val");break;case"name":r.name=f.stringAttr(e,"val");break;case"link":r.linked=f.className(e,"val");break;case"next":r.next=f.className(e,"val");break;case"aliases":r.aliases=f.stringAttr(e,"val").split(",");break;case"pPr":r.styles.push({target:"p",values:t.parseDefaultProperties(e,{})}),r.paragraphProps=(0,o.parseParagraphProperties)(e,l.default);break;case"rPr":r.styles.push({target:"span",values:t.parseDefaultProperties(e,{})}),r.runProps=(0,o.parseParagraphProperties)(e,l.default);break;case"tblPr":case"tcPr":r.styles.push({target:"td",values:t.parseDefaultProperties(e,{})});break;case"tblStylePr":for(var n=0,a=t.parseTableStyle(e);n<a.length;n++){var s=a[n];r.styles.push(s)}break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:t.debug&&console.warn("DOCX: Unknown style element: "+e.localName)}})),r},e.prototype.parseTableStyle=function(e){var t=this,r=[],n=f.stringAttr(e,"type"),a="";switch(n){case"firstRow":a="tr.first-row td";break;case"lastRow":a="tr.last-row td";break;case"firstCol":a="td.first-col";break;case"lastCol":a="td.last-col";break;case"band1Vert":a="td.odd-col";break;case"band2Vert":a="td.even-col";break;case"band1Horz":a="tr.odd-row";break;case"band2Horz":a="tr.even-row";break;default:return[]}return f.foreach(e,(function(e){switch(e.localName){case"pPr":r.push({target:a+" p",values:t.parseDefaultProperties(e,{})});break;case"rPr":r.push({target:a+" span",values:t.parseDefaultProperties(e,{})});break;case"tblPr":case"tcPr":r.push({target:a,values:t.parseDefaultProperties(e,{})})}})),r},e.prototype.parseNumberingFile=function(e){var t=this,r=[],n={},a=[];return f.foreach(e,(function(e){switch(e.localName){case"abstractNum":t.parseAbstractNumbering(e,a).forEach((function(e){return r.push(e)}));break;case"numPicBullet":a.push(t.parseNumberingPicBullet(e));break;case"num":var o=f.stringAttr(e,"numId"),s=f.elementStringAttr(e,"abstractNumId","val");n[s]=o}})),r.forEach((function(e){return e.id=n[e.id]})),r},e.prototype.parseNumberingPicBullet=function(e){var t=l.default.element(e,"pict"),r=t&&l.default.element(t,"shape"),n=r&&l.default.element(r,"imagedata");return n?{id:f.intAttr(e,"numPicBulletId"),src:f.stringAttr(n,"id"),style:f.stringAttr(r,"style")}:null},e.prototype.parseAbstractNumbering=function(e,t){var r=this,n=[],a=f.stringAttr(e,"abstractNumId");return f.foreach(e,(function(e){"lvl"===e.localName&&n.push(r.parseNumberingLevel(a,e,t))})),n},e.prototype.parseNumberingLevel=function(e,t,r){var n=this,a={id:e,level:f.intAttr(t,"ilvl"),pStyle:{},rStyle:{},suff:"tab"};return f.foreach(t,(function(e){switch(e.localName){case"pPr":n.parseDefaultProperties(e,a.pStyle);break;case"rPr":n.parseDefaultProperties(e,a.rStyle);break;case"lvlPicBulletId":var t=f.intAttr(e,"val");a.bullet=r.filter((function(e){return e.id==t}))[0];break;case"lvlText":a.levelText=f.stringAttr(e,"val");break;case"numFmt":a.format=f.stringAttr(e,"val");break;case"suff":a.suff=f.stringAttr(e,"val")}})),a},e.prototype.parseParagraph=function(e){var t=this,r={type:n.DomType.Paragraph,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"r":r.children.push(t.parseRun(e,r));break;case"hyperlink":r.children.push(t.parseHyperlink(e,r));break;case"bookmarkStart":r.children.push((0,i.parseBookmarkStart)(e,l.default));break;case"bookmarkEnd":r.children.push((0,i.parseBookmarkEnd)(e,l.default));break;case"pPr":t.parseParagraphProperties(e,r)}})),r},e.prototype.parseParagraphProperties=function(e,t){var r=this;this.parseDefaultProperties(e,t.cssStyle={},null,(function(e){if((0,o.parseParagraphProperty)(e,t,l.default))return!0;switch(e.localName){case"pStyle":a.addElementClass(t,f.className(e,"val"));break;case"cnfStyle":a.addElementClass(t,d.classNameOfCnfStyle(e));break;case"framePr":r.parseFrame(e,t);break;case"rPr":break;default:return!1}return!0}))},e.prototype.parseFrame=function(e,t){"drop"==f.stringAttr(e,"dropCap")&&(t.cssStyle.float="left")},e.prototype.parseHyperlink=function(e,t){var r=this,a={type:n.DomType.Hyperlink,parent:t,children:[]},o=f.stringAttr(e,"anchor");return o&&(a.href="#"+o),f.foreach(e,(function(e){"r"===e.localName&&a.children.push(r.parseRun(e,a))})),a},e.prototype.parseRun=function(e,t){var r=this,a={type:n.DomType.Run,parent:t,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"t":a.children.push({type:n.DomType.Text,text:e.textContent});break;case"fldChar":a.fldCharType=f.stringAttr(e,"fldCharType");break;case"br":a.children.push({type:n.DomType.Break,break:f.stringAttr(e,"type")||"textWrapping"});break;case"lastRenderedPageBreak":a.children.push({type:n.DomType.Break,break:"page"});break;case"sym":a.children.push({type:n.DomType.Symbol,font:f.stringAttr(e,"font"),char:f.stringAttr(e,"char")});break;case"tab":a.children.push({type:n.DomType.Tab});break;case"instrText":a.instrText=e.textContent;break;case"drawing":var t=r.parseDrawing(e);t&&(a.children=[t]);break;case"rPr":r.parseRunProperties(e,a)}})),a},e.prototype.parseRunProperties=function(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,(function(e){switch(e.localName){case"rStyle":t.className=f.className(e,"val");break;case"vertAlign":switch(f.stringAttr(e,"val")){case"subscript":t.wrapper="sub";break;case"superscript":t.wrapper="sup"}break;default:return!1}return!0}))},e.prototype.parseDrawing=function(e){for(var t=0,r=l.default.elements(e);t<r.length;t++){var n=r[t];switch(n.localName){case"inline":case"anchor":return this.parseDrawingWrapper(n)}}},e.prototype.parseDrawingWrapper=function(e){for(var t={type:n.DomType.Drawing,children:[],cssStyle:{}},r="anchor"==e.localName,a=null,o=f.boolAttr(e,"simplePos"),s={relative:"page",align:"left",offset:"0"},i={relative:"page",align:"top",offset:"0"},c=0,p=l.default.elements(e);c<p.length;c++){var h=p[c];switch(h.localName){case"simplePos":o&&(s.offset=f.sizeAttr(h,"x",u.Emu),i.offset=f.sizeAttr(h,"y",u.Emu));break;case"extent":t.cssStyle.width=f.sizeAttr(h,"cx",u.Emu),t.cssStyle.height=f.sizeAttr(h,"cy",u.Emu);break;case"positionH":case"positionV":if(!o){var d="positionH"==h.localName?s:i,m=l.default.element(h,"align"),y=l.default.element(h,"posOffset");m&&(d.align=m.textContent),y&&(d.offset=f.sizeValue(y,u.Emu))}break;case"wrapTopAndBottom":a="wrapTopAndBottom";break;case"wrapNone":a="wrapNone";break;case"graphic":var g=this.parseGraphic(h);g&&t.children.push(g)}}return"wrapTopAndBottom"==a?(t.cssStyle.display="block",s.align&&(t.cssStyle["text-align"]=s.align,t.cssStyle.width="100%")):"wrapNone"==a?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",s.offset&&(t.cssStyle.left=s.offset),i.offset&&(t.cssStyle.top=i.offset)):!r||"left"!=s.align&&"right"!=s.align||(t.cssStyle.float=s.align),t},e.prototype.parseGraphic=function(e){for(var t=l.default.element(e,"graphicData"),r=0,n=l.default.elements(t);r<n.length;r++){var a=n[r];if("pic"===a.localName)return this.parsePicture(a)}return null},e.prototype.parsePicture=function(e){var t={type:n.DomType.Image,src:"",cssStyle:{}},r=l.default.element(e,"blipFill"),a=l.default.element(r,"blip");t.src=f.stringAttr(a,"embed");var o=l.default.element(e,"spPr"),s=l.default.element(o,"xfrm");t.cssStyle.position="relative";for(var i=0,c=l.default.elements(s);i<c.length;i++){var p=c[i];switch(p.localName){case"ext":t.cssStyle.width=f.sizeAttr(p,"cx",u.Emu),t.cssStyle.height=f.sizeAttr(p,"cy",u.Emu);break;case"off":t.cssStyle.left=f.sizeAttr(p,"x",u.Emu),t.cssStyle.top=f.sizeAttr(p,"y",u.Emu)}}return t},e.prototype.parseTable=function(e){var t=this,r={type:n.DomType.Table,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"tr":r.children.push(t.parseTableRow(e));break;case"tblGrid":r.columns=t.parseTableColumns(e);break;case"tblPr":t.parseTableProperties(e,r)}})),r},e.prototype.parseTableColumns=function(e){var t=[];return f.foreach(e,(function(e){"gridCol"===e.localName&&t.push({width:f.sizeAttr(e,"w")})})),t},e.prototype.parseTableProperties=function(e,t){var r=this;switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,(function(e){switch(e.localName){case"tblStyle":t.className=f.className(e,"val");break;case"tblLook":a.addElementClass(t,d.classNameOftblLook(e));break;case"tblpPr":r.parseTablePosition(e,t);break;default:return!1}return!0})),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto"}},e.prototype.parseTablePosition=function(e,t){var r=f.sizeAttr(e,"topFromText"),n=f.sizeAttr(e,"bottomFromText"),a=f.sizeAttr(e,"rightFromText"),o=f.sizeAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=d.addSize(t.cssStyle["margin-bottom"],n),t.cssStyle["margin-left"]=d.addSize(t.cssStyle["margin-left"],o),t.cssStyle["margin-right"]=d.addSize(t.cssStyle["margin-right"],a),t.cssStyle["margin-top"]=d.addSize(t.cssStyle["margin-top"],r)},e.prototype.parseTableRow=function(e){var t=this,r={type:n.DomType.Row,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"tc":r.children.push(t.parseTableCell(e));break;case"trPr":t.parseTableRowProperties(e,r)}})),r},e.prototype.parseTableRowProperties=function(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,(function(e){return"cnfStyle"===e.localName&&(t.className=d.classNameOfCnfStyle(e),!0)}))},e.prototype.parseTableCell=function(e){var t=this,r={type:n.DomType.Cell,children:[]};return f.foreach(e,(function(e){switch(e.localName){case"tbl":r.children.push(t.parseTable(e));break;case"p":r.children.push(t.parseParagraph(e));break;case"tcPr":t.parseTableCellProperties(e,r)}})),r},e.prototype.parseTableCellProperties=function(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,(function(e){switch(e.localName){case"gridSpan":t.span=f.intAttr(e,"val",null);break;case"vMerge":break;case"cnfStyle":t.className=d.classNameOfCnfStyle(e);break;default:return!1}return!0}))},e.prototype.parseDefaultProperties=function(e,r,n,a){var o=this;return void 0===r&&(r=null),void 0===n&&(n=null),void 0===a&&(a=null),r=r||{},f.foreach(e,(function(s){switch(s.localName){case"jc":r["text-align"]=d.valueOfJc(s);break;case"textAlignment":r["vertical-align"]=d.valueOfTextAlignment(s);break;case"color":r.color=f.colorAttr(s,"val",null,t.autos.color);break;case"sz":r["font-size"]=r["min-height"]=f.sizeAttr(s,"val",u.FontSize);break;case"shd":r["background-color"]=f.colorAttr(s,"fill",null,t.autos.shd);break;case"highlight":r["background-color"]=f.colorAttr(s,"val",null,t.autos.highlight);break;case"tcW":if(o.ignoreWidth)break;case"tblW":r.width=d.valueOfSize(s,"w");break;case"trHeight":o.parseTrHeight(s,r);break;case"strike":r["text-decoration"]=d.valueOfStrike(s);break;case"b":r["font-weight"]=d.valueOfBold(s);break;case"i":r["font-style"]="italic";break;case"u":o.parseUnderline(s,r);break;case"ind":case"tblInd":o.parseIndentation(s,r);break;case"rFonts":o.parseFont(s,r);break;case"tblBorders":o.parseBorderProperties(s,n||r);break;case"tblCellSpacing":r["border-spacing"]=d.valueOfMargin(s),r["border-collapse"]="separate";break;case"pBdr":o.parseBorderProperties(s,r);break;case"bdr":r.border=d.valueOfBorder(s);break;case"tcBorders":o.parseBorderProperties(s,r);break;case"noWrap":break;case"tblCellMar":case"tcMar":o.parseMarginProperties(s,n||r);break;case"tblLayout":r["table-layout"]=d.valueOfTblLayout(s);break;case"vAlign":r["vertical-align"]=d.valueOfTextAlignment(s);break;case"spacing":"pPr"==e.localName&&o.parseSpacing(s,r);break;case"lang":case"noProof":case"webHidden":break;default:null==a||a(s)||o.debug&&console.warn("DOCX: Unknown document element: "+s.localName)}})),r},e.prototype.parseUnderline=function(e,t){var r=f.stringAttr(e,"val");if(null!=r&&"none"!=r){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration-style"]="dashed";break;case"dotted":case"dottedHeavy":t["text-decoration-style"]="dotted";break;case"double":t["text-decoration-style"]="double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration-style"]="wavy"}var n=f.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}},e.prototype.parseFont=function(e,t){var r=f.stringAttr(e,"ascii");r&&(t["font-family"]=r)},e.prototype.parseIndentation=function(e,t){var r=f.sizeAttr(e,"firstLine"),n=f.sizeAttr(e,"hanging"),a=f.sizeAttr(e,"left"),o=f.sizeAttr(e,"start"),s=f.sizeAttr(e,"right"),l=f.sizeAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]="-"+n),(a||o)&&(t["margin-left"]=a||o),(s||l)&&(t["margin-right"]=s||l)},e.prototype.parseSpacing=function(e,t){var r=f.sizeAttr(e,"before"),n=f.sizeAttr(e,"after"),a=f.intAttr(e,"line",null),o=f.stringAttr(e,"lineRule");if(r&&(t["margin-top"]=r),n&&(t["margin-bottom"]=n),null!==a)switch(o){case"auto":t["line-height"]=""+(a/240).toFixed(2);break;case"atLeast":t["line-height"]="calc(100% + "+a/20+"pt)";break;default:t["line-height"]=t["min-height"]=a/20+"pt"}},e.prototype.parseMarginProperties=function(e,t){f.foreach(e,(function(e){switch(e.localName){case"left":t["padding-left"]=d.valueOfMargin(e);break;case"right":t["padding-right"]=d.valueOfMargin(e);break;case"top":t["padding-top"]=d.valueOfMargin(e);break;case"bottom":t["padding-bottom"]=d.valueOfMargin(e)}}))},e.prototype.parseTrHeight=function(e,t){f.stringAttr(e,"hRule"),t.height=f.sizeAttr(e,"val")},e.prototype.parseBorderProperties=function(e,t){f.foreach(e,(function(e){switch(e.localName){case"start":case"left":t["border-left"]=d.valueOfBorder(e);break;case"end":case"right":t["border-right"]=d.valueOfBorder(e);break;case"top":t["border-top"]=d.valueOfBorder(e);break;case"bottom":t["border-bottom"]=d.valueOfBorder(e)}}))},e}();t.DocumentParser=h,function(e){e[e.FontSize=0]="FontSize",e[e.Dxa=1]="Dxa",e[e.Emu=2]="Emu",e[e.Border=3]="Border",e[e.Percent=4]="Percent"}(u||(u={}));var f=function(){function e(){}return e.foreach=function(e,t){for(var r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];1==n.nodeType&&t(n)}},e.elementStringAttr=function(t,r,n){var a=l.default.element(t,r);return a?e.stringAttr(a,n):null},e.stringAttr=function(e,t){return l.default.attr(e,t)},e.colorAttr=function(t,r,n,a){void 0===n&&(n=null),void 0===a&&(a="black");var o=e.stringAttr(t,r);switch(o){case"yellow":return o;case"auto":return a}return o?"#"+o:n},e.boolAttr=function(e,t,r){return void 0===r&&(r=!1),l.default.boolAttr(e,t,r)},e.intAttr=function(t,r,n){return void 0===n&&(n=0),e.stringAttr(t,r)?parseInt(e.stringAttr(t,r)):n},e.sizeAttr=function(t,r,n){return void 0===n&&(n=u.Dxa),e.convertSize(e.stringAttr(t,r),n)},e.sizeValue=function(t,r){return void 0===r&&(r=u.Dxa),e.convertSize(t.textContent,r)},e.convertSize=function(e,t){if(void 0===t&&(t=u.Dxa),null==e||/.+p[xt]$/.test(e))return e;var r=parseInt(e);switch(t){case u.Dxa:return(.05*r).toFixed(2)+"pt";case u.Emu:return(r/12700).toFixed(2)+"pt";case u.FontSize:return(.5*r).toFixed(2)+"pt";case u.Border:return(.125*r).toFixed(2)+"pt";case u.Percent:return(.02*r).toFixed(2)+"%"}return e},e.className=function(t,r){var n=e.stringAttr(t,r);return n&&n.replace(/[ .]+/g,"-").replace(/[&]+/g,"and")},e}(),d=function(){function e(){}return e.valueOfBold=function(e){return f.boolAttr(e,"val",!0)?"bold":"normal"},e.valueOfSize=function(e,t){var r=u.Dxa;switch(f.stringAttr(e,"type")){case"dxa":break;case"pct":r=u.Percent}return f.sizeAttr(e,t,r)},e.valueOfStrike=function(e){return f.boolAttr(e,"val",!0)?"line-through":"none"},e.valueOfMargin=function(e){return f.sizeAttr(e,"w")},e.valueOfBorder=function(e){if("nil"==f.stringAttr(e,"val"))return"none";var t=f.colorAttr(e,"color");return f.sizeAttr(e,"sz",u.Border)+" solid "+("auto"==t?"black":t)},e.valueOfTblLayout=function(e){return"fixed"==f.stringAttr(e,"val")?"fixed":"auto"},e.classNameOfCnfStyle=function(e){var t="",r=f.stringAttr(e,"val");return"1"==r[0]&&(t+=" first-row"),"1"==r[1]&&(t+=" last-row"),"1"==r[2]&&(t+=" first-col"),"1"==r[3]&&(t+=" last-col"),"1"==r[4]&&(t+=" odd-col"),"1"==r[5]&&(t+=" even-col"),"1"==r[6]&&(t+=" odd-row"),"1"==r[7]&&(t+=" even-row"),"1"==r[8]&&(t+=" ne-cell"),"1"==r[9]&&(t+=" nw-cell"),"1"==r[10]&&(t+=" se-cell"),"1"==r[11]&&(t+=" sw-cell"),t.trim()},e.valueOfJc=function(e){var t=f.stringAttr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t},e.valueOfTextAlignment=function(e){var t=f.stringAttr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t},e.addSize=function(e,t){return null==e?t:null==t?e:"calc("+e+" + "+t+")"},e.checkMask=function(e,t){return(e&t)==t},e.classNameOftblLook=function(e){var t="";return f.boolAttr(e,"firstColumn")&&(t+=" first-col"),f.boolAttr(e,"firstRow")&&(t+=" first-row"),f.boolAttr(e,"lastColumn")&&(t+=" lat-col"),f.boolAttr(e,"lastRow")&&(t+=" last-row"),f.boolAttr(e,"noHBand")&&(t+=" no-hband"),f.boolAttr(e,"noVBand")&&(t+=" no-vband"),t.trim()},e}()},162:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CorePropsPart=void 0;var o=r(530),s=r(614),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.parseXml=function(e){this.props=(0,s.parseCoreProps)(e,this._package.xmlParser)},t}(o.Part);t.CorePropsPart=l},614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCoreProps=void 0,t.parseCoreProps=function(e,t){for(var r={},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"title":r.title=o.textContent;break;case"description":r.description=o.textContent;break;case"subject":r.subject=o.textContent;break;case"creator":r.creator=o.textContent;break;case"keywords":r.keywords=o.textContent;break;case"language":r.language=o.textContent;break;case"lastModifiedBy":r.lastModifiedBy=o.textContent;break;case"revision":o.textContent&&(r.revision=parseInt(o.textContent))}}return r}},665:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedPropsPart=void 0;var o=r(530),s=r(668),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.parseXml=function(e){this.props=(0,s.parseExtendedProps)(e,this._package.xmlParser)},t}(o.Part);t.ExtendedPropsPart=l},668:(e,t)=>{function r(e){if(void 0!==e)return parseInt(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.parseExtendedProps=void 0,t.parseExtendedProps=function(e,t){for(var n={},a=0,o=t.elements(e);a<o.length;a++){var s=o[a];switch(s.localName){case"Template":n.template=s.textContent;break;case"Pages":n.pages=r(s.textContent);break;case"Words":n.words=r(s.textContent);break;case"Characters":n.characters=r(s.textContent);break;case"Application":n.application=s.textContent;break;case"Lines":n.lines=r(s.textContent);break;case"Paragraphs":n.paragraphs=r(s.textContent);break;case"Company":n.company=s.textContent;break;case"AppVersion":n.appVersion=s.textContent}}return n}},667:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.renderAsync=void 0;var a=r(213),o=r(168),s=r(932);t.renderAsync=function(e,t,r,l){void 0===r&&(r=null),void 0===l&&(l=null);var i=new o.DocumentParser,c=new s.HtmlRenderer(window.document),p=n({ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,trimXmlDeclaration:!0},l);return i.ignoreWidth=p.ignoreWidth,i.debug=p.debug||i.debug,c.className=p.className||"docx",c.inWrapper=p.inWrapper,a.WordDocument.load(e,i,{trimXmlDeclaration:p.trimXmlDeclaration}).then((function(e){return c.render(e,t,r,p),e}))}},679:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBookmarkEnd=t.parseBookmarkStart=void 0;var n=r(445);t.parseBookmarkStart=function(e,t){return{type:n.DomType.BookmarkStart,id:t.attr(e,"id"),name:t.attr(e,"name"),colFirst:t.intAttr(e,"colFirst"),colLast:t.intAttr(e,"colLast")}},t.parseBookmarkEnd=function(e,t){return{type:n.DomType.BookmarkEnd,id:t.attr(e,"id")}}},186:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCommonProperty=t.convertLength=t.LengthUsage=t.ns=void 0,t.ns={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},t.LengthUsage={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:1/240,unit:null}},t.convertLength=function(e,r){return void 0===r&&(r=t.LengthUsage.Dxa),e?{value:parseInt(e)*r.mul,type:r.unit}:null},t.parseCommonProperty=function(e,r,n){if(e.namespaceURI!=t.ns.wordml)return!1;switch(e.localName){case"color":r.color=n.attr(e,"val");break;case"sz":r.fontSize=n.lengthAttr(e,"val",t.LengthUsage.FontSize);break;default:return!1}return!0}},478:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.body=this._documentParser.parseDocumentFile(e)},t}(r(530).Part);t.DocumentPart=o},445:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DomType=void 0,(r=t.DomType||(t.DomType={})).Document="document",r.Paragraph="paragraph",r.Run="run",r.Break="break",r.Table="table",r.Row="row",r.Cell="cell",r.Hyperlink="hyperlink",r.Drawing="drawing",r.Image="image",r.Text="text",r.Tab="tab",r.Symbol="symbol",r.BookmarkStart="bookmarkStart",r.BookmarkEnd="bookmarkEnd",r.Footer="footer",r.Header="header"},520:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLineSpacing=void 0,t.parseLineSpacing=function(e,t){return{before:t.lengthAttr(e,"before"),after:t.lengthAttr(e,"after"),line:t.intAttr(e,"line"),lineRule:t.attr(e,"lineRule")}}},797:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumbering=t.parseTabs=t.parseParagraphProperty=t.parseParagraphProperties=void 0;var n=r(186),a=r(269),o=r(520),s=r(235);function l(e,t,r){if(e.namespaceURI!=n.ns.wordml)return!1;if((0,n.parseCommonProperty)(e,t,r))return!0;switch(e.localName){case"tabs":t.tabs=i(e,r);break;case"sectPr":t.sectionProps=(0,a.parseSectionProperties)(e,r);break;case"numPr":t.numbering=c(e,r);break;case"spacing":return t.lineSpacing=(0,o.parseLineSpacing)(e,r),!1;case"textAlignment":return t.textAlignment=r.attr(e,"val"),!1;case"keepNext":t.keepLines=r.boolAttr(e,"val",!0);break;case"keepNext":t.keepNext=r.boolAttr(e,"val",!0);break;case"pageBreakBefore":t.pageBreakBefore=r.boolAttr(e,"val",!0);break;case"outlineLvl":t.outlineLevel=r.intAttr(e,"val");break;case"pStyle":t.styleName=r.attr(e,"val");break;case"rPr":t.runProps=(0,s.parseRunProperties)(e,r);break;default:return!1}return!0}function i(e,t){return t.elements(e,"tab").map((function(e){return{position:t.lengthAttr(e,"pos"),leader:t.attr(e,"leader"),style:t.attr(e,"val")}}))}function c(e,t){for(var r={},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"numId":r.id=t.attr(o,"val");break;case"ilvl":r.level=t.intAttr(o,"val")}}return r}t.parseParagraphProperties=function(e,t){for(var r={},n=0,a=t.elements(e);n<a.length;n++)l(a[n],r,t);return r},t.parseParagraphProperty=l,t.parseTabs=i,t.parseNumbering=c},235:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRunProperty=t.parseRunProperties=void 0;var n=r(186);function a(e,t,r){return!!(0,n.parseCommonProperty)(e,t,r)}t.parseRunProperties=function(e,t){for(var r={},n=0,o=t.elements(e);n<o.length;n++)a(o[n],r,t);return r},t.parseRunProperty=a},269:(e,t)=>{function r(e,t){return{numberOfColumns:t.intAttr(e,"num"),space:t.lengthAttr(e,"space"),separator:t.boolAttr(e,"sep"),equalWidth:t.boolAttr(e,"equalWidth",!0),columns:t.elements(e,"col").map((function(e){return{width:t.lengthAttr(e,"w"),space:t.lengthAttr(e,"space")}}))}}var n;Object.defineProperty(t,"__esModule",{value:!0}),t.parseSectionProperties=t.SectionType=void 0,(n=t.SectionType||(t.SectionType={})).Continuous="continuous",n.NextPage="nextPage",n.NextColumn="nextColumn",n.EvenPage="evenPage",n.OddPage="oddPage",t.parseSectionProperties=function(e,t){for(var n={},a=0,o=t.elements(e);a<o.length;a++){var s=o[a];switch(s.localName){case"pgSz":n.pageSize={width:t.lengthAttr(s,"w"),height:t.lengthAttr(s,"h"),orientation:t.attr(s,"orient")};break;case"type":n.type=t.attr(s,"val");break;case"pgMar":n.pageMargins={left:t.lengthAttr(s,"left"),right:t.lengthAttr(s,"right"),top:t.lengthAttr(s,"top"),bottom:t.lengthAttr(s,"bottom"),header:t.lengthAttr(s,"header"),footer:t.lengthAttr(s,"footer"),gutter:t.lengthAttr(s,"gutter")};break;case"cols":n.columns=r(s,t)}}return n}},380:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.FontTablePart=void 0;var o=r(530),s=r(512),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.parseXml=function(e){this.fonts=(0,s.parseFonts)(e,this._package.xmlParser)},t}(o.Part);t.FontTablePart=l},512:(e,t)=>{function r(e,t){for(var r={name:t.attr(e,"name")},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"family":r.family=t.attr(o,"val");break;case"altName":r.altName=t.attr(o,"val");break;case"embedRegular":r.fontKey=t.attr(o,"fontKey"),r.refId=t.attr(o,"id")}}return r}Object.defineProperty(t,"__esModule",{value:!0}),t.parseFont=t.parseFonts=void 0,t.parseFonts=function(e,t){return t.elements(e).map((function(e){return r(e,t)}))},t.parseFont=r},279:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.FooterPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.footerElement=this._documentParser.parseFooter(e)},t}(r(530).Part);t.FooterPart=o},979:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WmlFooter=void 0;var n=r(445);t.WmlFooter=function(){this.type=n.DomType.Footer,this.children=[],this.cssStyle={}}},602:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.headerElement=this._documentParser.parseHeader(e)},t}(r(530).Part);t.HeaderPart=o},662:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WmlHeader=void 0;var n=r(445);t.WmlHeader=function(){this.type=n.DomType.Header,this.children=[],this.cssStyle={}}},932:function(e,t,r){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlRenderer=void 0;var a=r(445),o=r(593),s=r(630),l=function(){function e(e){this.htmlDocument=e,this.inWrapper=!0,this.className="docx"}return e.prototype.render=function(e,t,r,n){void 0===r&&(r=null),this.document=e,this.options=n,this.styleMap=null,c(r=r||t),c(t),u(r,"docxjs library predefined styles"),r.appendChild(this.renderDefaultStyle()),null!=e.stylesPart&&(this.styleMap=this.processStyles(e.stylesPart.styles),u(r,"docx document styles"),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(u(r,"docx document numbering styles"),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),!n.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var a=this.renderSections(e.documentPart.body);if(this.inWrapper){var o=this.renderWrapper();i(o,a),t.appendChild(o)}else i(t,a)},e.prototype.renderFontTable=function(e,t){for(var r=function(e){n.document.loadFont(e.refId,e.fontKey).then((function(r){var n='@font-face {\n font-family: "'+e.name+'";\n src: url('+r+");\n }";u(t,"Font "+e.name),t.appendChild(p(n))}))},n=this,a=0,o=e.fonts.filter((function(e){return e.refId}));a<o.length;a++)r(o[a])},e.prototype.processClassName=function(e){return e?this.className+"_"+e:this.className},e.prototype.processStyles=function(e){for(var t={},r=0,n=e.filter((function(e){return null!=e.id}));r<n.length;r++)t[(d=n[r]).id]=d;for(var a=0,o=e.filter((function(e){return e.basedOn}));a<o.length;a++){var s=t[(d=o[a]).basedOn];if(s)for(var l,i=function(e){(l=s.styles.filter((function(t){return t.target==e.target})))&&l.length>0&&c.copyStyleProperties(l[0].values,e.values)},c=this,p=0,u=d.styles;p<u.length;p++)i(u[p]);else this.options.debug&&console.warn("Can't find base style "+d.basedOn)}for(var h=0,f=e;h<f.length;h++){var d;(d=f[h]).cssName=this.processClassName(this.escapeClassName(d.id))}return t},e.prototype.processElement=function(e){if(e.children)for(var t=0,r=e.children;t<r.length;t++){var n=r[t];n.className=this.processClassName(n.className),n.parent=e,n.type==a.DomType.Table?this.processTable(n):this.processElement(n)}},e.prototype.processTable=function(e){for(var t=0,r=e.children;t<r.length;t++)for(var n=0,a=r[t].children;n<a.length;n++){var o=a[n];o.cssStyle=this.copyStyleProperties(e.cellStyle,o.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(o)}},e.prototype.copyStyleProperties=function(e,t,r){if(void 0===r&&(r=null),!e)return t;null==t&&(t={}),null==r&&(r=Object.getOwnPropertyNames(e));for(var n=0,a=r;n<a.length;n++){var o=a[n];e.hasOwnProperty(o)&&!t.hasOwnProperty(o)&&(t[o]=e[o])}return t},e.prototype.createSection=function(e,t){var r=this.htmlDocument.createElement("section");return r.className=e,t&&(t.pageMargins&&(r.style.paddingLeft=this.renderLength(t.pageMargins.left),r.style.paddingRight=this.renderLength(t.pageMargins.right),r.style.paddingTop=this.renderLength(t.pageMargins.top),r.style.paddingBottom=this.renderLength(t.pageMargins.bottom)),t.pageSize&&(this.options.ignoreWidth||(r.style.width=this.renderLength(t.pageSize.width)),this.options.ignoreHeight||(r.style.minHeight=this.renderLength(t.pageSize.height))),t.columns&&t.columns.numberOfColumns&&(r.style.columnCount=""+t.columns.numberOfColumns,r.style.columnGap=this.renderLength(t.columns.space),t.columns.separator&&(r.style.columnRule="1px solid black"))),r},e.prototype.renderSections=function(e){var t=[];this.processElement(e);for(var r=0,n=this.splitBySection(e.children);r<n.length;r++){var a=n[r],o=this.createSection(this.className,a.sectProps||e.props);this.renderElements(a.elements,e,o),t.push(o)}return t},e.prototype.splitBySection=function(e){for(var t,r={sectProps:null,elements:[]},o=[r],s=0,l=e;s<l.length;s++){var i=l[s];if(i.type==a.DomType.Paragraph){var c=i.styleName,p=this.styleMap&&c?this.styleMap[c]:null;(null===(t=null==p?void 0:p.paragraphProps)||void 0===t?void 0:t.pageBreakBefore)&&(r.sectProps=h,r={sectProps:null,elements:[]},o.push(r))}if(r.elements.push(i),i.type==a.DomType.Paragraph){var u=i,h=u.sectionProps,f=-1,d=-1;if(this.options.breakPages&&u.children&&(f=u.children.findIndex((function(e){var t,r;return-1!=(d=null!==(r=null===(t=e.children)||void 0===t?void 0:t.findIndex((function(e){return"page"==e.break})))&&void 0!==r?r:-1)}))),(h||-1!=f)&&(r.sectProps=h,r={sectProps:null,elements:[]},o.push(r)),-1!=f){var m=u.children[f],y=d<m.children.length-1;if(f<u.children.length-1||y){var g=i.children,b=n(n({},i),{children:g.slice(f)});if(i.children=g.slice(0,f),r.elements.push(b),y){var v=m.children,P=n(n({},m),{children:v.slice(0,d)});i.children.push(P),m.children=v.slice(d)}}}}}for(var k=null,w=o.length-1;w>=0;w--)null==o[w].sectProps?o[w].sectProps=k:k=o[w].sectProps;return o},e.prototype.renderLength=function(e){return e?""+e.value+e.type:null},e.prototype.renderWrapper=function(){var e=document.createElement("div");return e.className=this.className+"-wrapper",e},e.prototype.renderDefaultStyle=function(){var e=this.className;return p("\n."+e+"-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } \n."+e+"-wrapper section."+e+" { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }\n."+e+" { color: black; }\nsection."+e+" { box-sizing: border-box; }\n."+e+" table { border-collapse: collapse; }\n."+e+" table td, ."+e+" table th { vertical-align: top; }\n."+e+" p { margin: 0pt; min-height: 1em; }\n."+e+" span { white-space: pre-wrap; }\n")},e.prototype.renderNumbering=function(e,t){for(var r,a,o=this,s="",l=[],i=function(){if(r="p."+c.numberingClass(f.id,f.level),a="none",f.bullet){var e=("--"+c.className+"-"+f.bullet.src).toLowerCase();s+=c.styleToString(r+":before",{content:"' '",display:"inline-block",background:"var("+e+")"},f.bullet.style),c.document.loadNumberingImage(f.bullet.src).then((function(r){var n="."+o.className+"-wrapper { "+e+": url("+r+") }";t.appendChild(p(n))}))}else if(f.levelText){var i=c.numberingCounter(f.id,f.level);f.level>0?s+=c.styleToString("p."+c.numberingClass(f.id,f.level-1),{"counter-reset":i}):l.push(i),s+=c.styleToString(r+":before",n({content:c.levelTextToContent(f.levelText,f.suff,f.id,c.numFormatToCssValue(f.format)),"counter-increment":i},f.rStyle))}else a=c.numFormatToCssValue(f.format);s+=c.styleToString(r,n({display:"list-item","list-style-position":"inside","list-style-type":a},f.pStyle))},c=this,u=0,h=e;u<h.length;u++){var f=h[u];i()}return l.length>0&&(s+=this.styleToString("."+this.className+"-wrapper",{"counter-reset":l.join(" ")})),p(s)},e.prototype.renderStyles=function(e){for(var t="",r=this.styleMap,n=0,a=e;n<a.length;n++){var o=a[n],s=o.styles;if(o.linked){var l=o.linked&&r[o.linked];l?s=s.concat(l.styles):this.options.debug&&console.warn("Can't find linked style "+o.linked)}for(var i=0,c=s;i<c.length;i++){var u=c[i],h="";o.target==u.target?h+=o.target+"."+o.cssName:o.target?h+=o.target+"."+o.cssName+" "+u.target:h+="."+o.cssName+" "+u.target,o.isDefault&&o.target&&(h="."+this.className+" "+o.target+", "+h),t+=this.styleToString(h,u.values)}}return p(t)},e.prototype.renderElement=function(e,t){switch(e.type){case a.DomType.Paragraph:return this.renderParagraph(e);case a.DomType.BookmarkStart:return this.renderBookmarkStart(e);case a.DomType.BookmarkEnd:return null;case a.DomType.Run:return this.renderRun(e);case a.DomType.Table:return this.renderTable(e);case a.DomType.Row:return this.renderTableRow(e);case a.DomType.Cell:return this.renderTableCell(e);case a.DomType.Hyperlink:return this.renderHyperlink(e);case a.DomType.Drawing:return this.renderDrawing(e);case a.DomType.Image:return this.renderImage(e);case a.DomType.Text:return this.renderText(e);case a.DomType.Tab:return this.renderTab(e);case a.DomType.Symbol:return this.renderSymbol(e);case a.DomType.Break:return this.renderBreak(e)}return null},e.prototype.renderChildren=function(e,t){return this.renderElements(e.children,e,t)},e.prototype.renderElements=function(e,t,r){var n=this;if(null==e)return null;var a=e.map((function(e){return n.renderElement(e,t)})).filter((function(e){return null!=e}));if(r)for(var o=0,s=a;o<s.length;o++){var l=s[o];r.appendChild(l)}return a},e.prototype.renderParagraph=function(e){var t=this.htmlDocument.createElement("p");if(this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProeprties(t.style,e),e.numbering){var r=this.numberingClass(e.numbering.id,e.numbering.level);t.className=(0,o.appendClass)(t.className,r)}if(e.styleName){var n=this.processClassName(this.escapeClassName(e.styleName));t.className=(0,o.appendClass)(t.className,n)}return t},e.prototype.renderRunProperties=function(e,t){this.renderCommonProeprties(e,t)},e.prototype.renderCommonProeprties=function(e,t){null!=t&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=this.renderLength(t.fontSize)))},e.prototype.renderHyperlink=function(e){var t=this.htmlDocument.createElement("a");return this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.href&&(t.href=e.href),t},e.prototype.renderDrawing=function(e){var t=this.htmlDocument.createElement("div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t},e.prototype.renderImage=function(e){var t=this.htmlDocument.createElement("img");return this.renderStyleValues(e.cssStyle,t),this.document&&this.document.loadDocumentImage(e.src).then((function(e){t.src=e})),t},e.prototype.renderText=function(e){return this.htmlDocument.createTextNode(e.text)},e.prototype.renderBreak=function(e){return"textWrapping"==e.break?this.htmlDocument.createElement("br"):null},e.prototype.renderSymbol=function(e){var t=this.htmlDocument.createElement("span");return t.style.fontFamily=e.font,t.innerHTML="&#x"+e.char+";",t},e.prototype.renderTab=function(e){var t=this.htmlDocument.createElement("span");return t.innerHTML="&emsp;",this.options.experimental&&setTimeout((function(){var r=function(e,t){for(var r=e.parent;null!=r&&r.type!=t;)r=r.parent;return r}(e,a.DomType.Paragraph);null!=r.tabs&&(r.tabs.sort((function(e,t){return e.position.value-t.position.value})),t.style.display="inline-block",(0,s.updateTabStop)(t,r.tabs))}),0),t},e.prototype.renderBookmarkStart=function(e){var t=this.htmlDocument.createElement("span");return t.id=e.name,t},e.prototype.renderRun=function(e){if(e.fldCharType||e.instrText)return null;var t=this.htmlDocument.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.href){var r=this.htmlDocument.createElement("a");return r.href=e.href,r.appendChild(t),r}if(e.wrapper){var n=this.htmlDocument.createElement(e.wrapper);return n.appendChild(t),n}return t},e.prototype.renderTable=function(e){var t=this.htmlDocument.createElement("table");return e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t},e.prototype.renderTableColumns=function(e){for(var t=this.htmlDocument.createElement("colGroup"),r=0,n=e;r<n.length;r++){var a=n[r],o=this.htmlDocument.createElement("col");a.width&&(o.style.width=a.width),t.appendChild(o)}return t},e.prototype.renderTableRow=function(e){var t=this.htmlDocument.createElement("tr");return this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),t},e.prototype.renderTableCell=function(e){var t=this.htmlDocument.createElement("td");return this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),t},e.prototype.renderStyleValues=function(e,t){if(null!=e)for(var r in e)e.hasOwnProperty(r)&&(t.style[r]=e[r])},e.prototype.renderClass=function(e,t){e.className&&(t.className=e.className)},e.prototype.numberingClass=function(e,t){return this.className+"-num-"+e+"-"+t},e.prototype.styleToString=function(e,t,r){void 0===r&&(r=null);var n=e+" {\r\n";for(var a in t)n+=" "+a+": "+t[a]+";\r\n";return r&&(n+=";"+r),n+"}\r\n"},e.prototype.numberingCounter=function(e,t){return this.className+"-num-"+e+"-"+t},e.prototype.levelTextToContent=function(e,t,r,n){var a,o=this;return'"'+e.replace(/%\d*/g,(function(e){var t=parseInt(e.substring(1),10)-1;return'"counter('+o.numberingCounter(r,t)+", "+n+')"'}))+(null!==(a={tab:"\\9",space:"\\a0"}[t])&&void 0!==a?a:"")+'"'},e.prototype.numFormatToCssValue=function(e){return{none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman"}[e]||e},e.prototype.escapeClassName=function(e){return null==e?void 0:e.replace(/[ .]+/g,"-").replace(/[&]+/g,"and")},e}();function i(e,t){for(var r=0,n=t;r<n.length;r++){var a=n[r];e.appendChild(a)}}function c(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function p(e){var t=document.createElement("style");return t.innerHTML=e,t}function u(e,t){e.appendChild(document.createComment(t))}t.HtmlRenderer=l},630:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateTabStop=void 0,t.updateTabStop=function(e,t,r){void 0===r&&(r=.75);var n=e.closest("p"),a=e.getBoundingClientRect(),o=n.getBoundingClientRect(),s=(a.left-o.left)*r,l=t.find((function(e){return"clear"!=e.style&&e.position.value>s}));if(null!=l)switch(e.style.display="inline-block",e.style.width=l.position.value-s+"pt",l.leader){case"dot":case"middleDot":e.style.borderBottom="1px black dotted";break;case"hyphen":case"heavy":case"underscore":e.style.borderBottom="1px black solid"}}},527:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NumberingPart=void 0;var o=r(530),s=r(682),l=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){Object.assign(this,(0,s.parseNumberingPart)(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)},t}(o.Part);t.NumberingPart=l},682:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumberingBulletPicture=t.parseNumberingLevelOverrride=t.parseNumberingLevel=t.parseAbstractNumbering=t.parseNumbering=t.parseNumberingPart=void 0;var n=r(797),a=r(235);function o(e,t){for(var r={id:t.attr(e,"numId"),overrides:[]},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"abstractNumId":r.abstractId=t.attr(o,"val");break;case"lvlOverride":r.overrides.push(i(o,t))}}return r}function s(e,t){for(var r={id:t.attr(e,"abstractNumId"),levels:[]},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"name":r.name=t.attr(o,"val");break;case"multiLevelType":r.multiLevelType=t.attr(o,"val");break;case"numStyleLink":r.numberingStyleLink=t.attr(o,"val");break;case"styleLink":r.styleLink=t.attr(o,"val");break;case"lvl":r.levels.push(l(o,t))}}return r}function l(e,t){for(var r={level:t.intAttr(e,"ilvl")},o=0,s=t.elements(e);o<s.length;o++){var l=s[o];switch(l.localName){case"start":r.start=t.attr(l,"val");break;case"lvlRestart":r.restart=t.intAttr(l,"val");break;case"numFmt":r.format=t.attr(l,"val");break;case"lvlText":r.text=t.attr(l,"val");break;case"lvlJc":r.justification=t.attr(l,"val");break;case"lvlPicBulletId":r.bulletPictureId=t.attr(l,"val");break;case"pPr":r.paragraphProps=(0,n.parseParagraphProperties)(l,t);break;case"rPr":r.runProps=(0,a.parseRunProperties)(l,t)}}return r}function i(e,t){for(var r={level:t.intAttr(e,"ilvl")},n=0,a=t.elements(e);n<a.length;n++){var o=a[n];switch(o.localName){case"startOverride":r.start=t.intAttr(o,"val");break;case"lvl":r.numberingLevel=l(o,t)}}return r}function c(e,t){var r=t.element(e,"pict"),n=r&&t.element(r,"shape"),a=n&&t.element(n,"imagedata");return a?{id:t.attr(e,"numPicBulletId"),referenceId:t.attr(a,"id"),style:t.attr(n,"style")}:null}t.parseNumberingPart=function(e,t){for(var r={numberings:[],abstractNumberings:[],bulletPictures:[]},n=0,a=t.elements(e);n<a.length;n++){var l=a[n];switch(l.localName){case"num":r.numberings.push(o(l,t));break;case"abstractNum":r.abstractNumberings.push(s(l,t));break;case"numPicBullet":r.bulletPictures.push(c(l,t))}}return r},t.parseNumbering=o,t.parseAbstractNumbering=s,t.parseNumberingLevel=l,t.parseNumberingLevelOverrride=i,t.parseNumberingBulletPicture=c},472:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XmlParser=t.serializeXmlString=t.parseXmlString=void 0;var n=r(186);t.parseXmlString=function(e,t){void 0===t&&(t=!1),t&&(e=e.replace(/<[?].*[?]>/,""));var r,n=(new DOMParser).parseFromString(e,"application/xml"),a=null===(r=n.getElementsByTagName("parsererror")[0])||void 0===r?void 0:r.textContent;if(a)throw new Error(a);return n},t.serializeXmlString=function(e){return(new XMLSerializer).serializeToString(e)};var a=function(){function e(){}return e.prototype.parse=function(e,t){return void 0===t&&(t=!0),t&&(e=e.replace(/<[?].*[?]>/,"")),(new DOMParser).parseFromString(e,"application/xml").firstChild},e.prototype.elements=function(e,t){void 0===t&&(t=null);for(var r=[],n=0,a=e.childNodes.length;n<a;n++){var o=e.childNodes.item(n);1!=o.nodeType||null!=t&&o.localName!=t||r.push(o)}return r},e.prototype.element=function(e,t){for(var r=0,n=e.childNodes.length;r<n;r++){var a=e.childNodes.item(r);if(1==a.nodeType&&a.localName==t)return a}return null},e.prototype.elementAttr=function(e,t,r){var n=this.element(e,t);return n?this.attr(n,r):void 0},e.prototype.attr=function(e,t){for(var r=0,n=e.attributes.length;r<n;r++){var a=e.attributes.item(r);if(a.localName==t)return a.value}return null},e.prototype.intAttr=function(e,t,r){void 0===r&&(r=null);var n=this.attr(e,t);return n?parseInt(n):r},e.prototype.floatAttr=function(e,t,r){void 0===r&&(r=null);var n=this.attr(e,t);return n?parseFloat(n):r},e.prototype.boolAttr=function(e,t,r){switch(void 0===r&&(r=null),this.attr(e,t)){case"1":return!0;case"0":return!1;default:return r}},e.prototype.lengthAttr=function(e,t,r){return void 0===r&&(r=n.LengthUsage.Dxa),(0,n.convertLength)(this.attr(e,t),r)},e}();t.XmlParser=a;var o=new a;t.default=o},240:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.StylesPart=void 0;var o=function(e){function t(t,r,n){var a=e.call(this,t,r)||this;return a._documentParser=n,a}return a(t,e),t.prototype.parseXml=function(e){this.styles=this._documentParser.parseStylesFile(e)},t}(r(530).Part);t.StylesPart=o},893:function(e,t,r){var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ThemePart=void 0;var o=r(530),s=r(55),l=function(e){function t(t,r){return e.call(this,t,r)||this}return a(t,e),t.prototype.parseXml=function(e){this.theme=(0,s.parseTheme)(e,this._package.xmlParser)},t}(o.Part);t.ThemePart=l},55:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseFontInfo=t.parseFontScheme=t.parseColorScheme=t.parseTheme=t.DmlTheme=void 0;var r=function(){};function n(e,t){for(var r={name:t.attr(e,"name"),colors:{}},n=0,a=t.elements(e);n<a.length;n++){var o=a[n],s=t.element(o,"srgbClr"),l=t.element(o,"sysClr");s?r.colors[o.localName]=t.attr(s,"val"):l&&(r.colors[o.localName]=t.attr(l,"lastClr"))}return r}function a(e,t){for(var r={name:t.attr(e,"name")},n=0,a=t.elements(e);n<a.length;n++){var s=a[n];switch(s.localName){case"majorFont":r.majorFont=o(s,t);break;case"minorFont":r.minorFont=o(s,t)}}return r}function o(e,t){return{latinTypeface:t.elementAttr(e,"latin","typeface"),eaTypeface:t.elementAttr(e,"ea","typeface"),csTypeface:t.elementAttr(e,"cs","typeface")}}t.DmlTheme=r,t.parseTheme=function(e,t){for(var o=new r,s=t.element(e,"themeElements"),l=0,i=t.elements(s);l<i.length;l++){var c=i[l];switch(c.localName){case"clrScheme":o.colorScheme=n(c,t);break;case"fontScheme":o.fontScheme=a(c,t)}}return o},t.parseColorScheme=n,t.parseFontScheme=a,t.parseFontInfo=o},593:function(e,t){var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};function n(e,t){return e?e+" "+t:t}function a(e){return e&&"object"==typeof e&&!Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeDeep=t.isObject=t.keyBy=t.resolvePath=t.splitPath=t.appendClass=t.addElementClass=void 0,t.addElementClass=function(e,t){return e.className=n(e.className,t)},t.appendClass=n,t.splitPath=function(e){var t=e.lastIndexOf("/")+1;return[0==t?"":e.substring(0,t),0==t?e:e.substring(t)]},t.resolvePath=function(e,t){try{var r="file://docx/";return new URL(e,r+t).toString().substr(r.length)}catch(r){return""+t+e}},t.keyBy=function(e,t){return e.reduce((function(e,r){return e[t(r)]=r,e}),{})},t.isObject=a,t.mergeDeep=function e(t){for(var n,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];if(!o.length)return t;var l=o.shift();if(a(t)&&a(l))for(var i in l)if(a(l[i])){var c=null!==(n=t[i])&&void 0!==n?n:t[i]={};e(c,l[i])}else t[i]=l[i];return e.apply(void 0,r([t],o,!1))}},213:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.deobfuscate=t.WordDocument=void 0;var n=r(461),a=r(380),o=r(522),s=r(478),l=r(593),i=r(527),c=r(240),p=r(279),u=r(602),h=r(665),f=r(162),d=r(893),m=[{type:n.RelationshipTypes.OfficeDocument,target:"word/document.xml"},{type:n.RelationshipTypes.ExtendedProperties,target:"docProps/app.xml"},{type:n.RelationshipTypes.CoreProperties,target:"docProps/core.xml"}],y=function(){function e(){this.parts=[],this.partsMap={}}return e.load=function(t,r,n){var a=new e;return a._parser=r,o.OpenXmlPackage.load(t,n).then((function(e){return a._package=e,a._package.loadRelationships()})).then((function(e){a.rels=e;var t=m.map((function(t){var r,n=null!==(r=e.find((function(e){return e.type===t.type})))&&void 0!==r?r:t;return a.loadRelationshipPart(n.target,n.type)}));return Promise.all(t)})).then((function(){return a}))},e.prototype.save=function(e){return void 0===e&&(e="blob"),this._package.save(e)},e.prototype.loadRelationshipPart=function(e,t){var r=this;if(this.partsMap[e])return Promise.resolve(this.partsMap[e]);if(!this._package.get(e))return Promise.resolve(null);var o=null;switch(t){case n.RelationshipTypes.OfficeDocument:this.documentPart=o=new s.DocumentPart(this._package,e,this._parser);break;case n.RelationshipTypes.FontTable:this.fontTablePart=o=new a.FontTablePart(this._package,e);break;case n.RelationshipTypes.Numbering:this.numberingPart=o=new i.NumberingPart(this._package,e,this._parser);break;case n.RelationshipTypes.Styles:this.stylesPart=o=new c.StylesPart(this._package,e,this._parser);break;case n.RelationshipTypes.Theme:o=new d.ThemePart(this._package,e);break;case n.RelationshipTypes.Footer:o=new p.FooterPart(this._package,e,this._parser);break;case n.RelationshipTypes.Header:o=new u.HeaderPart(this._package,e,this._parser);break;case n.RelationshipTypes.CoreProperties:this.corePropsPart=o=new f.CorePropsPart(this._package,e);break;case n.RelationshipTypes.ExtendedProperties:this.extendedPropsPart=o=new h.ExtendedPropsPart(this._package,e)}return null==o?Promise.resolve(null):(this.partsMap[e]=o,this.parts.push(o),o.load().then((function(){if(null==o.rels||0==o.rels.length)return o;var e=(0,l.splitPath)(o.path)[0],t=o.rels.map((function(t){return r.loadRelationshipPart((0,l.resolvePath)(t.target,e),t.type)}));return Promise.all(t).then((function(){return o}))})))},e.prototype.loadDocumentImage=function(e){return this.loadResource(this.documentPart,e,"blob").then((function(e){return e?URL.createObjectURL(e):null}))},e.prototype.loadNumberingImage=function(e){return this.loadResource(this.numberingPart,e,"blob").then((function(e){return e?URL.createObjectURL(e):null}))},e.prototype.loadFont=function(e,t){return this.loadResource(this.fontTablePart,e,"uint8array").then((function(e){return e?URL.createObjectURL(new Blob([g(e,t)])):e}))},e.prototype.getPathById=function(e,t){var r=e.rels.find((function(e){return e.id==t})),n=(0,l.splitPath)(e.path)[0];return r?(0,l.resolvePath)(r.target,n):null},e.prototype.loadResource=function(e,t,r){var n=this.getPathById(e,t);return n?this._package.load(n,r):Promise.resolve(null)},e}();function g(e,t){for(var r=t.replace(/{|}|-/g,""),n=new Array(16),a=0;a<16;a++)n[16-a-1]=parseInt(r.substr(2*a,2),16);for(a=0;a<32;a++)e[a]=e[a]^n[a%16];return e}t.WordDocument=y,t.deobfuscate=g},290:t=>{t.exports=e}},r={};return function e(n){var a=r[n];if(void 0!==a)return a.exports;var o=r[n]={exports:{}};return t[n].call(o.exports,o,o.exports,e),o.exports}(667)})()}));
//# sourceMappingURL=docx-preview.min.js.map
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment