/*! * @plugin @tinymce-plugin/tp-importword * @version 0.0.3-beta.6 (2022-7-29) * @description 导入word文档 * @copyright (2022) Li Hailong . All rights reserved. https://github.com/tinymce-plugin/tp-importword */(function(){"use strict";var Ue=function(i,r){return Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])},Ue(i,r)};function be(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Ue(i,r);function e(){this.constructor=i}i.prototype=r===null?Object.create(r):(e.prototype=r.prototype,new e)}var me=function(){return me=Object.assign||function(r){for(var e,n=1,a=arguments.length;n/,""));var e=new DOMParser().parseFromString(i,"application/xml"),n=Ar(e);if(n)throw new Error(n);return e}function Ar(i){var r;return(r=i.getElementsByTagName("parsererror")[0])===null||r===void 0?void 0:r.textContent}function Er(i){return new XMLSerializer().serializeToString(i)}var er=function(){function i(){}return Object.defineProperty(i.prototype,"elements",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){e===void 0&&(e=null);for(var n=[],a=0,t=r.childNodes.length;a>2,h=(3&f)<<4|p>>4,v=1>6:64,k=2>4,p=(15&w)<<4|(h=u.indexOf(l.charAt(k++)))>>2,b=(3&h)<<6|(v=u.indexOf(l.charAt(k++))),y[d++]=f,h!==64&&(y[d++]=p),v!==64&&(y[d++]=b);return y}},{"./support":30,"./utils":32}],2:[function(e,n,a){var t=e("./external"),o=e("./stream/DataWorker"),u=e("./stream/Crc32Probe"),l=e("./stream/DataLengthProbe");function f(p,b,w,h,v){this.compressedSize=p,this.uncompressedSize=b,this.crc32=w,this.compression=h,this.compressedContent=v}f.prototype={getContentWorker:function(){var p=new o(t.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),b=this;return p.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new o(t.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},f.createWorkerFrom=function(p,b,w){return p.pipe(new u).pipe(new l("uncompressedSize")).pipe(b.compressWorker(w)).pipe(new l("compressedSize")).withStreamInfo("compression",b)},n.exports=f},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,n,a){var t=e("./stream/GenericWorker");a.STORE={magic:"\0\0",compressWorker:function(o){return new t("STORE compression")},uncompressWorker:function(){return new t("STORE decompression")}},a.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,n,a){var t=e("./utils"),o=function(){for(var u,l=[],f=0;f<256;f++){u=f;for(var p=0;p<8;p++)u=1&u?3988292384^u>>>1:u>>>1;l[f]=u}return l}();n.exports=function(u,l){return u!==void 0&&u.length?t.getTypeOf(u)!=="string"?function(f,p,b,w){var h=o,v=w+b;f^=-1;for(var k=w;k>>8^h[255&(f^p[k])];return-1^f}(0|l,u,u.length,0):function(f,p,b,w){var h=o,v=w+b;f^=-1;for(var k=w;k>>8^h[255&(f^p.charCodeAt(k))];return-1^f}(0|l,u,u.length,0):0}},{"./utils":32}],5:[function(e,n,a){a.base64=!1,a.binary=!1,a.dir=!1,a.createFolders=!0,a.date=null,a.compression=null,a.compressionOptions=null,a.comment=null,a.unixPermissions=null,a.dosPermissions=null},{}],6:[function(e,n,a){var t=null;t=typeof Promise<"u"?Promise:e("lie"),n.exports={Promise:t}},{lie:37}],7:[function(e,n,a){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),u=e("./utils"),l=e("./stream/GenericWorker"),f=t?"uint8array":"array";function p(b,w){l.call(this,"FlateWorker/"+b),this._pako=null,this._pakoAction=b,this._pakoOptions=w,this.meta={}}a.magic="\b\0",u.inherits(p,l),p.prototype.processChunk=function(b){this.meta=b.meta,this._pako===null&&this._createPako(),this._pako.push(u.transformTo(f,b.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var b=this;this._pako.onData=function(w){b.push({data:w,meta:b.meta})}},a.compressWorker=function(b){return new p("Deflate",b)},a.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,n,a){function t(h,v){var k,d="";for(k=0;k>>=8;return d}function o(h,v,k,d,m,y){var S,x,C=h.file,D=h.compression,F=y!==f.utf8encode,U=u.transformTo("string",y(C.name)),N=u.transformTo("string",f.utf8encode(C.name)),G=C.comment,Q=u.transformTo("string",y(G)),P=u.transformTo("string",f.utf8encode(G)),T=N.length!==C.name.length,c=P.length!==G.length,R="",re="",W="",te=C.dir,H=C.date,ee={crc32:0,compressedSize:0,uncompressedSize:0};v&&!k||(ee.crc32=h.crc32,ee.compressedSize=h.compressedSize,ee.uncompressedSize=h.uncompressedSize);var j=0;v&&(j|=8),F||!T&&!c||(j|=2048);var E=0,$=0;te&&(E|=16),m==="UNIX"?($=798,E|=function(V,ue){var ve=V;return V||(ve=ue?16893:33204),(65535&ve)<<16}(C.unixPermissions,te)):($=20,E|=function(V){return 63&(V||0)}(C.dosPermissions)),S=H.getUTCHours(),S<<=6,S|=H.getUTCMinutes(),S<<=5,S|=H.getUTCSeconds()/2,x=H.getUTCFullYear()-1980,x<<=4,x|=H.getUTCMonth()+1,x<<=5,x|=H.getUTCDate(),T&&(re=t(1,1)+t(p(U),4)+N,R+="up"+t(re.length,2)+re),c&&(W=t(1,1)+t(p(Q),4)+P,R+="uc"+t(W.length,2)+W);var K="";return K+=` \0`,K+=t(j,2),K+=D.magic,K+=t(S,2),K+=t(x,2),K+=t(ee.crc32,4),K+=t(ee.compressedSize,4),K+=t(ee.uncompressedSize,4),K+=t(U.length,2),K+=t(R.length,2),{fileRecord:b.LOCAL_FILE_HEADER+K+U+R,dirRecord:b.CENTRAL_FILE_HEADER+t($,2)+K+t(Q.length,2)+"\0\0\0\0"+t(E,4)+t(d,4)+U+R+Q}}var u=e("../utils"),l=e("../stream/GenericWorker"),f=e("../utf8"),p=e("../crc32"),b=e("../signature");function w(h,v,k,d){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=k,this.encodeFileName=d,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}u.inherits(w,l),w.prototype.push=function(h){var v=h.meta.percent||0,k=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,l.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:k?(v+100*(k-d-1))/k:100}}))},w.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var v=this.streamFiles&&!h.file.dir;if(v){var k=o(h,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:k.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(h){this.accumulate=!1;var v=this.streamFiles&&!h.file.dir,k=o(h,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(k.dirRecord),v)this.push({data:function(d){return b.DATA_DESCRIPTOR+t(d.crc32,4)+t(d.compressedSize,4)+t(d.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:k.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var h=this.bytesWritten,v=0;v=this.index;l--)f=(f<<8)+this.byteAt(l);return this.index+=u,f},readString:function(u){return t.transformTo("string",this.readData(u))},readData:function(u){},lastIndexOfSignature:function(u){},readAndCheckSignature:function(u){},readDate:function(){var u=this.readInt(4);return new Date(Date.UTC(1980+(u>>25&127),(u>>21&15)-1,u>>16&31,u>>11&31,u>>5&63,(31&u)<<1))}},n.exports=o},{"../utils":32}],19:[function(e,n,a){var t=e("./Uint8ArrayReader");function o(u){t.call(this,u)}e("../utils").inherits(o,t),o.prototype.readData=function(u){this.checkOffset(u);var l=this.data.slice(this.zero+this.index,this.zero+this.index+u);return this.index+=u,l},n.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,n,a){var t=e("./DataReader");function o(u){t.call(this,u)}e("../utils").inherits(o,t),o.prototype.byteAt=function(u){return this.data.charCodeAt(this.zero+u)},o.prototype.lastIndexOfSignature=function(u){return this.data.lastIndexOf(u)-this.zero},o.prototype.readAndCheckSignature=function(u){return u===this.readData(4)},o.prototype.readData=function(u){this.checkOffset(u);var l=this.data.slice(this.zero+this.index,this.zero+this.index+u);return this.index+=u,l},n.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,n,a){var t=e("./ArrayReader");function o(u){t.call(this,u)}e("../utils").inherits(o,t),o.prototype.readData=function(u){if(this.checkOffset(u),u===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+u);return this.index+=u,l},n.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,n,a){var t=e("../utils"),o=e("../support"),u=e("./ArrayReader"),l=e("./StringReader"),f=e("./NodeBufferReader"),p=e("./Uint8ArrayReader");n.exports=function(b){var w=t.getTypeOf(b);return t.checkSupport(w),w!=="string"||o.uint8array?w==="nodebuffer"?new f(b):o.uint8array?new p(t.transformTo("uint8array",b)):new u(t.transformTo("array",b)):new l(b)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,n,a){a.LOCAL_FILE_HEADER="PK",a.CENTRAL_FILE_HEADER="PK",a.CENTRAL_DIRECTORY_END="PK",a.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",a.ZIP64_CENTRAL_DIRECTORY_END="PK",a.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,n,a){var t=e("./GenericWorker"),o=e("../utils");function u(l){t.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(u,t),u.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},n.exports=u},{"../utils":32,"./GenericWorker":28}],25:[function(e,n,a){var t=e("./GenericWorker"),o=e("../crc32");function u(){t.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(u,t),u.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=u},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,n,a){var t=e("../utils"),o=e("./GenericWorker");function u(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}t.inherits(u,o),u.prototype.processChunk=function(l){if(l){var f=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=f+l.data.length}o.prototype.processChunk.call(this,l)},n.exports=u},{"../utils":32,"./GenericWorker":28}],27:[function(e,n,a){var t=e("../utils"),o=e("./GenericWorker");function u(l){o.call(this,"DataWorker");var f=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(p){f.dataIsReady=!0,f.data=p,f.max=p&&p.length||0,f.type=t.getTypeOf(p),f.isPaused||f._tickAndRepeat()},function(p){f.error(p)})}t.inherits(u,o),u.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,t.delay(this._tickAndRepeat,[],this)),!0)},u.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(t.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},u.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,f=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,f);break;case"uint8array":l=this.data.subarray(this.index,f);break;case"array":case"nodebuffer":l=this.data.slice(this.index,f)}return this.index=f,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=u},{"../utils":32,"./GenericWorker":28}],28:[function(e,n,a){function t(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}t.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,u){return this._listeners[o].push(u),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,u){if(this._listeners[o])for(var l=0;l "+o:o}},n.exports=t},{}],29:[function(e,n,a){var t=e("../utils"),o=e("./ConvertWorker"),u=e("./GenericWorker"),l=e("../base64"),f=e("../support"),p=e("../external"),b=null;if(f.nodestream)try{b=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(v,k){return new p.Promise(function(d,m){var y=[],S=v._internalType,x=v._outputType,C=v._mimeType;v.on("data",function(D,F){y.push(D),k&&k(F)}).on("error",function(D){y=[],m(D)}).on("end",function(){try{var D=function(F,U,N){switch(F){case"blob":return t.newBlob(t.transformTo("arraybuffer",U),N);case"base64":return l.encode(U);default:return t.transformTo(F,U)}}(x,function(F,U){var N,G=0,Q=null,P=0;for(N=0;N"u")a.blob=!1;else{var t=new ArrayBuffer(0);try{a.blob=new Blob([t],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(t),a.blob=o.getBlob("application/zip").size===0}catch{a.blob=!1}}}try{a.nodestream=!!e("readable-stream").Readable}catch{a.nodestream=!1}},{"readable-stream":16}],31:[function(e,n,a){for(var t=e("./utils"),o=e("./support"),u=e("./nodejsUtils"),l=e("./stream/GenericWorker"),f=new Array(256),p=0;p<256;p++)f[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;f[254]=f[254]=1;function b(){l.call(this,"utf-8 decode"),this.leftOver=null}function w(){l.call(this,"utf-8 encode")}a.utf8encode=function(h){return o.nodebuffer?u.newBufferFrom(h,"utf-8"):function(v){var k,d,m,y,S,x=v.length,C=0;for(y=0;y>>6:(d<65536?k[S++]=224|d>>>12:(k[S++]=240|d>>>18,k[S++]=128|d>>>12&63),k[S++]=128|d>>>6&63),k[S++]=128|63&d);return k}(h)},a.utf8decode=function(h){return o.nodebuffer?t.transformTo("nodebuffer",h).toString("utf-8"):function(v){var k,d,m,y,S=v.length,x=new Array(2*S);for(k=d=0;k>10&1023,x[d++]=56320|1023&m)}return x.length!==d&&(x.subarray?x=x.subarray(0,d):x.length=d),t.applyFromCharCode(x)}(h=t.transformTo(o.uint8array?"uint8array":"array",h))},t.inherits(b,l),b.prototype.processChunk=function(h){var v=t.transformTo(o.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var k=v;(v=new Uint8Array(k.length+this.leftOver.length)).set(this.leftOver,0),v.set(k,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var d=function(y,S){var x;for((S=S||y.length)>y.length&&(S=y.length),x=S-1;0<=x&&(192&y[x])==128;)x--;return x<0||x===0?S:x+f[y[x]]>S?x:S}(v),m=v;d!==v.length&&(o.uint8array?(m=v.subarray(0,d),this.leftOver=v.subarray(d,v.length)):(m=v.slice(0,d),this.leftOver=v.slice(d,v.length))),this.push({data:a.utf8decode(m),meta:h.meta})},b.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:a.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},a.Utf8DecodeWorker=b,t.inherits(w,l),w.prototype.processChunk=function(h){this.push({data:a.utf8encode(h.data),meta:h.meta})},a.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,n,a){var t=e("./support"),o=e("./base64"),u=e("./nodejsUtils"),l=e("set-immediate-shim"),f=e("./external");function p(d){return d}function b(d,m){for(var y=0;y>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(h){if(this.extraFields[1]){var v=t(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=v.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=v.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=v.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=v.readInt(4))}},readExtraFields:function(h){var v,k,d,m=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4>>6:(h<65536?w[d++]=224|h>>>12:(w[d++]=240|h>>>18,w[d++]=128|h>>>12&63),w[d++]=128|h>>>6&63),w[d++]=128|63&h);return w},a.buf2binstring=function(b){return p(b,b.length)},a.binstring2buf=function(b){for(var w=new t.Buf8(b.length),h=0,v=w.length;h>10&1023,y[v++]=56320|1023&k)}return p(y,v)},a.utf8border=function(b,w){var h;for((w=w||b.length)>b.length&&(w=b.length),h=w-1;0<=h&&(192&b[h])==128;)h--;return h<0||h===0?w:h+l[b[h]]>w?h:w}},{"./common":41}],43:[function(e,n,a){n.exports=function(t,o,u,l){for(var f=65535&t|0,p=t>>>16&65535|0,b=0;u!==0;){for(u-=b=2e3>>1:o>>>1;u[l]=o}return u}();n.exports=function(o,u,l,f){var p=t,b=f+l;o^=-1;for(var w=f;w>>8^p[255&(o^u[w])];return-1^o}},{}],46:[function(e,n,a){var t,o=e("../utils/common"),u=e("./trees"),l=e("./adler32"),f=e("./crc32"),p=e("./messages"),b=0,w=4,h=0,v=-2,k=-1,d=4,m=2,y=8,S=9,x=286,C=30,D=19,F=2*x+1,U=15,N=3,G=258,Q=G+N+1,P=42,T=113,c=1,R=2,re=3,W=4;function te(s,I){return s.msg=p[I],I}function H(s){return(s<<1)-(4s.avail_out&&(z=s.avail_out),z!==0&&(o.arraySet(s.output,I.pending_buf,I.pending_out,z,s.next_out),s.next_out+=z,I.pending_out+=z,s.total_out+=z,s.avail_out-=z,I.pending-=z,I.pending===0&&(I.pending_out=0))}function E(s,I){u._tr_flush_block(s,0<=s.block_start?s.block_start:-1,s.strstart-s.block_start,I),s.block_start=s.strstart,j(s.strm)}function $(s,I){s.pending_buf[s.pending++]=I}function K(s,I){s.pending_buf[s.pending++]=I>>>8&255,s.pending_buf[s.pending++]=255&I}function V(s,I){var z,_,g=s.max_chain_length,O=s.strstart,L=s.prev_length,M=s.nice_match,A=s.strstart>s.w_size-Q?s.strstart-(s.w_size-Q):0,Z=s.window,Y=s.w_mask,X=s.prev,J=s.strstart+G,oe=Z[O+L-1],ae=Z[O+L];s.prev_length>=s.good_match&&(g>>=2),M>s.lookahead&&(M=s.lookahead);do if(Z[(z=I)+L]===ae&&Z[z+L-1]===oe&&Z[z]===Z[O]&&Z[++z]===Z[O+1]){O+=2,z++;do;while(Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&Z[++O]===Z[++z]&&OA&&--g!=0);return L<=s.lookahead?L:s.lookahead}function ue(s){var I,z,_,g,O,L,M,A,Z,Y,X=s.w_size;do{if(g=s.window_size-s.lookahead-s.strstart,s.strstart>=X+(X-Q)){for(o.arraySet(s.window,s.window,X,X,0),s.match_start-=X,s.strstart-=X,s.block_start-=X,I=z=s.hash_size;_=s.head[--I],s.head[I]=X<=_?_-X:0,--z;);for(I=z=X;_=s.prev[--I],s.prev[I]=X<=_?_-X:0,--z;);g+=X}if(s.strm.avail_in===0)break;if(L=s.strm,M=s.window,A=s.strstart+s.lookahead,Z=g,Y=void 0,Y=L.avail_in,Z=N)for(O=s.strstart-s.insert,s.ins_h=s.window[O],s.ins_h=(s.ins_h<=N&&(s.ins_h=(s.ins_h<=N)if(_=u._tr_tally(s,s.strstart-s.match_start,s.match_length-N),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=N){for(s.match_length--;s.strstart++,s.ins_h=(s.ins_h<=N&&(s.ins_h=(s.ins_h<=N&&s.match_length<=s.prev_length){for(g=s.strstart+s.lookahead-N,_=u._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-N),s.lookahead-=s.prev_length-1,s.prev_length-=2;++s.strstart<=g&&(s.ins_h=(s.ins_h<s.pending_buf_size-5&&(z=s.pending_buf_size-5);;){if(s.lookahead<=1){if(ue(s),s.lookahead===0&&I===b)return c;if(s.lookahead===0)break}s.strstart+=s.lookahead,s.lookahead=0;var _=s.block_start+z;if((s.strstart===0||s.strstart>=_)&&(s.lookahead=s.strstart-_,s.strstart=_,E(s,!1),s.strm.avail_out===0)||s.strstart-s.block_start>=s.w_size-Q&&(E(s,!1),s.strm.avail_out===0))return c}return s.insert=0,I===w?(E(s,!0),s.strm.avail_out===0?re:W):(s.strstart>s.block_start&&(E(s,!1),s.strm.avail_out),c)}),new ie(4,4,8,4,ve),new ie(4,5,16,8,ve),new ie(4,6,32,32,ve),new ie(4,4,16,16,ne),new ie(8,16,32,32,ne),new ie(8,16,128,128,ne),new ie(8,32,128,256,ne),new ie(32,128,258,1024,ne),new ie(32,258,258,4096,ne)],a.deflateInit=function(s,I){return we(s,I,y,15,8,0)},a.deflateInit2=we,a.deflateReset=_e,a.deflateResetKeep=ce,a.deflateSetHeader=function(s,I){return s&&s.state?s.state.wrap!==2?v:(s.state.gzhead=I,h):v},a.deflate=function(s,I){var z,_,g,O;if(!s||!s.state||5>8&255),$(_,_.gzhead.time>>16&255),$(_,_.gzhead.time>>24&255),$(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),$(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&($(_,255&_.gzhead.extra.length),$(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(s.adler=f(s.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):($(_,0),$(_,0),$(_,0),$(_,0),$(_,0),$(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),$(_,3),_.status=T);else{var L=y+(_.w_bits-8<<4)<<8;L|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(L|=32),L+=31-L%31,_.status=T,K(_,L),_.strstart!==0&&(K(_,s.adler>>>16),K(_,65535&s.adler)),s.adler=1}if(_.status===69)if(_.gzhead.extra){for(g=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>g&&(s.adler=f(s.adler,_.pending_buf,_.pending-g,g)),j(s),g=_.pending,_.pending!==_.pending_buf_size));)$(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>g&&(s.adler=f(s.adler,_.pending_buf,_.pending-g,g)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){g=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>g&&(s.adler=f(s.adler,_.pending_buf,_.pending-g,g)),j(s),g=_.pending,_.pending===_.pending_buf_size)){O=1;break}O=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,$(_,O)}while(O!==0);_.gzhead.hcrc&&_.pending>g&&(s.adler=f(s.adler,_.pending_buf,_.pending-g,g)),O===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){g=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>g&&(s.adler=f(s.adler,_.pending_buf,_.pending-g,g)),j(s),g=_.pending,_.pending===_.pending_buf_size)){O=1;break}O=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,$(_,O)}while(O!==0);_.gzhead.hcrc&&_.pending>g&&(s.adler=f(s.adler,_.pending_buf,_.pending-g,g)),O===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&j(s),_.pending+2<=_.pending_buf_size&&($(_,255&s.adler),$(_,s.adler>>8&255),s.adler=0,_.status=T)):_.status=T),_.pending!==0){if(j(s),s.avail_out===0)return _.last_flush=-1,h}else if(s.avail_in===0&&H(I)<=H(z)&&I!==w)return te(s,-5);if(_.status===666&&s.avail_in!==0)return te(s,-5);if(s.avail_in!==0||_.lookahead!==0||I!==b&&_.status!==666){var M=_.strategy===2?function(A,Z){for(var Y;;){if(A.lookahead===0&&(ue(A),A.lookahead===0)){if(Z===b)return c;break}if(A.match_length=0,Y=u._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,Y&&(E(A,!1),A.strm.avail_out===0))return c}return A.insert=0,Z===w?(E(A,!0),A.strm.avail_out===0?re:W):A.last_lit&&(E(A,!1),A.strm.avail_out===0)?c:R}(_,I):_.strategy===3?function(A,Z){for(var Y,X,J,oe,ae=A.window;;){if(A.lookahead<=G){if(ue(A),A.lookahead<=G&&Z===b)return c;if(A.lookahead===0)break}if(A.match_length=0,A.lookahead>=N&&0A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=N?(Y=u._tr_tally(A,1,A.match_length-N),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(Y=u._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),Y&&(E(A,!1),A.strm.avail_out===0))return c}return A.insert=0,Z===w?(E(A,!0),A.strm.avail_out===0?re:W):A.last_lit&&(E(A,!1),A.strm.avail_out===0)?c:R}(_,I):t[_.level].func(_,I);if(M!==re&&M!==W||(_.status=666),M===c||M===re)return s.avail_out===0&&(_.last_flush=-1),h;if(M===R&&(I===1?u._tr_align(_):I!==5&&(u._tr_stored_block(_,0,0,!1),I===3&&(ee(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),j(s),s.avail_out===0))return _.last_flush=-1,h}return I!==w?h:_.wrap<=0?1:(_.wrap===2?($(_,255&s.adler),$(_,s.adler>>8&255),$(_,s.adler>>16&255),$(_,s.adler>>24&255),$(_,255&s.total_in),$(_,s.total_in>>8&255),$(_,s.total_in>>16&255),$(_,s.total_in>>24&255)):(K(_,s.adler>>>16),K(_,65535&s.adler)),j(s),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?h:1)},a.deflateEnd=function(s){var I;return s&&s.state?(I=s.state.status)!==P&&I!==69&&I!==73&&I!==91&&I!==103&&I!==T&&I!==666?te(s,v):(s.state=null,I===T?te(s,-3):h):v},a.deflateSetDictionary=function(s,I){var z,_,g,O,L,M,A,Z,Y=I.length;if(!s||!s.state||(O=(z=s.state).wrap)===2||O===1&&z.status!==P||z.lookahead)return v;for(O===1&&(s.adler=l(s.adler,I,Y,0)),z.wrap=0,Y>=z.w_size&&(O===0&&(ee(z.head),z.strstart=0,z.block_start=0,z.insert=0),Z=new o.Buf8(z.w_size),o.arraySet(Z,I,Y-z.w_size,z.w_size,0),I=Z,Y=z.w_size),L=s.avail_in,M=s.next_in,A=s.input,s.avail_in=Y,s.next_in=0,s.input=I,ue(z);z.lookahead>=N;){for(_=z.strstart,g=z.lookahead-(N-1);z.ins_h=(z.ins_h<>>=N=U>>>24,S-=N,(N=U>>>16&255)===0)R[p++]=65535&U;else{if(!(16&N)){if((64&N)==0){U=x[(65535&U)+(y&(1<>>=N,S-=N),S<15&&(y+=c[l++]<>>=N=U>>>24,S-=N,!(16&(N=U>>>16&255))){if((64&N)==0){U=C[(65535&U)+(y&(1<>>=N,S-=N,(N=p-b)>3,y&=(1<<(S-=G<<3))-1,t.next_in=l,t.next_out=p,t.avail_in=l>>24&255)+(P>>>8&65280)+((65280&P)<<8)+((255&P)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(P){var T;return P&&P.state?(T=P.state,P.total_in=P.total_out=T.total=0,P.msg="",T.wrap&&(P.adler=1&T.wrap),T.mode=v,T.last=0,T.havedict=0,T.dmax=32768,T.head=null,T.hold=0,T.bits=0,T.lencode=T.lendyn=new t.Buf32(k),T.distcode=T.distdyn=new t.Buf32(d),T.sane=1,T.back=-1,w):h}function x(P){var T;return P&&P.state?((T=P.state).wsize=0,T.whave=0,T.wnext=0,S(P)):h}function C(P,T){var c,R;return P&&P.state?(R=P.state,T<0?(c=0,T=-T):(c=1+(T>>4),T<48&&(T&=15)),T&&(T<8||15=W.wsize?(t.arraySet(W.window,T,c-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(R<(re=W.wsize-W.wnext)&&(re=R),t.arraySet(W.window,T,c-R,re,W.wnext),(R-=re)?(t.arraySet(W.window,T,c-R,R,0),W.wnext=R,W.whave=W.wsize):(W.wnext+=re,W.wnext===W.wsize&&(W.wnext=0),W.whave>>8&255,c.check=u(c.check,O,2,0),E=j=0,c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&j)<<8)+(j>>8))%31){P.msg="incorrect header check",c.mode=30;break}if((15&j)!=8){P.msg="unknown compression method",c.mode=30;break}if(E-=4,s=8+(15&(j>>>=4)),c.wbits===0)c.wbits=s;else if(s>c.wbits){P.msg="invalid window size",c.mode=30;break}c.dmax=1<>8&1),512&c.flags&&(O[0]=255&j,O[1]=j>>>8&255,c.check=u(c.check,O,2,0)),E=j=0,c.mode=3;case 3:for(;E<32;){if(H===0)break e;H--,j+=R[W++]<>>8&255,O[2]=j>>>16&255,O[3]=j>>>24&255,c.check=u(c.check,O,4,0)),E=j=0,c.mode=4;case 4:for(;E<16;){if(H===0)break e;H--,j+=R[W++]<>8),512&c.flags&&(O[0]=255&j,O[1]=j>>>8&255,c.check=u(c.check,O,2,0)),E=j=0,c.mode=5;case 5:if(1024&c.flags){for(;E<16;){if(H===0)break e;H--,j+=R[W++]<>>8&255,c.check=u(c.check,O,2,0)),E=j=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(H<(V=c.length)&&(V=H),V&&(c.head&&(s=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),t.arraySet(c.head.extra,R,W,V,s)),512&c.flags&&(c.check=u(c.check,R,V,W)),H-=V,W+=V,c.length-=V),c.length))break e;c.length=0,c.mode=7;case 7:if(2048&c.flags){if(H===0)break e;for(V=0;s=R[W+V++],c.head&&s&&c.length<65536&&(c.head.name+=String.fromCharCode(s)),s&&V>9&1,c.head.done=!0),P.adler=c.check=0,c.mode=12;break;case 10:for(;E<32;){if(H===0)break e;H--,j+=R[W++]<>>=7&E,E-=7&E,c.mode=27;break}for(;E<3;){if(H===0)break e;H--,j+=R[W++]<>>=1)){case 0:c.mode=14;break;case 1:if(G(c),c.mode=20,T!==6)break;j>>>=2,E-=2;break e;case 2:c.mode=17;break;case 3:P.msg="invalid block type",c.mode=30}j>>>=2,E-=2;break;case 14:for(j>>>=7&E,E-=7&E;E<32;){if(H===0)break e;H--,j+=R[W++]<>>16^65535)){P.msg="invalid stored block lengths",c.mode=30;break}if(c.length=65535&j,E=j=0,c.mode=15,T===6)break e;case 15:c.mode=16;case 16:if(V=c.length){if(H>>=5,E-=5,c.ndist=1+(31&j),j>>>=5,E-=5,c.ncode=4+(15&j),j>>>=4,E-=4,286>>=3,E-=3}for(;c.have<19;)c.lens[L[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,z={bits:c.lenbits},I=f(0,c.lens,0,19,c.lencode,0,c.work,z),c.lenbits=z.bits,I){P.msg="invalid code lengths set",c.mode=30;break}c.have=0,c.mode=19;case 19:for(;c.have>>16&255,pe=65535&g,!((ne=g>>>24)<=E);){if(H===0)break e;H--,j+=R[W++]<>>=ne,E-=ne,c.lens[c.have++]=pe;else{if(pe===16){for(_=ne+2;E<_;){if(H===0)break e;H--,j+=R[W++]<>>=ne,E-=ne,c.have===0){P.msg="invalid bit length repeat",c.mode=30;break}s=c.lens[c.have-1],V=3+(3&j),j>>>=2,E-=2}else if(pe===17){for(_=ne+3;E<_;){if(H===0)break e;H--,j+=R[W++]<>>=ne)),j>>>=3,E-=3}else{for(_=ne+7;E<_;){if(H===0)break e;H--,j+=R[W++]<>>=ne)),j>>>=7,E-=7}if(c.have+V>c.nlen+c.ndist){P.msg="invalid bit length repeat",c.mode=30;break}for(;V--;)c.lens[c.have++]=s}}if(c.mode===30)break;if(c.lens[256]===0){P.msg="invalid code -- missing end-of-block",c.mode=30;break}if(c.lenbits=9,z={bits:c.lenbits},I=f(p,c.lens,0,c.nlen,c.lencode,0,c.work,z),c.lenbits=z.bits,I){P.msg="invalid literal/lengths set",c.mode=30;break}if(c.distbits=6,c.distcode=c.distdyn,z={bits:c.distbits},I=f(b,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,z),c.distbits=z.bits,I){P.msg="invalid distances set",c.mode=30;break}if(c.mode=20,T===6)break e;case 20:c.mode=21;case 21:if(6<=H&&258<=ee){P.next_out=te,P.avail_out=ee,P.next_in=W,P.avail_in=H,c.hold=j,c.bits=E,l(P,K),te=P.next_out,re=P.output,ee=P.avail_out,W=P.next_in,R=P.input,H=P.avail_in,j=c.hold,E=c.bits,c.mode===12&&(c.back=-1);break}for(c.back=0;ie=(g=c.lencode[j&(1<>>16&255,pe=65535&g,!((ne=g>>>24)<=E);){if(H===0)break e;H--,j+=R[W++]<>ce)])>>>16&255,pe=65535&g,!(ce+(ne=g>>>24)<=E);){if(H===0)break e;H--,j+=R[W++]<>>=ce,E-=ce,c.back+=ce}if(j>>>=ne,E-=ne,c.back+=ne,c.length=pe,ie===0){c.mode=26;break}if(32&ie){c.back=-1,c.mode=12;break}if(64&ie){P.msg="invalid literal/length code",c.mode=30;break}c.extra=15&ie,c.mode=22;case 22:if(c.extra){for(_=c.extra;E<_;){if(H===0)break e;H--,j+=R[W++]<>>=c.extra,E-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=23;case 23:for(;ie=(g=c.distcode[j&(1<>>16&255,pe=65535&g,!((ne=g>>>24)<=E);){if(H===0)break e;H--,j+=R[W++]<>ce)])>>>16&255,pe=65535&g,!(ce+(ne=g>>>24)<=E);){if(H===0)break e;H--,j+=R[W++]<>>=ce,E-=ce,c.back+=ce}if(j>>>=ne,E-=ne,c.back+=ne,64&ie){P.msg="invalid distance code",c.mode=30;break}c.offset=pe,c.extra=15&ie,c.mode=24;case 24:if(c.extra){for(_=c.extra;E<_;){if(H===0)break e;H--,j+=R[W++]<>>=c.extra,E-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){P.msg="invalid distance too far back",c.mode=30;break}c.mode=25;case 25:if(ee===0)break e;if(V=K-ee,c.offset>V){if((V=c.offset-V)>c.whave&&c.sane){P.msg="invalid distance too far back",c.mode=30;break}ue=V>c.wnext?(V-=c.wnext,c.wsize-V):c.wnext-V,V>c.length&&(V=c.length),ve=c.window}else ve=re,ue=te-c.offset,V=c.length;for(eeF?(N=ue[ve+d[T]],E[$+d[T]]):(N=96,0),y=1<>te)+(S-=y)]=U<<24|N<<16|G|0,S!==0;);for(y=1<>=1;if(y!==0?(j&=y-1,j+=y):j=0,T++,--K[P]==0){if(P===R)break;P=b[w+d[T]]}if(re>>7)]}function $(g,O){g.pending_buf[g.pending++]=255&O,g.pending_buf[g.pending++]=O>>>8&255}function K(g,O,L){g.bi_valid>m-L?(g.bi_buf|=O<>m-g.bi_valid,g.bi_valid+=L-m):(g.bi_buf|=O<>>=1,L<<=1,0<--O;);return L>>>1}function ve(g,O,L){var M,A,Z=new Array(d+1),Y=0;for(M=1;M<=d;M++)Z[M]=Y=Y+L[M-1]<<1;for(A=0;A<=O;A++){var X=g[2*A+1];X!==0&&(g[2*A]=ue(Z[X]++,X))}}function ne(g){var O;for(O=0;O>1;1<=L;L--)ce(g,Z,L);for(A=J;L=g.heap[1],g.heap[1]=g.heap[g.heap_len--],ce(g,Z,1),M=g.heap[1],g.heap[--g.heap_max]=L,g.heap[--g.heap_max]=M,Z[2*A]=Z[2*L]+Z[2*M],g.depth[A]=(g.depth[L]>=g.depth[M]?g.depth[L]:g.depth[M])+1,Z[2*L+1]=Z[2*M+1]=A,g.heap[1]=A++,ce(g,Z,1),2<=g.heap_len;);g.heap[--g.heap_max]=g.heap[1],function(ae,ge){var xe,ke,je,fe,De,qe,Pe=ge.dyn_tree,_r=ge.max_code,rn=ge.stat_desc.static_tree,tn=ge.stat_desc.has_stree,nn=ge.stat_desc.extra_bits,kr=ge.stat_desc.extra_base,Ne=ge.stat_desc.max_length,Le=0;for(fe=0;fe<=d;fe++)ae.bl_count[fe]=0;for(Pe[2*ae.heap[ae.heap_max]+1]=0,xe=ae.heap_max+1;xe>=7;A>>=1)if(1&oe&&X.dyn_ltree[2*J]!==0)return o;if(X.dyn_ltree[18]!==0||X.dyn_ltree[20]!==0||X.dyn_ltree[26]!==0)return u;for(J=32;J>>3,(Z=g.static_len+3+7>>>3)<=A&&(A=Z)):A=Z=L+5,L+4<=A&&O!==-1?_(g,O,L,M):g.strategy===4||Z===A?(K(g,2+(M?1:0),3),_e(g,Q,P)):(K(g,4+(M?1:0),3),function(X,J,oe,ae){var ge;for(K(X,J-257,5),K(X,oe-1,5),K(X,ae-4,4),ge=0;ge>>8&255,g.pending_buf[g.d_buf+2*g.last_lit+1]=255&O,g.pending_buf[g.l_buf+g.last_lit]=255&L,g.last_lit++,O===0?g.dyn_ltree[2*L]++:(g.matches++,O--,g.dyn_ltree[2*(c[L]+b+1)]++,g.dyn_dtree[2*E(O)]++),g.last_lit===g.lit_bufsize-1},a._tr_align=function(g){K(g,2,3),V(g,S,Q),function(O){O.bi_valid===16?($(O,O.bi_buf),O.bi_buf=0,O.bi_valid=0):8<=O.bi_valid&&(O.pending_buf[O.pending++]=255&O.bi_buf,O.bi_buf>>=8,O.bi_valid-=8)}(g)}},{"../utils/common":41}],53:[function(e,n,a){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,n,a){n.exports=typeof setImmediate=="function"?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)})})(tr);function Fr(i){return i?.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function ze(i){var r=i.lastIndexOf("/")+1,e=r==0?"":i.substring(0,r),n=r==0?i:i.substring(r);return[e,n]}function Me(i,r){try{var e="http://docx/",n=new URL(i,e+r).toString();return n.substring(e.length)}catch{return"".concat(r).concat(i)}}function Tr(i,r){return i.reduce(function(e,n){return e[r(n)]=n,e},{})}function Ir(i){return new Promise(function(r,e){var n=new FileReader;n.onloadend=function(){return r(n.result.replace(/application\/octet\-stream;/,"image/png;"))},n.readAsDataURL(i)})}function We(i){return i&&typeof i=="object"&&!Array.isArray(i)}function Fe(i){for(var r,e=[],n=1;n"u"))return parseInt(i)}var it=function(i){be(r,i);function r(){var e=i!==null&&i.apply(this,arguments)||this;return Object.defineProperty(e,"props",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),e}return Object.defineProperty(r.prototype,"parseXml",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.props=at(e,this._package.xmlParser)}}),r}(ye);function ot(i,r){for(var e={},n=0,a=r.elements(i);n0&&(e["font-family"]=t)}}),Object.defineProperty(i.prototype,"parseIndentation",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){var n=B.lengthAttr(r,"firstLine"),a=B.lengthAttr(r,"hanging"),t=B.lengthAttr(r,"left"),o=B.lengthAttr(r,"start"),u=B.lengthAttr(r,"right"),l=B.lengthAttr(r,"end");n&&(e["text-indent"]=n),a&&(e["text-indent"]="-".concat(a)),(t||o)&&(e["margin-left"]=t||o),(u||l)&&(e["margin-right"]=u||l)}}),Object.defineProperty(i.prototype,"parseSpacing",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){var n=B.lengthAttr(r,"before"),a=B.lengthAttr(r,"after"),t=B.intAttr(r,"line",null),o=B.attr(r,"lineRule");if(n&&(e["margin-top"]=n),a&&(e["margin-bottom"]=a),t!==null)switch(o){case"auto":e["line-height"]="".concat((t/240).toFixed(2));break;case"atLeast":e["line-height"]="calc(100% + ".concat(Math.ceil(t/15),"px)");break;default:e["line-height"]=e["min-height"]="".concat(Math.ceil(t/15),"px");break}}}),Object.defineProperty(i.prototype,"parseMarginProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){se.foreach(r,function(n){switch(n.localName){case"left":e["padding-left"]=le.valueOfMargin(n);break;case"right":e["padding-right"]=le.valueOfMargin(n);break;case"top":e["padding-top"]=le.valueOfMargin(n);break;case"bottom":e["padding-bottom"]=le.valueOfMargin(n);break}})}}),Object.defineProperty(i.prototype,"parseTrHeight",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){switch(B.attr(r,"hRule")){case"exact":e.height=B.lengthAttr(r,"val");break;case"atLeast":default:e.height=B.lengthAttr(r,"val");break}}}),Object.defineProperty(i.prototype,"parseBorderProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){se.foreach(r,function(n){switch(n.localName){case"start":case"left":e["border-left"]=le.valueOfBorder(n);break;case"end":case"right":e["border-right"]=le.valueOfBorder(n);break;case"top":e["border-top"]=le.valueOfBorder(n);break;case"bottom":e["border-bottom"]=le.valueOfBorder(n);break}})}}),i}(),At=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"],se=function(){function i(){}return Object.defineProperty(i,"foreach",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){for(var n=0;n0?r.map(function(U){return{pos:br(U.position),leader:U.leader,style:U.style}}).sort(function(U,N){return U.pos-N.pos}):[pr],f=l[l.length-1],p=o.width*n,b=br(e),w=f.pos+b;if(wk});if(d!=null){var m=1;if(d.style=="right"||d.style=="center"){var y=Array.from(a.querySelectorAll(".".concat(i.className))),S=y.indexOf(i)+1,x=document.createRange();x.setStart(i,1),S0)return zt(i);if(e==="number"&&isNaN(i)===!1)return r.long?Tt(i):Ft(i);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(i))};function zt(i){if(i=String(i),!(i.length>100)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(i);if(!!r){var e=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return e*Nt;case"days":case"day":case"d":return e*Ee;case"hours":case"hour":case"hrs":case"hr":case"h":return e*Ae;case"minutes":case"minute":case"mins":case"min":case"m":return e*Ce;case"seconds":case"second":case"secs":case"sec":case"s":return e*Oe;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}function Ft(i){return i>=Ee?Math.round(i/Ee)+"d":i>=Ae?Math.round(i/Ae)+"h":i>=Ce?Math.round(i/Ce)+"m":i>=Oe?Math.round(i/Oe)+"s":i+"ms"}function Tt(i){return Re(i,Ee,"day")||Re(i,Ae,"hour")||Re(i,Ce,"minute")||Re(i,Oe,"second")||i+" ms"}function Re(i,r,e){if(!(i=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}r.formatters.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function n(l){var f=this.useColors;if(l[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+l[0]+(f?"%c ":" ")+"+"+r.humanize(this.diff),!!f){var p="color: "+this.color;l.splice(1,0,p,"color: inherit");var b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,function(h){h!=="%%"&&(b++,h==="%c"&&(w=b))}),l.splice(w,0,p)}}function a(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function t(l){try{l==null?r.storage.removeItem("debug"):r.storage.debug=l}catch{}}function o(){var l;try{l=r.storage.debug}catch{}return!l&&typeof process<"u"&&"env"in process&&(l={}.DEBUG),l}r.enable(o());function u(){try{return window.localStorage}catch{}}}(Ze,Ze.exports),function(i){(function(r,e){var n=i.exports;n?i.exports=e(Ze.exports("eventproxy")):this[r]=e()})("EventProxy",function(r){r=r||function(){};var e=Array.prototype.slice,n=Array.prototype.concat,a="__all__",t=function(){if(!(this instanceof t))return new t;this._callbacks={},this._fired={}};t.prototype.addListener=function(l,f){return r("Add listener for %s",l),this._callbacks[l]=this._callbacks[l]||[],this._callbacks[l].push(f),this},t.prototype.bind=t.prototype.addListener,t.prototype.on=t.prototype.addListener,t.prototype.subscribe=t.prototype.addListener,t.prototype.headbind=function(l,f){return r("Add listener for %s",l),this._callbacks[l]=this._callbacks[l]||[],this._callbacks[l].unshift(f),this},t.prototype.removeListener=function(l,f){var p=this._callbacks;if(!l)r("Remove all listeners"),this._callbacks={};else if(!f)r("Remove all listeners of %s",l),p[l]=[];else{var b=p[l];if(b)for(var w=b.length,h=0;h=0;C--)t[C].sectProps==null?t[C].sectProps=x:x=t[C].sectProps;return t}}),Object.defineProperty(i.prototype,"renderWrapper",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.createElement("div",{className:"".concat(this.className,"-wrapper")},r)}}),Object.defineProperty(i.prototype,"renderDefaultStyle",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.className,e=` .`.concat(r,`-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } .`).concat(r,"-wrapper>section.").concat(r,` { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; } .`).concat(r,` { color: black; } section.`).concat(r,` { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; } section.`).concat(r,`>article { margin-bottom: auto; } .`).concat(r,` table { border-collapse: collapse; } .`).concat(r," table td, .").concat(r,` table th { vertical-align: top; } .`).concat(r,` p { margin: 0pt; min-height: 1em; } .`).concat(r,` span { white-space: pre-wrap; overflow-wrap: break-word; } .`).concat(r,` a { color: inherit; text-decoration: inherit; } `);return Ve(e)}}),Object.defineProperty(i.prototype,"renderNotes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e,n){var a=r.map(function(o){return e[o]}).filter(function(o){return o});if(a.length>0){var t=this.createElement("ol",null,this.renderElements(a));n.appendChild(t)}}}),Object.defineProperty(i.prototype,"renderElement",{enumerable:!1,configurable:!0,writable:!0,value:function(r){switch(r.type){case q.Paragraph:return this.renderParagraph(r);case q.BookmarkStart:return this.renderBookmarkStart(r);case q.BookmarkEnd:return null;case q.Run:return this.renderRun(r);case q.Table:return this.renderTable(r);case q.Row:return this.renderTableRow(r);case q.Cell:return this.renderTableCell(r);case q.Hyperlink:return this.renderHyperlink(r);case q.Drawing:return this.renderDrawing(r);case q.Image:return this.renderImage(r);case q.Text:return this.renderText(r);case q.Tab:return this.renderTab(r);case q.Symbol:return this.renderSymbol(r);case q.Break:return this.renderBreak(r);case q.Footer:return this.renderContainer(r,"footer");case q.Header:return this.renderContainer(r,"header");case q.Footnote:case q.Endnote:return this.renderContainer(r,"li");case q.FootnoteReference:return this.renderFootnoteReference(r);case q.EndnoteReference:return this.renderEndnoteReference(r);case q.NoBreakHyphen:return this.createElement("wbr")}return null}}),Object.defineProperty(i.prototype,"renderChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){return this.renderElements(r.children,e)}}),Object.defineProperty(i.prototype,"renderElements",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){var n=this;if(r==null)return null;var a=r.map(function(t){return n.renderElement(t)}).filter(function(t){return t!=null});return e&&Ge(e,a),a}}),Object.defineProperty(i.prototype,"renderContainer",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){return this.createElement(e,null,this.renderChildren(r))}}),Object.defineProperty(i.prototype,"renderParagraph",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e,n,a,t,o=this.createElement("p"),u=this.findStyle(r.styleName);(e=r.tabs)!==null&&e!==void 0||(r.tabs=(n=u?.paragraphProps)===null||n===void 0?void 0:n.tabs),this.renderClass(r,o),this.renderChildren(r,o),this.renderStyleValues(r.cssStyle,o),this.renderCommonProperties(o.style,r);var l=(a=r.numbering)!==null&&a!==void 0?a:(t=u?.paragraphProps)===null||t===void 0?void 0:t.numbering;if(l){if(this.domNumberings[l.id]&&this.domNumberings[l.id][l.level]){var f=this.domNumberings[l.id][l.level];if(o.firstChild&&o.firstChild.innerHTML)o.firstChild.innerHTML=this.numLevelTextToContent(f)+o.firstChild.innerHTML;else{var p=this.createElement("span");p.innerHTML=this.numLevelTextToContent(f),o.appendChild(p)}}o.classList.add(this.numberingClass(l.id,l.level))}return o}}),Object.defineProperty(i.prototype,"renderRunProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){this.renderCommonProperties(r,e)}}),Object.defineProperty(i.prototype,"renderCommonProperties",{enumerable:!1,configurable:!0,writable:!0,value:function(r,e){e!=null&&(e.color&&(r.color=e.color),e.fontSize&&(r["font-size"]=e.fontSize))}}),Object.defineProperty(i.prototype,"renderHyperlink",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e=this.createElement("a");return this.renderChildren(r,e),this.renderStyleValues(r.cssStyle,e),r.href&&(e.href=r.href),e}}),Object.defineProperty(i.prototype,"renderDrawing",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e,n=this.createElement("p");return n.style.display="inline-block",r.children&&((e=r.children[0])===null||e===void 0?void 0:e.type)!=="image"&&(n.style.position="relative",n.style.textIndent="0px"),this.renderChildren(r,n),this.renderStyleValues(r.cssStyle,n),n}}),Object.defineProperty(i.prototype,"renderImage",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e,n,a=this.createElement("img");!r.cssStyle["max-width"]&&(r.cssStyle["max-width"]="100%"),r.cssStyle.width&&(r.cssStyle.width=parseFloat(r.cssStyle.width)*2+"pt"),r.cssStyle.height&&(r.cssStyle.height=parseFloat(r.cssStyle.height)*2+"pt");var t="";((n=(e=r.parent)===null||e===void 0?void 0:e.parent)===null||n===void 0?void 0:n.parent)&&r.parent.parent.parent.cssStyle&&(t=r.parent.parent.parent.cssStyle["text-align"]),t=="right"&&(r.cssStyle.float="right",r.cssStyle.height.replace(/pt$/,"px")),t=="center"&&(r.cssStyle.display="block",r.cssStyle["margin-left"]="auto",r.cssStyle["margin-right"]="auto"),this.renderStyleValues(r.cssStyle,a);var o=this;return o.renderImageCount++,a.setAttribute("data-tp-src",r.src),this.document&&this.document.loadDocumentImage(r.src,this.currentPart).then(function(u){o.ep2.emit("renderImage",{status:"ok",src:u,rId:r.src}),a.parentNode.style.width="100%",a.parentNode.style.height=null,a.parentNode.style.display="inline-block",a.src=u}),a}}),Object.defineProperty(i.prototype,"renderText",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.htmlDocument.createTextNode(r.text)}}),Object.defineProperty(i.prototype,"renderBreak",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.break=="textWrapping"?this.createElement("br"):null}}),Object.defineProperty(i.prototype,"renderSymbol",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e=this.createElement("span");return e.style.fontFamily=r.font,e.innerHTML="&#x".concat(r.char,";"),e}}),Object.defineProperty(i.prototype,"renderFootnoteReference",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e=this.createElement("sup");return this.currentFootnoteIds.push(r.id),e.textContent="".concat(this.currentFootnoteIds.length),e}}),Object.defineProperty(i.prototype,"renderEndnoteReference",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e=this.createElement("sup");return this.currentEndnoteIds.push(r.id),e.textContent="".concat(this.currentEndnoteIds.length),e}}),Object.defineProperty(i.prototype,"renderTab",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e,n=this.createElement("span");if(n.innerHTML=" ",this.options.experimental){n.className=this.tabStopClass();var a=(e=Ut(r,q.Paragraph))===null||e===void 0?void 0:e.tabs;this.currentTabs.push({stops:a,span:n})}return n}}),Object.defineProperty(i.prototype,"renderBookmarkStart",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e=this.createElement("span");return e.id=r.name,e}}),Object.defineProperty(i.prototype,"renderRun",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.fieldRun)return null;var e=this.createElement("span");if(r.id&&(e.id=r.id),this.renderClass(r,e),this.renderStyleValues(r.cssStyle,e),r.verticalAlign){var n=this.createElement(r.verticalAlign);this.renderChildren(r,n),e.appendChild(n)}else this.renderChildren(r,e);return e}}),Object.defineProperty(i.prototype,"renderTable",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},r.columns&&e.appendChild(this.renderTableColumns(r.columns)),!r.cssStyle["border-collapse"]&&(r.cssStyle["border-collapse"]="collapse"),this.renderClass(r,e),this.renderChildren(r,e),this.renderStyleValues(r.cssStyle,e),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),e}}),Object.defineProperty(i.prototype,"renderTableColumns",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var e=this.createElement("colgroup"),n=0,a=r;n'+r.levelText+""),"".concat(o).concat((n=a[r.suff])!==null&&n!==void 0?n:"")}}),Object.defineProperty(i.prototype,"numFormatToCssValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var e={none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman"};return e[r]||r}}),Object.defineProperty(i.prototype,"refreshTabStops",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;!this.options.experimental||(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(function(){for(var e=xt(),n=0,a=r.currentTabs;n'};Qt(wr);var en={opt:wr};return en})();