@coco-vexel/coco-office-oojson 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ var oojson=(()=>{var al=Object.create;var Kn=Object.defineProperty;var ll=Object.getOwnPropertyDescriptor;var cl=Object.getOwnPropertyNames;var ul=Object.getPrototypeOf,fl=Object.prototype.hasOwnProperty;var On=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var dl=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},pl=(t,e)=>{for(var n in e)Kn(t,n,{get:e[n],enumerable:!0})},Ei=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of cl(e))!fl.call(t,o)&&o!==n&&Kn(t,o,{get:()=>e[o],enumerable:!(r=ll(e,o))||r.enumerable});return t};var hl=(t,e,n)=>(n=t!=null?al(ul(t)):{},Ei(e||!t||!t.__esModule?Kn(n,"default",{value:t,enumerable:!0}):n,t)),ml=t=>Ei(Kn({},"__esModule",{value:!0}),t);var _s=dl((vs,fo)=>{(function(t){typeof vs=="object"&&typeof fo<"u"?fo.exports=t():typeof define=="function"&&define.amd?define([],t):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=t()})(function(){return(function t(e,n,r){function o(a,l){if(!n[a]){if(!e[a]){var c=typeof On=="function"&&On;if(!l&&c)return c(a,!0);if(i)return i(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var d=n[a]={exports:{}};e[a][0].call(d.exports,function(w){var f=e[a][1][w];return o(f||w)},d,d.exports,t,e,n,r)}return n[a].exports}for(var i=typeof On=="function"&&On,s=0;s<r.length;s++)o(r[s]);return o})({1:[function(t,e,n){"use strict";var r=t("./utils"),o=t("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(s){for(var a,l,c,h,d,w,f,g=[],m=0,y=s.length,v=y,_=r.getTypeOf(s)!=="string";m<s.length;)v=y-m,c=_?(a=s[m++],l=m<y?s[m++]:0,m<y?s[m++]:0):(a=s.charCodeAt(m++),l=m<y?s.charCodeAt(m++):0,m<y?s.charCodeAt(m++):0),h=a>>2,d=(3&a)<<4|l>>4,w=1<v?(15&l)<<2|c>>6:64,f=2<v?63&c:64,g.push(i.charAt(h)+i.charAt(d)+i.charAt(w)+i.charAt(f));return g.join("")},n.decode=function(s){var a,l,c,h,d,w,f=0,g=0,m="data:";if(s.substr(0,m.length)===m)throw new Error("Invalid base64 input, it looks like a data url.");var y,v=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===i.charAt(64)&&v--,s.charAt(s.length-2)===i.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=o.uint8array?new Uint8Array(0|v):new Array(0|v);f<s.length;)a=i.indexOf(s.charAt(f++))<<2|(h=i.indexOf(s.charAt(f++)))>>4,l=(15&h)<<4|(d=i.indexOf(s.charAt(f++)))>>2,c=(3&d)<<6|(w=i.indexOf(s.charAt(f++))),y[g++]=a,d!==64&&(y[g++]=l),w!==64&&(y[g++]=c);return y}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var r=t("./external"),o=t("./stream/DataWorker"),i=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function a(l,c,h,d,w){this.compressedSize=l,this.uncompressedSize=c,this.crc32=h,this.compression=d,this.compressedContent=w}a.prototype={getContentWorker:function(){var l=new o(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),c=this;return l.on("end",function(){if(this.streamInfo.data_length!==c.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),l},getCompressedWorker:function(){return new o(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(l,c,h){return l.pipe(new i).pipe(new s("uncompressedSize")).pipe(c.compressWorker(h)).pipe(new s("compressedSize")).withStreamInfo("compression",c)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var r=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var r=t("./utils"),o=(function(){for(var i,s=[],a=0;a<256;a++){i=a;for(var l=0;l<8;l++)i=1&i?3988292384^i>>>1:i>>>1;s[a]=i}return s})();e.exports=function(i,s){return i!==void 0&&i.length?r.getTypeOf(i)!=="string"?(function(a,l,c,h){var d=o,w=h+c;a^=-1;for(var f=h;f<w;f++)a=a>>>8^d[255&(a^l[f])];return-1^a})(0|s,i,i.length,0):(function(a,l,c,h){var d=o,w=h+c;a^=-1;for(var f=h;f<w;f++)a=a>>>8^d[255&(a^l.charCodeAt(f))];return-1^a})(0|s,i,i.length,0):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var r=null;r=typeof Promise<"u"?Promise:t("lie"),e.exports={Promise:r}},{lie:37}],7:[function(t,e,n){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=t("pako"),i=t("./utils"),s=t("./stream/GenericWorker"),a=r?"uint8array":"array";function l(c,h){s.call(this,"FlateWorker/"+c),this._pako=null,this._pakoAction=c,this._pakoOptions=h,this.meta={}}n.magic="\b\0",i.inherits(l,s),l.prototype.processChunk=function(c){this.meta=c.meta,this._pako===null&&this._createPako(),this._pako.push(i.transformTo(a,c.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var c=this;this._pako.onData=function(h){c.push({data:h,meta:c.meta})}},n.compressWorker=function(c){return new l("Deflate",c)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function r(d,w){var f,g="";for(f=0;f<w;f++)g+=String.fromCharCode(255&d),d>>>=8;return g}function o(d,w,f,g,m,y){var v,_,T=d.file,D=d.compression,k=y!==a.utf8encode,F=i.transformTo("string",y(T.name)),N=i.transformTo("string",a.utf8encode(T.name)),L=T.comment,Y=i.transformTo("string",y(L)),S=i.transformTo("string",a.utf8encode(L)),$=N.length!==T.name.length,p=S.length!==L.length,P="",st="",M="",lt=T.dir,U=T.date,nt={crc32:0,compressedSize:0,uncompressedSize:0};w&&!f||(nt.crc32=d.crc32,nt.compressedSize=d.compressedSize,nt.uncompressedSize=d.uncompressedSize);var A=0;w&&(A|=8),k||!$&&!p||(A|=2048);var E=0,tt=0;lt&&(E|=16),m==="UNIX"?(tt=798,E|=(function(H,Ct){var jt=H;return H||(jt=Ct?16893:33204),(65535&jt)<<16})(T.unixPermissions,lt)):(tt=20,E|=(function(H){return 63&(H||0)})(T.dosPermissions)),v=U.getUTCHours(),v<<=6,v|=U.getUTCMinutes(),v<<=5,v|=U.getUTCSeconds()/2,_=U.getUTCFullYear()-1980,_<<=4,_|=U.getUTCMonth()+1,_<<=5,_|=U.getUTCDate(),$&&(st=r(1,1)+r(l(F),4)+N,P+="up"+r(st.length,2)+st),p&&(M=r(1,1)+r(l(Y),4)+S,P+="uc"+r(M.length,2)+M);var G="";return G+=`
2
+ \0`,G+=r(A,2),G+=D.magic,G+=r(v,2),G+=r(_,2),G+=r(nt.crc32,4),G+=r(nt.compressedSize,4),G+=r(nt.uncompressedSize,4),G+=r(F.length,2),G+=r(P.length,2),{fileRecord:c.LOCAL_FILE_HEADER+G+F+P,dirRecord:c.CENTRAL_FILE_HEADER+r(tt,2)+G+r(Y.length,2)+"\0\0\0\0"+r(E,4)+r(g,4)+F+P+Y}}var i=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),l=t("../crc32"),c=t("../signature");function h(d,w,f,g){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=f,this.encodeFileName=g,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(h,s),h.prototype.push=function(d){var w=d.meta.percent||0,f=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,s.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:f?(w+100*(f-g-1))/f:100}}))},h.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var w=this.streamFiles&&!d.file.dir;if(w){var f=o(d,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(d){this.accumulate=!1;var w=this.streamFiles&&!d.file.dir,f=o(d,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),w)this.push({data:(function(g){return c.DATA_DESCRIPTOR+r(g.crc32,4)+r(g.compressedSize,4)+r(g.uncompressedSize,4)})(d),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var d=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var f=this.bytesWritten-d,g=(function(m,y,v,_,T){var D=i.transformTo("string",T(_));return c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(m,2)+r(m,2)+r(y,4)+r(v,4)+r(D.length,2)+D})(this.dirRecords.length,f,d,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},h.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},h.prototype.registerPrevious=function(d){this._sources.push(d);var w=this;return d.on("data",function(f){w.processChunk(f)}),d.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),d.on("error",function(f){w.error(f)}),this},h.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},h.prototype.error=function(d){var w=this._sources;if(!s.prototype.error.call(this,d))return!1;for(var f=0;f<w.length;f++)try{w[f].error(d)}catch{}return!0},h.prototype.lock=function(){s.prototype.lock.call(this);for(var d=this._sources,w=0;w<d.length;w++)d[w].lock()},e.exports=h},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,n){"use strict";var r=t("../compressions"),o=t("./ZipFileWorker");n.generateWorker=function(i,s,a){var l=new o(s.streamFiles,a,s.platform,s.encodeFileName),c=0;try{i.forEach(function(h,d){c++;var w=(function(y,v){var _=y||v,T=r[_];if(!T)throw new Error(_+" is not a valid compression method !");return T})(d.options.compression,s.compression),f=d.options.compressionOptions||s.compressionOptions||{},g=d.dir,m=d.date;d._compressWorker(w,f).withStreamInfo("file",{name:h,dir:g,date:m,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(l)}),l.entriesCount=c}catch(h){l.error(h)}return l}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new r;for(var i in this)typeof this[i]!="function"&&(o[i]=this[i]);return o}}(r.prototype=t("./object")).loadAsync=t("./load"),r.support=t("./support"),r.defaults=t("./defaults"),r.version="3.10.2",r.loadAsync=function(o,i){return new r().loadAsync(o,i)},r.external=t("./external"),e.exports=r},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,n){"use strict";var r=t("./utils"),o=t("./external"),i=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),l=t("./nodejsUtils");function c(h){return new o.Promise(function(d,w){var f=h.decompressed.getContentWorker().pipe(new a);f.on("error",function(g){w(g)}).on("end",function(){f.streamInfo.crc32!==h.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}e.exports=function(h,d){var w=this;return d=r.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),l.isNode&&l.isStream(h)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",h,!0,d.optimizedBinaryString,d.base64).then(function(f){var g=new s(d);return g.load(f),g}).then(function(f){var g=[o.Promise.resolve(f)],m=f.files;if(d.checkCRC32)for(var y=0;y<m.length;y++)g.push(c(m[y]));return o.Promise.all(g)}).then(function(f){for(var g=f.shift(),m=g.files,y=0;y<m.length;y++){var v=m[y],_=v.fileNameStr,T=r.resolve(v.fileNameStr);w.file(T,v.decompressed,{binary:!0,optimizedBinaryString:!0,date:v.date,dir:v.dir,comment:v.fileCommentStr.length?v.fileCommentStr:null,unixPermissions:v.unixPermissions,dosPermissions:v.dosPermissions,createFolders:d.createFolders}),v.dir||(w.file(T).unsafeOriginalName=_)}return g.zipComment.length&&(w.comment=g.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,n){"use strict";var r=t("../utils"),o=t("../stream/GenericWorker");function i(s,a){o.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(a)}r.inherits(i,o),i.prototype._bindStream=function(s){var a=this;(this._stream=s).pause(),s.on("data",function(l){a.push({data:l,meta:{percent:0}})}).on("error",function(l){a.isPaused?this.generatedError=l:a.error(l)}).on("end",function(){a.isPaused?a._upstreamEnded=!0:a.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,n){"use strict";var r=t("readable-stream").Readable;function o(i,s,a){r.call(this,s),this._helper=i;var l=this;i.on("data",function(c,h){l.push(c)||l._helper.pause(),a&&a(h)}).on("error",function(c){l.emit("error",c)}).on("end",function(){l.push(null)})}t("../utils").inherits(o,r),o.prototype._read=function(){this._helper.resume()},e.exports=o},{"../utils":32,"readable-stream":16}],14:[function(t,e,n){"use strict";e.exports={isNode:typeof Buffer<"u",newBufferFrom:function(r,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,o);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,o)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var o=new Buffer(r);return o.fill(0),o},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}}},{}],15:[function(t,e,n){"use strict";function r(T,D,k){var F,N=i.getTypeOf(D),L=i.extend(k||{},l);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(T=m(T)),L.createFolders&&(F=g(T))&&y.call(this,F,!0);var Y=N==="string"&&L.binary===!1&&L.base64===!1;k&&k.binary!==void 0||(L.binary=!Y),(D instanceof c&&D.uncompressedSize===0||L.dir||!D||D.length===0)&&(L.base64=!1,L.binary=!0,D="",L.compression="STORE",N="string");var S=null;S=D instanceof c||D instanceof s?D:w.isNode&&w.isStream(D)?new f(T,D):i.prepareContent(T,D,L.binary,L.optimizedBinaryString,L.base64);var $=new h(T,S,L);this.files[T]=$}var o=t("./utf8"),i=t("./utils"),s=t("./stream/GenericWorker"),a=t("./stream/StreamHelper"),l=t("./defaults"),c=t("./compressedObject"),h=t("./zipObject"),d=t("./generate"),w=t("./nodejsUtils"),f=t("./nodejs/NodejsStreamInputAdapter"),g=function(T){T.slice(-1)==="/"&&(T=T.substring(0,T.length-1));var D=T.lastIndexOf("/");return 0<D?T.substring(0,D):""},m=function(T){return T.slice(-1)!=="/"&&(T+="/"),T},y=function(T,D){return D=D!==void 0?D:l.createFolders,T=m(T),this.files[T]||r.call(this,T,null,{dir:!0,createFolders:D}),this.files[T]};function v(T){return Object.prototype.toString.call(T)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(T){var D,k,F;for(D in this.files)F=this.files[D],(k=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&T(k,F)},filter:function(T){var D=[];return this.forEach(function(k,F){T(k,F)&&D.push(F)}),D},file:function(T,D,k){if(arguments.length!==1)return T=this.root+T,r.call(this,T,D,k),this;if(v(T)){var F=T;return this.filter(function(L,Y){return!Y.dir&&F.test(L)})}var N=this.files[this.root+T];return N&&!N.dir?N:null},folder:function(T){if(!T)return this;if(v(T))return this.filter(function(N,L){return L.dir&&T.test(N)});var D=this.root+T,k=y.call(this,D),F=this.clone();return F.root=k.name,F},remove:function(T){T=this.root+T;var D=this.files[T];if(D||(T.slice(-1)!=="/"&&(T+="/"),D=this.files[T]),D&&!D.dir)delete this.files[T];else for(var k=this.filter(function(N,L){return L.name.slice(0,T.length)===T}),F=0;F<k.length;F++)delete this.files[k[F].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(T){var D,k={};try{if((k=i.extend(T||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=k.type.toLowerCase(),k.compression=k.compression.toUpperCase(),k.type==="binarystring"&&(k.type="string"),!k.type)throw new Error("No output type specified.");i.checkSupport(k.type),k.platform!=="darwin"&&k.platform!=="freebsd"&&k.platform!=="linux"&&k.platform!=="sunos"||(k.platform="UNIX"),k.platform==="win32"&&(k.platform="DOS");var F=k.comment||this.comment||"";D=d.generateWorker(this,k,F)}catch(N){(D=new s("error")).error(N)}return new a(D,k.type||"string",k.mimeType)},generateAsync:function(T,D){return this.generateInternalStream(T).accumulate(D)},generateNodeStream:function(T,D){return(T=T||{}).type||(T.type="nodebuffer"),this.generateInternalStream(T).toNodejsStream(D)}};e.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,n){"use strict";e.exports=t("stream")},{stream:void 0}],17:[function(t,e,n){"use strict";var r=t("./DataReader");function o(i){r.call(this,i);for(var s=0;s<this.data.length;s++)i[s]=255&i[s]}t("../utils").inherits(o,r),o.prototype.byteAt=function(i){return this.data[this.zero+i]},o.prototype.lastIndexOfSignature=function(i){for(var s=i.charCodeAt(0),a=i.charCodeAt(1),l=i.charCodeAt(2),c=i.charCodeAt(3),h=this.length-4;0<=h;--h)if(this.data[h]===s&&this.data[h+1]===a&&this.data[h+2]===l&&this.data[h+3]===c)return h-this.zero;return-1},o.prototype.readAndCheckSignature=function(i){var s=i.charCodeAt(0),a=i.charCodeAt(1),l=i.charCodeAt(2),c=i.charCodeAt(3),h=this.readData(4);return s===h[0]&&a===h[1]&&l===h[2]&&c===h[3]},o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./DataReader":18}],18:[function(t,e,n){"use strict";var r=t("../utils");function o(i){this.data=i,this.length=i.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(i){this.checkIndex(this.index+i)},checkIndex:function(i){if(this.length<this.zero+i||i<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+i+"). Corrupted zip ?")},setIndex:function(i){this.checkIndex(i),this.index=i},skip:function(i){this.setIndex(this.index+i)},byteAt:function(){},readInt:function(i){var s,a=0;for(this.checkOffset(i),s=this.index+i-1;s>=this.index;s--)a=(a<<8)+this.byteAt(s);return this.index+=i,a},readString:function(i){return r.transformTo("string",this.readData(i))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var i=this.readInt(4);return new Date(Date.UTC(1980+(i>>25&127),(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(31&i)<<1))}},e.exports=o},{"../utils":32}],19:[function(t,e,n){"use strict";var r=t("./Uint8ArrayReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var r=t("./DataReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.byteAt=function(i){return this.data.charCodeAt(this.zero+i)},o.prototype.lastIndexOfSignature=function(i){return this.data.lastIndexOf(i)-this.zero},o.prototype.readAndCheckSignature=function(i){return i===this.readData(4)},o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var r=t("./ArrayReader");function o(i){r.call(this,i)}t("../utils").inherits(o,r),o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},e.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var r=t("../utils"),o=t("../support"),i=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),l=t("./Uint8ArrayReader");e.exports=function(c){var h=r.getTypeOf(c);return r.checkSupport(h),h!=="string"||o.uint8array?h==="nodebuffer"?new a(c):o.uint8array?new l(r.transformTo("uint8array",c)):new i(r.transformTo("array",c)):new s(c)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,n){"use strict";var r=t("./GenericWorker"),o=t("../utils");function i(s){r.call(this,"ConvertWorker to "+s),this.destType=s}o.inherits(i,r),i.prototype.processChunk=function(s){this.push({data:o.transformTo(this.destType,s.data),meta:s.meta})},e.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var r=t("./GenericWorker"),o=t("../crc32");function i(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(i,r),i.prototype.processChunk=function(s){this.streamInfo.crc32=o(s.data,this.streamInfo.crc32||0),this.push(s)},e.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./GenericWorker");function i(s){o.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}r.inherits(i,o),i.prototype.processChunk=function(s){if(s){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+s.data.length}o.prototype.processChunk.call(this,s)},e.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./GenericWorker");function i(s){o.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(l){a.dataIsReady=!0,a.data=l,a.max=l&&l.length||0,a.type=r.getTypeOf(l),a.isPaused||a._tickAndRepeat()},function(l){a.error(l)})}r.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,a=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,a);break;case"uint8array":s=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":s=this.data.slice(this.index,a)}return this.index=a,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function r(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}r.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,i){return this._listeners[o].push(i),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,i){if(this._listeners[o])for(var s=0;s<this._listeners[o].length;s++)this._listeners[o][s].call(this,i)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var i=this;return o.on("data",function(s){i.processChunk(s)}),o.on("end",function(){i.end()}),o.on("error",function(s){i.error(s)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,i){return this.extraStreamInfo[o]=i,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},e.exports=r},{}],29:[function(t,e,n){"use strict";var r=t("../utils"),o=t("./ConvertWorker"),i=t("./GenericWorker"),s=t("../base64"),a=t("../support"),l=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function h(w,f){return new l.Promise(function(g,m){var y=[],v=w._internalType,_=w._outputType,T=w._mimeType;w.on("data",function(D,k){y.push(D),f&&f(k)}).on("error",function(D){y=[],m(D)}).on("end",function(){try{var D=(function(k,F,N){switch(k){case"blob":return r.newBlob(r.transformTo("arraybuffer",F),N);case"base64":return s.encode(F);default:return r.transformTo(k,F)}})(_,(function(k,F){var N,L=0,Y=null,S=0;for(N=0;N<F.length;N++)S+=F[N].length;switch(k){case"string":return F.join("");case"array":return Array.prototype.concat.apply([],F);case"uint8array":for(Y=new Uint8Array(S),N=0;N<F.length;N++)Y.set(F[N],L),L+=F[N].length;return Y;case"nodebuffer":return Buffer.concat(F);default:throw new Error("concat : unsupported type '"+k+"'")}})(v,y),T);g(D)}catch(k){m(k)}y=[]}).resume()})}function d(w,f,g){var m=f;switch(f){case"blob":case"arraybuffer":m="uint8array";break;case"base64":m="string"}try{this._internalType=m,this._outputType=f,this._mimeType=g,r.checkSupport(m),this._worker=w.pipe(new o(m)),w.lock()}catch(y){this._worker=new i("error"),this._worker.error(y)}}d.prototype={accumulate:function(w){return h(this,w)},on:function(w,f){var g=this;return w==="data"?this._worker.on(w,function(m){f.call(g,m.data,m.meta)}):this._worker.on(w,function(){r.delay(f,arguments,g)}),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(r.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:this._outputType!=="nodebuffer"},w)}},e.exports=d},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,n){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=o.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,n){"use strict";for(var r=t("./utils"),o=t("./support"),i=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),l=0;l<256;l++)a[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;a[254]=a[254]=1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function h(){s.call(this,"utf-8 encode")}n.utf8encode=function(d){return o.nodebuffer?i.newBufferFrom(d,"utf-8"):(function(w){var f,g,m,y,v,_=w.length,T=0;for(y=0;y<_;y++)(64512&(g=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(m=w.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(m-56320),y++),T+=g<128?1:g<2048?2:g<65536?3:4;for(f=o.uint8array?new Uint8Array(T):new Array(T),y=v=0;v<T;y++)(64512&(g=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(m=w.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(m-56320),y++),g<128?f[v++]=g:(g<2048?f[v++]=192|g>>>6:(g<65536?f[v++]=224|g>>>12:(f[v++]=240|g>>>18,f[v++]=128|g>>>12&63),f[v++]=128|g>>>6&63),f[v++]=128|63&g);return f})(d)},n.utf8decode=function(d){return o.nodebuffer?r.transformTo("nodebuffer",d).toString("utf-8"):(function(w){var f,g,m,y,v=w.length,_=new Array(2*v);for(f=g=0;f<v;)if((m=w[f++])<128)_[g++]=m;else if(4<(y=a[m]))_[g++]=65533,f+=y-1;else{for(m&=y===2?31:y===3?15:7;1<y&&f<v;)m=m<<6|63&w[f++],y--;1<y?_[g++]=65533:m<65536?_[g++]=m:(m-=65536,_[g++]=55296|m>>10&1023,_[g++]=56320|1023&m)}return _.length!==g&&(_.subarray?_=_.subarray(0,g):_.length=g),r.applyFromCharCode(_)})(d=r.transformTo(o.uint8array?"uint8array":"array",d))},r.inherits(c,s),c.prototype.processChunk=function(d){var w=r.transformTo(o.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=w;(w=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),w.set(f,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var g=(function(y,v){var _;for((v=v||y.length)>y.length&&(v=y.length),_=v-1;0<=_&&(192&y[_])==128;)_--;return _<0||_===0?v:_+a[y[_]]>v?_:v})(w),m=w;g!==w.length&&(o.uint8array?(m=w.subarray(0,g),this.leftOver=w.subarray(g,w.length)):(m=w.slice(0,g),this.leftOver=w.slice(g,w.length))),this.push({data:n.utf8decode(m),meta:d.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(h,s),h.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var r=t("./support"),o=t("./base64"),i=t("./nodejsUtils"),s=t("./external");function a(f){return f}function l(f,g){for(var m=0;m<f.length;++m)g[m]=255&f.charCodeAt(m);return g}t("setimmediate"),n.newBlob=function(f,g){n.checkSupport("blob");try{return new Blob([f],{type:g})}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return m.append(f),m.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(f,g,m){var y=[],v=0,_=f.length;if(_<=m)return String.fromCharCode.apply(null,f);for(;v<_;)g==="array"||g==="nodebuffer"?y.push(String.fromCharCode.apply(null,f.slice(v,Math.min(v+m,_)))):y.push(String.fromCharCode.apply(null,f.subarray(v,Math.min(v+m,_)))),v+=m;return y.join("")},stringifyByChar:function(f){for(var g="",m=0;m<f.length;m++)g+=String.fromCharCode(f[m]);return g},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,i.allocBuffer(1)).length===1}catch{return!1}})()}};function h(f){var g=65536,m=n.getTypeOf(f),y=!0;if(m==="uint8array"?y=c.applyCanBeUsed.uint8array:m==="nodebuffer"&&(y=c.applyCanBeUsed.nodebuffer),y)for(;1<g;)try{return c.stringifyByChunk(f,m,g)}catch{g=Math.floor(g/2)}return c.stringifyByChar(f)}function d(f,g){for(var m=0;m<f.length;m++)g[m]=f[m];return g}n.applyFromCharCode=h;var w={};w.string={string:a,array:function(f){return l(f,new Array(f.length))},arraybuffer:function(f){return w.string.uint8array(f).buffer},uint8array:function(f){return l(f,new Uint8Array(f.length))},nodebuffer:function(f){return l(f,i.allocBuffer(f.length))}},w.array={string:h,array:a,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(f)}},w.arraybuffer={string:function(f){return h(new Uint8Array(f))},array:function(f){return d(new Uint8Array(f),new Array(f.byteLength))},arraybuffer:a,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(new Uint8Array(f))}},w.uint8array={string:h,array:function(f){return d(f,new Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:a,nodebuffer:function(f){return i.newBufferFrom(f)}},w.nodebuffer={string:h,array:function(f){return d(f,new Array(f.length))},arraybuffer:function(f){return w.nodebuffer.uint8array(f).buffer},uint8array:function(f){return d(f,new Uint8Array(f.length))},nodebuffer:a},n.transformTo=function(f,g){if(g=g||"",!f)return g;n.checkSupport(f);var m=n.getTypeOf(g);return w[m][f](g)},n.resolve=function(f){for(var g=f.split("/"),m=[],y=0;y<g.length;y++){var v=g[y];v==="."||v===""&&y!==0&&y!==g.length-1||(v===".."?m.pop():m.push(v))}return m.join("/")},n.getTypeOf=function(f){if(typeof f=="string")return"string";var g=Object.prototype.toString.call(f);return g==="[object Array]"?"array":r.nodebuffer&&i.isBuffer(f)?"nodebuffer":r.uint8array&&g==="[object Uint8Array]"?"uint8array":r.arraybuffer&&g==="[object ArrayBuffer]"?"arraybuffer":void 0},n.checkSupport=function(f){if(!r[f.toLowerCase()])throw new Error(f+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(f){var g,m,y="";for(m=0;m<(f||"").length;m++)y+="\\x"+((g=f.charCodeAt(m))<16?"0":"")+g.toString(16).toUpperCase();return y},n.delay=function(f,g,m){setImmediate(function(){f.apply(m||null,g||[])})},n.inherits=function(f,g){function m(){}m.prototype=g.prototype,f.prototype=new m},n.extend=function(){var f,g,m={};for(f=0;f<arguments.length;f++)for(g in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],g)&&m[g]===void 0&&(m[g]=arguments[f][g]);return m},n.prepareContent=function(f,g,m,y,v){return s.Promise.resolve(g).then(function(_){return r.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)?Blob.prototype.arrayBuffer!==void 0?_.arrayBuffer():typeof FileReader<"u"?new s.Promise(function(T,D){var k=new FileReader;k.onload=function(F){T(F.target.result)},k.onerror=function(F){D(F.target.error)},k.readAsArrayBuffer(_)}):s.Promise.reject(new Error(f+" is a Blob, but we have no way of reading it.")):_}).then(function(_){var T=n.getTypeOf(_);return T?(T==="arraybuffer"?_=n.transformTo("uint8array",_):T==="string"&&(v?_=o.decode(_):m&&y!==!0&&(_=(function(D){return l(D,r.uint8array?new Uint8Array(D.length):new Array(D.length))})(_))),_):s.Promise.reject(new Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),o=t("./utils"),i=t("./signature"),s=t("./zipEntry"),a=t("./support");function l(c){this.files=[],this.loadOptions=c}l.prototype={checkSignature:function(c){if(!this.reader.readAndCheckSignature(c)){this.reader.index-=4;var h=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(h)+", expected "+o.pretty(c)+")")}},isSignature:function(c,h){var d=this.reader.index;this.reader.setIndex(c);var w=this.reader.readString(4)===h;return this.reader.setIndex(d),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var c=this.reader.readData(this.zipCommentLength),h=a.uint8array?"uint8array":"array",d=o.transformTo(h,c);this.zipComment=this.loadOptions.decodeFileName(d)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var c,h,d,w=this.zip64EndOfCentralSize-44;0<w;)c=this.reader.readInt(2),h=this.reader.readInt(4),d=this.reader.readData(h),this.zip64ExtensibleData[c]={id:c,length:h,value:d}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var c,h;for(c=0;c<this.files.length;c++)h=this.files[c],this.reader.setIndex(h.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),h.readLocalPart(this.reader),h.handleUTF8(),h.processAttributes()},readCentralDir:function(){var c;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(c=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(c);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var c=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(c<0)throw this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(c);var h=c;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(c=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(c),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var w=h-d;if(0<w)this.isSignature(h,i.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(c){this.reader=r(c)},load:function(c){this.prepareReader(c),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,e,n){"use strict";var r=t("./reader/readerFor"),o=t("./utils"),i=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),l=t("./compressions"),c=t("./support");function h(d,w){this.options=d,this.loadOptions=w}h.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var w,f;if(d.skip(22),this.fileNameLength=d.readInt(2),f=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(g){for(var m in l)if(Object.prototype.hasOwnProperty.call(l,m)&&l[m].magic===g)return l[m];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,w,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var w=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(w),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=r(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var w,f,g,m=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<m;)w=d.readInt(2),f=d.readInt(2),g=d.readData(f),this.extraFields[w]={id:w,length:f,value:g};d.setIndex(m)},handleUTF8:function(){var d=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var f=o.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var m=o.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(m)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var w=r(d.value);return w.readInt(1)!==1||s(this.fileName)!==w.readInt(4)?null:a.utf8decode(w.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var w=r(d.value);return w.readInt(1)!==1||s(this.fileComment)!==w.readInt(4)?null:a.utf8decode(w.readData(d.length-5))}return null}},e.exports=h},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,n){"use strict";function r(w,f,g){this.name=w,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=f,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var o=t("./stream/StreamHelper"),i=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),l=t("./stream/GenericWorker");r.prototype={internalStream:function(w){var f=null,g="string";try{if(!w)throw new Error("No output type specified.");var m=(g=w.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),f=this._decompressWorker();var y=!this._dataBinary;y&&!m&&(f=f.pipe(new s.Utf8EncodeWorker)),!y&&m&&(f=f.pipe(new s.Utf8DecodeWorker))}catch(v){(f=new l("error")).error(v)}return new o(f,g,"")},async:function(w,f){return this.internalStream(w).accumulate(f)},nodeStream:function(w,f){return this.internalStream(w||"nodebuffer").toNodejsStream(f)},_compressWorker:function(w,f){if(this._data instanceof a&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(g,w,f)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof l?this._data:new i(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<c.length;d++)r.prototype[c[d]]=h;e.exports=r},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,e,n){(function(r){"use strict";var o,i,s=r.MutationObserver||r.WebKitMutationObserver;if(s){var a=0,l=new s(w),c=r.document.createTextNode("");l.observe(c,{characterData:!0}),o=function(){c.data=a=++a%2}}else if(r.setImmediate||r.MessageChannel===void 0)o="document"in r&&"onreadystatechange"in r.document.createElement("script")?function(){var f=r.document.createElement("script");f.onreadystatechange=function(){w(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},r.document.documentElement.appendChild(f)}:function(){setTimeout(w,0)};else{var h=new r.MessageChannel;h.port1.onmessage=w,o=function(){h.port2.postMessage(0)}}var d=[];function w(){var f,g;i=!0;for(var m=d.length;m;){for(g=d,d=[],f=-1;++f<m;)g[f]();m=d.length}i=!1}e.exports=function(f){d.push(f)!==1||i||o()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,e,n){"use strict";var r=t("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],l=["PENDING"];function c(m){if(typeof m!="function")throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,m!==o&&f(this,m)}function h(m,y,v){this.promise=m,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof v=="function"&&(this.onRejected=v,this.callRejected=this.otherCallRejected)}function d(m,y,v){r(function(){var _;try{_=y(v)}catch(T){return i.reject(m,T)}_===m?i.reject(m,new TypeError("Cannot resolve promise with itself")):i.resolve(m,_)})}function w(m){var y=m&&m.then;if(m&&(typeof m=="object"||typeof m=="function")&&typeof y=="function")return function(){y.apply(m,arguments)}}function f(m,y){var v=!1;function _(k){v||(v=!0,i.reject(m,k))}function T(k){v||(v=!0,i.resolve(m,k))}var D=g(function(){y(T,_)});D.status==="error"&&_(D.value)}function g(m,y){var v={};try{v.value=m(y),v.status="success"}catch(_){v.status="error",v.value=_}return v}(e.exports=c).prototype.finally=function(m){if(typeof m!="function")return this;var y=this.constructor;return this.then(function(v){return y.resolve(m()).then(function(){return v})},function(v){return y.resolve(m()).then(function(){throw v})})},c.prototype.catch=function(m){return this.then(null,m)},c.prototype.then=function(m,y){if(typeof m!="function"&&this.state===a||typeof y!="function"&&this.state===s)return this;var v=new this.constructor(o);return this.state!==l?d(v,this.state===a?m:y,this.outcome):this.queue.push(new h(v,m,y)),v},h.prototype.callFulfilled=function(m){i.resolve(this.promise,m)},h.prototype.otherCallFulfilled=function(m){d(this.promise,this.onFulfilled,m)},h.prototype.callRejected=function(m){i.reject(this.promise,m)},h.prototype.otherCallRejected=function(m){d(this.promise,this.onRejected,m)},i.resolve=function(m,y){var v=g(w,y);if(v.status==="error")return i.reject(m,v.value);var _=v.value;if(_)f(m,_);else{m.state=a,m.outcome=y;for(var T=-1,D=m.queue.length;++T<D;)m.queue[T].callFulfilled(y)}return m},i.reject=function(m,y){m.state=s,m.outcome=y;for(var v=-1,_=m.queue.length;++v<_;)m.queue[v].callRejected(y);return m},c.resolve=function(m){return m instanceof this?m:i.resolve(new this(o),m)},c.reject=function(m){var y=new this(o);return i.reject(y,m)},c.all=function(m){var y=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=m.length,_=!1;if(!v)return this.resolve([]);for(var T=new Array(v),D=0,k=-1,F=new this(o);++k<v;)N(m[k],k);return F;function N(L,Y){y.resolve(L).then(function(S){T[Y]=S,++D!==v||_||(_=!0,i.resolve(F,T))},function(S){_||(_=!0,i.reject(F,S))})}},c.race=function(m){var y=this;if(Object.prototype.toString.call(m)!=="[object Array]")return this.reject(new TypeError("must be an array"));var v=m.length,_=!1;if(!v)return this.resolve([]);for(var T=-1,D=new this(o);++T<v;)k=m[T],y.resolve(k).then(function(F){_||(_=!0,i.resolve(D,F))},function(F){_||(_=!0,i.reject(D,F))});var k;return D}},{immediate:36}],38:[function(t,e,n){"use strict";var r={};(0,t("./lib/utils/common").assign)(r,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=r},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,n){"use strict";var r=t("./zlib/deflate"),o=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),l=Object.prototype.toString,c=0,h=-1,d=0,w=8;function f(m){if(!(this instanceof f))return new f(m);this.options=o.assign({level:h,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},m||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var v=r.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(v!==c)throw new Error(s[v]);if(y.header&&r.deflateSetHeader(this.strm,y.header),y.dictionary){var _;if(_=typeof y.dictionary=="string"?i.string2buf(y.dictionary):l.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(v=r.deflateSetDictionary(this.strm,_))!==c)throw new Error(s[v]);this._dict_set=!0}}function g(m,y){var v=new f(y);if(v.push(m,!0),v.err)throw v.msg||s[v.err];return v.result}f.prototype.push=function(m,y){var v,_,T=this.strm,D=this.options.chunkSize;if(this.ended)return!1;_=y===~~y?y:y===!0?4:0,typeof m=="string"?T.input=i.string2buf(m):l.call(m)==="[object ArrayBuffer]"?T.input=new Uint8Array(m):T.input=m,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new o.Buf8(D),T.next_out=0,T.avail_out=D),(v=r.deflate(T,_))!==1&&v!==c)return this.onEnd(v),!(this.ended=!0);T.avail_out!==0&&(T.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(i.buf2binstring(o.shrinkBuf(T.output,T.next_out))):this.onData(o.shrinkBuf(T.output,T.next_out)))}while((0<T.avail_in||T.avail_out===0)&&v!==1);return _===4?(v=r.deflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===c):_!==2||(this.onEnd(c),!(T.avail_out=0))},f.prototype.onData=function(m){this.chunks.push(m)},f.prototype.onEnd=function(m){m===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=m,this.msg=this.strm.msg},n.Deflate=f,n.deflate=g,n.deflateRaw=function(m,y){return(y=y||{}).raw=!0,g(m,y)},n.gzip=function(m,y){return(y=y||{}).gzip=!0,g(m,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,n){"use strict";var r=t("./zlib/inflate"),o=t("./utils/common"),i=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),l=t("./zlib/zstream"),c=t("./zlib/gzheader"),h=Object.prototype.toString;function d(f){if(!(this instanceof d))return new d(f);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},f||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||f&&f.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var m=r.inflateInit2(this.strm,g.windowBits);if(m!==s.Z_OK)throw new Error(a[m]);this.header=new c,r.inflateGetHeader(this.strm,this.header)}function w(f,g){var m=new d(g);if(m.push(f,!0),m.err)throw m.msg||a[m.err];return m.result}d.prototype.push=function(f,g){var m,y,v,_,T,D,k=this.strm,F=this.options.chunkSize,N=this.options.dictionary,L=!1;if(this.ended)return!1;y=g===~~g?g:g===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof f=="string"?k.input=i.binstring2buf(f):h.call(f)==="[object ArrayBuffer]"?k.input=new Uint8Array(f):k.input=f,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new o.Buf8(F),k.next_out=0,k.avail_out=F),(m=r.inflate(k,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&N&&(D=typeof N=="string"?i.string2buf(N):h.call(N)==="[object ArrayBuffer]"?new Uint8Array(N):N,m=r.inflateSetDictionary(this.strm,D)),m===s.Z_BUF_ERROR&&L===!0&&(m=s.Z_OK,L=!1),m!==s.Z_STREAM_END&&m!==s.Z_OK)return this.onEnd(m),!(this.ended=!0);k.next_out&&(k.avail_out!==0&&m!==s.Z_STREAM_END&&(k.avail_in!==0||y!==s.Z_FINISH&&y!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(v=i.utf8border(k.output,k.next_out),_=k.next_out-v,T=i.buf2string(k.output,v),k.next_out=_,k.avail_out=F-_,_&&o.arraySet(k.output,k.output,v,_,0),this.onData(T)):this.onData(o.shrinkBuf(k.output,k.next_out)))),k.avail_in===0&&k.avail_out===0&&(L=!0)}while((0<k.avail_in||k.avail_out===0)&&m!==s.Z_STREAM_END);return m===s.Z_STREAM_END&&(y=s.Z_FINISH),y===s.Z_FINISH?(m=r.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===s.Z_OK):y!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(k.avail_out=0))},d.prototype.onData=function(f){this.chunks.push(f)},d.prototype.onEnd=function(f){f===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Inflate=d,n.inflate=w,n.inflateRaw=function(f,g){return(g=g||{}).raw=!0,w(f,g)},n.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,n){"use strict";var r=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(s){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var l=a.shift();if(l){if(typeof l!="object")throw new TypeError(l+"must be non-object");for(var c in l)l.hasOwnProperty(c)&&(s[c]=l[c])}}return s},n.shrinkBuf=function(s,a){return s.length===a?s:s.subarray?s.subarray(0,a):(s.length=a,s)};var o={arraySet:function(s,a,l,c,h){if(a.subarray&&s.subarray)s.set(a.subarray(l,l+c),h);else for(var d=0;d<c;d++)s[h+d]=a[l+d]},flattenChunks:function(s){var a,l,c,h,d,w;for(a=c=0,l=s.length;a<l;a++)c+=s[a].length;for(w=new Uint8Array(c),a=h=0,l=s.length;a<l;a++)d=s[a],w.set(d,h),h+=d.length;return w}},i={arraySet:function(s,a,l,c,h){for(var d=0;d<c;d++)s[h+d]=a[l+d]},flattenChunks:function(s){return[].concat.apply([],s)}};n.setTyped=function(s){s?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(r)},{}],42:[function(t,e,n){"use strict";var r=t("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{i=!1}for(var s=new r.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function l(c,h){if(h<65537&&(c.subarray&&i||!c.subarray&&o))return String.fromCharCode.apply(null,r.shrinkBuf(c,h));for(var d="",w=0;w<h;w++)d+=String.fromCharCode(c[w]);return d}s[254]=s[254]=1,n.string2buf=function(c){var h,d,w,f,g,m=c.length,y=0;for(f=0;f<m;f++)(64512&(d=c.charCodeAt(f)))==55296&&f+1<m&&(64512&(w=c.charCodeAt(f+1)))==56320&&(d=65536+(d-55296<<10)+(w-56320),f++),y+=d<128?1:d<2048?2:d<65536?3:4;for(h=new r.Buf8(y),f=g=0;g<y;f++)(64512&(d=c.charCodeAt(f)))==55296&&f+1<m&&(64512&(w=c.charCodeAt(f+1)))==56320&&(d=65536+(d-55296<<10)+(w-56320),f++),d<128?h[g++]=d:(d<2048?h[g++]=192|d>>>6:(d<65536?h[g++]=224|d>>>12:(h[g++]=240|d>>>18,h[g++]=128|d>>>12&63),h[g++]=128|d>>>6&63),h[g++]=128|63&d);return h},n.buf2binstring=function(c){return l(c,c.length)},n.binstring2buf=function(c){for(var h=new r.Buf8(c.length),d=0,w=h.length;d<w;d++)h[d]=c.charCodeAt(d);return h},n.buf2string=function(c,h){var d,w,f,g,m=h||c.length,y=new Array(2*m);for(d=w=0;d<m;)if((f=c[d++])<128)y[w++]=f;else if(4<(g=s[f]))y[w++]=65533,d+=g-1;else{for(f&=g===2?31:g===3?15:7;1<g&&d<m;)f=f<<6|63&c[d++],g--;1<g?y[w++]=65533:f<65536?y[w++]=f:(f-=65536,y[w++]=55296|f>>10&1023,y[w++]=56320|1023&f)}return l(y,w)},n.utf8border=function(c,h){var d;for((h=h||c.length)>c.length&&(h=c.length),d=h-1;0<=d&&(192&c[d])==128;)d--;return d<0||d===0?h:d+s[c[d]]>h?d:h}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(r,o,i,s){for(var a=65535&r|0,l=r>>>16&65535|0,c=0;i!==0;){for(i-=c=2e3<i?2e3:i;l=l+(a=a+o[s++]|0)|0,--c;);a%=65521,l%=65521}return a|l<<16|0}},{}],44:[function(t,e,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,n){"use strict";var r=(function(){for(var o,i=[],s=0;s<256;s++){o=s;for(var a=0;a<8;a++)o=1&o?3988292384^o>>>1:o>>>1;i[s]=o}return i})();e.exports=function(o,i,s,a){var l=r,c=a+s;o^=-1;for(var h=a;h<c;h++)o=o>>>8^l[255&(o^i[h])];return-1^o}},{}],46:[function(t,e,n){"use strict";var r,o=t("../utils/common"),i=t("./trees"),s=t("./adler32"),a=t("./crc32"),l=t("./messages"),c=0,h=4,d=0,w=-2,f=-1,g=4,m=2,y=8,v=9,_=286,T=30,D=19,k=2*_+1,F=15,N=3,L=258,Y=L+N+1,S=42,$=113,p=1,P=2,st=3,M=4;function lt(u,R){return u.msg=l[R],R}function U(u){return(u<<1)-(4<u?9:0)}function nt(u){for(var R=u.length;0<=--R;)u[R]=0}function A(u){var R=u.state,I=R.pending;I>u.avail_out&&(I=u.avail_out),I!==0&&(o.arraySet(u.output,R.pending_buf,R.pending_out,I,u.next_out),u.next_out+=I,R.pending_out+=I,u.total_out+=I,u.avail_out-=I,R.pending-=I,R.pending===0&&(R.pending_out=0))}function E(u,R){i._tr_flush_block(u,0<=u.block_start?u.block_start:-1,u.strstart-u.block_start,R),u.block_start=u.strstart,A(u.strm)}function tt(u,R){u.pending_buf[u.pending++]=R}function G(u,R){u.pending_buf[u.pending++]=R>>>8&255,u.pending_buf[u.pending++]=255&R}function H(u,R){var I,x,b=u.max_chain_length,C=u.strstart,j=u.prev_length,B=u.nice_match,O=u.strstart>u.w_size-Y?u.strstart-(u.w_size-Y):0,X=u.window,J=u.w_mask,W=u.prev,Q=u.strstart+L,xt=X[C+j-1],dt=X[C+j];u.prev_length>=u.good_match&&(b>>=2),B>u.lookahead&&(B=u.lookahead);do if(X[(I=R)+j]===dt&&X[I+j-1]===xt&&X[I]===X[C]&&X[++I]===X[C+1]){C+=2,I++;do;while(X[++C]===X[++I]&&X[++C]===X[++I]&&X[++C]===X[++I]&&X[++C]===X[++I]&&X[++C]===X[++I]&&X[++C]===X[++I]&&X[++C]===X[++I]&&X[++C]===X[++I]&&C<Q);if(x=L-(Q-C),C=Q-L,j<x){if(u.match_start=R,B<=(j=x))break;xt=X[C+j-1],dt=X[C+j]}}while((R=W[R&J])>O&&--b!=0);return j<=u.lookahead?j:u.lookahead}function Ct(u){var R,I,x,b,C,j,B,O,X,J,W=u.w_size;do{if(b=u.window_size-u.lookahead-u.strstart,u.strstart>=W+(W-Y)){for(o.arraySet(u.window,u.window,W,W,0),u.match_start-=W,u.strstart-=W,u.block_start-=W,R=I=u.hash_size;x=u.head[--R],u.head[R]=W<=x?x-W:0,--I;);for(R=I=W;x=u.prev[--R],u.prev[R]=W<=x?x-W:0,--I;);b+=W}if(u.strm.avail_in===0)break;if(j=u.strm,B=u.window,O=u.strstart+u.lookahead,X=b,J=void 0,J=j.avail_in,X<J&&(J=X),I=J===0?0:(j.avail_in-=J,o.arraySet(B,j.input,j.next_in,J,O),j.state.wrap===1?j.adler=s(j.adler,B,J,O):j.state.wrap===2&&(j.adler=a(j.adler,B,J,O)),j.next_in+=J,j.total_in+=J,J),u.lookahead+=I,u.lookahead+u.insert>=N)for(C=u.strstart-u.insert,u.ins_h=u.window[C],u.ins_h=(u.ins_h<<u.hash_shift^u.window[C+1])&u.hash_mask;u.insert&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[C+N-1])&u.hash_mask,u.prev[C&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=C,C++,u.insert--,!(u.lookahead+u.insert<N)););}while(u.lookahead<Y&&u.strm.avail_in!==0)}function jt(u,R){for(var I,x;;){if(u.lookahead<Y){if(Ct(u),u.lookahead<Y&&R===c)return p;if(u.lookahead===0)break}if(I=0,u.lookahead>=N&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+N-1])&u.hash_mask,I=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),I!==0&&u.strstart-I<=u.w_size-Y&&(u.match_length=H(u,I)),u.match_length>=N)if(x=i._tr_tally(u,u.strstart-u.match_start,u.match_length-N),u.lookahead-=u.match_length,u.match_length<=u.max_lazy_match&&u.lookahead>=N){for(u.match_length--;u.strstart++,u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+N-1])&u.hash_mask,I=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart,--u.match_length!=0;);u.strstart++}else u.strstart+=u.match_length,u.match_length=0,u.ins_h=u.window[u.strstart],u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+1])&u.hash_mask;else x=i._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++;if(x&&(E(u,!1),u.strm.avail_out===0))return p}return u.insert=u.strstart<N-1?u.strstart:N-1,R===h?(E(u,!0),u.strm.avail_out===0?st:M):u.last_lit&&(E(u,!1),u.strm.avail_out===0)?p:P}function ft(u,R){for(var I,x,b;;){if(u.lookahead<Y){if(Ct(u),u.lookahead<Y&&R===c)return p;if(u.lookahead===0)break}if(I=0,u.lookahead>=N&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+N-1])&u.hash_mask,I=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),u.prev_length=u.match_length,u.prev_match=u.match_start,u.match_length=N-1,I!==0&&u.prev_length<u.max_lazy_match&&u.strstart-I<=u.w_size-Y&&(u.match_length=H(u,I),u.match_length<=5&&(u.strategy===1||u.match_length===N&&4096<u.strstart-u.match_start)&&(u.match_length=N-1)),u.prev_length>=N&&u.match_length<=u.prev_length){for(b=u.strstart+u.lookahead-N,x=i._tr_tally(u,u.strstart-1-u.prev_match,u.prev_length-N),u.lookahead-=u.prev_length-1,u.prev_length-=2;++u.strstart<=b&&(u.ins_h=(u.ins_h<<u.hash_shift^u.window[u.strstart+N-1])&u.hash_mask,I=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),--u.prev_length!=0;);if(u.match_available=0,u.match_length=N-1,u.strstart++,x&&(E(u,!1),u.strm.avail_out===0))return p}else if(u.match_available){if((x=i._tr_tally(u,0,u.window[u.strstart-1]))&&E(u,!1),u.strstart++,u.lookahead--,u.strm.avail_out===0)return p}else u.match_available=1,u.strstart++,u.lookahead--}return u.match_available&&(x=i._tr_tally(u,0,u.window[u.strstart-1]),u.match_available=0),u.insert=u.strstart<N-1?u.strstart:N-1,R===h?(E(u,!0),u.strm.avail_out===0?st:M):u.last_lit&&(E(u,!1),u.strm.avail_out===0)?p:P}function mt(u,R,I,x,b){this.good_length=u,this.max_lazy=R,this.nice_length=I,this.max_chain=x,this.func=b}function $t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*k),this.dyn_dtree=new o.Buf16(2*(2*T+1)),this.bl_tree=new o.Buf16(2*(2*D+1)),nt(this.dyn_ltree),nt(this.dyn_dtree),nt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(F+1),this.heap=new o.Buf16(2*_+1),nt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*_+1),nt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function kt(u){var R;return u&&u.state?(u.total_in=u.total_out=0,u.data_type=m,(R=u.state).pending=0,R.pending_out=0,R.wrap<0&&(R.wrap=-R.wrap),R.status=R.wrap?S:$,u.adler=R.wrap===2?0:1,R.last_flush=c,i._tr_init(R),d):lt(u,w)}function se(u){var R=kt(u);return R===d&&(function(I){I.window_size=2*I.w_size,nt(I.head),I.max_lazy_match=r[I.level].max_lazy,I.good_match=r[I.level].good_length,I.nice_match=r[I.level].nice_length,I.max_chain_length=r[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=N-1,I.match_available=0,I.ins_h=0})(u.state),R}function re(u,R,I,x,b,C){if(!u)return w;var j=1;if(R===f&&(R=6),x<0?(j=0,x=-x):15<x&&(j=2,x-=16),b<1||v<b||I!==y||x<8||15<x||R<0||9<R||C<0||g<C)return lt(u,w);x===8&&(x=9);var B=new $t;return(u.state=B).strm=u,B.wrap=j,B.gzhead=null,B.w_bits=x,B.w_size=1<<B.w_bits,B.w_mask=B.w_size-1,B.hash_bits=b+7,B.hash_size=1<<B.hash_bits,B.hash_mask=B.hash_size-1,B.hash_shift=~~((B.hash_bits+N-1)/N),B.window=new o.Buf8(2*B.w_size),B.head=new o.Buf16(B.hash_size),B.prev=new o.Buf16(B.w_size),B.lit_bufsize=1<<b+6,B.pending_buf_size=4*B.lit_bufsize,B.pending_buf=new o.Buf8(B.pending_buf_size),B.d_buf=1*B.lit_bufsize,B.l_buf=3*B.lit_bufsize,B.level=R,B.strategy=C,B.method=I,se(u)}r=[new mt(0,0,0,0,function(u,R){var I=65535;for(I>u.pending_buf_size-5&&(I=u.pending_buf_size-5);;){if(u.lookahead<=1){if(Ct(u),u.lookahead===0&&R===c)return p;if(u.lookahead===0)break}u.strstart+=u.lookahead,u.lookahead=0;var x=u.block_start+I;if((u.strstart===0||u.strstart>=x)&&(u.lookahead=u.strstart-x,u.strstart=x,E(u,!1),u.strm.avail_out===0)||u.strstart-u.block_start>=u.w_size-Y&&(E(u,!1),u.strm.avail_out===0))return p}return u.insert=0,R===h?(E(u,!0),u.strm.avail_out===0?st:M):(u.strstart>u.block_start&&(E(u,!1),u.strm.avail_out),p)}),new mt(4,4,8,4,jt),new mt(4,5,16,8,jt),new mt(4,6,32,32,jt),new mt(4,4,16,16,ft),new mt(8,16,32,32,ft),new mt(8,16,128,128,ft),new mt(8,32,128,256,ft),new mt(32,128,258,1024,ft),new mt(32,258,258,4096,ft)],n.deflateInit=function(u,R){return re(u,R,y,15,8,0)},n.deflateInit2=re,n.deflateReset=se,n.deflateResetKeep=kt,n.deflateSetHeader=function(u,R){return u&&u.state?u.state.wrap!==2?w:(u.state.gzhead=R,d):w},n.deflate=function(u,R){var I,x,b,C;if(!u||!u.state||5<R||R<0)return u?lt(u,w):w;if(x=u.state,!u.output||!u.input&&u.avail_in!==0||x.status===666&&R!==h)return lt(u,u.avail_out===0?-5:w);if(x.strm=u,I=x.last_flush,x.last_flush=R,x.status===S)if(x.wrap===2)u.adler=0,tt(x,31),tt(x,139),tt(x,8),x.gzhead?(tt(x,(x.gzhead.text?1:0)+(x.gzhead.hcrc?2:0)+(x.gzhead.extra?4:0)+(x.gzhead.name?8:0)+(x.gzhead.comment?16:0)),tt(x,255&x.gzhead.time),tt(x,x.gzhead.time>>8&255),tt(x,x.gzhead.time>>16&255),tt(x,x.gzhead.time>>24&255),tt(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),tt(x,255&x.gzhead.os),x.gzhead.extra&&x.gzhead.extra.length&&(tt(x,255&x.gzhead.extra.length),tt(x,x.gzhead.extra.length>>8&255)),x.gzhead.hcrc&&(u.adler=a(u.adler,x.pending_buf,x.pending,0)),x.gzindex=0,x.status=69):(tt(x,0),tt(x,0),tt(x,0),tt(x,0),tt(x,0),tt(x,x.level===9?2:2<=x.strategy||x.level<2?4:0),tt(x,3),x.status=$);else{var j=y+(x.w_bits-8<<4)<<8;j|=(2<=x.strategy||x.level<2?0:x.level<6?1:x.level===6?2:3)<<6,x.strstart!==0&&(j|=32),j+=31-j%31,x.status=$,G(x,j),x.strstart!==0&&(G(x,u.adler>>>16),G(x,65535&u.adler)),u.adler=1}if(x.status===69)if(x.gzhead.extra){for(b=x.pending;x.gzindex<(65535&x.gzhead.extra.length)&&(x.pending!==x.pending_buf_size||(x.gzhead.hcrc&&x.pending>b&&(u.adler=a(u.adler,x.pending_buf,x.pending-b,b)),A(u),b=x.pending,x.pending!==x.pending_buf_size));)tt(x,255&x.gzhead.extra[x.gzindex]),x.gzindex++;x.gzhead.hcrc&&x.pending>b&&(u.adler=a(u.adler,x.pending_buf,x.pending-b,b)),x.gzindex===x.gzhead.extra.length&&(x.gzindex=0,x.status=73)}else x.status=73;if(x.status===73)if(x.gzhead.name){b=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>b&&(u.adler=a(u.adler,x.pending_buf,x.pending-b,b)),A(u),b=x.pending,x.pending===x.pending_buf_size)){C=1;break}C=x.gzindex<x.gzhead.name.length?255&x.gzhead.name.charCodeAt(x.gzindex++):0,tt(x,C)}while(C!==0);x.gzhead.hcrc&&x.pending>b&&(u.adler=a(u.adler,x.pending_buf,x.pending-b,b)),C===0&&(x.gzindex=0,x.status=91)}else x.status=91;if(x.status===91)if(x.gzhead.comment){b=x.pending;do{if(x.pending===x.pending_buf_size&&(x.gzhead.hcrc&&x.pending>b&&(u.adler=a(u.adler,x.pending_buf,x.pending-b,b)),A(u),b=x.pending,x.pending===x.pending_buf_size)){C=1;break}C=x.gzindex<x.gzhead.comment.length?255&x.gzhead.comment.charCodeAt(x.gzindex++):0,tt(x,C)}while(C!==0);x.gzhead.hcrc&&x.pending>b&&(u.adler=a(u.adler,x.pending_buf,x.pending-b,b)),C===0&&(x.status=103)}else x.status=103;if(x.status===103&&(x.gzhead.hcrc?(x.pending+2>x.pending_buf_size&&A(u),x.pending+2<=x.pending_buf_size&&(tt(x,255&u.adler),tt(x,u.adler>>8&255),u.adler=0,x.status=$)):x.status=$),x.pending!==0){if(A(u),u.avail_out===0)return x.last_flush=-1,d}else if(u.avail_in===0&&U(R)<=U(I)&&R!==h)return lt(u,-5);if(x.status===666&&u.avail_in!==0)return lt(u,-5);if(u.avail_in!==0||x.lookahead!==0||R!==c&&x.status!==666){var B=x.strategy===2?(function(O,X){for(var J;;){if(O.lookahead===0&&(Ct(O),O.lookahead===0)){if(X===c)return p;break}if(O.match_length=0,J=i._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,J&&(E(O,!1),O.strm.avail_out===0))return p}return O.insert=0,X===h?(E(O,!0),O.strm.avail_out===0?st:M):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?p:P})(x,R):x.strategy===3?(function(O,X){for(var J,W,Q,xt,dt=O.window;;){if(O.lookahead<=L){if(Ct(O),O.lookahead<=L&&X===c)return p;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=N&&0<O.strstart&&(W=dt[Q=O.strstart-1])===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]){xt=O.strstart+L;do;while(W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&W===dt[++Q]&&Q<xt);O.match_length=L-(xt-Q),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=N?(J=i._tr_tally(O,1,O.match_length-N),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(J=i._tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),J&&(E(O,!1),O.strm.avail_out===0))return p}return O.insert=0,X===h?(E(O,!0),O.strm.avail_out===0?st:M):O.last_lit&&(E(O,!1),O.strm.avail_out===0)?p:P})(x,R):r[x.level].func(x,R);if(B!==st&&B!==M||(x.status=666),B===p||B===st)return u.avail_out===0&&(x.last_flush=-1),d;if(B===P&&(R===1?i._tr_align(x):R!==5&&(i._tr_stored_block(x,0,0,!1),R===3&&(nt(x.head),x.lookahead===0&&(x.strstart=0,x.block_start=0,x.insert=0))),A(u),u.avail_out===0))return x.last_flush=-1,d}return R!==h?d:x.wrap<=0?1:(x.wrap===2?(tt(x,255&u.adler),tt(x,u.adler>>8&255),tt(x,u.adler>>16&255),tt(x,u.adler>>24&255),tt(x,255&u.total_in),tt(x,u.total_in>>8&255),tt(x,u.total_in>>16&255),tt(x,u.total_in>>24&255)):(G(x,u.adler>>>16),G(x,65535&u.adler)),A(u),0<x.wrap&&(x.wrap=-x.wrap),x.pending!==0?d:1)},n.deflateEnd=function(u){var R;return u&&u.state?(R=u.state.status)!==S&&R!==69&&R!==73&&R!==91&&R!==103&&R!==$&&R!==666?lt(u,w):(u.state=null,R===$?lt(u,-3):d):w},n.deflateSetDictionary=function(u,R){var I,x,b,C,j,B,O,X,J=R.length;if(!u||!u.state||(C=(I=u.state).wrap)===2||C===1&&I.status!==S||I.lookahead)return w;for(C===1&&(u.adler=s(u.adler,R,J,0)),I.wrap=0,J>=I.w_size&&(C===0&&(nt(I.head),I.strstart=0,I.block_start=0,I.insert=0),X=new o.Buf8(I.w_size),o.arraySet(X,R,J-I.w_size,I.w_size,0),R=X,J=I.w_size),j=u.avail_in,B=u.next_in,O=u.input,u.avail_in=J,u.next_in=0,u.input=R,Ct(I);I.lookahead>=N;){for(x=I.strstart,b=I.lookahead-(N-1);I.ins_h=(I.ins_h<<I.hash_shift^I.window[x+N-1])&I.hash_mask,I.prev[x&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=x,x++,--b;);I.strstart=x,I.lookahead=N-1,Ct(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=N-1,I.match_available=0,u.next_in=B,u.input=O,u.avail_in=j,I.wrap=C,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,n){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,n){"use strict";e.exports=function(r,o){var i,s,a,l,c,h,d,w,f,g,m,y,v,_,T,D,k,F,N,L,Y,S,$,p,P;i=r.state,s=r.next_in,p=r.input,a=s+(r.avail_in-5),l=r.next_out,P=r.output,c=l-(o-r.avail_out),h=l+(r.avail_out-257),d=i.dmax,w=i.wsize,f=i.whave,g=i.wnext,m=i.window,y=i.hold,v=i.bits,_=i.lencode,T=i.distcode,D=(1<<i.lenbits)-1,k=(1<<i.distbits)-1;t:do{v<15&&(y+=p[s++]<<v,v+=8,y+=p[s++]<<v,v+=8),F=_[y&D];e:for(;;){if(y>>>=N=F>>>24,v-=N,(N=F>>>16&255)===0)P[l++]=65535&F;else{if(!(16&N)){if((64&N)==0){F=_[(65535&F)+(y&(1<<N)-1)];continue e}if(32&N){i.mode=12;break t}r.msg="invalid literal/length code",i.mode=30;break t}L=65535&F,(N&=15)&&(v<N&&(y+=p[s++]<<v,v+=8),L+=y&(1<<N)-1,y>>>=N,v-=N),v<15&&(y+=p[s++]<<v,v+=8,y+=p[s++]<<v,v+=8),F=T[y&k];n:for(;;){if(y>>>=N=F>>>24,v-=N,!(16&(N=F>>>16&255))){if((64&N)==0){F=T[(65535&F)+(y&(1<<N)-1)];continue n}r.msg="invalid distance code",i.mode=30;break t}if(Y=65535&F,v<(N&=15)&&(y+=p[s++]<<v,(v+=8)<N&&(y+=p[s++]<<v,v+=8)),d<(Y+=y&(1<<N)-1)){r.msg="invalid distance too far back",i.mode=30;break t}if(y>>>=N,v-=N,(N=l-c)<Y){if(f<(N=Y-N)&&i.sane){r.msg="invalid distance too far back",i.mode=30;break t}if($=m,(S=0)===g){if(S+=w-N,N<L){for(L-=N;P[l++]=m[S++],--N;);S=l-Y,$=P}}else if(g<N){if(S+=w+g-N,(N-=g)<L){for(L-=N;P[l++]=m[S++],--N;);if(S=0,g<L){for(L-=N=g;P[l++]=m[S++],--N;);S=l-Y,$=P}}}else if(S+=g-N,N<L){for(L-=N;P[l++]=m[S++],--N;);S=l-Y,$=P}for(;2<L;)P[l++]=$[S++],P[l++]=$[S++],P[l++]=$[S++],L-=3;L&&(P[l++]=$[S++],1<L&&(P[l++]=$[S++]))}else{for(S=l-Y;P[l++]=P[S++],P[l++]=P[S++],P[l++]=P[S++],2<(L-=3););L&&(P[l++]=P[S++],1<L&&(P[l++]=P[S++]))}break}}break}}while(s<a&&l<h);s-=L=v>>3,y&=(1<<(v-=L<<3))-1,r.next_in=s,r.next_out=l,r.avail_in=s<a?a-s+5:5-(s-a),r.avail_out=l<h?h-l+257:257-(l-h),i.hold=y,i.bits=v}},{}],49:[function(t,e,n){"use strict";var r=t("../utils/common"),o=t("./adler32"),i=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),l=1,c=2,h=0,d=-2,w=1,f=852,g=592;function m(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(S){var $;return S&&S.state?($=S.state,S.total_in=S.total_out=$.total=0,S.msg="",$.wrap&&(S.adler=1&$.wrap),$.mode=w,$.last=0,$.havedict=0,$.dmax=32768,$.head=null,$.hold=0,$.bits=0,$.lencode=$.lendyn=new r.Buf32(f),$.distcode=$.distdyn=new r.Buf32(g),$.sane=1,$.back=-1,h):d}function _(S){var $;return S&&S.state?(($=S.state).wsize=0,$.whave=0,$.wnext=0,v(S)):d}function T(S,$){var p,P;return S&&S.state?(P=S.state,$<0?(p=0,$=-$):(p=1+($>>4),$<48&&($&=15)),$&&($<8||15<$)?d:(P.window!==null&&P.wbits!==$&&(P.window=null),P.wrap=p,P.wbits=$,_(S))):d}function D(S,$){var p,P;return S?(P=new y,(S.state=P).window=null,(p=T(S,$))!==h&&(S.state=null),p):d}var k,F,N=!0;function L(S){if(N){var $;for(k=new r.Buf32(512),F=new r.Buf32(32),$=0;$<144;)S.lens[$++]=8;for(;$<256;)S.lens[$++]=9;for(;$<280;)S.lens[$++]=7;for(;$<288;)S.lens[$++]=8;for(a(l,S.lens,0,288,k,0,S.work,{bits:9}),$=0;$<32;)S.lens[$++]=5;a(c,S.lens,0,32,F,0,S.work,{bits:5}),N=!1}S.lencode=k,S.lenbits=9,S.distcode=F,S.distbits=5}function Y(S,$,p,P){var st,M=S.state;return M.window===null&&(M.wsize=1<<M.wbits,M.wnext=0,M.whave=0,M.window=new r.Buf8(M.wsize)),P>=M.wsize?(r.arraySet(M.window,$,p-M.wsize,M.wsize,0),M.wnext=0,M.whave=M.wsize):(P<(st=M.wsize-M.wnext)&&(st=P),r.arraySet(M.window,$,p-P,st,M.wnext),(P-=st)?(r.arraySet(M.window,$,p-P,P,0),M.wnext=P,M.whave=M.wsize):(M.wnext+=st,M.wnext===M.wsize&&(M.wnext=0),M.whave<M.wsize&&(M.whave+=st))),0}n.inflateReset=_,n.inflateReset2=T,n.inflateResetKeep=v,n.inflateInit=function(S){return D(S,15)},n.inflateInit2=D,n.inflate=function(S,$){var p,P,st,M,lt,U,nt,A,E,tt,G,H,Ct,jt,ft,mt,$t,kt,se,re,u,R,I,x,b=0,C=new r.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return d;(p=S.state).mode===12&&(p.mode=13),lt=S.next_out,st=S.output,nt=S.avail_out,M=S.next_in,P=S.input,U=S.avail_in,A=p.hold,E=p.bits,tt=U,G=nt,R=h;t:for(;;)switch(p.mode){case w:if(p.wrap===0){p.mode=13;break}for(;E<16;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(2&p.wrap&&A===35615){C[p.check=0]=255&A,C[1]=A>>>8&255,p.check=i(p.check,C,2,0),E=A=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&A)<<8)+(A>>8))%31){S.msg="incorrect header check",p.mode=30;break}if((15&A)!=8){S.msg="unknown compression method",p.mode=30;break}if(E-=4,u=8+(15&(A>>>=4)),p.wbits===0)p.wbits=u;else if(u>p.wbits){S.msg="invalid window size",p.mode=30;break}p.dmax=1<<u,S.adler=p.check=1,p.mode=512&A?10:12,E=A=0;break;case 2:for(;E<16;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(p.flags=A,(255&p.flags)!=8){S.msg="unknown compression method",p.mode=30;break}if(57344&p.flags){S.msg="unknown header flags set",p.mode=30;break}p.head&&(p.head.text=A>>8&1),512&p.flags&&(C[0]=255&A,C[1]=A>>>8&255,p.check=i(p.check,C,2,0)),E=A=0,p.mode=3;case 3:for(;E<32;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}p.head&&(p.head.time=A),512&p.flags&&(C[0]=255&A,C[1]=A>>>8&255,C[2]=A>>>16&255,C[3]=A>>>24&255,p.check=i(p.check,C,4,0)),E=A=0,p.mode=4;case 4:for(;E<16;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}p.head&&(p.head.xflags=255&A,p.head.os=A>>8),512&p.flags&&(C[0]=255&A,C[1]=A>>>8&255,p.check=i(p.check,C,2,0)),E=A=0,p.mode=5;case 5:if(1024&p.flags){for(;E<16;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}p.length=A,p.head&&(p.head.extra_len=A),512&p.flags&&(C[0]=255&A,C[1]=A>>>8&255,p.check=i(p.check,C,2,0)),E=A=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&(U<(H=p.length)&&(H=U),H&&(p.head&&(u=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),r.arraySet(p.head.extra,P,M,H,u)),512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,p.length-=H),p.length))break t;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(U===0)break t;for(H=0;u=P[M+H++],p.head&&u&&p.length<65536&&(p.head.name+=String.fromCharCode(u)),u&&H<U;);if(512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,u)break t}else p.head&&(p.head.name=null);p.length=0,p.mode=8;case 8:if(4096&p.flags){if(U===0)break t;for(H=0;u=P[M+H++],p.head&&u&&p.length<65536&&(p.head.comment+=String.fromCharCode(u)),u&&H<U;);if(512&p.flags&&(p.check=i(p.check,P,H,M)),U-=H,M+=H,u)break t}else p.head&&(p.head.comment=null);p.mode=9;case 9:if(512&p.flags){for(;E<16;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(A!==(65535&p.check)){S.msg="header crc mismatch",p.mode=30;break}E=A=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),S.adler=p.check=0,p.mode=12;break;case 10:for(;E<32;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}S.adler=p.check=m(A),E=A=0,p.mode=11;case 11:if(p.havedict===0)return S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=A,p.bits=E,2;S.adler=p.check=1,p.mode=12;case 12:if($===5||$===6)break t;case 13:if(p.last){A>>>=7&E,E-=7&E,p.mode=27;break}for(;E<3;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}switch(p.last=1&A,E-=1,3&(A>>>=1)){case 0:p.mode=14;break;case 1:if(L(p),p.mode=20,$!==6)break;A>>>=2,E-=2;break t;case 2:p.mode=17;break;case 3:S.msg="invalid block type",p.mode=30}A>>>=2,E-=2;break;case 14:for(A>>>=7&E,E-=7&E;E<32;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if((65535&A)!=(A>>>16^65535)){S.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&A,E=A=0,p.mode=15,$===6)break t;case 15:p.mode=16;case 16:if(H=p.length){if(U<H&&(H=U),nt<H&&(H=nt),H===0)break t;r.arraySet(st,P,M,H,lt),U-=H,M+=H,nt-=H,lt+=H,p.length-=H;break}p.mode=12;break;case 17:for(;E<14;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(p.nlen=257+(31&A),A>>>=5,E-=5,p.ndist=1+(31&A),A>>>=5,E-=5,p.ncode=4+(15&A),A>>>=4,E-=4,286<p.nlen||30<p.ndist){S.msg="too many length or distance symbols",p.mode=30;break}p.have=0,p.mode=18;case 18:for(;p.have<p.ncode;){for(;E<3;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}p.lens[j[p.have++]]=7&A,A>>>=3,E-=3}for(;p.have<19;)p.lens[j[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,I={bits:p.lenbits},R=a(0,p.lens,0,19,p.lencode,0,p.work,I),p.lenbits=I.bits,R){S.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have<p.nlen+p.ndist;){for(;mt=(b=p.lencode[A&(1<<p.lenbits)-1])>>>16&255,$t=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if($t<16)A>>>=ft,E-=ft,p.lens[p.have++]=$t;else{if($t===16){for(x=ft+2;E<x;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(A>>>=ft,E-=ft,p.have===0){S.msg="invalid bit length repeat",p.mode=30;break}u=p.lens[p.have-1],H=3+(3&A),A>>>=2,E-=2}else if($t===17){for(x=ft+3;E<x;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}E-=ft,u=0,H=3+(7&(A>>>=ft)),A>>>=3,E-=3}else{for(x=ft+7;E<x;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}E-=ft,u=0,H=11+(127&(A>>>=ft)),A>>>=7,E-=7}if(p.have+H>p.nlen+p.ndist){S.msg="invalid bit length repeat",p.mode=30;break}for(;H--;)p.lens[p.have++]=u}}if(p.mode===30)break;if(p.lens[256]===0){S.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,I={bits:p.lenbits},R=a(l,p.lens,0,p.nlen,p.lencode,0,p.work,I),p.lenbits=I.bits,R){S.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,I={bits:p.distbits},R=a(c,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,I),p.distbits=I.bits,R){S.msg="invalid distances set",p.mode=30;break}if(p.mode=20,$===6)break t;case 20:p.mode=21;case 21:if(6<=U&&258<=nt){S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=A,p.bits=E,s(S,G),lt=S.next_out,st=S.output,nt=S.avail_out,M=S.next_in,P=S.input,U=S.avail_in,A=p.hold,E=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;mt=(b=p.lencode[A&(1<<p.lenbits)-1])>>>16&255,$t=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(mt&&(240&mt)==0){for(kt=ft,se=mt,re=$t;mt=(b=p.lencode[re+((A&(1<<kt+se)-1)>>kt)])>>>16&255,$t=65535&b,!(kt+(ft=b>>>24)<=E);){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}A>>>=kt,E-=kt,p.back+=kt}if(A>>>=ft,E-=ft,p.back+=ft,p.length=$t,mt===0){p.mode=26;break}if(32&mt){p.back=-1,p.mode=12;break}if(64&mt){S.msg="invalid literal/length code",p.mode=30;break}p.extra=15&mt,p.mode=22;case 22:if(p.extra){for(x=p.extra;E<x;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}p.length+=A&(1<<p.extra)-1,A>>>=p.extra,E-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;mt=(b=p.distcode[A&(1<<p.distbits)-1])>>>16&255,$t=65535&b,!((ft=b>>>24)<=E);){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if((240&mt)==0){for(kt=ft,se=mt,re=$t;mt=(b=p.distcode[re+((A&(1<<kt+se)-1)>>kt)])>>>16&255,$t=65535&b,!(kt+(ft=b>>>24)<=E);){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}A>>>=kt,E-=kt,p.back+=kt}if(A>>>=ft,E-=ft,p.back+=ft,64&mt){S.msg="invalid distance code",p.mode=30;break}p.offset=$t,p.extra=15&mt,p.mode=24;case 24:if(p.extra){for(x=p.extra;E<x;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}p.offset+=A&(1<<p.extra)-1,A>>>=p.extra,E-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){S.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if(nt===0)break t;if(H=G-nt,p.offset>H){if((H=p.offset-H)>p.whave&&p.sane){S.msg="invalid distance too far back",p.mode=30;break}Ct=H>p.wnext?(H-=p.wnext,p.wsize-H):p.wnext-H,H>p.length&&(H=p.length),jt=p.window}else jt=st,Ct=lt-p.offset,H=p.length;for(nt<H&&(H=nt),nt-=H,p.length-=H;st[lt++]=jt[Ct++],--H;);p.length===0&&(p.mode=21);break;case 26:if(nt===0)break t;st[lt++]=p.length,nt--,p.mode=21;break;case 27:if(p.wrap){for(;E<32;){if(U===0)break t;U--,A|=P[M++]<<E,E+=8}if(G-=nt,S.total_out+=G,p.total+=G,G&&(S.adler=p.check=p.flags?i(p.check,st,G,lt-G):o(p.check,st,G,lt-G)),G=nt,(p.flags?A:m(A))!==p.check){S.msg="incorrect data check",p.mode=30;break}E=A=0}p.mode=28;case 28:if(p.wrap&&p.flags){for(;E<32;){if(U===0)break t;U--,A+=P[M++]<<E,E+=8}if(A!==(4294967295&p.total)){S.msg="incorrect length check",p.mode=30;break}E=A=0}p.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;default:return d}return S.next_out=lt,S.avail_out=nt,S.next_in=M,S.avail_in=U,p.hold=A,p.bits=E,(p.wsize||G!==S.avail_out&&p.mode<30&&(p.mode<27||$!==4))&&Y(S,S.output,S.next_out,G-S.avail_out)?(p.mode=31,-4):(tt-=S.avail_in,G-=S.avail_out,S.total_in+=tt,S.total_out+=G,p.total+=G,p.wrap&&G&&(S.adler=p.check=p.flags?i(p.check,st,G,S.next_out-G):o(p.check,st,G,S.next_out-G)),S.data_type=p.bits+(p.last?64:0)+(p.mode===12?128:0)+(p.mode===20||p.mode===15?256:0),(tt==0&&G===0||$===4)&&R===h&&(R=-5),R)},n.inflateEnd=function(S){if(!S||!S.state)return d;var $=S.state;return $.window&&($.window=null),S.state=null,h},n.inflateGetHeader=function(S,$){var p;return S&&S.state?(2&(p=S.state).wrap)==0?d:((p.head=$).done=!1,h):d},n.inflateSetDictionary=function(S,$){var p,P=$.length;return S&&S.state?(p=S.state).wrap!==0&&p.mode!==11?d:p.mode===11&&o(1,$,P,0)!==p.check?-3:Y(S,$,P,P)?(p.mode=31,-4):(p.havedict=1,h):d},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,n){"use strict";var r=t("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(l,c,h,d,w,f,g,m){var y,v,_,T,D,k,F,N,L,Y=m.bits,S=0,$=0,p=0,P=0,st=0,M=0,lt=0,U=0,nt=0,A=0,E=null,tt=0,G=new r.Buf16(16),H=new r.Buf16(16),Ct=null,jt=0;for(S=0;S<=15;S++)G[S]=0;for($=0;$<d;$++)G[c[h+$]]++;for(st=Y,P=15;1<=P&&G[P]===0;P--);if(P<st&&(st=P),P===0)return w[f++]=20971520,w[f++]=20971520,m.bits=1,0;for(p=1;p<P&&G[p]===0;p++);for(st<p&&(st=p),S=U=1;S<=15;S++)if(U<<=1,(U-=G[S])<0)return-1;if(0<U&&(l===0||P!==1))return-1;for(H[1]=0,S=1;S<15;S++)H[S+1]=H[S]+G[S];for($=0;$<d;$++)c[h+$]!==0&&(g[H[c[h+$]]++]=$);if(k=l===0?(E=Ct=g,19):l===1?(E=o,tt-=257,Ct=i,jt-=257,256):(E=s,Ct=a,-1),S=p,D=f,lt=$=A=0,_=-1,T=(nt=1<<(M=st))-1,l===1&&852<nt||l===2&&592<nt)return 1;for(;;){for(F=S-lt,L=g[$]<k?(N=0,g[$]):g[$]>k?(N=Ct[jt+g[$]],E[tt+g[$]]):(N=96,0),y=1<<S-lt,p=v=1<<M;w[D+(A>>lt)+(v-=y)]=F<<24|N<<16|L|0,v!==0;);for(y=1<<S-1;A&y;)y>>=1;if(y!==0?(A&=y-1,A+=y):A=0,$++,--G[S]==0){if(S===P)break;S=c[h+g[$]]}if(st<S&&(A&T)!==_){for(lt===0&&(lt=st),D+=p,U=1<<(M=S-lt);M+lt<P&&!((U-=G[M+lt])<=0);)M++,U<<=1;if(nt+=1<<M,l===1&&852<nt||l===2&&592<nt)return 1;w[_=A&T]=st<<24|M<<16|D-f|0}}return A!==0&&(w[D+A]=S-lt<<24|64<<16|0),m.bits=st,0}},{"../utils/common":41}],51:[function(t,e,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,n){"use strict";var r=t("../utils/common"),o=0,i=1;function s(b){for(var C=b.length;0<=--C;)b[C]=0}var a=0,l=29,c=256,h=c+1+l,d=30,w=19,f=2*h+1,g=15,m=16,y=7,v=256,_=16,T=17,D=18,k=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],F=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(h+2));s(Y);var S=new Array(2*d);s(S);var $=new Array(512);s($);var p=new Array(256);s(p);var P=new Array(l);s(P);var st,M,lt,U=new Array(d);function nt(b,C,j,B,O){this.static_tree=b,this.extra_bits=C,this.extra_base=j,this.elems=B,this.max_length=O,this.has_stree=b&&b.length}function A(b,C){this.dyn_tree=b,this.max_code=0,this.stat_desc=C}function E(b){return b<256?$[b]:$[256+(b>>>7)]}function tt(b,C){b.pending_buf[b.pending++]=255&C,b.pending_buf[b.pending++]=C>>>8&255}function G(b,C,j){b.bi_valid>m-j?(b.bi_buf|=C<<b.bi_valid&65535,tt(b,b.bi_buf),b.bi_buf=C>>m-b.bi_valid,b.bi_valid+=j-m):(b.bi_buf|=C<<b.bi_valid&65535,b.bi_valid+=j)}function H(b,C,j){G(b,j[2*C],j[2*C+1])}function Ct(b,C){for(var j=0;j|=1&b,b>>>=1,j<<=1,0<--C;);return j>>>1}function jt(b,C,j){var B,O,X=new Array(g+1),J=0;for(B=1;B<=g;B++)X[B]=J=J+j[B-1]<<1;for(O=0;O<=C;O++){var W=b[2*O+1];W!==0&&(b[2*O]=Ct(X[W]++,W))}}function ft(b){var C;for(C=0;C<h;C++)b.dyn_ltree[2*C]=0;for(C=0;C<d;C++)b.dyn_dtree[2*C]=0;for(C=0;C<w;C++)b.bl_tree[2*C]=0;b.dyn_ltree[2*v]=1,b.opt_len=b.static_len=0,b.last_lit=b.matches=0}function mt(b){8<b.bi_valid?tt(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf),b.bi_buf=0,b.bi_valid=0}function $t(b,C,j,B){var O=2*C,X=2*j;return b[O]<b[X]||b[O]===b[X]&&B[C]<=B[j]}function kt(b,C,j){for(var B=b.heap[j],O=j<<1;O<=b.heap_len&&(O<b.heap_len&&$t(C,b.heap[O+1],b.heap[O],b.depth)&&O++,!$t(C,B,b.heap[O],b.depth));)b.heap[j]=b.heap[O],j=O,O<<=1;b.heap[j]=B}function se(b,C,j){var B,O,X,J,W=0;if(b.last_lit!==0)for(;B=b.pending_buf[b.d_buf+2*W]<<8|b.pending_buf[b.d_buf+2*W+1],O=b.pending_buf[b.l_buf+W],W++,B===0?H(b,O,C):(H(b,(X=p[O])+c+1,C),(J=k[X])!==0&&G(b,O-=P[X],J),H(b,X=E(--B),j),(J=F[X])!==0&&G(b,B-=U[X],J)),W<b.last_lit;);H(b,v,C)}function re(b,C){var j,B,O,X=C.dyn_tree,J=C.stat_desc.static_tree,W=C.stat_desc.has_stree,Q=C.stat_desc.elems,xt=-1;for(b.heap_len=0,b.heap_max=f,j=0;j<Q;j++)X[2*j]!==0?(b.heap[++b.heap_len]=xt=j,b.depth[j]=0):X[2*j+1]=0;for(;b.heap_len<2;)X[2*(O=b.heap[++b.heap_len]=xt<2?++xt:0)]=1,b.depth[O]=0,b.opt_len--,W&&(b.static_len-=J[2*O+1]);for(C.max_code=xt,j=b.heap_len>>1;1<=j;j--)kt(b,X,j);for(O=Q;j=b.heap[1],b.heap[1]=b.heap[b.heap_len--],kt(b,X,1),B=b.heap[1],b.heap[--b.heap_max]=j,b.heap[--b.heap_max]=B,X[2*O]=X[2*j]+X[2*B],b.depth[O]=(b.depth[j]>=b.depth[B]?b.depth[j]:b.depth[B])+1,X[2*j+1]=X[2*B+1]=O,b.heap[1]=O++,kt(b,X,1),2<=b.heap_len;);b.heap[--b.heap_max]=b.heap[1],(function(dt,qt){var Tn,ae,Cn,Ot,Yn,jr,be=qt.dyn_tree,ki=qt.max_code,ol=qt.stat_desc.static_tree,il=qt.stat_desc.has_stree,sl=qt.stat_desc.extra_bits,Oi=qt.stat_desc.extra_base,kn=qt.stat_desc.max_length,qn=0;for(Ot=0;Ot<=g;Ot++)dt.bl_count[Ot]=0;for(be[2*dt.heap[dt.heap_max]+1]=0,Tn=dt.heap_max+1;Tn<f;Tn++)kn<(Ot=be[2*be[2*(ae=dt.heap[Tn])+1]+1]+1)&&(Ot=kn,qn++),be[2*ae+1]=Ot,ki<ae||(dt.bl_count[Ot]++,Yn=0,Oi<=ae&&(Yn=sl[ae-Oi]),jr=be[2*ae],dt.opt_len+=jr*(Ot+Yn),il&&(dt.static_len+=jr*(ol[2*ae+1]+Yn)));if(qn!==0){do{for(Ot=kn-1;dt.bl_count[Ot]===0;)Ot--;dt.bl_count[Ot]--,dt.bl_count[Ot+1]+=2,dt.bl_count[kn]--,qn-=2}while(0<qn);for(Ot=kn;Ot!==0;Ot--)for(ae=dt.bl_count[Ot];ae!==0;)ki<(Cn=dt.heap[--Tn])||(be[2*Cn+1]!==Ot&&(dt.opt_len+=(Ot-be[2*Cn+1])*be[2*Cn],be[2*Cn+1]=Ot),ae--)}})(b,C),jt(X,xt,b.bl_count)}function u(b,C,j){var B,O,X=-1,J=C[1],W=0,Q=7,xt=4;for(J===0&&(Q=138,xt=3),C[2*(j+1)+1]=65535,B=0;B<=j;B++)O=J,J=C[2*(B+1)+1],++W<Q&&O===J||(W<xt?b.bl_tree[2*O]+=W:O!==0?(O!==X&&b.bl_tree[2*O]++,b.bl_tree[2*_]++):W<=10?b.bl_tree[2*T]++:b.bl_tree[2*D]++,X=O,xt=(W=0)===J?(Q=138,3):O===J?(Q=6,3):(Q=7,4))}function R(b,C,j){var B,O,X=-1,J=C[1],W=0,Q=7,xt=4;for(J===0&&(Q=138,xt=3),B=0;B<=j;B++)if(O=J,J=C[2*(B+1)+1],!(++W<Q&&O===J)){if(W<xt)for(;H(b,O,b.bl_tree),--W!=0;);else O!==0?(O!==X&&(H(b,O,b.bl_tree),W--),H(b,_,b.bl_tree),G(b,W-3,2)):W<=10?(H(b,T,b.bl_tree),G(b,W-3,3)):(H(b,D,b.bl_tree),G(b,W-11,7));X=O,xt=(W=0)===J?(Q=138,3):O===J?(Q=6,3):(Q=7,4)}}s(U);var I=!1;function x(b,C,j,B){G(b,(a<<1)+(B?1:0),3),(function(O,X,J,W){mt(O),W&&(tt(O,J),tt(O,~J)),r.arraySet(O.pending_buf,O.window,X,J,O.pending),O.pending+=J})(b,C,j,!0)}n._tr_init=function(b){I||((function(){var C,j,B,O,X,J=new Array(g+1);for(O=B=0;O<l-1;O++)for(P[O]=B,C=0;C<1<<k[O];C++)p[B++]=O;for(p[B-1]=O,O=X=0;O<16;O++)for(U[O]=X,C=0;C<1<<F[O];C++)$[X++]=O;for(X>>=7;O<d;O++)for(U[O]=X<<7,C=0;C<1<<F[O]-7;C++)$[256+X++]=O;for(j=0;j<=g;j++)J[j]=0;for(C=0;C<=143;)Y[2*C+1]=8,C++,J[8]++;for(;C<=255;)Y[2*C+1]=9,C++,J[9]++;for(;C<=279;)Y[2*C+1]=7,C++,J[7]++;for(;C<=287;)Y[2*C+1]=8,C++,J[8]++;for(jt(Y,h+1,J),C=0;C<d;C++)S[2*C+1]=5,S[2*C]=Ct(C,5);st=new nt(Y,k,c+1,h,g),M=new nt(S,F,0,d,g),lt=new nt(new Array(0),N,0,w,y)})(),I=!0),b.l_desc=new A(b.dyn_ltree,st),b.d_desc=new A(b.dyn_dtree,M),b.bl_desc=new A(b.bl_tree,lt),b.bi_buf=0,b.bi_valid=0,ft(b)},n._tr_stored_block=x,n._tr_flush_block=function(b,C,j,B){var O,X,J=0;0<b.level?(b.strm.data_type===2&&(b.strm.data_type=(function(W){var Q,xt=4093624447;for(Q=0;Q<=31;Q++,xt>>>=1)if(1&xt&&W.dyn_ltree[2*Q]!==0)return o;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return i;for(Q=32;Q<c;Q++)if(W.dyn_ltree[2*Q]!==0)return i;return o})(b)),re(b,b.l_desc),re(b,b.d_desc),J=(function(W){var Q;for(u(W,W.dyn_ltree,W.l_desc.max_code),u(W,W.dyn_dtree,W.d_desc.max_code),re(W,W.bl_desc),Q=w-1;3<=Q&&W.bl_tree[2*L[Q]+1]===0;Q--);return W.opt_len+=3*(Q+1)+5+5+4,Q})(b),O=b.opt_len+3+7>>>3,(X=b.static_len+3+7>>>3)<=O&&(O=X)):O=X=j+5,j+4<=O&&C!==-1?x(b,C,j,B):b.strategy===4||X===O?(G(b,2+(B?1:0),3),se(b,Y,S)):(G(b,4+(B?1:0),3),(function(W,Q,xt,dt){var qt;for(G(W,Q-257,5),G(W,xt-1,5),G(W,dt-4,4),qt=0;qt<dt;qt++)G(W,W.bl_tree[2*L[qt]+1],3);R(W,W.dyn_ltree,Q-1),R(W,W.dyn_dtree,xt-1)})(b,b.l_desc.max_code+1,b.d_desc.max_code+1,J+1),se(b,b.dyn_ltree,b.dyn_dtree)),ft(b),B&&mt(b)},n._tr_tally=function(b,C,j){return b.pending_buf[b.d_buf+2*b.last_lit]=C>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&C,b.pending_buf[b.l_buf+b.last_lit]=255&j,b.last_lit++,C===0?b.dyn_ltree[2*j]++:(b.matches++,C--,b.dyn_ltree[2*(p[j]+c+1)]++,b.dyn_dtree[2*E(C)]++),b.last_lit===b.lit_bufsize-1},n._tr_align=function(b){G(b,2,3),H(b,v,Y),(function(C){C.bi_valid===16?(tt(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):8<=C.bi_valid&&(C.pending_buf[C.pending++]=255&C.bi_buf,C.bi_buf>>=8,C.bi_valid-=8)})(b)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.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(t,e,n){(function(r){(function(o,i){"use strict";if(!o.setImmediate){var s,a,l,c,h=1,d={},w=!1,f=o.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(o);g=g&&g.setTimeout?g:o,s={}.toString.call(o.process)==="[object process]"?function(_){process.nextTick(function(){y(_)})}:(function(){if(o.postMessage&&!o.importScripts){var _=!0,T=o.onmessage;return o.onmessage=function(){_=!1},o.postMessage("","*"),o.onmessage=T,_}})()?(c="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",v,!1):o.attachEvent("onmessage",v),function(_){o.postMessage(c+_,"*")}):o.MessageChannel?((l=new MessageChannel).port1.onmessage=function(_){y(_.data)},function(_){l.port2.postMessage(_)}):f&&"onreadystatechange"in f.createElement("script")?(a=f.documentElement,function(_){var T=f.createElement("script");T.onreadystatechange=function(){y(_),T.onreadystatechange=null,a.removeChild(T),T=null},a.appendChild(T)}):function(_){setTimeout(y,0,_)},g.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var T=new Array(arguments.length-1),D=0;D<T.length;D++)T[D]=arguments[D+1];var k={callback:_,args:T};return d[h]=k,s(h),h++},g.clearImmediate=m}function m(_){delete d[_]}function y(_){if(w)setTimeout(y,0,_);else{var T=d[_];if(T){w=!0;try{(function(D){var k=D.callback,F=D.args;switch(F.length){case 0:k();break;case 1:k(F[0]);break;case 2:k(F[0],F[1]);break;case 3:k(F[0],F[1],F[2]);break;default:k.apply(i,F)}})(T)}finally{m(_),w=!1}}}}function v(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(c)===0&&y(+_.data.slice(c.length))}})(typeof self>"u"?r===void 0?this:r:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var Ad={};pl(Ad,{Gaps:()=>An,applyPptModelToOnlyOfficePptDeck:()=>Ci,applyPptTextMutationToOnlyOfficeContent:()=>tl,attrStr:()=>rt,buildDefaultWordParts:()=>lo,buildFontTableXml:()=>io,buildNumberingXml:()=>as,buildSettingsXml:()=>so,buildStylesXml:()=>or,buildThemeXml:()=>oo,buildWebSettingsXml:()=>ao,colorToJson:()=>Oe,colorToOoxml:()=>Pt,esc:()=>z,extraAttr:()=>et,flatOpcToOnlyOfficeWriteback:()=>Ja,highlightToJson:()=>Ai,highlightToOoxml:()=>qe,jsonToFlatOpc:()=>co,jsonToFlatOpcWithStyles:()=>fs,jsonToOoxml:()=>nr,kid:()=>ht,kidsOf:()=>Vt,onlyKeys:()=>Ue,onlyOfficePptContentToTextBody:()=>Fr,onlyOfficePptDeckToPptModel:()=>Ti,ooOutlineToOoxml:()=>to,ooxmlToJson:()=>Qe,parseXml:()=>Nt,readExtra:()=>Rt,replaceOnlyOfficePptContentText:()=>vi,setOnlyOfficePptContentParagraphs:()=>Jn,setOnlyOfficePptContentRunStyle:()=>xi,setOnlyOfficePptContentStyle:()=>Vn,setOnlyOfficePptContentText:()=>Gn,styleToXml:()=>eo,unesc:()=>Qn,updateOnlyOfficePptDeckTextShape:()=>rl,withPackageLongTailParts:()=>xs});function Nt(t){let e=0,n=t.length;function r(){for(;e<n&&/\s/.test(t[e]);)e++;if(t[e]!=="<")return null;if(t.startsWith("<?",e)||t.startsWith("<!",e))return e=t.indexOf(">",e)+1,r();e++;let o="";for(;e<n&&!/[\s/>]/.test(t[e]);)o+=t[e++];let i={};for(;e<n&&t[e]!==">"&&t[e]!=="/";){for(;/\s/.test(t[e]);)e++;if(t[e]==="/"||t[e]===">")break;let a="";for(;e<n&&!/[\s=/>]/.test(t[e]);)a+=t[e++];for(;/\s/.test(t[e]);)e++;let l="";if(t[e]==="="){for(e++;/\s/.test(t[e]);)e++;let c=t[e++];for(;e<n&&t[e]!==c;)l+=t[e++];e++}i[a]=Qn(l)}if(t[e]==="/")return e+=2,{tag:o,attrs:i,kids:[]};e++;let s=[];for(;e<n;){if(t.startsWith("</",e)){e=t.indexOf(">",e)+1;break}if(t[e]==="<"){let a=r();a&&s.push(a)}else{let a="";for(;e<n&&t[e]!=="<";)a+=t[e++];a&&s.push({text:Qn(a)})}}return{tag:o,attrs:i,kids:s}}for(;e<n&&t[e]!=="<";)e++;return r()}var ht=(t,e)=>t&&t.kids?t.kids.find(n=>n.tag===e):void 0,Vt=(t,e)=>t&&t.kids?t.kids.filter(n=>n.tag===e):[],z=t=>String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),Qn=t=>String(t).replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&amp;/g,"&");function rt(t){let e="";for(let n of Object.keys(t))t[n]!=null&&(e+=` ${n}="${z(t[n])}"`);return e}var Br=t=>(t&255).toString(16).padStart(2,"0").toUpperCase(),Pt=t=>!t||t.auto?"auto":Br(t.r)+Br(t.g)+Br(t.b),Oe=t=>!t||t==="auto"?{auto:!0,r:0,g:0,b:0}:{auto:!1,r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)},Kt=(t,e)=>{let n=e&&e.auto&&(e.r||e.g||e.b)?`${e.r},${e.g},${e.b}`:null;return n?` ${t}="${n}"`:""},En=(t,e)=>{if(e&&t&&t.auto){let n=String(e).split(",").map(Number);t.r=n[0],t.g=n[1],t.b=n[2]}return t},tr={"000000":"black","0000FF":"blue","00FFFF":"cyan","000080":"darkBlue","008080":"darkCyan",808080:"darkGray","008000":"darkGreen",800080:"darkMagenta",8e5:"darkRed",808e3:"darkYellow","00FF00":"green",C0C0C0:"lightGray",FF00FF:"magenta",FF0000:"red",FFFFFF:"white",FFFF00:"yellow"},Ni=Object.fromEntries(Object.entries(tr).map(([t,e])=>[e,t]));function qe(t){if(!t||t.auto)return null;let e=Pt(t);if(tr[e])return tr[e];let n="none",r=1/0;for(let[o,i]of Object.entries(tr)){let s=parseInt(o.slice(0,2),16)-t.r,a=parseInt(o.slice(2,4),16)-t.g,l=parseInt(o.slice(4,6),16)-t.b,c=s*s+a*a+l*l;c<r&&(r=c,n=i)}return n}function Ai(t){if(!(!t||t==="none"))return Ni[t]?{auto:!1,...Oe(Ni[t])}:void 0}var Ii=new Set(["type","bFromDocument","bPresentation"]);function et(t,e,n="oo:x"){if(!t||typeof t!="object")return"";let r=e?new Set([...e,...Ii]):Ii,o={},i=!1;for(let s of Object.keys(t))r.has(s)||(o[s]=t[s],i=!0);return i?` ${n}="${z(JSON.stringify(o))}"`:""}function Rt(t,e="oo:x"){let n=t&&t.attrs?t.attrs[e]:null;if(!n)return{};try{return JSON.parse(n)}catch{return{}}}function Ue(t,e){let n=new Set(e);for(let r of Object.keys(t))if(!n.has(r))return!1;return!0}function Hr(t){if(!t)return"";let e=t.fill?` w:fill="${Pt(t.fill)}"${Kt("oo:frgb",t.fill)}`:"";return`<w:shd w:val="${t.val||"clear"}" w:color="${Pt(t.color)}"${Kt("oo:crgb",t.color)}${e}${et(t,["val","color","fill"])}/>`}function gl(t){if(!t)return"";let e="";t.pStyle!=null&&(e+=`<w:pStyle w:val="${z(t.pStyle)}"/>`);for(let n of["keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers"])t[n]===!0&&(e+=`<w:${n}/>`);if(e+=Hr(t.shd),t.spacing){let n=t.spacing,r={};n.before!=null&&(r["w:before"]=n.before),n.after!=null&&(r["w:after"]=n.after),n.line!=null&&(r["w:line"]=n.line),n.lineRule!=null&&(r["w:lineRule"]=n.lineRule),n.beforeAutoSpacing!=null&&(r["w:beforeAutospacing"]=n.beforeAutoSpacing==="off"?0:1),n.afterAutoSpacing!=null&&(r["w:afterAutospacing"]=n.afterAutoSpacing==="off"?0:1),e+=`<w:spacing${rt(r)}/>`}if(t.ind){let n=t.ind,r={};n.left!=null&&(r["w:left"]=n.left),n.right!=null&&(r["w:right"]=n.right),n.firstLine!=null&&(r["w:firstLine"]=n.firstLine),e+=`<w:ind${rt(r)}/>`}return t.jc!=null&&(e+=`<w:jc w:val="${t.jc}"/>`),e}function wl(t){let e="";if(t.rFonts){let r=t.rFonts,o={};for(let i of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme"])r[i]!=null&&(o["w:"+i]=r[i]);e+=`<w:rFonts${rt(o)}/>`}let n=(r,o)=>o===!0?`<w:${r}/>`:o===!1?`<w:${r} w:val="false"/>`:"";if(e+=n("b",t.b)+n("bCs",t.bCs)+n("i",t.i)+n("iCs",t.iCs),t.color&&(e+=`<w:color w:val="${Pt(t.color)}"${Kt("oo:rgb",t.color)}/>`),t.spacing!=null&&(e+=`<w:spacing w:val="${t.spacing}"/>`),t.sz!=null&&(e+=`<w:sz w:val="${t.sz}"/>`),t.szCs!=null&&(e+=`<w:szCs w:val="${t.szCs}"/>`),t.highlight){let r=qe(t.highlight);r&&(e+=`<w:highlight w:val="${r}"/>`)}if(t.vertAlign!=null&&(e+=`<w:vertAlign w:val="${typeof t.vertAlign=="object"?t.vertAlign.val||t.vertAlign.value:t.vertAlign}"/>`),e+=Hr(t.shd),t.lang){let r={};for(let o of["val","eastAsia","bidi"])t.lang[o]!=null&&(r["w:"+o]=t.lang[o]);e+=`<w:lang${rt(r)}/>`}return e}function zi(t){if(!t)return"";let e=wl(t),n=et(t);return e||n?`<w:rPr${n}>${e}</w:rPr>`:""}function yl(t){let e=t?.docPr||{},n={id:e.id??1,name:e.name??"Picture"};return e.descr!=null&&(n.descr=e.descr),e.title!=null&&(n.title=e.title),rt(n)}function bl(t){let e=t?.srcRect;if(!e||typeof e!="object")return"";let n={};for(let r of["l","t","r","b"])e[r]!=null&&(n[r]=e[r]);return Object.keys(n).length?`<a:srcRect${rt(n)}/>`:""}function ji(t){let e=t?.prstGeom?.prst??t?.custGeom?.preset??t?.geometry?.prst??t?.geometry?.preset??t?.prstGeom;return`<a:prstGeom prst="${z(typeof e=="string"?e:"rect")}"><a:avLst/></a:prstGeom>`}function Di(t){if(!t||typeof t!="object")return"";let e={};for(let n of["l","t","r","b"])t[n]!=null&&(e[n]=t[n]);return Object.keys(e).length?`<wp:effectExtent${rt(e)}/>`:""}function $i(t,e,n){if(!e||typeof e!="object")return`<wp:${t} relativeFrom="${n}"><wp:posOffset>0</wp:posOffset></wp:${t}>`;let r=e.relativeFrom||n,o=e.align!=null?`<wp:align>${z(e.align)}</wp:align>`:`<wp:posOffset>${z(e.posOffset??e.offset??0)}</wp:posOffset>`;return`<wp:${t} relativeFrom="${z(r)}">${o}</wp:${t}>`}function xl(t){let e=t?.wrapType||t?.wrap?.type||t?.wrappingType,n=t?.wrapText||t?.wrap?.wrapText||"bothSides";if(e==="none")return"<wp:wrapNone/>";if(e==="topAndBottom"||e==="topBottom")return"<wp:wrapTopAndBottom/>";if(e==="tight")return`<wp:wrapTight wrapText="${z(n)}"><wp:wrapPolygon edited="0"><wp:start x="0" y="0"/></wp:wrapPolygon></wp:wrapTight>`;if(e==="through"){let r=le(t?.wrapThrough?.edited??t?.wrap?.edited??!1);return`<wp:wrapThrough wrapText="${z(n)}"><wp:wrapPolygon edited="${z(r)}"><wp:start x="0" y="0"/></wp:wrapPolygon></wp:wrapThrough>`}return`<wp:wrapSquare wrapText="${z(n)}"/>`}function Mr(t,e,n,r,o){let i={distT:t?.distT??0,distB:t?.distB??0,distL:t?.distL??0,distR:t?.distR??0};if(t?.drawingType!=="anchor"&&t?.inline!==!1&&t?.anchor!==!0)return`<wp:inline${rt(i)}><wp:extent cx="${z(e)}" cy="${z(n)}"/>`+Di(t?.effectExtent)+`<wp:docPr${r}/>`+o+"</wp:inline>";let s=t?.simplePos&&typeof t.simplePos=="object"?t.simplePos:{},a={...i,simplePos:le(t?.simplePos===!0||t?.simplePos?.enabled===!0),relativeHeight:t?.relativeHeight??0,behindDoc:le(t?.behindDoc??!1),locked:le(t?.locked??!1),layoutInCell:le(t?.layoutInCell??!0),allowOverlap:le(t?.allowOverlap??!0)};return`<wp:anchor${rt(a)}><wp:simplePos x="${z(s.x??0)}" y="${z(s.y??0)}"/>`+$i("positionH",t?.positionH,"column")+$i("positionV",t?.positionV,"paragraph")+`<wp:extent cx="${z(e)}" cy="${z(n)}"/>`+Di(t?.effectExtent)+xl(t)+`<wp:docPr${r}/><wp:cNvGraphicFramePr/>`+o+"</wp:anchor>"}function vl(t){let e=t?.graphic,n=e?.blipFill||{},r=e?.spPr||{},o=n.rasterImageId,i=t?.extent?.cx??r?.xfrm?.ext?.cx??1,s=t?.extent?.cy??r?.xfrm?.ext?.cy??1,a=yl(t);if((e?.type==="shape"||e?.type==="connectShape")&&!o){let c=t?.content||e?.content,d=(Array.isArray(c?.content)?c.content:[]).map(Mi).join(""),w=`<a:graphic><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>${Wi(e)}<wps:spPr>${Xi(t,i,s)}</wps:spPr>${Ur(d,"wps")}</wps:wsp></a:graphicData></a:graphic>`;return`<w:drawing>${Mr(t,i,s,a,w)}</w:drawing>`}if(!o||!String(o).startsWith("rId"))return null;let l=`<a:graphic><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic><pic:nvPicPr><pic:cNvPr${a}/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="${z(o)}"/>${bl(n)}<a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${z(i)}" cy="${z(s)}"/></a:xfrm>${ji(r)}</pic:spPr></pic:pic></a:graphicData></a:graphic>`;return`<w:drawing>${Mr(t,i,s,a,l)}</w:drawing>`}function Pi(t,e){let n=e.customMarkFollows===!0?' w:customMarkFollows="1"':"";return`<w:${t} w:id="${z(e.footnote)}"${n}/>`}function _l(t){if(typeof t=="string")return`<w:t xml:space="preserve">${z(t)}</w:t>`;if(t&&t.type==="break"&&Ue(t,["type","breakType"])&&(t.breakType==="page"||t.breakType==="column"))return`<w:br w:type="${t.breakType}"/>`;if(t&&t.type==="tab"&&Ue(t,["type"]))return"<w:tab/>";if(t&&t.type==="separator"&&Ue(t,["type"]))return"<w:separator/>";if(t&&t.type==="continuationSeparator"&&Ue(t,["type"]))return"<w:continuationSeparator/>";if(t&&t.type==="footnoteRef"&&t.footnote!=null)return Pi("footnoteReference",t);if(t&&t.type==="endnoteRef"&&t.footnote!=null)return Pi("endnoteReference",t);if(t&&t.type==="paraDrawing"){let e=vl(t);if(e)return e}return`<oo:ci oo:v="${z(JSON.stringify(t))}"/>`}function Bi(t){let e=(t.content||[]).map(_l).join("");return`<w:r${et(t,["rPr","content","footnotes","endnotes"])}>${zi(t.rPr)}${e}</w:r>`}function Sl(t){let e=[],n=t.rId||t.id||t["r:id"];n?e.push(`r:id="${z(n)}"`):t.value&&e.push(`w:anchor="${z(String(t.value).replace(/^#/,""))}"`),t.tooltip&&e.push(`w:tooltip="${z(t.tooltip)}"`);let r=(t.content||[]).map(o=>o?.type==="run"?Bi(o):`<oo:pi oo:v="${z(JSON.stringify(o))}"/>`).join("");return`<w:hyperlink${e.length?" "+e.join(" "):""}>${r}</w:hyperlink>`}function Tl(t){return t.type==="endRun"?"":t.type==="run"?Bi(t):t.type==="hyperlink"?Sl(t):t.type==="commentRangeStart"&&t.id!=null?`<w:commentRangeStart w:id="${z(t.id)}"/>`:t.type==="commentRangeEnd"&&t.id!=null?`<w:commentRangeEnd w:id="${z(t.id)}"/><w:r><w:commentReference w:id="${z(t.id)}"/></w:r>`:t.type==="commentReference"&&t.id!=null?`<w:r><w:commentReference w:id="${z(t.id)}"/></w:r>`:`<oo:pi oo:v="${z(JSON.stringify(t))}"/>`}function Cl(t){let e=gl(t.pPr)+zi(t.rPr),n=et(t.pPr),r=e||n?`<w:pPr${n}>${e}</w:pPr>`:"",o=et(t,["pPr","rPr","content"]),i=(t.content||[]).find(a=>a.type==="endRun"),s=i?et(i,["rPr","content"],"oo:er"):"";return`<w:p${o}${s}>${r}${(t.content||[]).map(Tl).join("")}</w:p>`}function Nn(t){return(t||[]).map(e=>e.type==="table"?Dl(e):e.type==="paragraph"?Cl(e):`<oo:blk oo:v="${z(JSON.stringify(e))}"/>`).join("")}function kl(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=Pt(e.color)),`<w:${t}${rt(n)}${e.color?Kt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}var Ol=["top","left","bottom","right","insideH","insideV","start","end","between","bar"];function Li(t,e){if(!e)return"";let n="";for(let r of Ol)e[r]&&(n+=kl(r,e[r]));return Object.keys(e).length?`<w:${t}>${n}</w:${t}>`:`<w:${t}/>`}function Zr(t,e){if(!e)return"";let n={};e.type!=null&&(n["w:type"]=e.type);let r=e.w!=null?e.w:e.value;return r!=null&&(n["w:w"]=r),`<w:${t}${rt(n)}/>`}function El(t,e){if(!e)return"";let n="";for(let r of["top","left","bottom","right","start","end"])e[r]&&(n+=Zr(r,e[r]));return n?`<w:${t}>${n}</w:${t}>`:""}function Nl(t){if(!t)return"<w:tblPr/>";let e="";if(t.tblStyle!=null&&(e+=`<w:tblStyle w:val="${z(t.tblStyle)}"/>`),e+=Zr("tblW",t.tblW),t.jc!=null&&(e+=`<w:jc w:val="${t.jc}"/>`),e+=Li("tblBorders",t.tblBorders),e+=El("tblCellMar",t.tblCellMar),t.tblLayout!=null&&(e+=`<w:tblLayout w:type="${typeof t.tblLayout=="object"?t.tblLayout.type:t.tblLayout}"/>`),t.tblLook!=null&&typeof t.tblLook=="object"){let n={};for(let r of Object.keys(t.tblLook))r!=="type"&&(n["w:"+r]=t.tblLook[r]===!0?1:t.tblLook[r]===!1?0:t.tblLook[r]);e+=`<w:tblLook${rt(n)}/>`}return`<w:tblPr${et(t)}>${e}</w:tblPr>`}function Al(t){let e=t.tcPr||{},n="";n+=Zr("tcW",e.tcW),e.gridSpan!=null&&(n+=`<w:gridSpan w:val="${e.gridSpan}"/>`),e.vMerge!=null&&(n+=`<w:vMerge${e.vMerge&&e.vMerge!=="continue"?` w:val="${e.vMerge}"`:""}/>`),e.tcBorders&&(n+=Li("tcBorders",e.tcBorders)),n+=Hr(e.shd),e.vAlign!=null&&(n+=`<w:vAlign w:val="${typeof e.vAlign=="object"?e.vAlign.val||e.vAlign.value:e.vAlign}"/>`);let r=`<w:tcPr${et(e)}>${n}</w:tcPr>`,o=t.content&&Array.isArray(t.content.content)?t.content.content:Array.isArray(t.content)?t.content:[],i=Nn(o)||"<w:p/>";return`<w:tc${et(t,["tcPr","content"])}>${r}${i}</w:tc>`}function Il(t){let e=t.trPr||{},n="";e.tblHeader&&(n+="<w:tblHeader/>"),e.jc!=null&&(n+=`<w:jc w:val="${e.jc}"/>`),e.trHeight&&(n+=`<w:trHeight${rt({"w:val":e.trHeight.value!=null?e.trHeight.value:e.trHeight.val,"w:hRule":e.trHeight.hRule})}/>`);let r=n||et(e)?`<w:trPr${et(e)}>${n}</w:trPr>`:"",o=Array.isArray(t.content)?t.content:[];return`<w:tr${et(t,["trPr","content"])}>${r}${o.map(Al).join("")}</w:tr>`}function Dl(t){let e=(t.tblGrid||[]).map(o=>`<w:gridCol w:w="${o.w}"/>`).join(""),n=Array.isArray(t.content)?t.content:[];return`<w:tbl${et(t,["tblPr","tblGrid","content"])}>${Nl(t.tblPr)}<w:tblGrid>${e}</w:tblGrid>${n.map(Il).join("")}</w:tbl>`}function Mi(t){let e=[],n=r=>{typeof r=="string"?e.push(r):Array.isArray(r)?r.forEach(n):r&&typeof r=="object"&&(r.type==="run"||r.type==="paragraph")&&n(r.content)};return n(t),e.join("")}function Ur(t,e){return t?`<${e}:txbx><w:txbxContent><w:p><w:r><w:t xml:space="preserve">${z(t)}</w:t></w:r></w:p></w:txbxContent></${e}:txbx>`:""}function $l(t){return t?.graphic?.type!=="image"&&!t?.graphic?.blipFill?.rasterImageId}function Lr(t){let e=Number(t);return Number.isFinite(e)?Math.max(0,e/12700).toFixed(2).replace(/\.00$/,""):null}function Xr(t){let e=t?.color?.color?.rgba??t?.fill?.color?.color?.rgba??t?.fill?.fill?.color?.color?.rgba??t?.rgba??t?.color?.rgba??t?.fill?.color?.rgba??t?.fill?.fill?.color?.rgba;return!e||typeof e!="object"?null:{auto:!1,r:e.red??e.r??0,g:e.green??e.g??0,b:e.blue??e.b??0}}function Wr(t){return t?.type??t?.fill?.type??t?.fill?.fill?.type}function Ui(t){if(Wr(t)==="noFill")return"<a:noFill/>";let e=Xr(t);return e?`<a:solidFill><a:srgbClr val="${Pt(e)}"/></a:solidFill>`:""}function Pl(t){if(!t||typeof t!="object")return"";let e={};t.w!=null&&(e.w=t.w),t.cap!=null&&(e.cap=t.cap),t.cmpd!=null&&(e.cmpd=t.cmpd);let n=Ui(t.fill),r=t.prstDash?`<a:prstDash val="${z(t.prstDash)}"/>`:"",o=t.lineJoin?.type==="round"?"<a:round/>":"";return`<a:ln${rt(e)}>${n}${r}${o}</a:ln>`}function Xi(t,e,n){let r=t?.graphic?.spPr??{},o=r.xfrm??{},i={};for(let l of["flipH","flipV","rot"])o[l]!=null&&(i[l]=le(o[l]));let s=o.off??{},a=o.ext??{};return`<a:xfrm${rt(i)}><a:off x="${z(s.x??0)}" y="${z(s.y??0)}"/><a:ext cx="${z(a.cx??e)}" cy="${z(a.cy??n)}"/></a:xfrm>`+ji(r)+Ui(r.fill)+Pl(r.ln)}function Wi(t){if(t?.nvCxnSpPr){let e=t.nvCxnSpPr?.cNvCxnSpPr?.cxnSpLocks??{};return`<wps:cNvCnPr><a:cxnSpLocks${rt({noChangeShapeType:e.noChangeShapeType==null?void 0:le(e.noChangeShapeType)})}/></wps:cNvCnPr>`}return"<wps:cNvSpPr/>"}function Rl(t,e,n,r){let o=Lr(e),i=Lr(n),s={id:t};o!=null&&i!=null&&(s.style=`width:${o}pt;height:${i}pt`);let a=r?.fill;if(Wr(a)==="noFill")s.filled="f";else{let c=Xr(a);c&&(s.fillcolor=`#${Pt(c)}`)}let l=r?.ln;if(Wr(l?.fill)==="noFill")s.stroked="f";else{let c=Xr(l?.fill);c&&(s.strokecolor=`#${Pt(c)}`);let h=Lr(l?.w);h!=null&&(s.strokeweight=`${h}pt`)}return rt(s)}function Fl(t,e){let n=t&&(t.content||t.graphic?.content),o=(Array.isArray(n?.content)?n.content:[]).map(Mi).join(""),i=t?.docPr?.id??e+1,s=t?.docPr?.name??`Drawing ${e+1}`,a=t?.extent?.cx??t?.graphic?.spPr?.xfrm?.ext?.cx??1,l=t?.extent?.cy??t?.graphic?.spPr?.xfrm?.ext?.cy??1,c=Ur(o,"wps"),h=Ur(o,"v"),d=`<a:graphic><a:graphicData uri="http://schemas.microsoft.com/office/word/2010/wordprocessingShape"><wps:wsp>${Wi(t?.graphic)}<wps:spPr>${Xi(t,a,l)}</wps:spPr>${c}</wps:wsp></a:graphicData></a:graphic>`;return`<w:p oo:drawingObject="${z(e)}"><w:r><w:drawing>${Mr(t,a,l,rt({id:i,name:s}),d)}</w:drawing><w:pict><v:shape${Rl(s,a,l,t?.graphic?.spPr)}>${h}</v:shape></w:pict></w:r></w:p>`}function zl(t){let e=Array.isArray(t?.drawingObjects)?t.drawingObjects:[],n=new Set,r=o=>{if(!(!o||typeof o!="object")){if(o.type==="paraDrawing"&&o.docPr?.id!=null&&n.add(String(o.docPr.id)),Array.isArray(o)){o.forEach(r);return}Object.values(o).forEach(r)}};return r(t?.content),e.filter(o=>$l(o)&&(o?.docPr?.id==null||!n.has(String(o.docPr.id)))).map((o,i)=>Fl(o,i)).join("")}function le(t){return t===!0?1:t===!1?0:t}function Ri(t,e){if(!e||typeof e!="object")return"";let n="";for(let r of["first","default","even"]){let o=e[r];if(!o)continue;let i=typeof o=="string"?o:o.id||o.rId||o["r:id"];i&&(n+=`<w:${t} w:type="${r}" r:id="${z(i)}"/>`)}return n}function jl(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=Pt(e.color)),`<w:${t}${rt(n)}${e.color?Kt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}function Bl(t){return t&&typeof t=="object"?t.val??t.value??t.type:t}function er(t,e){let n=Bl(e);return n==null?"":`<w:${t} w:val="${z(String(n))}"/>`}function Fi(t,e){if(!e||typeof e!="object"||!Object.keys(e).length)return"";let n="";return n+=er("pos",e.pos??e.position),n+=er("numFmt",e.numFmt),n+=er("numStart",e.numStart??e.start),n+=er("numRestart",e.numRestart??e.restart),`<w:${t}${et(e,["pos","position","numFmt","numStart","start","numRestart","restart"])}>${n}</w:${t}>`}function Ll(t){if(!t||typeof t!="object")return"";let e="";if(e+=Ri("headerReference",t.headerReference),e+=Ri("footerReference",t.footerReference),e+=Fi("footnotePr",t.footnotePr),e+=Fi("endnotePr",t.endnotePr),t.type!=null&&(e+=`<w:type w:val="${z(t.type)}"/>`),t.pgSz){let n=t.pgSz,r={};n.w!=null&&(r["w:w"]=n.w),n.h!=null&&(r["w:h"]=n.h);let o=n.orient??n.orinet;o!=null&&(r["w:orient"]=o),e+=`<w:pgSz${rt(r)}${et(n,["w","h","orient","orinet"])}/>`}if(t.pgMar){let n=t.pgMar,r={};for(let o of["top","right","bottom","left","header","footer","gutter"])n[o]!=null&&(r["w:"+o]=n[o]);e+=`<w:pgMar${rt(r)}${et(n,["top","right","bottom","left","header","footer","gutter"])}/>`}if(t.pgBorders){let n=t.pgBorders,r="";for(let i of["top","left","bottom","right"])r+=jl(i,n[i]);let o={};for(let i of["display","offsetFrom","zOrder"])n[i]!=null&&(o["w:"+i]=n[i]);e+=`<w:pgBorders${rt(o)}${et(n,["top","left","bottom","right","display","offsetFrom","zOrder"])}>${r}</w:pgBorders>`}if(t.cols){let n=t.cols,r={};for(let i of["equalWidth","num","sep","space"])n[i]!=null&&(r["w:"+i]=le(n[i]));let o=Array.isArray(n.col)?n.col.map(i=>{let s={};for(let[a,l]of Object.entries(i))s["w:"+a]=le(l);return`<w:col${rt(s)}/>`}).join(""):"";e+=`<w:cols${rt(r)}${et(n,["col","equalWidth","num","sep","space"])}>${o}</w:cols>`}if(t.titlePg&&(e+="<w:titlePg/>"),t.pgNumType){let n=t.pgNumType,r={};for(let o of["start","fmt","chapStyle","chapSep"])n[o]!=null&&n[o]!==-1&&(r["w:"+o]=n[o]);(Object.keys(r).length||Object.keys(n).some(o=>!["start","fmt","chapStyle","chapSep"].includes(o)))&&(e+=`<w:pgNumType${rt(r)}${et(n,["start","fmt","chapStyle","chapSep"])}/>`)}return t.rtlGutter&&(e+="<w:rtlGutter/>"),`<w:sectPr${et(t,["headerReference","footerReference","footnotePr","endnotePr","type","pgSz","pgMar","pgBorders","cols","titlePg","pgNumType","rtlGutter"])}>${e}</w:sectPr>`}function nr(t){let e=zl(t)+Nn(t.content)+Ll(t.sectPr||t.sectionPr);return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:oo="urn:coco:oojson"><w:body${et(t,["content","sectPr","sectionPr","drawingObjects","commentMetadata","theme","styles","numbering"])}>${e}</w:body></w:document>`}var Ml=new Set(["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"]);function Ft(t,e){if(!t||typeof t!="object")return null;if(t.tag===e)return t;for(let n of t.kids||[]){let r=Ft(n,e);if(r)return r}return null}function Gi(t){return!t||typeof t!="object"?"":t.text!=null?String(t.text):(t.kids||[]).map(Gi).join("")}function At(t){let e=Number(t);return Number.isFinite(e)?e:void 0}function Ee(t,e=!1){return t==null||t===""?e:["1","true","t","on"].includes(String(t).toLowerCase())}function Ul(t,e){let n=Ft(t,e);return{x:At(n?.attrs?.x)??0,y:At(n?.attrs?.y)??0}}function Hi(t,e){let n=Ft(t,e);return{cx:At(n?.attrs?.cx)??0,cy:At(n?.attrs?.cy)??0}}function Zi(t,e,n){let r=Ft(t,e);return{relativeFrom:String(r?.attrs?.relativeFrom??n),posOffset:At(Gi(Ft(r,"wp:posOffset")))??0,percent:!1}}function Xl(t){let e=String(Ft(t,"a:srgbClr")?.attrs?.val??"").trim();if(!/^[0-9a-f]{6}$/i.test(e))return null;let n={red:Number.parseInt(e.slice(0,2),16),green:Number.parseInt(e.slice(2,4),16),blue:Number.parseInt(e.slice(4,6),16),alpha:255};return{fill:{color:{rgba:n,color:{rgba:n,type:"srgb"},mods:[],type:"uniColor"},type:"solid"},transparent:null,type:"fill",fillType:"solid"}}function Wl(t){return{ahLst:{ahPolar:[],ahXY:[]},avLst:{},adjLst:{},cnxLst:[{pos:{x:"l",y:"t"},ang:"cd4"},{pos:{x:"r",y:"b"},ang:"_3cd4"}],gdLst:[],pathLst:[{commands:[{id:"moveTo",pt:{x:"l",y:"t"}},{id:"lnTo",pt:{x:"r",y:"b"}}],extrusionOk:!1,fill:"norm",stroke:!0}],rect:null,preset:t}}function Hl(t){let e=String(Ft(t,"a:prstGeom")?.attrs?.prst??"");if(!Ml.has(e))return null;let n=Ft(t,"wp:anchor"),r=Ft(t,"wp:inline"),o=n||r;if(!o)return null;let i=Ft(o,"wp:docPr"),s=Ft(o,"wp:effectExtent"),a=Hi(o,"wp:extent"),l=Ft(t,"a:xfrm"),c=Hi(l,"a:ext"),h=Ft(t,"a:ln"),d=Ft(o,"wp:simplePos"),w=At(i?.attrs?.id)??1,f={id:w,name:String(i?.attrs?.name??`Line ${w}`),descr:i?.attrs?.descr==null?null:String(i.attrs.descr),title:i?.attrs?.title==null?null:String(i.attrs.title),hidden:null},g={id:-1,name:"",descr:null,title:null,hidden:null},m=Ft(t,"a:cxnSpLocks");return{type:"paraDrawing",docPr:f,effectExtent:{l:At(s?.attrs?.l)??0,t:At(s?.attrs?.t)??0,r:At(s?.attrs?.r)??0,b:At(s?.attrs?.b)??0},extent:a,graphic:{bWordShape:!0,extX:c.cx||a.cx,extY:c.cy||a.cy,nvCxnSpPr:{cNvPr:g,nvPr:{isPhoto:null,userDrawn:null},cNvCxnSpPr:{cxnSpLocks:{noChangeShapeType:Ee(m?.attrs?.noChangeShapeType,!0)}}},spPr:{custGeom:Wl(e),effectDag:null,effectLst:null,ln:{fill:Xl(h),lineJoin:Ft(h,"a:round")?{type:"round",lim:null}:null,algn:null,cap:h?.attrs?.cap??null,cmpd:h?.attrs?.cmpd??null,w:At(h?.attrs?.w)??0,headEnd:null,prstDash:String(Ft(h,"a:prstDash")?.attrs?.val??"solid"),tailEnd:null,type:"stroke"},fill:{fill:{type:"noFill"},transparent:null,type:"fill",fillType:"noFill"},xfrm:{ext:{cx:c.cx||a.cx,cy:c.cy},off:Ul(l,"a:off"),flipH:l?.attrs?.flipH==null?null:Ee(l.attrs.flipH),flipV:l?.attrs?.flipV==null?null:Ee(l.attrs.flipV),rot:At(l?.attrs?.rot)??null,chOffX:null,chOffY:null,chExtX:null,chExtY:null},bwMode:0},content:null,modelId:null,type:"connectShape",id:String(w)},cNvGraphicFramePr:{graphicFrameLocks:{}},positionH:Zi(o,"wp:positionH","column"),positionV:Zi(o,"wp:positionV","paragraph"),simplePos:{x:At(d?.attrs?.x)??0,y:At(d?.attrs?.y)??0,use:Ee(o.attrs?.simplePos,!1)},distB:At(o.attrs?.distB)??0,distL:At(o.attrs?.distL)??0,distR:At(o.attrs?.distR)??0,distT:At(o.attrs?.distT)??0,allowOverlap:Ee(o.attrs?.allowOverlap,!0),behindDoc:Ee(o.attrs?.behindDoc,!1),hidden:null,layoutInCell:Ee(o.attrs?.layoutInCell,!0),locked:Ee(o.attrs?.locked,!1),relativeHeight:At(o.attrs?.relativeHeight)??0,wrapType:"none",drawingType:n?"anchor":"inline"}}function Ji(t){let e=t?.tag==="w:drawing"?t:Ft(t,"w:drawing");return e?Hl(e):null}var Bt=t=>t==null||t===""?null:Number(t),An=class{constructor(){this.counts=new Map}add(e){this.counts.set(e,(this.counts.get(e)||0)+1)}merge(e){for(let[n,r]of e.counts)this.counts.set(n,(this.counts.get(n)||0)+r)}top(e=50){return[...this.counts.entries()].sort((n,r)=>r[1]-n[1]).slice(0,e)}get size(){return this.counts.size}};function Gr(t){if(!t)return;let e={val:t.attrs["w:val"],color:En(Oe(t.attrs["w:color"]),t.attrs["oo:crgb"])};return t.attrs["w:fill"]&&(e.fill=En(Oe(t.attrs["w:fill"]),t.attrs["oo:frgb"])),{...Rt(t),...e}}function Zl(t,e){let n={bFromDocument:!0,type:"paraPr"};if(!t)return n;let r=s=>ht(t,s);r("w:pStyle")&&(n.pStyle=r("w:pStyle").attrs["w:val"]);for(let s of["widowControl","keepNext","keepLines","pageBreakBefore","contextualSpacing","suppressLineNumbers"])r("w:"+s)&&(n[s]=!0);r("w:shd")&&(n.shd=Gr(r("w:shd")));let o=r("w:spacing");o&&(n.spacing={},o.attrs["w:before"]&&(n.spacing.before=Bt(o.attrs["w:before"])),o.attrs["w:after"]&&(n.spacing.after=Bt(o.attrs["w:after"])),o.attrs["w:line"]&&(n.spacing.line=Bt(o.attrs["w:line"])),o.attrs["w:lineRule"]&&(n.spacing.lineRule=o.attrs["w:lineRule"]),o.attrs["w:beforeAutospacing"]&&(n.spacing.beforeAutoSpacing=o.attrs["w:beforeAutospacing"]==="1"?"on":"off"),o.attrs["w:afterAutospacing"]&&(n.spacing.afterAutoSpacing=o.attrs["w:afterAutospacing"]==="1"?"on":"off"));let i=r("w:ind");return i&&(n.ind={},i.attrs["w:left"]&&(n.ind.left=Bt(i.attrs["w:left"])),i.attrs["w:right"]&&(n.ind.right=Bt(i.attrs["w:right"])),i.attrs["w:firstLine"]&&(n.ind.firstLine=Bt(i.attrs["w:firstLine"]))),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),{...Rt(t),...n}}function Vi(t,e){let n={bFromDocument:!0,type:"textPr"};if(!t)return n;let r=a=>ht(t,a),o=r("w:rFonts");if(o){n.rFonts={};for(let a of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme"])o.attrs["w:"+a]&&(n.rFonts[a]=o.attrs["w:"+a])}let i=a=>{let l=r("w:"+a);if(!l)return;let c=l.attrs["w:val"];return!(c==="false"||c==="0")};for(let a of["b","bCs","i","iCs"]){let l=i(a);l!==void 0&&(n[a]=l)}r("w:color")&&(n.color=En(Oe(r("w:color").attrs["w:val"]),r("w:color").attrs["oo:rgb"])),r("w:spacing")&&(n.spacing=Bt(r("w:spacing").attrs["w:val"])),r("w:sz")&&(n.sz=Bt(r("w:sz").attrs["w:val"])),r("w:szCs")&&(n.szCs=Bt(r("w:szCs").attrs["w:val"])),r("w:shd")&&(n.shd=Gr(r("w:shd"))),r("w:vertAlign")&&(n.vertAlign=r("w:vertAlign").attrs["w:val"]);let s=r("w:lang");if(s){n.lang={};for(let a of["val","eastAsia","bidi"])s.attrs["w:"+a]&&(n.lang[a]=s.attrs["w:"+a])}return{...Rt(t),...n}}function Jr(t,e){let n=[];for(let o of t.kids)if(o.tag==="w:t"||o.tag==="w:delText")n.push((o.kids||[]).filter(i=>i.text!=null).map(i=>i.text).join(""));else if(o.tag==="w:br"){let i=o.attrs["w:type"];n.push({type:"break",breakType:i==="column"?"column":"page"})}else if(o.tag==="w:tab")n.push({type:"tab"});else if(o.tag==="oo:ci")try{n.push(JSON.parse(o.attrs["oo:v"]))}catch{}else if(o.tag==="w:drawing"||o.tag==="mc:AlternateContent"){let i=Ji(o);i?n.push(i):e&&e.add("w:r>"+o.tag)}else o.tag&&o.tag!=="w:rPr"&&e&&e.add("w:r>"+o.tag);let r=Rt(t);return{...r,bFromDocument:!0,rPr:Vi(ht(t,"w:rPr"),e),content:n,footnotes:r.footnotes||[],endnotes:r.endnotes||[],reviewType:r.reviewType||"common",type:"run"}}var Ke={"w:ins":"add","w:del":"remove","w:moveTo":"add","w:moveFrom":"remove"};function Vr(t){return{userId:"",author:t.attrs["w:author"]||"",date:t.attrs["w:date"]||"",moveType:"noMove",prevType:-1}}function Yr(t,e,n,r,o){for(let i of t.kids)i.tag==="w:r"?r.push({...Jr(i,o),reviewType:e,reviewInfo:n}):Ke[i.tag]?Yr(i,Ke[i.tag],Vr(i),r,o):i.tag&&o&&o.add(t.tag+">"+i.tag)}function Gl(t,e,n){let r=[];for(let l of t.kids||[])if(l.tag==="w:r")r.push(Jr(l,e));else if(Ke[l.tag])Yr(l,Ke[l.tag],Vr(l),r,e);else if(l.tag==="oo:pi")try{r.push(JSON.parse(l.attrs["oo:v"]))}catch{}else l.tag&&e&&e.add("w:hyperlink>"+l.tag);let o=t.attrs["r:id"],s=(o&&n&&typeof n.get=="function"?n.get(o):null)?.target||t.attrs["w:anchor"]||"",a=t.attrs["w:tooltip"]||"";return{...Rt(t),...a?{tooltip:a}:{},...s?{value:s}:{},content:r,type:"hyperlink"}}function Yi(t,e){return!t||!e?t:t.type==="run"?{...t,rPr:{...t.rPr||{},...e,rFonts:{...t.rPr?.rFonts||{},...e.rFonts||{}}}}:t.type==="hyperlink"&&Array.isArray(t.content)?{...t,content:t.content.map(n=>Yi(n,e))}:t}function qi(t,e,n){let r=ht(t,"w:pPr"),o=Vi(r&&ht(r,"w:rPr"),e),i=[];for(let l of t.kids)if(l.tag==="w:r")i.push(Jr(l,e));else if(l.tag==="w:hyperlink")i.push(Gl(l,e,n));else if(Ke[l.tag])Yr(l,Ke[l.tag],Vr(l),i,e);else if(l.tag==="oo:pi")try{i.push(JSON.parse(l.attrs["oo:v"]))}catch{}else l.tag==="w:commentRangeStart"?i.push({type:"commentRangeStart",id:Number(l.attrs["w:id"])}):l.tag==="w:commentRangeEnd"?i.push({type:"commentRangeEnd",id:Number(l.attrs["w:id"])}):l.tag==="w:commentReference"?i.push({type:"commentReference",id:Number(l.attrs["w:id"])}):l.tag&&l.tag!=="w:pPr"&&e&&e.add("w:p>"+l.tag);for(let l=0;l<i.length;l+=1)i[l]=Yi(i[l],o);let s=Rt(t,"oo:er");i.push({bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...s,rPr:o,content:[],type:"endRun"});let a=Rt(t);return{...a,bFromDocument:!0,pPr:Zl(r,e),rPr:o,content:i,changes:a.changes||[],type:"paragraph"}}function Ki(t,e,n){let r=[];for(let o of t||[])if(o.tag==="w:p")r.push(qi(o,e,n));else if(o.tag==="w:tbl")r.push(nc(o,e,n));else if(o.tag==="oo:blk")try{r.push(JSON.parse(o.attrs["oo:v"]))}catch{}else o.tag&&o.tag!=="w:sectPr"&&o.tag!=="w:tcPr"&&o.tag!=="w:trPr"&&o.tag!=="w:tblPr"&&o.tag!=="w:tblGrid"&&e&&e.add("blk>"+o.tag);return r}var Jl=["top","left","bottom","right","insideH","insideV","start","end","between","bar"];function Vl(t){let e={color:En(Oe(t.attrs["w:color"]),t.attrs["oo:rgb"]),sz:Bt(t.attrs["w:sz"])||0,space:Bt(t.attrs["w:space"])||0,value:t.attrs["w:val"]};return{...Rt(t),...e}}function Qi(t){if(!t)return;let e={};for(let n of t.kids){let r=(n.tag||"").replace(/^w:/,"");Jl.includes(r)&&(e[r]=Vl(n))}return e}function qr(t){if(t)return{type:t.attrs["w:type"]||"auto",w:Bt(t.attrs["w:w"])||0}}function Yl(t){if(!t)return;let e={};for(let n of t.kids){let r=(n.tag||"").replace(/^w:/,"");["top","left","bottom","right","start","end"].includes(r)&&(e[r]=qr(n))}return Object.keys(e).length?e:void 0}function ql(t,e){let n={type:"tablePr"};if(!t)return n;let r=o=>ht(t,o);if(r("w:tblStyle")&&(n.tblStyle=r("w:tblStyle").attrs["w:val"]),r("w:tblW")&&(n.tblW=qr(r("w:tblW"))),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),r("w:tblBorders")&&(n.tblBorders=Qi(r("w:tblBorders"))),r("w:tblCellMar")&&(n.tblCellMar=Yl(r("w:tblCellMar"))),r("w:tblLayout")&&(n.tblLayout=r("w:tblLayout").attrs["w:type"]),r("w:tblLook")){let o=r("w:tblLook").attrs;n.tblLook={};for(let i of["firstColumn","firstRow","lastColumn","lastRow","noHBand","noVBand"])o["w:"+i]!=null&&(n.tblLook[i]=o["w:"+i]==="1"||o["w:"+i]==="true")}return{...Rt(t),...n}}function Kl(t,e){let n={type:"tableCellPr"};if(!t)return n;let r=o=>ht(t,o);return r("w:tcW")&&(n.tcW=qr(r("w:tcW"))),r("w:gridSpan")&&(n.gridSpan=Bt(r("w:gridSpan").attrs["w:val"])),r("w:vMerge")&&(n.vMerge=r("w:vMerge").attrs["w:val"]||"continue"),r("w:tcBorders")&&(n.tcBorders=Qi(r("w:tcBorders"))),r("w:shd")&&(n.shd=Gr(r("w:shd"))),r("w:vAlign")&&(n.vAlign=r("w:vAlign").attrs["w:val"]),{...Rt(t),...n}}function Ql(t,e){let n={type:"tableRowPr"};if(!t)return n;let r=o=>ht(t,o);return r("w:tblHeader")&&(n.tblHeader=!0),r("w:jc")&&(n.jc=r("w:jc").attrs["w:val"]),r("w:trHeight")&&(n.trHeight={val:Bt(r("w:trHeight").attrs["w:val"]),hRule:r("w:trHeight").attrs["w:hRule"]}),{...Rt(t),...n}}var ts=1;function tc(t,e,n){let r=Ki(t.kids,e,n),o=r.length?r:[qi({tag:"w:p",attrs:{},kids:[]},e,n)],i=Rt(t);return{...i,content:{bPresentation:!1,content:o,type:"docContent"},tcPr:Kl(ht(t,"w:tcPr"),e),id:i.id!=null?i.id:String(ts++),type:"tblCell"}}function ec(t,e,n){let r=Rt(t);return{...r,content:Vt(t,"w:tc").map(o=>tc(o,e,n)),reviewInfo:r.reviewInfo||{userId:"",author:"",date:"",moveType:"noMove",prevType:-1},reviewType:r.reviewType||"common",trPr:Ql(ht(t,"w:trPr"),e),type:"tblRow"}}function nc(t,e,n){let r=Vt(ht(t,"w:tblGrid"),"w:gridCol").map(i=>({w:Bt(i.attrs["w:w"]),type:"gridCol"})),o=Rt(t);return{...o,bPresentation:!1,tblGrid:r,tblPr:ql(ht(t,"w:tblPr"),e),content:Vt(t,"w:tr").map(i=>ec(i,e,n)),changes:o.changes||[],type:"table"}}function Qe(t,e=new An,n={}){ts=1;let r=Nt(t),o=ht(r,"w:body"),i={type:"document",paraPr:{bFromDocument:!0,type:"paraPr"},content:[]};if(!o)return{doc:i,gaps:e};let s=Ki(o.kids,e,n.relationships||n.rels),a=Rt(o);return{doc:{type:"document",paraPr:{bFromDocument:!0,type:"paraPr"},...a,content:s},gaps:e}}function rr(t){if(!t)return"";let e=t.fill?` w:fill="${Pt(t.fill)}"${Kt("oo:frgb",t.fill)}`:"";return`<w:shd w:val="${t.val||"clear"}" w:color="${Pt(t.color)}"${Kt("oo:crgb",t.color)}${e}${et(t,["val","color","fill"])}/>`}function rc(t,e){if(!e)return"";let n={},r=e.val!=null?e.val:e.value;return r!=null&&(n["w:val"]=r),e.sz!=null&&(n["w:sz"]=e.sz),e.space!=null&&(n["w:space"]=e.space),e.color&&(n["w:color"]=Pt(e.color)),`<w:${t}${rt(n)}${e.color?Kt("oo:rgb",e.color):""}${et(e,["color","sz","space","value","val"])}/>`}var oc=["top","left","bottom","right","insideH","insideV","start","end","between","bar","tl2br","tr2bl"];function Kr(t,e){if(!e)return"";let n="";for(let r of oc)e[r]&&(n+=rc(r,e[r]));return Object.keys(e).length?`<w:${t}>${n}</w:${t}>`:`<w:${t}/>`}function Qr(t,e){if(!e)return"";let n={};e.type!=null&&(n["w:type"]=e.type);let r=e.w!=null?e.w:e.value;return r!=null&&(n["w:w"]=r),`<w:${t}${rt(n)}${et(e,["type","w","value"])}/>`}function es(t,e){if(!e)return"";let n="";for(let r of["top","left","bottom","right","start","end"])e[r]&&(n+=Qr(r,e[r]));return n?`<w:${t}>${n}</w:${t}>`:""}function tn(t){return typeof t=="object"&&t!==null?t.val??t.value??t.type:t}function to(t){if(t==null)return null;let e=Number(t);if(!Number.isFinite(e))return null;let n=e-1;return n<0?0:n>9?9:n}function ic(t){if(!t)return"";let e="",n=tn(t.ilvl),r=tn(t.numId);return n!=null&&(e+=`<w:ilvl w:val="${z(String(n))}"/>`),r!=null&&(e+=`<w:numId w:val="${z(String(r))}"/>`),e||et(t,["ilvl","numId"])?`<w:numPr${et(t,["ilvl","numId"])}>${e}</w:numPr>`:""}function sc(t){if(!t)return"";let e=Array.isArray(t)?t:Array.isArray(t.tabs)?t.tabs:Array.isArray(t.list)?t.list:[],n="";for(let r of e){if(!r)continue;let o={},i=r.val??r.value??r.type;i!=null&&(o["w:val"]=i),r.pos!=null&&(o["w:pos"]=r.pos),r.leader!=null&&(o["w:leader"]=r.leader),n+=`<w:tab${rt(o)}${et(r,["val","value","type","pos","leader"])}/>`}return n?`<w:tabs>${n}</w:tabs>`:""}function ac(t,e={}){if(!t)return"";let n="";e.includeStyleRef&&t.pStyle!=null&&(n+=`<w:pStyle w:val="${z(String(t.pStyle))}"/>`);for(let o of["keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers"])t[o]===!0&&(n+=`<w:${o}/>`);if(n+=ic(t.numPr),n+=sc(t.tabs),n+=Kr("pBdr",t.pBdr),n+=rr(t.shd),t.spacing){let o=t.spacing,i={};o.before!=null&&(i["w:before"]=o.before),o.after!=null&&(i["w:after"]=o.after),o.line!=null&&(i["w:line"]=o.line),o.lineRule!=null&&(i["w:lineRule"]=o.lineRule),o.beforeAutoSpacing!=null&&(i["w:beforeAutospacing"]=o.beforeAutoSpacing==="off"?0:1),o.afterAutoSpacing!=null&&(i["w:afterAutospacing"]=o.afterAutoSpacing==="off"?0:1),n+=`<w:spacing${rt(i)}${et(o,["before","after","line","lineRule","beforeAutoSpacing","afterAutoSpacing"])}/>`}if(t.ind){let o=t.ind,i={};for(let s of["left","right","firstLine","hanging","start","end","firstLineChars","hangingChars"])o[s]!=null&&(i["w:"+s]=o[s]);n+=`<w:ind${rt(i)}${et(o,Object.keys(i).map(s=>s.slice(2)))}/>`}t.jc!=null&&(n+=`<w:jc w:val="${z(String(t.jc))}"/>`),t.textAlignment!=null&&(n+=`<w:textAlignment w:val="${z(String(tn(t.textAlignment)))}"/>`),t.bidi===!0&&(n+="<w:bidi/>");let r=to(t.outlineLvl);return r!=null&&(n+=`<w:outlineLvl w:val="${r}"/>`),n}function In(t){let e=ac(t),n=t?et(t,["pStyle","keepNext","keepLines","pageBreakBefore","widowControl","contextualSpacing","suppressLineNumbers","numPr","tabs","pBdr","shd","spacing","ind","jc","textAlignment","bidi","outlineLvl","type","bFromDocument"]):"";return e||n?`<w:pPr${n}>${e}</w:pPr>`:""}function lc(t){if(t==null)return"";if(t===!1)return'<w:u w:val="none"/>';if(t===!0)return'<w:u w:val="single"/>';if(typeof t!="object")return`<w:u w:val="${z(String(t))}"/>`;let e={},n=t.val??t.value??t.type;return n!=null&&(e["w:val"]=n),t.color&&(e["w:color"]=Pt(t.color)),`<w:u${rt(e)}${t.color?Kt("oo:rgb",t.color):""}${et(t,["val","value","type","color"])}/>`}function cc(t){if(!t)return"";let e="";if(t.rFonts){let r=t.rFonts,o={};for(let i of["ascii","hAnsi","eastAsia","cs","hint","asciiTheme","hAnsiTheme","eastAsiaTheme","cstheme","csTheme"])r[i]!=null&&(o["w:"+i]=r[i]);e+=`<w:rFonts${rt(o)}${et(r,Object.keys(o).map(i=>i.slice(2)))}/>`}let n=(r,o)=>o===!0?`<w:${r}/>`:o===!1?`<w:${r} w:val="false"/>`:"";for(let r of["b","bCs","i","iCs","strike","dstrike","caps","smallCaps","vanish","rtl","noProof"])e+=n(r,t[r]);if(e+=lc(t.u),t.color&&(e+=`<w:color w:val="${Pt(t.color)}"${Kt("oo:rgb",t.color)}/>`),t.spacing!=null&&(e+=`<w:spacing w:val="${t.spacing}"/>`),t.position!=null&&(e+=`<w:position w:val="${t.position}"/>`),t.kern!=null&&(e+=`<w:kern w:val="${t.kern}"/>`),t.sz!=null&&(e+=`<w:sz w:val="${t.sz}"/>`),t.szCs!=null&&(e+=`<w:szCs w:val="${t.szCs}"/>`),t.highlight){let r=qe(t.highlight);r&&(e+=`<w:highlight w:val="${r}"/>`)}if(t.vertAlign!=null&&(e+=`<w:vertAlign w:val="${z(String(tn(t.vertAlign)))}"/>`),e+=rr(t.shd),t.lang){let r={};for(let o of["val","eastAsia","bidi"])t.lang[o]!=null&&(r["w:"+o]=t.lang[o]);e+=`<w:lang${rt(r)}${et(t.lang,["val","eastAsia","bidi"])}/>`}return e}function Dn(t){let e=cc(t),n=t?et(t,["rFonts","b","bCs","i","iCs","strike","dstrike","caps","smallCaps","vanish","rtl","noProof","u","color","spacing","position","kern","sz","szCs","highlight","vertAlign","shd","lang","type","bFromDocument"]):"";return e||n?`<w:rPr${n}>${e}</w:rPr>`:""}function ns(t){if(!t)return"";let e="";if(t.tblStyle!=null&&(e+=`<w:tblStyle w:val="${z(String(t.tblStyle))}"/>`),e+=Qr("tblW",t.tblW),t.jc!=null&&(e+=`<w:jc w:val="${z(String(t.jc))}"/>`),e+=Kr("tblBorders",t.tblBorders),e+=rr(t.shd),e+=es("tblCellMar",t.tblCellMar),t.tblLayout!=null&&(e+=`<w:tblLayout w:type="${z(String(tn(t.tblLayout)))}"/>`),t.tblLook!=null&&typeof t.tblLook=="object"){let r={};for(let o of Object.keys(t.tblLook))o!=="type"&&(r["w:"+o]=t.tblLook[o]===!0?1:t.tblLook[o]===!1?0:t.tblLook[o]);e+=`<w:tblLook${rt(r)}/>`}let n=et(t,["tblStyle","tblW","jc","tblBorders","shd","tblCellMar","tblLayout","tblLook","type"]);return e||n?`<w:tblPr${n}>${e}</w:tblPr>`:""}function rs(t){if(!t)return"";let e="";t.tblHeader===!0&&(e+="<w:tblHeader/>"),t.cantSplit===!0&&(e+="<w:cantSplit/>"),t.jc!=null&&(e+=`<w:jc w:val="${z(String(t.jc))}"/>`),t.trHeight&&(e+=`<w:trHeight${rt({"w:val":t.trHeight.value!=null?t.trHeight.value:t.trHeight.val,"w:hRule":t.trHeight.hRule})}${et(t.trHeight,["value","val","hRule"])}/>`);let n=et(t,["tblHeader","cantSplit","jc","trHeight","type"]);return e||n?`<w:trPr${n}>${e}</w:trPr>`:""}function os(t){if(!t)return"";let e="";e+=Qr("tcW",t.tcW),t.gridSpan!=null&&(e+=`<w:gridSpan w:val="${t.gridSpan}"/>`),t.vMerge!=null&&(e+=`<w:vMerge${t.vMerge&&t.vMerge!=="continue"?` w:val="${z(String(t.vMerge))}"`:""}/>`),e+=Kr("tcBorders",t.tcBorders),e+=rr(t.shd),e+=es("tcMar",t.tcMar),t.vAlign!=null&&(e+=`<w:vAlign w:val="${z(String(tn(t.vAlign)))}"/>`),t.noWrap===!0&&(e+="<w:noWrap/>");let n=et(t,["tcW","gridSpan","vMerge","tcBorders","shd","tcMar","vAlign","noWrap","type"]);return e||n?`<w:tcPr${n}>${e}</w:tcPr>`:""}function uc(t){switch(t){case"paragraphStyle":return"paragraph";case"characterStyle":return"character";case"tableStyle":return"table";case"numberingStyle":return"numbering";case"character":case"table":case"numbering":case"paragraph":return t;default:return"paragraph"}}function fc(t){switch(t){case"topLeftCell":return"nwCell";case"topRightCell":return"neCell";case"bottomLeftCell":return"swCell";case"bottomRightCell":return"seCell";default:return t}}function dc(t,e){if(!e)return"";let n=fc(e.styleType??t);if(!n)return"";let r=In(e.pPr)+Dn(e.rPr)+ns(e.tblPr)+rs(e.trPr)+os(e.tcPr),o=et(e,["styleType","pPr","rPr","tblPr","trPr","tcPr","type"]);return r||o?`<w:tblStylePr w:type="${z(String(n))}"${o}>${r}</w:tblStylePr>`:""}function pc(t){if(!t||typeof t!="object")return"";let e="";for(let n of Object.keys(t))e+=dc(n,t[n]);return e}function eo(t,e){if(!e||t==null)return"";let r={"w:type":uc(e.styleType??e.type),"w:styleId":String(t)};e.default===!0&&(r["w:default"]="1"),e.customStyle===!0&&(r["w:customStyle"]="1");let o="";return e.name!=null&&(o+=`<w:name w:val="${z(String(e.name))}"/>`),e.basedOn!=null&&e.basedOn!==""&&(o+=`<w:basedOn w:val="${z(String(e.basedOn))}"/>`),e.next!=null&&e.next!==""&&(o+=`<w:next w:val="${z(String(e.next))}"/>`),e.link!=null&&e.link!==""&&(o+=`<w:link w:val="${z(String(e.link))}"/>`),e.hidden===!0&&(o+="<w:hidden/>"),e.uiPriority!=null&&(o+=`<w:uiPriority w:val="${e.uiPriority}"/>`),e.semiHidden===!0&&(o+="<w:semiHidden/>"),e.unhideWhenUsed===!0&&(o+="<w:unhideWhenUsed/>"),e.qFormat===!0&&(o+="<w:qFormat/>"),o+=In(e.pPr),o+=Dn(e.rPr),o+=ns(e.tblPr),o+=rs(e.trPr),o+=os(e.tcPr),o+=pc(e.tblStylePr),`<w:style${rt(r)}>${o}</w:style>`}function or(t,e){let n="";if(e&&(e.paraPr||e.textPr)){let o=Dn(e.textPr),i=In(e.paraPr);n=`<w:docDefaults><w:rPrDefault>${o}</w:rPrDefault><w:pPrDefault>${i}</w:pPrDefault></w:docDefaults>`}let r=(t||[]).map(o=>eo(o.styleId,o.def)).join("");return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">'+n+r+"</w:styles>"}function hc(t){return typeof t=="object"&&t!==null?t.val??t.value??t.type:t}function is(t){return!t||typeof t!="object"?[]:Array.isArray(t)?t.map((e,n)=>[String(e?.abstractNumId??e?.numId??n),e]):Object.keys(t).map(e=>[e,t[e]])}function mc(t,e){for(let n of e)if(t&&t[n]!=null)return t[n]}function Ut(t,e){let n=hc(e);return n==null?"":`<w:${t} w:val="${z(String(n))}"/>`}function no(t,e){if(!t||typeof t!="object")return"";let n=mc(t,["ilvl","level","lvl"]),r={"w:ilvl":String(n??e??0)},o="";o+=Ut("start",t.start),o+=Ut("numFmt",t.numFmt),o+=Ut("lvlRestart",t.lvlRestart??t.restart),o+=Ut("pStyle",t.pStyle),(t.isLgl===!0||t.legal===!0||t.isLegal===!0)&&(o+="<w:isLgl/>"),o+=Ut("suff",t.suff),o+=Ut("lvlPicBulletId",t.lvlPicBulletId??t.picBulletId),t.lvlText!=null&&(o+=`<w:lvlText w:val="${z(String(t.lvlText))}"/>`),o+=Ut("lvlJc",t.lvlJc),o+=In(t.pPr),o+=Dn(t.rPr);let i=et(t,["ilvl","level","lvl","start","numFmt","lvlRestart","restart","pStyle","isLgl","legal","isLegal","suff","lvlPicBulletId","picBulletId","lvlText","lvlJc","pPr","rPr","type"]);return`<w:lvl${rt(r)}${i}>${o}</w:lvl>`}function gc(t){return t?Array.isArray(t)?t.map((e,n)=>no(e,n)).join(""):typeof t!="object"?"":Object.keys(t).map(e=>no(t[e],Number(e))).join(""):""}function wc(t,e){if(!e||typeof e!="object")return"";let n=e.abstractNumId??e.id??t;if(n==null||n==="")return"";let r="";r+=Ut("nsid",e.nsid),r+=Ut("multiLevelType",e.multiLevelType),r+=Ut("tmpl",e.tmpl),r+=Ut("name",e.name),r+=Ut("styleLink",e.styleLink),r+=Ut("numStyleLink",e.numStyleLink),r+=gc(e.lvl??e.levels??e.Ec);let o=et(e,["abstractNumId","id","nsid","multiLevelType","tmpl","name","styleLink","numStyleLink","lvl","levels","Ec","type"]);return`<w:abstractNum w:abstractNumId="${z(String(n))}"${o}>${r}</w:abstractNum>`}function ss(t,e){if(!t||typeof t!="object")return"";let n=t.ilvl??t.level??e??0,r="";r+=Ut("startOverride",t.startOverride),r+=no(t.lvl??t.levelDef,n);let o=et(t,["ilvl","level","startOverride","lvl","levelDef","type"]);return`<w:lvlOverride w:ilvl="${z(String(n))}"${o}>${r}</w:lvlOverride>`}function yc(t){return t?Array.isArray(t)?t.map((e,n)=>ss(e,n)).join(""):typeof t!="object"?"":Object.keys(t).map(e=>ss(t[e],Number(e))).join(""):""}function bc(t,e){if(!e||typeof e!="object")return"";let n=e.numId??e.id??t;if(n==null||n==="")return"";let r=e.abstractNumId??e.abstractId??e.numStyleLink,o="";r!=null&&(o+=`<w:abstractNumId w:val="${z(String(r))}"/>`),o+=yc(e.lvlOverride??e.overrides);let i=et(e,["numId","id","abstractNumId","abstractId","numStyleLink","lvlOverride","overrides","type"]);return`<w:num w:numId="${z(String(n))}"${i}>${o}</w:num>`}function as(t){if(!t||typeof t!="object")return;let e=t.abstractNum??t.abstractNums,n=t.num??t.nums,r=is(e).map(([i,s])=>wc(i,s)).join(""),o=is(n).map(([i,s])=>bc(i,s)).join("");if(!(!r&&!o))return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">'+r+o+"</w:numbering>"}var Lt={document:"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml",styles:"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml",numbering:"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",fontTable:"application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml",settings:"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml",webSettings:"application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml",rels:"application/vnd.openxmlformats-package.relationships+xml",contentTypes:"application/vnd.openxmlformats-package.content-types+xml"},Ae={officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",numbering:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",fontTable:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",settings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",webSettings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"};function Ne(t,e,n){let r=n.replace(/^<\?xml[^>]*\?>/,"");return`<pkg:part pkg:name="${z(t)}" pkg:contentType="${z(e)}"><pkg:xmlData>${r}</pkg:xmlData></pkg:part>`}function xc(t,e,n){return`<pkg:part pkg:name="${z(t)}" pkg:contentType="${z(e)}" pkg:compression="store"><pkg:binaryData>${String(n).replace(/\s+/g,"")}</pkg:binaryData></pkg:part>`}function cs({id:t,type:e,target:n,targetMode:r}){let o=r?` TargetMode="${z(r)}"`:"";return`<Relationship Id="${z(t)}" Type="${z(e)}" Target="${z(n)}"${o}/>`}function vc(t){let e=String(t||"").replace(/^\//,""),n=e.lastIndexOf("/");return n===-1?`/_rels/${e}.rels`:`/${e.slice(0,n)}/_rels/${e.slice(n+1)}.rels`}function _c(t,e){if(!e.startsWith("/"))return e;let n=String(t||"").replace(/^\//,"").split("/").slice(0,-1),r=e.replace(/^\//,"").split("/");for(;n.length&&r[0]===n[0];)n.shift(),r.shift();return"../".repeat(n.length)+r.join("/")}function Sc(t,e){if(!t||typeof t!="object")return null;let n=String(t.name??"").trim(),r=String(t.contentType??"").trim();return!n||!r?null:{name:n.startsWith("/")?n:`/${n}`,contentType:r,xml:t.xml,binary:t.binary,rel:t.rel?{source:t.rel.source??"/word/document.xml",id:t.rel.id??`rIdExtra${e}`,type:t.rel.type,target:t.rel.target,targetMode:t.rel.targetMode}:void 0}}function Tc(t){return/^(https?:|mailto:|ftp:)/i.test(String(t||""))}function ir(t,e,n={index:1}){if(Array.isArray(t))return t.map(o=>ir(o,e,n));if(!t||typeof t!="object")return t;let r={...t};if(r.type==="hyperlink"&&Tc(r.value)&&!r.rId&&!r.id&&!r["r:id"]){let o=`rIdCocoHyperlink${n.index++}`;r.rId=o,e.push(cs({id:o,type:Ae.hyperlink,target:String(r.value),targetMode:"External"}))}return Array.isArray(r.content)&&(r.content=ir(r.content,e,n)),r.content&&typeof r.content=="object"&&!Array.isArray(r.content)&&(r.content=ir(r.content,e,n)),r}function ro(t){let e=Number.isFinite(Number(t))?Math.max(0,Math.min(255,Number(t))):0;return Math.round(e).toString(16).toUpperCase().padStart(2,"0")}function sr(t,e){return!t||typeof t!="object"?e:ro(t.red)+ro(t.green)+ro(t.blue)}function Qt(t,e,n){let r=e?.color||e;if(r?.type==="sys"){let o=sr(r.rgba,n.lastClr||n.val||"000000");return`<a:${t}><a:sysClr val="${z(r.id||n.sys||"windowText")}" lastClr="${z(o)}"/></a:${t}>`}return`<a:${t}><a:srgbClr val="${z(sr(r?.rgba,n.val))}"/></a:${t}>`}function te(t,e,n,r){return t?.themeElements?.fontScheme?.[e]?.[n]||r}function Cc(t){let n=t?.themeElements?.fontScheme?.name||"Office",r=te(t,"majorFont","latin","Cambria"),o=te(t,"majorFont","ea","\u5B8B\u4F53"),i=te(t,"majorFont","cs","Times New Roman"),s=te(t,"minorFont","latin","Calibri"),a=te(t,"minorFont","ea","\u5B8B\u4F53"),l=te(t,"minorFont","cs","Arial");return`<a:fontScheme name="${z(n)}"><a:majorFont><a:latin typeface="${z(r)}"/><a:ea typeface="${z(o)}"/><a:cs typeface="${z(i)}"/></a:majorFont><a:minorFont><a:latin typeface="${z(s)}"/><a:ea typeface="${z(a)}"/><a:cs typeface="${z(l)}"/></a:minorFont></a:fontScheme>`}function us(t,e="phClr"){let n=t?.solidFill??t,r=n?.schemeClr??n?.schemeColor??n?.color;if(typeof r=="string")return`<a:solidFill><a:schemeClr val="${z(r)}"/></a:solidFill>`;if(r?.val||r?.id)return`<a:solidFill><a:schemeClr val="${z(r.val||r.id)}"/></a:solidFill>`;let o=n?.srgbClr??n?.rgb??sr(r?.rgba,null);return o?`<a:solidFill><a:srgbClr val="${z(String(o).replace(/^#/,"").toUpperCase())}"/></a:solidFill>`:`<a:solidFill><a:schemeClr val="${z(e)}"/></a:solidFill>`}function kc(t,e="phClr"){let n=t?.schemeClr??t?.schemeColor??t?.color??t;if(typeof n=="string")return`<a:schemeClr val="${z(n)}"/>`;if(n?.val||n?.id)return`<a:schemeClr val="${z(n.val||n.id)}"/>`;let r=t?.srgbClr??t?.rgb??sr(n?.rgba??t?.rgba,null);return r?`<a:srgbClr val="${z(String(r).replace(/^#/,"").toUpperCase())}"/>`:`<a:schemeClr val="${z(e)}"/>`}function Oc(t){if(!t||typeof t!="object")return"";let e={};for(let n of["blurRad","dist","dir","sx","sy","kx","ky","algn","rotWithShape"])t[n]!=null&&(e[n]=t[n]);return`<a:outerShdw${rt(e)}>${kc(t.solidFill??t.fill??t.color)}</a:outerShdw>`}function Ec(t){let e=Array.isArray(t)?t:t?[t]:[];return`<a:effectStyleLst>${(e.length?e:[{effectLst:{}}]).map(r=>{let o=r.effectLst??r.effects??r,i=o.outerShdw??o.outerShadow;return`<a:effectStyle><a:effectLst>${Oc(i)}</a:effectLst></a:effectStyle>`}).join("")}</a:effectStyleLst>`}function ls(t,e){let n=Array.isArray(e)?e:e?[e]:[],r=(n.length?n:[{solidFill:{schemeClr:"phClr"}}]).map(o=>us(o)).join("");return`<a:${t}>${r}</a:${t}>`}function Nc(t){let e=Array.isArray(t)?t:t?[t]:[];return`<a:lnStyleLst>${(e.length?e:[{w:9525,cap:"flat",cmpd:"sng",algn:"ctr",solidFill:{schemeClr:"phClr"}}]).map(r=>{let o={w:r.w??r.width??9525,cap:r.cap??"flat",cmpd:r.cmpd??"sng",algn:r.algn??r.align??"ctr"};return`<a:ln${rt(o)}>${us(r.solidFill?r:r.fill??r)}</a:ln>`}).join("")}</a:lnStyleLst>`}function Ac(t){let e=t?.themeElements?.fmtScheme,n=e?.name||"Office";return`<a:fmtScheme name="${z(n)}">`+ls("fillStyleLst",e?.fillStyleLst??e?.fillStyles)+Nc(e?.lnStyleLst??e?.lineStyleLst??e?.lineStyles)+Ec(e?.effectStyleLst??e?.effectStyles)+ls("bgFillStyleLst",e?.bgFillStyleLst??e?.bgFillStyles)+"</a:fmtScheme>"}function oo(t){let e=t?.themeElements?.clrScheme,n=t?.name||"Office Theme",r=e?.name||"Office";return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="${z(n)}"><a:themeElements><a:clrScheme name="${z(r)}">`+Qt("dk1",e?.dk1,{sys:"windowText",lastClr:"000000"})+Qt("lt1",e?.lt1,{sys:"window",lastClr:"FFFFFF"})+Qt("dk2",e?.dk2,{val:"1F497D"})+Qt("lt2",e?.lt2,{val:"EEECE1"})+Qt("accent1",e?.accent1,{val:"4F81BD"})+Qt("accent2",e?.accent2,{val:"C0504D"})+Qt("accent3",e?.accent3,{val:"9BBB59"})+Qt("accent4",e?.accent4,{val:"8064A2"})+Qt("accent5",e?.accent5,{val:"4BACC6"})+Qt("accent6",e?.accent6,{val:"F79646"})+Qt("hlink",e?.hlink,{val:"0000FF"})+Qt("folHlink",e?.folHlink,{val:"800080"})+"</a:clrScheme>"+Cc(t)+Ac(t)+"</a:themeElements></a:theme>"}function io(t){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:fonts xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">'+[...new Set(["Calibri","Cambria","Arial","Times New Roman","\u5B8B\u4F53",te(t,"majorFont","latin",null),te(t,"majorFont","ea",null),te(t,"majorFont","cs",null),te(t,"minorFont","latin",null),te(t,"minorFont","ea",null),te(t,"minorFont","cs",null)].filter(Boolean))].map(r=>{let o=/[\u3400-\u9fff]/.test(r)?"86":"00",i=/Times|Cambria|宋体/i.test(r)?"roman":"swiss";return`<w:font w:name="${z(r)}"><w:charset w:val="${o}"/><w:family w:val="${i}"/></w:font>`}).join("")+"</w:fonts>"}function so(){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:settings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:zoom w:percent="100"/><w:defaultTabStop w:val="720"/><w:compat><w:compatSetting w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word" w:val="15"/></w:compat></w:settings>'}function ao(){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:webSettings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:optimizeForBrowser/></w:webSettings>'}function lo(t){let e=t?.theme;return[{name:"/word/theme/theme1.xml",contentType:Lt.theme,xml:oo(e),rel:{type:Ae.theme,target:"theme/theme1.xml"}},{name:"/word/fontTable.xml",contentType:Lt.fontTable,xml:io(e),rel:{type:Ae.fontTable,target:"fontTable.xml"}},{name:"/word/settings.xml",contentType:Lt.settings,xml:so(),rel:{type:Ae.settings,target:"settings.xml"}},{name:"/word/webSettings.xml",contentType:Lt.webSettings,xml:ao(),rel:{type:Ae.webSettings,target:"webSettings.xml"}}]}function co(t,e={}){let n=[],r=ir(t,n),o=nr(r),{stylesXml:i,numberingXml:s}=e,l=[...e.includeDefaultParts!==!1?lo(t):[],...e.extraParts??[]].map((v,_)=>Sc(v,_+1)).filter(Boolean),c=[`<Override PartName="/word/document.xml" ContentType="${Lt.document}"/>`];i&&c.push(`<Override PartName="/word/styles.xml" ContentType="${Lt.styles}"/>`),s&&c.push(`<Override PartName="/word/numbering.xml" ContentType="${Lt.numbering}"/>`);for(let v of l)c.push(`<Override PartName="${z(v.name)}" ContentType="${z(v.contentType)}"/>`);let h=`<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="${Lt.rels}"/><Default Extension="xml" ContentType="application/xml"/>`+c.join("")+"</Types>",d=`<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="${Ae.officeDocument}" Target="word/document.xml"/></Relationships>`,w=[],f=1;i&&w.push(`<Relationship Id="rId${f++}" Type="${Ae.styles}" Target="styles.xml"/>`),s&&w.push(`<Relationship Id="rId${f++}" Type="${Ae.numbering}" Target="numbering.xml"/>`),w.push(...n);let g=new Map;for(let v of l){if(!v.rel||!v.rel.type)continue;let _=v.rel.source||"/word/document.xml",T=v.rel.target??_c(_,v.name),D=cs({id:v.rel.id??`rId${f}`,type:v.rel.type,target:T,targetMode:v.rel.targetMode});if(_==="/word/document.xml")w.push(D),f++;else{let k=g.get(_)??[];k.push(D),g.set(_,k)}}let m='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+w.join("")+"</Relationships>",y=[Ne("/[Content_Types].xml",Lt.contentTypes,h),Ne("/_rels/.rels",Lt.rels,d),Ne("/word/_rels/document.xml.rels",Lt.rels,m)];for(let[v,_]of g.entries()){let T='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'+_.join("")+"</Relationships>";y.push(Ne(vc(v),Lt.rels,T))}i&&y.push(Ne("/word/styles.xml",Lt.styles,i)),s&&y.push(Ne("/word/numbering.xml",Lt.numbering,s));for(let v of l)v.xml!=null?y.push(Ne(v.name,v.contentType,String(v.xml))):v.binary!=null&&y.push(xc(v.name,v.contentType,v.binary));return y.push(Ne("/word/document.xml",Lt.document,o)),'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><?mso-application progid="Word.Document"?><pkg:package xmlns:pkg="http://schemas.microsoft.com/office/2006/xmlPackage">'+y.join("")+"</pkg:package>"}function fs(t,e,n,r,o={}){let i=e&&e.length?or(e,n):void 0;return co(t,{...o,stylesXml:i,numberingXml:r})}var rn={header:"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",footer:"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",comments:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",commentsExtended:"application/vnd.ms-word.commentsExtended+xml",footnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",endnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"},Xe={header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",commentsExtended:"http://schemas.microsoft.com/office/2011/relationships/commentsExtended",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",footnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",endnotes:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes"};function Ic(t){return t==null?t:JSON.parse(JSON.stringify(t))}function Dc(t){let e=t?.content;return Array.isArray(e?.content)?e.content:Array.isArray(e)?e:null}function $c(t,e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${t} xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:oo="urn:coco:oojson">`+Nn(e)+`</w:${t}>`}function ar(t,e){for(let n of t||[]){if(!n||typeof n!="object")continue;if(Array.isArray(n.content))for(let o of n.content)e(o);let r=n.content?.content;Array.isArray(r)&&ar(r,e)}}function ws(t){return Array.isArray(t?.commentMetadata)?t.commentMetadata:[]}function ds(t){if(t==null||t==="")return"";let e=typeof t=="number"?new Date(t):new Date(String(t));return Number.isNaN(e.getTime())?"":e.toISOString()}function Pc(t,e){let n=ws(t);if(e.id!=null&&e.id!==""){let r=n.find(o=>String(o?.id??"")===String(e.id));if(r)return r}return n.find(r=>String(r?.author??r?.authorName??"")===String(e.author??"")&&String(r?.text??"")===String(e.text??""))||null}function Rc(t){let e=new Map;if(ar(t?.content,n=>{if(!n||typeof n!="object"||n.type!=="commentRangeStart"&&n.type!=="commentRangeEnd"&&n.type!=="commentReference"||n.id==null)return;let r=String(n.id),o=e.get(r)||{id:r,author:"",text:"",date:"",solved:void 0},i={id:r,author:n.author??o.author??"",text:n.text??o.text??"",date:n.date??o.date??"",solved:o.solved},s=Pc(t,i);(s?.time!=null||s?.date!=null)&&(i.date=ds(s.time??s.date)),typeof s?.solved=="boolean"&&(i.solved=s.solved),e.set(r,i)}),e.size===0){let n=ws(t);for(let r of n){let o=String(r.id??"");o&&e.set(o,{id:o,author:r.author??r.authorName??"",text:r.text??"",date:ds(r.time??r.date),solved:typeof r.solved=="boolean"?r.solved:void 0})}n.length>0&&t?.content&&Fc(t,n)}return[...e.values()].sort((n,r)=>Number(n.id)-Number(r.id))}function Fc(t,e){let n=t.content;if(Array.isArray(n))for(let r of e){let o=r.quote??r.anchorText??"";if(!o||String(o).trim().length===0)continue;let i=String(r.id??"");if(i)for(let s=0;s<n.length;s++){let a=n[s];if(a?.type!=="paragraph"||!Array.isArray(a.content))continue;let l=a.content,c="",h=[];for(let g=0;g<l.length;g++){let m=l[g];if(m?.type==="run"&&Array.isArray(m.content))for(let y of m.content)typeof y=="string"&&(c+=y,h.push(g))}if(c.indexOf(o)<0){let g=o.slice(0,40);if((g.length>=5?c.indexOf(g):-1)<0)continue}let w=-1,f=-1;for(let g=0;g<l.length;g++)l[g]?.type==="run"&&(w<0&&(w=g),f=g);if(!(w<0)){l.splice(w,0,{type:"commentRangeStart",id:i}),l.splice(f+2,0,{type:"commentRangeEnd",id:i});break}}}}function zc(t){let e=t.date?` w:date="${nn(t.date)}"`:"";return`w:id="${nn(t.id)}" w:author="${nn(t.author||"")}"${e}`}function ys(t){let e=Number(t.id);if(Number.isFinite(e))return(e>>>0).toString(16).toUpperCase().padStart(8,"0").slice(-8);let n=0;for(let r of String(t.id))n=n*31+r.charCodeAt(0)>>>0;return n.toString(16).toUpperCase().padStart(8,"0")}function jc(t){return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml">'+t.map(e=>`<w:comment ${zc(e)}><w:p w14:paraId="${ys(e)}"><w:r><w:t xml:space="preserve">${nn(e.text||"")}</w:t></w:r></w:p></w:comment>`).join("")+"</w:comments>"}function Bc(t){let e=t.filter(n=>n.solved===!0);return e.length?'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w15:commentsEx xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml">'+e.map(n=>`<w15:commentEx w15:paraId="${ys(n)}" w15:done="1"/>`).join("")+"</w15:commentsEx>":""}function nn(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function Lc(t,e,n){let r=Rc(t);if(!r.length)return;n.comments=r.length,e.push({name:"/word/comments.xml",contentType:rn.comments,xml:jc(r),rel:{id:"rIdCocoComments",type:Xe.comments,target:"comments.xml"}});let o=Bc(r);o&&e.push({name:"/word/commentsExtended.xml",contentType:rn.commentsExtended,xml:o,rel:{id:"rIdCocoCommentsExtended",type:Xe.commentsExtended,target:"commentsExtended.xml"}})}function Mc(t){let e=/^data:([^;,]+);base64,([A-Za-z0-9+/=\s]+)$/.exec(String(t||""));if(!e)return null;let n=e[1],r=n==="image/jpeg"?"jpg":n==="image/png"?"png":n.split("/")[1]||"bin";return{contentType:n,ext:r,data:e[2].replace(/\s+/g,"")}}function ps(t,e){let n=new Map;return ar(t?.content,r=>{if(!(!r||r.type!=="run"||!Array.isArray(r[e])))for(let o of r[e])!o||o.id==null||!Array.isArray(o.content)||n.set(String(o.id),{id:String(o.id),type:o.type,content:o.content})}),[...n.values()].sort((r,o)=>Number(r.id)-Number(o.id))}function Uc(t){let e=t.type?` w:type="${nn(t.type)}"`:"";return`w:id="${nn(t.id)}"${e}`}function en(t,e,n){return t?.type===e||String(t?.id)===String(n)}function hs(t,e,n){return`<w:${t} w:type="${e}" w:id="${n}"><w:p><w:r><w:${e==="separator"?"separator":"continuationSeparator"}/></w:r></w:p></w:${t}>`}function ms(t){return t.filter(e=>!en(e,"separator",-1)&&!en(e,"continuationSeparator",0)).length}function uo(t,e){return`<w:${t} ${Uc(e)}>${Nn(e.content)}</w:${t}>`}function gs(t,e,n){let r=n.find(s=>en(s,"separator",-1)),o=n.find(s=>en(s,"continuationSeparator",0)),i=n.filter(s=>!en(s,"separator",-1)&&!en(s,"continuationSeparator",0));return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:${t} xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:oo="urn:coco:oojson">`+(r?uo(e,r):hs(e,"separator",-1))+(o?uo(e,o):hs(e,"continuationSeparator",0))+i.map(s=>uo(e,s)).join("")+`</w:${t}>`}function Xc(t,e,n){let r=ps(t,"footnotes");r.length&&(n.footnotes=ms(r),e.push({name:"/word/footnotes.xml",contentType:rn.footnotes,xml:gs("footnotes","footnote",r),rel:{id:"rIdCocoFootnotes",type:Xe.footnotes,target:"footnotes.xml"}}));let o=ps(t,"endnotes");o.length&&(n.endnotes=ms(o),e.push({name:"/word/endnotes.xml",contentType:rn.endnotes,xml:gs("endnotes","endnote",o),rel:{id:"rIdCocoEndnotes",type:Xe.endnotes,target:"endnotes.xml"}}))}function bs(t,e,n,r="/word/document.xml"){ar(t,o=>{if(!(!o||o.type!=="run"||!Array.isArray(o.content)))for(let i of o.content){if(!i||i.type!=="paraDrawing")continue;let s=Mc(i.graphic?.blipFill?.rasterImageId);if(!s)continue;let a=n.media+1,l=`rIdCocoImage${a}`;i.graphic.blipFill.rasterImageId=l,n.media=a;let c={id:l,type:Xe.image,target:`media/image${a}.${s.ext}`};r!=="/word/document.xml"&&(c.source=r),e.push({name:`/word/media/image${a}.${s.ext}`,contentType:s.contentType,binary:s.data,rel:c})}})}function Wc(t,e,n){bs(t?.content,e,n)}function Hc(t,e,n){let r=t?.sectPr||t?.sectionPr;if(!r||typeof r!="object")return;let o=[{key:"headerReference",part:"header",root:"hdr",contentType:rn.header,relType:Xe.header},{key:"footerReference",part:"footer",root:"ftr",contentType:rn.footer,relType:Xe.footer}];for(let i of o){let s=r[i.key];if(!(!s||typeof s!="object"))for(let a of["first","default","even"]){let l=s[a],c=Dc(l);if(!c)continue;let h=n[i.part]+1;n[i.part]=h;let d=`rIdCoco${i.part[0].toUpperCase()}${i.part.slice(1)}${h}`,w=`/word/${i.part}${h}.xml`;bs(c,e,n,w),e.push({name:w,contentType:i.contentType,xml:$c(i.root,c),rel:{id:d,type:i.relType,target:`${i.part}${h}.xml`}}),s[a]={id:d}}}}function xs(t){let e=Ic(t),n=[],r={header:0,footer:0,comments:0,media:0,footnotes:0,endnotes:0};return Hc(e,n,r),Lc(e,n,r),Xc(e,n,r),Wc(e,n,r),{doc:e,extraParts:n,summary:r}}var di=hl(_s(),1);var dr=class{constructor(e,n,r,o){this.source=null,this.observer=e,this.node=n,this.options=r,this.source=o||null,o&&e.t.push(this)}collectInterestedObservers(e,n,r,o,i){if(this.node!==n&&!this.options.subtree||e==="attributes"&&!this.options.attributes||e==="characterData"&&!this.options.characterData||e==="childList"&&!this.options.childList)return;let s=o.indexOf(this.observer);s<0&&(s=o.length,o.push(this.observer),i.push(void 0)),(e==="attributes"&&this.options.attributeOldValue||e==="characterData"&&this.options.characterDataOldValue)&&(i[s]=r.oldValue)}},wo=class{constructor(e){this.o=[],this.i=e}register(e,n){let r=this.o,o=!1;r.forEach((i=>{i.observer===e&&(o=!0,(function(s){for(let a=s.observer.t.length-1;a>=0;--a){let l=s.observer.t[a];if(l.source!==s)return;l.node.o.removeTransientRegisteredObserver(l),s.observer.t.splice(a,1)}})(i),i.options=n)})),o||(this.o.push(new dr(e,this.i,n)),e.u.push(this.i))}removeTransientRegisteredObserver(e){this.o.splice(this.o.indexOf(e),1)}removeForObserver(e){let n=0;for(let r=0,o=this.o.length;r<o;++r){let i=this.o[r];i.observer!==e&&(r!==n&&(this.o[n]=i),++n)}this.o.length=n}collectInterestedObservers(e,n,r,o,i){this.o.forEach((s=>{s.collectInterestedObservers(e,n,r,o,i)}))}appendTransientRegisteredObservers(e){this.o.forEach((n=>{n.options.subtree&&e.o.registerTransient(n)}))}registerTransient(e){this.o.push(new dr(e.observer,this.i,e.options,e))}};function Ss(t,e,...n){typeof queueMicrotask!="function"?Promise.resolve().then((()=>t.apply(e,n))):queueMicrotask((()=>t.apply(e,n)))}var yo=class{constructor(){this.l=new Set,this.h=!1}appendRecord(e,n){e.m.push(n),this.l.add(e)}queueMutationObserverMicrotask(){this.h||(this.h=!0,Ss((()=>{this.p()}),this))}p(){this.h=!1;let e=Array.from(this.l);this.l.clear(),e.forEach((n=>{Ss((r=>{let o=r.takeRecords();var i;(i=r).t.forEach((s=>{s.node.o.removeTransientRegisteredObserver(s)})),i.t.length=0,o.length>0&&r.g(o,r)}),this,n)}))}},bo=class{constructor(e){this.v=e}deref(){return this.v}},Xt=new class{constructor(){this.l=new yo,this.N=[],this.S=new WeakSet}forEachRange(t){let e=this.N.length;for(let n=e-1;n>=0;--n){let r=this.N[n].deref(),o=r==null,i=!o&&!this.S.has(r);o||i?(this.N[n]=this.N[e-1],this.N.pop(),e-=1):t(r)}}addRange(t){let e=(n=t,typeof WeakRef=="function"?new WeakRef(n):new bo(n));var n;this.N.push(e),this.S.add(t)}removeRange(t){this.S.delete(t)}};function at(t){return Xt}function ot(t,...e){return e.some((n=>t.nodeType===n))}function xo(t){return t.nodeType===2}function fn(t){return t.nodeType===3||t.nodeType===4||t.nodeType===8||t.nodeType===7}function De(t){return t.nodeType===3||t.nodeType===4}function Re(t){return t.nodeType===1}function Ts(t){return t.nodeType===10}function $e(t){switch(t.nodeType){case 3:case 7:case 8:return t.data.length;default:return t.childNodes.length}}function de(t){let e=t,n=[];for(;e;)n.unshift(e),e=e.parentNode;return n}function Gt(t){return ot(t,9)?t:t.ownerDocument}function yt(t){return t.parentNode.childNodes.indexOf(t)}function sn(t){for(;t.parentNode;)t=t.parentNode;return t}function yn(t,e){e(t);for(let n=t.firstChild;n;n=n.nextSibling)yn(n,e)}function Ms(t,e){let n=[];return yn(e,(r=>{if(r===e||r.nodeType!==1)return;let o=r;t!=="*"&&o.nodeName!==t||n.push(o)})),n}function Us(t,e,n){t===""&&(t=null);let r=[];return yn(n,(o=>{if(o===n||o.nodeType!==1)return;let i=o;t!=="*"&&i.namespaceURI!==t||e!=="*"&&i.localName!==e||r.push(i)})),r}function Bo(t,e,n){n||(n=Gt(t));let r=t.T(n);if(e)for(let o=t.firstChild;o;o=o.nextSibling)r.appendChild(Bo(o,!0,n));return r}function Z(t,e){if(t.length<e)throw new TypeError(`Function should be called with at least ${e} arguments`)}var Zc={IndexSizeError:1,HierarchyRequestError:3,WrongDocumentError:4,InvalidCharacterError:5,NotFoundError:8,NotSupportedError:9,InUseAttributeError:10,InvalidStateError:11,NamespaceError:14,InvalidNodeTypeError:24},vo=class extends Error{constructor(e="",n="Error"){super(e),this.message=e,this.name=n,this.code=Zc[n]||0,this.stack=new Error(e).stack}};function he(t,e){return new vo(`${t}: ${e}`,t)}function _t(t){throw he("HierarchyRequestError",t)}function He(t){throw he("IndexSizeError",t)}function Pe(t){throw he("InvalidCharacterError",t)}function oe(t){throw he("InvalidNodeTypeError",t)}function Xs(t){throw he("InvalidStateError",t)}function lr(t){throw he("NamespaceError",t)}function _r(t){throw he("NotFoundError",t)}function _o(t){throw he("NotSupportedError",t)}function Cs(t){throw he("WrongDocumentError",t)}var So=class{constructor(e,n){this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null,this.type=e,this.target=n}};function Je(t,e,n){let r=[],o=[];for(let s=e;s;s=s.parentNode)s.o.collectInterestedObservers(t,e,n,r,o);let i=at();r.forEach(((s,a)=>{let l=o[a],c=new So(t,e);n.name!==void 0&&n.namespace!==void 0&&(c.attributeName=n.name,c.attributeNamespace=n.namespace),l!==void 0&&(c.oldValue=l),n.addedNodes!==void 0&&(c.addedNodes=n.addedNodes),n.removedNodes!==void 0&&(c.removedNodes=n.removedNodes),n.previousSibling!==void 0&&(c.previousSibling=n.previousSibling),n.nextSibling!==void 0&&(c.nextSibling=n.nextSibling),i.l.appendRecord(s,c)})),i.l.queueMutationObserverMicrotask()}function Lo(t){let e=[];for(let n=t.firstElementChild;n;n=n.nextElementSibling)e.push(n);return e}function Ws(t){for(let e=t.previousSibling;e;e=e.previousSibling)if(Re(e))return e;return null}function Hs(t){for(let e=t.nextSibling;e;e=e.nextSibling)if(Re(e))return e;return null}function Gc(t,e){let n=t.previousSibling,r=t.nextSibling,o=ot(t,1),i=o?t.previousElementSibling:null,s=o?t.nextElementSibling:null;if(t.parentNode=null,t.previousSibling=null,t.nextSibling=null,n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,e.childNodes.splice(e.childNodes.indexOf(t),1),o){let a=(function(l){return ot(l,1,9,11)?l:null})(e);a&&(a.firstElementChild===t&&(a.firstElementChild=s),a.lastElementChild===t&&(a.lastElementChild=i),a.childElementCount-=1)}if(ot(e,9)){let a=e;ot(t,1)?a.documentElement=null:ot(t,10)&&(a.doctype=null)}}function Mo(t,e,n){if(ot(e,9,11,1)||_t("parent must be a Document, DocumentFragment or Element node"),t.contains(e)&&_t("node must not be an inclusive ancestor of parent"),n&&n.parentNode!==e&&_r("child is not a child of parent"),ot(t,11,10,1,3,4,7,8)||_t("node must be a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction or Comment node"),ot(t,3)&&ot(e,9)&&_t("can not insert a Text node under a Document"),ot(t,10)&&!ot(e,9)&&_t("can only insert a DocumentType node under a Document"),ot(e,9)){let r=e;switch(t.nodeType){case 11:let o=t;o.firstElementChild!==o.lastElementChild&&_t("can not insert more than one element under a Document"),Array.from(o.childNodes).some((i=>ot(i,3)))&&_t("can not insert a Text node under a Document"),o.firstElementChild&&(r.documentElement||n&&ot(n,10)||n&&r.doctype&&yt(n)<yt(r.doctype))&&_t("Document should contain at most one doctype, followed by at most one element");break;case 1:(r.documentElement||n&&ot(n,10)||n&&r.doctype&&yt(n)<yt(r.doctype))&&_t("Document should contain at most one doctype, followed by at most one element");break;case 10:(r.doctype||n&&r.documentElement&&yt(r.documentElement)<yt(n)||!n&&r.documentElement)&&_t("Document should contain at most one doctype, followed by at most one element")}}}function Ve(t,e,n){Mo(t,e,n);let r=n;return r===t&&(r=t.nextSibling),Sr(t,Gt(e)),Xn(t,e,r),t}function Xn(t,e,n,r=!1){let o=(function(l){return l.nodeType===11})(t),i=o?Array.from(t.childNodes):[t],s=i.length;if(s===0)return;if(o&&(i.forEach((l=>fe(l,!0))),Je("childList",t,{removedNodes:i})),n!==null){let l=yt(n);at().forEachRange((c=>{c.startContainer===e&&c.startOffset>l&&(c.startOffset+=s),c.endContainer===e&&c.endOffset>l&&(c.endOffset+=s)}))}let a=n===null?e.lastChild:n.previousSibling;i.forEach((l=>{(function(c,h,d){c.parentNode=h;let w=d===null?h.lastChild:d.previousSibling,f=d===null?null:d;if(c.previousSibling=w,c.nextSibling=f,w?w.nextSibling=c:h.firstChild=c,f?(f.previousSibling=c,h.childNodes.splice(h.childNodes.indexOf(f),0,c)):(h.lastChild=c,h.childNodes.push(c)),Re(c)){let g=h,m=null;for(let v=w;v;v=v.previousSibling){if(Re(v)){m=v;break}let _=v;if(!Ts(_)){m=_.previousElementSibling;break}}let y=null;for(let v=f;v;v=v.nextSibling){if(Re(v)){y=v;break}y=v.nextElementSibling;break}m||(g.firstElementChild=c),y||(g.lastElementChild=c),g.childElementCount+=1}(function(g){return g.nodeType===9})(h)&&(Re(c)?h.documentElement=c:Ts(c)&&(h.doctype=c))})(l,e,n)})),r||Je("childList",e,{addedNodes:i,nextSibling:n,previousSibling:a})}function ne(t,e){return Ve(t,e,null)}function Zs(t,e,n){if(ot(n,9,11,1)||_t("Can not replace under a non-parent node"),e.contains(n)&&_t("Can not insert a node under its own descendant"),t.parentNode!==n&&_r("child is not a child of parent"),ot(e,11,10,1,3,4,7,8)||_t("Can not insert a node that isn't a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction or Comment"),ot(e,3)&&ot(n,9)&&_t("can not insert a Text node under a Document"),ot(e,10)&&!ot(n,9)&&_t("can only insert a DocumentType node under a Document"),ot(n,9)){let a=n;switch(e.nodeType){case 11:let l=e;l.firstElementChild!==l.lastElementChild&&_t("can not insert more than one element under a Document"),Array.from(l.childNodes).some((c=>ot(c,3)))&&_t("can not insert a Text node under a Document"),l.firstElementChild&&(a.documentElement&&a.documentElement!==t||t&&a.doctype&&yt(t)<yt(a.doctype))&&_t("Document should contain at most one doctype, followed by at most one element");break;case 1:(a.documentElement&&a.documentElement!==t||a.doctype&&yt(t)<yt(a.doctype))&&_t("Document should contain at most one doctype, followed by at most one element");break;case 10:(a.doctype&&a.doctype!==t||a.documentElement&&yt(a.documentElement)<yt(t))&&_t("Document should contain at most one doctype, followed by at most one element")}}let r=t.nextSibling;r===e&&(r=e.nextSibling);let o=t.previousSibling;Sr(e,Gt(n));let i=[];t.parentNode!==null&&(i.push(t),fe(t,!0));let s=ot(e,11)?Array.from(e.childNodes):[e];return Xn(e,n,r,!0),Je("childList",n,{addedNodes:s,removedNodes:i,nextSibling:r,previousSibling:o}),t}function Uo(t,e){t!==null&&Sr(t,Gt(e));let n=Array.from(e.childNodes),r=[];t!==null&&(ot(t,11)?t.childNodes.forEach((o=>{r.push(o)})):r.push(t)),n.forEach((o=>{fe(o,!0)})),t!==null&&Xn(t,e,null,!0),(r.length>0||n.length>0)&&Je("childList",e,{addedNodes:r,removedNodes:n})}function fe(t,e=!1){let n=t.parentNode,r=yt(t);at().forEachRange((s=>{t.contains(s.startContainer)&&(s.startContainer=n,s.startOffset=r),t.contains(s.endContainer)&&(s.endContainer=n,s.endOffset=r),s.startContainer===n&&s.startOffset>r&&(s.startOffset-=1),s.endContainer===n&&s.endOffset>r&&(s.endOffset-=1)}));let o=t.previousSibling,i=t.nextSibling;Gc(t,n);for(let s=n;s;s=s.parentNode)s.o.appendTransientRegisteredObservers(t);e||Je("childList",n,{removedNodes:[t],nextSibling:i,previousSibling:o})}function Sr(t,e){let n=Gt(t);t.parentNode&&fe(t),e!==n&&yn(t,(r=>{if(r.ownerDocument=e,ot(r,1))for(let o of r.attributes)o.ownerDocument=e}))}function Gs(t){let e=[];return yn(t,(n=>{ot(n,3,4)&&e.push(n.data)})),e.join("")}function Js(t,e){let n=null;e!==""&&(n=new(at()).Text(e)),Uo(n,t)}function bn(t,e){let n=t.map((r=>r instanceof K?r:e.createTextNode(String(r))));if(n.length===1)return n[0];{let r=e.createDocumentFragment();return n.forEach((o=>{r.appendChild(o)})),r}}function Xo(t,e){Ve(bn(e,Gt(t)),t,t.firstChild)}function Wo(t,e){ne(bn(e,Gt(t)),t)}function Ho(t,e){let n=bn(e,Gt(t));Mo(n,t,null),Uo(n,t)}function Zo(t,e){let n=t.parentNode;if(n===null)return;let r=t.previousSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.previousSibling;Ve(bn(e,Gt(t)),n,r===null?n.firstChild:r.nextSibling)}function Go(t,e){let n=t.parentNode;if(n===null)return;let r=t.nextSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.nextSibling;Ve(bn(e,Gt(t)),n,r)}function Jo(t,e){let n=t.parentNode;if(n===null)return;let r=t.nextSibling;for(;r!==null&&e.indexOf(r)>=0;)r=r.nextSibling;let o=bn(e,Gt(t));t.parentNode===n?Zs(t,o,n):Ve(o,n,r)}function Vo(t){t.parentNode!==null&&fe(t)}function ks(t,e){let n=e.startContainer;ot(n,7)&&_t("Can not insert into a processing instruction"),ot(n,8)&&_t("Can not insert into a comment"),De(n)&&n.parentNode===null&&_t("Can not insert into a text node without a parent");let r=null;r=De(n)?n:n.childNodes[e.startOffset]||null;let o=r===null?n:r.parentNode;Mo(t,o,r),De(n)&&(r=n.splitText(e.startOffset)),t===r&&(r=r.nextSibling),t.parentNode!==null&&fe(t);let i=r===null?$e(o):yt(r);ot(t,11)?i+=$e(t):i+=1,Ve(t,o,r),e.collapsed&&e.setEnd(o,i)}function xe(t){return t>>>0}function Vs(t){return t===null?"":String(t)}function hn(t){return t==null?"":String(t)}function bt(t,e){return(function(n,r){if(!(n instanceof r))throw new TypeError(`Value should be an instance of ${r.name}`)})(t,e),t}function To(t,e){return t==null?null:bt(t,e)}function Wt(t){return t===void 0?null:t}var Os=new WeakMap;function cr(t){let e=Os.get(t);return e===void 0&&(e=Math.random(),Os.set(t,e)),e}var K=class t{constructor(){this.ownerDocument=null,this.parentNode=null,this.childNodes=[],this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.o=new wo(this)}get parentElement(){return this.parentNode&&ot(this.parentNode,1)?this.parentNode:null}hasChildNodes(){return!!this.childNodes.length}normalize(){let e=this.firstChild,n=0;for(Gt(this);e;){let r=e.nextSibling;if(!ot(e,3)){e.normalize(),e=r;continue}let o=e,i=o.length;if(i===0){fe(e),--n,e=r;continue}let s="",a=[];for(let c=o.nextSibling;c&&ot(c,3);c=c.nextSibling)s+=c.data,a.push(c);s&&o.replaceData(i,0,s);let l=at();for(let c=0,h=a.length;c<h;++c){let d=a[c],w=n+c+1;l.forEachRange((f=>{f.startContainer===d&&(f.startOffset+=i,f.startContainer=o),f.endContainer===d&&(f.endOffset+=i,f.endContainer=o),f.startContainer===this&&f.startOffset===w&&(f.startContainer=o,f.startOffset=i),f.endContainer===this&&f.endOffset===w&&(f.endContainer=o,f.endOffset=i)})),i+=d.length}for(;a.length;)fe(a.shift());e=e.nextSibling,++n}}cloneNode(e=!1){return Bo(this,e)}compareDocumentPosition(e){if(Z(arguments,1),this===(e=bt(e,t)))return 0;let n=e,r=this,o=null,i=null;if(xo(n)&&(o=n,n=o.ownerElement),xo(r)&&(i=r,r=i.ownerElement,o!==null&&n!==null&&r===n))for(let d of r.attributes){if(d===o)return t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;if(d===i)return t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_FOLLOWING}if(n===null||r===null)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|(cr(n||o)>cr(r||i)?t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_PRECEDING);let s=de(n),a=de(r);if(s[0]!==a[0])return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|(cr(s[0])>cr(a[0])?t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_PRECEDING);let l=0;for(;l<s.length&&l<a.length&&s[l]===a[l];)++l;let c=n!==r&&l===s.length,h=n!==r&&l===a.length;return c&&o===null||n===r&&i!==null?t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING:h&&i===null||n===r&&o!==null?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:c||yt(s[l])<yt(a[l])?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}contains(e){for(Z(arguments,1),e=To(e,t);e&&e!=this;)e=e.parentNode;return e===this}isDefaultNamespace(e){return Z(arguments,1),(e=Wt(e))===""&&(e=null),this.lookupNamespaceURI(null)===e}insertBefore(e,n){return Z(arguments,2),Ve(e=bt(e,t),this,n=To(n,t))}appendChild(e){return Z(arguments,1),ne(e=bt(e,t),this)}replaceChild(e,n){return Z(arguments,2),e=bt(e,t),Zs(n=bt(n,t),e,this)}removeChild(e){return Z(arguments,1),(function(n,r){return n.parentNode!==r&&_r("child is not a child of parent"),fe(n),n})(e=bt(e,t),this)}};function Tr(t,e,n,r){Je("attributes",e,{name:t.localName,namespace:t.namespaceURI,oldValue:n})}function Co(t,e){Tr(t,t.ownerElement,t.value),t.C=e}function dn(t,e,n=!1){n||Tr(t,e,null,t.value),e.attributes.push(t),t.ownerElement=e}function ko(t){let e=t.ownerElement;Tr(t,e,t.value),e.attributes.splice(e.attributes.indexOf(t),1),t.ownerElement=null}K.ELEMENT_NODE=1,K.ATTRIBUTE_NODE=2,K.TEXT_NODE=3,K.CDATA_SECTION_NODE=4,K.ENTITY_REFERENCE_NODE=5,K.ENTITY_NODE=6,K.PROCESSING_INSTRUCTION_NODE=7,K.COMMENT_NODE=8,K.DOCUMENT_NODE=9,K.DOCUMENT_TYPE_NODE=10,K.DOCUMENT_FRAGMENT_NODE=11,K.NOTATION_NODE=12,K.DOCUMENT_POSITION_DISCONNECTED=1,K.DOCUMENT_POSITION_PRECEDING=2,K.DOCUMENT_POSITION_FOLLOWING=4,K.DOCUMENT_POSITION_CONTAINS=8,K.DOCUMENT_POSITION_CONTAINED_BY=16,K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,K.prototype.ELEMENT_NODE=1,K.prototype.ATTRIBUTE_NODE=2,K.prototype.TEXT_NODE=3,K.prototype.CDATA_SECTION_NODE=4,K.prototype.ENTITY_REFERENCE_NODE=5,K.prototype.ENTITY_NODE=6,K.prototype.PROCESSING_INSTRUCTION_NODE=7,K.prototype.COMMENT_NODE=8,K.prototype.DOCUMENT_NODE=9,K.prototype.DOCUMENT_TYPE_NODE=10,K.prototype.DOCUMENT_FRAGMENT_NODE=11,K.prototype.NOTATION_NODE=12;var Ge=class extends K{get nodeType(){return 2}get nodeName(){return this.name}get nodeValue(){return this.C}set nodeValue(e){po(this,e=hn(e))}get textContent(){return this.C}set textContent(e){po(this,e=hn(e))}lookupPrefix(e){return Z(arguments,1),this.ownerElement!==null?this.ownerElement.lookupPrefix(e):null}lookupNamespaceURI(e){return Z(arguments,1),this.ownerElement===null?null:this.ownerElement.lookupNamespaceURI(e)}get value(){return this.C}set value(e){po(this,e)}constructor(e,n,r,o,i){super(),this.namespaceURI=e,this.prefix=n,this.localName=r,this.name=n===null?r:`${n}:${r}`,this.C=o,this.ownerElement=i,this.ownerDocument=i?i.ownerDocument:at().document}T(e){let n=new(at()).Attr(this.namespaceURI,this.prefix,this.localName,this.value,null);return n.ownerDocument=e,n}};function po(t,e){e=String(e),t.ownerElement===null?t.C=e:Co(t,e)}var Fn=class extends K{get nodeValue(){return this.D}set nodeValue(e){e=hn(e),Ie(this,0,this.length,e)}get textContent(){return this.D}set textContent(e){e=hn(e),Ie(this,0,this.length,e)}lookupPrefix(e){Z(arguments,1);let n=this.parentElement;return n!==null?n.lookupPrefix(e):null}lookupNamespaceURI(e){Z(arguments,1);let n=this.parentElement;return n===null?null:n.lookupNamespaceURI(e)}before(...e){Zo(this,e)}after(...e){Go(this,e)}replaceWith(...e){Jo(this,e)}remove(){Vo(this)}get previousElementSibling(){return Ws(this)}get nextElementSibling(){return Hs(this)}get data(){return this.D}set data(e){e=Vs(e),Ie(this,0,this.length,e)}get length(){return this.data.length}constructor(e){super(),this.D=String(e)}substringData(e,n){return Z(arguments,2),Ys(this,e,n)}appendData(e){Z(arguments,1),Ie(this,this.length,0,e)}insertData(e,n){Z(arguments,1),Ie(this,e,0,n)}deleteData(e,n){Z(arguments,2),Ie(this,e,n,"")}replaceData(e,n,r){Z(arguments,3),Ie(this,e,n,r)}};function Ie(t,e,n,r){e=xe(e),n=xe(n);let o=t.length;e>o&&He("can not replace data past the node's length"),e+n>o&&(n=o-e),Je("characterData",t,{oldValue:t.data});let i=t.data,s=i.substring(0,e)+r+i.substring(e+n);t.D=s,at().forEachRange((a=>{a.startContainer===t&&a.startOffset>e&&a.startOffset<=e+n&&(a.startOffset=e),a.endContainer===t&&a.endOffset>e&&a.endOffset<=e+n&&(a.endOffset=e),a.startContainer===t&&a.startOffset>e+n&&(a.startOffset=a.startOffset+r.length-n),a.endContainer===t&&a.endOffset>e+n&&(a.endOffset=a.endOffset+r.length-n)}))}function Ys(t,e,n){e=xe(e),n=xe(n);let r=t.length;return e>r&&He("can not substring data past the node's length"),e+n>r?t.data.substring(e):t.data.substring(e,e+n)}var pr=class extends Fn{get nodeType(){return 3}get nodeName(){return"#text"}constructor(e=""){super(e);let n=at();this.ownerDocument=n.document}splitText(e){return Z(arguments,1),(function(n,r){let o=n.length;r>o&&He("can not split past the node's length");let i=o-r,s=Ys(n,r,i),a=new(at()).Text(s);a.ownerDocument=n.ownerDocument;let l=n.parentNode;if(l!==null){Xn(a,l,n.nextSibling);let c=yt(n)+1;at().forEachRange((h=>{h.startContainer===n&&h.startOffset>r&&(h.startContainer=a,h.startOffset-=r),h.endContainer===n&&h.endOffset>r&&(h.endContainer=a,h.endOffset-=r),h.startContainer===l&&h.startOffset===c&&(h.startOffset+=1),h.endContainer===l&&h.endOffset===c&&(h.endOffset+=1)}))}return Ie(n,r,i,""),a})(this,e=xe(e))}T(e){let n=new(at()).Text(this.data);return n.ownerDocument=e,n}get wholeText(){let e=[this.data],n=this.previousSibling;for(;n!==null&&ot(n,3,4);){let o=n.data;e.unshift(o),n=n.previousSibling}let r=this.nextSibling;for(;r!==null&&ot(r,3,4);){let o=r.data;e.push(o),r=r.nextSibling}return e.join("")}},Oo=class extends pr{get nodeType(){return 4}get nodeName(){return"#cdata-section"}constructor(e){super(e)}T(e){let n=new(at()).CDATASection(this.data);return n.ownerDocument=e,n}},Eo=class extends Fn{get nodeType(){return 8}get nodeName(){return"#comment"}constructor(e=""){super(e);let n=at();this.ownerDocument=n.document}T(e){let n=new(at()).Comment(this.data);return n.ownerDocument=e,n}},hr=class extends K{get nodeType(){return 10}get nodeName(){return this.name}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}lookupPrefix(e){return Z(arguments,1),null}lookupNamespaceURI(e){return Z(arguments,1),null}before(...e){Zo(this,e)}after(...e){Go(this,e)}replaceWith(...e){Jo(this,e)}remove(){Vo(this)}constructor(e,n="",r=""){super(),this.name=e,this.publicId=n,this.systemId=r}T(e){let n=new(at()).DocumentType(this.name,this.publicId,this.systemId);return n.ownerDocument=e,n}};function Es(t,e,n,r,o){return new Ge(t,e,n,r,o)}function Jc(t,e,n,r=null){return Fe(t,e,n,r)}var cn="http://www.w3.org/1999/xhtml",ce="http://www.w3.org/XML/1998/namespace",Mt="http://www.w3.org/2000/xmlns/";function qs(t){(function(e){let n=e.split(":");return!(n.length>2)&&n.every((r=>ze(r)))})(t)||Pe("The qualified name is not a valid QName")}function Yo(t,e){t===""&&(t=null),qs(e);let n=null,r=e,o=e.indexOf(":");return o>=0&&(n=e.substring(0,o),r=e.substring(o+1)),n!==null&&t===null&&lr("Qualified name with prefix can not have a null namespace"),n==="xml"&&t!==ce&&lr("xml prefix can only be used for the XML namespace"),e!=="xmlns"&&n!=="xmlns"||t===Mt||lr("xmlns prefix or qualifiedName must use the XMLNS namespace"),t===Mt&&e!=="xmlns"&&n!=="xmlns"&&lr("xmlns prefix or qualifiedName must be used for the XMLNS namespace"),{namespace:t,prefix:n,localName:r}}function Ks(t,e){if(t.namespaceURI===e&&t.prefix!==null)return t.prefix;let n=Array.from(t.attributes).find((r=>r.prefix==="xmlns"&&r.value===e));return n?n.localName:t.parentElement!==null?Ks(t.parentElement,e):null}var No=class{constructor(e,n,r){this.$=null,this.A=0,this.I=e,this.k=e,this.M=n,this.R=r}enter(e,n){var r;let o=(r=this.$)!==null&&r!==void 0?r:e;this.k+=n,this.k>this.M&&this.k/this.I>this.R&&gt("too much entity expansion",o),this.$=o,this.A+=1}exit(){this.A-=1,this.A===0&&(this.$=null)}};function me(t,e){return{success:!0,offset:t,value:e}}function xn(t){return me(t,void 0)}function pe(t,e,n=!1){return{success:!1,offset:t,expected:e,fatal:n}}function q(t){return(e,n)=>{let r=n+t.length;return e.slice(n,r)===t?me(r,t):pe(n,[t])}}function Qs(t,e){return(n,r)=>{let o=n.codePointAt(r);return o!==void 0&&t(o)?xn(r+(function(i){return i>65535?2:1})(o)):pe(r,e)}}function It(t,e){return(n,r)=>{let o=r;for(;;){let i=n.codePointAt(r);if(i===void 0||!t(i))break;r+=i>65535?2:1}return e!==void 0&&r===o?pe(r,e):xn(r)}}function zn(t,e,n){return Qs((r=>t<=r&&r<=e),n||[`${String.fromCodePoint(t)}-${String.fromCodePoint(e)}`])}function vt(t,e){return(n,r)=>{let o=t(n,r);return o.success?me(o.offset,e(o.value)):o}}function St(t){return vt(t,(()=>{}))}function Cr(t,e,n,r){return(o,i)=>{let s=t(o,i);return s.success?e(s.value)?s:pe(i,n,r):s}}function ut(t,e){return(n,r)=>{let o=null;for(let i of t){let s=i(n,r);if(s.success||(o===null||s.offset>o.offset?o=s:s.offset===o.offset&&e===void 0&&(o.expected=o.expected.concat(s.expected)),s.fatal))return s}return e=e||o?.expected||[],o&&(o.expected=e),o||pe(r,e)}}function it(t){return(e,n)=>{let r=t(e,n);return r.success||r.fatal?r:me(n,null)}}function je(t){return(e,n)=>{let r=[],o=n;for(;;){let i=t(e,o);if(!i.success){if(i.fatal)return i;break}if(r.push(i.value),i.offset===o)break;o=i.offset}return me(o,r)}}function ve(t){return(e,n)=>{let r=n;for(;;){let o=t(e,r);if(!o.success){if(o.fatal)return o;break}if(o.offset===r)break;r=o.offset}return xn(r)}}function zt(t,e,n){return(r,o)=>{let i=t(r,o);if(!i.success)return i;let s=e(r,i.offset);return s.success?me(s.offset,n(i.value,s.value)):s}}function kr(...t){return(e,n)=>{let r=[];for(let o of t){let i=o(e,n);if(!i.success)return i;n=i.offset,r.push(i.value)}return me(n,r)}}function ue(...t){return(e,n)=>{for(let r of t){let o=r(e,n);if(!o.success)return o;n=o.offset}return xn(n)}}function ta(t,e){return t}function ea(t,e){return e}function jn(t){return zt(t,ve(t),ea)}function ct(t,e){return zt(t,e,ea)}function Tt(t,e){return zt(t,e,ta)}function pt(t,e,n,r=!1){return ct(t,r?Et(Tt(e,n)):Tt(e,n))}function Dt(t){return(e,n)=>{let r=t(e,n);return r.success?me(r.offset,e.slice(n,r.offset)):r}}function qo(t){return(e,n)=>{let r=t(e,n);return r.success?me(n,r.value):r}}function Ko(t,e){return(n,r)=>t(n,r).success?pe(r,e):xn(r)}function na(t,e,n){return ct(Ko(e,n),t)}function pn(t,e,n=0,r=[]){return(o,i)=>{let s=o.codePointAt(i+n);if(s===void 0)return pe(i,r);let a=t[s];return a===void 0?e===void 0?pe(i,r):e(o,i):a(o,i)}}function Et(t){return(e,n)=>{let r=t(e,n);return r.success?r:pe(r.offset,r.expected,!0)}}var ra=(t,e)=>t.length===e?xn(e):pe(e,["end of input"]);function Wn(t){return zt(t,ra,ta)}var mr=class{constructor(e,n){this.P=0,this.L=0,this.O=e,this.V=n}next(){if(this.P>=this.V.length)return{done:!0,value:ra(this.O,this.L)};let{parser:e,type:n}=this.V[this.P],r=e(this.O,this.L);return r.success?(this.L=r.offset,n!==1&&(this.P+=1),r.value===void 0?this.next():{done:!1,value:r.value}):n===0||r.fatal?{done:!0,value:r}:(this.P+=1,this.next())}};function vn(t){return(e,n)=>{let r=n,o=t(e,n);return o.success?me(o.offset,Object.assign({input:e,start:r,end:o.offset},o.value)):o}}var Vc=q("_"),Ao=q("-"),Yc=q("."),Ht=q('"'),Zt=q("'"),qc=q("<"),Se=q(">"),Kc=q("&"),Qc=q("="),tu=q("["),Qo=q("]"),gr=q(";"),oa=q("%"),Bn=q("("),mn=q(")"),eu=q("+"),nu=q(","),ia=q("?"),sa=q("*"),wr=q("|"),ti=q("]]>"),ru=q("<!--"),ou=q("-->"),iu=q("<?"),ei=q("?>"),su=q("1."),au=q("version"),lu=q("encoding"),cu=q("standalone"),uu=q("yes"),fu=q("no"),aa=q("<?xml"),du=q("<!DOCTYPE"),pu=q("SYSTEM"),la=q("PUBLIC"),hu=q("</"),mu=q("/>"),gu=q("&#"),wu=q("&#x"),yu=q("<!ELEMENT"),bu=q("EMPTY"),xu=q("ANY"),vu=q("#PCDATA"),_u=q("<!ATTLIST"),Su=q("NOTATION"),Tu=q("#REQUIRED"),Cu=q("#IMPLIED"),ku=q("#FIXED"),ni=q("<!ENTITY"),Ou=q("NDATA"),Eu=q("<!NOTATION"),Ns=zn(65,90),As=zn(97,122),Or=zn(48,57),Nu=ut([Or,zn(65,70),zn(97,102)],["hexadecimal digit"]);function Yt(t){return t===9||t===10||t===13||32<=t&&t<=55295||57344<=t&&t<=65533||65536<=t&&t<=1114111}var Au=Wn(It(Yt));function ca(t){return t===32||t===9||t===13||t===10}var V=It(ca,["whitespace"]),Iu=Wn(It(ca));function ua(t){return t===58||65<=t&&t<=90||t===95||97<=t&&t<=122||192<=t&&t<=214||216<=t&&t<=246||248<=t&&t<=767||880<=t&&t<=893||895<=t&&t<=8191||8204<=t&&t<=8205||8304<=t&&t<=8591||11264<=t&&t<=12271||12289<=t&&t<=55295||63744<=t&&t<=64975||65008<=t&&t<=65533||65536<=t&&t<=983039}var Du=Qs(ua,["valid name start character"]);function fa(t){return ua(t)||t===45||t===46||48<=t&&t<=57||t===183||768<=t&&t<=879||8255<=t&&t<=8256}var Te=Dt(ct(Du,It(fa))),$u=Wn(Te),_e=Cr(Te,(t=>!t.includes(":")),["name must not contain colon"],!0),Is=Dt(It(fa,["valid name character"])),Pu=vn(vt(Cr(ut([vt(pt(wu,Dt(jn(Nu)),gr,!0),(t=>parseInt(t,16))),vt(pt(gu,Dt(jn(Or)),gr,!0),(t=>parseInt(t,10)))]),(t=>Yt(t)),["character reference must reference a valid character"],!0),(t=>({type:0,cp:t})))),gn=ut([vn(vt(pt(Kc,_e,Et(gr)),(t=>({type:1,name:t})))),Pu]),Io=vn(vt(pt(oa,_e,gr),(t=>({type:2,name:t})))),da=ut([pt(Ht,je(ut([Dt(It((t=>t!==37&&t!==38&&t!==Ln&&Yt(t)),[])),Io,gn])),Ht,!0),pt(Zt,je(ut([Dt(It((t=>t!==37&&t!==38&&t!==Mn&&Yt(t)),[])),Io,gn])),Zt,!0)]),Ln=34,Mn=39,pa=pn({[Ln]:pt(Ht,je(pn({38:gn},Dt(It((t=>t!==Un&&t!==38&&t!==Ln&&Yt(t)),[])))),Ht,!0),[Mn]:pt(Zt,je(pn({38:gn},Dt(It((t=>t!==Un&&t!==38&&t!==Mn&&Yt(t)),[])))),Zt,!0)},void 0,0,["quoted attribute value"]),Ru=Wn(je(ut([Dt(It((t=>t!==Un&&t!==38&&Yt(t)),[])),gn]))),Ds=Cr(ut([pt(Ht,Dt(It((t=>t!==Ln&&Yt(t)))),Ht),pt(Zt,Dt(It((t=>t!==Mn&&Yt(t)))),Zt)]),(t=>!t.includes("#")),["system identifier must not contain a fragment identifier"],!0);function Do(t){return t===32||t===13||t===10||97<=t&&t<=122||65<=t&&t<=90||48<=t&&t<=57||33<=t&&t<=47&&t!==34&&t!==38||58<=t&&t<=64&&t!==60&&t!==62||t===95}var Fu=Wn(It(Do)),ha=ut([pt(Ht,Dt(It((t=>t!==Ln&&Do(t)))),Ht,!0),pt(Zt,Dt(It((t=>t!==Mn&&Do(t)))),Zt,!0)]),Un=60,zu=Dt(jn(ut([It((t=>t!==Un&&t!==38&&t!==93&&Yt(t)),[]),na(St(Qo),ti,[])],["character data"]))),ri=vt(pt(ru,Dt(ve(ut([It((t=>t!==45&&Yt(t)),[]),Tt(St(Ao),Ko(Ao,["comment content may not contain --"]))]))),ou,!0),(t=>({type:3,data:t}))),ju=Cr(_e,(t=>t.toLowerCase()!=="xml"),['processing instruction target must not be "xml"'],!0),oi=pt(iu,zt(ju,it(ct(V,Dt(ve(ut([It((t=>t!==63&&Yt(t)),[]),Tt(St(ia),Ko(Se,["PI data"]))]))))),((t,e)=>({type:4,target:t,data:e}))),ei,!0),Bu=q("<![CDATA["),Lu=Dt(ve(ut([It((t=>t!==93&&Yt(t)),[]),na(St(Qo),ti,["CData"])]))),Mu=vn(vt(pt(Bu,Lu,ti,!0),(t=>({type:5,data:t})))),Er=pt(it(V),Qc,it(V)),$s=Dt(ct(su,jn(Or))),ma=ct(V,ct(au,ct(Er,ut([pt(Ht,$s,Ht,!0),pt(Zt,$s,Zt,!0)])))),Ps=Dt(ct(ut([Ns,As]),ve(ut([Ns,As,Or,St(Yc),St(Vc),St(Ao)])))),ga=ct(V,ct(lu,ct(Er,ut([pt(Ht,Ps,Ht,!0),pt(Zt,Ps,Zt,!0)])))),Rs=ut([vt(uu,(()=>!0)),vt(fu,(()=>!1))]),Uu=ct(V,ct(cu,Et(ct(Er,ut([pt(Ht,Rs,Ht,!0),pt(Zt,Rs,Zt,!0)]))))),Xu=pt(Tt(aa,qo(V)),Tt(zt(ma,zt(it(ga),it(Uu),((t,e)=>[t,e])),((t,[e,n])=>({type:6,version:t,encoding:e,standalone:n}))),it(V)),ei,!0),ii=vn(vt(Te,(t=>({name:t})))),Wu=zt(ii,ct(Et(Er),Et(pa)),((t,e)=>({name:t,value:e}))),wa=vt(kr(qc,ii,Et(Tt(je(ct(V,Wu)),it(V))),Et(pn({47:vt(mu,(()=>!0))},vt(Se,(()=>!1)),0,[">","/>"]))),(([t,e,n,r])=>({type:r?9:7,name:e,attributes:n}))),Hu=vn(vt(pt(hu,Tt(Te,it(V)),Se,!0),(t=>({type:8,name:t})))),ya=ut([ia,sa,eu]),yr=Tt(ut([St(Te),function(t,e){return ba(t,e)},function(t,e){return xa(t,e)}]),St(it(ya))),ba=ue(Bn,it(V),yr,jn(kr(it(V),wr,it(V),Et(yr))),it(V),mn),xa=ue(Bn,it(V),yr,ve(kr(it(V),nu,it(V),Et(yr))),it(V),mn),Zu=Tt(ut([ba,xa]),it(ya)),Gu=ue(Bn,it(V),vu,ut([ue(ve(ue(it(V),wr,it(V),Te)),it(V),mn,sa),St(Tt(it(V),mn))])),Ju=Tt(yu,Et(ue(V,Te,V,ut([St(bu),St(xu),St(Gu),St(Zu)]),it(V),Se))),Vu=q("CDATA"),Yu=ut([q("IDREFS"),q("IDREF"),q("ID"),q("ENTITY"),q("ENTITIES"),q("NMTOKENS"),q("NMTOKEN")]),qu=ut([Tt(Su,Et(ue(V,Bn,it(V),_e,ve(ue(it(V),wr,it(V),_e)),it(V),mn))),Tt(Bn,Et(ue(it(V),Is,ve(ue(it(V),wr,it(V),Is)),it(V),mn)))]),Ku=ut([vt(Vu,(()=>!0)),vt(Yu,(()=>!1)),vt(qu,(()=>!1))]),Qu=ut([vt(Tu,(()=>({type:0}))),vt(Cu,(()=>({type:1}))),zt(vt(it(Tt(ku,V)),(t=>t!==null)),pa,((t,e)=>({type:2,fixed:t,value:e})))]),tf=zt(ct(V,ii),Et(zt(ct(V,Ku),ct(V,Qu),((t,e)=>({isCData:t,def:e})))),((t,{isCData:e,def:n})=>({name:t,isCData:e,def:n}))),ef=pt(Tt(_u,V),zt(Te,Et(je(tf)),((t,e)=>({type:0,name:t,attdefs:e}))),ct(it(V),Se),!0),Nr=ut([vt(ct(pu,Et(ct(V,Ds))),(t=>({publicId:null,systemId:t}))),ct(la,zt(Et(ct(V,ha)),ct(V,Ds),((t,e)=>({publicId:t,systemId:e}))))]),nf=ut([da,zt(Nr,it(ct(pt(V,Ou,V),_e)),((t,e)=>({ids:t,ndata:e})))]),rf=pt(ni,zt(ct(V,_e),Et(ct(V,nf)),((t,e)=>({type:1,name:t,value:e}))),ct(it(V),Se)),of=ut([da,St(Nr)]),sf=pt(Tt(ni,ct(V,oa)),zt(ct(V,_e),Et(ct(V,of)),((t,e)=>e?{type:2,name:t,value:e}:void 0)),ct(it(V),Se),!0),af=ct(qo(ni),Et(ut([rf,sf]))),lp=pt(Tt(aa,qo(V)),Tt(zt(it(ma),ga,((t,e)=>({type:6,version:t,encoding:e,standalone:null}))),it(V)),ei,!0),lf=vt(Tt(Tt(la,V),Et(ha)),(t=>({publicId:t,systemId:null}))),cf=pt(Eu,zt(pt(V,_e,V),ut([St(Nr),St(lf)]),(()=>{})),ct(it(V),Se),!0),uf=ut([St(Ju),ef,af,St(cf),St(oi),St(ri)]),ff=ut([St(Io),St(V)]),df=(function(t){return vt(t,(e=>e.filter((n=>n!==void 0))))})(je(ut([uf,ff]))),pf=ct(du,Et(vt(kr(V,Te,it(ct(V,Nr)),it(V),it(Tt(pt(tu,df,Qo,!0),it(V))),Se),(([t,e,n,r,o,i])=>({type:10,name:e,ids:n,intSubset:o}))))),va={parser:pn({[Un]:pn({47:Hu,33:ut([ri,Mu]),63:oi},wa,1),38:gn},zu),type:1};function hf(t){return new mr(t,[va])}var Fs=ut([ri,oi,V]),mf=[{parser:Xu,type:2},{parser:Fs,type:1},{parser:pf,type:2},{parser:Fs,type:1},{parser:wa,type:0},va];function gf(t){return new mr(t,mf)}function ho(t){return Array.from(t,(e=>un(e)?e:"[invalid character]")).join("")}function mo(t,e,n){let r=Array.from(t);if(r.length<n)return t;switch(e){case 0:return"\u2026"+r.slice(-n).join("");case 1:return r.slice(0,n).join("")+"\u2026"}let o=0|Math.min(r.length/2,n/2);return r.slice(0,o).join("")+"\u2026"+r.slice(-o).join("")}function gt(t,e){let{line:n,char:r}=(function(o,i){let s=1,a=1,l=0;for(;l<i;){let c=o.codePointAt(l);a++,l+=c>65535?2:1,c===10&&(s++,a=1)}return{line:s,char:a}})(e.input,e.start);throw new Error(`${t}
3
+ ${`At line ${n}, character ${r}:`}
4
+
5
+ ${(function(o,i,s){let a=mo(ho(o.substring(i,s)),2,30),l=o.lastIndexOf(`
6
+ `,i),c=mo(ho(o.substring(l+1,i)),0,55-a.length),h=o.indexOf(`
7
+ `,s),d=mo(ho(h>0?o.substring(s,h):o.substring(s)),1,80-a.length-c.length),w=Array.from(c,(f=>Sa(f)?f:" ")).join("");return`${c}${a}${d}
8
+ ${w}${"^".repeat(Math.max(Array.from(a).length,1))}`})(e.input,e.start,e.end)}`)}function _a(t,e,n,r){let o=Array.from(new Set(n),(a=>a.includes('"')?`'${a}'`:`"${a}"`)),i=e.codePointAt(r),s=i?String.fromCodePoint(i):"";gt(`Parsing ${t} failed, expected ${o.length>1?"one of "+o.join(", "):o[0]}`,{input:e,start:r,end:r+Math.max(s.length,1)})}function un(t){return Au(t,0).success}function ze(t){return $u(t,0).success}function Sa(t){return Iu(t,0).success}function wf(t){let e=[];for(let n of t)if(typeof n!="string")switch(n.type){case 0:e.push(String.fromCodePoint(n.cp));break;case 1:e.push(`&${n.name};`);break;case 2:gt(`reference to parameter entity "${n.name}" must not occur in an entity declaration in the internal subset`,n)}else e.push(n);return e.join("")}var $o=class{constructor(e){if(this.F=new Map,this.U=new Map,this._=new Set,this.q=new Set,e.intSubset)for(let n of e.intSubset)switch(n.type){case 0:{for(let o of n.attdefs)if(o.def.type===2)for(let i of o.def.value)typeof i!="string"&&i.type===1&&(this.U.has(i.name)||this._.has(i.name)||this.q.has(i.name)||gt(`default value of attribute "${o.name.name}" contains reference to undefined entity "${i.name}"`,i),this._.has(i.name)&&gt(`default value of attribute "${o.name.name}" must not contain reference to external entity "${i.name}"`,i));let r=this.F.get(n.name);r===void 0&&(r=new Map,this.F.set(n.name,r));for(let o of n.attdefs)r.has(o.name.name)||r.set(o.name.name,o);break}case 2:if(Array.isArray(n.value))for(let r of n.value)typeof r!="string"&&r.type===2&&gt(`reference to parameter entity "${r.name}" must not occur in an entity declaration in the internal subset`,r);break;case 1:if(this.U.has(n.name)||this._.has(n.name))continue;Array.isArray(n.value)?this.U.set(n.name,wf(n.value)):n.value.ndata===null?this._.add(n.name):this.q.add(n.name)}}getAttlist(e){return this.F.get(e.name)}getEntityReplacementText(e,n){let r=this.U.get(e.name);if(r===void 0&&(this.q.has(e.name)&&gt(`reference to binary entity "${e.name}" is not allowed`,e),this._.has(e.name))){if(n)return"";gt(`reference to external entity "${e.name}" is not allowed in attribute value`,e)}return r}},Ta=new Map([["lt","&#60;"],["gt",">"],["amp","&#38;"],["apos","'"],["quot",'"']]);function Ca(t,e,n,r,o){for(let i of e){if(typeof i=="string"){t.push(i.replace(/[\r\n\t]/g," "));continue}if(i.type===0){t.push(String.fromCodePoint(i.cp));continue}r!==null&&r.includes(i.name)&&gt(`reference to entity "${i.name}" must not be recursive`,i);let s=Ta.get(i.name);s===void 0&&n!==null&&(s=n.getEntityReplacementText(i,!1)),s===void 0&&gt(`reference to unknown entity "${i.name}" in attribute value`,i),o.enter(i,s.length);let a=Ru(s,0);a.success||_a(`replacement text for entity "${i.name}"`,s,a.expected,a.offset),Ca(t,a.value,n,r?[i.name,...r]:[i.name],o),o.exit()}}function br(t,e,n,r){let o=[];return Ca(o,t,n,null,r),e&&!e.isCData?o.join("").replace(/[ ]+/g," ").replace(/^[ ]+|[ ]+$/g,""):o.join("")}function ur(t,e){let n=t.name,r=e.get(n);if(r!==void 0)return r;let o=null,i=n,s=n.indexOf(":");s>=0&&(o=n.substring(0,s),i=n.substring(s+1)),(o===""||i===""||i.includes(":"))&&gt(`the name "${n}" is not a valid qualified name`,t);let a={prefix:o,localName:i};return e.set(n,a),a}var xr=class t{constructor(e,n=null){var r;this.B=new Map,this.W=null,this.X=e,this.W=(r=n??e?.W)!==null&&r!==void 0?r:null}getForElement(e,n){e==="xmlns"&&gt('element names must not have the prefix "xmlns"',n);for(let r=this;r!==null;r=r.X){let o=r.B.get(e);if(o!==void 0)return o}if(e!==null&&this.W){let r=this.W(e);if(r!==void 0)return r}gt(`use of undeclared element prefix "${e}"`,n)}getForAttribute(e,n,r){if(e===null)return n==="xmlns"?Mt:null;for(let o=this;o!==null;o=o.X){let i=o.B.get(e);if(i!==void 0)return i}if(this.W){let o=this.W(e);if(o!==void 0)return o}gt(`use of undeclared attribute prefix ${e}`,r)}static fromAttrs(e,n,r,o,i,s){let a=e,l=!1,c=(d,w,f)=>{d!==null||w!==ce&&w!==Mt||gt(`the namespace "${w}" must not be used as the default namespace`,f),w===Mt&&gt(`the namespace "${Mt}" must not be bound to a prefix`,f),w===ce&&d!=="xml"&&gt(`the namespace "${ce}" must be bound only to the prefix "xml"`,f),w!==ce&&d==="xml"&&gt(`the xml namespace prefix must not be bound to any namespace other than "${ce}"`,f),d!==null&&w===null&&gt(`the prefix "${d}" must not be undeclared`,f),l||(a=new t(e),l=!0),a.B.set(d,w)},h=(d,w)=>{let{prefix:f,localName:g}=ur(d,i),m=r?.get(d.name);if(f!==null||g!=="xmlns"||l&&a.B.has(null)){if(!(f!=="xmlns"||l&&a.B.has(g))){g==="xmlns"&&gt('the "xmlns" namespace prefix must not be declared',d);let y=br(w,m,o,s)||null;c(g,y,d)}}else{let y=br(w,m,o,s)||null;c(null,y,d)}};for(let d of n.attributes)h(d.name,d.value);if(r)for(let d of r.values()){let w=d.def;w.type===2&&h(d.name,w.value)}return a}static default(e){let n=new t(null,e);return n.B.set(null,null),n.B.set("xml",ce),n.B.set("xmlns",Mt),n}},yf=xr.default(null);function on(t,e){Xn(e,t,null,!0)}function bf(t,e,n,r,{entityExpansionMaxAmplification:o=100,entityExpansionThreshold:i=4194304,treatCDataAsText:s=!1}){var a,l;let c=Gt(r),h={parent:null,root:r,namespaces:n,entityRoot:!0},d=null,w=new Map,f=[];function g(){if(f.length>0){let v=f.join("");if(h.root===c){if(!Sa(v))throw new Error("document must not contain text outside of elements")}else on(h.root,c.createTextNode(f.join("")));f.length=0}}t=(function(v){return v.replace(/\r\n?/g,`
9
+ `)})(t=t.replace(/^\ufeff/,""));let m=new No(t.length,i,o),y={parent:null,entity:null,iterator:e(t)};for(;y;){let v=y.iterator.next();for(;!v.done;v=y.iterator.next()){let _=v.value;if(typeof _!="string"){switch(_.type){case 0:h.root===c&&c.documentElement!==null&&gt("character reference must not appear after the document element",_),f.push(String.fromCodePoint(_.cp));continue;case 1:{h.root===c&&c.documentElement!==null&&gt(`reference to entity "${_.name}" must not appear after the document element`,_);for(let D=y;D;D=D.parent)D.entity===_.name&&gt(`reference to entity "${_.name}" must not be recursive`,_);let T=Ta.get(_.name);T===void 0&&d!==null&&(T=d.getEntityReplacementText(_,!0)),T===void 0&&gt(`reference to unknown entity "${_.name}" in content`,_),m.enter(_,T.length),h={parent:h,root:h.root,namespaces:h.namespaces,entityRoot:!0},y={parent:y,entity:_.name,iterator:hf(T)};continue}case 5:if(s){f.push(_.data);continue}}switch(g(),_.type){case 5:h.root===c&&c.documentElement!==null&&gt("CData section must not appear after the document element",_),on(h.root,c.createCDATASection(_.data));continue;case 3:on(h.root,c.createComment(_.data));continue;case 10:d=new $o(_),on(h.root,c.implementation.createDocumentType(_.name,((a=_.ids)===null||a===void 0?void 0:a.publicId)||"",((l=_.ids)===null||l===void 0?void 0:l.systemId)||""));continue;case 4:on(h.root,c.createProcessingInstruction(_.target,_.data||""));continue;case 7:case 9:{h.root===c&&c.documentElement!==null&&gt(`document must contain a single root element, but found "${c.documentElement.nodeName}" and "${_.name.name}"`,_.name);let T=d?d.getAttlist(_.name):void 0,D=xr.fromAttrs(h.namespaces,_,T,d,w,m),{prefix:k,localName:F}=ur(_.name,w),N=D.getForElement(k,_.name),L=Jc(c,F,N,k);for(let Y of _.attributes){let{prefix:S,localName:$}=ur(Y.name,w),p=D.getForAttribute(S,$,Y.name),P=T?.get(Y.name.name);L.hasAttributeNS(p,$)&&gt(`attribute "${Y.name.name}" must not appear multiple times on element "${_.name.name}"`,Y.name),dn(Es(p,S,$,br(Y.value,P,d,m),L),L,!0)}if(T)for(let Y of T.values()){let S=Y.def;if(S.type!==2)continue;let{prefix:$,localName:p}=ur(Y.name,w),P=D.getForAttribute($,p,Y.name);L.hasAttributeNS(P,p)||dn(Es(P,$,p,br(S.value,Y,d,m),L),L,!0)}on(h.root,L),_.type===7&&(h={parent:h,root:L,namespaces:D,entityRoot:!1,event:_});continue}case 8:Re(h.root)&&h.root.nodeName===_.name||gt(`non-well-formed element: found end tag "${_.name}" but expected ${Re(h.root)?`"${h.root.nodeName}"`:"no such tag"}`,_),h=h.parent;continue}}else f.push(_)}v.value.success||_a(y.entity?`replacement text for entity ${y.entity}`:r===c?"document":"fragment",t,v.value.expected,v.value.offset),h.entityRoot||gt(`${y.entity?`replacement text for entity "${y.entity}"`:r===c?"document":"fragment"} is not well-formed - element "${h.root.nodeName}" is missing a closing tag`,h.event.name),y=y.parent,y&&(m.exit(),h=h.parent)}g()}function ge(t,e={}){let n=new wn;return bf(t,gf,yf,n,e),n}var Po=class t{constructor(e){this.Y=new Map,this.H=new Map,this.X=e}static new(){let e=new t(null);return e.add(null,null),e.add("xml",ce),e.add("xmlns",Mt),e}add(e,n){let r=this.H.get(n);r===void 0?this.H.set(n,[e]):r.push(e),this.Y.set(e,n)}recordNamespaceInformation(e){let n=new t(this);for(let r of e.attributes){if(r.namespaceURI!==Mt)continue;let o=r.value===""?null:r.value,i=r.prefix===null?null:r.localName;n.add(i,o)}return n}j(e){return this.Y.get(e)}K(e){var n;return(n=this.X)===null||n===void 0?void 0:n.prefixToNamespace(e)}prefixToNamespace(e){let n=this.j(e);return n!==void 0?n:this.K(e)}shouldSerializeDeclaration(e,n){return this.prefixToNamespace(e)===n&&this.K(e)!==n}G(e,n){let r=this;for(;r;){let o=r.H.get(e);if(o!==void 0)for(let i=o.length-1;i>=0;--i){let s=o[i];if((n||s!==null)&&this.prefixToNamespace(s)===e)return s}r=r.X}}getPreferredPrefix(e,n){var r;if(e.namespaceURI===ce)return"xml";let o=xo(e);if(e.namespaceURI===Mt)return o&&e.prefix===null?null:"xmlns";if(o&&e.namespaceURI===null)return null;if(!o){let s=(r=this.K(null))!==null&&r!==void 0?r:null;if(e.namespaceURI===s)return null}if((!o||e.prefix!==null)&&this.prefixToNamespace(e.prefix)===e.namespaceURI)return e.prefix;let i=this.G(e.namespaceURI,!o);if(i!==void 0)return i;if(o){let s=this.j(e.prefix);if(!(e.prefix!==null&&(s===void 0||s===e.namespaceURI)))for(;;){let a=`ns${n.value}`;if(n.value+=1,this.j(a)===void 0)return a}}return e.prefix}},xf=["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function zs(t,e,n=!1){let r=n?[t]:t.childNodes,o=[];for(let i of r)ka(i,e,o);return o.join("")}function ka(t,e,n){let r=Po.new(),o={value:1};try{fr(t,r,o,e,n)}catch(i){return Xs(i.message)}}function fr(t,e,n,r,o){switch(t.nodeType){case 1:return void(function(i,s,a,l,c){let h=i;if(l&&(h.localName.indexOf(":")>=0||!ze(h.localName)))throw new Error(`Can not serialize an element because the localName "${h.localName}" is not allowed.`);c.push("<");let d="",w=!1,f=s.recordNamespaceInformation(h);if(h.prefix==="xmlns"&&l)throw new Error('Can not serialize an element with prefix "xmlns" because it will not legally round-trip in a conforming XML parser.');let g=f.getPreferredPrefix(h,a);if(g!==null&&(d+=`${g}:`),d+=h.localName,c.push(d),f.prefixToNamespace(g)!==h.namespaceURI&&(f.add(g,h.namespaceURI),g===null?c.push(' xmlns="'):c.push(" xmlns:",g,'="'),c.push(go(h.namespaceURI,l),'"')),(function(m,y,v,_,T){let D=[];for(let k of m.attributes){let F=y.getPreferredPrefix(k,v);if(k.namespaceURI===Mt){let N=k.value===""?null:k.value;if(_&&N===Mt)throw new Error("The serialization of this attribute would produce invalid XML because the XMLNS namespace is reserved and cannot be applied as an element's namespace via XML parsing.");if(N===ce||N===Mt)continue;let L=k.prefix===null?null:k.localName;if(_&&k.prefix!==null&&k.value==="")throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace. Use a default namespace declaration instead.");if(!y.shouldSerializeDeclaration(L,N))continue}if(_&&D.find((N=>N.localName===k.localName&&N.namespaceURI===k.namespaceURI)))throw new Error(`Can not serialize a duplicate attribute for namespaceURI "${k.namespaceURI}", localName "${k.localName}".`);if(D.push({namespaceURI:k.namespaceURI,localName:k.localName}),_&&(k.localName.indexOf(":")>=0||!ze(k.localName)||k.localName==="xmlns"&&k.namespaceURI===null))throw new Error(`Can not serialize an attribute because the localName "${k.localName}" is not allowed.`);F!==null&&y.prefixToNamespace(F)!==k.namespaceURI&&(T.push(" xmlns:",F,'="',go(k.namespaceURI,_),'"'),y.add(F,k.namespaceURI)),T.push(" "),F!==null&&T.push(F,":"),T.push(k.localName,'="',go(k.value,_),'"')}})(h,f,a,l,c),h.namespaceURI===cn&&!h.hasChildNodes()&&xf.indexOf(h.localName)>=0&&(c.push(" /"),w=!0),h.namespaceURI===cn||h.hasChildNodes()||(c.push("/"),w=!0),c.push(">"),!w){for(let m of i.childNodes)fr(m,f,a,l,c);c.push("</",d,">")}})(t,e,n,r,o);case 9:return void(function(i,s,a,l,c){let h=i;if(l&&h.documentElement===null)throw new Error("Can not serialize a document with no documentElement.");for(let d of h.childNodes)fr(d,s,a,l,c)})(t,e,n,r,o);case 8:return void(function(i,s,a){let l=i;if(s&&(!un(l.data)||l.data.indexOf("--")>=0||l.data.endsWith("-")))throw new Error("Can not serialize a comment because it contains invalid characters.");a.push("<!--",l.data,"-->")})(t,r,o);case 4:return void(function(i,s,a){let l=i;a.push("<![CDATA[",l.data,"]]>")})(t,0,o);case 3:return void(function(i,s,a){let l=i;if(s&&!un(l.data))throw new Error("Can not serialize a text node because it contains invalid characters.");let c=l.data;c=c.replace(/&/g,"&amp;"),c=c.replace(/</g,"&lt;"),c=c.replace(/>/g,"&gt;"),a.push(c)})(t,r,o);case 11:return void(function(i,s,a,l,c){for(let h of i.childNodes)fr(h,s,a,l,c)})(t,e,n,r,o);case 10:return void(function(i,s,a){let l=i;if(s&&(c=l.publicId,!Fu(c,0).success))throw new Error("Can not serialize a document type because the publicId contains invalid characters.");var c;if(s&&(!un(l.systemId)||l.systemId.indexOf('"')>=0&&l.systemId.indexOf("'")>=0))throw new Error("Can not serialize a document type because the systemId contains invalid characters.");a.push("<!DOCTYPE"),a.push(" "),a.push(l.name),l.publicId!==""&&a.push(' PUBLIC "',l.publicId,'"'),l.systemId!==""&&l.publicId===""&&a.push(" SYSTEM"),l.systemId!==""&&a.push(' "',l.systemId,'"'),a.push(">")})(t,r,o);case 7:return void(function(i,s,a){let l=i;if(s){if(l.target.indexOf(":")>=0)throw new Error(`Can not serialize a processing instruction because the target "${l.target}" may not contain ":".`);if(l.target.toLowerCase()==="xml")throw new Error('Can not serialize a processing instruction because "xml" may not be used as target.')}if(s&&(!un(l.data)||l.data.indexOf("?>")>=0))throw new Error("Can not serialize a processing instruction because the data contains invalid characters.");a.push("<?",l.target," ",l.data,"?>")})(t,r,o);case 2:return;default:throw new TypeError("Only Nodes and Attr objects can be serialized by this algorithm.")}}function go(t,e){if(e&&t!==null&&!un(t))throw new Error("Can not serialize an attribute value because it contains invalid characters.");return t===null?"":t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\t/g,"&#9;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;")}var Ro=class extends K{get nodeType(){return 1}get nodeName(){return this.tagName}get nodeValue(){return null}set nodeValue(e){}get textContent(){return Gs(this)}set textContent(e){Js(this,e=hn(e))}lookupPrefix(e){return Z(arguments,1),(e=Wt(e))===null||e===""?null:Ks(this,e)}lookupNamespaceURI(e){if(Z(arguments,1),(e=Wt(e))===""&&(e=null),this.namespaceURI!==null&&this.prefix===e)return this.namespaceURI;let n=null;if(e!==null){let o=this.getAttributeNodeNS(Mt,e);o&&o.prefix==="xmlns"&&(n=o.value)}else{let o=this.getAttributeNodeNS(Mt,"xmlns");o&&o.prefix===null&&(n=o.value)}if(n!==null)return n!==""?n:null;let r=this.parentElement;return r===null?null:r.lookupNamespaceURI(e)}before(...e){Zo(this,e)}after(...e){Go(this,e)}replaceWith(...e){Jo(this,e)}remove(){Vo(this)}get children(){return Lo(this)}prepend(...e){Xo(this,e)}append(...e){Wo(this,e)}replaceChildren(...e){Ho(this,e)}get previousElementSibling(){return Ws(this)}get nextElementSibling(){return Hs(this)}constructor(e,n,r){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0,this.attributes=[],this.namespaceURI=e,this.prefix=n,this.localName=r,this.tagName=n===null?r:`${n}:${r}`}hasAttributes(){return this.attributes.length>0}getAttribute(e){Z(arguments,1);let n=an(e=String(e),this);return n===null?null:n.value}getAttributeNS(e,n){Z(arguments,2);let r=ln(e=Wt(e),n=String(n),this);return r===null?null:r.value}setAttribute(e,n){Z(arguments,2),e=String(e),n=String(n),ze(e)||Pe("The qualified name does not match the Name production");let r=an(e,this);if(r===null){let o=new(at()).Attr(null,null,e,n,this);return o.ownerDocument=this.ownerDocument,void dn(o,this)}Co(r,n)}setAttributeNS(e,n,r){Z(arguments,3),e=Wt(e),n=String(n),r=String(r);let{namespace:o,prefix:i,localName:s}=Yo(e,n);(function(a,l,c,h,d){let w=ln(d,l,a);if(w===null){let f=new(at()).Attr(d,h,l,c,a);return f.ownerDocument=a.ownerDocument,void dn(f,a)}Co(w,c)})(this,s,r,i,o)}removeAttribute(e){Z(arguments,1),Bs(e=String(e),this)}removeAttributeNS(e,n){Z(arguments,2),(function(r,o,i){let s=ln(r,o,i);s!==null&&ko(s)})(e=Wt(e),n=String(n),this)}toggleAttribute(e,n){if(ze(e)||Pe("The qualified name does not match the Name production"),an(e,this)===null){if(n===void 0||n===!0){let r=new(at()).Attr(null,null,e,"",this);return r.ownerDocument=this.ownerDocument,dn(r,this),!0}return!1}return n!==void 0&&n!==!1||(Bs(e,this),!1)}hasAttribute(e){return Z(arguments,1),an(e=String(e),this)!==null}hasAttributeNS(e,n){return Z(arguments,2),ln(e=Wt(e),n=String(n),this)!==null}getAttributeNode(e){return Z(arguments,1),an(e=String(e),this)}getAttributeNodeNS(e,n){return Z(arguments,2),ln(e=Wt(e),n=String(n),this)}setAttributeNode(e){return Z(arguments,1),js(e=bt(e,Ge),this)}setAttributeNodeNS(e){return Z(arguments,1),js(e=bt(e,Ge),this)}removeAttributeNode(e){return Z(arguments,1),e=bt(e,Ge),this.attributes.indexOf(e)<0&&_r("the specified attribute does not exist"),ko(e),e}getElementsByTagName(e){return Z(arguments,1),Ms(e=String(e),this)}getElementsByTagNameNS(e,n){return Z(arguments,2),Us(e=Wt(e),n=String(n),this)}T(e){let n=Fe(e,this.localName,this.namespaceURI,this.prefix);for(let r of this.attributes){let o=r.T(e);n.setAttributeNode(o)}return n}get innerHTML(){return zs(this,!0)}get outerHTML(){return zs(this,!0,!0)}};function Fe(t,e,n,r=null){let o=null;return o=new(at()).Element(n,r,e),o.ownerDocument=t,o}function an(t,e){return e.attributes.find((n=>n.name===t))||null}function ln(t,e,n){return t===""&&(t=null),n.attributes.find((r=>r.namespaceURI===t&&r.localName===e))||null}function js(t,e){t.ownerElement!==null&&t.ownerElement!==e&&(function(r){throw he("InUseAttributeError",r)})("attribute is in use by another element");let n=ln(t.namespaceURI,t.localName,e);return n===t?t:(n!==null?(function(r,o){let i=r.ownerElement;Tr(r,i,r.value,o.value),i.attributes.splice(i.attributes.indexOf(r),1,o),o.ownerElement=i,r.ownerElement=null})(n,t):dn(t,e),n)}function Bs(t,e){let n=an(t,e);return n!==null&&ko(n),n}function Oa(t,e,n){let{namespace:r,prefix:o,localName:i}=Yo(e,n);return Fe(t,i,r,o)}var vr=class{constructor(e){this.J=e}createDocumentType(e,n,r){Z(arguments,3),e=String(e),n=String(n),r=String(r),qs(e);let o=new(at(this.J)).DocumentType(e,n,r);return o.ownerDocument=this.J,o}createDocument(e,n,r=null){Z(arguments,2),e=Wt(e),n=Vs(n),r=To(r,hr);let o=new(at(this.J)).XMLDocument,i=null;return n!==""&&(i=Oa(o,e,n)),r&&o.appendChild(r),i&&o.appendChild(i),o}createHTMLDocument(e){e=Wt(e);let n=at(this.J),r=new n.Document,o=new n.DocumentType("html");o.ownerDocument=r,r.appendChild(o);let i=Fe(r,"html",cn);r.appendChild(i);let s=Fe(r,"head",cn);if(i.appendChild(s),e!==null){let a=Fe(r,"title",cn);s.appendChild(a),a.appendChild(r.createTextNode(e))}return i.appendChild(Fe(r,"body",cn)),r}},wn=class extends K{get nodeType(){return 9}get nodeName(){return"#document"}get nodeValue(){return null}set nodeValue(e){}get textContent(){return null}set textContent(e){}lookupPrefix(e){return Z(arguments,1),this.documentElement!==null?this.documentElement.lookupPrefix(e):null}lookupNamespaceURI(e){return Z(arguments,1),this.documentElement===null?null:this.documentElement.lookupNamespaceURI(e)}get children(){return Lo(this)}prepend(...e){Xo(this,e)}append(...e){Wo(this,e)}replaceChildren(...e){Ho(this,e)}constructor(){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0,this.implementation=new vr(this),this.doctype=null,this.documentElement=null}getElementsByTagName(e){return Z(arguments,1),Ms(e=String(e),this)}getElementsByTagNameNS(e,n){return Z(arguments,2),Us(e=Wt(e),n=String(n),this)}createElement(e){return Z(arguments,1),ze(e=String(e))||Pe("The local name is not a valid Name"),Fe(this,e,null,null)}createElementNS(e,n){return Z(arguments,2),Oa(this,e=Wt(e),n=String(n))}createDocumentFragment(){let e=new(at()).DocumentFragment;return e.ownerDocument=this,e}createTextNode(e){Z(arguments,1),e=String(e);let n=new(at()).Text(e);return n.ownerDocument=this,n}createCDATASection(e){Z(arguments,1),(e=String(e)).indexOf("]]>")>=0&&Pe('Data must not contain the string "]]>"');let n=new(at()).CDATASection(e);return n.ownerDocument=this,n}createComment(e){Z(arguments,1),e=String(e);let n=new(at()).Comment(e);return n.ownerDocument=this,n}createProcessingInstruction(e,n){Z(arguments,2),e=String(e),n=String(n),ze(e)||Pe("The target is not a valid Name"),n.indexOf("?>")>=0&&Pe('Data must not contain the string "?>"');let r=new(at()).ProcessingInstruction(e,n);return r.ownerDocument=this,r}importNode(e,n=!1){return Z(arguments,1),ot(e=bt(e,K),9)&&_o("importing a Document node is not supported"),Bo(e,n,this)}adoptNode(e){return Z(arguments,1),ot(e=bt(e,K),9)&&_o("adopting a Document node is not supported"),Sr(e,this),e}createAttribute(e){Z(arguments,1),ze(e=String(e))||Pe("The local name is not a valid Name");let n=new(at()).Attr(null,null,e,"",null);return n.ownerDocument=this,n}createAttributeNS(e,n){Z(arguments,2),e=Wt(e),n=String(n);let{namespace:r,prefix:o,localName:i}=Yo(e,n),s=new(at()).Attr(r,o,i,"",null);return s.ownerDocument=this,s}createRange(){let e=new(at()).Range;return e.startContainer=this,e.startOffset=0,e.endContainer=this,e.endOffset=0,e}T(e){return new(at()).Document}},Fo=class extends K{get nodeType(){return 11}get nodeName(){return"#document-fragment"}get nodeValue(){return null}set nodeValue(e){}get textContent(){return Gs(this)}set textContent(e){Js(this,e=hn(e))}lookupPrefix(e){return Z(arguments,1),null}lookupNamespaceURI(e){return Z(arguments,1),null}get children(){return Lo(this)}prepend(...e){Xo(this,e)}append(...e){Wo(this,e)}replaceChildren(...e){Ho(this,e)}constructor(){super(),this.firstElementChild=null,this.lastElementChild=null,this.childElementCount=0;let e=at();this.ownerDocument=e.document}T(e){let n=new(at()).DocumentFragment;return n.ownerDocument=e,n}},zo=class extends Fn{get nodeType(){return 7}get nodeName(){return this.target}constructor(e,n){super(n),this.target=e}T(e){let n=new(at()).ProcessingInstruction(this.target,this.data);return n.ownerDocument=e,n}};function Ls(t,e){if(t.collapsed)return;let n=de(t.startContainer),r=de(t.endContainer),o=0;for(;o<n.length&&o<r.length&&n[o]===r[o];)++o;let i=t.endContainer.childNodes[t.endOffset]||null;for(let s=t.startContainer.childNodes[t.startOffset]||null;s&&s!==i&&s!==r[n.length];s=s.nextSibling)e(s);for(let s=n.length-1;s>=o;--s)for(let a=n[s].nextSibling;a&&a!==i&&a!==r[s];a=a.nextSibling)e(a);for(let s=o;s<r.length;++s)for(let a=r[s].firstChild;a&&a!==i&&a!==r[s+1];a=a.nextSibling)e(a)}function Rn(t,e){let n=Gt(t.startContainer),r=n.createDocumentFragment();if(t.collapsed)return r;let o=t.startContainer,i=t.startOffset,s=t.endContainer,a=t.endOffset;if(o===s&&fn(o)){let k=o.cloneNode();return k.data=o.substringData(i,a-i),ne(k,r),e||o.replaceData(i,a-i,""),r}let l=de(t.startContainer),c=de(t.endContainer),h=0;for(;h<l.length&&h<c.length&&l[h]===c[h];)++h;let d=h===l.length,w=h===c.length,f=null;d||(f=l[h]);let g=null;w||(g=c[h]);let m=[],y=f?f.nextSibling:o.childNodes[i],v=g||s.childNodes[a]||null;for(var _=y;_&&_!==v;_=_.nextSibling)ot(_,10)&&_t(e?"Can not clone a doctype using cloneContents":"Can not extract a doctype using extractContents"),m.push(_);let T,D;if(d||e)T=o,D=i;else{let k=l[h];T=k.parentNode,D=1+yt(k)}if(f!==null&&fn(f)){let k=f.cloneNode();k.data=f.substringData(i,f.length-i),ne(k,r),e||f.replaceData(i,f.length-i,"")}else if(f!==null){let k=f.cloneNode();ne(k,r);let F=n.createRange();F.setStart(o,i),F.setEnd(f,$e(f));let N=Rn(F,e);F.detach(),ne(N,k)}if(m.forEach((k=>{ne(e?k.cloneNode(!0):k,r)})),g&&fn(g)){let k=g.cloneNode();k.data=g.substringData(0,a),ne(k,r),e||g.replaceData(0,a,"")}else if(g!==null){let k=g.cloneNode();ne(k,r);let F=n.createRange();F.setStart(g,0),F.setEnd(s,a);let N=Rn(F,e);F.detach(),ne(N,k)}return e||(t.setStart(T,D),t.collapse(!0)),r}var Ze=class t{get collapsed(){return(e=this).startContainer===e.endContainer&&e.startOffset===e.endOffset;var e}constructor(){let e=at();this.startContainer=e.document,this.startOffset=0,this.endContainer=e.document,this.endOffset=0,e.addRange(this)}get commonAncestorContainer(){let e=de(this.startContainer),n=de(this.endContainer),r=e[0],o=0;for(;o<e.length&&o<n.length&&e[o]===n[o];)r=e[o],++o;return r}setStart(e,n){Z(arguments,2),e=bt(e,K),n=xe(n),ot(e,10)&&oe("Can not set a range under a doctype node"),n>$e(e)&&He("Can not set a range past the end of the node"),We(this)===sn(e)&&ee(e,n,this.endContainer,this.endOffset)!==Pn||(this.endContainer=e,this.endOffset=n),this.startContainer=e,this.startOffset=n}setEnd(e,n){Z(arguments,2),e=bt(e,K),n=xe(n),ot(e,10)&&oe("Can not set a range under a doctype node"),n>$e(e)&&He("Can not set a range past the end of the node"),We(this)===sn(e)&&ee(e,n,this.startContainer,this.startOffset)!==$n||(this.startContainer=e,this.startOffset=n),this.endContainer=e,this.endOffset=n}setStartBefore(e){Z(arguments,1);let n=(e=bt(e,K)).parentNode;if(n===null)return oe("Can not set range before node without a parent");this.setStart(n,yt(e))}setStartAfter(e){Z(arguments,1);let n=(e=bt(e,K)).parentNode;if(n===null)return oe("Can not set range before node without a parent");this.setStart(n,yt(e)+1)}setEndBefore(e){Z(arguments,1);let n=(e=bt(e,K)).parentNode;if(n===null)return oe("Can not set range before node without a parent");this.setEnd(n,yt(e))}setEndAfter(e){Z(arguments,1);let n=(e=bt(e,K)).parentNode;if(n===null)return oe("Can not set range before node without a parent");this.setEnd(n,yt(e)+1)}collapse(e=!1){e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset)}selectNode(e){Z(arguments,1);let n=(e=bt(e,K)).parentNode;if(n===null)return oe("Can not select node with null parent");let r=yt(e);this.startContainer=n,this.startOffset=r,this.endContainer=n,this.endOffset=r+1}selectNodeContents(e){Z(arguments,1),ot(e=bt(e,K),10)&&oe("Can not place range inside a doctype node");let n=$e(e);this.startContainer=e,this.startOffset=0,this.endContainer=e,this.endOffset=n}compareBoundaryPoints(e,n){switch(Z(arguments,2),n=bt(n,t),e!==t.START_TO_START&&e!==t.START_TO_END&&e!==t.END_TO_END&&e!==t.END_TO_START&&_o("Unsupported comparison type"),We(this)!==We(n)&&Cs("Can not compare positions of ranges in different trees"),e){case t.START_TO_START:return ee(this.startContainer,this.startOffset,n.startContainer,n.startOffset);case t.START_TO_END:return ee(this.endContainer,this.endOffset,n.startContainer,n.startOffset);case t.END_TO_END:return ee(this.endContainer,this.endOffset,n.endContainer,n.endOffset);default:return ee(this.startContainer,this.startOffset,n.endContainer,n.endOffset)}}deleteContents(){if(this.collapsed)return;let e=this.startContainer,n=this.startOffset,r=this.endContainer,o=this.endOffset;if(e===r&&fn(e))return void e.replaceData(n,o-n,"");let i=[],s,a;if(Ls(this,(l=>{i.push(l)})),e.contains(r))s=e,a=n;else{let l=e;for(;l.parentNode!==null&&!l.parentNode.contains(r);)l=l.parentNode;s=l.parentNode,a=1+yt(l)}fn(e)&&e.replaceData(n,e.length-n,""),i.forEach((l=>{fe(l)})),fn(r)&&r.replaceData(0,o,""),this.setStart(s,a),this.collapse(!0)}extractContents(){return Rn(this,!1)}cloneContents(){return Rn(this,!0)}insertNode(e){Z(arguments,1),ks(e=bt(e,K),this)}surroundContents(e){Z(arguments,1),e=bt(e,K),(De(this.startContainer)?this.startContainer.parentNode:this.startContainer)!==(De(this.endContainer)?this.endContainer.parentNode:this.endContainer)&&Xs("Can not use surroundContents on a range that has partially selected a non-Text node"),ot(e,9,10,11)&&oe("Can not use Document, DocumentType, or DocumentFragment as a parent node in surroundContents");let n=Rn(this,!1);e.firstChild&&Uo(null,e),ks(e,this),ne(n,e),this.selectNode(e)}cloneRange(){let e=new(at()).Range;return e.startContainer=this.startContainer,e.startOffset=this.startOffset,e.endContainer=this.endContainer,e.endOffset=this.endOffset,e}detach(){at().removeRange(this)}isPointInRange(e,n){return Z(arguments,2),e=bt(e,K),n=xe(n),sn(e)===We(this)&&(ot(e,10)&&oe("Point can not be under a doctype"),n>$e(e)&&He("Offset should not be past the end of node"),ee(e,n,this.startContainer,this.startOffset)!==$n&&ee(e,n,this.endContainer,this.endOffset)!==Pn)}comparePoint(e,n){return Z(arguments,2),e=bt(e,K),n=xe(n),sn(e)!==We(this)&&Cs("Can not compare point to range in different trees"),ot(e,10)&&oe("Point can not be under a doctype"),n>$e(e)&&He("Offset should not be past the end of node"),ee(e,n,this.startContainer,this.startOffset)===$n?-1:ee(e,n,this.endContainer,this.endOffset)===Pn?1:0}intersectsNode(e){if(Z(arguments,1),sn(e=bt(e,K))!==We(this))return!1;let n=e.parentNode;if(n===null)return!0;let r=yt(e);return ee(n,r,this.endContainer,this.endOffset)===$n&&ee(n,r+1,this.startContainer,this.startOffset)===Pn}toString(){let e=[],n=this.startContainer;if(De(n)){if(this.startContainer===this.endContainer)return n.substringData(this.startOffset,this.endOffset-this.startOffset);e.push(n.substringData(this.startOffset,n.length-this.startOffset))}Ls(this,(o=>{yn(o,(i=>{De(i)&&e.push(i.data)}))}));let r=this.endContainer;return De(r)&&e.push(r.substringData(0,this.endOffset)),e.join("")}};Ze.START_TO_START=0,Ze.START_TO_END=1,Ze.END_TO_END=2,Ze.END_TO_START=3;var $n=-1,Pn=1;function ee(t,e,n,r){if(t!==n){let o=de(t),i=de(n);for(;o[0]&&i[0]&&o[0]===i[0];)o.shift(),i.shift();o.length&&(e=yt(o[0])+.5),i.length&&(r=yt(i[0])+.5)}return e===r?0:e<r?$n:Pn}function We(t){return sn(t.startContainer)}var jo=class extends wn{T(e){return new(at()).XMLDocument}};function Hn(t){let e=[];return ka(t=bt(t,K),!0,e),e.join("")}var vf=new wn;Xt.document=vf,Xt.Attr=Ge,Xt.CDATASection=Oo,Xt.Comment=Eo,Xt.Document=wn,Xt.DocumentFragment=Fo,Xt.DocumentType=hr,Xt.DOMImplementation=vr,Xt.Element=Ro,Xt.ProcessingInstruction=zo,Xt.Range=Ze,Xt.Text=pr,Xt.XMLDocument=jo;var _f=Object.defineProperty,wt=(t,e)=>_f(t,"name",{value:e,configurable:!0});function li(t){if(typeof t!="string"||t.length===0)throw new Error(`invalid part path: must be non-empty string, got: ${JSON.stringify(t)}`);if(t.startsWith("/"))throw new Error(`invalid part path: must not start with '/', got: ${t}`)}wt(li,"assertPath");function ci(t){if(typeof t!="string"||t.length===0)throw new Error("invalid contentType: must be non-empty string")}wt(ci,"assertContentType");function Zn(t){if(li(t.path),ci(t.contentType),!t.xmlDom)throw new Error(`createXmlPart: xmlDom required for ${t.path}`);return{path:t.path,contentType:t.contentType,xmlDom:t.xmlDom,_originalBytes:t.originalBytes,_dirty:t.originalBytes===void 0}}wt(Zn,"createXmlPart");function Ir(t){var e;if(li(t.path),ci(t.contentType),!t.bytes)throw new Error(`createBinaryPart: bytes required for ${t.path}`);return{path:t.path,contentType:t.contentType,bytes:t.bytes,_originalBytes:(e=t.originalBytes)!=null?e:t.bytes,_dirty:!1}}wt(Ir,"createBinaryPart");function Sf(t){t._dirty=!0}wt(Sf,"markDirty");function Tf(t){return t._dirty}wt(Tf,"isDirty");function ui(t){return t.xmlDom!==void 0}wt(ui,"isXmlPart");function Cf(t){return t.bytes!==void 0&&t.xmlDom===void 0}wt(Cf,"isBinaryPart");function fi(){return{parts:new Map}}wt(fi,"createPackage");function Be(t,e){t.parts.set(e.path,e)}wt(Be,"setPart");function Na(t,e){return t.parts.get(e)}wt(Na,"getPart");function kf(t,e){return t.parts.has(e)}wt(kf,"hasPart");function Of(t,e){return t.parts.delete(e)}wt(Of,"deletePart");function Ef(t){return Array.from(t.parts.values())}wt(Ef,"listParts");var si="[Content_Types].xml",Nf="http://schemas.openxmlformats.org/package/2006/content-types",Af="application/vnd.openxmlformats-package.content-types+xml";function ai(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}wt(ai,"xmlAttr");function Aa(t){if(Na(t,si))return!1;let e=[];for(let r of t.parts.values())r.path!==si&&e.push(` <Override PartName="/${ai(r.path)}" ContentType="${ai(r.contentType)}"/>`);let n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
10
+ <Types xmlns="${Nf}">
11
+ `+e.join(`
12
+ `)+(e.length>0?`
13
+ `:"")+"</Types>";return Be(t,Zn({path:si,contentType:Af,xmlDom:ge(n),originalBytes:new TextEncoder().encode(n)})),!0}wt(Aa,"ensureContentTypes");var Ar="[Content_Types].xml",Ea="http://schemas.openxmlformats.org/package/2006/content-types",If="application/vnd.openxmlformats-package.content-types+xml";function Ia(t){let e=t.toLowerCase();return e.startsWith("image/")||e.startsWith("audio/")||e.startsWith("video/")||e==="application/octet-stream"||e==="application/vnd.openxmlformats-officedocument.oleobject"||e.startsWith("application/vnd.ms-office.")?!1:e.endsWith("+xml")||e==="application/xml"||e==="text/xml"}wt(Ia,"isXmlContentType");function Da(t){let e=ge(t),n=new Map,r=new Map,o=e.getElementsByTagNameNS(Ea,"Default");for(let s=0;s<o.length;s++){let a=o[s];if(!a)continue;let l=a.getAttribute("Extension"),c=a.getAttribute("ContentType");l&&c&&n.set(l.toLowerCase(),c)}let i=e.getElementsByTagNameNS(Ea,"Override");for(let s=0;s<i.length;s++){let a=i[s];if(!a)continue;let l=a.getAttribute("PartName"),c=a.getAttribute("ContentType");l&&c&&r.set(l.replace(/^\//,""),c)}return{resolve(s){let a=r.get(s);if(a)return a;let l=s.lastIndexOf(".");if(l!==-1)return n.get(s.slice(l+1).toLowerCase())}}}wt(Da,"parseContentTypes");async function Df(t){let e=t instanceof Uint8Array?t:new Uint8Array(t),n=await di.default.loadAsync(e),r=fi(),o=n.file(Ar);if(!o)throw new Error(`fromZip: missing ${Ar}; not a valid OOXML package`);let i=await o.async("string"),s=Da(i),a=await o.async("uint8array");Be(r,Zn({path:Ar,contentType:If,xmlDom:ge(i),originalBytes:a}));let l=[];n.forEach((c,h)=>{h.dir||c!==Ar&&l.push(c)});for(let c of l){let h=n.file(c);if(!h)continue;let d=s.resolve(c);if(!d)throw new Error(`fromZip: no ContentType for part '${c}' (not in Default by extension, not in Override by partName)`);let w=await h.async("uint8array");if(Ia(d)){let f=await h.async("string"),g=ge(f);Be(r,Zn({path:c,contentType:d,xmlDom:g,originalBytes:w}))}else Be(r,Ir({path:c,contentType:d,bytes:w}))}return r}wt(Df,"fromZip");async function $f(t){Aa(t);let e=new di.default;for(let n of t.parts.values()){let r=$a(n);e.file(n.path,r,{createFolders:!1})}return await e.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:6}})}wt($f,"toZip");function $a(t){if(!t._dirty&&t._originalBytes)return t._originalBytes;if(ui(t)){if(!t.xmlDom)throw new Error(`toZip: XML part '${t.path}' missing xmlDom`);let e=Hn(t.xmlDom);return new TextEncoder().encode(e)}if(t.bytes)return t.bytes;if(t._originalBytes)return t._originalBytes;throw new Error(`toZip: binary part '${t.path}' has no bytes`)}wt($a,"partToBytes");var ie="http://schemas.microsoft.com/office/2006/xmlPackage",Pa="[Content_Types].xml";function Ra(t){return t.endsWith("+xml")||t==="application/xml"||t==="text/xml"}wt(Ra,"isXmlContentType");function Fa(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}wt(Fa,"base64Encode");function za(t){let e=t.replace(/\s+/g,""),n=atob(e),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return r}wt(za,"base64Decode");function ja(t){let e=t.childNodes;for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.nodeType===1)return r}return null}wt(ja,"firstElementChild");function pi(t){var e;let n=ge(t),r=fi(),o=n.getElementsByTagNameNS(ie,"part");for(let i=0;i<o.length;i++){let s=o[i];if(!s)continue;let a=s.getAttributeNS(ie,"name"),l=s.getAttributeNS(ie,"contentType");if(!a||!l)throw new Error("fromFlatOpc: <pkg:part> missing name or contentType");let c=a.replace(/^\//,"");if(!c||c===Pa)continue;let h=null,d=null,w=s.childNodes;for(let f=0;f<w.length;f++){let g=w[f];if(!g||g.nodeType!==1)continue;let m=g;m.namespaceURI===ie&&(m.localName==="xmlData"&&!h?h=m:m.localName==="binaryData"&&!d&&(d=m))}if(h){let f=ja(h);if(!f)throw new Error(`fromFlatOpc: empty <pkg:xmlData> for part '${c}'`);let g=Hn(f),m=new TextEncoder().encode(g),y=ge(g);Be(r,Zn({path:c,contentType:l,xmlDom:y,originalBytes:m}))}else if(d){let f=(e=d.textContent)!=null?e:"",g=za(f);Be(r,Ir({path:c,contentType:l,bytes:g}))}else{if(Ra(l))throw new Error(`fromFlatOpc: XML part '${c}' has no <pkg:xmlData>`);Be(r,Ir({path:c,contentType:l,bytes:new Uint8Array}))}}return r}wt(pi,"fromFlatOpc");function Pf(t){let e=`<pkg:package xmlns:pkg="${ie}"/>`,n=ge(e),r=n.documentElement;if(!r)throw new Error("toFlatOpc: failed to create <pkg:package> root");for(let i of t.parts.values()){if(i.path===Pa)continue;let s=n.createElementNS(ie,"pkg:part");s.setAttributeNS(ie,"pkg:name","/"+i.path),s.setAttributeNS(ie,"pkg:contentType",i.contentType),ui(i)?Ba(n,s,i):(s.setAttributeNS(ie,"pkg:compression","store"),La(n,s,i)),r.appendChild(s)}let o=n.createProcessingInstruction("mso-application",'progid="Word.Document"');return n.insertBefore(o,n.documentElement),Hn(n)}wt(Pf,"toFlatOpc");function Ba(t,e,n){if(!n.xmlDom||!n.xmlDom.documentElement)throw new Error(`toFlatOpc: XML part '${n.path}' missing xmlDom or root`);let r=t.createElementNS(ie,"pkg:xmlData"),o=t.importNode(n.xmlDom.documentElement,!0);r.appendChild(o),e.appendChild(r)}wt(Ba,"appendXmlData");function La(t,e,n){var r;let o=(r=n.bytes)!=null?r:n._originalBytes;if(!o)throw new Error(`toFlatOpc: binary part '${n.path}' has no bytes`);let i=t.createElementNS(ie,"pkg:binaryData");i.textContent=Fa(o),e.appendChild(i)}wt(La,"appendBinaryData");var we={header:"application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",footer:"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",footnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",endnotes:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml",comments:"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml",commentsExtended:"application/vnd.ms-word.commentsExtended+xml"},$r={header:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",footer:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"},Ma=["comments","headersFooters","notes","bookmarks","media","drawings"];function Ha(t){if(t?._originalBytes)return new TextDecoder().decode(t._originalBytes);if(!t?.xmlDom?.documentElement)throw new Error("flatOpcToOnlyOfficeWriteback: missing XML DOM for word/document.xml");if(typeof XMLSerializer!="function")throw new Error("flatOpcToOnlyOfficeWriteback: XMLSerializer is unavailable and part has no original bytes");return new XMLSerializer().serializeToString(t.xmlDom.documentElement)}function Rf(t){return{domain:t,present:!1,count:0,parts:[],status:"pending"}}function Me(t){return t?Ha(t):""}function ye(t){return t?typeof t.text=="string"?t.text:(t.kids||[]).map(ye).join(""):""}function Ff(t){if(!t)return new Map;let e=Nt(t),n=new Map;for(let r of Vt(e,"w:comment")){let o=String(r.attrs?.["w:id"]??"");o&&n.set(o,{id:o,author:String(r.attrs?.["w:author"]??""),date:String(r.attrs?.["w:date"]??""),text:ye(r)})}return n}function zf(t){if(!t)return new Map;let e=Nt(t),n=ht(e,"w:body"),r=new Map,o=new Map;function i(s,a=""){if(!(!s||typeof s!="object")){if(s.tag==="w:p"){let l=ye(s);for(let c of s.kids||[])i(c,l);return}if(s.tag==="w:commentRangeStart"){let l=String(s.attrs?.["w:id"]??"");l&&o.set(l,{anchorText:"",paragraphText:a});return}if(s.tag==="w:commentRangeEnd"){let l=String(s.attrs?.["w:id"]??"");l&&o.has(l)&&(r.set(l,o.get(l)),o.delete(l));return}if(s.tag==="w:t"){let l=ye(s);for(let c of o.values())c.anchorText+=l;return}for(let l of s.kids||[])i(l,a)}}return i(n||e),r}function jf(t,e){let n=t.parts.get("word/comments.xml");if(!n)return[];let r=Ff(Me(n)),o=zf(e);return[...r.values()].map(i=>{let s=o.get(i.id);return{...i,anchorText:s?.anchorText??"",paragraphText:s?.paragraphText??""}})}function Ua(t,e,n,r){if(!n)return new Map;let o=Nt(wi(t,e,n)),i=r==="endnote"?"w:endnote":"w:footnote",s=new Map;for(let a of Vt(o,i)){let l=String(a.attrs?.["w:id"]??"");if(!l)continue;let c=String(a.attrs?.["w:type"]??"");if(c==="separator"||c==="continuationSeparator"||Number(l)<1)continue;let d=(a?.kids||[]).filter(w=>w?.tag==="w:p"||w?.tag==="w:tbl").map(w=>yi(w)).join("");s.set(l,{kind:r,id:l,type:c,text:ye(a),bodyJson:Qe(`<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>${d}</w:body></w:document>`).doc})}return s}function Bf(t){if(!t)return new Map;let e=Nt(t),n=ht(e,"w:body"),r=new Map;function o(s){let a="";function l(c){if(!(!c||typeof c!="object")){if(c.tag==="w:t"||c.tag==="w:delText"){a+=ye(c);return}if(c.tag==="w:footnoteReference"||c.tag==="w:endnoteReference"){let h=String(c.attrs?.["w:id"]??""),d=c.tag==="w:endnoteReference"?"endnote":"footnote";h&&r.set(`${d}:${h}`,a.trim());return}for(let h of c.kids||[])l(h)}}l(s)}function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:p"){o(s);return}for(let a of s.kids||[])i(a)}}return i(n||e),r}function Lf(t,e){let n=Bf(e);return[...Ua(t,"word/footnotes.xml",Me(t.parts.get("word/footnotes.xml")),"footnote").values(),...Ua(t,"word/endnotes.xml",Me(t.parts.get("word/endnotes.xml")),"endnote").values()].map(o=>({...o,anchorText:n.get(`${o.kind}:${o.id}`)??""}))}function Mf(t){if(!t)return[];let e=Nt(t),n=ht(e,"w:body"),r=new Map,o=[];function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:bookmarkStart"){let a=String(s.attrs?.["w:id"]??""),l=String(s.attrs?.["w:name"]??"");a&&l&&!l.startsWith("_")&&r.set(a,{id:a,name:l,anchorText:""});return}if(s.tag==="w:bookmarkEnd"){let a=String(s.attrs?.["w:id"]??""),l=r.get(a);l&&(o.push({...l,anchorText:l.anchorText.trim()}),r.delete(a));return}if(s.tag==="w:t"||s.tag==="w:delText"){let a=ye(s);for(let l of r.values())l.anchorText+=a;return}for(let a of s.kids||[])i(a)}}return i(n||e),o.filter(s=>s.name&&s.anchorText)}function Ce(t){return String(t||"").replace(/^\/+/,"")}function Uf(t){let e=String(t||"").replace(/^\/+/,"");return e?e.startsWith("word/")?e:`word/${e}`:""}function gi(t){let e=t.parts.get("word/_rels/document.xml.rels");if(!e)return new Map;let n=Nt(Me(e)),r=new Map;for(let o of Vt(n,"Relationship")){let i=String(o.attrs?.Id??"");i&&r.set(i,{id:i,type:String(o.attrs?.Type??""),target:String(o.attrs?.TargetMode??"")==="External"?String(o.attrs?.Target??""):Uf(o.attrs?.Target),targetMode:String(o.attrs?.TargetMode??"")})}return r}function Xf(t,e){let n=Nt(t),r=ht(n,"w:body"),o=[];function i(s){if(!(!s||typeof s!="object")){if(s.tag==="w:headerReference"||s.tag==="w:footerReference"){let a=String(s.attrs?.["r:id"]??""),l=e.get(a);l&&o.push({kind:l.type===$r.footer?"footer":"header",type:String(s.attrs?.["w:type"]??"default"),relId:a,partPath:l.target});return}for(let a of s.kids||[])i(a)}}return i(r||n),o}function Wf(t){let e=Nt(t),n=ht(e,"w:body"),r=[],o=n?.kids||[],i=-1;for(let a of o){if(!a||typeof a!="object"||a.tag==="w:sectPr"||a.tag!=="w:p"&&a.tag!=="w:tbl")continue;i++;let l=ht(a,"w:pPr"),c=ht(l,"w:sectPr");c&&r.push({node:c,boundary:"paragraph",endBlockIndex:i})}let s=ht(n,"w:sectPr");return s&&r.push({node:s,boundary:"body",endBlockIndex:Math.max(0,i)}),r}function Xa(t,e,n){let r=n==="footer"?"w:footerReference":"w:headerReference",o=n==="footer"?$r.footer:$r.header,i=new Map;for(let s of Vt(t,r)){let a=String(s.attrs?.["w:type"]??"default"),l=String(s.attrs?.["r:id"]??""),c=e.get(l);i.set(a,{kind:n,type:a,relId:l,partPath:c?c.target:"",relFound:!!c,relTypeMatches:!!c&&c.type===o})}return i}function Wa(t,e,n,r){let o=e.get(n);if(!o)return r===0?{state:"empty",type:n}:{state:"inherited",type:n,inheritedFrom:r-1};let i=Ce(o.partPath),s=i?t.parts.get(i):null,a=Me(s),l=s?ye(Nt(a)):"";return{state:l?"own":"empty",type:n,relId:o.relId,partPath:i,text:l,bodyJson:s?Zf(t,i,a):void 0,unsupportedFields:s?Hf(a):[],relFound:o.relFound,relTypeMatches:o.relTypeMatches,partFound:!!s}}function Hf(t){if(!t)return[];let e=Nt(t),n=[],r=0;function o(i){if(!(!i||typeof i!="object")){if(i.tag==="w:instrText"){let s=ye(i).trim().replace(/\s+/g," "),a=s.split(/\s+/)[0]?.toUpperCase()??"";["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE"].includes(a)&&n.push({index:r++,fieldType:a,instruction:s,unsupportedReason:"dynamic-date-field"})}for(let s of i.kids||[])o(s)}}return o(e),n}function Zf(t,e,n){if(!n)return;let i=(Nt(wi(t,e,n))?.kids||[]).filter(s=>s?.tag==="w:p"||s?.tag==="w:tbl").map(s=>yi(s)).join("");return Qe(`<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><w:body>${i}</w:body></w:document>`).doc}function wi(t,e,n){let r=Za(t,e);return String(n).replace(/<w:drawing[\s\S]*?<\/w:drawing>/g,o=>{let i=Vf(t,r,o);return i?`<oo:ci oo:v="${z(JSON.stringify(i))}"/>`:o})}function Za(t,e){let n=Gf(e),r=t.parts.get(n);if(!r)return new Map;let o=Nt(Me(r)),i=new Map;for(let s of Vt(o,"Relationship")){let a=String(s.attrs?.Id??"");if(!a)continue;let l=String(s.attrs?.TargetMode??"");i.set(a,{id:a,type:String(s.attrs?.Type??""),target:l==="External"?String(s.attrs?.Target??""):Jf(e,s.attrs?.Target),targetMode:l})}return i}function Gf(t){let e=Ce(t),n=e.lastIndexOf("/");return n<0?`_rels/${e}.rels`:`${e.slice(0,n)}/_rels/${e.slice(n+1)}.rels`}function Jf(t,e){let n=String(e||"").trim();if(!n)return"";if(n.startsWith("/"))return Ce(n);let r=Ce(t).split("/").slice(0,-1);for(let o of n.split("/"))!o||o==="."||(o===".."?r.pop():r.push(o));return r.join("/")}function Vf(t,e,n){let r=Ga(t,"unknown",0,e,n);if(r.status!=="inlined")return null;let o=Nt(n),i=Le(o,"wp:extent")||Le(o,"a:ext"),s=Le(o,"wp:docPr"),a=Dr(i?.attrs?.cx)||1,l=Dr(i?.attrs?.cy)||1;return{type:"paraDrawing",docPr:{id:Dr(s?.attrs?.id)||1,name:String(s?.attrs?.name??"Picture"),descr:s?.attrs?.descr==null?void 0:String(s.attrs.descr),title:s?.attrs?.title==null?void 0:String(s.attrs.title)},effectExtent:{l:0,t:0,r:0,b:0},extent:{cx:a,cy:l},graphic:{type:"image",id:"",extX:0,extY:0,nvPicPr:{cNvPr:{id:Dr(s?.attrs?.id)||1,name:String(s?.attrs?.name??"Picture"),descr:s?.attrs?.descr==null?null:String(s.attrs.descr),title:s?.attrs?.title==null?null:String(s.attrs.title),hidden:null},nvPr:{isPhoto:null,userDrawn:null},cNvPicPr:{picLocks:{noChangeAspect:!0}}},blipFill:{type:"blipFill",blip:[],srcRect:null,tile:null,stretch:{fillRect:null},rotWithShape:null,rasterImageId:r.rasterImageId},spPr:{fill:null,ln:null,effectDag:null,effectLst:null,xfrm:{ext:{cx:a,cy:l},off:{x:0,y:0},flipH:null,flipV:null,rot:null,chOffX:null,chOffY:null,chExtX:null,chExtY:null},bwMode:0}},cNvGraphicFramePr:{graphicFrameLocks:{noChangeAspect:!0}},positionH:{relativeFrom:"column",posOffset:0,percent:!1},positionV:{relativeFrom:"paragraph",posOffset:0,percent:!1},simplePos:{x:0,y:0,use:!1},distB:0,distL:0,distR:0,distT:0,allowOverlap:!0,behindDoc:!1,hidden:null,layoutInCell:!0,locked:!1,relativeHeight:0,wrapType:"none",drawingType:"inline"}}function Ga(t,e,n,r,o){let i=Nt(o),s=Le(i,"wp:inline"),a=Le(i,"wp:anchor"),l=Le(i,"a:graphicData"),c=Le(i,"a:blip"),h=String(c?.attrs?.["r:embed"]??""),d=String(c?.attrs?.["r:link"]??""),w=h||d,f=w?r.get(w):null,g=f?.target?t.parts.get(f.target):null,m={partPath:Ce(e),index:n,drawingType:a?"anchor":s?"inline":"unknown",relationshipId:w,relationshipType:f?.type??"",target:f?.target??"",targetMode:f?.targetMode??"",contentType:g?.contentType??"",graphicDataUri:String(l?.attrs?.uri??"")};if(a)return{...m,status:"unsupported",unsupportedReason:"floating-anchor"};if(!s)return{...m,status:"unsupported",unsupportedReason:"unknown-drawing-layout"};let y=Yf(m.graphicDataUri,o);return y?{...m,status:"unsupported",unsupportedReason:y}:c?d||f?.targetMode==="External"?{...m,status:"unsupported",unsupportedReason:"external-image"}:f?f.type&&f.type!==$r.image?{...m,status:"unsupported",unsupportedReason:"non-image-relationship"}:g?.bytes?String(g.contentType||"").startsWith("image/")?m.graphicDataUri&&!m.graphicDataUri.includes("/picture")?{...m,status:"unsupported",unsupportedReason:"non-picture-graphic"}:{...m,status:"inlined",rasterImageId:`data:${g.contentType};base64,${qf(g.bytes)}`}:{...m,status:"unsupported",unsupportedReason:"non-image-media"}:{...m,status:"unsupported",unsupportedReason:"missing-media-part"}:{...m,status:"unsupported",unsupportedReason:"missing-relationship"}:{...m,status:"unsupported",unsupportedReason:"missing-blip"}}function Yf(t,e){let n=String(t||""),r=String(e||"");return!n||n.includes("/picture")?"":n.includes("/chart")?"chart-drawing":n.includes("/diagram")?"diagram-drawing":r.includes(":txbx")||r.includes("<w:txbxContent")?"text-box-drawing":n.includes("wordprocessingShape")||n.includes("/shape")?"shape-drawing":"non-picture-graphic"}function Le(t,e){if(!t||typeof t!="object")return null;if(t.tag===e)return t;for(let n of t.kids||[]){let r=Le(n,e);if(r)return r}return null}function Dr(t){let e=Number(t);return Number.isFinite(e)?e:void 0}function qf(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let e="";for(let n of t)e+=String.fromCharCode(n);return btoa(e)}function yi(t){if(!t||typeof t!="object")return"";if(typeof t.text=="string")return t.text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");let e=Object.entries(t.attrs||{}).map(([r,o])=>` ${r}="${String(o).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}"`).join(""),n=(t.kids||[]).map(yi).join("");return`<${t.tag}${e}>${n}</${t.tag}>`}function Jt(t,e){if(!t?.attrs||t.attrs[e]==null)return;let n=Number(t.attrs[e]);return Number.isFinite(n)?n:void 0}function Kf(t){let e=ht(t,"w:pgSz");if(!e)return;let n=Jt(e,"w:w"),r=Jt(e,"w:h");if(!(n==null&&r==null))return{width:n,height:r,orient:String(e.attrs?.["w:orient"]??"")}}function Qf(t){let e=ht(t,"w:pgMar");if(!e)return;let n={top:Jt(e,"w:top"),right:Jt(e,"w:right"),bottom:Jt(e,"w:bottom"),left:Jt(e,"w:left"),header:Jt(e,"w:header"),footer:Jt(e,"w:footer"),gutter:Jt(e,"w:gutter")};return Object.values(n).some(r=>r!=null)?n:void 0}function td(t){let e=ht(t,"w:pgNumType");if(!e)return;let r={start:Jt(e,"w:start"),fmt:String(e.attrs?.["w:fmt"]??""),chapStyle:String(e.attrs?.["w:chapStyle"]??""),chapSep:String(e.attrs?.["w:chapSep"]??"")};return Object.values(r).some(o=>o!==""&&o!=null)?r:void 0}function ed(t){let e=ht(t,"w:cols");if(!e)return;let r=Vt(e,"w:col").map(i=>({width:Jt(i,"w:w"),space:Jt(i,"w:space")})),o={equalWidth:String(e.attrs?.["w:equalWidth"]??"1")!=="0",count:Jt(e,"w:num"),space:Jt(e,"w:space"),sep:String(e.attrs?.["w:sep"]??""),col:r};return o.count!=null||o.space!=null||r.length>0?o:void 0}function nd(t,e){let n=gi(t),r=Wf(e),o=["default","first","even"];return r.map((i,s)=>{let a=i.node,l=Xa(a,n,"header"),c=Xa(a,n,"footer"),h=s>0?r[s-1].endBlockIndex:-1;return{index:s,startBlockIndex:Math.max(0,h+1),endBlockIndex:i.endBlockIndex,boundary:i.boundary,type:String(ht(a,"w:type")?.attrs?.["w:val"]??"nextPage"),titlePage:!!ht(a,"w:titlePg"),pageSize:Kf(a),pageMargins:Qf(a),pageNumbering:td(a),columns:ed(a),headers:Object.fromEntries(o.map(d=>[d,Wa(t,l,d,s)])),footers:Object.fromEntries(o.map(d=>[d,Wa(t,c,d,s)]))}})}function rd(t,e){let n=gi(t),r=Xf(e,n),o=new Set,i=[];for(let s of r){let a=`${s.kind}|${s.type}|${s.partPath}`;if(o.has(a))continue;o.add(a);let l=t.parts.get(Ce(s.partPath));l&&i.push({kind:s.kind,type:s.type,partPath:Ce(s.partPath),text:ye(Nt(Me(l)))})}return i}function hi(t){if(Array.isArray(t))return t.filter(n=>!["commentRangeStart","commentRangeEnd","commentReference"].includes(n?.type)).map(hi);if(!t||typeof t!="object")return t;let e={};for(let[n,r]of Object.entries(t))e[n]=hi(r);return e}function mi(t){if(Array.isArray(t))return t.filter(n=>!["bookmarkStart","bookmarkEnd"].includes(n?.type)).map(mi);if(!t||typeof t!="object")return t;let e={};for(let[n,r]of Object.entries(t))e[n]=mi(r);return e}function _n(t,e,n){let r=t[e];r.present=!0,r.count+=1,r.parts.push({path:n.path,contentType:n.contentType})}function od(t){return[...String(t||"").matchAll(/<w:drawing[\s\S]*?<\/w:drawing>/g)].map(e=>e[0])}function id(t){return t?.path==="word/document.xml"||t?.contentType===we.header||t?.contentType===we.footer||t?.contentType===we.footnotes||t?.contentType===we.endnotes}function sd(t){let e=[];for(let n of t.parts.values()){if(!id(n))continue;let r=Ce(n.path),o=Za(t,r),i=Me(n);od(i).forEach((s,a)=>{e.push(Ga(t,r,a,o,s))})}return e}function ad(t){let{rasterImageId:e,...n}=t;return n}function ld(t,e){let n=sd(t);n.length>0&&(e.drawings.present=!0,e.drawings.count=n.length,e.drawings.items=n.map(ad),e.drawings.inlinedCount=n.filter(o=>o.status==="inlined").length,e.drawings.unsupportedCount=n.filter(o=>o.status==="unsupported").length,e.drawings.status=e.drawings.unsupportedCount>0?"pending":"payload-ready");let r=[...t.parts.values()].filter(o=>o.path.startsWith("word/media/")).map(o=>{let i=Ce(o.path),s=n.filter(c=>c.target===i),a=s.filter(c=>c.status==="unsupported"),l=s.filter(c=>c.status==="inlined");return{path:i,contentType:o.contentType,status:s.length===0?"unreferenced":a.length>0?"referenced-by-unsupported-drawing":"inlined",references:s.map(c=>({partPath:c.partPath,index:c.index,drawingType:c.drawingType,status:c.status,unsupportedReason:c.unsupportedReason})),inlinedReferences:l.length,unsupportedReferences:a.length}});r.length>0&&(e.media.items=r,e.media.inlinedCount=r.filter(o=>o.status==="inlined").length,e.media.unsupportedCount=r.filter(o=>o.status!=="inlined").length,e.media.status=e.media.unsupportedCount>0?"pending":"payload-ready")}function cd(t,e){return e.present?t==="media"||t==="drawings"?Number(e.unsupportedCount||0)>0:!0:!1}function ud(t){let e=[];for(let n of t.drawings.items||[])n.status==="unsupported"&&e.push({domain:"drawings",partPath:n.partPath,index:n.index,status:n.status,reason:n.unsupportedReason,drawingType:n.drawingType,relationshipId:n.relationshipId,target:n.target,targetMode:n.targetMode,contentType:n.contentType,graphicDataUri:n.graphicDataUri});for(let n of t.media.items||[])n.status!=="inlined"&&e.push({domain:"media",partPath:n.path,status:n.status,reason:n.status,contentType:n.contentType,references:n.references});for(let n of t.headersFooters.sections||[]){let r=n.pageNumbering;r&&(r.fmt||r.chapStyle||r.chapSep)&&e.push({domain:"headersFooters",index:n.index,status:"unsupported",reason:"page-numbering-format",property:"pageNumbering",value:{fmt:r.fmt,chapStyle:r.chapStyle,chapSep:r.chapSep}});for(let o of["headers","footers"])for(let i of Object.values(n[o]||{}))for(let s of i.unsupportedFields||[])e.push({domain:"headersFooters",partPath:i.partPath,index:s.index,status:"unsupported",reason:s.unsupportedReason,fieldType:s.fieldType,instruction:s.instruction})}return e}function fd(t){if(t.length===0)return"";let e=new Map;for(let n of t){let r=`${n.domain}:${n.reason||n.status||"unsupported"}`;e.set(r,(e.get(r)||0)+1)}return[...e.entries()].map(([n,r])=>`${n}=${r}`).join(", ")}function dd(t){let e=Object.fromEntries(Ma.map(r=>[r,Rf(r)]));for(let r of t.parts.values())r.contentType===we.comments&&_n(e,"comments",r),r.contentType===we.commentsExtended&&_n(e,"comments",r),(r.contentType===we.header||r.contentType===we.footer)&&_n(e,"headersFooters",r),(r.contentType===we.footnotes||r.contentType===we.endnotes)&&_n(e,"notes",r),r.path.startsWith("word/media/")&&_n(e,"media",r),(r.path.startsWith("word/drawings/")||r.path.includes("/drawings/"))&&_n(e,"drawings",r);ld(t,e);let n=Ma.filter(r=>cd(r,e[r]));return{gaps:e,unsupportedDomains:n}}function Ja(t,e={}){let n=pi(t),r=n.parts.get("word/document.xml"),o=Ha(r),{gaps:i,unsupportedDomains:s}=dd(n),a=jf(n,o);a.length>0&&(i.comments.items=a,i.comments.status="payload-ready");let l=Lf(n,o);l.length>0&&(i.notes.items=l,i.notes.status="payload-ready");let c=Mf(o);c.length>0&&(i.bookmarks.present=!0,i.bookmarks.count=c.length,i.bookmarks.items=c,i.bookmarks.status="payload-ready");let h=rd(n,o),d=nd(n,o);h.length>0&&(i.headersFooters.items=h,i.headersFooters.status="payload-ready"),d.length>0&&(i.headersFooters.sections=d,i.headersFooters.status="payload-ready");let w=[];s.length>0&&w.push(`OnlyOffice writeback adapter produced bodyJson only; gap domains pending rehydration: ${s.join(", ")}`);let f=ud(i),g=fd(f);g&&w.push(`OnlyOffice writeback unsupported items: ${g}`);let m=wi(n,"word/document.xml",o),y=mi(hi(Qe(m,void 0,{relationships:gi(n)}).doc));if(e.failOnUnsupported===!0&&s.length>0)throw new Error(`OnlyOffice writeback has unsupported gap domains: ${s.join(", ")}`);return{bodyJson:y,gaps:i,diagnostics:{warnings:w,unsupportedDomains:s,unsupportedItems:f}}}function Pr(t){return t==null?t:JSON.parse(JSON.stringify(t))}function pd(t,e="ONLYOFFICE PPT content JSON"){if(typeof t=="string")try{return JSON.parse(t)}catch(n){throw new Error(`${e}: invalid JSON string: ${n?.message||n}`)}if(!t||typeof t!="object")throw new Error(`${e}: expected object or JSON string`);return Pr(t)}function hd(t){if(typeof t!="string")return;let e=t.trim().replace(/^#/,"");if(/^[0-9a-fA-F]{6}$/.test(e))return`#${e.toUpperCase()}`}function md(t){if(!t||t.auto)return;let e=t.fill?.color?.color?.rgba||t.color?.rgba||t.rgba||t.fill?.color?.rgba,n=Number(t.r??e?.red),r=Number(t.g??e?.green),o=Number(t.b??e?.blue);if(![n,r,o].every(s=>Number.isFinite(s)))return;let i=s=>Math.max(0,Math.min(255,Math.round(s))).toString(16).padStart(2,"0").toUpperCase();return`#${i(n)}${i(r)}${i(o)}`}function Ya(t){let e=hd(t);if(e)return{auto:!1,r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}function gd(t,e){let n=Ya(t);if(!n)return;let r={red:n.r,green:n.g,blue:n.b,alpha:255};return{fill:{color:{rgba:r,color:{rgba:r,type:"srgb"},type:"uniColor"},type:"solid"},transparent:e&&Object.prototype.hasOwnProperty.call(e,"transparent")?e.transparent:null,type:e?.type||"fill"}}function wd(t={}){let e={},n=md(t.uniFill||t.color||t.fill?.color);n&&(e.color=n),typeof t.b=="boolean"&&(e.bold=t.b),typeof t.i=="boolean"&&(e.italic=t.i),t.u!=null&&(e.underline=t.u!==!1&&t.u!=="none"),typeof t.spacing=="number"&&(e.characterSpacing=t.spacing),typeof t.sz=="number"&&(e.fontSize=t.sz/2);let r=t.rFonts,o=r?.ascii||r?.hAnsi||r?.eastAsia||r?.cs;return o&&(e.fontFamily=o),e}function ke(t={},e={}){let n={...t,type:t.type||"textPr"},r=Ya(e.color);return r&&(n.color=r,n.uniFill=gd(e.color,n.uniFill)),typeof e.bold=="boolean"&&(n.b=e.bold,n.bCs=e.bold),typeof e.italic=="boolean"&&(n.i=e.italic,n.iCs=e.italic),typeof e.underline=="boolean"&&(n.u=e.underline?"single":!1),typeof e.characterSpacing=="number"&&(n.spacing=e.characterSpacing),typeof e.fontSize=="number"&&(n.sz=e.fontSize*2,n.szCs=e.fontSize*2),e.fontFamily&&(n.rFonts={...n.rFonts||{},ascii:e.fontFamily,hAnsi:e.fontFamily,eastAsia:e.fontFamily,cs:e.fontFamily}),n}function Sn(t){return t&&t.type==="paragraph"&&Array.isArray(t.content)}function bi(t){return t&&t.type==="run"&&Array.isArray(t.content)}function qa(t){return Array.isArray(t)?t.map(e=>typeof e=="string"?e:e?.type==="tab"?" ":e?.type==="break"?`
14
+ `:"").join(""):""}function Ka(t,e){for(let n of t.content||[])if(bi(n)&&e(n,t),n?.type==="hyperlink"&&Array.isArray(n.content))for(let r of n.content)bi(r)&&e(r,t)}function Rr(t){let e=[];for(let n of t.content||[])Sn(n)&&Ka(n,(r,o)=>{let i=qa(r.content);i&&e.push({run:r,paragraph:o,text:i})});return e}function Va(t,e={},n){return{bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...n?Pr(n):{},rPr:ke(n?.rPr||{bFromDocument:!0,type:"textPr"},e),content:[t||""],type:"run"}}function yd(t,e={}){return{bFromDocument:!0,footnotes:[],endnotes:[],reviewType:"common",...t?Pr(t):{},rPr:ke(t?.rPr||{bFromDocument:!0,type:"textPr"},e),content:[],type:"endRun"}}function Qa(t={},e){let n=e&&Sn(e)?Pr(e):void 0,r=n?.content?.find(bi),o=n?.content?.find(s=>s?.type==="endRun"),i=Array.isArray(t.runs)&&t.runs.length?t.runs.map(s=>Va(s.text||"",s.style||t.style||{},r)):[Va(t.text||"",t.style||{},r)];return{bFromDocument:!0,...n||{},pPr:{bFromDocument:!0,type:"paraPr",...n?.pPr||{}},rPr:ke(n?.rPr||{bFromDocument:!0,type:"textPr"},t.style||{}),content:[...i,yd(o,t.style||{})],changes:n?.changes||[],type:"paragraph"}}function Ye(t){let e=pd(t);if(e.type!=="docContent"&&e.type!=="documentContent")throw new Error(`ONLYOFFICE PPT content JSON: expected docContent/documentContent, got ${e.type||"unknown"}`);return Array.isArray(e.content)||(e.content=[]),e}function Fr(t){let e=Ye(t),n=[],r=[];for(let o of e.content||[]){if(!Sn(o))continue;let i=[];Ka(o,s=>{let a=qa(s.content);if(!a)return;let l={text:a,style:wd(s.rPr||{})};i.push(l),r.push(l)}),n.push({text:i.map(s=>s.text).join(""),style:o.pPr?.jc?{alignment:o.pPr.jc}:void 0,runs:i})}return{text:n.map(o=>o.text).join(`
15
+ `),style:r[0]?.style,paragraphs:n}}function Gn(t,e,n={}){let r=Ye(t),o=r.content.find(Sn);return r.content=[Qa({text:String(e??""),style:n.style||{}},o)],r}function Jn(t,e){let n=Ye(t),r=n.content.filter(Sn),o=Array.isArray(e)&&e.length?e:[{text:""}];return n.content=o.map((i,s)=>Qa(i||{},r[s]||r[0])),n}function Vn(t,e){let n=Ye(t);for(let r of n.content||[])if(Sn(r)){r.rPr=ke(r.rPr||{bFromDocument:!0,type:"textPr"},e||{});for(let o of r.content||[])o?.type==="endRun"&&(o.rPr=ke(o.rPr||{bFromDocument:!0,type:"textPr"},e||{}))}for(let{run:r,paragraph:o}of Rr(n))o.rPr=ke(o.rPr||{bFromDocument:!0,type:"textPr"},e||{}),r.rPr=ke(r.rPr||{bFromDocument:!0,type:"textPr"},e||{});return n}function xi(t,e,n){let r=Ye(t),o=Rr(r);if(!Number.isInteger(e)||e<0||e>=o.length)throw new Error(`ONLYOFFICE PPT content JSON: runIndex out of range: ${e}`);let i=o[e].run,s=o[e].paragraph;return s.rPr=ke(s.rPr||{bFromDocument:!0,type:"textPr"},n||{}),i.rPr=ke(i.rPr||{bFromDocument:!0,type:"textPr"},n||{}),r}function vi(t,e,n,r=Number.POSITIVE_INFINITY){let o=Ye(t);if(e==null||e==="")return{content:o,count:0};let i=0;for(let{run:s}of Rr(o))s.content=(s.content||[]).map(a=>{if(typeof a!="string"||i>=r)return a;let l=a;for(;l.includes(e)&&i<r;)l=l.replace(e,n??""),i+=1;return l});return{content:o,count:i}}function tl(t,e){if(!e||typeof e!="object")throw new Error("PPT mutation is required");switch(e.type){case"shape.text.set":return{content:Gn(t,e.text),changedCount:1};case"shape.text.paragraphs.set":return{content:Jn(t,e.paragraphs),changedCount:Array.isArray(e.paragraphs)?e.paragraphs.length:0};case"shape.text.style.set":return{content:Vn(t,e.style),changedCount:Rr(Ye(t)).length};case"shape.text.run.style.set":return{content:xi(t,e.runIndex,e.style),changedCount:1};case"shape.text.replace":{let n=vi(t,e.search,e.replacement,e.count);return{content:n.content,changedCount:n.count}}default:throw new Error(`Unsupported PPT text mutation for ONLYOFFICE content bridge: ${e.type}`)}}function bd(t){return t==null?t:JSON.parse(JSON.stringify(t))}function xd(t,e="ONLYOFFICE PPT JSON"){if(typeof t=="string")try{return JSON.parse(t)}catch(n){throw new Error(`${e}: invalid JSON string: ${n?.message||n}`)}if(!t||typeof t!="object")throw new Error(`${e}: expected object or JSON string`);return bd(t)}function zr(t){let e=xd(t,"ONLYOFFICE PPT deck JSON");if(!Array.isArray(e.slides))throw new Error("ONLYOFFICE PPT deck JSON: expected slides[]");return e}function el(t,e){return String(t?.id??t?.nvSpPr?.cNvPr?.id??e)}function _i(t){return t?.nvSpPr?.cNvPr?.name}function vd(t={}){let e=t.spPr?.xfrm||{},n=e.off||{},r=e.ext||{};return{left:Number.isFinite(Number(n.x))?Number(n.x):void 0,top:Number.isFinite(Number(n.y))?Number(n.y):void 0,width:Number.isFinite(Number(r.cx??t.extX))?Number(r.cx??t.extX):void 0,height:Number.isFinite(Number(r.cy??t.extY))?Number(r.cy??t.extY):void 0,rotation:Number.isFinite(Number(e.rot))?Number(e.rot):void 0,flipHorizontal:e.flipH===!0?!0:void 0,flipVertical:e.flipV===!0?!0:void 0}}function _d(t={}){return t.type==="group"?"group":t.type==="image"||t.blipFill?"picture":t.graphicObject?.table||t.table?"table":t.graphicObject?.chart||t.chart?"chart":Si(t)?"textBox":t.spPr?.custGeom||t.spPr?.prstGeom||t.spPr?.geometry?"geometricShape":"unknown"}function Sd(t){let e=t.sldSz||{},n=Number(e.cx??e.w??e.width),r=Number(e.cy??e.h??e.height);if(!(!Number.isFinite(n)||!Number.isFinite(r)))return{width:n,height:r}}function Td(t){let e=Si(t);if(e)try{return Fr(e)}catch{return}}function Si(t){let e=t?.content;if(!e||typeof e!="object")return;if(e.type==="docContent"||e.type==="documentContent")return e;let n=e.content;if(n&&typeof n=="object"&&(n.type==="docContent"||n.type==="documentContent"))return n;if(n&&typeof n=="object"&&Array.isArray(n.content))return{...n,type:"docContent",bPresentation:n.bPresentation??!0}}function Cd(t,e){return!t?.content||!e?!1:t.content.type==="docContent"||t.content.type==="documentContent"?(t.content=e,!0):(t.content={...t.content,content:e},!0)}function kd(t){for(let e of t){let n=e.text?.text?.trim();if(n)return n}}function nl(t,e){let n=Td(t),r=Array.isArray(t.spTree)?t.spTree.map((o,i)=>nl(o,i)):void 0;return{id:el(t,e),name:_i(t),kind:_d(t),geometry:vd(t),text:n,children:r,raw:{hostType:"onlyoffice-ppt-oojson",presetGeometry:t.spPr?.prstGeom?.prst||t.spPr?.custGeom?.preset}}}function Ti(t,e={}){let n=zr(t),r=n.slides.map((o,i)=>{let a=(Array.isArray(o?.cSld?.spTree)?o.cSld.spTree:[]).map((l,c)=>nl(l,c));return{id:String(o?.id??i),index:i,name:o?.name,title:kd(a),shapes:a}});return{id:e.id,title:e.title,slideSize:Sd(n),slides:r}}function Od(t,e){return Number.isInteger(e?.index)&&t.slides[e.index]?t.slides[e.index]:t.slides.find(n=>String(n?.id)===String(e?.id))}function Ed(t,e){if(!Array.isArray(t))return;let n=String(e?.id??""),r=n.includes("/shape:")?n.slice(n.lastIndexOf("/shape:")+7):n;return t.find((o,i)=>{let s=el(o,i);return s===n||s===r||_i(o)&&_i(o)===e?.name})}function Nd(t,e){let n=Si(t);if(!t||!e||!n)return!1;let r=n;return Array.isArray(e.paragraphs)&&e.paragraphs.length?r=Jn(r,e.paragraphs):typeof e.text=="string"&&(r=Gn(r,e.text,{style:e.style})),e.style&&(r=Vn(r,e.style)),Cd(t,r)}function Ci(t,e){let n=zr(t),r=0,o=[];for(let i of e?.slides||[]){let a=Od(n,i)?.cSld?.spTree;if(Array.isArray(a))for(let l of i.shapes||[]){let c=Ed(a,l);!c||!l.text||Nd(c,l.text)&&(r+=1,o.push({slideIndex:i.index,shapeId:l.id,shapeName:l.name}))}}return{deck:n,changedCount:r,changed:o}}function rl(t,e,n){let o=Ti(t).slides[e?.slideIndex??0];if(!o)return{deck:zr(t),changedCount:0,changed:[]};let i=o.shapes.find(a=>{let l=a.id.includes("/shape:")?a.id.slice(a.id.lastIndexOf("/shape:")+7):a.id,c=e?.shapeId==null?void 0:String(e.shapeId),h=c?.includes("/shape:")?c.slice(c.lastIndexOf("/shape:")+7):c;return a.id===c||l===h||e?.shapeName&&a.name===e.shapeName||e?.text&&a.text?.text===e.text});if(!i)return{deck:zr(t),changedCount:0,changed:[]};let s={...i.text||{text:""},...n||{}};return typeof n?.text=="string"&&!Array.isArray(n.paragraphs)&&delete s.paragraphs,i.text=s,Ci(t,{slides:[o]})}return ml(Ad);})();
16
+ /*! Bundled license information:
17
+
18
+ jszip/dist/jszip.min.js:
19
+ (*!
20
+
21
+ JSZip v3.10.2 - A JavaScript class for generating and reading zip files
22
+ <http://stuartk.com/jszip>
23
+
24
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
25
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
26
+
27
+ JSZip uses the library pako released under the MIT license :
28
+ https://github.com/nodeca/pako/blob/main/LICENSE
29
+ *)
30
+ */