UNPKG

107 kBJavaScriptView Raw
1module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e){t.exports=require("@babel/runtime/helpers/getPrototypeOf")},function(t,e){t.exports=require("@babel/runtime/helpers/defineProperty")},function(t,e){t.exports=require("@babel/runtime/helpers/classCallCheck")},function(t,e){t.exports=require("@babel/runtime/helpers/possibleConstructorReturn")},function(t,e){t.exports=require("@babel/runtime/helpers/inherits")},function(t,e){t.exports=require("@babel/runtime/helpers/createClass")},function(t,e){t.exports=require("react")},function(t,e){t.exports=require("prop-types")},function(t,e){t.exports=require("@babel/runtime/helpers/objectWithoutProperties")},function(t,e){t.exports=require("@babel/runtime/helpers/get")},function(t,e){t.exports=require("@babel/runtime/helpers/assertThisInitialized")},function(t,e){t.exports=require("memoize-one")},function(t,e){t.exports=require("we-edit")},function(t,e){t.exports=require("@babel/runtime/helpers/extends")},function(t,e){t.exports=require("@babel/runtime/helpers/slicedToArray")},function(t,e){t.exports=require("docx4js")},function(t,e){t.exports=require("@babel/runtime/helpers/toArray")},function(t,e){t.exports=require("lodash.get")},function(t,e){t.exports=require("recompose")},function(t,e){t.exports=require("readable-stream")},function(t,e){t.exports=require("fetchable")},function(t,e){t.exports=require("lodash.invoke")},function(t,e,n){"use strict";n.r(e);var r=n(14),i=n.n(r),o=n(9),l=n.n(o),s=n(8),c=n.n(s),u=n(2),h=n.n(u),f=n(5),p=n.n(f),d=n(3),w=n.n(d),v=n(0),m=n.n(v),g=n(4),y=n.n(g),b=n(1),x=n.n(b),k=n(12),P=n(19),_=n(16),O=n.n(_),C=n(15),j=n.n(C),S=n(20),I=n.n(S);var A=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"createObjectURL",value:function(t,n){var r;return(r=e.URL).createObjectURL.apply(r,arguments)}},{key:"revokeObjectURL",value:function(t){var n;return(n=e.URL).revokeObjectURL.apply(n,arguments)}},{key:"getDataPartAsUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*/*",n=this.parts[t],r=n._data.crc32;return this._shouldReleased.has(r)||this._shouldReleased.set(r,this.createObjectURL(this.getDataPart(t),e)),this._shouldReleased.get(r)}},{key:"release",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,a=this._shouldReleased[Symbol.iterator]();!(t=(r=a.next()).done);t=!0){var o=i()(r.value,2)[1];this.revokeObjectURL(o)}}catch(t){e=!0,n=t}finally{try{t||null==a.return||a.return()}finally{if(e)throw n}}}},{key:"startTransaction",value:function(){this.officeDocument.content.startTransaction(),this.officeDocument.numbering.startTransaction(),this.officeDocument.styles.startTransaction()}},{key:"commit",value:function(){return{content:this.officeDocument.content.commit(),numbering:this.officeDocument.numbering.commit(),styles:this.officeDocument.styles.commit()}}},{key:"rollback",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.content,n=t.numbering,r=t.styles;this.officeDocument.content.rollback(e),this.officeDocument.numbering.rollback(n),this.officeDocument.styles.rollback(r)}}],[{key:"URL",get:function(){return this.__cachedData||(this.__cachedData=new I.a("docx-memory")),this.__cachedData}}]),e}(j.a);x()(A,"parseXml",(function(){var t=j.a.parseXml.apply(j.a,arguments);return t.prototype.afterOrPrepend=function(t,e){var n=this.children(e);return n.length?n.after(t):this.prepend(t),this},t})),x()(A,"OfficeDocument",function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"_init",value:function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(t=l()(m()(e.prototype),"_init",this)).call.apply(t,[this].concat(r));var a=this;Object.assign(this.theme,{fontx:function(t){var e=t.split(/(?=[A-Z])/g),n=O()(e),r=n[0],i=n.slice(1);i={HAnsi:"latin",Ascii:"latin",Bidi:"cs",EastAsia:"ea"}[i.join("")];var o=this("a\\:fontScheme>a\\:".concat(r,"Font>a\\:").concat(i)).attr("typeface");if(!o&&("cs"==i||"ea"==i)){var l=a.settings("w\\:themeFontLang").attr("w:".concat({cs:"bidi",ea:"eastAsia"}[i]));if(l)return this("a\\:fontScheme>a\\:".concat(r,"Font>a\\:font[script=").concat({"zh-CN":"Hans"}[l],"]")).attr("typeface")}return o},colorx:function(t){return"phClr"==t?t:this.color(a.settings("w\\:clrSchemeMapping").attr("w:".concat(t))||t)}}),this.numbering||this.addNumberingPart(),Object(k.transactifyCheerio)(this.content),Object(k.transactifyCheerio)(this.numbering),Object(k.transactifyCheerio)(this.styles)}},{key:"addNumberingPart",value:function(){this.add("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml",'<?xml version="1.0" encoding="UTF-8"?>\n\t\t\t\t<w:numbering xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid wp14">\n\t\t\t\t</w:numbering>'.replace(/>\s+/g,">").replace(/\s+</g,"<"));Object.defineProperty(this,"numbering",{get:function(){return this.getRelObject("numbering.xml")}})}}]),e}(j.a.OfficeDocument));var D=n(17),T=n.n(D),N=n(21),F=n.n(N),R=function(){function t(e,n,r){h()(this,t),this.styles=n}return p()(t,[{key:"get",value:function(t){if(this.cache&&this.cache.has(t))return this.cache.get(t);var e=T()(this,t);return null==e&&(e=this._getFromBasedOn.apply(this,arguments)),this.cache&&this.cache.set(t,e),e}},{key:"_getFromBasedOn",value:function(t){var e=this.parent;return e?e.get.apply(e,arguments):void 0}},{key:"invoke",value:function(t){var e=F.a.apply(void 0,[this].concat(Array.prototype.slice.call(arguments)));return null==e&&(e=this._invokeOnBasedOn.apply(this,arguments)),e}},{key:"_invokeOnBasedOn",value:function(t){var e=this.parent;return e?e.invoke.apply(e,arguments):void 0}},{key:"toJSON",value:function(){}},{key:"parent",get:function(){return this.styles[this.basedOn]||this.basedOn||void 0}}]),t}(),E=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{attribs:{},children:[]};arguments.length>1&&arguments[1],arguments.length>2&&arguments[2];return h()(this,e),(t=w()(this,m()(e).apply(this,arguments))).id=n.attribs["w:styleId"],n.children.filter((function(t){return"text"!=t.type})).forEach((function(e){switch(e.name.split(":").pop()){case"name":return t.name=e.attribs["w:val"];case"rStyle":case"pStyle":case"tblStyle":case"basedOn":return t.basedOn=e.attribs["w:val"]}})),t.basedOn&&(t.cache=new Map),t}return y()(e,t),p()(e,[{key:"_convert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{attribs:{},children:[]},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=e?t.children.find((function(t){return t.name==e})):t;if(i)return i.children.reduce((function(t,e){var i=n[e.name];return i&&(t[i]=r.selectValue(e)),t}),{})}},{key:"clone",value:function(){var t=this.styles,e=(this.name,this.basedOn),n=(this.id,this.next),r=this.p,i=this.r,a=new this.constructor(void 0,t);return Object.assign(a,{basedOn:e,p:r,r:i,next:n})}}]),e}(function(t){function e(){var t;return h()(this,e),(t=w()(this,m()(e).apply(this,arguments))).next=[],t}return y()(e,t),p()(e,[{key:"_getFromBasedOn",value:function(t){var n=arguments,r=l()(m()(e.prototype),"_getFromBasedOn",this).apply(this,arguments);return null==r&&(r=this.next.reduce((function(t,e){return null==t?e.get.apply(e,n):t}),void 0)),r}},{key:"_invokeOnBasedOn",value:function(t){var n=arguments,r=l()(m()(e.prototype),"_invokeFromBasedOn",this).apply(this,arguments);return null==r&&(r=this.next.reduce((function(t,e){return null==t?e.invoke.apply(e,n):t}),void 0)),r}},{key:"inherit",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(0==e.length)return this;var r=Object.create(this);r.next=e;var i=r.next.findIndex((function(t){return"*"==t.id}));return-1!=i&&r.next.push(r.next.splice(i,1)[0]),r}}]),e}(R)),L=function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).apply(this,arguments))).id="*",i.basedOn=null,i.cache=null,i.r=i._convert(t.children.find((function(t){return"w:rPrDefault"==t.name})),"w:rPr",{"w:rFonts":"fonts","w:sz":"size","w:color":"color","w:b":"bold","w:i":"italic","w:vanish":"vanish"},r),i.p=i._convert(t.children.find((function(t){return"w:pPrDefault"==t.name})),"w:pPr",{"w:spacing":"spacing","w:indent":"indent"},r),i}return y()(e,t),e}(E),z={"w:rFonts":"fonts","w:sz":"size","w:color":"color","w:b":"bold","w:i":"italic","w:vanish":"vanish","w:highlight":"highlight","w:bdr":"border"},$=function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).call(this,t,n,r))).r=i._convert(t,"w:rPr",z,r),i}return y()(e,t),p()(e,[{key:"flat",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=[this].concat(e);return"fonts,size,color,highlight,border,underline,bold,italic,vanish,strike".split(",").reduce((function(t,e){return r.find((function(n){return void 0!==(t[e]=n.get("r.".concat(e)))})),t}),{})}}]),e}(E);function q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?q(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}x()($,"Direct",function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).call(this,t,n,r))).r=i._convert(t,null,z,r),i}return y()(e,t),e}($));var M={"w:spacing":"spacing","w:ind":"indent","w:numPr":"num","w:jc":"align","w:outlineLvl":"heading","w:widowControl":"widow","w:keepNext":"keepWithNext","w:keepLines":"keepLines"},H=function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).call(this,t,n,r))).p=i._convert(t,"w:pPr",M,r),i}return y()(e,t),p()(e,[{key:"flat4Character",value:function(){return l()(m()(e.prototype),"flat",this).apply(this,arguments)}},{key:"flat",value:function(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=[this].concat(r);return Object.values(M).reduce((function(n,i){if(a.find((function(t){return void 0!==(n[i]=t.get("p.".concat(i)))}))&&"num"===i){var o,s=n.num,c=s.numId,u=s.ilvl,h=void 0===u?0:u,f=t.styles["_num_".concat(c)];n.indent=B({},n.indent,{},f.get("".concat(h,".p.indent"))),n.numbering={nextValue:function(){return f.level(h).nextValue()},style:(o=l()(m()(e.prototype),"flat",t)).call.apply(o,[t,f.get("".concat(h))].concat(r)),format:f.parent[h].numFmt,numId:c,level:h},delete n.num}return n}),{})}}]),e}($);x()(H,"Direct",function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).call(this,t,n,r))).p=i._convert(t,null,M,r),i}return y()(e,t),e}(H));var V=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),e}(H),W="seCell,swCell,neCell,nwCell,lastCol,firstCol,lastRow,firstRow,band2Horz,band1Horz,band2Vert,band1Vert".split(","),G="firstRow,lastRow,firstCol,lastCol,band1Vert,band2Vert,band1Horz,band2Horz,nwCell,neCell,swCell,seCell".split(","),J=function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).call(this,t,n,r))).tbl=i._convert(t,"w:tcPr",{"w:tcMargin":"margin","w:tcBorders":"border","w:shd":"background"},r),i}return y()(e,t),p()(e,[{key:"right",value:function(){return this.get("tbl.border.right")}},{key:"left",value:function(){return this.get("tbl.border.left")}},{key:"top",value:function(){return this.get("tbl.border.top")}},{key:"bottom",value:function(){return this.get("tbl.border.bottom")}}]),e}(H),U=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"right",value:function(t){return t.includes("lastCol")?l()(m()(e.prototype),"right",this).apply(this,arguments):this.get("tbl.border.insideV")}},{key:"left",value:function(t){return t.includes("firstCol")?l()(m()(e.prototype),"right",this).apply(this,arguments):this.get("tbl.border.insideV")}}]),e}(J),X=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),e}(J),Q=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"top",value:function(t){if(t.includes("firstRow"))return l()(m()(e.prototype),"top",this).apply(this,arguments)}},{key:"bottom",value:function(t,n){if(t.includes("lastRow"))return l()(m()(e.prototype),"bottom",this).apply(this,arguments)}}]),e}(J),Y=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),e}(U),Z=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),e}(Q),K={};K.seCell=X,K.swCell=X,K.neCell=X,K.nwCell=X,K.lastCol=Q,K.firstCol=Q,K.lastRow=U,K.firstRow=U,K.band2Horz=Y,K.band1Horz=Y,K.band2Vert=Z,K.band1Vert=Z,K.row=U,K.cell=X;var tt={tbl:{"w:tblInd":"indent","w:tblCellMar":"margin","w:tblBorders":"border","w:tblW":"width","w:shd":"background","w:jc":"align","w:tblStyleColBandSize":"cellSpan","w:tblStyleRowBandSize":"rowSpan","w:tblLook":"conditional"},tr:{"w:tblInd":"indent","w:tblCellMar":"margin","w:tblBorders":"border","w:cnfStyle":"conditional","w:trHeight":"height","w:cantSplit":"keepLines"},tc:{"w:tblInd":"indent","w:tblCellMar":"margin","w:tblBorders":"border","w:cnfStyle":"conditional","w:vAlign":"vertAlign"}},et=function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).apply(this,arguments))).tbl=i._convert(t,"w:tblPr",tt.tbl,r),i.tc=i._convert(t,"w:tcPr",tt.tc,r),i.tr=i._convert(t,"w:tblPrEx",tt.tr,r),t.children.filter((function(t){return"w:tblStylePr"==t.name})).forEach((function(t){var e=t.attribs["w:type"];i[e]=new K[e](t,n,r)})),i}return y()(e,t),p()(e,[{key:"flat4Table",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=[this].concat(e);return"indent,background,width,conditional".split(",").reduce((function(t,e){return r.find((function(n){return void 0!==(t[e]=n.get("tbl.".concat(e)))})),t}),{})}},{key:"flat4Row",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=[this].concat(e);return"height,cantSplit,keepLines,conditional".split(",").reduce((function(t,e){return r.find((function(n){return void 0!==(t[e]=n.get("tr.".concat(e)))})),t}),{})}},{key:"flat4Cell",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Array.from(("000000000000"+(t>>>0).toString(2)).substr(-12)).map((function(t,e){return"1"==t&&G[e]})).filter((function(t){return t})).sort((function(t,e){return W.indexOf(t)-W.indexOf(e)})),i="left,right,top,bottom".split(",").reduce((function(t,n){var i=e.get("margin.".concat(n));return null==i&&(i=e.get("tbl.margin.".concat(n),r)),void 0!==i&&(t[n]=i),t}),{}),a="left,right,top,bottom".split(",").reduce((function(t,i){var a=e.get("border.".concat(i));return null==a&&(a=e[i](r,n)),t[i]=void 0!==a?a:{sz:0},t}),{}),o="spacing,indent".split(",").reduce((function(t,n){var i=e.get("p.".concat(n),r);return void 0!==i&&(t[n]=i),t}),{}),l="fonts,size,color".split(",").reduce((function(t,n){var i=e.get("r.".concat(n),r);return void 0!==i&&(t[n]=i),t}),"bold,italic,vanish".split(",").reduce((function(t,n){var i=e.get("r.".concat(n),r);return void 0!==i&&(t[n]=!!i),t}),{})),s=this.get("tbl.background",r);return{margin:i,border:a,background:s,p:o,r:l}}},{key:"get",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=r.reduce((function(r,i){return null!=r?r:l()(m()(e.prototype),"get",n).call(n,"".concat(i,".").concat(t))}),void 0);return null==i&&(i=l()(m()(e.prototype),"get",this).call(this,t)),i}},{key:"right",value:function(t,e){var n=this,r=t.reduce((function(e,r){return null!=e?e:n.invoke("".concat(r,".right"),t)}),void 0);return null==r&&(r=this.get("tc.border.right")),null==r&&(r=t.includes("lastCol")?this.get("tr.border.right"):this.get("tr.border.insideV")),null==r&&(r=t.includes("lastCol")||e.includes("lastCol")?this.get("tbl.border.right"):this.get("tbl.border.insideV")),r}},{key:"left",value:function(t,e){var n=this,r=t.reduce((function(e,r){return null!=e?e:n.invoke("".concat(r,".left"),t)}),void 0);return null==r&&(r=this.get("tc.border.left")),null==r&&(r=t.includes("firstCol")?this.get("tr.border.left"):this.get("tr.border.insideV")),null==r&&(r=t.includes("firstCol")||e.includes("firstCol")?this.get("tbl.border.left"):this.get("tbl.border.insideV")),r}},{key:"top",value:function(t,e){var n=this,r=t.reduce((function(e,r){return null!=e?e:n.invoke("".concat(r,".top"),t)}),void 0);return null==r&&(r=this.get("tc.border.top")),null==r&&(r=t.includes("firstRow")?this.get("tr.border.top"):this.get("tr.border.insideH")),null==r&&(r=t.includes("firstRow")||e.includes("firstRow")?this.get("tbl.border.top"):this.get("tbl.border.insideH")),r}},{key:"bottom",value:function(t,e){var n=this,r=t.reduce((function(e,r){return null!=e?e:n.invoke("".concat(r,".bottom"),t)}),void 0);return null==r&&(r=this.get("tc.border.top")),null==r&&(r=t.includes("lastRow")?this.get("tr.border.bottom"):this.get("tr.border.insideH")),null==r&&(r=t.includes("lastRow")||e.includes("lastRow")?this.get("tbl.border.bottom"):this.get("tbl.border.insideH")),r}}]),e}(J);x()(et,"Direct",function(t){function e(t,n,r){var i;h()(this,e),i=w()(this,m()(e).call(this,t,n,r));var a=t.name.split(":").pop().replace("Pr","");return i[a]=i._convert(t,null,tt[a],r),i}return y()(e,t),e}(et));var nt=n(10),rt=n.n(nt),it=function(t){function e(t,n,r){var i;return h()(this,e),i=w()(this,m()(e).apply(this,arguments)),t.children.forEach((function(t){switch(t.name){case"w:pPr":case"w:rPr":break;default:var e=t.name.split(":").pop();i[e]=t.attribs["w:val"]}})),i.level=parseInt(t.attribs["w:ilvl"]),i.start=parseInt(i.start),i}return y()(e,t),e}(H),at={decimal:function(t){return t},lowerLetter:function(t){return String.fromCharCode("a".charCodeAt(0)+t-1)},upperLetter:function(t){return String.fromCharCode("A".charCodeAt(0)+t-1)},lowerRoman:function(t){return ot[t].toLowerCase()},upperRoman:function(t){return ot[t]}},ot=["I","II","III","IV","V","VI","VII","VIII","IX"],lt=function(t){function e(t,n,r){var i;h()(this,e),(i=w()(this,m()(e).apply(this,arguments))).id="_num_".concat(t.attribs["w:numId"]);var a=new Set;return t.children.forEach((function(t){switch(t.name){case"w:abstractNumId":i.basedOn="_abstractNum_".concat(t.attribs["w:val"]);break;case"w:lvlOverride":var e=t.attribs["w:ilvl"],a=t.children.find((function(t){return"w:startOverride"==t.name})),o=t.children.find((function(t){return"w:lvl"==t.name}))||{name:"w:lvl",attribs:{"w:ilvl":e},children:[]};a&&o.children.push({name:"w:start",attribs:{"w:val":a.attribs["w:val"]}}),i[e]=new st(o,n,r,rt()(i))}})),i.level=function(t){return a.add(t),i[t]||(i[t]=new st({attribs:{"w:ilvl":t},children:[]},n,r,rt()(i))),i[t]},i.reset=function(){var t=!0,e=!1,n=void 0;try{for(var r,o=a[Symbol.iterator]();!(t=(r=o.next()).done);t=!0){var l=r.value;i[l].reset()}}catch(t){e=!0,n=t}finally{try{t||null==o.return||o.return()}finally{if(e)throw n}}},i}return y()(e,t),e}(R),st=function(t){function e(t,n,r,i){var a;return h()(this,e),a=w()(this,m()(e).apply(this,arguments)),x()(rt()(a),"current",0),a.num=i,a}return y()(e,t),p()(e,[{key:"nextValue",value:function(){var t=this;if(this.lvlPicBulletId)throw new Error("pic bullet not supported yet!");var e="start,numFmt,lvlText".split(",").reduce((function(e,n){return e[n]=t[n]||t.num.parent.get("".concat(t.level,".").concat(n)),e}),{}),n=e.start,r=e.numFmt;return e.lvlText.replace(/%(\d+)/g,(function(e,i){return(i=parseInt(i)-1)==t.level?(at[r]||at.decimal)(n+t.current++):t.num.level(i).currentValue()}))}},{key:"currentValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current-1,n="start,numFmt,lvlText".split(",").reduce((function(e,n){return e[n]=t[n]||t.num.parent.get("".concat(t.level,".").concat(n)),e}),{}),r=n.start,i=n.numFmt;n.lvlText;return(at[i]||at.decimal)(r+Math.max(0,e))}},{key:"label",value:function(t){var e=this,n="start,numFmt,lvlText".split(",").reduce((function(t,n){return t[n]=e[n]||e.num.parent.get("".concat(e.level,".").concat(n)),t}),{});n.start,n.numFmt;return n.lvlText.replace(/%(\d+)/g,(function(n,r){return r=parseInt(r)-1,e.num.level(r).currentValue((t.get(r)||0)-1)}))}},{key:"reset",value:function(){this.current=0,this.content=[]}}]),e}(it),ct=function(t){function e(t,n,r){var i;return h()(this,e),(i=w()(this,m()(e).apply(this,arguments))).id="_abstractNum_".concat(t.attribs["w:abstractNumId"]),t.children.filter((function(t){return"w:lvl"==t.name})).forEach((function(t){i[t.attribs["w:ilvl"]]=new it(t,n,r,rt()(i))})),i}return y()(e,t),e}(R),ut=function(){function t(e,n,r){h()(this,t);var i=function(t){return e.children.find((function(e){return e.name===t}))};switch(this.distance=r.toDist(e),Object.assign(this,r.selectValue(i("wp:extent"))),e.attribs.simplePos){case"1":Object.assign(this,r.selectValue(i("wp:simplePos")));break;case"0":default:Object.assign(this,r.select([i("wp:positionH"),i("wp:positionV")],{positionH:"x",positionV:"y"}))}var a="TopAndBottom,Square,Tight,Through".split(",").reduce((function(t,e){return t||i("wp:wrap".concat(e))}),null);a&&(this.wrap=r.selectValue(a))}return p()(t,[{key:"flat",value:function(){return{distance:this.distance,x:this.x,y:this.y,wrap:this.wrap,width:this.width,height:this.height}}}]),t}();function ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ht(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var pt={Default:L,Character:$,Paragraph:H,Num:lt,Numbering:V,Table:et,AbstractNum:ct,Properties:function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;h()(this,t),this.docx=e,this.theme=function(t,e){return Object.assign(t.officeDocument.theme.prototype,{font:function(e){var n=e.split(/(?=[A-Z])/g),r=O()(n),i=r[0],a=r.slice(1);a={HAnsi:"latin",Ascii:"latin",Bidi:"cs",EastAsia:"ea"}[a.join("")];var o=this.find("a\\:fontScheme>a\\:".concat(i,"Font>a\\:").concat(a)).attr("typeface");if(!o&&("cs"==a||"ea"==a)){var l=t.officeDocument.settings("w\\:themeFontLang").attr("w:".concat({cs:"bidi",ea:"eastAsia"}[a]));l&&(o=this.find("a\\:fontScheme>a\\:".concat(i,"Font>a\\:font[script=").concat({"zh-CN":"Hans"}[l],"]")).attr("typeface"))}return o},color:function(e){if("phClr"==e)return e;var n=t.officeDocument.settings("w\\:clrSchemeMapping").attr("w:".concat(e))||e,r=this.find("a\\:clrScheme>a\\:".concat(n)),i=r.find("a\\:srgbClr").attr("val")||r.find("a\\:sysClr").attr("lastClr")||"000000";return"#".concat(i)},format:function(t,e){var n={line:"ln",fill:"fillStyleLst",bgFill:"bgFillStyleLst",effect:"effectStyle",font:"fontScheme"}[t];return this.find("a\\:fmtScheme a\\:".concat(n,":nth-child(").concat(parseInt(e)+1,")"))}}),t.officeDocument.theme.root()}(e),this.rStyle=this.pStyle=this.tblStyle=this.type=this._val,this.wrapSquare=this.wrapTight=this.wrapThrough=this.wrapTopAndBottom=this.wrap,this.vAlign=this.vertAlign,this.ext=this.extent,this.requireFonts=new Set,this.precision=n}return p()(t,[{key:"emu2Px",value:function(t){return parseInt(this.docx.pt2Px(parseInt(t)/12700)*this.precision)}},{key:"dxa2Px",value:function(){var t;return parseInt((t=this.docx).dxa2Px.apply(t,arguments)*this.precision)}},{key:"pt2Px",value:function(){var t;return parseInt((t=this.docx).pt2Px.apply(t,arguments)*this.precision)}},{key:"select",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.reduce((function(t,r){var i=r.name.split(":").pop();return e[i]&&(t[n[r.name]||n[i]||i]=e[i](r)),t}),{})}},{key:"selectValue",value:function(t){var e=t.name.split(":").pop();if(this[e])return this[e](t)}},{key:"pgSz",value:function(t){return{width:this.dxa2Px(t.attribs["w:w"]),height:this.dxa2Px(t.attribs["w:h"])}}},{key:"pgMar",value:function(t){var e=this;return Object.keys(t.attribs).reduce((function(n,r){return n[r.split(":").pop()]=e.dxa2Px(t.attribs[r]),n}),{})}},{key:"titlePg",value:function(t){return"false"!==a.atrribs["w:val"]}},{key:"cnfStyle",value:function(t){return parseInt(t.attribs["w:val"],2)}},{key:"cols",value:function(t){var e=this,n={num:1};t.attribs["w:num"]&&(n.num=parseInt(t.attribs["w:num"])),t.attribs["w:space"]&&(n.space=this.dxa2Px(t.attribs["w:space"]));var r=this.docx.officeDocument.content(t).find("w\\:col").toArray().map((function(t){return{width:e.dxa2Px(t.attribs["w:w"]),space:e.dxa2Px(t.attribs["w:space"])}}));return r.length&&(n.data=r),n}},{key:"_val",value:function(t){return t.attribs["w:val"]}},{key:"jc",value:function(t){return this._val(t)}},{key:"ind",value:function(t){var e=this;return Object.keys(t.attribs).reduce((function(n,r){return n[r.split(":").pop()]=e.dxa2Px(t.attribs[r]),n}),{})}},{key:"spacing",value:function(t){return this.toSpacing(t)}},{key:"widowControl",value:function(t){return"0"!==this._val(t)}},{key:"keepNext",value:function(t){return!0}},{key:"keepLines",value:function(t){return!0}},{key:"pBdr",value:function(t){var e=this;return Object.keys(t.attribs).reduce((function(n,r){return n[r.split(":").pop()]=e.toBorder(t[r][0]),n}),{})}},{key:"rFonts",value:function(t){var e,n=this,r=[];if((e=t.attribs["w:ascii"])?r.push(e):(e=t.attribs["w:asciiTheme"])&&r.push(this.theme.font(e)),(e=t.attribs["w:eastAsia"])?r.push(e):(e=t.attribs["w:eastAsiaTheme"])&&r.push(this.theme.font(e)),r.length)return(r=r.join(",")).split(",").forEach((function(t){return n.requireFonts.add(t)})),r}},{key:"lang",value:function(t){return this._val(t)}},{key:"vertAlign",value:function(t){return this._val(t)}},{key:"sz",value:function(t){return this._val(t)/2}},{key:"kern",value:function(t){return this._val(t)/2}},{key:"w",value:function(t){return this._val(t)/100}},{key:"position",value:function(t){return this.dxa2Px(this._val(t))}},{key:"i",value:function(t){return this.asToggle(t)}},{key:"strike",value:function(t){return this.asToggle(t)}},{key:"u",value:function(t){return this._val(t)}},{key:"vanish",value:function(t){return this.asToggle(t)}},{key:"smallCaps",value:function(t){return this.asToggle(t)}},{key:"b",value:function(t){return this.asToggle(t)}},{key:"background",value:function(t){return this.toColor(t,"w:color")}},{key:"highlight",value:function(t){return this.toColor(t)}},{key:"color",value:function(t){return this.toColor(t)}},{key:"bdr",value:function(t){return this.toBorder(t)}},{key:"tblGrid",value:function(t){var e=this;return t.children.map((function(t){return e.dxa2Px(t.attribs["w:w"])}))}},{key:"tcBorders",value:function(t){var e=this;return t.children.reduce((function(t,n){return t[n.name.split(":").pop()]=e.toBorder(n),t}),{})}},{key:"tblBorders",value:function(t){return this.tcBorders(t)}},{key:"tblCellMar",value:function(t){var e=this;return t.children.reduce((function(t,n){return t[n.name.split(":").pop()]=e.dxa2Px(n.attribs["w:w"]),t}),{})}},{key:"tblLook",value:function(t){return Object.keys(t.attribs).reduce((function(e,n){return e[n.split(":").pop()]=t.attribs[n],e}),{})}},{key:"tblStyleColBandSize",value:function(t){return parseInt(this._val(t))}},{key:"tblStyleRowBandSize",value:function(t){return parseInt(this._val(t))}},{key:"tblInd",value:function(t){return this.dxa2Px(t.attribs["w:w"])}},{key:"tcW",value:function(t){return this.dxa2Px(t.attribs["w:w"])}},{key:"shd",value:function(t){return this.docx.asColor(t.attribs["w:fill"])}},{key:"trHeight",value:function(t){return this.dxa2Px(t.attribs["w:val"])}},{key:"cantSplit",value:function(t){return!0}},{key:"cnfStyle",value:function(t){return this._val(t)}},{key:"positionH",value:function(t){var e=this;return ft({base:t.attribs.relativeFrom},t.children.reduce((function(t,n){switch(n.name.split(":").pop()){case"posOffset":t.offset=e.emu2Px(n.children[0].data);break;case"align":t.align=n.children[0].data}return t}),{}))}},{key:"positionV",value:function(){return this.positionH.apply(this,arguments)}},{key:"simplePos",value:function(t){return{x:{base:"page",offset:this.emu2Px(t.attribs.x)},y:{base:"page",offset:this.emu2Px(t.attribs.y)}}}},{key:"extent",value:function(t){return{width:this.emu2Px(t.attribs.cx),height:this.emu2Px(t.attribs.cy)}}},{key:"off",value:function(t){return{x:this.emu2Px(t.attribs.x),y:this.emu2Px(t.attribs.y)}}},{key:"xfrm",value:function(t){var e=this.select(t.children,{off:"position",ext:"size"});return t.attribs.rot&&(e.rotate=Math.ceil(parseInt(t.attribs.rot)/6e4)),"1"===t.attribs.flipH&&(e.flipH=!0),"1"===t.attribs.flipV&&(e.flipV=!0),e}},{key:"prstGeom",value:function(t){return t.attribs.prst}},{key:"custGeom",value:function(t){for(var e,n=this,r=[],i=function(t){return n.emu2Px(t)},a=t.children.find((function(t){return"a:pathLst"==t.name})).children[0].children,o=a.length,l=0;l<o;l++)switch((e=a[l]).name.split(":").pop()){case"moveTo":r.push("M "+i(e.children[0].attribs.x)+" "+i(e.children[0].attribs.y));break;case"lnTo":r.push("L "+i(e.children[0].attribs.x)+" "+i(e.children[0].attribs.y));break;case"cubicBezTo":r.push("L "+i(e.children[0].attr("x"))+" "+i(e.children[0].attr("y"))),r.push("Q "+i(e.children[1].attr("x"))+" "+i(e.children[1].attr("y"))+" "+i(e.children[2].attr("x"))+" "+i(e.children[2].attr("y")));break;case"arcTo":r.push("A");break;case"close":r.push("Z")}return r.join(" ")}},{key:"solidFill",value:function(t){return this.toColor(t.children[0])}},{key:"blip",value:function(t){var e=t.attribs["r:embed"];return ft({},officeDocument.getRel(e))}},{key:"stretch",value:function(t){return this.fillRect(t.children[0])}},{key:"fillRect",value:function(t){return"left,right,bottom,top".split(",").reduce((function(e,n){return e[n]=parseInt(t.attribs[n[0]])/1e5,e}),{})}},{key:"srcRect",value:function(t){return this.fillRect(t)}},{key:"tile",value:function(t){return ft({},t.attribs)}},{key:"blipFill",value:function(t){return this.select(t.children,{blip:"src",stretch:"stretch",srcRect:"portion",tile:"tile"})}},{key:"ln",value:function(t){var e=this.select(t.children,{prstDash:"dash"});return e.width=this.emu2Px(t.attribs.w),e}},{key:"bodyPr",value:function(t){var e=this,n={};return n.margin="bottom,top,right,left".split(",").reduce((function(n,r,i){return(i=t.attribs["".concat(r[0],"Ins")])&&(n[r]=e.emu2Px(i)),n}),{}),n}},{key:"wrapPolygon",value:function(t){var e=this;return t.children.map((function(t){return function(t){var n=t.attribs,r=n.x,i=n.y;return{x:e.emu2Px(r),y:e.emu2Px(i)}}(t)}))}},{key:"wrap",value:function(t){var e=ft({mode:t.name.substring("wp:wrap".length),wrapText:t.attribs.wrapText,distance:this.toDist(t)},this.select(t.children,{wrapPolygon:"polygon"}));if("Square"==e.mode&&!e.distance){var n=this.emu2Px(36e3);e.distance={left:n,right:n,top:n,bottom:n}}return e}},{key:"numPr",value:function(t){return t.children.reduce((function(t,e){return t[e.name.split(":").pop()]=e.attribs["w:val"],t}),{})}},{key:"outlineLvl",value:function(t){return parseInt(t.attribs["w:val"])}},{key:"asToggle",value:function(t){return null==t||null==t.attribs["w:val"]||!!parseInt(this._val(t))}},{key:"toDist",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",r="Right,Left,Bottom,Top".split(",").reduce((function(r,i){return t.attribs["".concat(n).concat(i[0])]&&(r[i.toLowerCase()]=e.emu2Px(t.attribs["".concat(n).concat(i[0])])),r}),{});if(Object.keys(r).length>0)return r}},{key:"toSpacing",value:function(t){var e,n,r={};if(!t.attribs["w:beforeAutospacing"]&&(n=t.attribs["w:beforeLines"])?r.top=this.dxa2Px(n):(n=t.attribs["w:before"])&&(r.top=this.dxa2Px(n)),!t.attribs["w:afterAutospacing"]&&(n=t.attribs["w:afterLines"])?r.bottom=this.dxa2Px(n):(n=t.attribs["w:after"])&&(r.bottom=this.dxa2Px(n)),!(e=t.attribs["w:line"]))return r;switch(r.lineRule=t.attribs["w:lineRule"]){case"atLeast":case"exact":r.lineHeight=this.dxa2Px(e);break;case"auto":default:r.lineHeight=100*parseInt(e)/240+"%"}return r}},{key:"toBorder",value:function(t){var e,n={};if(n.val=t.attribs["w:val"],"nil"!=n.val)return(e=t.attribs["w:sz"])&&(n.sz=this.pt2Px(e/8)),(e=t.attribs["w:color"])?n.color=this.docx.asColor(e):(e=t.attribs["w:themeColor"])&&(n.color=this.theme.color(e)),(e=t.attribs["w:space"])&&(n.space=parseInt(e)),n;n.sz=0}},{key:"toColor",value:function(t){return this.docx.asColor(t.attribs["w:val"]||t.attribs["w:color"]||this.theme.color(t.attribs["w:themeColor"]))}}]),t}(),Shape:function t(e,n,r){h()(this,t),this.styles=n;var i=e.children.find((function(t){return t.name.endsWith(":spPr")}));this.props=i?r.select(i.children,{xfrm:"transform",custGeom:"path",prstGeom:"shape",ln:"outline",solidFill:"fill",blipFill:"image"}):{}},Anchor:ut},dt=n(6),wt=n.n(dt),vt=n(13),mt=n.n(vt),gt=n(7),yt=n.n(gt),bt=n(11),xt=n.n(bt);function kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Pt=n(18);function _t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ot(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ct(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ot(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ot(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function jt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function St(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function It(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?St(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):St(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function At(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Tt(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tt(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Ft=function(t){var e,n,r=t.Shape;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"childStyle",xt()((function(t,e){return t?t.inherit(e):e}))),n}return y()(e,t),p()(e,[{key:"getChildContext",value:function(){return{style:this.props.textStyle?this.props.textStyle.inherit(this.context.style):this.context.style}}},{key:"render",value:function(){return wt.a.createElement(r,this.props)}}],[{key:"asStyle",value:function(t){return Object.assign(new Et(t).flat(),{_raw:t})}}]),e}(dt.Component),x()(e,"displayName","shape"),x()(e,"contextTypes",{style:yt.a.object}),x()(e,"childContextTypes",{style:yt.a.object}),n},Rt=function(){function t(e,n){for(var r=this,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];h()(this,t);var l=function(t){return t};this.flat=function(){return Object.keys(e).reduce((function(t,i){var o=r[i]||a.includes(i)&&l;if(o){var s=o.bind(r)(e[i],t,e);if(null!=s&&s!=t)t[n[i]||i]=s}return t}),{})}}return p()(t,[{key:"got",value:function(t,e){return t[e]||(t[e]={})}}]),t}(),Et=function(t){function e(t){var n;h()(this,e),n=w()(this,m()(e).call(this,t,{anchor:"vertAlign",ln:"outline",bodyPr:"textStyle"},"geometry","solidFill","rotate","textStyle")),x()(rt()(n),"xfrm",(function(t,e){return Object.assign(e,t)})),x()(rt()(n),"blipFill",(function(t){return Nt({},t.blip,{},c()(t,["blip"]))}));var r=n.flat.bind(rt()(n));return n.flat=function(){var t=r();if(t.outline&&t.outline.noFill){var e=t.outline,i=e.width,a=void 0===i?0:i,o=e.half,l=void 0===o?a/2:o,s=n.got(t,"margin"),c=s.left,u=void 0===c?0:c,h=s.right,f=void 0===h?0:h,p=s.bottom,d=void 0===p?0:p,w=s.top,v=void 0===w?0:w;t.margin={left:u+l,right:f+l,bottom:d+l,top:v+l},delete t.outline}return t},n}return y()(e,t),p()(e,[{key:"anchor",value:function(t){return{b:"bottom",ctr:"middle",t:"top",dist:"distributed",just:"justified"}[t]}},{key:"ln",value:function(t){return Nt({width:t.w},c()(t,["w"]))}},{key:"bodyPr",value:function(t,e){var n=new Lt(t).flat().margin;e.margin=n}},{key:"textStyle",value:function(t,e){Object.assign(this.got(e,"textStyle"),t)}}]),e}(Rt),Lt=function(t){function e(t){var n;h()(this,e);var r=function(t){return function(e,r){n.got(r,"margin")[t]=e}};return(n=w()(this,m()(e).call(this,t,{}))).rIns=r("right"),n.tIns=r("top"),n.lIns=r("left"),n.bIns=r("bottom"),n}return y()(e,t),e}(Rt);function zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function $t(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zt(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zt(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var qt=function(t){var e,n;return n=e=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"render",value:function(){return null}}]),e}(dt.PureComponent),x()(e,"displayName","".concat(t)),n},Bt={Document:function(t){var e,n,r=t.Document;t.Container,t.Frame;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(a))),x()(rt()(n),"numberingContext",xt()((function(t){var e=null,r=n.styles;return{numbering:function(n){e||(e={},k.ContentQuery.fromContent(t).findFirst((function(t){if("paragraph"==t.get("type")){if(t.hasIn(["props","numId"])){var n=t.getIn(["props","numId"]),r=t.getIn(["props","level"]);(e[n]=e[n]||[]).push([t.get("id"),r])}return!1}})));var a=t.getIn([n,"props"]).toJS(),o=a.numId,l=a.level,s=e[o].findIndex((function(t){return t[0]==n})),c=e[o].slice(0,s+1).reduce((function(t,e){var n=i()(e,2),r=(n[0],n[1]);return t.set(r,(t.get(r)||0)+1),t}),new Map);return r["_num_".concat(o)].level(l).label(c)}}}),(function(t,e){return t.equals(e)}))),n}return y()(e,t),p()(e,[{key:"getChildContext",value:function(){var t=this;return{styles:this.styles,evenAndOddHeaders:!!this.props.evenAndOddHeaders,style:this.styles["*"],numbering:function(e){return t.numberingContext(t.props.content).numbering(e)}}}},{key:"resetNumbering",value:function(){var t=this.styles;Object.keys(t).forEach((function(e,n){return(n=t[e])&&n.reset&&n.reset()}))}},{key:"getContent",value:function(){var t=this.props.evenAndOddHeaders,e={};function n(n){var r=function(e){var n=e.props,r=n.children,i=n.titlePg;return r.reduce((function(e,n){return e.go&&(n.props.named?!t&&["even","odd"].find((function(t){return n.props.named.endsWith(t)}))||!i&&n.props.named.endsWith("first")||(e[n.props.named]=n):delete e.go),e}),{go:!0})}(n),i=(e=Object.values(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?kt(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kt(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{},r))).concat(function(t){return t.slice(Math.max(0,t.findIndex((function(t){return!t.props.named}))))}(n.props.children));return n=wt.a.cloneElement(n,{children:i}),delete e["header.first"],delete e["footer.first"],n}return wt.a.Children.toArray(this.props.children).reduce((function(t,e){return"section"!==e.type.displayName?t.push(e):(e=n(e),t.push(e)),t}),[])}},{key:"render",value:function(){var t=this.props,e=(t.children,t.evenAndOddHeaders,c()(t,["children","evenAndOddHeaders"]));return this.resetNumbering(),wt.a.createElement(r,mt()({},e,{children:this.getContent()}))}},{key:"styles",get:function(){return this.props.styles}}]),e}(dt.Component),x()(e,"displayName","document"),x()(e,"childContextTypes",{styles:yt.a.object,evenAndOddHeaders:yt.a.bool,style:yt.a.object,numbering:yt.a.func}),n},Section:function(t){var e,n,r=t.Section,a=t.Frame;t.Container;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"getLayout",xt()((function(t,e,n,r){var i=n.num,a=void 0===i?1:i,o=n.space,l=void 0===o?0:o,s=n.data,c=t-e.left-e.right,u=(s||new Array(a).fill({width:(c-(a-1)*l)/a,space:l})).reduce((function(t,e){var n=e.width,i=e.space;return t.columns.push({x:t.x,width:n,"data-content":r,"data-type":"section"}),t.x+=i+n,t}),{x:e.left,columns:[]}).columns;return{id:r,cols:u,margin:e}}),(function(t,e){return t===e||Object(Pt.shallowEqual)(t,e)}))),x()(rt()(n),"getCreate",xt()((function(t,e,r,i){return function(a,o){if("continuous"==e&&0==a.i&&0!=a.I){var l=o.parent.getDocument().computed.composed;return l[l.length-1].appendLayout(t)}return new n.constructor.Page(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_t(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_t(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({width:r,height:i},t,{},a),o)}}),(function(t,e){return t===e||Object(Pt.shallowEqual)(t,e)}))),n}return y()(e,t),p()(e,[{key:"render",value:function(){var t=this.props,e=t.pgSz,n=e.width,i=e.height,o=t.pgMar,l=t.cols,s=t.children,u=c()(t,["pgSz","pgMar","cols","children"]),h=o.left,f=o.right,p=this.getLayout(n,o,l,this.props.id),d=this.getCreate(p,this.props.type,n,i);return wt.a.createElement(r,mt()({create:d},u),wt.a.Children.toArray(s).map((function(t){return t.props.named?wt.a.createElement(a,mt()({},t.props,{width:n-h-f,key:t.props.id})):t})))}}],[{key:"Page",get:function(){return xt()((function(){return function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"defineProperties",value:function(){this.section=this.context.parent,l()(m()(e.prototype),"defineProperties",this).call(this),Object.defineProperties(this,{layout:{enumerable:!1,configurable:!1,get:function(){return this.layouts[this.layouts.length-1]}},cols:{enumerable:!1,configurable:!0,get:function(){return this.layouts.reduce((function(t,e){return[].concat(t,e.cols)}),[])}}});var t=this.props,n=(t.width,t.height),r=t.margin,i=t.cols,a=t.named,o=t.i,s=t.id;this.layouts=[{cols:i,margin:r,id:s}];var c=function(t){return[0==o&&"first",o%2==0?"even":"odd","default"].filter((function(t){return!!t})).reduce((function(e,n){return e||a("".concat(t,".").concat(n))}),null)},u=c("header"),h=c("footer"),f=r.top;u&&(this.computed.composed.push(wt.a.cloneElement(u,{x:r.left,y:r.header,className:"header"})),f=Math.max(f,r.header+u.props.height));var p=n-r.bottom;if(h){var d=n-r.footer-h.props.height;this.computed.composed.push(wt.a.cloneElement(h,{x:r.left,y:d,className:"footer"})),p=Math.min(d,p)}this.y0=f,this.y1=p}},{key:"createColumn",value:function(){var t=this.layout.id,n=this.columns.findIndex((function(e){return e.id==t})),r=-1==n?Math.max.apply(Math,[this.y0].concat(this.columns.map((function(t){return t.y+t.currentY})))):this.columns[n].y;return Object.assign(l()(m()(e.prototype),"createColumn",this).call(this),{height:this.y1-r,y:r,id:t})}},{key:"appendLayout",value:function(t){t.cols,t.margin,t.id;var e=this.layout;function n(e){return e.layouts.push(t),e.createColumn(),e}if(e.cols.length>1){var r=this.context.parent.totals;if(this.balance(),r!=this.context.parent.totals){var i=this.context.getComposer(e.id).current;return i.cols.slice(-i.columns.length).forEach((function(t){return i.createColumn()})),n(i)}}return n(this)}},{key:"balance",value:function(){var t,e,n=this.layout,r=n.cols,i=n.id,a=this.columns.filter((function(t){return t.id===i})),o=a.reduce((function(t,e){return[].concat(t,e.children)}),[]);t=a.map((function(t){return t.currentY})),e=Math.min.apply(Math,o.map((function(t){return t.props.height}))),a.length==r.length&&Math.max.apply(Math,t)-Math.min.apply(Math,t)<e||(this.columns.splice(-a.length),r.find((function(t){return t.width!=r[0].width}))?this.anyBalance(o,r):this.equalBalance(o,r))}},{key:"anyBalance",value:function(t,e){var n=this,r=this.createColumn,a=this.reset4Recompose;try{var o=e.reduce((function(t,e){return t+e.width}),0);this.createColumn=function(){return Object.assign(r.call(n),{width:o,height:Number.MAX_SAFE_INTEGER})},this.reset4Recompose=function(){return n.createColumn(),t},this.recompose();var l=this.currentColumn.currentY;this.createColumn=function(){return Object.assign(r.call(n),{height:l})},this.reset4Recompose=function(){var t=n.columns.splice(-1),e=i()(t,1)[0];return n.createColumn(),e.children},this.recompose()}finally{this.createColumn=r,this.reset4Recompose=a}}},{key:"layoutOf",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.assign(l()(m()(e.prototype),"layoutOf",this).call(this,t),this.layouts.find((function(e){return(n+=e.cols.length)>=t}))||{})}},{key:"removeFrom",value:function(t){var n=this,r=l()(m()(e.prototype),"removeFrom",this).apply(this,arguments),i=0==this.columns.length?0:this.layouts.findIndex((function(t){return t.id==n.currentColumn.id}));return this.layouts.splice(i+1),r}},{key:"clone",value:function(){var t=this.layouts,n=this.y0,r=this.y1;return Object.assign(l()(m()(e.prototype),"clone",this).apply(this,arguments),{layouts:t,y0:n,y1:r})}}]),e}(r.fissureLike(a))}))()}}]),e}(dt.Component),x()(e,"displayName","section"),x()(e,"propTypes",{cols:yt.a.shape({num:yt.a.number.isRequired,space:yt.a.number,data:yt.a.arrayOf(yt.a.shape({width:yt.a.number,space:yt.a.number}))}),titlePg:yt.a.bool}),x()(e,"defaultProps",{cols:{num:1}}),x()(e,"contextTypes",{evenAndOddHeaders:yt.a.bool}),n},Paragraph:function(t){t.Text;var e,n,r=t.Paragraph;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"style",xt()((function(t,e){var r=t.flat(e);if(r.indent&&r.indent.hanging&&(r.indent.firstLine=-r.indent.hanging),r.numbering){var i=r.numbering,a=i.nextValue,o=i.style,l=i.format;r.numbering={style:Ct({},o,{},n.defaultStyle(t,e)),label:a(),format:l}}return r}))),x()(rt()(n),"childStyle",xt()((function(t,e){return Object.assign(t.clone(),{r:{}}).inherit(e)}))),x()(rt()(n),"defaultStyle",xt()((function(t,e){return t.flat4Character(e)}))),n}return y()(e,t),p()(e,[{key:"getChildContext",value:function(){return{style:this.childStyle(this.props.style,this.context.style)}}},{key:"render",value:function(){var t=this.props,e=(t.style,c()(t,["style"])),n=this.style(this.props.style,this.context.style),i=n.widow,a=n.orphan,o=void 0===a?i:a,l=c()(n,["widow","orphan"]);return wt.a.createElement(r,mt()({},l,e,{widow:i,orphan:o},{defaultStyle:this.defaultStyle(this.props.style,this.context.style)}))}}]),e}(dt.Component),x()(e,"displayName","paragraph"),x()(e,"propTypes",{style:yt.a.object.isRequired,numId:yt.a.string,level:yt.a.number,outline:yt.a.number}),x()(e,"contextTypes",{style:yt.a.object,shouldContinueCompose:yt.a.func}),x()(e,"childContextTypes",{style:yt.a.object}),n},Text:function(t){var e,n,r=t.Text;return n=e=function(t){function e(){var t;return h()(this,e),(t=w()(this,m()(e).apply(this,arguments))).componentWillReceiveProps(t.props,t.context),t}return y()(e,t),p()(e,[{key:"componentWillReceiveProps",value:function(t,e){this.style=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jt(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jt(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e.r,{},t)}},{key:"render",value:function(){return wt.a.createElement(r,this.style)}}]),e}(dt.Component),x()(e,"displayName","text"),x()(e,"contextTypes",{r:yt.a.object}),n},Run:function(t){var e,n,r=t.Container;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"style",(function(t,e){return t.flat(e)})),n}return y()(e,t),p()(e,[{key:"render",value:function(){var t=this.props,e=t.style,n=c()(t,["style"]);return e=this.style(e,this.context.style),wt.a.createElement(r,mt()({},n,{type:this.constructor.displayName}),wt.a.Children.map(this.props.children,(function(t){return"text"==t.type.displayName?wt.a.cloneElement(t,e):t})))}}]),e}(dt.Component),x()(e,"displayName","run"),x()(e,"propTypes",{style:yt.a.object.isRequired}),x()(e,"contextTypes",{style:yt.a.object}),n},Cell:function(t){var e,n,r=t.Cell;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"childStyle",xt()((function(t,e){return t?t.inherit(e):e}))),n}return y()(e,t),p()(e,[{key:"getChildContext",value:function(){return{style:this.childStyle(this.props.style,this.context.style)}}},{key:"render",value:function(){var t=this.props,e=(t.style,c()(t,["style"])),n=this.childStyle(this.props.style,this.context.style),i=n.get("tc.conditional")|n.get("tr.conditional"),a=n.flat4Cell(i,[]);return wt.a.createElement(r,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dt(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dt(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{},a))}}]),e}(dt.Component),x()(e,"displayName","cell"),x()(e,"contextTypes",{style:yt.a.object}),x()(e,"childContextTypes",{style:yt.a.object}),n},Row:function(t){var e,n,r=t.Row;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"childStyle",xt()((function(t,e){return t?t.inherit(e):e}))),n}return y()(e,t),p()(e,[{key:"getChildContext",value:function(){return{style:this.childStyle(this.props.style,this.context.style)}}},{key:"render",value:function(){var t=this.props,e=(t.style,c()(t,["style"])),n=this.childStyle(this.props.style,this.context.style).flat4Row(),i=this.context.cols.reduce((function(t,e){return t.cols.push({x:t.x,width:e}),t.x+=e,t}),{x:0,cols:[]}).cols,a=i.slice(-1).reduce((function(t,e){return e.x+e.width}),0);return wt.a.createElement(r,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?At(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):At(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{},n,{cols:i,width:a}))}}]),e}(dt.Component),x()(e,"displayName","row"),x()(e,"contextTypes",{style:yt.a.object,cols:yt.a.arrayOf(yt.a.number)}),x()(e,"childContextTypes",{style:yt.a.object}),n},Table:function(t){var e,n,r=t.Table;t.Container;return n=e=function(t){function e(){var t,n;h()(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w()(this,(t=m()(e)).call.apply(t,[this].concat(i))),x()(rt()(n),"childStyle",xt()((function(t,e){return t?t.inherit(e):e}))),x()(rt()(n),"getIndent",xt()((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=new k.ContentQuery(n.context.activeDocStore.getState(),"#".concat(n.props.id));if(i.parents("table").length>0)return t;var a=new k.ReactQuery(wt.a.createElement(dt.Fragment,null,r)).findFirst("cell"),o=a.attr("margin")||e||{},l=o.right,s=void 0===l?0:l;return t-s}))),x()(rt()(n),"getConditionalChildren",xt()((function(t,e){return e}))),n}return y()(e,t),p()(e,[{key:"getChildContext",value:function(){return{style:this.childStyle(this.props.style,this.context.style),cols:this.props.cols}}},{key:"componentWillReceiveProps1",value:function(t,e){var n=e.styles,r=t.children,i=c()(t,["children"]),a=n[i.namedStyle||this.constructor.namedStyle],o="indent".split(",").reduce((function(t,e,n){return null==i[e]&&null!=(n=a.get("tbl.".concat(e)))&&(t[e]=n),t}),{}),l=r.map((function(t,e){var n=t.props.children.map((function(n,o){var l=(n.props||{}).cnfStyle,s=void 0===l?0:l,c=(t.props||{}).cnfStyle,u=(void 0===c?0:c)|s,h=a.merge(It({},n.props,{cnfStyle:u}),function(t,e){var n=[];return 0==t&&n.push("firstRow"),t==r.length-1&&n.push("lastRow"),0==e&&n.push("firstCol"),e==i.cols.length-1&&n.push("lastCol"),n}(e,o));return wt.a.cloneElement(n,It({},h,{cnfStyle:void 0}))}));return wt.a.cloneElement(t,null,n)}));this.style=It({},o,{},i,{children:l})}},{key:"render",value:function(){var t=this.props,e=t.cols,n=t.width,i=void 0===n?e.reduce((function(t,e){return t+e}),0):n,a=t.children,o=(t.style,c()(t,["cols","width","children","style"])),l=this.childStyle(this.props.style,this.context.style),s=l.flat4Table(),u=s.indent,h=c()(s,["indent"]),f=this.getIndent(u,l.get("tbl.margin"),a),p=this.props.style.get("conditional");return null!=p&&(a=this.getConditionalChildren(p,a)),wt.a.createElement(r,It({},o,{},h,{indent:f,width:i,children:a}))}}]),e}(dt.Component),x()(e,"displayName","table"),x()(e,"namedStyle","*table"),x()(e,"contextTypes",{style:yt.a.object,styles:yt.a.object,activeDocStore:yt.a.object}),x()(e,"childContextTypes",{style:yt.a.object,cols:yt.a.arrayOf(yt.a.number)}),n},Image:function(t){var e,n,r=Ft(t);return n=e=function(e){function n(){return h()(this,n),w()(this,m()(n).apply(this,arguments))}return y()(n,e),p()(n,[{key:"render",value:function(){return wt.a.createElement(t.Image,this.props)}}],[{key:"asStyle",value:function(){var t=r.asStyle.apply(r,arguments),e=t.blipFill,n=(e=void 0===e?{}:e).url,i=t.width,a=t.height,o=(t.id,t.hash,t.changed,t.children,c()(t,["blipFill","width","height","id","hash","changed","children"]));return{src:n,width:i,height:a,outline:$t({},o,{width:i,height:a})}}}]),n}(r),x()(e,"displayName","image"),n},Shape:Ft,Anchor:function(t){var e,n,r=t.Anchor;return n=e=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"render",value:function(){var t=this.props,e=t.distance,n=t.wrap,i=c()(t,["distance","wrap"]),a=function(t,e){return"left,right,top,bottom".split(",").reduce((function(n,r){return n[r]=Math.max(t[r]||0,e[r]||0),n}),{})}(e||{},n&&n.distance||{});return wt.a.createElement(r,mt()({},i,{margin:a,wrap:n}))}}]),e}(dt.Component),x()(e,"displayName","anchor"),n},Styles:function(){return qt("styles")},Style:function(){return qt("style")}},Mt={seperate_up_to_run_at_end_of_text:function(){var t=this.target,e=t.closest("w\\:r"),n=e.clone();n.children(":not(".concat(this.PR,")")).remove(),n.append(t.nextAll()),e.after(n),this.file.renderChanged(e);var r=this.file.renderChanged(n);this.$target.closest("run").after("#".concat(r.id))}},Ht=function(){function t(e){h()(this,t),this.file=e}return p()(t,[{key:"$",value:function(){var t;return(t=this.file.doc.officeDocument).content.apply(t,arguments)}},{key:"got",value:function(t,e,n){var r=e.replace(":","\\:"),i=n.replace(":","\\:"),a=this.node.closest(r),o=a.children(i);0==o.length&&(a.prepend("<".concat(n,"/>")),o=a.children(i));var l=t.replace(":","\\:"),s=o.children(l);return 0==s.length&&(o.append("<".concat(t,"/>")),s=o.children(l)),s}},{key:"trim",value:function(t){return t.replace(/>\s+/g,">").replace(/\s+</g,"<")}},{key:"create",value:function(t){var e=this.template(t),n=this.file.doc.constructor.parseXml(this.trim(e));return this.node=n.root().children().first(),this.apply(t),this.file.attach(this.node)}},{key:"update",value:function(t){this.apply(t),this.file.renderChanged(this.node)}},{key:"apply",value:function(t){var e=this;return Object.keys(t).forEach((function(n){e[n]&&e[n](t[n],t)})),this.node}},{key:"template",value:function(t){return""}}]),t}(),Vt=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"apply",value:function(t){var n=t.data,r=c()(t,["data"]);return"pic:pic"!==this.node.prop("name")&&(this.node=this.node.find("pic\\:pic")),n&&(r.rid="string"==typeof n?this.file.doc.officeDocument.addExternalImage(n):this.file.doc.officeDocument.addImage(n)),l()(m()(e.prototype),"apply",this).call(this,r),this.node.closest("w\\:drawing")}},{key:"size",value:function(t){var e=this,n=t.width,r=t.height,i=this.node.find("a\\:xfrm>a\\:ext"),a=this.node.closest("wp\\:inline"),o=function(t,n){if(t){var r=e.file.px2cm(t),o=parseInt(i.attr(n));if(i.attr(n,r),a.length){var l=a.children("wp\\:extent"),s=parseInt(l.attr(n));l.attr(n,r+s-o)}}};o(n,"cx"),o(r,"cy")}},{key:"rotate",value:function(t){var e=parseInt(6e4*t);this.node.find("a\\:xfrm").attr("rot",e)}},{key:"effectExtent",value:function(t){return null}},{key:"offset",value:function(t){return null}},{key:"rid",value:function(t){this.node.find("a\\:blip").attr("r:embed",t)}},{key:"name",value:function(t,e){var n=e.rid;this.node.find("pic\\:cNvPr").attr("name",t),this.node.closest("wp\\:inline").find("wp\\:docPr").attr("id",n).attr("name",t)}},{key:"template",value:function(t){return'\n <w:drawing>\n <wp:inline distT="0" distB="0" distL="0" distR="0">\n <wp:extent cx="1636295" cy="920416"/>\n <wp:effectExtent l="0" t="0" r="0" b="0"/>\n <wp:docPr/>\n <wp:cNvGraphicFramePr>\n <a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/>\n </wp:cNvGraphicFramePr>\n <a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">\n <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">\n <pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">\n <pic:nvPicPr>\n <pic:cNvPr/>\n <pic:cNvPicPr/>\n </pic:nvPicPr>\n <pic:blipFill>\n <a:blip r:embed="rId9"/>\n <a:stretch>\n <a:fillRect/>\n </a:stretch>\n </pic:blipFill>\n <pic:spPr>\n <a:xfrm>\n <a:off x="0" y="0"/>\n <a:ext cx="1636295" cy="920416"/>\n </a:xfrm>\n <a:prstGeom prst="rect">\n <a:avLst/>\n </a:prstGeom>\n </pic:spPr>\n </pic:pic>\n </a:graphicData>\n </a:graphic>\n </wp:inline>\n </w:drawing>\n '}}]),e}(Ht),Wt=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"apply",value:function(t,n){var r=t.rows,i=t.cols,a=c()(t,["rows","cols"]);return r&&this.make(r,i),l()(m()(e.prototype),"apply",this).call(this,a)}},{key:"style",value:function(t){return t.namedStyle}},{key:"tblLook",value:function(t){if(!t.tblLook)return null}},{key:"cols",value:function(t){var e=this;t=t.map((function(t){return e.file.px2dxa(t)})),this.node.find("w\\:tblGrid").empty().append(t.map((function(t){return'<w:gridCol w:w="'.concat(t,'"/>')})).join(""))}},{key:"height",value:function(t){var e=t.value,n=t.row,r=(t.cell,this.node.find('[xxid="'.concat(n,'"]'))),i=r.find("w\\:trPr");0==i.length&&(r.prepend("<w:trPr/>"),i=r.find("w\\:trPr"));var a=i.find("w\\:trHeight");0==a.length&&(i.append("<w:trHeight/>"),a=i.find("w\\:trHeight")),e=this.file.px2dxa(e),a.attr("w:val",e)}},{key:"width",value:function(t){var e=t.value,n=t.row,r=t.cell,i=t.i;if(!(e<=0)){var a=this.node.find("w\\:tblGrid").first().find("w\\:gridCol"),o=a.map((function(t,e){return parseInt(e.attribs["w:w"])})).toArray(),l=this.node.find('[xxid="'.concat(n,'"]')).find('[xxid="'.concat(r,'"]')).find("w\\:tcPr>w\\:tcW"),s=(e=this.file.px2dxa(e))-parseInt(l.attr("w:w")||o[i]);if(o.length>i+1){if(!(o[i+1]-s>0))return;o[i+1]=o[i+1]-s}o[i]=e,a.each((function(t,e){e.attribs["w:w"]=o[t]}));var c=this.node.find("w\\:tr");c.toArray().forEach((function(t,e){var n=c.eq(e).find("w\\:tc");n.eq(i).find("w\\:tcPr>w\\:tcW").attr("w:w",o[i]),o.length>i+1&&n.eq(i+1).find("w\\:tcPr>w\\:tcW").attr("w:w",o[i+1])}))}}},{key:"make",value:function(t,e){var n=this;e=e.map((function(t){return n.file.px2dxa(t)})),this.node.find("w\\:tblGrid").empty().append(e.map((function(t){return'<w:gridCol w:w="'.concat(t,'"/>')})).join(""));var r=new Array(t).fill(0).map((function(t){return["<w:tr>",e.map((function(t){return n.template_tc(t)})).join(""),"</w:tr>"].join("")}));this.node.append(this.trim(r.join(""))),this.makeStyleReady()}},{key:"makeStyleReady",value:function(){var t=this.file.doc.officeDocument.styles;if(0==t('w\\:style[w\\:styleId="TableNormal"]').length){var e=t(this.trim(Gt)).insertAfter(t('w\\:style[w\\:default="1"]').last());this.file.renderChanged(e)}if(0==t('w\\:style[w\\:styleId="TableGrid"]').length){var n=t(this.trim(Jt)).appendTo(t("w\\:styles"));this.file.renderChanged(n)}}},{key:"template_tc",value:function(t){return"<w:tc>".concat(null!=t?'<w:tcPr><w:tcW w:w="'.concat(t,'" w:type="dxa"/></w:tcPr>'):"","<w:p><w:r><w:t></w:t></w:r></w:p></w:tc>")}},{key:"template",value:function(t){return'\n <w:tbl>\n <w:tblPr>\n <w:tblStyle w:val="TableGrid"/>\n <w:tblW w:w="0" w:type="auto"/>\n <w:tblLook w:val="04A0" w:noVBand="1" w:noHBand="0" w:lastColumn="0" w:firstColumn="1" w:lastRow="0" w:firstRow="1"/>\n </w:tblPr>\n <w:tblGrid>\n </w:tblGrid>\n </w:tbl>\n '}}]),e}(Ht),Gt='\n <w:style w:type="table" w:default="1" w:styleId="TableNormal">\n <w:name w:val="Normal Table"/>\n <w:uiPriority w:val="99"/>\n <w:semiHidden/>\n <w:unhideWhenUsed/>\n <w:tblPr>\n <w:tblInd w:w="0" w:type="dxa"/>\n <w:tblCellMar>\n <w:top w:w="0" w:type="dxa"/>\n <w:left w:w="108" w:type="dxa"/>\n <w:bottom w:w="0" w:type="dxa"/>\n <w:right w:w="108" w:type="dxa"/>\n </w:tblCellMar>\n </w:tblPr>\n </w:style>\n',Jt='\n <w:style w:type="table" w:styleId="TableGrid">\n <w:name w:val="Table Grid"/>\n <w:basedOn w:val="TableNormal"/>\n <w:uiPriority w:val="39"/>\n <w:rsid w:val="000164E0"/>\n <w:tblPr>\n <w:tblBorders>\n <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>\n <w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>\n <w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>\n <w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>\n <w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>\n <w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>\n </w:tblBorders>\n </w:tblPr>\n </w:style>\n',Ut=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"template",value:function(){return"<w:t></w:t>"}},{key:"update",value:function(t){this.apply(t);var e=this.node.parent().closest("[xxid]");e.length&&this.file.renderChanged(e)}},{key:"children",value:function(t){this.node.text(t),(t.startsWith(" ")||t.endsWith(" "))&&this.node.attr("xml:space","preserve")}},{key:"got",value:function(t){return l()(m()(e.prototype),"got",this).call(this,t,"w:r","w:rPr")}},{key:"split",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.node.text();if((t=t<0?n.length+t:t)>=n.length||0==t)return[{id:this.node.attr("xxid"),at:t},{id:this.node.attr("xxid"),at:t}];this.node.text(n.substring(0,t));var r,i=this.node.closest("w\\:r"),a=i.clone();return a.find("w\\:t").remove(),a=a.append(this.node.clone().text(n.substring(t))).insertAfter(i),(r=e?a:i).removeAttr("xxid"),r.find("[xxid]").removeAttr("xxid"),this.file.renderChanged(i.parent().closest("[xxid]")),[{id:this.node.attr("xxid"),at:t},{id:a.find("w\\:t").attr("xxid"),at:0}]}},{key:"remove",value:function(){this.node.remove()}},{key:"fonts",value:function(t){this.got("w:rFonts").attr("w:ascii",t)}},{key:"size",value:function(t){this.got("w:sz").attr("w:val",2*parseInt(t)),this.got("w:szCs").attr("w:val",2*parseInt(t))}},{key:"bold",value:function(t){this._toggle("w:b",t)}},{key:"italic",value:function(t){this._toggle("w:i",t)}},{key:"vanish",value:function(t){this._toggle("w:vanish",t)}},{key:"color",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"w:color",r=this.got(n);t?r.attr("w:val",t):r.remove()}},{key:"highlight",value:function(t,e){this.color(t,e,"w:highlight")}},{key:"border",value:function(){var t=this.got("w:bdr");t.attr("w:val")?t.remove():t.replaceWith('<w:bdr w:val="single" w:sz="4" w:space="0" w:color="auto"/>')}},{key:"underline",value:function(t){var e=this.got("w:u");t?e.attr("w:val",t):e.remove()}},{key:"strike",value:function(t){this._toggle("w:strike",t)}},{key:"tab",value:function(t){t.shiftKey,t.at}},{key:"_toggle",value:function(t,e){var n=this.got(t);e?n.attr("w:val","1"):n.remove()}},{key:"_clear",value:function(){this.node.closest("w\\:r").children("w\\:rPr").remove()}}]),e}(Ht),Xt=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"got",value:function(t){return this.node.children(t.replace(":","\\:"))}},{key:"cols",value:function(t){t.length>1&&1==new Set(t).size&&(t=[t.length]),1==t.length&&1==t[0]&&(t=[]);var e=this.got("w:cols");switch(t.length){case 0:e.removeAttr("w:num").removeAttr("w:equalWidth").children().remove();break;case 1:e.attr("w:num",t[0]).attr("w:space",720).children().remove();break;default:e.empty(),e.attr("w:equalWidth","0"),e.attr("w:num",t.length);var n=parseInt(this.node.children("w\\:pgSz").attr("w:w")),r=this.node.children("w\\:pgMar")[0].attribs,i=r["w:left"],a=r["w:right"],o=r.left,l=void 0===o?parseInt(i):o,s=r.right,c=(n-(void 0===s?parseInt(a):s)-l-720*(t.length-1))/t.reduce((function(t,e){return t+e}),0);e.append(t.map((function(t){return'<w:col w:w="'.concat(parseInt(c*t),'" w:space="').concat(720,'"/>')}))),e.children().last().removeAttr("w:space")}}},{key:"size",value:function(t){var e=t.width,n=t.height;this.got("w:pgSz").attr("w:w",this.file.cm2dxa(e)).attr("w:h",this.file.cm2dxa(n))}},{key:"margin",value:function(t){var e=i()(t,4),n=e[0],r=e[1],a=void 0===r?n:r,o=e[2],l=void 0===o?n:o,s=e[3],c=void 0===s?a:s;this.got("w:pgMar").attr("w:top",this.file.cm2dxa(n)).attr("w:right",this.file.cm2dxa(a)).attr("w:bottom",this.file.cm2dxa(l)).attr("w:left",this.file.cm2dxa(c))}},{key:"orientation",value:function(t){var e=this.got("w:pgSz"),n=e[0].attribs,r=n["w:w"],i=n["w:h"];if(parseInt(r)<parseInt(i)&&"landscape"==t||parseInt(r)>parseInt(i)&&"portrait"==t){"portrait"==t?e.removeAttr("w:orient"):e.attr("w:orient",t),e.attr("w:h",r).attr("w:w",i);var a=this.got("w:pgMar"),o=a[0].attribs,l=o["w:top"],s=o["w:bottom"],c=o["w:left"],u=o["w:right"];a.attr("w:top",u).attr("w:right",s).attr("w:bottom",c).attr("w:left",l)}}},{key:"template",value:function(t){return'\n\t\t<w:p>\n\t\t\t<w:pPr>\n\t\t\t\t<w:sectPr w:rsidR="002C1430">\n\t\t\t\t\t<w:pgSz w:w="12240" w:h="15840"/>\n\t\t\t\t\t<w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="708" w:footer="708" w:gutter="0"/>\n\t\t\t\t\t<w:cols w:space="708"/>\n\t\t\t\t\t<w:docGrid w:linePitch="360"/>\n\t\t\t\t</w:sectPr>\n\t\t\t</w:pPr>\n\t\t</w:p>\n\t\t'}}]),e}(Ht),Qt=function t(){h()(this,t)};x()(Qt,"Template",(function(t,e){return'\n <w:num w:numId="'.concat(t,'">\n <w:abstractNumId w:val="').concat(e,'"/>\n </w:num>\n ')})),x()(Qt,"Numeric",(function(t){return'\n <w:abstractNum w:abstractNumId="'.concat(t,'" w15:restartNumberingAfterBreak="0">\n <w:nsid w:val="4EB77DE4"/>\n <w:multiLevelType w:val="hybridMultilevel"/>\n <w:tmpl w:val="DE9ED1E8"/>\n <w:lvl w:ilvl="0" w:tplc="8250C364">\n <w:start w:val="1"/>\n <w:numFmt w:val="decimal"/>\n <w:lvlText w:val="%1."/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="720" w:hanging="360"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="1" w:tplc="04090019" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="lowerLetter"/>\n <w:lvlText w:val="%2."/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="1440" w:hanging="360"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="2" w:tplc="0409001B" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="lowerRoman"/>\n <w:lvlText w:val="%3."/>\n <w:lvlJc w:val="right"/>\n <w:pPr>\n <w:ind w:left="2160" w:hanging="180"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="3" w:tplc="0409000F" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="decimal"/>\n <w:lvlText w:val="%4."/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="2880" w:hanging="360"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="4" w:tplc="04090019" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="lowerLetter"/>\n <w:lvlText w:val="%5."/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="3600" w:hanging="360"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="5" w:tplc="0409001B" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="lowerRoman"/>\n <w:lvlText w:val="%6."/>\n <w:lvlJc w:val="right"/>\n <w:pPr>\n <w:ind w:left="4320" w:hanging="180"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="6" w:tplc="0409000F" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="decimal"/>\n <w:lvlText w:val="%7."/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="5040" w:hanging="360"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="7" w:tplc="04090019" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="lowerLetter"/>\n <w:lvlText w:val="%8."/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="5760" w:hanging="360"/>\n </w:pPr>\n </w:lvl>\n <w:lvl w:ilvl="8" w:tplc="0409001B" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="lowerRoman"/>\n <w:lvlText w:val="%9."/>\n <w:lvlJc w:val="right"/>\n <w:pPr>\n <w:ind w:left="6480" w:hanging="180"/>\n </w:pPr>\n </w:lvl>\n </w:abstractNum>\n ')})),x()(Qt,"Bullet",(function(t){return'\n <w:abstractNum w:abstractNumId="'.concat(t,'" w15:restartNumberingAfterBreak="0">\n <w:nsid w:val="75004FB5"/>\n <w:multiLevelType w:val="hybridMultilevel"/>\n <w:tmpl w:val="760C20E4"/>\n <w:lvl w:ilvl="0" w:tplc="04090003">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val="o"/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="720" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="1" w:tplc="04090003" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val="o"/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="1440" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="2" w:tplc="04090005" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val=""/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="2160" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="3" w:tplc="04090001" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val=""/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="2880" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="4" w:tplc="04090003" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val="o"/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="3600" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="5" w:tplc="04090005" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val=""/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="4320" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="6" w:tplc="04090001" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val=""/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="5040" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="7" w:tplc="04090003" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val="o"/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="5760" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Courier New" w:hAnsi="Courier New" w:cs="Courier New" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n <w:lvl w:ilvl="8" w:tplc="04090005" w:tentative="1">\n <w:start w:val="1"/>\n <w:numFmt w:val="bullet"/>\n <w:lvlText w:val=""/>\n <w:lvlJc w:val="left"/>\n <w:pPr>\n <w:ind w:left="6480" w:hanging="360"/>\n </w:pPr>\n <w:rPr>\n <w:rFonts w:ascii="Wingdings" w:hAnsi="Wingdings" w:hint="default"/>\n </w:rPr>\n </w:lvl>\n </w:abstractNum>\n ')}));var Yt=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"got",value:function(t){return l()(m()(e.prototype),"got",this).call(this,t,"w:p","w:pPr")}},{key:"align",value:function(t){this.got("w:jc").attr("w:val",t)}},{key:"numbering",value:function(t){var e=this,n=this.got("w:numPr");if(t){this.file.doc.officeDocument.numbering||this.file.doc.officeDocument.addNumberingPart(),this.makeStyleReady();var r=this.file.doc.officeDocument.numbering,i=function(t){return{numId:t.children("w\\:numId").attr("w:val"),level:parseInt(t.children("w\\:ilvl").attr("w:val")||0)}},a=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r('w\\:num[w\\:numId="'.concat(t,'"]>w\\:abstractNumId')).attr("w:val");return r('w\\:abstractNum[w\\:abstractNumId="'.concat(n,'"]>w\\:lvl[w\\:ilvl="').concat(e,'"]'))};if(!(n.children("w\\:numId").length>0)){var o=this.node.prev("w\\:p:has(w\\:numPr>w\\:numId)");if(1==o.length){var l=i(o.children("w\\:pPr").children("w\\:numPr"));if(function(t,e){var n=t.type,r=t.text,i=e.numId,o=e.level,l=a(i,o);return!!l.is(':has(w\\:numFmt[w\\:val="'.concat(n,'"])'))&&(!r||l.is(':has(w\\:lvlText[w\\:val="'.concat(r,'"])')))}(t,l))return n.append('<w:ilvl w:val="'.concat(l.level,'"/>')),void n.append('<w:numId w:val="'.concat(l.numId,'"/>'))}var s=r("w\\:abstractNum"),c=Math.max.apply(Math,[-1].concat(s.map((function(t,e){return parseInt(e.attribs["w:abstractNumId"])})).get()))+1,u=r(this.trim(Qt["bullet"==t.type?"Bullet":"Numeric"](c)));s.length>0?u.insertAfter(s.last()):u.appendTo(r("w\\:numbering"));var h=Math.max.apply(Math,[-1].concat(r("w\\:num").map((function(t,e){return parseInt(e.attribs["w:numId"])})).get()))+1;r(this.trim(Qt.Template(h,c))).appendTo(r("w\\:numbering"));n.append('<w:ilvl w:val="'.concat(0,'"/>')),n.append('<w:numId w:val="'.concat(h,'"/>')),this.file.renderChanged(r('w\\:num[w\\:numId="'.concat(h,'"]')))}!function(t,n){var i=t.type,o=t.text,l=t.start,s=t.indent,c=t.hanging,u=t.font,h=(t.tabs,n.numId),f=n.level,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a(h,f);null!=i&&p.find("w\\:numFmt").attr("w:val",i),null!=o&&p.find("w\\:lvlText").attr("w:val",o),null!=l&&p.find("w\\:start").attr("w:val",l),null!=s&&p.find("w\\:pPr>w\\:ind").attr("w:left",s),null!=c&&p.find("w\\:pPr>w\\:ind").attr("w:hanging",c),null!=u&&p.find("w\\:rPr>w\\:rFonts").attr("w:ascii",u).attr("w:hAnsi",u),e.file.renderChanged(r('w\\:abstractNum[w\\:abstractNumId="'.concat(p.closest("w\\:abstractNum").attr("w:abstractNumId"),'"]')))}(t,i(n))}else n.remove()}},{key:"numDemote",value:function(){var t=this.got("w:numPr"),e=t.children("w\\:numId").attr("w:val"),n=!this.node.prev().is('w\\:p:has(w\\:numPr>w\\:numId[w\\:val="'.concat(e,'"])')),r=this.file.doc.officeDocument.numbering,i=r('w\\:num[w\\:numId="'.concat(e,'"]>w\\:abstractNumId')).attr("w:val"),a=r('w\\:abstractNum[w\\:abstractNumId="'.concat(i,'"]')),o=a.find("w\\:lvl");if(n){var l=o.length;new Array(o.length-1).fill(0).forEach((function(t,e){return o.eq(e).find("w\\:ind").replaceWith(o.eq(e+1).find("w\\:ind").clone())}));var s=o.eq(l-1).find("w\\:ind");s.attr("w:left",String(parseInt(s.attr("w:left"))+2*parseInt(s.attr("w:hanging")))),this.file.renderChanged(a)}else{var c=t.children("w\\:ilvl"),u=parseInt(c.attr("w:val"));if(u<8&&c.attr("w:val",String(u+1)),o.length-1<u+1){var h=o.eq(0).find("w\\:numFmt").attr("w:val");r(this.trim(Qt["bullet"==h?"Bullet":"Numeric"](i))).find("w\\:lvl").slice(u+1).insertAfter(o.last()),a.find("w\\:multiLevelType").attr("w:val","hybridMultilevel"),this.file.renderChanged(a)}}}},{key:"numPromote",value:function(){var t=this.got("w:numPr"),e=t.children("w\\:numId").attr("w:val");if(!this.node.prev().is('w\\:p:has(w\\:numPr>w\\:numId[w\\:val="'.concat(e,'"])'))){var n=this.file.doc.officeDocument.numbering,r=n('w\\:num[w\\:numId="'.concat(e,'"]>w\\:abstractNumId')).attr("w:val"),i=n('w\\:abstractNum[w\\:abstractNumId="'.concat(r,'"]')),a=i.find("w\\:lvl w\\:ind"),o=a.eq(0),l=parseInt(o.attr("w:hanging"));parseInt(o.attr("w:left"))!=l&&(a.each((function(t,e){e.attribs["w:left"]=String(parseInt(e.attribs["w:left"])-l)})),o.attr("w:left",String(l))),this.file.renderChanged(i)}else{var s=t.children("w\\:ilvl"),c=parseInt(s.attr("w:val"));c>0&&s.attr("w:val",String(c-1))}}},{key:"tab",value:function(t){var e=t.shiftKey;if(this.node.is(":has(w\\:numPr)"))this["num".concat(e?"Pro":"De","mote")]();else{var n=parseInt((/^Heading(\d)$/.exec(this.node.find("w\\:pStyle").attr("w:val"))||[])[1])||0;if(n)!e&&n<9?this.node.find("w\\:pStyle").attr("w:val","Heading".concat(n+1)):e&&n>1&&this.node.find("w\\:pStyle").attr("w:val","Heading".concat(n-1));else{var r=this.got("w:ind"),i=parseInt(r.attr("w:left"))||0;r.attr("w:left",String(e?Math.max(0,i-360):i+360))}}}},{key:"indent",value:function(t){var e=t.left,n=t.right,r=t.firstLine,i=this.got("w:ind");null!=e&&i.attr("w:left",this.file.px2dxa(e)||null),null!=n&&i.attr("w:right",this.file.px2dxa(n)||null),null!=r&&(r>0?(i.attr("w:firstLine",this.file.px2dxa(Math.abs(r))||null),i.attr("w:hanging",null)):r<0&&(i.attr("w:hanging",this.file.px2dxa(Math.abs(r))||null),i.attr("w:firstLine",null)))}},{key:"makeStyleReady",value:function(){var t=this.file.doc.officeDocument.styles;if(0==t('w\\:style[w\\:styleId="NoList"]').length){var e=t(this.trim(Zt)).insertAfter(t('w\\:style[w\\:default="1"]').last());this.file.renderChanged(e)}}}]),e}(Ht),Zt='\n\t<w:style w:type="numbering" w:default="1" w:styleId="NoList">\n <w:name w:val="No List"/>\n <w:uiPriority w:val="99"/>\n <w:semiHidden/>\n <w:unhideWhenUsed/>\n\t</w:style>\n',Kt={create_table_at_end_of_up_to_document:function(){var t=this.target.closest("w\\:p"),e=t.clone();e.children(":not(".concat(this.PR,")")).remove(),e.append("<w:r><w:t/></w:r>"),t.after(e);var n=this.file.renderChanged(e);this.$target.closest("paragraph").after("#"+n.id),this.create.apply(this,arguments)},create_table_at_beginning_of_paragraph:function(){var t=new Wt(this.file);t.create.apply(t,arguments),this.target.before(t.node);var e=this.file.renderChanged(t.node),n=e.id;this.$target.before("#"+n),this.cursorAt(this.$("#"+n).first("text").attr("id"),0)},create_table_at_end_of_paragraph:function(){var t=new Wt(this.file);t.create.apply(t,arguments),this.target.after(t.node);var e=this.file.renderChanged(t.node),n=e.id;this.$target.after("#"+n),this.cursorAt(this.$("#"+n).first("text").attr("id"),0)},create_image_at_text:function(){this.seperate_at_text_for_end(),this.seperate_up_to_run_at_end_of_text(),this.cursorAt(this.$target.parent().attr("id"),1),this.create.apply(this,arguments)},create_image_at_beginning_of_up_to_run:function(){this.cursorAt(this.$target.closest("run").attr("id"),0),this.create.apply(this,arguments)},create_image_at_end_of_up_to_run:function(){this.cursorAt(this.$target.closest("run").attr("id"),1),this.create.apply(this,arguments)},create_image_at_beginning_of_run:function(){var t=new Vt(this.file);t.create.apply(t,arguments),this.target.before("<w:r/>");var e=this.target.prev();e.append(t.node);var n=this.file.renderChanged(e),r=n.id;this.$target.before("#"+r),this.cursorAt(this.$("#"+r).first().attr("id"),0)},create_image_at_end_of_run:function(){var t=new Vt(this.file);t.create.apply(t,arguments),this.target.after("<w:r/>");var e=this.target.next();e.append(t.node);var n=this.file.renderChanged(e),r=n.id;this.$target.after("#"+r),this.cursorAt(this.$("#"+r).first().attr("id"),0)},create_image_at_empty_run:function(){var t=new Vt(this.file);t.create.apply(t,arguments);var e=this.target;e.append(t.node);var n=this.file.renderChanged(e),r=n.id;this.$target.after("#"+r),this.cursorAt(this.$("#"+r).first().attr("id"),0)},create_image_at_empty_paragraph:function(){this.target.append("<w:r/>"),this.file.renderChanged(this.target),this.cursorAt(this.$target.children("run").attr("id"),0),this.create.apply(this,arguments)},create_row:function(t){var e=t.where,n=this.$target.closest("row");if(0!=n.length){var r=this.file.getNode(n.attr("id")),i=this.file.getNode(n.closest("table").attr("id")),a=i.first("w\\:tblGrid").find("w\\:gridCol"),o=new Wt(this.file);o.node=i;var l=new Array(a.length).fill(0).map((function(t,e){return o.template_tc(t)})),s=this.file.$("<w:tr>"+l.join("")+"</w:tr>");s["insert".concat(e[0].toUpperCase()).concat(e.substring(1))](r);var c=this.file.renderChanged(s);n[e]("#".concat(c.id)),this.selectWhole(c.id)}},create_column:function(t){var e=t.where,n=this.$target.closest("cell");if(0!=n.length){for(var r=n.closest("row"),i=r.closest("table"),a=r.find("cell").indexOf(n),o=this.file.getNode(i.attr("id")),l=o.first("w\\:tblGrid").find("w\\:gridCol"),s=l.length,c=l.toArray().reduce((function(t,e){return t+parseInt(e.attribs["w:w"])}),0),u=s/(s+1),h=0;h<s;h++){var f=l.eq(h),p=parseInt(parseInt(f.attr("w:w"))*u);f.attr("w:w",p),c-=p}l.eq(a)[e](l.eq(a).clone().attr("w:w",c));var d=o.find("w\\:tr"),w=new Wt(this.file);w.node=o;for(var v=0;v<d.length;v++)d.eq(v).find("w\\:tc").eq(a)[e](w.template_tc(c));this.file.renderChanged(o)}},create_section:function(t){var e=t.kind;this.enter();var n=this.$target.closest("paragraph"),r=this.$target.closest("section"),i=this.file.getNode(r.attr("id")),a=new Yt(this.file);a.node=this.file.getNode(n.attr("id"));var o=i.clone();o.appendTo(a.got("w:pPr")),e&&o.prepend('<w:type w:val="'.concat(e,'"/>'));var l=this.file.renderChanged(o),s=this.$("#".concat(l.id));r.after(s),s.append(n.nextAll()),s.prepend(n)},create_pagebreak:function(){this.enter();var t=this.$target.closest("paragraph").prev("paragraph"),e=this.file.getNode(t.attr("id")),n=this.file.$('<w:r><w:br w:type="page"/></w:r>').appendTo(e),r=this.file.renderChanged(n);t.append("#".concat(r.id))},create_columnbreak:function(){this.enter();var t=this.$target.closest("paragraph").prev("paragraph"),e=this.file.getNode(t.attr("id")),n=this.file.$('<w:r><w:br w:type="column"/></w:r>').appendTo(e),r=this.file.renderChanged(n);t.append("#".concat(r.id))}},te={update_at_text:function(t){var e=this.target,n=e.closest("w\\:r"),r=e.nextAll("w\\:t"),i=e.prevAll("w\\:t"),a=!1,o=function(){a=!0;var t=n.clone();return t.children(":not(w\\:rPr)").remove(),t};r.length>0&&n.after(o().append(e.nextAll())),i.length>0&&n.before(o().append(e.prevAll())),a&&this.file.renderChanged(this.file.getNode(this.$target.parent().parent().attr("id")));var l=new Ut(this.file);l.node=this.target,l.update(t)},update_at_paragraph:function(t){var e=new Yt(this.file);e.node=this.target,e.update(t)},update_at_image:function(t){var e=new Vt(this.file);e.node=this.target,e.update(t)},update_at_table:function(t){var e=new Wt(this.file);e.node=this.target,e.update(t)},update_at_section:function(t){var e=new Xt(this.file);e.node=this.target,e.update(t)}},ee={},ne={type_at_beginning_of_text_in_run:function(){this.type_at_text.apply(this,arguments)},type_at_empty_run:function(t){this.file.renderChanged(this.target.append("<w:t>".concat(t,"</w:t>"))),this.cursorAt(this.$target.children("text").attr("id"),t.length)},type_at_empty_paragraph:function(t){this.target.children(":not(".concat(this.PR,")")).remove(),this.$target.children().remove(),this.file.renderChanged(this.target.append("<w:r><w:t>".concat(t,"</w:t></w:r>"))),this.cursorAt(this.$target.find("text").attr("id"),t.length)},type_at_beginning_of_run:function(t){var e=this.target.closest("w\\:r"),n=e.clone();n.children(":not(w\\:rPr)").remove(),n.append("<w:t>".concat(t,"</w:t>")),e.before(n);var r=this.file.renderChanged(n);this.$target.closest("run").before("#".concat(r.id)),this.cursorAt(this.$("#".concat(r.id," text")).attr("id"),t.length)},type_at_beginning_of_up_to_run:function(){this.type_at_beginning_of_run.apply(this,arguments)},type_at_beginning_of_paragraph:function(t){this.file.renderChanged(this.target.afterOrPrepend("<w:r><w:t>".concat(t,"</w:t></w:r>"),"w\\:pPr")),this.cursorAt(this.$target.find("text").first().attr("id"),t.length)},type_at_end_of_run:function(t){this.file.renderChanged(this.target.append("<w:t>".concat(t,"</w:t>"))),this.cursorAt(this.$target.children("text").last().attr("id"),t.length)},type_at_end_of_paragraph:function(t){this.file.renderChanged(this.target.append("<w:r><w:t>".concat(t,"</w:t></w:r>"))),this.cursorAt(this.$target.find("text").last().attr("id"),t.length)}},re={paragraphHasIndentSetting:function(){return this.target.closest(this.PARAGRAPH_).children(this.PR).find("w\\:ind").length>0},backspace_at_beginning_of_up_to_numbering_paragraph:function(){var t=this.target.closest("w\\:p"),e=t.children("w\\:pPr"),n=e.find("w\\:numPr");n.length>0?(n.remove(),this.file.renderChanged(t)):this.file.doc.officeDocument.styles('w\\:style[w\\:styleId="'.concat(e.find("w\\:pStyle").attr("w:val"),'"]')).basest(":has(w\\:numPr,w\\:ind)").length>0?(e.find("w\\:pStyle").remove(),this.file.renderChanged(t)):console.error("should not be here")},backspace_at_beginning_of_up_to_indent_paragraph:function(){var t=this.target.closest("w\\:p"),e=t.children("w\\:pPr").find("w\\:ind");parseInt(e.attr("w:hanging")||0)>0||parseInt(e.attr("w:firstLine")||0)>0?(e.attr("w:hanging","0"),e.attr("w:firstLine","0")):e.remove(),this.file.renderChanged(t)},backspace_at_end_of_image:function(){var t=this.$target.closest("run").attr("id");this.cursorAt(t,0,t,1,void 0,!1),this.remove()},backspace_at_empty_run:function(){var t=this.selection.start.id;try{this.backspace_at_empty.apply(this,arguments)}finally{this.file.getNode(t).remove(),this.$("#"+t).remove()}},backspace_at_beginning_of_up_to_run:function(){this.backspace_at_beginning.apply(this,arguments)}},ie={tab_at_beginning_of_up_to_paragraph:function(t){this.update_at_paragraph({id:this.$target.closest("paragraph").attr("id"),tab:t})},tab_at_text:function(){this.seperate_at_text_for_end(),this.seperate_up_to_run_at_end_of_text();var t=this.target.closest("w\\:r"),e=this.file.$("<w:r><w:tab/></w:r>");t.after(e);var n=this.file.renderChanged(e);this.$target.closest("run").after("#".concat(n.id)),this.cursorAt(n.id,1)}},ae={paste_run_at_text:function(){this.seperate_at_text_for_end(),this.seperate_up_to_run_at_end_of_text(),this.paste_run_at_end_of_run.apply(this,arguments)},paste_run_at_end_of_run:function(t,e){this.$target.closest("run").after(t),this.target.closest("w\\:r").after(e),this.cursorAtEnd(t.attr("id"))},paste_run_at_empty_paragraph:function(t,e){this.$target.append(t),this.target.append(e),this.cursorAtEnd(t.attr("id"))}},oe={serialize_at_text:function(){var t=this.selection,e=t.start,n=t.end,r=this.$target.text(),i=this.file.getNode(this.$target.closest("run").attr("id")).clone();return i.find("w\\:t").remove(),i.append("<w:t>".concat(r.substring(e.at,n.at),"</w:t>")),this.file.serialize(i)},serialize_at_whole_text:function(){if(1==this.$target.parent().children().length)return this.extend("run"),this.emit("serialize",this.conds);var t=this.$target.text(),e=this.file.getNode(this.$target.closest("run").attr("id")).clone();return e.find("w\\:t").remove(),e.append("<w:t>".concat(t,"</w:t>")),this.file.serialize(e)},serialize_at_whole:function(){return this.file.serialize(this.$target.attr("id"))}},le={remove_column:function(){var t=this.$target.closest("cell");if(0!=t.length){var e=t.closest("row"),n=e.find("cell");if(1==n.length)return this.remove_table();for(var r=n.indexOf(t),i=this.file.getNode(t.closest("table").attr("id")),a=i.first("w\\:tblGrid").find("w\\:gridCol"),o=a.length,l=(a.toArray().reduce((function(t,e){return t+parseInt(e.attribs["w:w"])}),0),o/(o-1)),s=0;s<o;s++){var c=a.eq(s),u=parseInt(parseInt(c.attr("w:w"))*l);c.attr("w:w",u),u}a.eq(r).remove();for(var h=i.find("w\\:tr"),f=0;f<h.length;f++)h.eq(f).find("w\\:tc").eq(r).remove();this.file.renderChanged(i);var p=(n=e.find("cell")).eq(r).attr("id")||n.eq(r-1).attr("id");p&&this.cursorAt(p,0)}}},se=function(t){function e(){var t;return h()(this,e),(t=w()(this,m()(e).apply(this,arguments))).debug=!0,t.PR="w\\:rPr,w\\:pPr,w\\:tblPr,w\\:sdtPr,w\\:tcPr,w\\:trPr",t.PARAGRAPH="w:p",t.TEXT="w:t",t.InlineContainers="w\\:r, w\\:sdt",Object.assign(rt()(t),Mt,Kt,te,ee,ne,re,ie,ae,oe,le),t}return y()(e,t),p()(e,[{key:"create_first_paragraph",value:function(){var t=this.file.$("w\\:body").prepend("<w:p><w:r><w:t/></w:r></w:p>"),e=this.file.renderChanged(t.children().first());this.$().findFirst("section").prepend("#".concat(e.id)),this.cursorAt(e.id,0)}},{key:"clean",value:function(){var t=this;l()(m()(e.prototype),"clean",this).call(this,(function(){t.$target.closest("paragraph").find("run").filter((function(e){return 0==t.$(e).findFirst(t.cursorable).length})).each((function(e,n){t.$(n).remove(),t.file.getNode(n.get("id")).remove()}))}))}},{key:"cursorable",value:function(t){if(l()(m()(e.prototype),"cursorable",this).call(this,t))return!this.InlineContainers||(!this.file.getNode(t.get("id")).is(this.InlineContainers)||void 0)}}]),e}(k.Input.Editable.EventHandler.xml);function ce(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ue(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ce(n,!0).forEach((function(e){x()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ce(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}n.d(e,"default",(function(){return fe}));var he=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"parse",value:function(t){var e=t.data,n=c()(t,["data"]);return this.props=n,A.load(e)}},{key:"release",value:function(){this.doc.release()}},{key:"stream",value:function(t){var e=this.doc.serialize(t).generate(ue({},t,{type:"nodebuffer",mimeType:this.doc.mime})),n=new P.Readable({objectMode:!0});return n.push(e),n}},{key:"style",value:function(t,e){var n=function(t,e){return t.reduce((function(t,n){return t[n]=e,t}),{})};return t.$(e).props(ue({tidy_pPrDefault:function(t){return t.pPr}},n("keepNext,keepLines,contextualSpacing,cantSplit".split(","),(function(){return!0})),{tidy_outlineLvl:function(t){var e=t.val;return parseInt(e)}},n("w,h,space,trHeight".split(","),(function(e){return t.doc.dxa2Px(e)})),{titlePg:function(t){return"false"!=t["w:val"]},widowControl:function(t){return"0"!=t["w:val"]},cnfStyle:function(t){var e=t["w:val"];return parseInt(e,2)},ind:function(e){return function(t,e){var n=t.attribs;return Object.keys(n).reduce((function(t,r){return t[r.split(":").pop()]=e(n[r]),t}),{})}(e,(function(e){return t.doc.dxa2Px(e)}))}},n("jc,tblStyleColBandSize,tblStyleRowBandSize".split(","),(function(t){return t["w:val"]})),{tidy_rPrDefault:function(t){return t.rPr}},n("ascii,eastAsia,hAnsi,cs".split(",").map((function(t){return t+"Theme"})),(function(e){return t.theme.fontx(e)})),{},n("sz,szCs,kern".split(",").map((function(t){return"tidy_"+t})),(function(t){var e=t.val;return parseInt(e)/2})),{tidy_rFonts:function(t){return[t.ascii,t.eastAsia,t.hAnsi,t.cs].filter((function(t){return t})).join(",")},themeColor:function(e){return t.theme.colorx(e)},tidy_color:function(e){var n,r=e.themeColor,i=e.val,a=c()(e,["themeColor","val"]);return(n=t.doc).asColor.apply(n,[i||r].concat(a))}},n("beforeLines,before,afterLines,after".split(","),(function(e){return t.doc.dxa2Px(e)})),{tidy_spacing:function(e){var n=e.beforeAutospacing,r=e.beforeLines,i=e.before,a=e.afterAutospacing,o=e.afterLines,l=e.after,s=e.line,u=e.lineRule,h=e.val,f=c()(e,["beforeAutospacing","beforeLines","before","afterAutospacing","afterLines","after","line","lineRule","val"]);if(null!=h)return h;if(f.top=!n&&r||i,f.bottom=!a&&o||l,s)switch(u){case"atLeast":case"exact":f.line=t.doc.dxa2Px(s);break;default:f.line=100*parseInt(s)/240}return f}},n("basedOn,name,link".split(",").map((function(t){return"tidy_"+t})),(function(t){return t.val})),{names:{asciiTheme:"ascii",eastAsiaTheme:"eastAsia",hAnsiTheme:"hAnsi",themeShade:"shade",rFonts:"fonts",rPrDefault:"rPr",pPrDefault:"pPr",w:"width",h:"height"}}))}},{key:"render",value:function(t,e){var n=this,r=this,i=this.doc.constructor.OfficeDocument.identify.bind(this.doc.constructor.OfficeDocument),a=this.doc,o=new pt.Properties(a,1),l=a.officeDocument,s=(l.content,l.settings),u=new(function(){return function t(){h()(this,t)}}()),f=function(){return null},p=function(t){return function(n,i,l){var h=i.node,f=(i.key,i.type,c()(i,["node","key","type"]));switch(l=l.reduce((function(t,e){return Array.isArray(e)?t.splice.apply(t,[t.length,0].concat(e)):t.push(e),t}),[]),n){case"style":var p=null;if(f.id){var d=h.attribs["w:type"];switch(d){case"paragraph":p=new pt.Paragraph(h,u,o);break;case"character":p=new pt.Character(h,u,o);break;case"numbering":p=new pt.Numbering(h,u,o);break;case"table":p=new pt.Table(h,u,o)}"1"==h.attribs["w:default"]&&(u["*".concat(d)]=p)}else p=new pt.Default(h,u,o);return p?(u[p.id]=p,null):null;case"num":var v=new pt.Num(h,u,o);return u[v.id]=v,null;case"abstractNum":var m=new pt.AbstractNum(h,u,o);return u[m.id]=m,null;case"document":var g=s("w\\:evenAndOddHeaders").length>0;return t(e.Document,ue({},o.select(h.children.filter((function(t){return"w:body"!=t.name}))),{evenAndOddHeaders:g,precision:1,styles:u}),l,h);case"section":var y=o.select(h.children),b=function(n){return h.children.filter((function(t){return t.name=="w:".concat(n,"Reference")})).reduce((function(i,o){var s=o.attribs["w:type"],c=o.attribs["r:id"],u=a.officeDocument.getRel(c).root().children().get(0);return function(t){if(1==t.children.length){var e=t.children[0];if(!e.children||0==e.children.length||1==e.children.length&&"w:p"==e.name&&"w:pPr"==e.children[0].name)return!0}return!1}(u)||(r.part=c,l.splice(0,0,t(e.Container,{named:"".concat(n,".").concat(s),type:"".concat(n,".").concat(s)},u.children.map((function(t){return w(t)})),u)),delete r.part),i}),{})};return b("header"),b("footer"),t(e.Section,y,l,h);case"tbl":var x=o.select([h.children.find((function(t){return"w:tblGrid"==t.name}))]).tblGrid,k=f.pr?new pt.Table.Direct(f.pr,u,o):u["*table"];return t(e.Table,{cols:x,style:k},l,h);case"tr":var P=f.pr?new pt.Table.Direct(f.pr,u,o):void 0;return t(e.Row,{style:P},l,h);case"tc":var _=f.pr?new pt.Table.Direct(f.pr,u,o):void 0;return t(e.Cell,{style:_},l,h);case"list":case"heading":case"p":f.pr;var O=c()(f,["pr"]),C=f.pr?new pt.Paragraph.Direct(f.pr,u,o):u["*paragraph"];return t(e.Paragraph,ue({style:C},O),l,h);case"r":var j=f.pr?new pt.Character.Direct(f.pr,u,o):u["*character"];return t(e.Run,{style:j},l,h);case"t":return t(e.Text,{},l[0]||"",h);case"drawing.inline":return t(e.Container,{},l,h);case"drawing.anchor":var S=new pt.Anchor(h,u,o);return t(e.Anchor,S.flat(),l,h);case"picture":return t(e.Image,e.Image.asStyle(f),null,h);case"shape":var I=e.Shape.asStyle(f),A=I.textStyle,D=c()(I,["textStyle"]),T=new pt.Paragraph.Direct(void 0,u,o);return T.r=A,t(e.Shape,ue({},D,{textStyle:T}),l,h);case"bookmarkStart":case"bookmarkEnd":return null;case"inline":case"block":return t(e.Container,{},l,h);default:return 1==l.length?l[0]:l}}},d=p(t),w=function(t){return a.officeDocument.renderNode(t,d,i)},v=a.render(d);return this.renderNode=function(t,e){return d=p(e),a.officeDocument.renderNode(n._unwrap(t),d,i)},this.refreshStyles=f,this.getFontList=function(){return Array.from(o.requireFonts)},v}},{key:"renderNode",value:function(t,e){}},{key:"getFontList",value:function(){}},{key:"refreshStyles",value:function(){}},{key:"_unwrap",value:function(t){return t&&"cheerio"in t&&t.get(0)||t}}],[{key:"support",value:function(t){if(0==arguments.length)return!0;var e=t.data,n=t.name,r=t.type;return!(!n||!n.toLowerCase().endsWith("."+this.defaultProps.ext))||(!(!r||r!=this.defaultProps.mimeType)||(arguments[0]instanceof A||e instanceof A))}}]),e}(k.Input.Editable);x()(he,"defaultProps",{type:"docx",name:"Word Document",ext:"docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),x()(he,"HOCs",Bt);var fe=function(t){function e(){return h()(this,e),w()(this,m()(e).apply(this,arguments))}return y()(e,t),p()(e,[{key:"makeId",value:function(t,n){if(t=this._unwrap(t),n)return pe(t.attribs,n),n;if(t.attribs.xxid)return t.attribs.xxid;var r=n||"w:document"==t.name&&"root"||l()(m()(e.prototype),"makeId",this).call(this);return pe(t.attribs,r),this.doc.part?"".concat(r,"[").concat(this.doc.part,"]"):r}},{key:"getNode",value:function(t){var e=t.split(/[\[\]]/g),n=i()(e,2),r=n[0],a=n[1],o=null;if(1!=(o=a?this.doc.officeDocument.getRel(a)('[xxid="'.concat(r,'"]')):this.doc.officeDocument.content('[xxid="'.concat(r,'"]'))).length)throw new Error("can't find node[id=".concat(t,"]"));return o}},{key:"$",value:function(){var t;return(t=this.doc.officeDocument).content.apply(t,arguments)}},{key:"attach",value:function(t){return this.attacher.append(t).children()}},{key:"serialize",value:function(t){return"string"==typeof t?this.doc.officeDocument.content.xml(this.getNode(t)):this.doc.officeDocument.content.xml(t)}},{key:"px2dxa",value:function(t){return parseInt(72*t*20/96)}},{key:"px2cm",value:function(t){return Math.ceil(72*t/96*36e4/28.3464567)}},{key:"px2Pt",value:function(t){return 72*t/96}},{key:"dxa2Px",value:function(t){return this.pt2Px(parseInt(t)/20)}},{key:"emu2Px",value:function(t){return this.pt2Px(parseInt(t)/12700)}},{key:"pt2Px",value:function(t){return Math.ceil(96*t/72)}},{key:"cm2Px",value:function(t){return 28.3464567*parseFloat(t)/36e4*96/72}},{key:"cm2dxa",value:function(t){return parseInt(11900*parseFloat(t)/21.59)}},{key:"attacher",get:function(){return this._attacher||(this._attacher=this.doc.officeDocument.content("<w:_attacher>"),this._attacher.prependTo(this.doc.officeDocument.content("w\\:body"))),this._attacher}}]),e}(he);x()(fe,"Reducer",se);var pe=function(t,e){return Object.defineProperty(t,"xxid",{enumerable:!1,configurable:!0,writable:!1,value:e})}}]);
2//# sourceMappingURL=input-docx.js.map
\No newline at end of file