@uurtech/jdf 0.1.21 → 0.1.23
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.
- package/dist/jdfjs.cjs +3 -3
- package/dist/jdfjs.cjs.map +1 -1
- package/dist/jdfjs.d.cts +6 -2
- package/dist/jdfjs.d.ts +6 -2
- package/dist/jdfjs.js +3 -3
- package/dist/jdfjs.js.map +1 -1
- package/package.json +1 -1
- package/src/renderers/element.ts +52 -4
- package/src/viewer.ts +40 -12
package/dist/jdfjs.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
'use strict';var $f=Object.create;var di=Object.defineProperty;var Vf=Object.getOwnPropertyDescriptor;var Xf=Object.getOwnPropertyNames;var Yf=Object.getPrototypeOf,Kf=Object.prototype.hasOwnProperty;var ve=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Rt=(e,t)=>()=>(e&&(t=e(e=0)),t);var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gf=(e,t)=>{for(var r in t)di(e,r,{get:t[r],enumerable:true});},Qf=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Xf(t))!Kf.call(e,n)&&n!==r&&di(e,n,{get:()=>t[n],enumerable:!(i=Vf(t,n))||i.enumerable});return e};var eu=(e,t,r)=>(r=e!=null?$f(Yf(e)):{},Qf(di(r,"default",{value:e,enumerable:true}),e));var pa=Rt(()=>{});function N(e,t="mm"){switch(t){case "mm":return e*ga;case "in":return e*ru;case "pt":return e*iu;case "px":return e;default:return e*ga}}function va(e,t="portrait"){let r=typeof e=="string"?tu[e]:e;return t==="landscape"?{width:r.height,height:r.width}:{...r}}var tu,ma,ga,ru,iu,ba=Rt(()=>{tu={A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6},Tabloid:{width:279.4,height:431.8}},ma={top:25,right:20,bottom:25,left:20},ga=3.7795275591,ru=96,iu=1.3333333333;});var hi,_a,ya,wa=Rt(()=>{hi="document.json",_a="manifest.json",ya="assets";});var gr=Rt(()=>{pa();ba();wa();});var Lt=v((Cg,gi)=>{typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?gi.exports={nextTick:ku}:gi.exports=process;function ku(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,o;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t);});case 3:return process.nextTick(function(){e.call(null,t,r);});case 4:return process.nextTick(function(){e.call(null,t,r,i);});default:for(a=new Array(n-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a);})}}});var Ca=v((Ag,Ta)=>{var Tu={}.toString;Ta.exports=Array.isArray||function(e){return Tu.call(e)=="[object Array]"};});var mi=v((Rg,Aa)=>{Aa.exports=ve("stream");});var Ot=v((vi,La)=>{var br=ve("buffer"),_e=br.Buffer;function Ra(e,t){for(var r in e)t[r]=e[r];}_e.from&&_e.alloc&&_e.allocUnsafe&&_e.allocUnsafeSlow?La.exports=br:(Ra(br,vi),vi.Buffer=rt);function rt(e,t,r){return _e(e,t,r)}Ra(_e,rt);rt.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _e(e,t,r)};rt.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=_e(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};rt.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _e(e)};rt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return br.SlowBuffer(e)};});var it=v(W=>{function Cu(e){return Array.isArray?Array.isArray(e):_r(e)==="[object Array]"}W.isArray=Cu;function Au(e){return typeof e=="boolean"}W.isBoolean=Au;function Ru(e){return e===null}W.isNull=Ru;function Lu(e){return e==null}W.isNullOrUndefined=Lu;function Ou(e){return typeof e=="number"}W.isNumber=Ou;function Du(e){return typeof e=="string"}W.isString=Du;function Iu(e){return typeof e=="symbol"}W.isSymbol=Iu;function Fu(e){return e===void 0}W.isUndefined=Fu;function ju(e){return _r(e)==="[object RegExp]"}W.isRegExp=ju;function Mu(e){return typeof e=="object"&&e!==null}W.isObject=Mu;function Nu(e){return _r(e)==="[object Date]"}W.isDate=Nu;function zu(e){return _r(e)==="[object Error]"||e instanceof Error}W.isError=zu;function Pu(e){return typeof e=="function"}W.isFunction=Pu;function Bu(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}W.isPrimitive=Bu;W.isBuffer=ve("buffer").Buffer.isBuffer;function _r(e){return Object.prototype.toString.call(e)}});var Oa=v((Og,bi)=>{typeof Object.create=="function"?bi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}}));}:bi.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t;}};});var nt=v((Dg,yi)=>{try{if(_i=ve("util"),typeof _i.inherits!="function")throw "";yi.exports=_i.inherits;}catch{yi.exports=Oa();}var _i;});var Ia=v((Ig,wi)=>{function qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Da=Ot().Buffer,Dt=ve("util");function Uu(e,t,r){e.copy(t,r);}wi.exports=(function(){function e(){qu(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length;},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length;},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(r){if(this.length===0)return "";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return Da.alloc(0);for(var i=Da.allocUnsafe(r>>>0),n=this.head,a=0;n;)Uu(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Dt&&Dt.inspect&&Dt.inspect.custom&&(wi.exports.prototype[Dt.inspect.custom]=function(){var e=Dt.inspect({length:this.length});return this.constructor.name+" "+e});});var xi=v((Fg,Fa)=>{var yr=Lt();function Hu(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,yr.nextTick(wr,this,e)):yr.nextTick(wr,this,e)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=true,yr.nextTick(wr,r,a)):yr.nextTick(wr,r,a):t&&t(a);}),this)}function Zu(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}function wr(e,t){e.emit("error",t);}Fa.exports={destroy:Hu,undestroy:Zu};});var Ma=v((jg,ja)=>{ja.exports=ve("util").deprecate;});var Si=v((Mg,Za)=>{var Be=Lt();Za.exports=z;function za(e){var t=this;this.next=null,this.entry=null,this.finish=function(){ld(t,e);};}var Wu=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Be.nextTick,at;z.WritableState=Ft;var Pa=Object.create(it());Pa.inherits=nt();var Ju={deprecate:Ma()},Ba=mi(),Er=Ot().Buffer,$u=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Vu(e){return Er.from(e)}function Xu(e){return Er.isBuffer(e)||e instanceof $u}var qa=xi();Pa.inherits(z,Ba);function Yu(){}function Ft(e,t){at=at||qe(),e=e||{};var r=t instanceof at;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(s){id(t,s);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.bufferedRequestCount=0,this.corkedRequestsFree=new za(this);}Ft.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ft.prototype,"buffer",{get:Ju.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var xr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xr=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(e){return xr.call(this,e)?true:this!==z?false:e&&e._writableState instanceof Ft}})):xr=function(e){return e instanceof this};function z(e){if(at=at||qe(),!xr.call(z,this)&&!(this instanceof at))return new z(e);this._writableState=new Ft(e,this),this.writable=true,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ba.call(this);}z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function Ku(e,t){var r=new Error("write after end");e.emit("error",r),Be.nextTick(t,r);}function Gu(e,t,r,i){var n=true,a=false;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Be.nextTick(i,a),n=false),n}z.prototype.write=function(e,t,r){var i=this._writableState,n=false,a=!i.objectMode&&Xu(e);return a&&!Er.isBuffer(e)&&(e=Vu(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Yu),i.ended?Ku(this,r):(a||Gu(this,i,e,r))&&(i.pendingcb++,n=ed(this,i,a,e,t,r)),n};z.prototype.cork=function(){var e=this._writableState;e.corked++;};z.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ua(this,e));};z.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Qu(e,t,r){return !e.objectMode&&e.decodeStrings!==false&&typeof t=="string"&&(t=Er.from(t,r)),t}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function ed(e,t,r,i,n,a){if(!r){var o=Qu(t,i,n);i!==o&&(r=true,n="buffer",i=o);}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=true),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1;}else Ei(e,t,false,s,i,n,a);return u}function Ei(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=true,t.sync=true,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=false;}function td(e,t,r,i,n){--t.pendingcb,r?(Be.nextTick(n,i),Be.nextTick(It,e,t),e._writableState.errorEmitted=true,e.emit("error",i)):(n(i),e._writableState.errorEmitted=true,e.emit("error",i),It(e,t));}function rd(e){e.writing=false,e.writecb=null,e.length-=e.writelen,e.writelen=0;}function id(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(rd(r),t)td(e,r,i,t,n);else {var a=Ha(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Ua(e,r),i?Wu(Na,e,r,a,n):Na(e,r,a,n);}}function Na(e,t,r,i){r||nd(e,t),t.pendingcb--,i(),It(e,t);}function nd(e,t){t.length===0&&t.needDrain&&(t.needDrain=false,e.emit("drain"));}function Ua(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=true;r;)n[o]=r,r.isBuf||(s=false),r=r.next,o+=1;n.allBuffers=s,Ei(e,t,true,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new za(t),t.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,c=t.objectMode?1:u.length;if(Ei(e,t,false,c,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null);}t.bufferedRequest=r,t.bufferProcessing=false;}z.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"));};z.prototype._writev=null;z.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||sd(this,i,r);};function Ha(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function ad(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=true,e.emit("prefinish"),It(e,t);});}function od(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=true,Be.nextTick(ad,e,t)):(t.prefinished=true,e.emit("prefinish")));}function It(e,t){var r=Ha(t);return r&&(od(e,t),t.pendingcb===0&&(t.finished=true,e.emit("finish"))),r}function sd(e,t,r){t.ending=true,It(e,t),r&&(t.finished?Be.nextTick(r):e.once("finish",r)),t.ended=true,e.writable=false;}function ld(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next;}t.corkedRequestsFree.next=e;}Object.defineProperty(z.prototype,"destroyed",{get:function(){return this._writableState===void 0?false:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});z.prototype.destroy=qa.destroy;z.prototype._undestroy=qa.undestroy;z.prototype._destroy=function(e,t){this.end(),t(e);};});var qe=v((Ng,Va)=>{var Wa=Lt(),fd=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Va.exports=ye;var Ja=Object.create(it());Ja.inherits=nt();var $a=Ci(),Ti=Si();Ja.inherits(ye,$a);for(ki=fd(Ti.prototype),Sr=0;Sr<ki.length;Sr++)kr=ki[Sr],ye.prototype[kr]||(ye.prototype[kr]=Ti.prototype[kr]);var ki,kr,Sr;function ye(e){if(!(this instanceof ye))return new ye(e);$a.call(this,e),Ti.call(this,e),e&&e.readable===false&&(this.readable=false),e&&e.writable===false&&(this.writable=false),this.allowHalfOpen=true,e&&e.allowHalfOpen===false&&(this.allowHalfOpen=false),this.once("end",ud);}Object.defineProperty(ye.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function ud(){this.allowHalfOpen||this._writableState.ended||Wa.nextTick(dd,this);}function dd(e){e.end();}Object.defineProperty(ye.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?false:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});ye.prototype._destroy=function(e,t){this.push(null),this.end(),Wa.nextTick(t,e);};});var Li=v(Ya=>{var Ri=Ot().Buffer,Xa=Ri.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return true;default:return false}};function hd(e){if(!e)return "utf8";for(var t;;)switch(e){case "utf8":case "utf-8":return "utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return "utf16le";case "latin1":case "binary":return "latin1";case "base64":case "ascii":case "hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=true;}}function cd(e){var t=hd(e);if(typeof t!="string"&&(Ri.isEncoding===Xa||!Xa(e)))throw new Error("Unknown encoding: "+e);return t||e}Ya.StringDecoder=jt;function jt(e){this.encoding=cd(e);var t;switch(this.encoding){case "utf16le":this.text=_d,this.end=yd,t=4;break;case "utf8":this.fillLast=md,t=4;break;case "base64":this.text=wd,this.end=xd,t=3;break;default:this.write=Ed,this.end=Sd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ri.allocUnsafe(t);}jt.prototype.write=function(e){if(e.length===0)return "";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};jt.prototype.end=bd;jt.prototype.text=vd;jt.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length;};function Ai(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function pd(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Ai(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ai(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ai(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function gd(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function md(e){var t=this.lastTotal-this.lastNeed,r=gd(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length;}function vd(e,t){var r=pd(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function bd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function _d(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function yd(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function wd(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function xd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Ed(e){return e.toString(this.encoding)}function Sd(e){return e&&e.length?this.write(e):""}});var Ci=v((Bg,lo)=>{var st=Lt();lo.exports=I;var kd=Ca(),Mt;I.ReadableState=io;ve("events").EventEmitter;var eo=function(e,t){return e.listeners(t).length},ji=mi(),Nt=Ot().Buffer,Td=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Cd(e){return Nt.from(e)}function Ad(e){return Nt.isBuffer(e)||e instanceof Td}var to=Object.create(it());to.inherits=nt();var Oi=ve("util"),L=void 0;Oi&&Oi.debuglog?L=Oi.debuglog("stream"):L=function(){};var Rd=Ia(),ro=xi(),ot;to.inherits(I,ji);var Di=["error","close","destroy","pause","resume"];function Ld(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):kd(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]];}function io(e,t){Mt=Mt||qe(),e=e||{};var r=t instanceof Mt;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Rd,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.destroyed=false,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,e.encoding&&(ot||(ot=Li().StringDecoder),this.decoder=new ot(e.encoding),this.encoding=e.encoding);}function I(e){if(Mt=Mt||qe(),!(this instanceof I))return new I(e);this._readableState=new io(e,this),this.readable=true,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),ji.call(this);}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState===void 0?false:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});I.prototype.destroy=ro.destroy;I.prototype._undestroy=ro.undestroy;I.prototype._destroy=function(e,t){this.push(null),t(e);};I.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=true:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Nt.from(e,t),t=""),i=true),no(this,e,t,false,i)};I.prototype.unshift=function(e){return no(this,e,null,true,false)};function no(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=false,Fd(e,a);else {var o;n||(o=Od(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Nt.prototype&&(t=Cd(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Ii(e,a,t,true):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=false,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ii(e,a,t,false):ao(e,a)):Ii(e,a,t,false))):i||(a.reading=false);}return Dd(a)}function Ii(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Tr(e)),ao(e,t);}function Od(e,t){var r;return !Ad(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Dd(e){return !e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}I.prototype.isPaused=function(){return this._readableState.flowing===false};I.prototype.setEncoding=function(e){return ot||(ot=Li().StringDecoder),this._readableState.decoder=new ot(e),this._readableState.encoding=e,this};var Ka=8388608;function Id(e){return e>=Ka?e=Ka:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Ga(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Id(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=true,0))}I.prototype.read=function(e){L("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=false),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Fi(this):Tr(this),null;if(e=Ga(e,t),e===0&&t.ended)return t.length===0&&Fi(this),null;var i=t.needReadable;L("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=true,L("length less than watermark",i)),t.ended||t.reading?(i=false,L("reading or ended",i)):i&&(L("do read"),t.reading=true,t.sync=true,t.length===0&&(t.needReadable=true),this._read(t.highWaterMark),t.sync=false,t.reading||(e=Ga(r,t)));var n;return e>0?n=oo(e,t):n=null,n===null?(t.needReadable=true,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=true),r!==e&&t.ended&&Fi(this)),n!==null&&this.emit("data",n),n};function Fd(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=true,Tr(e);}}function Tr(e){var t=e._readableState;t.needReadable=false,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=true,t.sync?st.nextTick(Qa,e):Qa(e));}function Qa(e){L("emit readable"),e.emit("readable"),Mi(e);}function ao(e,t){t.readingMore||(t.readingMore=true,st.nextTick(jd,e,t));}function jd(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(L("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=false;}I.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));};I.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr,a=n?s:_;i.endEmitted?st.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(p,g){L("onunpipe"),p===r&&g&&g.hasUnpiped===false&&(g.hasUnpiped=true,f());}function s(){L("onend"),e.end();}var u=Md(r);e.on("drain",u);var l=false;function f(){L("cleanup"),e.removeListener("close",w),e.removeListener("finish",b),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",_),r.removeListener("data",d),l=true,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u();}var c=false;r.on("data",d);function d(p){L("ondata"),c=false;var g=e.write(p);g===false&&!c&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&so(i.pipes,e)!==-1)&&!l&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++,c=true),r.pause());}function h(p){L("onerror",p),_(),e.removeListener("error",h),eo(e,"error")===0&&e.emit("error",p);}Ld(e,"error",h);function w(){e.removeListener("finish",b),_();}e.once("close",w);function b(){L("onfinish"),e.removeListener("close",w),_();}e.once("finish",b);function _(){L("unpipe"),r.unpipe(e);}return e.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),e};function Md(e){return function(){var t=e._readableState;L("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&eo(e,"data")&&(t.flowing=true,Mi(e));}}I.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=false,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=false;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:false});return this}var o=so(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};I.prototype.on=function(e,t){var r=ji.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==false&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=true,i.emittedReadable=false,i.reading?i.length&&Tr(this):st.nextTick(Nd,this));}return r};I.prototype.addListener=I.prototype.on;function Nd(e){L("readable nexttick read 0"),e.read(0);}I.prototype.resume=function(){var e=this._readableState;return e.flowing||(L("resume"),e.flowing=true,zd(this,e)),this};function zd(e,t){t.resumeScheduled||(t.resumeScheduled=true,st.nextTick(Pd,e,t));}function Pd(e,t){t.reading||(L("resume read 0"),e.read(0)),t.resumeScheduled=false,t.awaitDrain=0,e.emit("resume"),Mi(e),t.flowing&&!t.reading&&e.read(0);}I.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(L("pause"),this._readableState.flowing=false,this.emit("pause")),this};function Mi(e){var t=e._readableState;for(L("flow",t.flowing);t.flowing&&e.read()!==null;);}I.prototype.wrap=function(e){var t=this,r=this._readableState,i=false;e.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o);}t.push(null);}),e.on("data",function(o){if(L("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=true,e.pause());}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(o){return function(){return e[o].apply(e,arguments)}})(n));for(var a=0;a<Di.length;a++)e.on(Di[a],this.emit.bind(this,Di[a]));return this._read=function(o){L("wrapped _read",o),i&&(i=false,e.resume());},this};Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});I._fromList=oo;function oo(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=Bd(e,t.buffer,t.decoder),r}function Bd(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?qd(e,t):Ud(e,t),i}function qd(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i;}return t.length-=i,n}function Ud(e,t){var r=Nt.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,e===0){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n;}return t.length-=n,r}function Fi(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=true,st.nextTick(Hd,t,e));}function Hd(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=true,t.readable=false,t.emit("end"));}function so(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}});var Ni=v((qg,ho)=>{ho.exports=we;var Cr=qe(),uo=Object.create(it());uo.inherits=nt();uo.inherits(we,Cr);function Zd(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=false,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function we(e){if(!(this instanceof we))return new we(e);Cr.call(this,e),this._transformState={afterTransform:Zd.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Wd);}function Wd(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){fo(e,t,r);}):fo(this,null,null);}we.prototype.push=function(e,t){return this._transformState.needTransform=false,Cr.prototype.push.call(this,e,t)};we.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};we.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}};we.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=true,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=true;};we.prototype._destroy=function(e,t){var r=this;Cr.prototype._destroy.call(this,e,function(i){t(i),r.emit("close");});};function fo(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var mo=v((Ug,go)=>{go.exports=zt;var co=Ni(),po=Object.create(it());po.inherits=nt();po.inherits(zt,co);function zt(e){if(!(this instanceof zt))return new zt(e);co.call(this,e);}zt.prototype._transform=function(e,t,r){r(null,e);};});var zi=v((U,Ar)=>{var ue=ve("stream");process.env.READABLE_STREAM==="disable"&&ue?(Ar.exports=ue,U=Ar.exports=ue.Readable,U.Readable=ue.Readable,U.Writable=ue.Writable,U.Duplex=ue.Duplex,U.Transform=ue.Transform,U.PassThrough=ue.PassThrough,U.Stream=ue):(U=Ar.exports=Ci(),U.Stream=ue||U,U.Readable=U,U.Writable=Si(),U.Duplex=qe(),U.Transform=Ni(),U.PassThrough=mo());});var xe=v(G=>{G.base64=true;G.array=true;G.string=true;G.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";G.nodebuffer=typeof Buffer<"u";G.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")G.blob=false;else {Pi=new ArrayBuffer(0);try{G.blob=new Blob([Pi],{type:"application/zip"}).size===0;}catch{try{vo=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Bi=new vo,Bi.append(Pi),G.blob=Bi.getBlob("application/zip").size===0;}catch{G.blob=false;}}}var Pi,vo,Bi;try{G.nodestream=!!zi().Readable;}catch{G.nodestream=false;}});var Ui=v(qi=>{var Jd=j(),$d=xe(),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";qi.encode=function(e){for(var t=[],r,i,n,a,o,s,u,l=0,f=e.length,c=f,d=Jd.getTypeOf(e)!=="string";l<e.length;)c=f-l,d?(r=e[l++],i=l<f?e[l++]:0,n=l<f?e[l++]:0):(r=e.charCodeAt(l++),i=l<f?e.charCodeAt(l++):0,n=l<f?e.charCodeAt(l++):0),a=r>>2,o=(r&3)<<4|i>>4,s=c>1?(i&15)<<2|n>>6:64,u=c>2?n&63:64,t.push(de.charAt(a)+de.charAt(o)+de.charAt(s)+de.charAt(u));return t.join("")};qi.decode=function(e){var t,r,i,n,a,o,s,u=0,l=0,f="data:";if(e.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var c=e.length*3/4;if(e.charAt(e.length-1)===de.charAt(64)&&c--,e.charAt(e.length-2)===de.charAt(64)&&c--,c%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for($d.uint8array?d=new Uint8Array(c|0):d=new Array(c|0);u<e.length;)n=de.indexOf(e.charAt(u++)),a=de.indexOf(e.charAt(u++)),o=de.indexOf(e.charAt(u++)),s=de.indexOf(e.charAt(u++)),t=n<<2|a>>4,r=(a&15)<<4|o>>2,i=(o&3)<<6|s,d[l++]=t,o!==64&&(d[l++]=r),s!==64&&(d[l++]=i);return d};});var Pt=v((Wg,bo)=>{bo.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}};});var xo=v((Jg,wo)=>{var _o=global.MutationObserver||global.WebKitMutationObserver,lt;process.browser?_o?(Hi=0,yo=new _o(Bt),Zi=global.document.createTextNode(""),yo.observe(Zi,{characterData:true}),lt=function(){Zi.data=Hi=++Hi%2;}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Wi=new global.MessageChannel,Wi.port1.onmessage=Bt,lt=function(){Wi.port2.postMessage(0);}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?lt=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){Bt(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},global.document.documentElement.appendChild(e);}:lt=function(){setTimeout(Bt,0);}:lt=function(){process.nextTick(Bt);};var Hi,yo,Zi,Wi,Ji,qt=[];function Bt(){Ji=true;for(var e,t,r=qt.length;r;){for(t=qt,qt=[],e=-1;++e<r;)t[e]();r=qt.length;}Ji=false;}wo.exports=Vd;function Vd(e){qt.push(e)===1&&!Ji&<();}});var Ro=v(($g,Ao)=>{var Eo=xo();function ft(){}var J={},So=["REJECTED"],$i=["FULFILLED"],ko=["PENDING"];process.browser||(Ut=["UNHANDLED"]);var Ut;Ao.exports=Re;function Re(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=ko,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Ut),e!==ft&&To(this,e);}Re.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,i);function r(n){function a(){return n}return t.resolve(e()).then(a)}function i(n){function a(){throw n}return t.resolve(e()).then(a)}};Re.prototype.catch=function(e){return this.then(null,e)};Re.prototype.then=function(e,t){if(typeof e!="function"&&this.state===$i||typeof t!="function"&&this.state===So)return this;var r=new this.constructor(ft);if(process.browser||this.handled===Ut&&(this.handled=null),this.state!==ko){var i=this.state===$i?e:t;Vi(r,i,this.outcome);}else this.queue.push(new Ht(r,e,t));return r};function Ht(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}Ht.prototype.callFulfilled=function(e){J.resolve(this.promise,e);};Ht.prototype.otherCallFulfilled=function(e){Vi(this.promise,this.onFulfilled,e);};Ht.prototype.callRejected=function(e){J.reject(this.promise,e);};Ht.prototype.otherCallRejected=function(e){Vi(this.promise,this.onRejected,e);};function Vi(e,t,r){Eo(function(){var i;try{i=t(r);}catch(n){return J.reject(e,n)}i===e?J.reject(e,new TypeError("Cannot resolve promise with itself")):J.resolve(e,i);});}J.resolve=function(e,t){var r=Co(Xd,t);if(r.status==="error")return J.reject(e,r.value);var i=r.value;if(i)To(e,i);else {e.state=$i,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t);}return e};J.reject=function(e,t){e.state=So,e.outcome=t,process.browser||e.handled===Ut&&Eo(function(){e.handled===Ut&&process.emit("unhandledRejection",t,e);});for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e};function Xd(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments);}}function To(e,t){var r=false;function i(s){r||(r=true,J.reject(e,s));}function n(s){r||(r=true,J.resolve(e,s));}function a(){t(n,i);}var o=Co(a);o.status==="error"&&i(o.value);}function Co(e,t){var r={};try{r.value=e(t),r.status="success";}catch(i){r.status="error",r.value=i;}return r}Re.resolve=Yd;function Yd(e){return e instanceof this?e:J.resolve(new this(ft),e)}Re.reject=Kd;function Kd(e){var t=new this(ft);return J.reject(t,e)}Re.all=Gd;function Gd(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=new Array(r),a=0,o=-1,s=new this(ft);++o<r;)u(e[o],o);return s;function u(l,f){t.resolve(l).then(c,function(d){i||(i=true,J.reject(s,d));});function c(d){n[f]=d,++a===r&&!i&&(i=true,J.resolve(s,n));}}}Re.race=Qd;function Qd(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=-1,a=new this(ft);++n<r;)o(e[n]);return a;function o(s){t.resolve(s).then(function(u){i||(i=true,J.resolve(a,u));},function(u){i||(i=true,J.reject(a,u));});}}});var ut=v((Vg,Lo)=>{var Xi=null;typeof Promise<"u"?Xi=Promise:Xi=Ro();Lo.exports={Promise:Xi};});var Do=v(Oo=>{(function(e,t){if(e.setImmediate)return;var r=1,i={},n=false,a=e.document,o;function s(g){typeof g!="function"&&(g=new Function(""+g));for(var x=new Array(arguments.length-1),m=0;m<x.length;m++)x[m]=arguments[m+1];var y={callback:g,args:x};return i[r]=y,o(r),r++}function u(g){delete i[g];}function l(g){var x=g.callback,m=g.args;switch(m.length){case 0:x();break;case 1:x(m[0]);break;case 2:x(m[0],m[1]);break;case 3:x(m[0],m[1],m[2]);break;default:x.apply(t,m);break}}function f(g){if(n)setTimeout(f,0,g);else {var x=i[g];if(x){n=true;try{l(x);}finally{u(g),n=false;}}}}function c(){o=function(g){process.nextTick(function(){f(g);});};}function d(){if(e.postMessage&&!e.importScripts){var g=true,x=e.onmessage;return e.onmessage=function(){g=false;},e.postMessage("","*"),e.onmessage=x,g}}function h(){var g="setImmediate$"+Math.random()+"$",x=function(m){m.source===e&&typeof m.data=="string"&&m.data.indexOf(g)===0&&f(+m.data.slice(g.length));};e.addEventListener?e.addEventListener("message",x,false):e.attachEvent("onmessage",x),o=function(m){e.postMessage(g+m,"*");};}function w(){var g=new MessageChannel;g.port1.onmessage=function(x){var m=x.data;f(m);},o=function(x){g.port2.postMessage(x);};}function b(){var g=a.documentElement;o=function(x){var m=a.createElement("script");m.onreadystatechange=function(){f(x),m.onreadystatechange=null,g.removeChild(m),m=null;},g.appendChild(m);};}function _(){o=function(g){setTimeout(f,0,g);};}var p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,{}.toString.call(e.process)==="[object process]"?c():d()?h():e.MessageChannel?w():a&&"onreadystatechange"in a.createElement("script")?b():_(),p.setImmediate=s,p.clearImmediate=u;})(typeof self>"u"?typeof global>"u"?Oo:global:self);});var j=v(P=>{var Le=xe(),eh=Ui(),dt=Pt(),Yi=ut();Do();function th(e){var t=null;return Le.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Lr(e,t)}P.newBlob=function(e,t){P.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(e),i.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function Zt(e){return e}function Lr(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var Rr={stringifyByChunk:function(e,t,r){var i=[],n=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;n<a;)t==="array"||t==="nodebuffer"?i.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,a)))):i.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,a)))),n+=r;return i.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return Le.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return false}})(),nodebuffer:(function(){try{return Le.nodebuffer&&String.fromCharCode.apply(null,dt.allocBuffer(1)).length===1}catch{return false}})()}};function Wt(e){var t=65536,r=P.getTypeOf(e),i=true;if(r==="uint8array"?i=Rr.applyCanBeUsed.uint8array:r==="nodebuffer"&&(i=Rr.applyCanBeUsed.nodebuffer),i)for(;t>1;)try{return Rr.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2);}return Rr.stringifyByChar(e)}P.applyFromCharCode=Wt;function Or(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var Oe={};Oe.string={string:Zt,array:function(e){return Lr(e,new Array(e.length))},arraybuffer:function(e){return Oe.string.uint8array(e).buffer},uint8array:function(e){return Lr(e,new Uint8Array(e.length))},nodebuffer:function(e){return Lr(e,dt.allocBuffer(e.length))}};Oe.array={string:Wt,array:Zt,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.arraybuffer={string:function(e){return Wt(new Uint8Array(e))},array:function(e){return Or(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:Zt,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(new Uint8Array(e))}};Oe.uint8array={string:Wt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:Zt,nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.nodebuffer={string:Wt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return Oe.nodebuffer.uint8array(e).buffer},uint8array:function(e){return Or(e,new Uint8Array(e.length))},nodebuffer:Zt};P.transformTo=function(e,t){if(t||(t=""),!e)return t;P.checkSupport(e);var r=P.getTypeOf(t),i=Oe[r][e](t);return i};P.resolve=function(e){for(var t=e.split("/"),r=[],i=0;i<t.length;i++){var n=t[i];n==="."||n===""&&i!==0&&i!==t.length-1||(n===".."?r.pop():r.push(n));}return r.join("/")};P.getTypeOf=function(e){if(typeof e=="string")return "string";if(Object.prototype.toString.call(e)==="[object Array]")return "array";if(Le.nodebuffer&&dt.isBuffer(e))return "nodebuffer";if(Le.uint8array&&e instanceof Uint8Array)return "uint8array";if(Le.arraybuffer&&e instanceof ArrayBuffer)return "arraybuffer"};P.checkSupport=function(e){var t=Le[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};P.MAX_VALUE_16BITS=65535;P.MAX_VALUE_32BITS=-1;P.pretty=function(e){var t="",r,i;for(i=0;i<(e||"").length;i++)r=e.charCodeAt(i),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};P.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[]);});};P.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r;};P.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};P.prepareContent=function(e,t,r,i,n){var a=Yi.Promise.resolve(t).then(function(o){var s=Le.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return s&&typeof FileReader<"u"?new Yi.Promise(function(u,l){var f=new FileReader;f.onload=function(c){u(c.target.result);},f.onerror=function(c){l(c.target.error);},f.readAsArrayBuffer(o);}):o});return a.then(function(o){var s=P.getTypeOf(o);return s?(s==="arraybuffer"?o=P.transformTo("uint8array",o):s==="string"&&(n?o=eh.decode(o):r&&i!==true&&(o=th(o))),o):Yi.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};});var Q=v((Kg,Fo)=>{function Io(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null;}Io.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return true},error:function(e){return this.isFinished?false:(this.isPaused?this.generatedError=e:(this.isFinished=true,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),true)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t);},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.end();}),e.on("error",function(r){t.error(r);}),this},pause:function(){return this.isPaused||this.isFinished?false:(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;this.isPaused=false;var e=false;return this.generatedError&&(this.error(this.generatedError),e=true),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e);},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock();},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};Fo.exports=Io;});var ct=v(De=>{var ht=j(),Ue=xe(),rh=Pt(),Dr=Q(),Jt=new Array(256);for(Ee=0;Ee<256;Ee++)Jt[Ee]=Ee>=252?6:Ee>=248?5:Ee>=240?4:Ee>=224?3:Ee>=192?2:1;var Ee;Jt[254]=Jt[254]=1;var ih=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(Ue.uint8array?t=new Uint8Array(s):t=new Array(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},nh=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Jt[e[r]]>t?r:t},ah=function(e){var t,r,i,n,a=e.length,o=new Array(a*2);for(r=0,t=0;t<a;){if(i=e[t++],i<128){o[r++]=i;continue}if(n=Jt[i],n>4){o[r++]=65533,t+=n-1;continue}for(i&=n===2?31:n===3?15:7;n>1&&t<a;)i=i<<6|e[t++]&63,n--;if(n>1){o[r++]=65533;continue}i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|i&1023);}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),ht.applyFromCharCode(o)};De.utf8encode=function(t){return Ue.nodebuffer?rh.newBufferFrom(t,"utf-8"):ih(t)};De.utf8decode=function(t){return Ue.nodebuffer?ht.transformTo("nodebuffer",t).toString("utf-8"):(t=ht.transformTo(Ue.uint8array?"uint8array":"array",t),ah(t))};function Ir(){Dr.call(this,"utf-8 decode"),this.leftOver=null;}ht.inherits(Ir,Dr);Ir.prototype.processChunk=function(e){var t=ht.transformTo(Ue.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Ue.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var i=nh(t),n=t;i!==t.length&&(Ue.uint8array?(n=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(n=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:De.utf8decode(n),meta:e.meta});};Ir.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:De.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);};De.Utf8DecodeWorker=Ir;function Ki(){Dr.call(this,"utf-8 encode");}ht.inherits(Ki,Dr);Ki.prototype.processChunk=function(e){this.push({data:De.utf8encode(e.data),meta:e.meta});};De.Utf8EncodeWorker=Ki;});var zo=v((Qg,No)=>{var jo=Q(),Mo=j();function Gi(e){jo.call(this,"ConvertWorker to "+e),this.destType=e;}Mo.inherits(Gi,jo);Gi.prototype.processChunk=function(e){this.push({data:Mo.transformTo(this.destType,e.data),meta:e.meta});};No.exports=Gi;});var qo=v((em,Bo)=>{var Po=zi().Readable,oh=j();oh.inherits(Qi,Po);function Qi(e,t,r){Po.call(this,t),this._helper=e;var i=this;e.on("data",function(n,a){i.push(n)||i._helper.pause(),r&&r(a);}).on("error",function(n){i.emit("error",n);}).on("end",function(){i.push(null);});}Qi.prototype._read=function(){this._helper.resume();};Bo.exports=Qi;});var en=v((tm,Zo)=>{var He=j(),sh=zo(),lh=Q(),fh=Ui(),uh=xe(),dh=ut(),Uo=null;if(uh.nodestream)try{Uo=qo();}catch{}function hh(e,t,r){switch(e){case "blob":return He.newBlob(He.transformTo("arraybuffer",t),r);case "base64":return fh.encode(t);default:return He.transformTo(e,t)}}function ch(e,t){var r,i=0,n=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case "string":return t.join("");case "array":return Array.prototype.concat.apply([],t);case "uint8array":for(n=new Uint8Array(a),r=0;r<t.length;r++)n.set(t[r],i),i+=t[r].length;return n;case "nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function ph(e,t){return new dh.Promise(function(r,i){var n=[],a=e._internalType,o=e._outputType,s=e._mimeType;e.on("data",function(u,l){n.push(u),t&&t(l);}).on("error",function(u){n=[],i(u);}).on("end",function(){try{var u=hh(o,ch(a,n),s);r(u);}catch(l){i(l);}n=[];}).resume();})}function Ho(e,t,r){var i=t;switch(t){case "blob":case "arraybuffer":i="uint8array";break;case "base64":i="string";break}try{this._internalType=i,this._outputType=t,this._mimeType=r,He.checkSupport(i),this._worker=e.pipe(new sh(i)),e.lock();}catch(n){this._worker=new lh("error"),this._worker.error(n);}}Ho.prototype={accumulate:function(e){return ph(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(i){t.call(r,i.data,i.meta);}):this._worker.on(e,function(){He.delay(t,arguments,r);}),this},resume:function(){return He.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(He.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Uo(this,{objectMode:this._outputType!=="nodebuffer"},e)}};Zo.exports=Ho;});var tn=v(ae=>{ae.base64=false;ae.binary=false;ae.dir=false;ae.createFolders=true;ae.date=null;ae.compression=null;ae.compressionOptions=null;ae.comment=null;ae.unixPermissions=null;ae.dosPermissions=null;});var rn=v((im,Wo)=>{var Fr=j(),jr=Q(),gh=16*1024;function pt(e){jr.call(this,"DataWorker");var t=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,e.then(function(r){t.dataIsReady=true,t.data=r,t.max=r&&r.length||0,t.type=Fr.getTypeOf(r),t.isPaused||t._tickAndRepeat();},function(r){t.error(r);});}Fr.inherits(pt,jr);pt.prototype.cleanUp=function(){jr.prototype.cleanUp.call(this),this.data=null;};pt.prototype.resume=function(){return jr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,Fr.delay(this._tickAndRepeat,[],this)),true):false};pt.prototype._tickAndRepeat=function(){this._tickScheduled=false,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Fr.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));};pt.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var e=gh,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case "string":t=this.data.substring(this.index,r);break;case "uint8array":t=this.data.subarray(this.index,r);break;case "array":case "nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Wo.exports=pt;});var Mr=v((nm,$o)=>{var mh=j();function vh(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var Jo=vh();function bh(e,t,r,i){var n=Jo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}function _h(e,t,r,i){var n=Jo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t.charCodeAt(o))&255];return e^-1}$o.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=mh.getTypeOf(t)!=="string";return i?bh(r|0,t,t.length,0):_h(r|0,t,t.length,0)};});var an=v((am,Xo)=>{var Vo=Q(),yh=Mr(),wh=j();function nn(){Vo.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}wh.inherits(nn,Vo);nn.prototype.processChunk=function(e){this.streamInfo.crc32=yh(e.data,this.streamInfo.crc32||0),this.push(e);};Xo.exports=nn;});var Ko=v((om,Yo)=>{var xh=j(),on=Q();function sn(e){on.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}xh.inherits(sn,on);sn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}on.prototype.processChunk.call(this,e);};Yo.exports=sn;});var Nr=v((sm,es)=>{var Go=ut(),Qo=rn(),Eh=an(),ln=Ko();function fn(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n;}fn.prototype={getContentWorker:function(){var e=new Qo(Go.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new ln("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new Qo(Go.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};fn.createWorkerFrom=function(e,t,r){return e.pipe(new Eh).pipe(new ln("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new ln("compressedSize")).withStreamInfo("compression",t)};es.exports=fn;});var ns=v((lm,is)=>{var Sh=en(),kh=rn(),un=ct(),dn=Nr(),ts=Q(),hn=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};};hn.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var i=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(t=t.pipe(new un.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new un.Utf8DecodeWorker));}catch(a){t=new ts("error"),t.error(a);}return new Sh(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof dn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new un.Utf8EncodeWorker)),dn.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof dn?this._data.getContentWorker():this._data instanceof ts?this._data:new kh(this._data)}};var rs=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Th=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(zr=0;zr<rs.length;zr++)hn.prototype[rs[zr]]=Th;var zr;is.exports=hn;});var Se=v(V=>{var Ch=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Ah(e,t){return Object.prototype.hasOwnProperty.call(e,t)}V.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)Ah(r,i)&&(e[i]=r[i]);}}return e};V.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var Rh={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},Lh={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){return [].concat.apply([],e)}};V.setTyped=function(e){e?(V.Buf8=Uint8Array,V.Buf16=Uint16Array,V.Buf32=Int32Array,V.assign(V,Rh)):(V.Buf8=Array,V.Buf16=Array,V.Buf32=Array,V.assign(V,Lh));};V.setTyped(Ch);});var Cs=v(vt=>{var Oh=Se(),Dh=4,as=0,os=1,Ih=2;function mt(e){for(var t=e.length;--t>=0;)e[t]=0;}var Fh=0,hs=1,jh=2,Mh=3,Nh=258,_n=29,Gt=256,Vt=Gt+1+_n,gt=30,yn=19,cs=2*Vt+1,Ze=15,cn=16,zh=7,wn=256,ps=16,gs=17,ms=18,vn=[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],Pr=[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],Ph=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bh=512,ke=new Array((Vt+2)*2);mt(ke);var $t=new Array(gt*2);mt($t);var Xt=new Array(Bh);mt(Xt);var Yt=new Array(Nh-Mh+1);mt(Yt);var xn=new Array(_n);mt(xn);var Br=new Array(gt);mt(Br);function pn(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length;}var bs,_s,ys;function gn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function ws(e){return e<256?Xt[e]:Xt[256+(e>>>7)]}function Kt(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255;}function Y(e,t,r){e.bi_valid>cn-r?(e.bi_buf|=t<<e.bi_valid&65535,Kt(e,e.bi_buf),e.bi_buf=t>>cn-e.bi_valid,e.bi_valid+=r-cn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function he(e,t,r){Y(e,r[t*2],r[t*2+1]);}function xs(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function qh(e){e.bi_valid===16?(Kt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8);}function Uh(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,f,c,d,h,w,b=0;for(d=0;d<=Ze;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<cs;l++)f=e.heap[l],d=r[r[f*2+1]*2+1]+1,d>u&&(d=u,b++),r[f*2+1]=d,!(f>i)&&(e.bl_count[d]++,h=0,f>=s&&(h=o[f-s]),w=r[f*2],e.opt_len+=w*(d+h),a&&(e.static_len+=w*(n[f*2+1]+h)));if(b!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,b-=2;}while(b>0);for(d=u;d!==0;d--)for(f=e.bl_count[d];f!==0;)c=e.heap[--l],!(c>i)&&(r[c*2+1]!==d&&(e.opt_len+=(d-r[c*2+1])*r[c*2],r[c*2+1]=d),f--);}}function Es(e,t,r){var i=new Array(Ze+1),n=0,a,o;for(a=1;a<=Ze;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=xs(i[s]++,s));}}function Hh(){var e,t,r,i,n,a=new Array(Ze+1);for(r=0,i=0;i<_n-1;i++)for(xn[i]=r,e=0;e<1<<vn[i];e++)Yt[r++]=i;for(Yt[r-1]=i,n=0,i=0;i<16;i++)for(Br[i]=n,e=0;e<1<<Pr[i];e++)Xt[n++]=i;for(n>>=7;i<gt;i++)for(Br[i]=n<<7,e=0;e<1<<Pr[i]-7;e++)Xt[256+n++]=i;for(t=0;t<=Ze;t++)a[t]=0;for(e=0;e<=143;)ke[e*2+1]=8,e++,a[8]++;for(;e<=255;)ke[e*2+1]=9,e++,a[9]++;for(;e<=279;)ke[e*2+1]=7,e++,a[7]++;for(;e<=287;)ke[e*2+1]=8,e++,a[8]++;for(Es(ke,Vt+1,a),e=0;e<gt;e++)$t[e*2+1]=5,$t[e*2]=xs(e,5);bs=new pn(ke,vn,Gt+1,Vt,Ze),_s=new pn($t,Pr,0,gt,Ze),ys=new pn(new Array(0),Ph,0,yn,zh);}function Ss(e){var t;for(t=0;t<Vt;t++)e.dyn_ltree[t*2]=0;for(t=0;t<gt;t++)e.dyn_dtree[t*2]=0;for(t=0;t<yn;t++)e.bl_tree[t*2]=0;e.dyn_ltree[wn*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function ks(e){e.bi_valid>8?Kt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0;}function Zh(e,t,r,i){ks(e),(Kt(e,r),Kt(e,~r)),Oh.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}function ss(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function mn(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&ss(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!ss(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i;}function ls(e,t,r){var i,n,a=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?he(e,n,t):(o=Yt[n],he(e,o+Gt+1,t),s=vn[o],s!==0&&(n-=xn[o],Y(e,n,s)),i--,o=ws(i),he(e,o,r),s=Pr[o],s!==0&&(i-=Br[o],Y(e,i,s)));while(a<e.last_lit);he(e,wn,t);}function bn(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=cs,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,r[l*2]=1,e.depth[l]=0,e.opt_len--,n&&(e.static_len-=i[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)mn(e,r,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mn(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[l*2]=r[o*2]+r[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=l,e.heap[1]=l++,mn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Uh(e,t),Es(r,u,e.bl_count);}function fs(e,t,r){var i,n=-1,a,o=t[1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[ps*2]++):s<=10?e.bl_tree[gs*2]++:e.bl_tree[ms*2]++,s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4));}function us(e,t,r){var i,n=-1,a,o=t[1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++s<u&&a===o)){if(s<l)do he(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(he(e,a,e.bl_tree),s--),he(e,ps,e.bl_tree),Y(e,s-3,2)):s<=10?(he(e,gs,e.bl_tree),Y(e,s-3,3)):(he(e,ms,e.bl_tree),Y(e,s-11,7));s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4);}}function Wh(e){var t;for(fs(e,e.dyn_ltree,e.l_desc.max_code),fs(e,e.dyn_dtree,e.d_desc.max_code),bn(e,e.bl_desc),t=yn-1;t>=3&&e.bl_tree[vs[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Jh(e,t,r,i){var n;for(Y(e,t-257,5),Y(e,r-1,5),Y(e,i-4,4),n=0;n<i;n++)Y(e,e.bl_tree[vs[n]*2+1],3);us(e,e.dyn_ltree,t-1),us(e,e.dyn_dtree,r-1);}function $h(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return as;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return os;for(r=32;r<Gt;r++)if(e.dyn_ltree[r*2]!==0)return os;return as}var ds=false;function Vh(e){ds||(Hh(),ds=true),e.l_desc=new gn(e.dyn_ltree,bs),e.d_desc=new gn(e.dyn_dtree,_s),e.bl_desc=new gn(e.bl_tree,ys),e.bi_buf=0,e.bi_valid=0,Ss(e);}function Ts(e,t,r,i){Y(e,(Fh<<1)+(i?1:0),3),Zh(e,t,r);}function Xh(e){Y(e,hs<<1,3),he(e,wn,ke),qh(e);}function Yh(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===Ih&&(e.strm.data_type=$h(e)),bn(e,e.l_desc),bn(e,e.d_desc),o=Wh(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?Ts(e,t,r,i):e.strategy===Dh||a===n?(Y(e,(hs<<1)+(i?1:0),3),ls(e,ke,$t)):(Y(e,(jh<<1)+(i?1:0),3),Jh(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ls(e,e.dyn_ltree,e.dyn_dtree)),Ss(e),i&&ks(e);}function Kh(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Yt[r]+Gt+1)*2]++,e.dyn_dtree[ws(t)*2]++),e.last_lit===e.lit_bufsize-1}vt._tr_init=Vh;vt._tr_stored_block=Ts;vt._tr_flush_block=Yh;vt._tr_tally=Kh;vt._tr_align=Xh;});var En=v((dm,As)=>{function Gh(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521;}return n|a<<16|0}As.exports=Gh;});var Sn=v((hm,Rs)=>{function Qh(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var ec=Qh();function tc(e,t,r,i){var n=ec,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Rs.exports=tc;});var qr=v((cm,Ls)=>{Ls.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"};});var Ps=v(ge=>{var X=Se(),te=Cs(),Fs=En(),Ie=Sn(),rc=qr(),Ve=0,ic=1,nc=3,ze=4,Os=5,pe=0,Ds=1,re=-2,ac=-3,kn=-5,oc=-1,sc=1,Ur=2,lc=3,fc=4,uc=0,dc=2,Jr=8,hc=9,cc=15,pc=8,gc=29,mc=256,Cn=mc+1+gc,vc=30,bc=19,_c=2*Cn+1,yc=15,A=3,Me=258,oe=Me+A+1,wc=32,$r=42,An=69,Hr=73,Zr=91,Wr=103,We=113,er=666,B=1,tr=2,Je=3,yt=4,xc=3;function Ne(e,t){return e.msg=rc[t],t}function Is(e){return (e<<1)-(e>4?9:0)}function je(e){for(var t=e.length;--t>=0;)e[t]=0;}function Fe(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(X.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0));}function H(e,t){te._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Fe(e.strm);}function R(e,t){e.pending_buf[e.pending++]=t;}function Qt(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255;}function Ec(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,X.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=Fs(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Ie(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function js(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-oe?e.strstart-(e.w_size-oe):0,l=e.window,f=e.w_mask,c=e.prev,d=e.strstart+Me,h=l[i+o-1],w=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(l[n+o]!==w||l[n+o-1]!==h||l[n]!==l[i]||l[++n]!==l[i+1])){i+=2,n++;do;while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&i<d);if(a=Me-(d-i),i=d-Me,a>o){if(e.match_start=t,o=a,a>=s)break;h=l[i+o-1],w=l[i+o];}}while((t=c[t&f])>u&&--r!==0);return o<=e.lookahead?o:e.lookahead}function $e(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-oe)){X.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t;}if(e.strm.avail_in===0)break;if(i=Ec(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=A)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+A-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<A)););}while(e.lookahead<oe&&e.strm.avail_in!==0)}function Sc(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if($e(e),e.lookahead===0&&t===Ve)return B;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,H(e,false),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-oe&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=0,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):(e.strstart>e.block_start&&(H(e,false),e.strm.avail_out===0),B)}function Tn(e,t){for(var r,i;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return B;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-oe&&(e.match_length=js(e,r)),e.match_length>=A)if(i=te._tr_tally(e,e.strstart-e.match_start,e.match_length-A),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=A){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++;}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function bt(e,t){for(var r,i,n;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return B;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=A-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-oe&&(e.match_length=js(e,r),e.match_length<=5&&(e.strategy===sc||e.match_length===A&&e.strstart-e.match_start>4096)&&(e.match_length=A-1)),e.prev_length>=A&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-A,i=te._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-A),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=A-1,e.strstart++,i&&(H(e,false),e.strm.avail_out===0))return B}else if(e.match_available){if(i=te._tr_tally(e,0,e.window[e.strstart-1]),i&&H(e,false),e.strstart++,e.lookahead--,e.strm.avail_out===0)return B}else e.match_available=1,e.strstart++,e.lookahead--;}return e.match_available&&(i=te._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function kc(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=Me){if($e(e),e.lookahead<=Me&&t===Ve)return B;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=A&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+Me;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=Me-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=A?(r=te._tr_tally(e,1,e.match_length-A),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=0,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function Tc(e,t){for(var r;;){if(e.lookahead===0&&($e(e),e.lookahead===0)){if(t===Ve)return B;break}if(e.match_length=0,r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=0,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function ce(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n;}var _t;_t=[new ce(0,0,0,0,Sc),new ce(4,4,8,4,Tn),new ce(4,5,16,8,Tn),new ce(4,6,32,32,Tn),new ce(4,4,16,16,bt),new ce(8,16,32,32,bt),new ce(8,16,128,128,bt),new ce(8,32,128,256,bt),new ce(32,128,258,1024,bt),new ce(32,258,258,4096,bt)];function Cc(e){e.window_size=2*e.w_size,je(e.head),e.max_lazy_match=_t[e.level].max_lazy,e.good_match=_t[e.level].good_length,e.nice_match=_t[e.level].nice_length,e.max_chain_length=_t[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=A-1,e.match_available=0,e.ins_h=0;}function Ac(){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=Jr,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 X.Buf16(_c*2),this.dyn_dtree=new X.Buf16((2*vc+1)*2),this.bl_tree=new X.Buf16((2*bc+1)*2),je(this.dyn_ltree),je(this.dyn_dtree),je(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new X.Buf16(yc+1),this.heap=new X.Buf16(2*Cn+1),je(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new X.Buf16(2*Cn+1),je(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 Ms(e){var t;return !e||!e.state?Ne(e,re):(e.total_in=e.total_out=0,e.data_type=dc,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?$r:We,e.adler=t.wrap===2?0:1,t.last_flush=Ve,te._tr_init(t),pe)}function Ns(e){var t=Ms(e);return t===pe&&Cc(e.state),t}function Rc(e,t){return !e||!e.state||e.state.wrap!==2?re:(e.state.gzhead=t,pe)}function zs(e,t,r,i,n,a){if(!e)return re;var o=1;if(t===oc&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>hc||r!==Jr||i<8||i>15||t<0||t>9||a<0||a>fc)return Ne(e,re);i===8&&(i=9);var s=new Ac;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+A-1)/A),s.window=new X.Buf8(s.w_size*2),s.head=new X.Buf16(s.hash_size),s.prev=new X.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new X.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,Ns(e)}function Lc(e,t){return zs(e,t,Jr,cc,pc,uc)}function Oc(e,t){var r,i,n,a;if(!e||!e.state||t>Os||t<0)return e?Ne(e,re):re;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===er&&t!==ze)return Ne(e,e.avail_out===0?kn:re);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===$r)if(i.wrap===2)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,i.gzhead.time&255),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,i.level===9?2:i.strategy>=Ur||i.level<2?4:0),R(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,i.gzhead.extra.length&255),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Ie(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=An):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,i.level===9?2:i.strategy>=Ur||i.level<2?4:0),R(i,xc),i.status=We);else {var o=Jr+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Ur||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=wc),o+=31-o%31,i.status=We,Qt(i,o),i.strstart!==0&&(Qt(i,e.adler>>>16),Qt(i,e.adler&65535)),e.adler=1;}if(i.status===An)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Fe(e),n=i.pending,i.pending===i.pending_buf_size));)R(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Hr);}else i.status=Hr;if(i.status===Hr)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Fe(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Zr);}else i.status=Zr;if(i.status===Zr)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Fe(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Wr);}else i.status=Wr;if(i.status===Wr&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Fe(e),i.pending+2<=i.pending_buf_size&&(R(i,e.adler&255),R(i,e.adler>>8&255),e.adler=0,i.status=We)):i.status=We),i.pending!==0){if(Fe(e),e.avail_out===0)return i.last_flush=-1,pe}else if(e.avail_in===0&&Is(t)<=Is(r)&&t!==ze)return Ne(e,kn);if(i.status===er&&e.avail_in!==0)return Ne(e,kn);if(e.avail_in!==0||i.lookahead!==0||t!==Ve&&i.status!==er){var u=i.strategy===Ur?Tc(i,t):i.strategy===lc?kc(i,t):_t[i.level].func(i,t);if((u===Je||u===yt)&&(i.status=er),u===B||u===Je)return e.avail_out===0&&(i.last_flush=-1),pe;if(u===tr&&(t===ic?te._tr_align(i):t!==Os&&(te._tr_stored_block(i,0,0,false),t===nc&&(je(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Fe(e),e.avail_out===0))return i.last_flush=-1,pe}return t!==ze?pe:i.wrap<=0?Ds:(i.wrap===2?(R(i,e.adler&255),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,e.total_in&255),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(Qt(i,e.adler>>>16),Qt(i,e.adler&65535)),Fe(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pe:Ds)}function Dc(e){var t;return !e||!e.state?re:(t=e.state.status,t!==$r&&t!==An&&t!==Hr&&t!==Zr&&t!==Wr&&t!==We&&t!==er?Ne(e,re):(e.state=null,t===We?Ne(e,ac):pe))}function Ic(e,t){var r=t.length,i,n,a,o,s,u,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==$r||i.lookahead))return re;for(o===1&&(e.adler=Fs(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(je(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new X.Buf8(i.w_size),X.arraySet(f,t,r-i.w_size,i.w_size,0),t=f,r=i.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,$e(i);i.lookahead>=A;){n=i.strstart,a=i.lookahead-(A-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+A-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=A-1,$e(i);}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=A-1,i.match_available=0,e.next_in=u,e.input=l,e.avail_in=s,i.wrap=o,pe}ge.deflateInit=Lc;ge.deflateInit2=zs;ge.deflateReset=Ns;ge.deflateResetKeep=Ms;ge.deflateSetHeader=Rc;ge.deflate=Oc;ge.deflateEnd=Dc;ge.deflateSetDictionary=Ic;ge.deflateInfo="pako deflate (from Nodeca project)";});var Rn=v(wt=>{var Vr=Se(),Bs=true,qs=true;try{String.fromCharCode.apply(null,[0]);}catch{Bs=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{qs=false;}var rr=new Vr.Buf8(256);for(Te=0;Te<256;Te++)rr[Te]=Te>=252?6:Te>=248?5:Te>=240?4:Te>=224?3:Te>=192?2:1;var Te;rr[254]=rr[254]=1;wt.string2buf=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Vr.Buf8(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function Us(e,t){if(t<65534&&(e.subarray&&qs||!e.subarray&&Bs))return String.fromCharCode.apply(null,Vr.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}wt.buf2binstring=function(e){return Us(e,e.length)};wt.binstring2buf=function(e){for(var t=new Vr.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t};wt.buf2string=function(e,t){var r,i,n,a,o=t||e.length,s=new Array(o*2);for(i=0,r=0;r<o;){if(n=e[r++],n<128){s[i++]=n;continue}if(a=rr[n],a>4){s[i++]=65533,r+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&r<o;)n=n<<6|e[r++]&63,a--;if(a>1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023);}return Us(s,i)};wt.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+rr[e[r]]>t?r:t};});var Ln=v((mm,Hs)=>{function Fc(){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;}Hs.exports=Fc;});var $s=v(ar=>{var ir=Ps(),nr=Se(),Dn=Rn(),In=qr(),jc=Ln(),Js=Object.prototype.toString,Mc=0,On=4,xt=0,Zs=1,Ws=2,Nc=-1,zc=0,Pc=8;function Xe(e){if(!(this instanceof Xe))return new Xe(e);this.options=nr.assign({level:Nc,method:Pc,chunkSize:16384,windowBits:15,memLevel:8,strategy:zc,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new jc,this.strm.avail_out=0;var r=ir.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==xt)throw new Error(In[r]);if(t.header&&ir.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Dn.string2buf(t.dictionary):Js.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=ir.deflateSetDictionary(this.strm,i),r!==xt)throw new Error(In[r]);this._dict_set=true;}}Xe.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return false;a=t===~~t?t:t===true?On:Mc,typeof e=="string"?r.input=Dn.string2buf(e):Js.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new nr.Buf8(i),r.next_out=0,r.avail_out=i),n=ir.deflate(r,a),n!==Zs&&n!==xt)return this.onEnd(n),this.ended=true,false;(r.avail_out===0||r.avail_in===0&&(a===On||a===Ws))&&(this.options.to==="string"?this.onData(Dn.buf2binstring(nr.shrinkBuf(r.output,r.next_out))):this.onData(nr.shrinkBuf(r.output,r.next_out)));}while((r.avail_in>0||r.avail_out===0)&&n!==Zs);return a===On?(n=ir.deflateEnd(this.strm),this.onEnd(n),this.ended=true,n===xt):(a===Ws&&(this.onEnd(xt),r.avail_out=0),true)};Xe.prototype.onData=function(e){this.chunks.push(e);};Xe.prototype.onEnd=function(e){e===xt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=nr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Fn(e,t){var r=new Xe(t);if(r.push(e,true),r.err)throw r.msg||In[r.err];return r.result}function Bc(e,t){return t=t||{},t.raw=true,Fn(e,t)}function qc(e,t){return t=t||{},t.gzip=true,Fn(e,t)}ar.Deflate=Xe;ar.deflate=Fn;ar.deflateRaw=Bc;ar.gzip=qc;});var Xs=v((bm,Vs)=>{var Xr=30,Uc=12;Vs.exports=function(t,r){var i,n,a,o,s,u,l,f,c,d,h,w,b,_,p,g,x,m,y,T,k,S,C,D,E;i=t.state,n=t.next_in,D=t.input,a=n+(t.avail_in-5),o=t.next_out,E=t.output,s=o-(r-t.avail_out),u=o+(t.avail_out-257),l=i.dmax,f=i.wsize,c=i.whave,d=i.wnext,h=i.window,w=i.hold,b=i.bits,_=i.lencode,p=i.distcode,g=(1<<i.lenbits)-1,x=(1<<i.distbits)-1;e:do{b<15&&(w+=D[n++]<<b,b+=8,w+=D[n++]<<b,b+=8),m=_[w&g];t:for(;;){if(y=m>>>24,w>>>=y,b-=y,y=m>>>16&255,y===0)E[o++]=m&65535;else if(y&16){T=m&65535,y&=15,y&&(b<y&&(w+=D[n++]<<b,b+=8),T+=w&(1<<y)-1,w>>>=y,b-=y),b<15&&(w+=D[n++]<<b,b+=8,w+=D[n++]<<b,b+=8),m=p[w&x];r:for(;;){if(y=m>>>24,w>>>=y,b-=y,y=m>>>16&255,y&16){if(k=m&65535,y&=15,b<y&&(w+=D[n++]<<b,b+=8,b<y&&(w+=D[n++]<<b,b+=8)),k+=w&(1<<y)-1,k>l){t.msg="invalid distance too far back",i.mode=Xr;break e}if(w>>>=y,b-=y,y=o-s,k>y){if(y=k-y,y>c&&i.sane){t.msg="invalid distance too far back",i.mode=Xr;break e}if(S=0,C=h,d===0){if(S+=f-y,y<T){T-=y;do E[o++]=h[S++];while(--y);S=o-k,C=E;}}else if(d<y){if(S+=f+d-y,y-=d,y<T){T-=y;do E[o++]=h[S++];while(--y);if(S=0,d<T){y=d,T-=y;do E[o++]=h[S++];while(--y);S=o-k,C=E;}}}else if(S+=d-y,y<T){T-=y;do E[o++]=h[S++];while(--y);S=o-k,C=E;}for(;T>2;)E[o++]=C[S++],E[o++]=C[S++],E[o++]=C[S++],T-=3;T&&(E[o++]=C[S++],T>1&&(E[o++]=C[S++]));}else {S=o-k;do E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],T-=3;while(T>2);T&&(E[o++]=E[S++],T>1&&(E[o++]=E[S++]));}}else if((y&64)===0){m=p[(m&65535)+(w&(1<<y)-1)];continue r}else {t.msg="invalid distance code",i.mode=Xr;break e}break}}else if((y&64)===0){m=_[(m&65535)+(w&(1<<y)-1)];continue t}else if(y&32){i.mode=Uc;break e}else {t.msg="invalid literal/length code",i.mode=Xr;break e}break}}while(n<a&&o<u);T=b>>3,n-=T,b-=T<<3,w&=(1<<b)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<u?257+(u-o):257-(o-u),i.hold=w,i.bits=b;};});var rl=v((_m,tl)=>{var Ys=Se(),Et=15,Ks=852,Gs=592,Qs=0,jn=1,el=2,Hc=[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],Zc=[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],Wc=[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],Jc=[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];tl.exports=function(t,r,i,n,a,o,s,u){var l=u.bits,f=0,c=0,d=0,h=0,w=0,b=0,_=0,p=0,g=0,x=0,m,y,T,k,S,C=null,D=0,E,K=new Ys.Buf16(Et+1),et=new Ys.Buf16(Et+1),hr=null,ha=0,ca,cr,pr;for(f=0;f<=Et;f++)K[f]=0;for(c=0;c<n;c++)K[r[i+c]]++;for(w=l,h=Et;h>=1&&K[h]===0;h--);if(w>h&&(w=h),h===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<h&&K[d]===0;d++);for(w<d&&(w=d),p=1,f=1;f<=Et;f++)if(p<<=1,p-=K[f],p<0)return -1;if(p>0&&(t===Qs||h!==1))return -1;for(et[1]=0,f=1;f<Et;f++)et[f+1]=et[f]+K[f];for(c=0;c<n;c++)r[i+c]!==0&&(s[et[r[i+c]]++]=c);if(t===Qs?(C=hr=s,E=19):t===jn?(C=Hc,D-=257,hr=Zc,ha-=257,E=256):(C=Wc,hr=Jc,E=-1),x=0,c=0,f=d,S=o,b=w,_=0,T=-1,g=1<<w,k=g-1,t===jn&&g>Ks||t===el&&g>Gs)return 1;for(;;){ca=f-_,s[c]<E?(cr=0,pr=s[c]):s[c]>E?(cr=hr[ha+s[c]],pr=C[D+s[c]]):(cr=96,pr=0),m=1<<f-_,y=1<<b,d=y;do y-=m,a[S+(x>>_)+y]=ca<<24|cr<<16|pr|0;while(y!==0);for(m=1<<f-1;x&m;)m>>=1;if(m!==0?(x&=m-1,x+=m):x=0,c++,--K[f]===0){if(f===h)break;f=r[i+s[c]];}if(f>w&&(x&k)!==T){for(_===0&&(_=w),S+=d,b=f-_,p=1<<b;b+_<h&&(p-=K[b+_],!(p<=0));)b++,p<<=1;if(g+=1<<b,t===jn&&g>Ks||t===el&&g>Gs)return 1;T=x&k,a[T]=w<<24|b<<16|S-o|0;}}return x!==0&&(a[S+x]=f-_<<24|64<<16|0),u.bits=w,0};});var Nl=v(se=>{var ee=Se(),qn=En(),me=Sn(),$c=Xs(),or=rl(),Vc=0,Al=1,Rl=2,il=4,Xc=5,Yr=6,Ye=0,Yc=1,Kc=2,ie=-2,Ll=-3,Un=-4,Gc=-5,nl=8,Ol=1,al=2,ol=3,sl=4,ll=5,fl=6,ul=7,dl=8,hl=9,cl=10,Qr=11,Ce=12,Mn=13,pl=14,Nn=15,gl=16,ml=17,vl=18,bl=19,Kr=20,Gr=21,_l=22,yl=23,wl=24,xl=25,El=26,zn=27,Sl=28,kl=29,F=30,Hn=31,Qc=32,ep=852,tp=592,rp=15,ip=rp;function Tl(e){return (e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function np(){this.mode=0,this.last=false,this.wrap=0,this.havedict=false,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 ee.Buf16(320),this.work=new ee.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function Dl(e){var t;return !e||!e.state?ie:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ol,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ee.Buf32(ep),t.distcode=t.distdyn=new ee.Buf32(tp),t.sane=1,t.back=-1,Ye)}function Il(e){var t;return !e||!e.state?ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Dl(e))}function Fl(e,t){var r,i;return !e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?ie:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Il(e))}function jl(e,t){var r,i;return e?(i=new np,e.state=i,i.window=null,r=Fl(e,t),r!==Ye&&(e.state=null),r):ie}function ap(e){return jl(e,ip)}var Cl=true,Pn,Bn;function op(e){if(Cl){var t;for(Pn=new ee.Buf32(512),Bn=new ee.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(or(Al,e.lens,0,288,Pn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;or(Rl,e.lens,0,32,Bn,0,e.work,{bits:5}),Cl=false;}e.lencode=Pn,e.lenbits=9,e.distcode=Bn,e.distbits=5;}function Ml(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new ee.Buf8(a.wsize)),i>=a.wsize?(ee.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),ee.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(ee.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function sp(e,t){var r,i,n,a,o,s,u,l,f,c,d,h,w,b,_=0,p,g,x,m,y,T,k,S,C=new ee.Buf8(4),D,E,K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ie;r=e.state,r.mode===Ce&&(r.mode=Mn),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,c=s,d=u,S=Ye;e:for(;;)switch(r.mode){case Ol:if(r.wrap===0){r.mode=Mn;break}for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.wrap&2&&l===35615){r.check=0,C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0),l=0,f=0,r.mode=al;break}if(r.flags=0,r.head&&(r.head.done=false),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=F;break}if((l&15)!==nl){e.msg="unknown compression method",r.mode=F;break}if(l>>>=4,f-=4,k=(l&15)+8,r.wbits===0)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=F;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=l&512?cl:Ce,l=0,f=0;break;case al:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.flags=l,(r.flags&255)!==nl){e.msg="unknown compression method",r.mode=F;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=F;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0,r.mode=ol;case ol:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.head&&(r.head.time=l),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,C[2]=l>>>16&255,C[3]=l>>>24&255,r.check=me(r.check,C,4,0)),l=0,f=0,r.mode=sl;case sl:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.head&&(r.head.xflags=l&255,r.head.os=l>>8),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0,r.mode=ll;case ll:if(r.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.length=l,r.head&&(r.head.extra_len=l),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0;}else r.head&&(r.head.extra=null);r.mode=fl;case fl:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ee.arraySet(r.head.extra,i,a,h,k)),r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=ul;case ul:if(r.flags&2048){if(s===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k));while(k&&h<s);if(r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=dl;case dl:if(r.flags&4096){if(s===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k));while(k&&h<s);if(r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,k)break e}else r.head&&(r.head.comment=null);r.mode=hl;case hl:if(r.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l!==(r.check&65535)){e.msg="header crc mismatch",r.mode=F;break}l=0,f=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=true),e.adler=r.check=0,r.mode=Ce;break;case cl:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}e.adler=r.check=Tl(l),l=0,f=0,r.mode=Qr;case Qr:if(r.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,Kc;e.adler=r.check=1,r.mode=Ce;case Ce:if(t===Xc||t===Yr)break e;case Mn:if(r.last){l>>>=f&7,f-=f&7,r.mode=zn;break}for(;f<3;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}switch(r.last=l&1,l>>>=1,f-=1,l&3){case 0:r.mode=pl;break;case 1:if(op(r),r.mode=Kr,t===Yr){l>>>=2,f-=2;break e}break;case 2:r.mode=ml;break;case 3:e.msg="invalid block type",r.mode=F;}l>>>=2,f-=2;break;case pl:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",r.mode=F;break}if(r.length=l&65535,l=0,f=0,r.mode=Nn,t===Yr)break e;case Nn:r.mode=gl;case gl:if(h=r.length,h){if(h>s&&(h=s),h>u&&(h=u),h===0)break e;ee.arraySet(n,i,a,h,o),s-=h,a+=h,u-=h,o+=h,r.length-=h;break}r.mode=Ce;break;case ml:for(;f<14;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.nlen=(l&31)+257,l>>>=5,f-=5,r.ndist=(l&31)+1,l>>>=5,f-=5,r.ncode=(l&15)+4,l>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=F;break}r.have=0,r.mode=vl;case vl:for(;r.have<r.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.lens[K[r.have++]]=l&7,l>>>=3,f-=3;}for(;r.have<19;)r.lens[K[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},S=or(Vc,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,S){e.msg="invalid code lengths set",r.mode=F;break}r.have=0,r.mode=bl;case bl:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[l&(1<<r.lenbits)-1],p=_>>>24,g=_>>>16&255,x=_&65535,!(p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(x<16)l>>>=p,f-=p,r.lens[r.have++]=x;else {if(x===16){for(E=p+2;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l>>>=p,f-=p,r.have===0){e.msg="invalid bit length repeat",r.mode=F;break}k=r.lens[r.have-1],h=3+(l&3),l>>>=2,f-=2;}else if(x===17){for(E=p+3;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=p,f-=p,k=0,h=3+(l&7),l>>>=3,f-=3;}else {for(E=p+7;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=p,f-=p,k=0,h=11+(l&127),l>>>=7,f-=7;}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=F;break}for(;h--;)r.lens[r.have++]=k;}}if(r.mode===F)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=F;break}if(r.lenbits=9,D={bits:r.lenbits},S=or(Al,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,S){e.msg="invalid literal/lengths set",r.mode=F;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},S=or(Rl,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,S){e.msg="invalid distances set",r.mode=F;break}if(r.mode=Kr,t===Yr)break e;case Kr:r.mode=Gr;case Gr:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,$c(e,d),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,r.mode===Ce&&(r.back=-1);break}for(r.back=0;_=r.lencode[l&(1<<r.lenbits)-1],p=_>>>24,g=_>>>16&255,x=_&65535,!(p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(g&&(g&240)===0){for(m=p,y=g,T=x;_=r.lencode[T+((l&(1<<m+y)-1)>>m)],p=_>>>24,g=_>>>16&255,x=_&65535,!(m+p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,r.back+=m;}if(l>>>=p,f-=p,r.back+=p,r.length=x,g===0){r.mode=El;break}if(g&32){r.back=-1,r.mode=Ce;break}if(g&64){e.msg="invalid literal/length code",r.mode=F;break}r.extra=g&15,r.mode=_l;case _l:if(r.extra){for(E=r.extra;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,f-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=yl;case yl:for(;_=r.distcode[l&(1<<r.distbits)-1],p=_>>>24,g=_>>>16&255,x=_&65535,!(p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((g&240)===0){for(m=p,y=g,T=x;_=r.distcode[T+((l&(1<<m+y)-1)>>m)],p=_>>>24,g=_>>>16&255,x=_&65535,!(m+p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,r.back+=m;}if(l>>>=p,f-=p,r.back+=p,g&64){e.msg="invalid distance code",r.mode=F;break}r.offset=x,r.extra=g&15,r.mode=wl;case wl:if(r.extra){for(E=r.extra;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,f-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=F;break}r.mode=xl;case xl:if(u===0)break e;if(h=d-u,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=F;break}h>r.wnext?(h-=r.wnext,w=r.wsize-h):w=r.wnext-h,h>r.length&&(h=r.length),b=r.window;}else b=n,w=o-r.offset,h=r.length;h>u&&(h=u),u-=h,r.length-=h;do n[o++]=b[w++];while(--h);r.length===0&&(r.mode=Gr);break;case El:if(u===0)break e;n[o++]=r.length,u--,r.mode=Gr;break;case zn:if(r.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[a++]<<f,f+=8;}if(d-=u,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?me(r.check,n,d,o-d):qn(r.check,n,d,o-d)),d=u,(r.flags?l:Tl(l))!==r.check){e.msg="incorrect data check",r.mode=F;break}l=0,f=0;}r.mode=Sl;case Sl:if(r.wrap&&r.flags){for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=F;break}l=0,f=0;}r.mode=kl;case kl:S=Yc;break e;case F:S=Ll;break e;case Hn:return Un;case Qc:default:return ie}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,(r.wsize||d!==e.avail_out&&r.mode<F&&(r.mode<zn||t!==il))&&Ml(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Hn,Un):(c-=e.avail_in,d-=e.avail_out,e.total_in+=c,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?me(r.check,n,d,e.next_out-d):qn(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Ce?128:0)+(r.mode===Kr||r.mode===Nn?256:0),(c===0&&d===0||t===il)&&S===Ye&&(S=Gc),S)}function lp(e){if(!e||!e.state)return ie;var t=e.state;return t.window&&(t.window=null),e.state=null,Ye}function fp(e,t){var r;return !e||!e.state||(r=e.state,(r.wrap&2)===0)?ie:(r.head=t,t.done=false,Ye)}function up(e,t){var r=t.length,i,n,a;return !e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Qr)?ie:i.mode===Qr&&(n=1,n=qn(n,t,r,0),n!==i.check)?Ll:(a=Ml(e,t,r,r),a?(i.mode=Hn,Un):(i.havedict=1,Ye))}se.inflateReset=Il;se.inflateReset2=Fl;se.inflateResetKeep=Dl;se.inflateInit=ap;se.inflateInit2=jl;se.inflate=sp;se.inflateEnd=lp;se.inflateGetHeader=fp;se.inflateSetDictionary=up;se.inflateInfo="pako inflate (from Nodeca project)";});var Zn=v((wm,zl)=>{zl.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};});var Bl=v((xm,Pl)=>{function dp(){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=false;}Pl.exports=dp;});var Ul=v(lr=>{var St=Nl(),sr=Se(),ei=Rn(),M=Zn(),Wn=qr(),hp=Ln(),cp=Bl(),ql=Object.prototype.toString;function Ke(e){if(!(this instanceof Ke))return new Ke(e);this.options=sr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new hp,this.strm.avail_out=0;var r=St.inflateInit2(this.strm,t.windowBits);if(r!==M.Z_OK)throw new Error(Wn[r]);if(this.header=new cp,St.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ei.string2buf(t.dictionary):ql.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=St.inflateSetDictionary(this.strm,t.dictionary),r!==M.Z_OK)))throw new Error(Wn[r])}Ke.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,s,u,l,f=false;if(this.ended)return false;o=t===~~t?t:t===true?M.Z_FINISH:M.Z_NO_FLUSH,typeof e=="string"?r.input=ei.binstring2buf(e):ql.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new sr.Buf8(i),r.next_out=0,r.avail_out=i),a=St.inflate(r,M.Z_NO_FLUSH),a===M.Z_NEED_DICT&&n&&(a=St.inflateSetDictionary(this.strm,n)),a===M.Z_BUF_ERROR&&f===true&&(a=M.Z_OK,f=false),a!==M.Z_STREAM_END&&a!==M.Z_OK)return this.onEnd(a),this.ended=true,false;r.next_out&&(r.avail_out===0||a===M.Z_STREAM_END||r.avail_in===0&&(o===M.Z_FINISH||o===M.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=ei.utf8border(r.output,r.next_out),u=r.next_out-s,l=ei.buf2string(r.output,s),r.next_out=u,r.avail_out=i-u,u&&sr.arraySet(r.output,r.output,s,u,0),this.onData(l)):this.onData(sr.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=true);}while((r.avail_in>0||r.avail_out===0)&&a!==M.Z_STREAM_END);return a===M.Z_STREAM_END&&(o=M.Z_FINISH),o===M.Z_FINISH?(a=St.inflateEnd(this.strm),this.onEnd(a),this.ended=true,a===M.Z_OK):(o===M.Z_SYNC_FLUSH&&(this.onEnd(M.Z_OK),r.avail_out=0),true)};Ke.prototype.onData=function(e){this.chunks.push(e);};Ke.prototype.onEnd=function(e){e===M.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=sr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Jn(e,t){var r=new Ke(t);if(r.push(e,true),r.err)throw r.msg||Wn[r.err];return r.result}function pp(e,t){return t=t||{},t.raw=true,Jn(e,t)}lr.Inflate=Ke;lr.inflate=Jn;lr.inflateRaw=pp;lr.ungzip=Jn;});var Wl=v((Sm,Zl)=>{var gp=Se().assign,mp=$s(),vp=Ul(),bp=Zn(),Hl={};gp(Hl,mp,vp,bp);Zl.exports=Hl;});var $l=v(ri=>{var _p=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",yp=Wl(),Jl=j(),ti=Q(),wp=_p?"uint8array":"array";ri.magic="\b\0";function Ge(e,t){ti.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}Jl.inherits(Ge,ti);Ge.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Jl.transformTo(wp,e.data),false);};Ge.prototype.flush=function(){ti.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],true);};Ge.prototype.cleanUp=function(){ti.prototype.cleanUp.call(this),this._pako=null;};Ge.prototype._createPako=function(){this._pako=new yp[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta});};};ri.compressWorker=function(e){return new Ge("Deflate",e)};ri.uncompressWorker=function(){return new Ge("Inflate",{})};});var Vn=v($n=>{var Vl=Q();$n.STORE={magic:"\0\0",compressWorker:function(){return new Vl("STORE compression")},uncompressWorker:function(){return new Vl("STORE decompression")}};$n.DEFLATE=$l();});var Xn=v(Qe=>{Qe.LOCAL_FILE_HEADER="PK";Qe.CENTRAL_FILE_HEADER="PK";Qe.CENTRAL_DIRECTORY_END="PK";Qe.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Qe.ZIP64_CENTRAL_DIRECTORY_END="PK";Qe.DATA_DESCRIPTOR="PK\x07\b";});var Gl=v((Am,Kl)=>{var kt=j(),Tt=Q(),Yn=ct(),Xl=Mr(),ii=Xn(),O=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},xp=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},Ep=function(e){return (e||0)&63},Yl=function(e,t,r,i,n,a){var o=e.file,s=e.compression,u=a!==Yn.utf8encode,l=kt.transformTo("string",a(o.name)),f=kt.transformTo("string",Yn.utf8encode(o.name)),c=o.comment,d=kt.transformTo("string",a(c)),h=kt.transformTo("string",Yn.utf8encode(c)),w=f.length!==o.name.length,b=h.length!==c.length,_,p,g="",x="",m="",y=o.dir,T=o.date,k={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),!u&&(w||b)&&(S|=2048);var C=0,D=0;y&&(C|=16),n==="UNIX"?(D=798,C|=xp(o.unixPermissions,y)):(D=20,C|=Ep(o.dosPermissions)),_=T.getUTCHours(),_=_<<6,_=_|T.getUTCMinutes(),_=_<<5,_=_|T.getUTCSeconds()/2,p=T.getUTCFullYear()-1980,p=p<<4,p=p|T.getUTCMonth()+1,p=p<<5,p=p|T.getUTCDate(),w&&(x=O(1,1)+O(Xl(l),4)+f,g+="up"+O(x.length,2)+x),b&&(m=O(1,1)+O(Xl(d),4)+h,g+="uc"+O(m.length,2)+m);var E="";E+=`
|
|
2
|
-
\0`,E+=O(S,2),E+=s.magic,E+=O(_,2),E+=O(p,2),E+=O(k.crc32,4),E+=O(k.compressedSize,4),E+=O(k.uncompressedSize,4),E+=O(l.length,2),E+=O(g.length,2);var K=ii.LOCAL_FILE_HEADER+E+l+g,et=ii.CENTRAL_FILE_HEADER+O(D,2)+E+O(d.length,2)+"\0\0\0\0"+O(C,4)+O(i,4)+l+g+d;return {fileRecord:K,dirRecord:et}},Sp=function(e,t,r,i,n){var a="",o=kt.transformTo("string",n(i));return a=ii.CENTRAL_DIRECTORY_END+"\0\0\0\0"+O(e,2)+O(e,2)+O(t,4)+O(r,4)+O(o.length,2)+o,a},kp=function(e){var t="";return t=ii.DATA_DESCRIPTOR+O(e.crc32,4)+O(e.compressedSize,4)+O(e.uncompressedSize,4),t};function le(e,t,r,i){Tt.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=e,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}kt.inherits(le,Tt);le.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Tt.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-i-1))/r:100}}));};le.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=Yl(e,t,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=true;};le.prototype.closedSource=function(e){this.accumulate=false;var t=this.streamFiles&&!e.file.dir,r=Yl(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:kp(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;};le.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=Sp(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}});};le.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();};le.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end();}),e.on("error",function(r){t.error(r);}),this};le.prototype.resume=function(){if(!Tt.prototype.resume.call(this))return false;if(!this.previous&&this._sources.length)return this.prepareNextSource(),true;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),true};le.prototype.error=function(e){var t=this._sources;if(!Tt.prototype.error.call(this,e))return false;for(var r=0;r<t.length;r++)try{t[r].error(e);}catch{}return true};le.prototype.lock=function(){Tt.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock();};Kl.exports=le;});var ef=v(Ql=>{var Tp=Vn(),Cp=Gl(),Ap=function(e,t){var r=e||t,i=Tp[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};Ql.generateWorker=function(e,t,r){var i=new Cp(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var s=Ap(o.options.compression,t.compression),u=o.options.compressionOptions||t.compressionOptions||{},l=o.dir,f=o.date;o._compressWorker(s,u).withStreamInfo("file",{name:a,dir:l,date:f,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(i);}),i.entriesCount=n;}catch(a){i.error(a);}return i};});var rf=v((Lm,tf)=>{var Rp=j(),ni=Q();function fr(e,t){ni.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=false,this._bindStream(t);}Rp.inherits(fr,ni);fr.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}});}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r);}).on("end",function(){t.isPaused?t._upstreamEnded=true:t.end();});};fr.prototype.pause=function(){return ni.prototype.pause.call(this)?(this._stream.pause(),true):false};fr.prototype.resume=function(){return ni.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),true):false};tf.exports=fr;});var cf=v((Om,hf)=>{var Lp=ct(),ur=j(),sf=Q(),Op=en(),lf=tn(),nf=Nr(),Dp=ns(),Ip=ef(),af=Pt(),Fp=rf(),ff=function(e,t,r){var i=ur.getTypeOf(t),n,a=ur.extend(r||{},lf);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=true),a.dosPermissions&&a.dosPermissions&16&&(a.dir=true),a.dir&&(e=uf(e)),a.createFolders&&(n=jp(e))&&df.call(this,n,true);var o=i==="string"&&a.binary===false&&a.base64===false;(!r||typeof r.binary>"u")&&(a.binary=!o);var s=t instanceof nf&&t.uncompressedSize===0;(s||a.dir||!t||t.length===0)&&(a.base64=false,a.binary=true,t="",a.compression="STORE",i="string");var u=null;t instanceof nf||t instanceof sf?u=t:af.isNode&&af.isStream(t)?u=new Fp(e,t):u=ur.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new Dp(e,u,a);this.files[e]=l;},jp=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},uf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},df=function(e,t){return t=typeof t<"u"?t:lf.createFolders,e=uf(e),this.files[e]||ff.call(this,e,null,{dir:true,createFolders:t}),this.files[e]};function of(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Mp={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,i;for(t in this.files)i=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,i);},filter:function(e){var t=[];return this.forEach(function(r,i){e(r,i)&&t.push(i);}),t},file:function(e,t,r){if(arguments.length===1)if(of(e)){var i=e;return this.filter(function(a,o){return !o.dir&&i.test(a)})}else {var n=this.files[this.root+e];return n&&!n.dir?n:null}else e=this.root+e,ff.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(of(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=df.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(n,a){return a.name.slice(0,e.length)===e}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=ur.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Lp.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");ur.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var i=r.comment||this.comment||"";t=Ip.generateWorker(this,r,i);}catch(n){t=new sf("error"),t.error(n);}return new Op(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};hf.exports=Mp;});var Kn=v((Dm,gf)=>{var Np=j();function pf(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}pf.prototype={checkOffset:function(e){this.checkIndex(this.index+e);},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e;},skip:function(e){this.setIndex(this.index+e);},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return Np.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};gf.exports=pf;});var Gn=v((Im,vf)=>{var mf=Kn(),zp=j();function Ct(e){mf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255;}zp.inherits(Ct,mf);Ct.prototype.byteAt=function(e){return this.data[this.zero+e]};Ct.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===i&&this.data[a+3]===n)return a-this.zero;return -1};Ct.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&i===a[2]&&n===a[3]};Ct.prototype.readData=function(e){if(this.checkOffset(e),e===0)return [];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};vf.exports=Ct;});var yf=v((Fm,_f)=>{var bf=Kn(),Pp=j();function At(e){bf.call(this,e);}Pp.inherits(At,bf);At.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};At.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};At.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};At.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};_f.exports=At;});var ea=v((jm,xf)=>{var wf=Gn(),Bp=j();function Qn(e){wf.call(this,e);}Bp.inherits(Qn,wf);Qn.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};xf.exports=Qn;});var kf=v((Mm,Sf)=>{var Ef=ea(),qp=j();function ta(e){Ef.call(this,e);}qp.inherits(ta,Ef);ta.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Sf.exports=ta;});var ra=v((Nm,Cf)=>{var ai=j(),Tf=xe(),Up=Gn(),Hp=yf(),Zp=kf(),Wp=ea();Cf.exports=function(e){var t=ai.getTypeOf(e);return ai.checkSupport(t),t==="string"&&!Tf.uint8array?new Hp(e):t==="nodebuffer"?new Zp(e):Tf.uint8array?new Wp(ai.transformTo("uint8array",e)):new Up(ai.transformTo("array",e))};});var Of=v((zm,Lf)=>{var ia=ra(),Pe=j(),Jp=Nr(),Af=Mr(),oi=ct(),si=Vn(),$p=xe(),Vp=0,Xp=3,Yp=function(e){for(var t in si)if(Object.prototype.hasOwnProperty.call(si,t)&&si[t].magic===e)return si[t];return null};function Rf(e,t){this.options=e,this.loadOptions=t;}Rf.prototype={isEncrypted:function(){return (this.bitFlag&1)===1},useUTF8:function(){return (this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),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(t=Yp(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+Pe.pretty(this.compressionMethod)+" unknown (inner file : "+Pe.transformTo("string",this.fileName)+")");this.decompressed=new Jp(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize));},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===Vp&&(this.dosPermissions=this.externalFileAttributes&63),e===Xp&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=ia(this.extraFields[1].value);this.uncompressedSize===Pe.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===Pe.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===Pe.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===Pe.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,i,n;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),i=e.readInt(2),n=e.readData(i),this.extraFields[r]={id:r,length:i,value:n};e.setIndex(t);},handleUTF8:function(){var e=$p.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=oi.utf8decode(this.fileName),this.fileCommentStr=oi.utf8decode(this.fileComment);else {var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else {var r=Pe.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else {var n=Pe.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n);}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=ia(e.value);return t.readInt(1)!==1||Af(this.fileName)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=ia(e.value);return t.readInt(1)!==1||Af(this.fileComment)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null}};Lf.exports=Rf;});var Ff=v((Pm,If)=>{var Kp=ra(),Ae=j(),fe=Xn(),Gp=Of(),Qp=xe();function Df(e){this.files=[],this.loadOptions=e;}Df.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Ae.pretty(t)+", expected "+Ae.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4),n=i===t;return this.reader.setIndex(r),n},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 e=this.reader.readData(this.zipCommentLength),t=Qp.uint8array?"uint8array":"array",r=Ae.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r);},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 e=this.zip64EndOfCentralSize-44,t=0,r,i,n;t<e;)r=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[r]={id:r,length:i,value:n};},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(fe.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes();},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(fe.CENTRAL_FILE_HEADER);)e=new Gp({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);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 e=this.reader.lastIndexOfSignature(fe.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,fe.LOCAL_FILE_HEADER);throw t?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"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(fe.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Ae.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Ae.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Ae.MAX_VALUE_16BITS||this.centralDirRecords===Ae.MAX_VALUE_16BITS||this.centralDirSize===Ae.MAX_VALUE_32BITS||this.centralDirOffset===Ae.MAX_VALUE_32BITS){if(this.zip64=true,e=this.reader.lastIndexOfSignature(fe.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(fe.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,fe.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(fe.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(fe.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=r-i;if(n>0)this.isSignature(r,fe.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=Kp(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}};If.exports=Df;});var Nf=v((Bm,Mf)=>{var na=j(),li=ut(),eg=ct(),tg=Ff(),rg=an(),jf=Pt();function ig(e){return new li.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new rg);i.on("error",function(n){r(n);}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t();}).resume();})}Mf.exports=function(e,t){var r=this;return t=na.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:eg.utf8decode}),jf.isNode&&jf.isStream(e)?li.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):na.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then(function(i){var n=new tg(t);return n.load(i),n}).then(function(n){var a=[li.Promise.resolve(n)],o=n.files;if(t.checkCRC32)for(var s=0;s<o.length;s++)a.push(ig(o[s]));return li.Promise.all(a)}).then(function(n){for(var a=n.shift(),o=a.files,s=0;s<o.length;s++){var u=o[s],l=u.fileNameStr,f=na.resolve(u.fileNameStr);r.file(f,u.decompressed,{binary:true,optimizedBinaryString:true,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:t.createFolders}),u.dir||(r.file(f).unsafeOriginalName=l);}return a.zipComment.length&&(r.comment=a.zipComment),r})};});var Pf=v((qm,zf)=>{function ne(){if(!(this instanceof ne))return new ne;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 e=new ne;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e};}ne.prototype=cf();ne.prototype.loadAsync=Nf();ne.support=xe();ne.defaults=tn();ne.version="3.10.1";ne.loadAsync=function(e,t){return new ne().loadAsync(e,t)};ne.external=ut();zf.exports=ne;});var qf={};Gf(qf,{unpackJdfxToDocument:()=>ag});function ng(e){return !e||typeof e!="string"||e.startsWith("/")||e.includes("\\")||e.includes("..")?false:e.startsWith(`${ya}/`)}async function ag(e){let t=await Bf.default.loadAsync(e),r=t.file(hi);if(!r)throw new Error(`${hi} missing from .jdfx bundle`);let i=JSON.parse(await r.async("string")),n=t.file(_a),a=null;if(n)try{a=JSON.parse(await n.async("string"));}catch{a=null;}let o=new Map;if(a?.assets)for(let u of a.assets){if(!ng(u.path)){console.warn(`[jdfjs] dropping unsafe manifest asset path: ${u.path}`);continue}let l=t.file(u.path);if(!l)continue;let f=await l.async("uint8array"),c=new Blob([f],{type:u.mimeType});o.set(u.id,URL.createObjectURL(c));}function s(u){if(u)for(let l of u){if(l?.type==="image"&&l.resource){let f=o.get(l.resource);f&&(l.src=f);}l?.elements&&s(l.elements),l?.children&&s(l.children);}}for(let u of i.pages||[])s(u.elements);return i}var Bf,Uf=Rt(()=>{Bf=eu(Pf());gr();});gr();gr();function xa(e){if(typeof e=="number")return `${e}px`;if(typeof e=="string")return e;let{top:t=0,right:r=0,bottom:i=0,left:n=0}=e;return `${t}px ${r}px ${i}px ${n}px`}function Z(e){let t={};if(e.fontFamily&&(t["font-family"]=e.fontFamily),e.fontSize&&(t["font-size"]=`${e.fontSize*1.333}px`),e.fontWeight&&(t["font-weight"]=String(e.fontWeight)),e.fontStyle&&(t["font-style"]=e.fontStyle),e.color&&(t.color=e.color),e.backgroundColor&&(t["background-color"]=e.backgroundColor),e.textAlign&&(t["text-align"]=e.textAlign),e.textDecoration){let r=e.textDecoration==="strikethrough"?"line-through":e.textDecoration;t["text-decoration"]=r;}return e.lineHeight&&(t["line-height"]=String(e.lineHeight)),e.letterSpacing!=null&&(t["letter-spacing"]=typeof e.letterSpacing=="number"?`${e.letterSpacing}px`:e.letterSpacing),e.padding!=null&&(t.padding=xa(e.padding)),e.margin!=null&&(t.margin=xa(e.margin)),e.marginTop!=null&&(t["margin-top"]=`${e.marginTop}px`),e.marginBottom!=null&&(t["margin-bottom"]=`${e.marginBottom}px`),e.border&&(t.border=e.border),e.borderRadius!=null&&(t["border-radius"]=typeof e.borderRadius=="number"?`${e.borderRadius}px`:e.borderRadius),e.opacity!=null&&(t.opacity=String(e.opacity)),t}function $(e,t){if(!e)return {};if(typeof e=="string")return Z(t[e]||{});if(Array.isArray(e)){let r={};for(let i of e)r={...r,...t[i]||{}};return Z(r)}return Z(e)}function q(e,t){for(let[r,i]of Object.entries(t))e.style.setProperty(r,i);}function ci(e){if(!e)return null;let t=typeof e=="string"?e:e.target;if(typeof e=="string"?e.startsWith("#"):e.type==="internal"){let i=t.replace(/^#/,"").match(/^page-(\d+)$/i);return i?{href:t,internal:true,pageIndex:Number(i[1])-1}:{href:t,internal:true}}return {href:t,internal:false}}function pi(e,t,r){e.href=t.href,t.internal?e.addEventListener("click",i=>{i.preventDefault(),t.pageIndex!=null&&r&&r(t.pageIndex);}):(e.target="_blank",e.rel="noopener noreferrer");}var tt="http://www.w3.org/2000/svg";function mr(e,t){let r=document.createElement("div");nu(r,e);let i=null;switch(e.type){case "text":i=au(e,t);break;case "richtext":i=su(e,t);break;case "image":i=hu(e,t);break;case "table":i=gu(e,t);break;case "list":i=mu(e,t);break;case "shape":i=vu(e);break;case "collapsible":i=bu(e,t);break;case "toc":i=_u(e,t);break;case "input":i=yu(e,t);break;case "textarea":i=wu(e,t);break;case "checkbox":i=xu(e,t);break;case "select":i=Eu(e,t);break;case "signature":i=Su(e,t);break}return i?(r.appendChild(i),r):null}function nu(e,t){let r=t;r.position&&(e.style.position="absolute",r.position.x!=null&&(e.style.left=`${N(r.position.x)}px`),r.position.y!=null&&(e.style.top=`${N(r.position.y)}px`)),r.width!=null&&(e.style.width=`${N(r.width)}px`),r.height!=null&&(e.style.height=`${N(r.height)}px`);}function au(e,t){let r=ou(e.heading),i=document.createElement(r);i.className="jdfjs-text",i.style.margin="0",i.style.whiteSpace="pre-wrap",q(i,$(e.style,t.styles)),e.align&&(i.style.textAlign=e.align);let n=ci(e.link);if(n){let a=document.createElement("a");pi(a,n,t.onNavigatePage),a.className="jdfjs-link",a.textContent=e.content||"",i.appendChild(a);}else i.textContent=e.content||"";return i}function ou(e){return e===true?"h1":typeof e=="number"&&e>=1&&e<=6?"h"+e:"p"}function su(e,t){let r=document.createElement("p");r.className="jdfjs-richtext",r.style.margin="0",q(r,$(e.style,t.styles));for(let i of e.runs||[])r.appendChild(fu(i,t));return r}function lu(e,t){let r={};if(e.style)if(typeof e.style=="string")Object.assign(r,Z(t[e.style]||{}));else if(Array.isArray(e.style))for(let n of e.style)Object.assign(r,Z(t[n]||{}));else Object.assign(r,Z(e.style));e.bold&&(r["font-weight"]="bold"),e.italic&&(r["font-style"]="italic");let i=[];return e.underline&&i.push("underline"),e.strikethrough&&i.push("line-through"),i.length&&(r["text-decoration"]=i.join(" ")),e.color&&(r.color=e.color),e.fontSize&&(r["font-size"]=`${e.fontSize*1.333}px`),e.fontFamily&&(r["font-family"]=e.fontFamily),r}function fu(e,t){let r=ci(e.link),i=r?document.createElement("a"):document.createElement("span");return r&&(pi(i,r,t.onNavigatePage),i.classList.add("jdfjs-link")),q(i,lu(e,t.styles)),i.textContent=e.text,i}function uu(e,t){if(!e)return;let r=e[t];if(r&&typeof r=="object"&&"data"in r)return r;let i=e.images?.[t];if(i)return i}function du(e,t){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let r=uu(t,e.resource);if(r?.data){let i=r.mimeType||"image/png";return r.data.startsWith("data:")?r.data:`data:${i};base64,${r.data}`}if(r?.path)return r.path}return e.src||""}function hu(e,t){let r=document.createElement("div");r.className="jdfjs-image",r.style.width="100%",r.style.height="100%";let i=document.createElement("img");switch(i.src=du(e,t.resources),i.alt=e.alt||"",i.style.display="block",i.style.width="100%",i.style.height="100%",e.fit){case "cover":i.style.objectFit="cover";break;case "fill":i.style.objectFit="fill";break;case "none":i.style.objectFit="none";break;default:i.style.objectFit="contain";}return q(i,$(e.style,t.styles)),r.appendChild(i),r}function cu(e){return typeof e=="string"?e:e.content}function pu(e){return typeof e=="string"?{}:{colspan:e.colspan,rowspan:e.rowspan}}function gu(e,t){let r=document.createElement("div");r.className="jdfjs-table-wrap",q(r,$(e.style,t.styles)),r.style.overflowX="auto";let i=(()=>{let c=e.headerStyle;if(!c)return {};if(typeof c=="string")return Z(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...Z(t.styles[h]||{})};return d}return Z(c)})(),n=(()=>{let c=e.rowStyle;if(!c)return {};if(typeof c=="string")return Z(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...Z(t.styles[h]||{})};return d}return Z(c)})(),a=(()=>{let c=e.alternateRowStyle;if(!c){let d=e.alternatingRowColor;return d?{"background-color":d}:{}}if(typeof c=="string")return Z(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...Z(t.styles[h]||{})};return d}return Z(c)})(),o=(()=>{let c=e.borders;return c===false?{outer:false,inner:false}:c===true||c===void 0?{outer:true,inner:true,color:"#e2e8f0",width:1}:{outer:true,inner:true,color:"#e2e8f0",width:1,...c}})(),s=e.headers??e.columns?.map(c=>c.header||"").filter(c=>c!==""),u=c=>e.columns?.[c]?.align,l=document.createElement("table");if(l.style.width="100%",l.style.borderCollapse="collapse",l.style.fontSize="14px",o.outer&&(l.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),s&&s.length>0){let c=document.createElement("thead"),d=document.createElement("tr");q(d,i),s.forEach((h,w)=>{let b=document.createElement("th");b.textContent=h,b.style.padding="8px 12px",b.style.fontWeight="600",b.style.background="#f8fafc",b.style.textAlign=u(w)||"left",o.inner&&(b.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),d.appendChild(b);}),c.appendChild(d),l.appendChild(c);}let f=document.createElement("tbody");return e.rows.forEach((c,d)=>{let h=document.createElement("tr");q(h,n),d%2===1&&q(h,a),c.forEach((w,b)=>{let _=document.createElement("td");_.textContent=cu(w);let p=pu(w);p.colspan&&(_.colSpan=p.colspan),p.rowspan&&(_.rowSpan=p.rowspan),_.style.padding="8px 12px",_.style.verticalAlign="top",_.style.textAlign=u(b)||"left",o.inner&&(_.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),h.appendChild(_);}),f.appendChild(h);}),l.appendChild(f),r.appendChild(l),r}function mu(e,t){let r=document.createElement("div");r.className="jdfjs-list-wrap",q(r,$(e.style,t.styles));let i=e.listType??(e.ordered?"ordered":"unordered"),n=Ea(i);return Sa(n,e.items||[],i),r.appendChild(n),r}function Ea(e){let t=document.createElement(e==="ordered"?"ol":"ul");return t.style.margin="0",t.style.paddingLeft="20px",t.style.listStyle=e==="ordered"?"decimal":"disc",t}function Sa(e,t,r,i){for(let n of t){let a=document.createElement("li");if(a.style.fontSize="14px",a.style.lineHeight="1.6",a.appendChild(document.createTextNode(n.content)),n.children?.length){let o=n.listType||r,s=Ea(o);s.style.marginTop="4px",Sa(s,n.children,o),a.appendChild(s);}e.appendChild(a);}}function vu(e){let t=document.createElement("div");t.className="jdfjs-shape",t.style.width="100%",t.style.height="100%";let r=e.width??100,i=e.height??100,n=e.fill??"none",a=(()=>{let l=e.stroke;return typeof l=="string"?l:l?.color?l.color:"none"})(),o=(()=>{let l=e.stroke;return typeof l=="object"&&l?.width!=null?l.width:e.strokeWidth??0})(),s=document.createElementNS(tt,"svg");s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("viewBox",`0 0 ${r} ${i}`),s.setAttribute("preserveAspectRatio","none"),s.style.display="block",s.style.overflow="visible";let u=null;switch(e.shape){case "rect":{let l=document.createElementNS(tt,"rect");l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(r)),l.setAttribute("height",String(i)),e.borderRadius&&l.setAttribute("rx",String(e.borderRadius)),u=l;break}case "circle":{let l=document.createElementNS(tt,"circle");l.setAttribute("cx",String(r/2)),l.setAttribute("cy",String(i/2)),l.setAttribute("r",String(Math.min(r,i)/2)),u=l;break}case "ellipse":{let l=document.createElementNS(tt,"ellipse");l.setAttribute("cx",String(r/2)),l.setAttribute("cy",String(i/2)),l.setAttribute("rx",String(r/2)),l.setAttribute("ry",String(i/2)),u=l;break}case "line":{let l=document.createElementNS(tt,"line");return l.setAttribute("x1","0"),l.setAttribute("y1","0"),l.setAttribute("x2",String(r)),l.setAttribute("y2",String(i)),l.setAttribute("stroke",a==="none"?n!=="none"?n:"currentColor":a),l.setAttribute("stroke-width",String(o||.3)),s.appendChild(l),t.appendChild(s),t}case "path":{let l=document.createElementNS(tt,"path");l.setAttribute("d",e.path||""),l.setAttribute("fill-rule","evenodd"),u=l;break}}return u&&(u.setAttribute("fill",n),u.setAttribute("stroke",a),o&&u.setAttribute("stroke-width",String(o)),s.appendChild(u)),t.appendChild(s),t}function bu(e,t){let r=document.createElement("div");r.className="jdfjs-collapsible",q(r,$(e.style,t.styles)),r.style.border="1px solid #e2e8f0",r.style.borderRadius="8px",r.style.overflow="hidden",r.style.background="#ffffff";let i=document.createElement("button");i.type="button",i.className="jdfjs-collapsible-header",i.style.width="100%",i.style.display="flex",i.style.alignItems="center",i.style.gap="8px",i.style.padding="10px 16px",i.style.fontSize="14px",i.style.fontWeight="500",i.style.background="#f8fafc",i.style.border="0",i.style.cursor="pointer",i.style.textAlign="left";let n=document.createElement("span");n.textContent="\u25B6",n.style.fontSize="10px",n.style.transition="transform 0.15s ease";let a=document.createElement("span");a.textContent=e.title||"Section",a.style.flex="1",i.appendChild(n),i.appendChild(a),r.appendChild(i);let o=document.createElement("div");o.className="jdfjs-collapsible-body",o.style.padding="12px 16px",o.style.position="relative";let s=e.expanded??false,u=()=>{o.style.display=s?"block":"none",n.style.transform=s?"rotate(90deg)":"rotate(0deg)";};u(),i.addEventListener("click",()=>{s=!s,u();});for(let l of e.elements||[]){let f=mr(l,{...t,path:[...t.path,"elements"]});f&&o.appendChild(f);}return r.appendChild(o),r}function _u(e,t){let r=document.createElement("div");r.className="jdfjs-toc",q(r,$(e.style,t.styles));let i=e.depth??6,n=[];t.document.pages.forEach((a,o)=>{for(let s of a.elements){if(s.type!=="text")continue;let u=s,l=u.tocEntry||(u.heading?u.content:null);if(!l)continue;let f=typeof u.tocLevel=="number"?u.tocLevel:typeof u.heading=="number"?u.heading:1;f>i||n.push({title:l,pageIndex:o,level:f});}});for(let a of n){let o=document.createElement("button");o.type="button",o.className="jdfjs-toc-entry",o.style.display="flex",o.style.alignItems="baseline",o.style.gap="8px",o.style.width="100%",o.style.background="transparent",o.style.border="0",o.style.borderBottom="1px dotted #e2e8f0",o.style.padding=`6px 8px 6px ${(a.level-1)*16+8}px`,o.style.cursor="pointer",o.style.fontSize="14px",o.style.color="#334155",o.style.textAlign="left";let s=document.createElement("span");s.textContent=a.title,s.style.flex="1";let u=document.createElement("span");u.style.flex="1",u.style.borderBottom="1px dotted #cbd5e1",u.style.alignSelf="end",u.style.marginBottom="4px";let l=document.createElement("span");l.textContent=String(a.pageIndex+1),l.style.fontFamily="JetBrains Mono, monospace",l.style.fontSize="12px",l.style.color="#94a3b8",l.style.flexShrink="0",o.appendChild(s),o.appendChild(u),o.appendChild(l),o.addEventListener("click",()=>t.onNavigatePage?.(a.pageIndex)),r.appendChild(o);}return r}function vr(e){if(!e)return null;let t=document.createElement("label");return t.className="jdfjs-form-label",t.textContent=e,t}function be(e,t,r){e.onFormChange&&e.onFormChange(e.path,t,r);}function yu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-input",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("input");return n.className="jdfjs-form-control",n.type=e.inputType||"text",n.name=e.name,e.value!=null&&(n.value=e.value),e.placeholder&&(n.placeholder=e.placeholder),e.readonly&&(n.readOnly=true),e.required&&(n.required=true),e.pattern&&(n.pattern=e.pattern),n.addEventListener("input",()=>be(t,"value",n.value)),n.addEventListener("change",()=>be(t,"value",n.value)),r.appendChild(n),r}function wu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-textarea",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("textarea");return n.className="jdfjs-form-control",n.name=e.name,e.value!=null&&(n.value=e.value),e.placeholder&&(n.placeholder=e.placeholder),e.readonly&&(n.readOnly=true),e.required&&(n.required=true),e.rows&&(n.rows=e.rows),n.addEventListener("input",()=>be(t,"value",n.value)),n.addEventListener("change",()=>be(t,"value",n.value)),r.appendChild(n),r}function xu(e,t){let r=document.createElement("label");r.className="jdfjs-form-field jdfjs-form-checkbox",q(r,$(e.style,t.styles));let i=document.createElement("input");if(i.type="checkbox",i.name=e.name,i.checked=e.checked===true,e.readonly&&(i.disabled=true),e.required&&(i.required=true),i.addEventListener("change",()=>be(t,"checked",i.checked)),r.appendChild(i),e.label){let n=document.createElement("span");n.className="jdfjs-form-checkbox-label",n.textContent=e.label,r.appendChild(n);}return r}function Eu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-select",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("select");n.className="jdfjs-form-control",n.name=e.name,e.multiple&&(n.multiple=true),e.readonly&&(n.disabled=true),e.required&&(n.required=true);let a=new Set(e.multiple?e.values||[]:e.value!=null?[e.value]:[]);for(let o of e.options){let s=document.createElement("option");s.value=o.value,s.textContent=o.label??o.value,a.has(o.value)&&(s.selected=true),n.appendChild(s);}return n.addEventListener("change",()=>{if(e.multiple){let o=Array.from(n.selectedOptions).map(s=>s.value);be(t,"values",o);}else be(t,"value",n.value);}),r.appendChild(n),r}function Su(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-signature",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=N(e.width??80),a=N(e.height??30),o=document.createElement("canvas");if(o.className="jdfjs-form-signature-canvas",o.width=Math.max(50,n),o.height=Math.max(20,a),e.value){let d=new Image;d.onload=()=>{o.getContext("2d")?.drawImage(d,0,0,o.width,o.height);},d.src=e.value;}let s=false,u=null;function l(d){e.readonly||(s=true,u={x:d.offsetX,y:d.offsetY});}function f(d){if(!s||!u)return;let h=o.getContext("2d");h&&(h.strokeStyle="#0f172a",h.lineWidth=1.6,h.lineCap="round",h.beginPath(),h.moveTo(u.x,u.y),h.lineTo(d.offsetX,d.offsetY),h.stroke(),u={x:d.offsetX,y:d.offsetY});}function c(){if(s){s=false,u=null;try{be(t,"value",o.toDataURL("image/png"));}catch{}}}if(o.addEventListener("pointerdown",l),o.addEventListener("pointermove",f),o.addEventListener("pointerup",c),o.addEventListener("pointerleave",c),r.appendChild(o),!e.readonly){let d=document.createElement("button");d.type="button",d.className="jdfjs-form-signature-clear",d.textContent="Clear",d.addEventListener("click",h=>{h.preventDefault(),o.getContext("2d")?.clearRect(0,0,o.width,o.height),be(t,"value","");}),r.appendChild(d);}return r}function ka(e,t){return e.replace(/\{\{pageNumber\}\}/g,String(t.pageNumber)).replace(/\{\{totalPages\}\}/g,String(t.totalPages)).replace(/\{\{title\}\}/g,t.title).replace(/\{\{author\}\}/g,t.author)}var dr=new WeakMap;async function aa(e,t,r={}){let i=Zf(e),n=dr.get(i);n&&n.abort();let a=new AbortController;dr.set(i,a),i.classList.add("jdfjs-loading");try{let o=/\.jdfx(\?|#|$)/i.test(t),s=await fetch(t,{signal:a.signal,headers:o?{Accept:"application/jdf+zip,application/zip"}:{Accept:"application/json,application/jdf+json,application/jdf+zip,application/zip"}});if(!s.ok)throw new Error(`Failed to fetch ${t} (${s.status})`);let u=(s.headers.get("content-type")||"").toLowerCase(),l=u.includes("zip")||u.includes("jdf+zip"),f;if(o||l){let{unpackJdfxToDocument:c}=await Promise.resolve().then(()=>(Uf(),qf));f=await c(await s.arrayBuffer());}else f=await s.json();if(!f?.$jdf)throw new Error("Not a valid JDF document (missing $jdf field)");if(dr.get(i)!==a)throw new DOMException("Superseded by a newer src change","AbortError");return i.classList.remove("jdfjs-loading"),Hf(i,f,r)}catch(o){throw i.classList.remove("jdfjs-loading"),o.name==="AbortError"||(i.classList.add("jdfjs-error"),i.innerHTML=`<div class="jdfjs-error-msg">${og(o.message)}</div>`,r.onError?.(o)),o}}function Hf(e,t,r={}){let i=Zf(e);return new fi(i,t,r).getInstance()}var fi=class{constructor(t,r,i={}){this.resizeObs=null;this.toolbarEl=null;this.sidebarEl=null;this.observer=null;this.darkModeMql=null;this.darkModeListener=null;this.windowResizeListener=null;this.container=t,this.doc=r,this.options={zoom:i.zoom??1,sidebar:i.sidebar??false,toolbar:i.toolbar??true,darkMode:i.darkMode??"auto",initialPage:i.initialPage??0,fit:i.fit??"manual",...i},this.zoom=this.options.zoom,this.currentPage=this.options.initialPage,this.applyContainerSize(),this.mount(),queueMicrotask(()=>this.options.onLoad?.(this.doc));}applyContainerSize(){let t=this.options.width,r=this.options.height;t!=null&&(this.container.style.width=typeof t=="number"?`${t}px`:t),r!=null&&(this.container.style.height=typeof r=="number"?`${r}px`:r);}mount(){this.container.innerHTML="",this.container.classList.add("jdfjs"),this.applyDarkMode(),this.root=document.createElement("div"),this.root.className="jdfjs-root",this.options.toolbar&&(this.toolbarEl=this.buildToolbar(),this.root.appendChild(this.toolbarEl));let t=document.createElement("div");t.className="jdfjs-body",this.options.sidebar&&(this.sidebarEl=this.buildSidebar(),t.appendChild(this.sidebarEl)),this.pagesEl=document.createElement("div"),this.pagesEl.className="jdfjs-pages",t.appendChild(this.pagesEl),this.root.appendChild(t),this.container.appendChild(this.root),this.renderAllPages(),this.setupScrollObserver(),this.setupResizeObserver(),this.applyFit(),this.currentPage>0&&this.scrollToPage(this.currentPage);}setupResizeObserver(){typeof ResizeObserver<"u"&&(this.resizeObs?.disconnect(),this.resizeObs=new ResizeObserver(()=>this.applyFit()),this.resizeObs.observe(this.pagesEl),this.resizeObs.observe(this.container)),this.windowResizeListener==null&&typeof window<"u"&&(this.windowResizeListener=()=>this.applyFit(),window.addEventListener("resize",this.windowResizeListener));}applyDarkMode(){this.darkModeMql&&this.darkModeListener&&(this.darkModeMql.removeEventListener("change",this.darkModeListener),this.darkModeMql=null,this.darkModeListener=null);let t=a=>{this.container.classList.toggle("jdfjs-dark",a);},r=this.options.darkMode;if(r==="dark"){t(true);return}if(r==="light"){t(false);return}if(typeof window>"u"||!window.matchMedia){t(false);return}let i=window.matchMedia("(prefers-color-scheme: dark)");t(i.matches);let n=a=>t(a.matches);i.addEventListener("change",n),this.darkModeMql=i,this.darkModeListener=n;}applyFit(){if(this.options.fit==="manual")return;let t=this.pagesEl.querySelector(".jdfjs-page");if(!t)return;let r=parseFloat(t.style.width||"0"),i=parseFloat(t.style.minHeight||"0");if(!r||!i)return;let n=this.pagesEl.clientWidth-32,a=this.pagesEl.clientHeight-32;this.options.fit==="fit-width"?this.zoom=Math.max(.25,Math.min(3,n/r)):this.options.fit==="fit-page"&&(this.zoom=Math.max(.25,Math.min(3,Math.min(n/r,a/i)))),this.applyZoom(),this.updateIndicators();}buildToolbar(){let t=document.createElement("div");return t.className="jdfjs-toolbar",t.innerHTML=`
|
|
1
|
+
'use strict';var $f=Object.create;var di=Object.defineProperty;var Vf=Object.getOwnPropertyDescriptor;var Xf=Object.getOwnPropertyNames;var Yf=Object.getPrototypeOf,Kf=Object.prototype.hasOwnProperty;var ve=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Rt=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gf=(e,t)=>{for(var r in t)di(e,r,{get:t[r],enumerable:true});},Qf=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Xf(t))!Kf.call(e,n)&&n!==r&&di(e,n,{get:()=>t[n],enumerable:!(i=Vf(t,n))||i.enumerable});return e};var eu=(e,t,r)=>(r=e!=null?$f(Yf(e)):{},Qf(di(r,"default",{value:e,enumerable:true}),e));var pa=Rt(()=>{});function M(e,t="mm"){switch(t){case "mm":return e*ga;case "in":return e*ru;case "pt":return e*iu;case "px":return e;default:return e*ga}}function va(e,t="portrait"){let r=typeof e=="string"?tu[e]:e;return t==="landscape"?{width:r.height,height:r.width}:{...r}}var tu,ma,ga,ru,iu,ba=Rt(()=>{tu={A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6},Tabloid:{width:279.4,height:431.8}},ma={top:25,right:20,bottom:25,left:20},ga=3.7795275591,ru=96,iu=1.3333333333;});var hi,ya,_a,wa=Rt(()=>{hi="document.json",ya="manifest.json",_a="assets";});var gr=Rt(()=>{pa();ba();wa();});var Lt=b((Lg,gi)=>{typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?gi.exports={nextTick:Au}:gi.exports=process;function Au(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,o;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t);});case 3:return process.nextTick(function(){e.call(null,t,r);});case 4:return process.nextTick(function(){e.call(null,t,r,i);});default:for(a=new Array(n-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a);})}}});var Ca=b((Og,Ta)=>{var Ru={}.toString;Ta.exports=Array.isArray||function(e){return Ru.call(e)=="[object Array]"};});var mi=b((Dg,Aa)=>{Aa.exports=ve("stream");});var Ot=b((vi,La)=>{var br=ve("buffer"),ye=br.Buffer;function Ra(e,t){for(var r in e)t[r]=e[r];}ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?La.exports=br:(Ra(br,vi),vi.Buffer=rt);function rt(e,t,r){return ye(e,t,r)}Ra(ye,rt);rt.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ye(e,t,r)};rt.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ye(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};rt.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ye(e)};rt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return br.SlowBuffer(e)};});var it=b(W=>{function Lu(e){return Array.isArray?Array.isArray(e):yr(e)==="[object Array]"}W.isArray=Lu;function Ou(e){return typeof e=="boolean"}W.isBoolean=Ou;function Du(e){return e===null}W.isNull=Du;function Fu(e){return e==null}W.isNullOrUndefined=Fu;function Iu(e){return typeof e=="number"}W.isNumber=Iu;function ju(e){return typeof e=="string"}W.isString=ju;function Mu(e){return typeof e=="symbol"}W.isSymbol=Mu;function Nu(e){return e===void 0}W.isUndefined=Nu;function zu(e){return yr(e)==="[object RegExp]"}W.isRegExp=zu;function Pu(e){return typeof e=="object"&&e!==null}W.isObject=Pu;function Bu(e){return yr(e)==="[object Date]"}W.isDate=Bu;function qu(e){return yr(e)==="[object Error]"||e instanceof Error}W.isError=qu;function Uu(e){return typeof e=="function"}W.isFunction=Uu;function Hu(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}W.isPrimitive=Hu;W.isBuffer=ve("buffer").Buffer.isBuffer;function yr(e){return Object.prototype.toString.call(e)}});var Oa=b((Ig,bi)=>{typeof Object.create=="function"?bi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}}));}:bi.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t;}};});var nt=b((jg,_i)=>{try{if(yi=ve("util"),typeof yi.inherits!="function")throw "";_i.exports=yi.inherits;}catch{_i.exports=Oa();}var yi;});var Fa=b((Mg,wi)=>{function Zu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Da=Ot().Buffer,Dt=ve("util");function Wu(e,t,r){e.copy(t,r);}wi.exports=(function(){function e(){Zu(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length;},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length;},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(r){if(this.length===0)return "";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return Da.alloc(0);for(var i=Da.allocUnsafe(r>>>0),n=this.head,a=0;n;)Wu(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Dt&&Dt.inspect&&Dt.inspect.custom&&(wi.exports.prototype[Dt.inspect.custom]=function(){var e=Dt.inspect({length:this.length});return this.constructor.name+" "+e});});var xi=b((Ng,Ia)=>{var _r=Lt();function Ju(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,_r.nextTick(wr,this,e)):_r.nextTick(wr,this,e)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=true,_r.nextTick(wr,r,a)):_r.nextTick(wr,r,a):t&&t(a);}),this)}function $u(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}function wr(e,t){e.emit("error",t);}Ia.exports={destroy:Ju,undestroy:$u};});var Ma=b((zg,ja)=>{ja.exports=ve("util").deprecate;});var Si=b((Pg,Za)=>{var Be=Lt();Za.exports=z;function za(e){var t=this;this.next=null,this.entry=null,this.finish=function(){dd(t,e);};}var Vu=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Be.nextTick,at;z.WritableState=It;var Pa=Object.create(it());Pa.inherits=nt();var Xu={deprecate:Ma()},Ba=mi(),Er=Ot().Buffer,Yu=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ku(e){return Er.from(e)}function Gu(e){return Er.isBuffer(e)||e instanceof Yu}var qa=xi();Pa.inherits(z,Ba);function Qu(){}function It(e,t){at=at||qe(),e=e||{};var r=t instanceof at;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(s){od(t,s);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.bufferedRequestCount=0,this.corkedRequestsFree=new za(this);}It.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(It.prototype,"buffer",{get:Xu.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var xr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xr=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(e){return xr.call(this,e)?true:this!==z?false:e&&e._writableState instanceof It}})):xr=function(e){return e instanceof this};function z(e){if(at=at||qe(),!xr.call(z,this)&&!(this instanceof at))return new z(e);this._writableState=new It(e,this),this.writable=true,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ba.call(this);}z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function ed(e,t){var r=new Error("write after end");e.emit("error",r),Be.nextTick(t,r);}function td(e,t,r,i){var n=true,a=false;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Be.nextTick(i,a),n=false),n}z.prototype.write=function(e,t,r){var i=this._writableState,n=false,a=!i.objectMode&&Gu(e);return a&&!Er.isBuffer(e)&&(e=Ku(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Qu),i.ended?ed(this,r):(a||td(this,i,e,r))&&(i.pendingcb++,n=id(this,i,a,e,t,r)),n};z.prototype.cork=function(){var e=this._writableState;e.corked++;};z.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ua(this,e));};z.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function rd(e,t,r){return !e.objectMode&&e.decodeStrings!==false&&typeof t=="string"&&(t=Er.from(t,r)),t}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function id(e,t,r,i,n,a){if(!r){var o=rd(t,i,n);i!==o&&(r=true,n="buffer",i=o);}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=true),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1;}else Ei(e,t,false,s,i,n,a);return u}function Ei(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=true,t.sync=true,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=false;}function nd(e,t,r,i,n){--t.pendingcb,r?(Be.nextTick(n,i),Be.nextTick(Ft,e,t),e._writableState.errorEmitted=true,e.emit("error",i)):(n(i),e._writableState.errorEmitted=true,e.emit("error",i),Ft(e,t));}function ad(e){e.writing=false,e.writecb=null,e.length-=e.writelen,e.writelen=0;}function od(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(ad(r),t)nd(e,r,i,t,n);else {var a=Ha(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Ua(e,r),i?Vu(Na,e,r,a,n):Na(e,r,a,n);}}function Na(e,t,r,i){r||sd(e,t),t.pendingcb--,i(),Ft(e,t);}function sd(e,t){t.length===0&&t.needDrain&&(t.needDrain=false,e.emit("drain"));}function Ua(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=true;r;)n[o]=r,r.isBuf||(s=false),r=r.next,o+=1;n.allBuffers=s,Ei(e,t,true,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new za(t),t.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,c=t.objectMode?1:u.length;if(Ei(e,t,false,c,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null);}t.bufferedRequest=r,t.bufferProcessing=false;}z.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"));};z.prototype._writev=null;z.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||ud(this,i,r);};function Ha(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function ld(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=true,e.emit("prefinish"),Ft(e,t);});}function fd(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=true,Be.nextTick(ld,e,t)):(t.prefinished=true,e.emit("prefinish")));}function Ft(e,t){var r=Ha(t);return r&&(fd(e,t),t.pendingcb===0&&(t.finished=true,e.emit("finish"))),r}function ud(e,t,r){t.ending=true,Ft(e,t),r&&(t.finished?Be.nextTick(r):e.once("finish",r)),t.ended=true,e.writable=false;}function dd(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next;}t.corkedRequestsFree.next=e;}Object.defineProperty(z.prototype,"destroyed",{get:function(){return this._writableState===void 0?false:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});z.prototype.destroy=qa.destroy;z.prototype._undestroy=qa.undestroy;z.prototype._destroy=function(e,t){this.end(),t(e);};});var qe=b((Bg,Va)=>{var Wa=Lt(),hd=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Va.exports=_e;var Ja=Object.create(it());Ja.inherits=nt();var $a=Ci(),Ti=Si();Ja.inherits(_e,$a);for(ki=hd(Ti.prototype),Sr=0;Sr<ki.length;Sr++)kr=ki[Sr],_e.prototype[kr]||(_e.prototype[kr]=Ti.prototype[kr]);var ki,kr,Sr;function _e(e){if(!(this instanceof _e))return new _e(e);$a.call(this,e),Ti.call(this,e),e&&e.readable===false&&(this.readable=false),e&&e.writable===false&&(this.writable=false),this.allowHalfOpen=true,e&&e.allowHalfOpen===false&&(this.allowHalfOpen=false),this.once("end",cd);}Object.defineProperty(_e.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function cd(){this.allowHalfOpen||this._writableState.ended||Wa.nextTick(pd,this);}function pd(e){e.end();}Object.defineProperty(_e.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?false:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});_e.prototype._destroy=function(e,t){this.push(null),this.end(),Wa.nextTick(t,e);};});var Li=b(Ya=>{var Ri=Ot().Buffer,Xa=Ri.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return true;default:return false}};function gd(e){if(!e)return "utf8";for(var t;;)switch(e){case "utf8":case "utf-8":return "utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return "utf16le";case "latin1":case "binary":return "latin1";case "base64":case "ascii":case "hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=true;}}function md(e){var t=gd(e);if(typeof t!="string"&&(Ri.isEncoding===Xa||!Xa(e)))throw new Error("Unknown encoding: "+e);return t||e}Ya.StringDecoder=jt;function jt(e){this.encoding=md(e);var t;switch(this.encoding){case "utf16le":this.text=xd,this.end=Ed,t=4;break;case "utf8":this.fillLast=yd,t=4;break;case "base64":this.text=Sd,this.end=kd,t=3;break;default:this.write=Td,this.end=Cd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ri.allocUnsafe(t);}jt.prototype.write=function(e){if(e.length===0)return "";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};jt.prototype.end=wd;jt.prototype.text=_d;jt.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length;};function Ai(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function vd(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Ai(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ai(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ai(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function bd(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function yd(e){var t=this.lastTotal-this.lastNeed,r=bd(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length;}function _d(e,t){var r=vd(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function wd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function xd(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Ed(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function Sd(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function kd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Td(e){return e.toString(this.encoding)}function Cd(e){return e&&e.length?this.write(e):""}});var Ci=b((Hg,lo)=>{var st=Lt();lo.exports=F;var Ad=Ca(),Mt;F.ReadableState=io;ve("events").EventEmitter;var eo=function(e,t){return e.listeners(t).length},ji=mi(),Nt=Ot().Buffer,Rd=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Ld(e){return Nt.from(e)}function Od(e){return Nt.isBuffer(e)||e instanceof Rd}var to=Object.create(it());to.inherits=nt();var Oi=ve("util"),L=void 0;Oi&&Oi.debuglog?L=Oi.debuglog("stream"):L=function(){};var Dd=Fa(),ro=xi(),ot;to.inherits(F,ji);var Di=["error","close","destroy","pause","resume"];function Fd(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Ad(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]];}function io(e,t){Mt=Mt||qe(),e=e||{};var r=t instanceof Mt;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Dd,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.destroyed=false,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,e.encoding&&(ot||(ot=Li().StringDecoder),this.decoder=new ot(e.encoding),this.encoding=e.encoding);}function F(e){if(Mt=Mt||qe(),!(this instanceof F))return new F(e);this._readableState=new io(e,this),this.readable=true,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),ji.call(this);}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState===void 0?false:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});F.prototype.destroy=ro.destroy;F.prototype._undestroy=ro.undestroy;F.prototype._destroy=function(e,t){this.push(null),t(e);};F.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=true:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Nt.from(e,t),t=""),i=true),no(this,e,t,false,i)};F.prototype.unshift=function(e){return no(this,e,null,true,false)};function no(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=false,Nd(e,a);else {var o;n||(o=Id(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Nt.prototype&&(t=Ld(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Fi(e,a,t,true):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=false,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Fi(e,a,t,false):ao(e,a)):Fi(e,a,t,false))):i||(a.reading=false);}return jd(a)}function Fi(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Tr(e)),ao(e,t);}function Id(e,t){var r;return !Od(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function jd(e){return !e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}F.prototype.isPaused=function(){return this._readableState.flowing===false};F.prototype.setEncoding=function(e){return ot||(ot=Li().StringDecoder),this._readableState.decoder=new ot(e),this._readableState.encoding=e,this};var Ka=8388608;function Md(e){return e>=Ka?e=Ka:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Ga(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Md(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=true,0))}F.prototype.read=function(e){L("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=false),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Ii(this):Tr(this),null;if(e=Ga(e,t),e===0&&t.ended)return t.length===0&&Ii(this),null;var i=t.needReadable;L("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=true,L("length less than watermark",i)),t.ended||t.reading?(i=false,L("reading or ended",i)):i&&(L("do read"),t.reading=true,t.sync=true,t.length===0&&(t.needReadable=true),this._read(t.highWaterMark),t.sync=false,t.reading||(e=Ga(r,t)));var n;return e>0?n=oo(e,t):n=null,n===null?(t.needReadable=true,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=true),r!==e&&t.ended&&Ii(this)),n!==null&&this.emit("data",n),n};function Nd(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=true,Tr(e);}}function Tr(e){var t=e._readableState;t.needReadable=false,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=true,t.sync?st.nextTick(Qa,e):Qa(e));}function Qa(e){L("emit readable"),e.emit("readable"),Mi(e);}function ao(e,t){t.readingMore||(t.readingMore=true,st.nextTick(zd,e,t));}function zd(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(L("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=false;}F.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));};F.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr,a=n?s:_;i.endEmitted?st.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(g,m){L("onunpipe"),g===r&&m&&m.hasUnpiped===false&&(m.hasUnpiped=true,f());}function s(){L("onend"),e.end();}var u=Pd(r);e.on("drain",u);var l=false;function f(){L("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",_),r.removeListener("data",d),l=true,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u();}var c=false;r.on("data",d);function d(g){L("ondata"),c=false;var m=e.write(g);m===false&&!c&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&so(i.pipes,e)!==-1)&&!l&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++,c=true),r.pause());}function h(g){L("onerror",g),_(),e.removeListener("error",h),eo(e,"error")===0&&e.emit("error",g);}Fd(e,"error",h);function p(){e.removeListener("finish",y),_();}e.once("close",p);function y(){L("onfinish"),e.removeListener("close",p),_();}e.once("finish",y);function _(){L("unpipe"),r.unpipe(e);}return e.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),e};function Pd(e){return function(){var t=e._readableState;L("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&eo(e,"data")&&(t.flowing=true,Mi(e));}}F.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=false,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=false;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:false});return this}var o=so(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};F.prototype.on=function(e,t){var r=ji.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==false&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=true,i.emittedReadable=false,i.reading?i.length&&Tr(this):st.nextTick(Bd,this));}return r};F.prototype.addListener=F.prototype.on;function Bd(e){L("readable nexttick read 0"),e.read(0);}F.prototype.resume=function(){var e=this._readableState;return e.flowing||(L("resume"),e.flowing=true,qd(this,e)),this};function qd(e,t){t.resumeScheduled||(t.resumeScheduled=true,st.nextTick(Ud,e,t));}function Ud(e,t){t.reading||(L("resume read 0"),e.read(0)),t.resumeScheduled=false,t.awaitDrain=0,e.emit("resume"),Mi(e),t.flowing&&!t.reading&&e.read(0);}F.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(L("pause"),this._readableState.flowing=false,this.emit("pause")),this};function Mi(e){var t=e._readableState;for(L("flow",t.flowing);t.flowing&&e.read()!==null;);}F.prototype.wrap=function(e){var t=this,r=this._readableState,i=false;e.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o);}t.push(null);}),e.on("data",function(o){if(L("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=true,e.pause());}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(o){return function(){return e[o].apply(e,arguments)}})(n));for(var a=0;a<Di.length;a++)e.on(Di[a],this.emit.bind(this,Di[a]));return this._read=function(o){L("wrapped _read",o),i&&(i=false,e.resume());},this};Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});F._fromList=oo;function oo(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=Hd(e,t.buffer,t.decoder),r}function Hd(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?Zd(e,t):Wd(e,t),i}function Zd(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i;}return t.length-=i,n}function Wd(e,t){var r=Nt.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,e===0){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n;}return t.length-=n,r}function Ii(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=true,st.nextTick(Jd,t,e));}function Jd(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=true,t.readable=false,t.emit("end"));}function so(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}});var Ni=b((Zg,ho)=>{ho.exports=we;var Cr=qe(),uo=Object.create(it());uo.inherits=nt();uo.inherits(we,Cr);function $d(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=false,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function we(e){if(!(this instanceof we))return new we(e);Cr.call(this,e),this._transformState={afterTransform:$d.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Vd);}function Vd(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){fo(e,t,r);}):fo(this,null,null);}we.prototype.push=function(e,t){return this._transformState.needTransform=false,Cr.prototype.push.call(this,e,t)};we.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};we.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}};we.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=true,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=true;};we.prototype._destroy=function(e,t){var r=this;Cr.prototype._destroy.call(this,e,function(i){t(i),r.emit("close");});};function fo(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var mo=b((Wg,go)=>{go.exports=zt;var co=Ni(),po=Object.create(it());po.inherits=nt();po.inherits(zt,co);function zt(e){if(!(this instanceof zt))return new zt(e);co.call(this,e);}zt.prototype._transform=function(e,t,r){r(null,e);};});var zi=b((H,Ar)=>{var ue=ve("stream");process.env.READABLE_STREAM==="disable"&&ue?(Ar.exports=ue,H=Ar.exports=ue.Readable,H.Readable=ue.Readable,H.Writable=ue.Writable,H.Duplex=ue.Duplex,H.Transform=ue.Transform,H.PassThrough=ue.PassThrough,H.Stream=ue):(H=Ar.exports=Ci(),H.Stream=ue||H,H.Readable=H,H.Writable=Si(),H.Duplex=qe(),H.Transform=Ni(),H.PassThrough=mo());});var xe=b(G=>{G.base64=true;G.array=true;G.string=true;G.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";G.nodebuffer=typeof Buffer<"u";G.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")G.blob=false;else {Pi=new ArrayBuffer(0);try{G.blob=new Blob([Pi],{type:"application/zip"}).size===0;}catch{try{vo=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Bi=new vo,Bi.append(Pi),G.blob=Bi.getBlob("application/zip").size===0;}catch{G.blob=false;}}}var Pi,vo,Bi;try{G.nodestream=!!zi().Readable;}catch{G.nodestream=false;}});var Ui=b(qi=>{var Xd=j(),Yd=xe(),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";qi.encode=function(e){for(var t=[],r,i,n,a,o,s,u,l=0,f=e.length,c=f,d=Xd.getTypeOf(e)!=="string";l<e.length;)c=f-l,d?(r=e[l++],i=l<f?e[l++]:0,n=l<f?e[l++]:0):(r=e.charCodeAt(l++),i=l<f?e.charCodeAt(l++):0,n=l<f?e.charCodeAt(l++):0),a=r>>2,o=(r&3)<<4|i>>4,s=c>1?(i&15)<<2|n>>6:64,u=c>2?n&63:64,t.push(de.charAt(a)+de.charAt(o)+de.charAt(s)+de.charAt(u));return t.join("")};qi.decode=function(e){var t,r,i,n,a,o,s,u=0,l=0,f="data:";if(e.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var c=e.length*3/4;if(e.charAt(e.length-1)===de.charAt(64)&&c--,e.charAt(e.length-2)===de.charAt(64)&&c--,c%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for(Yd.uint8array?d=new Uint8Array(c|0):d=new Array(c|0);u<e.length;)n=de.indexOf(e.charAt(u++)),a=de.indexOf(e.charAt(u++)),o=de.indexOf(e.charAt(u++)),s=de.indexOf(e.charAt(u++)),t=n<<2|a>>4,r=(a&15)<<4|o>>2,i=(o&3)<<6|s,d[l++]=t,o!==64&&(d[l++]=r),s!==64&&(d[l++]=i);return d};});var Pt=b((Vg,bo)=>{bo.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}};});var xo=b((Xg,wo)=>{var yo=global.MutationObserver||global.WebKitMutationObserver,lt;process.browser?yo?(Hi=0,_o=new yo(Bt),Zi=global.document.createTextNode(""),_o.observe(Zi,{characterData:true}),lt=function(){Zi.data=Hi=++Hi%2;}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Wi=new global.MessageChannel,Wi.port1.onmessage=Bt,lt=function(){Wi.port2.postMessage(0);}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?lt=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){Bt(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},global.document.documentElement.appendChild(e);}:lt=function(){setTimeout(Bt,0);}:lt=function(){process.nextTick(Bt);};var Hi,_o,Zi,Wi,Ji,qt=[];function Bt(){Ji=true;for(var e,t,r=qt.length;r;){for(t=qt,qt=[],e=-1;++e<r;)t[e]();r=qt.length;}Ji=false;}wo.exports=Kd;function Kd(e){qt.push(e)===1&&!Ji&<();}});var Ro=b((Yg,Ao)=>{var Eo=xo();function ft(){}var J={},So=["REJECTED"],$i=["FULFILLED"],ko=["PENDING"];process.browser||(Ut=["UNHANDLED"]);var Ut;Ao.exports=Re;function Re(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=ko,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Ut),e!==ft&&To(this,e);}Re.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,i);function r(n){function a(){return n}return t.resolve(e()).then(a)}function i(n){function a(){throw n}return t.resolve(e()).then(a)}};Re.prototype.catch=function(e){return this.then(null,e)};Re.prototype.then=function(e,t){if(typeof e!="function"&&this.state===$i||typeof t!="function"&&this.state===So)return this;var r=new this.constructor(ft);if(process.browser||this.handled===Ut&&(this.handled=null),this.state!==ko){var i=this.state===$i?e:t;Vi(r,i,this.outcome);}else this.queue.push(new Ht(r,e,t));return r};function Ht(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}Ht.prototype.callFulfilled=function(e){J.resolve(this.promise,e);};Ht.prototype.otherCallFulfilled=function(e){Vi(this.promise,this.onFulfilled,e);};Ht.prototype.callRejected=function(e){J.reject(this.promise,e);};Ht.prototype.otherCallRejected=function(e){Vi(this.promise,this.onRejected,e);};function Vi(e,t,r){Eo(function(){var i;try{i=t(r);}catch(n){return J.reject(e,n)}i===e?J.reject(e,new TypeError("Cannot resolve promise with itself")):J.resolve(e,i);});}J.resolve=function(e,t){var r=Co(Gd,t);if(r.status==="error")return J.reject(e,r.value);var i=r.value;if(i)To(e,i);else {e.state=$i,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t);}return e};J.reject=function(e,t){e.state=So,e.outcome=t,process.browser||e.handled===Ut&&Eo(function(){e.handled===Ut&&process.emit("unhandledRejection",t,e);});for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e};function Gd(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments);}}function To(e,t){var r=false;function i(s){r||(r=true,J.reject(e,s));}function n(s){r||(r=true,J.resolve(e,s));}function a(){t(n,i);}var o=Co(a);o.status==="error"&&i(o.value);}function Co(e,t){var r={};try{r.value=e(t),r.status="success";}catch(i){r.status="error",r.value=i;}return r}Re.resolve=Qd;function Qd(e){return e instanceof this?e:J.resolve(new this(ft),e)}Re.reject=eh;function eh(e){var t=new this(ft);return J.reject(t,e)}Re.all=th;function th(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=new Array(r),a=0,o=-1,s=new this(ft);++o<r;)u(e[o],o);return s;function u(l,f){t.resolve(l).then(c,function(d){i||(i=true,J.reject(s,d));});function c(d){n[f]=d,++a===r&&!i&&(i=true,J.resolve(s,n));}}}Re.race=rh;function rh(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=-1,a=new this(ft);++n<r;)o(e[n]);return a;function o(s){t.resolve(s).then(function(u){i||(i=true,J.resolve(a,u));},function(u){i||(i=true,J.reject(a,u));});}}});var ut=b((Kg,Lo)=>{var Xi=null;typeof Promise<"u"?Xi=Promise:Xi=Ro();Lo.exports={Promise:Xi};});var Do=b(Oo=>{(function(e,t){if(e.setImmediate)return;var r=1,i={},n=false,a=e.document,o;function s(m){typeof m!="function"&&(m=new Function(""+m));for(var x=new Array(arguments.length-1),v=0;v<x.length;v++)x[v]=arguments[v+1];var w={callback:m,args:x};return i[r]=w,o(r),r++}function u(m){delete i[m];}function l(m){var x=m.callback,v=m.args;switch(v.length){case 0:x();break;case 1:x(v[0]);break;case 2:x(v[0],v[1]);break;case 3:x(v[0],v[1],v[2]);break;default:x.apply(t,v);break}}function f(m){if(n)setTimeout(f,0,m);else {var x=i[m];if(x){n=true;try{l(x);}finally{u(m),n=false;}}}}function c(){o=function(m){process.nextTick(function(){f(m);});};}function d(){if(e.postMessage&&!e.importScripts){var m=true,x=e.onmessage;return e.onmessage=function(){m=false;},e.postMessage("","*"),e.onmessage=x,m}}function h(){var m="setImmediate$"+Math.random()+"$",x=function(v){v.source===e&&typeof v.data=="string"&&v.data.indexOf(m)===0&&f(+v.data.slice(m.length));};e.addEventListener?e.addEventListener("message",x,false):e.attachEvent("onmessage",x),o=function(v){e.postMessage(m+v,"*");};}function p(){var m=new MessageChannel;m.port1.onmessage=function(x){var v=x.data;f(v);},o=function(x){m.port2.postMessage(x);};}function y(){var m=a.documentElement;o=function(x){var v=a.createElement("script");v.onreadystatechange=function(){f(x),v.onreadystatechange=null,m.removeChild(v),v=null;},m.appendChild(v);};}function _(){o=function(m){setTimeout(f,0,m);};}var g=Object.getPrototypeOf&&Object.getPrototypeOf(e);g=g&&g.setTimeout?g:e,{}.toString.call(e.process)==="[object process]"?c():d()?h():e.MessageChannel?p():a&&"onreadystatechange"in a.createElement("script")?y():_(),g.setImmediate=s,g.clearImmediate=u;})(typeof self>"u"?typeof global>"u"?Oo:global:self);});var j=b(P=>{var Le=xe(),ih=Ui(),dt=Pt(),Yi=ut();Do();function nh(e){var t=null;return Le.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Lr(e,t)}P.newBlob=function(e,t){P.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(e),i.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function Zt(e){return e}function Lr(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var Rr={stringifyByChunk:function(e,t,r){var i=[],n=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;n<a;)t==="array"||t==="nodebuffer"?i.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,a)))):i.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,a)))),n+=r;return i.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return Le.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return false}})(),nodebuffer:(function(){try{return Le.nodebuffer&&String.fromCharCode.apply(null,dt.allocBuffer(1)).length===1}catch{return false}})()}};function Wt(e){var t=65536,r=P.getTypeOf(e),i=true;if(r==="uint8array"?i=Rr.applyCanBeUsed.uint8array:r==="nodebuffer"&&(i=Rr.applyCanBeUsed.nodebuffer),i)for(;t>1;)try{return Rr.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2);}return Rr.stringifyByChar(e)}P.applyFromCharCode=Wt;function Or(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var Oe={};Oe.string={string:Zt,array:function(e){return Lr(e,new Array(e.length))},arraybuffer:function(e){return Oe.string.uint8array(e).buffer},uint8array:function(e){return Lr(e,new Uint8Array(e.length))},nodebuffer:function(e){return Lr(e,dt.allocBuffer(e.length))}};Oe.array={string:Wt,array:Zt,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.arraybuffer={string:function(e){return Wt(new Uint8Array(e))},array:function(e){return Or(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:Zt,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(new Uint8Array(e))}};Oe.uint8array={string:Wt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:Zt,nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.nodebuffer={string:Wt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return Oe.nodebuffer.uint8array(e).buffer},uint8array:function(e){return Or(e,new Uint8Array(e.length))},nodebuffer:Zt};P.transformTo=function(e,t){if(t||(t=""),!e)return t;P.checkSupport(e);var r=P.getTypeOf(t),i=Oe[r][e](t);return i};P.resolve=function(e){for(var t=e.split("/"),r=[],i=0;i<t.length;i++){var n=t[i];n==="."||n===""&&i!==0&&i!==t.length-1||(n===".."?r.pop():r.push(n));}return r.join("/")};P.getTypeOf=function(e){if(typeof e=="string")return "string";if(Object.prototype.toString.call(e)==="[object Array]")return "array";if(Le.nodebuffer&&dt.isBuffer(e))return "nodebuffer";if(Le.uint8array&&e instanceof Uint8Array)return "uint8array";if(Le.arraybuffer&&e instanceof ArrayBuffer)return "arraybuffer"};P.checkSupport=function(e){var t=Le[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};P.MAX_VALUE_16BITS=65535;P.MAX_VALUE_32BITS=-1;P.pretty=function(e){var t="",r,i;for(i=0;i<(e||"").length;i++)r=e.charCodeAt(i),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};P.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[]);});};P.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r;};P.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};P.prepareContent=function(e,t,r,i,n){var a=Yi.Promise.resolve(t).then(function(o){var s=Le.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return s&&typeof FileReader<"u"?new Yi.Promise(function(u,l){var f=new FileReader;f.onload=function(c){u(c.target.result);},f.onerror=function(c){l(c.target.error);},f.readAsArrayBuffer(o);}):o});return a.then(function(o){var s=P.getTypeOf(o);return s?(s==="arraybuffer"?o=P.transformTo("uint8array",o):s==="string"&&(n?o=ih.decode(o):r&&i!==true&&(o=nh(o))),o):Yi.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};});var Q=b((em,Io)=>{function Fo(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null;}Fo.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return true},error:function(e){return this.isFinished?false:(this.isPaused?this.generatedError=e:(this.isFinished=true,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),true)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t);},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.end();}),e.on("error",function(r){t.error(r);}),this},pause:function(){return this.isPaused||this.isFinished?false:(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;this.isPaused=false;var e=false;return this.generatedError&&(this.error(this.generatedError),e=true),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e);},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock();},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};Io.exports=Fo;});var ct=b(De=>{var ht=j(),Ue=xe(),ah=Pt(),Dr=Q(),Jt=new Array(256);for(Ee=0;Ee<256;Ee++)Jt[Ee]=Ee>=252?6:Ee>=248?5:Ee>=240?4:Ee>=224?3:Ee>=192?2:1;var Ee;Jt[254]=Jt[254]=1;var oh=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(Ue.uint8array?t=new Uint8Array(s):t=new Array(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},sh=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Jt[e[r]]>t?r:t},lh=function(e){var t,r,i,n,a=e.length,o=new Array(a*2);for(r=0,t=0;t<a;){if(i=e[t++],i<128){o[r++]=i;continue}if(n=Jt[i],n>4){o[r++]=65533,t+=n-1;continue}for(i&=n===2?31:n===3?15:7;n>1&&t<a;)i=i<<6|e[t++]&63,n--;if(n>1){o[r++]=65533;continue}i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|i&1023);}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),ht.applyFromCharCode(o)};De.utf8encode=function(t){return Ue.nodebuffer?ah.newBufferFrom(t,"utf-8"):oh(t)};De.utf8decode=function(t){return Ue.nodebuffer?ht.transformTo("nodebuffer",t).toString("utf-8"):(t=ht.transformTo(Ue.uint8array?"uint8array":"array",t),lh(t))};function Fr(){Dr.call(this,"utf-8 decode"),this.leftOver=null;}ht.inherits(Fr,Dr);Fr.prototype.processChunk=function(e){var t=ht.transformTo(Ue.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Ue.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var i=sh(t),n=t;i!==t.length&&(Ue.uint8array?(n=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(n=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:De.utf8decode(n),meta:e.meta});};Fr.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:De.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);};De.Utf8DecodeWorker=Fr;function Ki(){Dr.call(this,"utf-8 encode");}ht.inherits(Ki,Dr);Ki.prototype.processChunk=function(e){this.push({data:De.utf8encode(e.data),meta:e.meta});};De.Utf8EncodeWorker=Ki;});var zo=b((rm,No)=>{var jo=Q(),Mo=j();function Gi(e){jo.call(this,"ConvertWorker to "+e),this.destType=e;}Mo.inherits(Gi,jo);Gi.prototype.processChunk=function(e){this.push({data:Mo.transformTo(this.destType,e.data),meta:e.meta});};No.exports=Gi;});var qo=b((im,Bo)=>{var Po=zi().Readable,fh=j();fh.inherits(Qi,Po);function Qi(e,t,r){Po.call(this,t),this._helper=e;var i=this;e.on("data",function(n,a){i.push(n)||i._helper.pause(),r&&r(a);}).on("error",function(n){i.emit("error",n);}).on("end",function(){i.push(null);});}Qi.prototype._read=function(){this._helper.resume();};Bo.exports=Qi;});var en=b((nm,Zo)=>{var He=j(),uh=zo(),dh=Q(),hh=Ui(),ch=xe(),ph=ut(),Uo=null;if(ch.nodestream)try{Uo=qo();}catch{}function gh(e,t,r){switch(e){case "blob":return He.newBlob(He.transformTo("arraybuffer",t),r);case "base64":return hh.encode(t);default:return He.transformTo(e,t)}}function mh(e,t){var r,i=0,n=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case "string":return t.join("");case "array":return Array.prototype.concat.apply([],t);case "uint8array":for(n=new Uint8Array(a),r=0;r<t.length;r++)n.set(t[r],i),i+=t[r].length;return n;case "nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function vh(e,t){return new ph.Promise(function(r,i){var n=[],a=e._internalType,o=e._outputType,s=e._mimeType;e.on("data",function(u,l){n.push(u),t&&t(l);}).on("error",function(u){n=[],i(u);}).on("end",function(){try{var u=gh(o,mh(a,n),s);r(u);}catch(l){i(l);}n=[];}).resume();})}function Ho(e,t,r){var i=t;switch(t){case "blob":case "arraybuffer":i="uint8array";break;case "base64":i="string";break}try{this._internalType=i,this._outputType=t,this._mimeType=r,He.checkSupport(i),this._worker=e.pipe(new uh(i)),e.lock();}catch(n){this._worker=new dh("error"),this._worker.error(n);}}Ho.prototype={accumulate:function(e){return vh(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(i){t.call(r,i.data,i.meta);}):this._worker.on(e,function(){He.delay(t,arguments,r);}),this},resume:function(){return He.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(He.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Uo(this,{objectMode:this._outputType!=="nodebuffer"},e)}};Zo.exports=Ho;});var tn=b(ae=>{ae.base64=false;ae.binary=false;ae.dir=false;ae.createFolders=true;ae.date=null;ae.compression=null;ae.compressionOptions=null;ae.comment=null;ae.unixPermissions=null;ae.dosPermissions=null;});var rn=b((om,Wo)=>{var Ir=j(),jr=Q(),bh=16*1024;function pt(e){jr.call(this,"DataWorker");var t=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,e.then(function(r){t.dataIsReady=true,t.data=r,t.max=r&&r.length||0,t.type=Ir.getTypeOf(r),t.isPaused||t._tickAndRepeat();},function(r){t.error(r);});}Ir.inherits(pt,jr);pt.prototype.cleanUp=function(){jr.prototype.cleanUp.call(this),this.data=null;};pt.prototype.resume=function(){return jr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,Ir.delay(this._tickAndRepeat,[],this)),true):false};pt.prototype._tickAndRepeat=function(){this._tickScheduled=false,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Ir.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));};pt.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var e=bh,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case "string":t=this.data.substring(this.index,r);break;case "uint8array":t=this.data.subarray(this.index,r);break;case "array":case "nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Wo.exports=pt;});var Mr=b((sm,$o)=>{var yh=j();function _h(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var Jo=_h();function wh(e,t,r,i){var n=Jo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}function xh(e,t,r,i){var n=Jo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t.charCodeAt(o))&255];return e^-1}$o.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=yh.getTypeOf(t)!=="string";return i?wh(r|0,t,t.length,0):xh(r|0,t,t.length,0)};});var an=b((lm,Xo)=>{var Vo=Q(),Eh=Mr(),Sh=j();function nn(){Vo.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}Sh.inherits(nn,Vo);nn.prototype.processChunk=function(e){this.streamInfo.crc32=Eh(e.data,this.streamInfo.crc32||0),this.push(e);};Xo.exports=nn;});var Ko=b((fm,Yo)=>{var kh=j(),on=Q();function sn(e){on.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}kh.inherits(sn,on);sn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}on.prototype.processChunk.call(this,e);};Yo.exports=sn;});var Nr=b((um,es)=>{var Go=ut(),Qo=rn(),Th=an(),ln=Ko();function fn(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n;}fn.prototype={getContentWorker:function(){var e=new Qo(Go.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new ln("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new Qo(Go.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};fn.createWorkerFrom=function(e,t,r){return e.pipe(new Th).pipe(new ln("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new ln("compressedSize")).withStreamInfo("compression",t)};es.exports=fn;});var ns=b((dm,is)=>{var Ch=en(),Ah=rn(),un=ct(),dn=Nr(),ts=Q(),hn=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};};hn.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var i=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(t=t.pipe(new un.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new un.Utf8DecodeWorker));}catch(a){t=new ts("error"),t.error(a);}return new Ch(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof dn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new un.Utf8EncodeWorker)),dn.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof dn?this._data.getContentWorker():this._data instanceof ts?this._data:new Ah(this._data)}};var rs=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Rh=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(zr=0;zr<rs.length;zr++)hn.prototype[rs[zr]]=Rh;var zr;is.exports=hn;});var Se=b(V=>{var Lh=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Oh(e,t){return Object.prototype.hasOwnProperty.call(e,t)}V.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)Oh(r,i)&&(e[i]=r[i]);}}return e};V.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var Dh={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},Fh={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){return [].concat.apply([],e)}};V.setTyped=function(e){e?(V.Buf8=Uint8Array,V.Buf16=Uint16Array,V.Buf32=Int32Array,V.assign(V,Dh)):(V.Buf8=Array,V.Buf16=Array,V.Buf32=Array,V.assign(V,Fh));};V.setTyped(Lh);});var Cs=b(vt=>{var Ih=Se(),jh=4,as=0,os=1,Mh=2;function mt(e){for(var t=e.length;--t>=0;)e[t]=0;}var Nh=0,hs=1,zh=2,Ph=3,Bh=258,yn=29,Gt=256,Vt=Gt+1+yn,gt=30,_n=19,cs=2*Vt+1,Ze=15,cn=16,qh=7,wn=256,ps=16,gs=17,ms=18,vn=[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],Pr=[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],Uh=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Hh=512,ke=new Array((Vt+2)*2);mt(ke);var $t=new Array(gt*2);mt($t);var Xt=new Array(Hh);mt(Xt);var Yt=new Array(Bh-Ph+1);mt(Yt);var xn=new Array(yn);mt(xn);var Br=new Array(gt);mt(Br);function pn(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length;}var bs,ys,_s;function gn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function ws(e){return e<256?Xt[e]:Xt[256+(e>>>7)]}function Kt(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255;}function Y(e,t,r){e.bi_valid>cn-r?(e.bi_buf|=t<<e.bi_valid&65535,Kt(e,e.bi_buf),e.bi_buf=t>>cn-e.bi_valid,e.bi_valid+=r-cn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function he(e,t,r){Y(e,r[t*2],r[t*2+1]);}function xs(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function Zh(e){e.bi_valid===16?(Kt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8);}function Wh(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,f,c,d,h,p,y=0;for(d=0;d<=Ze;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<cs;l++)f=e.heap[l],d=r[r[f*2+1]*2+1]+1,d>u&&(d=u,y++),r[f*2+1]=d,!(f>i)&&(e.bl_count[d]++,h=0,f>=s&&(h=o[f-s]),p=r[f*2],e.opt_len+=p*(d+h),a&&(e.static_len+=p*(n[f*2+1]+h)));if(y!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,y-=2;}while(y>0);for(d=u;d!==0;d--)for(f=e.bl_count[d];f!==0;)c=e.heap[--l],!(c>i)&&(r[c*2+1]!==d&&(e.opt_len+=(d-r[c*2+1])*r[c*2],r[c*2+1]=d),f--);}}function Es(e,t,r){var i=new Array(Ze+1),n=0,a,o;for(a=1;a<=Ze;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=xs(i[s]++,s));}}function Jh(){var e,t,r,i,n,a=new Array(Ze+1);for(r=0,i=0;i<yn-1;i++)for(xn[i]=r,e=0;e<1<<vn[i];e++)Yt[r++]=i;for(Yt[r-1]=i,n=0,i=0;i<16;i++)for(Br[i]=n,e=0;e<1<<Pr[i];e++)Xt[n++]=i;for(n>>=7;i<gt;i++)for(Br[i]=n<<7,e=0;e<1<<Pr[i]-7;e++)Xt[256+n++]=i;for(t=0;t<=Ze;t++)a[t]=0;for(e=0;e<=143;)ke[e*2+1]=8,e++,a[8]++;for(;e<=255;)ke[e*2+1]=9,e++,a[9]++;for(;e<=279;)ke[e*2+1]=7,e++,a[7]++;for(;e<=287;)ke[e*2+1]=8,e++,a[8]++;for(Es(ke,Vt+1,a),e=0;e<gt;e++)$t[e*2+1]=5,$t[e*2]=xs(e,5);bs=new pn(ke,vn,Gt+1,Vt,Ze),ys=new pn($t,Pr,0,gt,Ze),_s=new pn(new Array(0),Uh,0,_n,qh);}function Ss(e){var t;for(t=0;t<Vt;t++)e.dyn_ltree[t*2]=0;for(t=0;t<gt;t++)e.dyn_dtree[t*2]=0;for(t=0;t<_n;t++)e.bl_tree[t*2]=0;e.dyn_ltree[wn*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function ks(e){e.bi_valid>8?Kt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0;}function $h(e,t,r,i){ks(e),(Kt(e,r),Kt(e,~r)),Ih.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}function ss(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function mn(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&ss(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!ss(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i;}function ls(e,t,r){var i,n,a=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?he(e,n,t):(o=Yt[n],he(e,o+Gt+1,t),s=vn[o],s!==0&&(n-=xn[o],Y(e,n,s)),i--,o=ws(i),he(e,o,r),s=Pr[o],s!==0&&(i-=Br[o],Y(e,i,s)));while(a<e.last_lit);he(e,wn,t);}function bn(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=cs,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=u<2?++u:0,r[l*2]=1,e.depth[l]=0,e.opt_len--,n&&(e.static_len-=i[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)mn(e,r,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mn(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[l*2]=r[o*2]+r[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=l,e.heap[1]=l++,mn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Wh(e,t),Es(r,u,e.bl_count);}function fs(e,t,r){var i,n=-1,a,o=t[1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[ps*2]++):s<=10?e.bl_tree[gs*2]++:e.bl_tree[ms*2]++,s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4));}function us(e,t,r){var i,n=-1,a,o=t[1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++s<u&&a===o)){if(s<l)do he(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(he(e,a,e.bl_tree),s--),he(e,ps,e.bl_tree),Y(e,s-3,2)):s<=10?(he(e,gs,e.bl_tree),Y(e,s-3,3)):(he(e,ms,e.bl_tree),Y(e,s-11,7));s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4);}}function Vh(e){var t;for(fs(e,e.dyn_ltree,e.l_desc.max_code),fs(e,e.dyn_dtree,e.d_desc.max_code),bn(e,e.bl_desc),t=_n-1;t>=3&&e.bl_tree[vs[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Xh(e,t,r,i){var n;for(Y(e,t-257,5),Y(e,r-1,5),Y(e,i-4,4),n=0;n<i;n++)Y(e,e.bl_tree[vs[n]*2+1],3);us(e,e.dyn_ltree,t-1),us(e,e.dyn_dtree,r-1);}function Yh(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return as;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return os;for(r=32;r<Gt;r++)if(e.dyn_ltree[r*2]!==0)return os;return as}var ds=false;function Kh(e){ds||(Jh(),ds=true),e.l_desc=new gn(e.dyn_ltree,bs),e.d_desc=new gn(e.dyn_dtree,ys),e.bl_desc=new gn(e.bl_tree,_s),e.bi_buf=0,e.bi_valid=0,Ss(e);}function Ts(e,t,r,i){Y(e,(Nh<<1)+(i?1:0),3),$h(e,t,r);}function Gh(e){Y(e,hs<<1,3),he(e,wn,ke),Zh(e);}function Qh(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===Mh&&(e.strm.data_type=Yh(e)),bn(e,e.l_desc),bn(e,e.d_desc),o=Vh(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?Ts(e,t,r,i):e.strategy===jh||a===n?(Y(e,(hs<<1)+(i?1:0),3),ls(e,ke,$t)):(Y(e,(zh<<1)+(i?1:0),3),Xh(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ls(e,e.dyn_ltree,e.dyn_dtree)),Ss(e),i&&ks(e);}function ec(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Yt[r]+Gt+1)*2]++,e.dyn_dtree[ws(t)*2]++),e.last_lit===e.lit_bufsize-1}vt._tr_init=Kh;vt._tr_stored_block=Ts;vt._tr_flush_block=Qh;vt._tr_tally=ec;vt._tr_align=Gh;});var En=b((pm,As)=>{function tc(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521;}return n|a<<16|0}As.exports=tc;});var Sn=b((gm,Rs)=>{function rc(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var ic=rc();function nc(e,t,r,i){var n=ic,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Rs.exports=nc;});var qr=b((mm,Ls)=>{Ls.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"};});var Ps=b(ge=>{var X=Se(),te=Cs(),Is=En(),Fe=Sn(),ac=qr(),Ve=0,oc=1,sc=3,ze=4,Os=5,pe=0,Ds=1,re=-2,lc=-3,kn=-5,fc=-1,uc=1,Ur=2,dc=3,hc=4,cc=0,pc=2,Jr=8,gc=9,mc=15,vc=8,bc=29,yc=256,Cn=yc+1+bc,_c=30,wc=19,xc=2*Cn+1,Ec=15,A=3,Me=258,oe=Me+A+1,Sc=32,$r=42,An=69,Hr=73,Zr=91,Wr=103,We=113,er=666,q=1,tr=2,Je=3,_t=4,kc=3;function Ne(e,t){return e.msg=ac[t],t}function Fs(e){return (e<<1)-(e>4?9:0)}function je(e){for(var t=e.length;--t>=0;)e[t]=0;}function Ie(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(X.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0));}function Z(e,t){te._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ie(e.strm);}function R(e,t){e.pending_buf[e.pending++]=t;}function Qt(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255;}function Tc(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,X.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=Is(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Fe(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function js(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-oe?e.strstart-(e.w_size-oe):0,l=e.window,f=e.w_mask,c=e.prev,d=e.strstart+Me,h=l[i+o-1],p=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(l[n+o]!==p||l[n+o-1]!==h||l[n]!==l[i]||l[++n]!==l[i+1])){i+=2,n++;do;while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&i<d);if(a=Me-(d-i),i=d-Me,a>o){if(e.match_start=t,o=a,a>=s)break;h=l[i+o-1],p=l[i+o];}}while((t=c[t&f])>u&&--r!==0);return o<=e.lookahead?o:e.lookahead}function $e(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-oe)){X.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t;}if(e.strm.avail_in===0)break;if(i=Tc(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=A)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+A-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<A)););}while(e.lookahead<oe&&e.strm.avail_in!==0)}function Cc(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if($e(e),e.lookahead===0&&t===Ve)return q;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,Z(e,false),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-oe&&(Z(e,false),e.strm.avail_out===0))return q}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):(e.strstart>e.block_start&&(Z(e,false),e.strm.avail_out===0),q)}function Tn(e,t){for(var r,i;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return q;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-oe&&(e.match_length=js(e,r)),e.match_length>=A)if(i=te._tr_tally(e,e.strstart-e.match_start,e.match_length-A),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=A){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++;}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(Z(e,false),e.strm.avail_out===0))return q}return e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?q:tr}function bt(e,t){for(var r,i,n;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return q;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=A-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-oe&&(e.match_length=js(e,r),e.match_length<=5&&(e.strategy===uc||e.match_length===A&&e.strstart-e.match_start>4096)&&(e.match_length=A-1)),e.prev_length>=A&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-A,i=te._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-A),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=A-1,e.strstart++,i&&(Z(e,false),e.strm.avail_out===0))return q}else if(e.match_available){if(i=te._tr_tally(e,0,e.window[e.strstart-1]),i&&Z(e,false),e.strstart++,e.lookahead--,e.strm.avail_out===0)return q}else e.match_available=1,e.strstart++,e.lookahead--;}return e.match_available&&(i=te._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?q:tr}function Ac(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=Me){if($e(e),e.lookahead<=Me&&t===Ve)return q;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=A&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+Me;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=Me-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=A?(r=te._tr_tally(e,1,e.match_length-A),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Z(e,false),e.strm.avail_out===0))return q}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?q:tr}function Rc(e,t){for(var r;;){if(e.lookahead===0&&($e(e),e.lookahead===0)){if(t===Ve)return q;break}if(e.match_length=0,r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Z(e,false),e.strm.avail_out===0))return q}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?q:tr}function ce(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n;}var yt;yt=[new ce(0,0,0,0,Cc),new ce(4,4,8,4,Tn),new ce(4,5,16,8,Tn),new ce(4,6,32,32,Tn),new ce(4,4,16,16,bt),new ce(8,16,32,32,bt),new ce(8,16,128,128,bt),new ce(8,32,128,256,bt),new ce(32,128,258,1024,bt),new ce(32,258,258,4096,bt)];function Lc(e){e.window_size=2*e.w_size,je(e.head),e.max_lazy_match=yt[e.level].max_lazy,e.good_match=yt[e.level].good_length,e.nice_match=yt[e.level].nice_length,e.max_chain_length=yt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=A-1,e.match_available=0,e.ins_h=0;}function Oc(){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=Jr,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 X.Buf16(xc*2),this.dyn_dtree=new X.Buf16((2*_c+1)*2),this.bl_tree=new X.Buf16((2*wc+1)*2),je(this.dyn_ltree),je(this.dyn_dtree),je(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new X.Buf16(Ec+1),this.heap=new X.Buf16(2*Cn+1),je(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new X.Buf16(2*Cn+1),je(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 Ms(e){var t;return !e||!e.state?Ne(e,re):(e.total_in=e.total_out=0,e.data_type=pc,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?$r:We,e.adler=t.wrap===2?0:1,t.last_flush=Ve,te._tr_init(t),pe)}function Ns(e){var t=Ms(e);return t===pe&&Lc(e.state),t}function Dc(e,t){return !e||!e.state||e.state.wrap!==2?re:(e.state.gzhead=t,pe)}function zs(e,t,r,i,n,a){if(!e)return re;var o=1;if(t===fc&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>gc||r!==Jr||i<8||i>15||t<0||t>9||a<0||a>hc)return Ne(e,re);i===8&&(i=9);var s=new Oc;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+A-1)/A),s.window=new X.Buf8(s.w_size*2),s.head=new X.Buf16(s.hash_size),s.prev=new X.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new X.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,Ns(e)}function Fc(e,t){return zs(e,t,Jr,mc,vc,cc)}function Ic(e,t){var r,i,n,a;if(!e||!e.state||t>Os||t<0)return e?Ne(e,re):re;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===er&&t!==ze)return Ne(e,e.avail_out===0?kn:re);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===$r)if(i.wrap===2)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,i.gzhead.time&255),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,i.level===9?2:i.strategy>=Ur||i.level<2?4:0),R(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,i.gzhead.extra.length&255),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Fe(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=An):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,i.level===9?2:i.strategy>=Ur||i.level<2?4:0),R(i,kc),i.status=We);else {var o=Jr+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Ur||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=Sc),o+=31-o%31,i.status=We,Qt(i,o),i.strstart!==0&&(Qt(i,e.adler>>>16),Qt(i,e.adler&65535)),e.adler=1;}if(i.status===An)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),Ie(e),n=i.pending,i.pending===i.pending_buf_size));)R(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Hr);}else i.status=Hr;if(i.status===Hr)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),Ie(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Zr);}else i.status=Zr;if(i.status===Zr)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),Ie(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Wr);}else i.status=Wr;if(i.status===Wr&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Ie(e),i.pending+2<=i.pending_buf_size&&(R(i,e.adler&255),R(i,e.adler>>8&255),e.adler=0,i.status=We)):i.status=We),i.pending!==0){if(Ie(e),e.avail_out===0)return i.last_flush=-1,pe}else if(e.avail_in===0&&Fs(t)<=Fs(r)&&t!==ze)return Ne(e,kn);if(i.status===er&&e.avail_in!==0)return Ne(e,kn);if(e.avail_in!==0||i.lookahead!==0||t!==Ve&&i.status!==er){var u=i.strategy===Ur?Rc(i,t):i.strategy===dc?Ac(i,t):yt[i.level].func(i,t);if((u===Je||u===_t)&&(i.status=er),u===q||u===Je)return e.avail_out===0&&(i.last_flush=-1),pe;if(u===tr&&(t===oc?te._tr_align(i):t!==Os&&(te._tr_stored_block(i,0,0,false),t===sc&&(je(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Ie(e),e.avail_out===0))return i.last_flush=-1,pe}return t!==ze?pe:i.wrap<=0?Ds:(i.wrap===2?(R(i,e.adler&255),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,e.total_in&255),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(Qt(i,e.adler>>>16),Qt(i,e.adler&65535)),Ie(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pe:Ds)}function jc(e){var t;return !e||!e.state?re:(t=e.state.status,t!==$r&&t!==An&&t!==Hr&&t!==Zr&&t!==Wr&&t!==We&&t!==er?Ne(e,re):(e.state=null,t===We?Ne(e,lc):pe))}function Mc(e,t){var r=t.length,i,n,a,o,s,u,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==$r||i.lookahead))return re;for(o===1&&(e.adler=Is(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(je(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new X.Buf8(i.w_size),X.arraySet(f,t,r-i.w_size,i.w_size,0),t=f,r=i.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,$e(i);i.lookahead>=A;){n=i.strstart,a=i.lookahead-(A-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+A-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=A-1,$e(i);}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=A-1,i.match_available=0,e.next_in=u,e.input=l,e.avail_in=s,i.wrap=o,pe}ge.deflateInit=Fc;ge.deflateInit2=zs;ge.deflateReset=Ns;ge.deflateResetKeep=Ms;ge.deflateSetHeader=Dc;ge.deflate=Ic;ge.deflateEnd=jc;ge.deflateSetDictionary=Mc;ge.deflateInfo="pako deflate (from Nodeca project)";});var Rn=b(wt=>{var Vr=Se(),Bs=true,qs=true;try{String.fromCharCode.apply(null,[0]);}catch{Bs=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{qs=false;}var rr=new Vr.Buf8(256);for(Te=0;Te<256;Te++)rr[Te]=Te>=252?6:Te>=248?5:Te>=240?4:Te>=224?3:Te>=192?2:1;var Te;rr[254]=rr[254]=1;wt.string2buf=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Vr.Buf8(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function Us(e,t){if(t<65534&&(e.subarray&&qs||!e.subarray&&Bs))return String.fromCharCode.apply(null,Vr.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}wt.buf2binstring=function(e){return Us(e,e.length)};wt.binstring2buf=function(e){for(var t=new Vr.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t};wt.buf2string=function(e,t){var r,i,n,a,o=t||e.length,s=new Array(o*2);for(i=0,r=0;r<o;){if(n=e[r++],n<128){s[i++]=n;continue}if(a=rr[n],a>4){s[i++]=65533,r+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&r<o;)n=n<<6|e[r++]&63,a--;if(a>1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023);}return Us(s,i)};wt.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+rr[e[r]]>t?r:t};});var Ln=b((ym,Hs)=>{function Nc(){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;}Hs.exports=Nc;});var $s=b(ar=>{var ir=Ps(),nr=Se(),Dn=Rn(),Fn=qr(),zc=Ln(),Js=Object.prototype.toString,Pc=0,On=4,xt=0,Zs=1,Ws=2,Bc=-1,qc=0,Uc=8;function Xe(e){if(!(this instanceof Xe))return new Xe(e);this.options=nr.assign({level:Bc,method:Uc,chunkSize:16384,windowBits:15,memLevel:8,strategy:qc,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new zc,this.strm.avail_out=0;var r=ir.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==xt)throw new Error(Fn[r]);if(t.header&&ir.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Dn.string2buf(t.dictionary):Js.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=ir.deflateSetDictionary(this.strm,i),r!==xt)throw new Error(Fn[r]);this._dict_set=true;}}Xe.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return false;a=t===~~t?t:t===true?On:Pc,typeof e=="string"?r.input=Dn.string2buf(e):Js.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new nr.Buf8(i),r.next_out=0,r.avail_out=i),n=ir.deflate(r,a),n!==Zs&&n!==xt)return this.onEnd(n),this.ended=true,false;(r.avail_out===0||r.avail_in===0&&(a===On||a===Ws))&&(this.options.to==="string"?this.onData(Dn.buf2binstring(nr.shrinkBuf(r.output,r.next_out))):this.onData(nr.shrinkBuf(r.output,r.next_out)));}while((r.avail_in>0||r.avail_out===0)&&n!==Zs);return a===On?(n=ir.deflateEnd(this.strm),this.onEnd(n),this.ended=true,n===xt):(a===Ws&&(this.onEnd(xt),r.avail_out=0),true)};Xe.prototype.onData=function(e){this.chunks.push(e);};Xe.prototype.onEnd=function(e){e===xt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=nr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function In(e,t){var r=new Xe(t);if(r.push(e,true),r.err)throw r.msg||Fn[r.err];return r.result}function Hc(e,t){return t=t||{},t.raw=true,In(e,t)}function Zc(e,t){return t=t||{},t.gzip=true,In(e,t)}ar.Deflate=Xe;ar.deflate=In;ar.deflateRaw=Hc;ar.gzip=Zc;});var Xs=b((wm,Vs)=>{var Xr=30,Wc=12;Vs.exports=function(t,r){var i,n,a,o,s,u,l,f,c,d,h,p,y,_,g,m,x,v,w,T,k,S,C,D,E;i=t.state,n=t.next_in,D=t.input,a=n+(t.avail_in-5),o=t.next_out,E=t.output,s=o-(r-t.avail_out),u=o+(t.avail_out-257),l=i.dmax,f=i.wsize,c=i.whave,d=i.wnext,h=i.window,p=i.hold,y=i.bits,_=i.lencode,g=i.distcode,m=(1<<i.lenbits)-1,x=(1<<i.distbits)-1;e:do{y<15&&(p+=D[n++]<<y,y+=8,p+=D[n++]<<y,y+=8),v=_[p&m];t:for(;;){if(w=v>>>24,p>>>=w,y-=w,w=v>>>16&255,w===0)E[o++]=v&65535;else if(w&16){T=v&65535,w&=15,w&&(y<w&&(p+=D[n++]<<y,y+=8),T+=p&(1<<w)-1,p>>>=w,y-=w),y<15&&(p+=D[n++]<<y,y+=8,p+=D[n++]<<y,y+=8),v=g[p&x];r:for(;;){if(w=v>>>24,p>>>=w,y-=w,w=v>>>16&255,w&16){if(k=v&65535,w&=15,y<w&&(p+=D[n++]<<y,y+=8,y<w&&(p+=D[n++]<<y,y+=8)),k+=p&(1<<w)-1,k>l){t.msg="invalid distance too far back",i.mode=Xr;break e}if(p>>>=w,y-=w,w=o-s,k>w){if(w=k-w,w>c&&i.sane){t.msg="invalid distance too far back",i.mode=Xr;break e}if(S=0,C=h,d===0){if(S+=f-w,w<T){T-=w;do E[o++]=h[S++];while(--w);S=o-k,C=E;}}else if(d<w){if(S+=f+d-w,w-=d,w<T){T-=w;do E[o++]=h[S++];while(--w);if(S=0,d<T){w=d,T-=w;do E[o++]=h[S++];while(--w);S=o-k,C=E;}}}else if(S+=d-w,w<T){T-=w;do E[o++]=h[S++];while(--w);S=o-k,C=E;}for(;T>2;)E[o++]=C[S++],E[o++]=C[S++],E[o++]=C[S++],T-=3;T&&(E[o++]=C[S++],T>1&&(E[o++]=C[S++]));}else {S=o-k;do E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],T-=3;while(T>2);T&&(E[o++]=E[S++],T>1&&(E[o++]=E[S++]));}}else if((w&64)===0){v=g[(v&65535)+(p&(1<<w)-1)];continue r}else {t.msg="invalid distance code",i.mode=Xr;break e}break}}else if((w&64)===0){v=_[(v&65535)+(p&(1<<w)-1)];continue t}else if(w&32){i.mode=Wc;break e}else {t.msg="invalid literal/length code",i.mode=Xr;break e}break}}while(n<a&&o<u);T=y>>3,n-=T,y-=T<<3,p&=(1<<y)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<u?257+(u-o):257-(o-u),i.hold=p,i.bits=y;};});var rl=b((xm,tl)=>{var Ys=Se(),Et=15,Ks=852,Gs=592,Qs=0,jn=1,el=2,Jc=[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],$c=[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],Vc=[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],Xc=[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];tl.exports=function(t,r,i,n,a,o,s,u){var l=u.bits,f=0,c=0,d=0,h=0,p=0,y=0,_=0,g=0,m=0,x=0,v,w,T,k,S,C=null,D=0,E,K=new Ys.Buf16(Et+1),et=new Ys.Buf16(Et+1),hr=null,ha=0,ca,cr,pr;for(f=0;f<=Et;f++)K[f]=0;for(c=0;c<n;c++)K[r[i+c]]++;for(p=l,h=Et;h>=1&&K[h]===0;h--);if(p>h&&(p=h),h===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<h&&K[d]===0;d++);for(p<d&&(p=d),g=1,f=1;f<=Et;f++)if(g<<=1,g-=K[f],g<0)return -1;if(g>0&&(t===Qs||h!==1))return -1;for(et[1]=0,f=1;f<Et;f++)et[f+1]=et[f]+K[f];for(c=0;c<n;c++)r[i+c]!==0&&(s[et[r[i+c]]++]=c);if(t===Qs?(C=hr=s,E=19):t===jn?(C=Jc,D-=257,hr=$c,ha-=257,E=256):(C=Vc,hr=Xc,E=-1),x=0,c=0,f=d,S=o,y=p,_=0,T=-1,m=1<<p,k=m-1,t===jn&&m>Ks||t===el&&m>Gs)return 1;for(;;){ca=f-_,s[c]<E?(cr=0,pr=s[c]):s[c]>E?(cr=hr[ha+s[c]],pr=C[D+s[c]]):(cr=96,pr=0),v=1<<f-_,w=1<<y,d=w;do w-=v,a[S+(x>>_)+w]=ca<<24|cr<<16|pr|0;while(w!==0);for(v=1<<f-1;x&v;)v>>=1;if(v!==0?(x&=v-1,x+=v):x=0,c++,--K[f]===0){if(f===h)break;f=r[i+s[c]];}if(f>p&&(x&k)!==T){for(_===0&&(_=p),S+=d,y=f-_,g=1<<y;y+_<h&&(g-=K[y+_],!(g<=0));)y++,g<<=1;if(m+=1<<y,t===jn&&m>Ks||t===el&&m>Gs)return 1;T=x&k,a[T]=p<<24|y<<16|S-o|0;}}return x!==0&&(a[S+x]=f-_<<24|64<<16|0),u.bits=p,0};});var Nl=b(se=>{var ee=Se(),qn=En(),me=Sn(),Yc=Xs(),or=rl(),Kc=0,Al=1,Rl=2,il=4,Gc=5,Yr=6,Ye=0,Qc=1,ep=2,ie=-2,Ll=-3,Un=-4,tp=-5,nl=8,Ol=1,al=2,ol=3,sl=4,ll=5,fl=6,ul=7,dl=8,hl=9,cl=10,Qr=11,Ce=12,Mn=13,pl=14,Nn=15,gl=16,ml=17,vl=18,bl=19,Kr=20,Gr=21,yl=22,_l=23,wl=24,xl=25,El=26,zn=27,Sl=28,kl=29,I=30,Hn=31,rp=32,ip=852,np=592,ap=15,op=ap;function Tl(e){return (e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function sp(){this.mode=0,this.last=false,this.wrap=0,this.havedict=false,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 ee.Buf16(320),this.work=new ee.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function Dl(e){var t;return !e||!e.state?ie:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ol,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ee.Buf32(ip),t.distcode=t.distdyn=new ee.Buf32(np),t.sane=1,t.back=-1,Ye)}function Fl(e){var t;return !e||!e.state?ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Dl(e))}function Il(e,t){var r,i;return !e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?ie:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Fl(e))}function jl(e,t){var r,i;return e?(i=new sp,e.state=i,i.window=null,r=Il(e,t),r!==Ye&&(e.state=null),r):ie}function lp(e){return jl(e,op)}var Cl=true,Pn,Bn;function fp(e){if(Cl){var t;for(Pn=new ee.Buf32(512),Bn=new ee.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(or(Al,e.lens,0,288,Pn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;or(Rl,e.lens,0,32,Bn,0,e.work,{bits:5}),Cl=false;}e.lencode=Pn,e.lenbits=9,e.distcode=Bn,e.distbits=5;}function Ml(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new ee.Buf8(a.wsize)),i>=a.wsize?(ee.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),ee.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(ee.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function up(e,t){var r,i,n,a,o,s,u,l,f,c,d,h,p,y,_=0,g,m,x,v,w,T,k,S,C=new ee.Buf8(4),D,E,K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ie;r=e.state,r.mode===Ce&&(r.mode=Mn),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,c=s,d=u,S=Ye;e:for(;;)switch(r.mode){case Ol:if(r.wrap===0){r.mode=Mn;break}for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.wrap&2&&l===35615){r.check=0,C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0),l=0,f=0,r.mode=al;break}if(r.flags=0,r.head&&(r.head.done=false),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=I;break}if((l&15)!==nl){e.msg="unknown compression method",r.mode=I;break}if(l>>>=4,f-=4,k=(l&15)+8,r.wbits===0)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=I;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=l&512?cl:Ce,l=0,f=0;break;case al:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.flags=l,(r.flags&255)!==nl){e.msg="unknown compression method",r.mode=I;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=I;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0,r.mode=ol;case ol:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.head&&(r.head.time=l),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,C[2]=l>>>16&255,C[3]=l>>>24&255,r.check=me(r.check,C,4,0)),l=0,f=0,r.mode=sl;case sl:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.head&&(r.head.xflags=l&255,r.head.os=l>>8),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0,r.mode=ll;case ll:if(r.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.length=l,r.head&&(r.head.extra_len=l),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0;}else r.head&&(r.head.extra=null);r.mode=fl;case fl:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ee.arraySet(r.head.extra,i,a,h,k)),r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=ul;case ul:if(r.flags&2048){if(s===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k));while(k&&h<s);if(r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=dl;case dl:if(r.flags&4096){if(s===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k));while(k&&h<s);if(r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,k)break e}else r.head&&(r.head.comment=null);r.mode=hl;case hl:if(r.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l!==(r.check&65535)){e.msg="header crc mismatch",r.mode=I;break}l=0,f=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=true),e.adler=r.check=0,r.mode=Ce;break;case cl:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}e.adler=r.check=Tl(l),l=0,f=0,r.mode=Qr;case Qr:if(r.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,ep;e.adler=r.check=1,r.mode=Ce;case Ce:if(t===Gc||t===Yr)break e;case Mn:if(r.last){l>>>=f&7,f-=f&7,r.mode=zn;break}for(;f<3;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}switch(r.last=l&1,l>>>=1,f-=1,l&3){case 0:r.mode=pl;break;case 1:if(fp(r),r.mode=Kr,t===Yr){l>>>=2,f-=2;break e}break;case 2:r.mode=ml;break;case 3:e.msg="invalid block type",r.mode=I;}l>>>=2,f-=2;break;case pl:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",r.mode=I;break}if(r.length=l&65535,l=0,f=0,r.mode=Nn,t===Yr)break e;case Nn:r.mode=gl;case gl:if(h=r.length,h){if(h>s&&(h=s),h>u&&(h=u),h===0)break e;ee.arraySet(n,i,a,h,o),s-=h,a+=h,u-=h,o+=h,r.length-=h;break}r.mode=Ce;break;case ml:for(;f<14;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.nlen=(l&31)+257,l>>>=5,f-=5,r.ndist=(l&31)+1,l>>>=5,f-=5,r.ncode=(l&15)+4,l>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=I;break}r.have=0,r.mode=vl;case vl:for(;r.have<r.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.lens[K[r.have++]]=l&7,l>>>=3,f-=3;}for(;r.have<19;)r.lens[K[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},S=or(Kc,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,S){e.msg="invalid code lengths set",r.mode=I;break}r.have=0,r.mode=bl;case bl:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[l&(1<<r.lenbits)-1],g=_>>>24,m=_>>>16&255,x=_&65535,!(g<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(x<16)l>>>=g,f-=g,r.lens[r.have++]=x;else {if(x===16){for(E=g+2;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l>>>=g,f-=g,r.have===0){e.msg="invalid bit length repeat",r.mode=I;break}k=r.lens[r.have-1],h=3+(l&3),l>>>=2,f-=2;}else if(x===17){for(E=g+3;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=g,f-=g,k=0,h=3+(l&7),l>>>=3,f-=3;}else {for(E=g+7;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=g,f-=g,k=0,h=11+(l&127),l>>>=7,f-=7;}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=I;break}for(;h--;)r.lens[r.have++]=k;}}if(r.mode===I)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=I;break}if(r.lenbits=9,D={bits:r.lenbits},S=or(Al,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,S){e.msg="invalid literal/lengths set",r.mode=I;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},S=or(Rl,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,S){e.msg="invalid distances set",r.mode=I;break}if(r.mode=Kr,t===Yr)break e;case Kr:r.mode=Gr;case Gr:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,Yc(e,d),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,r.mode===Ce&&(r.back=-1);break}for(r.back=0;_=r.lencode[l&(1<<r.lenbits)-1],g=_>>>24,m=_>>>16&255,x=_&65535,!(g<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(m&&(m&240)===0){for(v=g,w=m,T=x;_=r.lencode[T+((l&(1<<v+w)-1)>>v)],g=_>>>24,m=_>>>16&255,x=_&65535,!(v+g<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=v,f-=v,r.back+=v;}if(l>>>=g,f-=g,r.back+=g,r.length=x,m===0){r.mode=El;break}if(m&32){r.back=-1,r.mode=Ce;break}if(m&64){e.msg="invalid literal/length code",r.mode=I;break}r.extra=m&15,r.mode=yl;case yl:if(r.extra){for(E=r.extra;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,f-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=_l;case _l:for(;_=r.distcode[l&(1<<r.distbits)-1],g=_>>>24,m=_>>>16&255,x=_&65535,!(g<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((m&240)===0){for(v=g,w=m,T=x;_=r.distcode[T+((l&(1<<v+w)-1)>>v)],g=_>>>24,m=_>>>16&255,x=_&65535,!(v+g<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=v,f-=v,r.back+=v;}if(l>>>=g,f-=g,r.back+=g,m&64){e.msg="invalid distance code",r.mode=I;break}r.offset=x,r.extra=m&15,r.mode=wl;case wl:if(r.extra){for(E=r.extra;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,f-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=I;break}r.mode=xl;case xl:if(u===0)break e;if(h=d-u,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=I;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),y=r.window;}else y=n,p=o-r.offset,h=r.length;h>u&&(h=u),u-=h,r.length-=h;do n[o++]=y[p++];while(--h);r.length===0&&(r.mode=Gr);break;case El:if(u===0)break e;n[o++]=r.length,u--,r.mode=Gr;break;case zn:if(r.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[a++]<<f,f+=8;}if(d-=u,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?me(r.check,n,d,o-d):qn(r.check,n,d,o-d)),d=u,(r.flags?l:Tl(l))!==r.check){e.msg="incorrect data check",r.mode=I;break}l=0,f=0;}r.mode=Sl;case Sl:if(r.wrap&&r.flags){for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=I;break}l=0,f=0;}r.mode=kl;case kl:S=Qc;break e;case I:S=Ll;break e;case Hn:return Un;case rp:default:return ie}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,(r.wsize||d!==e.avail_out&&r.mode<I&&(r.mode<zn||t!==il))&&Ml(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Hn,Un):(c-=e.avail_in,d-=e.avail_out,e.total_in+=c,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?me(r.check,n,d,e.next_out-d):qn(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Ce?128:0)+(r.mode===Kr||r.mode===Nn?256:0),(c===0&&d===0||t===il)&&S===Ye&&(S=tp),S)}function dp(e){if(!e||!e.state)return ie;var t=e.state;return t.window&&(t.window=null),e.state=null,Ye}function hp(e,t){var r;return !e||!e.state||(r=e.state,(r.wrap&2)===0)?ie:(r.head=t,t.done=false,Ye)}function cp(e,t){var r=t.length,i,n,a;return !e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Qr)?ie:i.mode===Qr&&(n=1,n=qn(n,t,r,0),n!==i.check)?Ll:(a=Ml(e,t,r,r),a?(i.mode=Hn,Un):(i.havedict=1,Ye))}se.inflateReset=Fl;se.inflateReset2=Il;se.inflateResetKeep=Dl;se.inflateInit=lp;se.inflateInit2=jl;se.inflate=up;se.inflateEnd=dp;se.inflateGetHeader=hp;se.inflateSetDictionary=cp;se.inflateInfo="pako inflate (from Nodeca project)";});var Zn=b((Sm,zl)=>{zl.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};});var Bl=b((km,Pl)=>{function pp(){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=false;}Pl.exports=pp;});var Ul=b(lr=>{var St=Nl(),sr=Se(),ei=Rn(),N=Zn(),Wn=qr(),gp=Ln(),mp=Bl(),ql=Object.prototype.toString;function Ke(e){if(!(this instanceof Ke))return new Ke(e);this.options=sr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new gp,this.strm.avail_out=0;var r=St.inflateInit2(this.strm,t.windowBits);if(r!==N.Z_OK)throw new Error(Wn[r]);if(this.header=new mp,St.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ei.string2buf(t.dictionary):ql.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=St.inflateSetDictionary(this.strm,t.dictionary),r!==N.Z_OK)))throw new Error(Wn[r])}Ke.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,s,u,l,f=false;if(this.ended)return false;o=t===~~t?t:t===true?N.Z_FINISH:N.Z_NO_FLUSH,typeof e=="string"?r.input=ei.binstring2buf(e):ql.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new sr.Buf8(i),r.next_out=0,r.avail_out=i),a=St.inflate(r,N.Z_NO_FLUSH),a===N.Z_NEED_DICT&&n&&(a=St.inflateSetDictionary(this.strm,n)),a===N.Z_BUF_ERROR&&f===true&&(a=N.Z_OK,f=false),a!==N.Z_STREAM_END&&a!==N.Z_OK)return this.onEnd(a),this.ended=true,false;r.next_out&&(r.avail_out===0||a===N.Z_STREAM_END||r.avail_in===0&&(o===N.Z_FINISH||o===N.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=ei.utf8border(r.output,r.next_out),u=r.next_out-s,l=ei.buf2string(r.output,s),r.next_out=u,r.avail_out=i-u,u&&sr.arraySet(r.output,r.output,s,u,0),this.onData(l)):this.onData(sr.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=true);}while((r.avail_in>0||r.avail_out===0)&&a!==N.Z_STREAM_END);return a===N.Z_STREAM_END&&(o=N.Z_FINISH),o===N.Z_FINISH?(a=St.inflateEnd(this.strm),this.onEnd(a),this.ended=true,a===N.Z_OK):(o===N.Z_SYNC_FLUSH&&(this.onEnd(N.Z_OK),r.avail_out=0),true)};Ke.prototype.onData=function(e){this.chunks.push(e);};Ke.prototype.onEnd=function(e){e===N.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=sr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Jn(e,t){var r=new Ke(t);if(r.push(e,true),r.err)throw r.msg||Wn[r.err];return r.result}function vp(e,t){return t=t||{},t.raw=true,Jn(e,t)}lr.Inflate=Ke;lr.inflate=Jn;lr.inflateRaw=vp;lr.ungzip=Jn;});var Wl=b((Cm,Zl)=>{var bp=Se().assign,yp=$s(),_p=Ul(),wp=Zn(),Hl={};bp(Hl,yp,_p,wp);Zl.exports=Hl;});var $l=b(ri=>{var xp=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Ep=Wl(),Jl=j(),ti=Q(),Sp=xp?"uint8array":"array";ri.magic="\b\0";function Ge(e,t){ti.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}Jl.inherits(Ge,ti);Ge.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Jl.transformTo(Sp,e.data),false);};Ge.prototype.flush=function(){ti.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],true);};Ge.prototype.cleanUp=function(){ti.prototype.cleanUp.call(this),this._pako=null;};Ge.prototype._createPako=function(){this._pako=new Ep[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta});};};ri.compressWorker=function(e){return new Ge("Deflate",e)};ri.uncompressWorker=function(){return new Ge("Inflate",{})};});var Vn=b($n=>{var Vl=Q();$n.STORE={magic:"\0\0",compressWorker:function(){return new Vl("STORE compression")},uncompressWorker:function(){return new Vl("STORE decompression")}};$n.DEFLATE=$l();});var Xn=b(Qe=>{Qe.LOCAL_FILE_HEADER="PK";Qe.CENTRAL_FILE_HEADER="PK";Qe.CENTRAL_DIRECTORY_END="PK";Qe.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Qe.ZIP64_CENTRAL_DIRECTORY_END="PK";Qe.DATA_DESCRIPTOR="PK\x07\b";});var Gl=b((Om,Kl)=>{var kt=j(),Tt=Q(),Yn=ct(),Xl=Mr(),ii=Xn(),O=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},kp=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},Tp=function(e){return (e||0)&63},Yl=function(e,t,r,i,n,a){var o=e.file,s=e.compression,u=a!==Yn.utf8encode,l=kt.transformTo("string",a(o.name)),f=kt.transformTo("string",Yn.utf8encode(o.name)),c=o.comment,d=kt.transformTo("string",a(c)),h=kt.transformTo("string",Yn.utf8encode(c)),p=f.length!==o.name.length,y=h.length!==c.length,_,g,m="",x="",v="",w=o.dir,T=o.date,k={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),!u&&(p||y)&&(S|=2048);var C=0,D=0;w&&(C|=16),n==="UNIX"?(D=798,C|=kp(o.unixPermissions,w)):(D=20,C|=Tp(o.dosPermissions)),_=T.getUTCHours(),_=_<<6,_=_|T.getUTCMinutes(),_=_<<5,_=_|T.getUTCSeconds()/2,g=T.getUTCFullYear()-1980,g=g<<4,g=g|T.getUTCMonth()+1,g=g<<5,g=g|T.getUTCDate(),p&&(x=O(1,1)+O(Xl(l),4)+f,m+="up"+O(x.length,2)+x),y&&(v=O(1,1)+O(Xl(d),4)+h,m+="uc"+O(v.length,2)+v);var E="";E+=`
|
|
2
|
+
\0`,E+=O(S,2),E+=s.magic,E+=O(_,2),E+=O(g,2),E+=O(k.crc32,4),E+=O(k.compressedSize,4),E+=O(k.uncompressedSize,4),E+=O(l.length,2),E+=O(m.length,2);var K=ii.LOCAL_FILE_HEADER+E+l+m,et=ii.CENTRAL_FILE_HEADER+O(D,2)+E+O(d.length,2)+"\0\0\0\0"+O(C,4)+O(i,4)+l+m+d;return {fileRecord:K,dirRecord:et}},Cp=function(e,t,r,i,n){var a="",o=kt.transformTo("string",n(i));return a=ii.CENTRAL_DIRECTORY_END+"\0\0\0\0"+O(e,2)+O(e,2)+O(t,4)+O(r,4)+O(o.length,2)+o,a},Ap=function(e){var t="";return t=ii.DATA_DESCRIPTOR+O(e.crc32,4)+O(e.compressedSize,4)+O(e.uncompressedSize,4),t};function le(e,t,r,i){Tt.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=e,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}kt.inherits(le,Tt);le.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Tt.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-i-1))/r:100}}));};le.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=Yl(e,t,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=true;};le.prototype.closedSource=function(e){this.accumulate=false;var t=this.streamFiles&&!e.file.dir,r=Yl(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:Ap(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;};le.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=Cp(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}});};le.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();};le.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end();}),e.on("error",function(r){t.error(r);}),this};le.prototype.resume=function(){if(!Tt.prototype.resume.call(this))return false;if(!this.previous&&this._sources.length)return this.prepareNextSource(),true;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),true};le.prototype.error=function(e){var t=this._sources;if(!Tt.prototype.error.call(this,e))return false;for(var r=0;r<t.length;r++)try{t[r].error(e);}catch{}return true};le.prototype.lock=function(){Tt.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock();};Kl.exports=le;});var ef=b(Ql=>{var Rp=Vn(),Lp=Gl(),Op=function(e,t){var r=e||t,i=Rp[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};Ql.generateWorker=function(e,t,r){var i=new Lp(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var s=Op(o.options.compression,t.compression),u=o.options.compressionOptions||t.compressionOptions||{},l=o.dir,f=o.date;o._compressWorker(s,u).withStreamInfo("file",{name:a,dir:l,date:f,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(i);}),i.entriesCount=n;}catch(a){i.error(a);}return i};});var rf=b((Fm,tf)=>{var Dp=j(),ni=Q();function fr(e,t){ni.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=false,this._bindStream(t);}Dp.inherits(fr,ni);fr.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}});}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r);}).on("end",function(){t.isPaused?t._upstreamEnded=true:t.end();});};fr.prototype.pause=function(){return ni.prototype.pause.call(this)?(this._stream.pause(),true):false};fr.prototype.resume=function(){return ni.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),true):false};tf.exports=fr;});var cf=b((Im,hf)=>{var Fp=ct(),ur=j(),sf=Q(),Ip=en(),lf=tn(),nf=Nr(),jp=ns(),Mp=ef(),af=Pt(),Np=rf(),ff=function(e,t,r){var i=ur.getTypeOf(t),n,a=ur.extend(r||{},lf);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=true),a.dosPermissions&&a.dosPermissions&16&&(a.dir=true),a.dir&&(e=uf(e)),a.createFolders&&(n=zp(e))&&df.call(this,n,true);var o=i==="string"&&a.binary===false&&a.base64===false;(!r||typeof r.binary>"u")&&(a.binary=!o);var s=t instanceof nf&&t.uncompressedSize===0;(s||a.dir||!t||t.length===0)&&(a.base64=false,a.binary=true,t="",a.compression="STORE",i="string");var u=null;t instanceof nf||t instanceof sf?u=t:af.isNode&&af.isStream(t)?u=new Np(e,t):u=ur.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new jp(e,u,a);this.files[e]=l;},zp=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},uf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},df=function(e,t){return t=typeof t<"u"?t:lf.createFolders,e=uf(e),this.files[e]||ff.call(this,e,null,{dir:true,createFolders:t}),this.files[e]};function of(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Pp={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,i;for(t in this.files)i=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,i);},filter:function(e){var t=[];return this.forEach(function(r,i){e(r,i)&&t.push(i);}),t},file:function(e,t,r){if(arguments.length===1)if(of(e)){var i=e;return this.filter(function(a,o){return !o.dir&&i.test(a)})}else {var n=this.files[this.root+e];return n&&!n.dir?n:null}else e=this.root+e,ff.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(of(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=df.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(n,a){return a.name.slice(0,e.length)===e}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=ur.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Fp.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");ur.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var i=r.comment||this.comment||"";t=Mp.generateWorker(this,r,i);}catch(n){t=new sf("error"),t.error(n);}return new Ip(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};hf.exports=Pp;});var Kn=b((jm,gf)=>{var Bp=j();function pf(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}pf.prototype={checkOffset:function(e){this.checkIndex(this.index+e);},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e;},skip:function(e){this.setIndex(this.index+e);},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return Bp.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};gf.exports=pf;});var Gn=b((Mm,vf)=>{var mf=Kn(),qp=j();function Ct(e){mf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255;}qp.inherits(Ct,mf);Ct.prototype.byteAt=function(e){return this.data[this.zero+e]};Ct.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===i&&this.data[a+3]===n)return a-this.zero;return -1};Ct.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&i===a[2]&&n===a[3]};Ct.prototype.readData=function(e){if(this.checkOffset(e),e===0)return [];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};vf.exports=Ct;});var _f=b((Nm,yf)=>{var bf=Kn(),Up=j();function At(e){bf.call(this,e);}Up.inherits(At,bf);At.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};At.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};At.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};At.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};yf.exports=At;});var ea=b((zm,xf)=>{var wf=Gn(),Hp=j();function Qn(e){wf.call(this,e);}Hp.inherits(Qn,wf);Qn.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};xf.exports=Qn;});var kf=b((Pm,Sf)=>{var Ef=ea(),Zp=j();function ta(e){Ef.call(this,e);}Zp.inherits(ta,Ef);ta.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Sf.exports=ta;});var ra=b((Bm,Cf)=>{var ai=j(),Tf=xe(),Wp=Gn(),Jp=_f(),$p=kf(),Vp=ea();Cf.exports=function(e){var t=ai.getTypeOf(e);return ai.checkSupport(t),t==="string"&&!Tf.uint8array?new Jp(e):t==="nodebuffer"?new $p(e):Tf.uint8array?new Vp(ai.transformTo("uint8array",e)):new Wp(ai.transformTo("array",e))};});var Of=b((qm,Lf)=>{var ia=ra(),Pe=j(),Xp=Nr(),Af=Mr(),oi=ct(),si=Vn(),Yp=xe(),Kp=0,Gp=3,Qp=function(e){for(var t in si)if(Object.prototype.hasOwnProperty.call(si,t)&&si[t].magic===e)return si[t];return null};function Rf(e,t){this.options=e,this.loadOptions=t;}Rf.prototype={isEncrypted:function(){return (this.bitFlag&1)===1},useUTF8:function(){return (this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),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(t=Qp(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+Pe.pretty(this.compressionMethod)+" unknown (inner file : "+Pe.transformTo("string",this.fileName)+")");this.decompressed=new Xp(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize));},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===Kp&&(this.dosPermissions=this.externalFileAttributes&63),e===Gp&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=ia(this.extraFields[1].value);this.uncompressedSize===Pe.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===Pe.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===Pe.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===Pe.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,i,n;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),i=e.readInt(2),n=e.readData(i),this.extraFields[r]={id:r,length:i,value:n};e.setIndex(t);},handleUTF8:function(){var e=Yp.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=oi.utf8decode(this.fileName),this.fileCommentStr=oi.utf8decode(this.fileComment);else {var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else {var r=Pe.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else {var n=Pe.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n);}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=ia(e.value);return t.readInt(1)!==1||Af(this.fileName)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=ia(e.value);return t.readInt(1)!==1||Af(this.fileComment)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null}};Lf.exports=Rf;});var If=b((Um,Ff)=>{var eg=ra(),Ae=j(),fe=Xn(),tg=Of(),rg=xe();function Df(e){this.files=[],this.loadOptions=e;}Df.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Ae.pretty(t)+", expected "+Ae.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4),n=i===t;return this.reader.setIndex(r),n},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 e=this.reader.readData(this.zipCommentLength),t=rg.uint8array?"uint8array":"array",r=Ae.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r);},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 e=this.zip64EndOfCentralSize-44,t=0,r,i,n;t<e;)r=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[r]={id:r,length:i,value:n};},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(fe.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes();},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(fe.CENTRAL_FILE_HEADER);)e=new tg({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);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 e=this.reader.lastIndexOfSignature(fe.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,fe.LOCAL_FILE_HEADER);throw t?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"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(fe.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Ae.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Ae.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Ae.MAX_VALUE_16BITS||this.centralDirRecords===Ae.MAX_VALUE_16BITS||this.centralDirSize===Ae.MAX_VALUE_32BITS||this.centralDirOffset===Ae.MAX_VALUE_32BITS){if(this.zip64=true,e=this.reader.lastIndexOfSignature(fe.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(fe.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,fe.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(fe.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(fe.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=r-i;if(n>0)this.isSignature(r,fe.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=eg(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}};Ff.exports=Df;});var Nf=b((Hm,Mf)=>{var na=j(),li=ut(),ig=ct(),ng=If(),ag=an(),jf=Pt();function og(e){return new li.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new ag);i.on("error",function(n){r(n);}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t();}).resume();})}Mf.exports=function(e,t){var r=this;return t=na.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:ig.utf8decode}),jf.isNode&&jf.isStream(e)?li.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):na.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then(function(i){var n=new ng(t);return n.load(i),n}).then(function(n){var a=[li.Promise.resolve(n)],o=n.files;if(t.checkCRC32)for(var s=0;s<o.length;s++)a.push(og(o[s]));return li.Promise.all(a)}).then(function(n){for(var a=n.shift(),o=a.files,s=0;s<o.length;s++){var u=o[s],l=u.fileNameStr,f=na.resolve(u.fileNameStr);r.file(f,u.decompressed,{binary:true,optimizedBinaryString:true,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:t.createFolders}),u.dir||(r.file(f).unsafeOriginalName=l);}return a.zipComment.length&&(r.comment=a.zipComment),r})};});var Pf=b((Zm,zf)=>{function ne(){if(!(this instanceof ne))return new ne;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 e=new ne;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e};}ne.prototype=cf();ne.prototype.loadAsync=Nf();ne.support=xe();ne.defaults=tn();ne.version="3.10.1";ne.loadAsync=function(e,t){return new ne().loadAsync(e,t)};ne.external=ut();zf.exports=ne;});var qf={};Gf(qf,{unpackJdfxToDocument:()=>lg});function sg(e){return !e||typeof e!="string"||e.startsWith("/")||e.includes("\\")||e.includes("..")?false:e.startsWith(`${_a}/`)}async function lg(e){let t=await Bf.default.loadAsync(e),r=t.file(hi);if(!r)throw new Error(`${hi} missing from .jdfx bundle`);let i=JSON.parse(await r.async("string")),n=t.file(ya),a=null;if(n)try{a=JSON.parse(await n.async("string"));}catch{a=null;}let o=new Map;if(a?.assets)for(let u of a.assets){if(!sg(u.path)){console.warn(`[jdfjs] dropping unsafe manifest asset path: ${u.path}`);continue}let l=t.file(u.path);if(!l)continue;let f=await l.async("uint8array"),c=new Blob([f],{type:u.mimeType});o.set(u.id,URL.createObjectURL(c));}function s(u){if(u)for(let l of u){if(l?.type==="image"&&l.resource){let f=o.get(l.resource);f&&(l.src=f);}l?.elements&&s(l.elements),l?.children&&s(l.children);}}for(let u of i.pages||[])s(u.elements);return i}var Bf,Uf=Rt(()=>{Bf=eu(Pf());gr();});gr();gr();function xa(e){if(typeof e=="number")return `${e}px`;if(typeof e=="string")return e;let{top:t=0,right:r=0,bottom:i=0,left:n=0}=e;return `${t}px ${r}px ${i}px ${n}px`}function B(e){let t={};if(e.fontFamily&&(t["font-family"]=e.fontFamily),e.fontSize&&(t["font-size"]=`${e.fontSize*1.333}px`),e.fontWeight&&(t["font-weight"]=String(e.fontWeight)),e.fontStyle&&(t["font-style"]=e.fontStyle),e.color&&(t.color=e.color),e.backgroundColor&&(t["background-color"]=e.backgroundColor),e.textAlign&&(t["text-align"]=e.textAlign),e.textDecoration){let r=e.textDecoration==="strikethrough"?"line-through":e.textDecoration;t["text-decoration"]=r;}return e.lineHeight&&(t["line-height"]=String(e.lineHeight)),e.letterSpacing!=null&&(t["letter-spacing"]=typeof e.letterSpacing=="number"?`${e.letterSpacing}px`:e.letterSpacing),e.padding!=null&&(t.padding=xa(e.padding)),e.margin!=null&&(t.margin=xa(e.margin)),e.marginTop!=null&&(t["margin-top"]=`${e.marginTop}px`),e.marginBottom!=null&&(t["margin-bottom"]=`${e.marginBottom}px`),e.border&&(t.border=e.border),e.borderRadius!=null&&(t["border-radius"]=typeof e.borderRadius=="number"?`${e.borderRadius}px`:e.borderRadius),e.opacity!=null&&(t.opacity=String(e.opacity)),t}function $(e,t){if(!e)return {};if(typeof e=="string")return B(t[e]||{});if(Array.isArray(e)){let r={};for(let i of e)r={...r,...t[i]||{}};return B(r)}return B(e)}function U(e,t){for(let[r,i]of Object.entries(t))e.style.setProperty(r,i);}function ci(e){if(!e)return null;let t=typeof e=="string"?e:e.target;if(typeof e=="string"?e.startsWith("#"):e.type==="internal"){let i=t.replace(/^#/,"").match(/^page-(\d+)$/i);return i?{href:t,internal:true,pageIndex:Number(i[1])-1}:{href:t,internal:true}}return {href:t,internal:false}}function pi(e,t,r){e.href=t.href,t.internal?e.addEventListener("click",i=>{i.preventDefault(),t.pageIndex!=null&&r&&r(t.pageIndex);}):(e.target="_blank",e.rel="noopener noreferrer");}var tt="http://www.w3.org/2000/svg";function mr(e,t){let r=document.createElement("div");nu(r,e);let i=null;switch(e.type){case "text":i=au(e,t);break;case "richtext":i=su(e,t);break;case "image":i=hu(e,t);break;case "table":i=bu(e,t);break;case "list":i=yu(e,t);break;case "shape":i=_u(e);break;case "collapsible":i=wu(e,t);break;case "toc":i=xu(e,t);break;case "input":i=Eu(e,t);break;case "textarea":i=Su(e,t);break;case "checkbox":i=ku(e,t);break;case "select":i=Tu(e,t);break;case "signature":i=Cu(e,t);break}return i?(r.appendChild(i),r):null}function nu(e,t){let r=t;r.position&&(e.style.position="absolute",r.position.x!=null&&(e.style.left=`${M(r.position.x)}px`),r.position.y!=null&&(e.style.top=`${M(r.position.y)}px`)),r.width!=null&&(e.style.width=`${M(r.width)}px`),r.height!=null&&(e.style.height=`${M(r.height)}px`);}function au(e,t){let r=ou(e.heading),i=document.createElement(r);i.className="jdfjs-text",i.style.margin="0",i.style.whiteSpace="pre-wrap",U(i,$(e.style,t.styles)),e.align&&(i.style.textAlign=e.align);let n=ci(e.link);if(n){let a=document.createElement("a");pi(a,n,t.onNavigatePage),a.className="jdfjs-link",a.textContent=e.content||"",i.appendChild(a);}else i.textContent=e.content||"";return i}function ou(e){return e===true?"h1":typeof e=="number"&&e>=1&&e<=6?"h"+e:"p"}function su(e,t){let r=document.createElement("p");r.className="jdfjs-richtext",r.style.margin="0",U(r,$(e.style,t.styles));for(let i of e.runs||[])r.appendChild(fu(i,t));return r}function lu(e,t){let r={};if(e.style)if(typeof e.style=="string")Object.assign(r,B(t[e.style]||{}));else if(Array.isArray(e.style))for(let n of e.style)Object.assign(r,B(t[n]||{}));else Object.assign(r,B(e.style));e.bold&&(r["font-weight"]="bold"),e.italic&&(r["font-style"]="italic");let i=[];return e.underline&&i.push("underline"),e.strikethrough&&i.push("line-through"),i.length&&(r["text-decoration"]=i.join(" ")),e.color&&(r.color=e.color),e.fontSize&&(r["font-size"]=`${e.fontSize*1.333}px`),e.fontFamily&&(r["font-family"]=e.fontFamily),r}function fu(e,t){let r=ci(e.link),i=r?document.createElement("a"):document.createElement("span");return r&&(pi(i,r,t.onNavigatePage),i.classList.add("jdfjs-link")),U(i,lu(e,t.styles)),i.textContent=e.text,i}function uu(e,t){if(!e)return;let r=e[t];if(r&&typeof r=="object"&&"data"in r)return r;let i=e.images?.[t];if(i)return i}function du(e,t){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let r=uu(t,e.resource);if(r?.data){let i=r.mimeType||"image/png";return r.data.startsWith("data:")?r.data:`data:${i};base64,${r.data}`}if(r?.path)return r.path}return e.src||""}function hu(e,t){let r=document.createElement("div");r.className="jdfjs-image",r.style.width="100%",r.style.height="100%";let i=document.createElement("img");switch(i.src=du(e,t.resources),i.alt=e.alt||"",i.style.display="block",i.style.width="100%",i.style.height="100%",e.fit){case "cover":i.style.objectFit="cover";break;case "fill":i.style.objectFit="fill";break;case "none":i.style.objectFit="none";break;default:i.style.objectFit="contain";}return U(i,$(e.style,t.styles)),r.appendChild(i),r}function cu(e){return e==null?"":typeof e=="string"?e:typeof e=="object"?e.content==null?"":String(e.content):String(e)}function pu(e){return e==null||typeof e!="object"?{}:{colspan:e.colspan,rowspan:e.rowspan}}function gu(e,t){if(e==null||typeof e!="object"||!e.style)return {};let r=e.style;if(typeof r=="string")return B(t[r]||{});if(Array.isArray(r)){let i={};for(let n of r)i={...i,...B(t[n]||{})};return i}return B(r)}function mu(e){return e==null||typeof e!="object"?void 0:e.align}function vu(e){if(e!=null)return typeof e=="number"?`${M(e)}px`:e}function bu(e,t){let r=document.createElement("div");r.className="jdfjs-table-wrap",U(r,$(e.style,t.styles)),r.style.overflowX="auto";let i=(()=>{let d=e.headerStyle;if(!d)return {};if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let h={};for(let p of d)h={...h,...B(t.styles[p]||{})};return h}return B(d)})(),n=(()=>{let d=e.rowStyle;if(!d)return {};if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let h={};for(let p of d)h={...h,...B(t.styles[p]||{})};return h}return B(d)})(),a=(()=>{let d=e.alternateRowStyle;if(!d){let h=e.alternatingRowColor;return h?{"background-color":h}:{}}if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let h={};for(let p of d)h={...h,...B(t.styles[p]||{})};return h}return B(d)})(),o=(()=>{let d=e.borders;return d===false?{outer:false,inner:false}:d===true||d===void 0?{outer:true,inner:true,color:"#e2e8f0",width:1}:{outer:true,inner:true,color:"#e2e8f0",width:1,...d}})(),s=e.headers??e.columns?.map(d=>d.header||"").filter(d=>d!==""),u=d=>e.columns?.[d]?.align,l=document.createElement("table");if(l.style.width="100%",l.style.borderCollapse="collapse",l.style.tableLayout=e.columns?.some(d=>d.width!=null)?"fixed":"auto",l.style.fontSize="14px",o.outer&&(l.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),e.columns?.some(d=>d.width!=null)){let d=document.createElement("colgroup");e.columns.forEach(h=>{let p=document.createElement("col"),y=vu(h.width);y&&(p.style.width=y),d.appendChild(p);}),l.appendChild(d);}if(s&&s.length>0){let d=document.createElement("thead"),h=document.createElement("tr");U(h,i),s.forEach((p,y)=>{let _=document.createElement("th");_.textContent=p,_.style.padding="8px 12px",_.style.fontWeight="600",_.style.background="#f8fafc",_.style.textAlign=u(y)||"left",o.inner&&(_.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),h.appendChild(_);}),d.appendChild(h),l.appendChild(d);}let f=document.createElement("tbody");return (Array.isArray(e.rows)?e.rows:[]).forEach((d,h)=>{if(!Array.isArray(d))return;let p=document.createElement("tr");U(p,n),h%2===1&&U(p,a),d.forEach((y,_)=>{let g=document.createElement("td");g.textContent=cu(y);let m=pu(y);m.colspan&&(g.colSpan=m.colspan),m.rowspan&&(g.rowSpan=m.rowspan),g.style.padding="8px 12px",g.style.verticalAlign="top",g.style.textAlign=mu(y)||u(_)||"left",o.inner&&(g.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),U(g,gu(y,t.styles)),p.appendChild(g);}),f.appendChild(p);}),l.appendChild(f),r.appendChild(l),r}function yu(e,t){let r=document.createElement("div");r.className="jdfjs-list-wrap",U(r,$(e.style,t.styles));let i=e.listType??(e.ordered?"ordered":"unordered"),n=Ea(i);return Sa(n,e.items||[],i),r.appendChild(n),r}function Ea(e){let t=document.createElement(e==="ordered"?"ol":"ul");return t.style.margin="0",t.style.paddingLeft="20px",t.style.listStyle=e==="ordered"?"decimal":"disc",t}function Sa(e,t,r,i){for(let n of t){let a=document.createElement("li");if(a.style.fontSize="14px",a.style.lineHeight="1.6",a.appendChild(document.createTextNode(n.content)),n.children?.length){let o=n.listType||r,s=Ea(o);s.style.marginTop="4px",Sa(s,n.children,o),a.appendChild(s);}e.appendChild(a);}}function _u(e){let t=document.createElement("div");t.className="jdfjs-shape",t.style.width="100%",t.style.height="100%";let r=e.width??100,i=e.height??100,n=e.fill??"none",a=(()=>{let l=e.stroke;return typeof l=="string"?l:l?.color?l.color:"none"})(),o=(()=>{let l=e.stroke;return typeof l=="object"&&l?.width!=null?l.width:e.strokeWidth??0})(),s=document.createElementNS(tt,"svg");s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("viewBox",`0 0 ${r} ${i}`),s.setAttribute("preserveAspectRatio","none"),s.style.display="block",s.style.overflow="visible";let u=null;switch(e.shape){case "rect":{let l=document.createElementNS(tt,"rect");l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(r)),l.setAttribute("height",String(i)),e.borderRadius&&l.setAttribute("rx",String(e.borderRadius)),u=l;break}case "circle":{let l=document.createElementNS(tt,"circle");l.setAttribute("cx",String(r/2)),l.setAttribute("cy",String(i/2)),l.setAttribute("r",String(Math.min(r,i)/2)),u=l;break}case "ellipse":{let l=document.createElementNS(tt,"ellipse");l.setAttribute("cx",String(r/2)),l.setAttribute("cy",String(i/2)),l.setAttribute("rx",String(r/2)),l.setAttribute("ry",String(i/2)),u=l;break}case "line":{let l=document.createElementNS(tt,"line");return l.setAttribute("x1","0"),l.setAttribute("y1","0"),l.setAttribute("x2",String(r)),l.setAttribute("y2",String(i)),l.setAttribute("stroke",a==="none"?n!=="none"?n:"currentColor":a),l.setAttribute("stroke-width",String(o||.3)),s.appendChild(l),t.appendChild(s),t}case "path":{let l=document.createElementNS(tt,"path");l.setAttribute("d",e.path||""),l.setAttribute("fill-rule","evenodd"),u=l;break}}return u&&(u.setAttribute("fill",n),u.setAttribute("stroke",a),o&&u.setAttribute("stroke-width",String(o)),s.appendChild(u)),t.appendChild(s),t}function wu(e,t){let r=document.createElement("div");r.className="jdfjs-collapsible",U(r,$(e.style,t.styles)),r.style.border="1px solid #e2e8f0",r.style.borderRadius="8px",r.style.overflow="hidden",r.style.background="#ffffff";let i=document.createElement("button");i.type="button",i.className="jdfjs-collapsible-header",i.style.width="100%",i.style.display="flex",i.style.alignItems="center",i.style.gap="8px",i.style.padding="10px 16px",i.style.fontSize="14px",i.style.fontWeight="500",i.style.background="#f8fafc",i.style.border="0",i.style.cursor="pointer",i.style.textAlign="left";let n=document.createElement("span");n.textContent="\u25B6",n.style.fontSize="10px",n.style.transition="transform 0.15s ease";let a=document.createElement("span");a.textContent=e.title||"Section",a.style.flex="1",i.appendChild(n),i.appendChild(a),r.appendChild(i);let o=document.createElement("div");o.className="jdfjs-collapsible-body",o.style.padding="12px 16px",o.style.position="relative";let s=e.expanded??false,u=()=>{o.style.display=s?"block":"none",n.style.transform=s?"rotate(90deg)":"rotate(0deg)";};u(),i.addEventListener("click",()=>{s=!s,u();});for(let l of e.elements||[]){let f=mr(l,{...t,path:[...t.path,"elements"]});f&&o.appendChild(f);}return r.appendChild(o),r}function xu(e,t){let r=document.createElement("div");r.className="jdfjs-toc",U(r,$(e.style,t.styles));let i=e.depth??6,n=[];t.document.pages.forEach((a,o)=>{for(let s of a.elements){if(s.type!=="text")continue;let u=s,l=u.tocEntry||(u.heading?u.content:null);if(!l)continue;let f=typeof u.tocLevel=="number"?u.tocLevel:typeof u.heading=="number"?u.heading:1;f>i||n.push({title:l,pageIndex:o,level:f});}});for(let a of n){let o=document.createElement("button");o.type="button",o.className="jdfjs-toc-entry",o.style.display="flex",o.style.alignItems="baseline",o.style.gap="8px",o.style.width="100%",o.style.background="transparent",o.style.border="0",o.style.borderBottom="1px dotted #e2e8f0",o.style.padding=`6px 8px 6px ${(a.level-1)*16+8}px`,o.style.cursor="pointer",o.style.fontSize="14px",o.style.color="#334155",o.style.textAlign="left";let s=document.createElement("span");s.textContent=a.title,s.style.flex="1";let u=document.createElement("span");u.style.flex="1",u.style.borderBottom="1px dotted #cbd5e1",u.style.alignSelf="end",u.style.marginBottom="4px";let l=document.createElement("span");l.textContent=String(a.pageIndex+1),l.style.fontFamily="JetBrains Mono, monospace",l.style.fontSize="12px",l.style.color="#94a3b8",l.style.flexShrink="0",o.appendChild(s),o.appendChild(u),o.appendChild(l),o.addEventListener("click",()=>t.onNavigatePage?.(a.pageIndex)),r.appendChild(o);}return r}function vr(e){if(!e)return null;let t=document.createElement("label");return t.className="jdfjs-form-label",t.textContent=e,t}function be(e,t,r){e.onFormChange&&e.onFormChange(e.path,t,r);}function Eu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-input",U(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("input");return n.className="jdfjs-form-control",n.type=e.inputType||"text",n.name=e.name,e.value!=null&&(n.value=e.value),e.placeholder&&(n.placeholder=e.placeholder),e.readonly&&(n.readOnly=true),e.required&&(n.required=true),e.pattern&&(n.pattern=e.pattern),n.addEventListener("input",()=>be(t,"value",n.value)),n.addEventListener("change",()=>be(t,"value",n.value)),r.appendChild(n),r}function Su(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-textarea",U(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("textarea");return n.className="jdfjs-form-control",n.name=e.name,e.value!=null&&(n.value=e.value),e.placeholder&&(n.placeholder=e.placeholder),e.readonly&&(n.readOnly=true),e.required&&(n.required=true),e.rows&&(n.rows=e.rows),n.addEventListener("input",()=>be(t,"value",n.value)),n.addEventListener("change",()=>be(t,"value",n.value)),r.appendChild(n),r}function ku(e,t){let r=document.createElement("label");r.className="jdfjs-form-field jdfjs-form-checkbox",U(r,$(e.style,t.styles));let i=document.createElement("input");if(i.type="checkbox",i.name=e.name,i.checked=e.checked===true,e.readonly&&(i.disabled=true),e.required&&(i.required=true),i.addEventListener("change",()=>be(t,"checked",i.checked)),r.appendChild(i),e.label){let n=document.createElement("span");n.className="jdfjs-form-checkbox-label",n.textContent=e.label,r.appendChild(n);}return r}function Tu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-select",U(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("select");n.className="jdfjs-form-control",n.name=e.name,e.multiple&&(n.multiple=true),e.readonly&&(n.disabled=true),e.required&&(n.required=true);let a=new Set(e.multiple?e.values||[]:e.value!=null?[e.value]:[]);for(let o of e.options){let s=document.createElement("option");s.value=o.value,s.textContent=o.label??o.value,a.has(o.value)&&(s.selected=true),n.appendChild(s);}return n.addEventListener("change",()=>{if(e.multiple){let o=Array.from(n.selectedOptions).map(s=>s.value);be(t,"values",o);}else be(t,"value",n.value);}),r.appendChild(n),r}function Cu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-signature",U(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=M(e.width??80),a=M(e.height??30),o=document.createElement("canvas");if(o.className="jdfjs-form-signature-canvas",o.width=Math.max(50,n),o.height=Math.max(20,a),e.value){let d=new Image;d.onload=()=>{o.getContext("2d")?.drawImage(d,0,0,o.width,o.height);},d.src=e.value;}let s=false,u=null;function l(d){e.readonly||(s=true,u={x:d.offsetX,y:d.offsetY});}function f(d){if(!s||!u)return;let h=o.getContext("2d");h&&(h.strokeStyle="#0f172a",h.lineWidth=1.6,h.lineCap="round",h.beginPath(),h.moveTo(u.x,u.y),h.lineTo(d.offsetX,d.offsetY),h.stroke(),u={x:d.offsetX,y:d.offsetY});}function c(){if(s){s=false,u=null;try{be(t,"value",o.toDataURL("image/png"));}catch{}}}if(o.addEventListener("pointerdown",l),o.addEventListener("pointermove",f),o.addEventListener("pointerup",c),o.addEventListener("pointerleave",c),r.appendChild(o),!e.readonly){let d=document.createElement("button");d.type="button",d.className="jdfjs-form-signature-clear",d.textContent="Clear",d.addEventListener("click",h=>{h.preventDefault(),o.getContext("2d")?.clearRect(0,0,o.width,o.height),be(t,"value","");}),r.appendChild(d);}return r}function ka(e,t){return e.replace(/\{\{pageNumber\}\}/g,String(t.pageNumber)).replace(/\{\{totalPages\}\}/g,String(t.totalPages)).replace(/\{\{title\}\}/g,t.title).replace(/\{\{author\}\}/g,t.author)}var dr=new WeakMap;async function aa(e,t,r={}){let i=Zf(e),n=dr.get(i);n&&n.abort();let a=new AbortController;dr.set(i,a),i.classList.add("jdfjs-loading");try{let o=/\.jdfx(\?|#|$)/i.test(t),s=await fetch(t,{signal:a.signal,headers:o?{Accept:"application/jdf+zip,application/zip"}:{Accept:"application/json,application/jdf+json,application/jdf+zip,application/zip"}});if(!s.ok)throw new Error(`Failed to fetch ${t} (${s.status})`);let u=(s.headers.get("content-type")||"").toLowerCase(),l=u.includes("zip")||u.includes("jdf+zip"),f;if(o||l){let{unpackJdfxToDocument:c}=await Promise.resolve().then(()=>(Uf(),qf));f=await c(await s.arrayBuffer());}else f=await s.json();if(!f?.$jdf)throw new Error("Not a valid JDF document (missing $jdf field)");if(dr.get(i)!==a)throw new DOMException("Superseded by a newer src change","AbortError");return i.classList.remove("jdfjs-loading"),Hf(i,f,r)}catch(o){throw i.classList.remove("jdfjs-loading"),o.name==="AbortError"||(i.classList.add("jdfjs-error"),i.innerHTML=`<div class="jdfjs-error-msg">${fg(o.message)}</div>`,r.onError?.(o)),o}}function Hf(e,t,r={}){let i=Zf(e);return new fi(i,t,r).getInstance()}var fi=class{constructor(t,r,i={}){this.resizeObs=null;this.toolbarEl=null;this.sidebarEl=null;this.observer=null;this.darkModeMql=null;this.darkModeListener=null;this.windowResizeListener=null;this.container=t,this.doc=r,this.options={zoom:i.zoom??1,sidebar:i.sidebar??false,toolbar:i.toolbar??true,darkMode:i.darkMode??"auto",initialPage:i.initialPage??0,fit:i.fit??"manual",...i},this.zoom=this.options.zoom,this.currentPage=this.options.initialPage,this.applyContainerSize(),this.mount(),queueMicrotask(()=>this.options.onLoad?.(this.doc));}applyContainerSize(){let t=this.options.width,r=this.options.height;t!=null&&(this.container.style.width=typeof t=="number"?`${t}px`:t),r!=null&&(this.container.style.height=typeof r=="number"?`${r}px`:r);}mount(){this.container.innerHTML="",this.container.classList.add("jdfjs"),this.applyDarkMode(),this.root=document.createElement("div"),this.root.className="jdfjs-root",this.options.toolbar&&(this.toolbarEl=this.buildToolbar(),this.root.appendChild(this.toolbarEl));let t=document.createElement("div");t.className="jdfjs-body",this.options.sidebar&&(this.sidebarEl=this.buildSidebar(),t.appendChild(this.sidebarEl)),this.pagesEl=document.createElement("div"),this.pagesEl.className="jdfjs-pages",t.appendChild(this.pagesEl),this.root.appendChild(t),this.container.appendChild(this.root),this.renderAllPages(),this.setupScrollObserver(),this.setupResizeObserver(),this.applyFit(),this.currentPage>0&&this.scrollToPage(this.currentPage);}setupResizeObserver(){typeof ResizeObserver<"u"&&(this.resizeObs?.disconnect(),this.resizeObs=new ResizeObserver(()=>this.applyFit()),this.resizeObs.observe(this.pagesEl),this.resizeObs.observe(this.container)),this.windowResizeListener==null&&typeof window<"u"&&(this.windowResizeListener=()=>this.applyFit(),window.addEventListener("resize",this.windowResizeListener));}applyDarkMode(){this.darkModeMql&&this.darkModeListener&&(this.darkModeMql.removeEventListener("change",this.darkModeListener),this.darkModeMql=null,this.darkModeListener=null);let t=a=>{this.container.classList.toggle("jdfjs-dark",a);},r=this.options.darkMode;if(r==="dark"){t(true);return}if(r==="light"){t(false);return}if(typeof window>"u"||!window.matchMedia){t(false);return}let i=window.matchMedia("(prefers-color-scheme: dark)");t(i.matches);let n=a=>t(a.matches);i.addEventListener("change",n),this.darkModeMql=i,this.darkModeListener=n;}applyFit(){if(this.options.fit==="manual")return;let t=this.pagesEl.querySelector(".jdfjs-page");if(!t)return;let r=parseFloat(t.style.width||"0"),i=parseFloat(t.style.minHeight||"0");if(!r||!i)return;let n=this.pagesEl.clientWidth-32,a=this.pagesEl.clientHeight-32;this.options.fit==="fit-width"?this.zoom=Math.max(.25,Math.min(3,n/r)):this.options.fit==="fit-page"&&(this.zoom=Math.max(.25,Math.min(3,Math.min(n/r,a/i)))),this.applyZoom(),this.updateIndicators();}buildToolbar(){let t=document.createElement("div");return t.className="jdfjs-toolbar",t.innerHTML=`
|
|
3
3
|
<span class="jdfjs-title"></span>
|
|
4
4
|
<div class="jdfjs-spacer"></div>
|
|
5
5
|
<button class="jdfjs-btn" data-act="prev" title="Previous page">\u2039</button>
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
<button class="jdfjs-btn" data-act="zoom-out" title="Zoom out">\u2212</button>
|
|
10
10
|
<span class="jdfjs-zoom-indicator"></span>
|
|
11
11
|
<button class="jdfjs-btn" data-act="zoom-in" title="Zoom in">+</button>
|
|
12
|
-
`,t.querySelector(".jdfjs-title").textContent=this.doc.meta?.title??"Document",this.updateIndicators(t),t.addEventListener("click",r=>{let i=r.target.closest("[data-act]");if(!i)return;let n=i.getAttribute("data-act");n==="prev"?this.goToPage(this.currentPage-1):n==="next"?this.goToPage(this.currentPage+1):n==="zoom-in"?this.setZoom(this.zoom+.1):n==="zoom-out"&&this.setZoom(this.zoom-.1);}),t}buildSidebar(){let t=document.createElement("div");return t.className="jdfjs-sidebar",this.doc.pages.forEach((r,i)=>{let n=document.createElement("button");n.className="jdfjs-sidebar-thumb",n.setAttribute("data-page",String(i)),n.innerHTML=`<span class="jdfjs-sidebar-num">${i+1}</span>`,n.addEventListener("click",()=>this.goToPage(i)),t.appendChild(n);}),t}updateIndicators(t=this.toolbarEl){if(!t)return;let r=t.querySelector(".jdfjs-page-indicator");r&&(r.textContent=`${this.currentPage+1} / ${this.doc.pages.length}`);let i=t.querySelector(".jdfjs-zoom-indicator");i&&(i.textContent=`${Math.round(this.zoom*100)}%`),this.sidebarEl&&this.sidebarEl.querySelectorAll(".jdfjs-sidebar-thumb").forEach(n=>{let a=Number(n.getAttribute("data-page"));n.classList.toggle("jdfjs-sidebar-thumb-active",a===this.currentPage);});}renderAllPages(){this.pagesEl.innerHTML="";let t=this.doc.styles??{};this.doc.pages.forEach((r,i)=>{let n=this.renderPage(r,i,t);this.pagesEl.appendChild(n);}),this.applyZoom();}renderPage(t,r,i){let n=va(t.pageSize??this.doc.meta?.pageSize??"A4",t.pageOrientation??this.doc.meta?.pageOrientation??"portrait"),a={...ma,...this.doc.meta?.margins||{},...t.margins||{}},o=document.createElement("div");o.className="jdfjs-page-wrapper",o.setAttribute("data-page-index",String(r));let s=document.createElement("div");s.className="jdfjs-page",s.style.width=`${N(n.width)}px`,s.style.minHeight=`${N(n.height)}px`,t.background&&(s.style.backgroundColor=t.background);let u=t.header??this.doc.header,l=t.footer??this.doc.footer,f=u?.height??0,c=l?.height??0;if(u){let h=this.renderHeaderFooter(u,r,this.doc.pages.length,i);h.classList.add("jdfjs-header"),h.style.paddingTop=`${N(a.top/2)}px`,h.style.paddingLeft=`${N(a.left)}px`,h.style.paddingRight=`${N(a.right)}px`,s.appendChild(h);}let d=document.createElement("div");if(d.className="jdfjs-page-content",d.style.position="absolute",d.style.top=`${N((a.top||0)+f)}px`,d.style.right=`${N(a.right||0)}px`,d.style.bottom=`${N((a.bottom||0)+c)}px`,d.style.left=`${N(a.left||0)}px`,t.elements.forEach((h,w)=>{let b=mr(h,{styles:i,resources:this.doc.resources,document:this.doc,path:["pages",r,"elements",w],onNavigatePage:_=>this.goToPage(_),onFormChange:(_,p,g)=>this.handleFormChange(_,p,g)});b&&d.appendChild(b);}),s.appendChild(d),l){let h=this.renderHeaderFooter(l,r,this.doc.pages.length,i);h.classList.add("jdfjs-footer"),h.style.paddingBottom=`${N(a.bottom/2)}px`,h.style.paddingLeft=`${N(a.left)}px`,h.style.paddingRight=`${N(a.right)}px`,s.appendChild(h);}return o.appendChild(s),o}renderHeaderFooter(t,r,i,n){let a=document.createElement("div");if(t.elements?.length)t.elements.forEach((o,s)=>{let u=mr(o,{styles:n,resources:this.doc.resources,document:this.doc,path:["__hf__",r,s],onNavigatePage:l=>this.goToPage(l)});u&&a.appendChild(u);});else if(t.content){let o=ka(t.content,{pageNumber:r+1,totalPages:i,title:this.doc.meta?.title??"",author:this.doc.meta?.author??""}),s=document.createElement("div");s.textContent=o,Object.assign(s.style,$(t.style,n)),a.appendChild(s);}return a}setupScrollObserver(){typeof IntersectionObserver>"u"||(this.observer?.disconnect(),this.observer=new IntersectionObserver(t=>{let r=t.filter(i=>i.isIntersecting).sort((i,n)=>n.intersectionRatio-i.intersectionRatio);if(r[0]){let i=Number(r[0].target.getAttribute("data-page-index"));!isNaN(i)&&i!==this.currentPage&&(this.currentPage=i,this.updateIndicators(),this.options.onPageChange?.(i));}},{root:this.pagesEl,threshold:[.25,.5,.75]}),this.pagesEl.querySelectorAll("[data-page-index]").forEach(t=>this.observer.observe(t)));}scrollToPage(t){let r=this.pagesEl.querySelector(`[data-page-index="${t}"]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"});}applyZoom(){this.pagesEl.style.setProperty("--jdfjs-zoom",String(this.zoom)),this.pagesEl.querySelectorAll(".jdfjs-page").forEach(t=>{t.style.transform=`scale(${this.zoom})`,t.style.transformOrigin="top center";});}setZoom(t){this.zoom=Math.max(.25,Math.min(3,t)),this.applyZoom(),this.updateIndicators();}getZoom(){return this.zoom}goToPage(t){let r=Math.max(0,Math.min(this.doc.pages.length-1,t));this.currentPage=r,this.scrollToPage(r),this.updateIndicators(),this.options.onPageChange?.(r);}getCurrentPage(){return this.currentPage}setDocument(t){if(this.doc=t,this.currentPage=0,this.toolbarEl){let r=this.toolbarEl.querySelector(".jdfjs-title");r&&(r.textContent=t.meta?.title??"Document");}this.sidebarEl&&(this.sidebarEl.innerHTML="",this.buildSidebar().querySelectorAll(".jdfjs-sidebar-thumb").forEach(i=>this.sidebarEl.appendChild(i))),this.renderAllPages(),this.setupScrollObserver(),this.options.onLoad?.(t);}handleFormChange(t,r,i){let n=t.reduce((a,o)=>a==null?a:a[o],this.doc);n!=null&&(n[r]=i,this.options.onFormChange?.(this.doc,{path:t,field:r,value:i}));}*iterFormFields(){for(let t of this.doc.pages||[])for(let r of t.elements||[])!r||typeof r!="object"||(r.type==="input"||r.type==="textarea"||r.type==="checkbox"||r.type==="select"||r.type==="signature")&&typeof r.name=="string"&&r.name.length>0&&(yield {name:r.name,field:r});}toJSON(t={}){return t.pretty===false?JSON.stringify(this.doc):JSON.stringify(this.doc,null,2)}exportJdf(t={}){return new Blob([this.toJSON(t)],{type:"application/jdf+json"})}downloadJdf(t){let r=t||(this.doc.meta?.title?`${this.doc.meta.title.replace(/[^\w\s.-]+/g,"_")}.jdf`:"document.jdf"),i=this.exportJdf(),n=URL.createObjectURL(i),a=window.document.createElement("a");a.href=n,a.download=r,window.document.body.appendChild(a),a.click(),window.document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(n),1e3);}getFormValue(t){for(let r of this.iterFormFields())if(r.name===t)return r.field.type==="checkbox"?r.field.checked===true:r.field.type==="select"&&r.field.multiple?r.field.values||[]:r.field.value??""}getFormValues(){let t={};for(let r of this.iterFormFields())r.field.type==="checkbox"?t[r.name]=r.field.checked===true:r.field.type==="select"&&r.field.multiple?t[r.name]=r.field.values||[]:t[r.name]=r.field.value??"";return t}destroy(){this.observer?.disconnect(),this.resizeObs?.disconnect(),this.darkModeMql&&this.darkModeListener&&(this.darkModeMql.removeEventListener("change",this.darkModeListener),this.darkModeMql=null,this.darkModeListener=null),this.windowResizeListener&&typeof window<"u"&&(window.removeEventListener("resize",this.windowResizeListener),this.windowResizeListener=null);let t=dr.get(this.container);t&&(t.abort(),dr.delete(this.container)),this.container.innerHTML="",this.container.classList.remove("jdfjs","jdfjs-dark","jdfjs-loading","jdfjs-error"),this.container.style.removeProperty("width"),this.container.style.removeProperty("height");}getInstance(){let t=this;return {container:this.container,get document(){return t.doc},setZoom:i=>this.setZoom(i),getZoom:()=>this.getZoom(),goToPage:i=>this.goToPage(i),getCurrentPage:()=>this.getCurrentPage(),setDocument:i=>this.setDocument(i),destroy:()=>this.destroy(),exportJdf:i=>this.exportJdf(i),toJSON:i=>this.toJSON(i),downloadJdf:i=>this.downloadJdf(i),getFormValue:i=>this.getFormValue(i),getFormValues:()=>this.getFormValues()}}};function Zf(e){if(typeof e=="string"){let t=document.querySelector(e);if(!t)throw new Error(`jdfjs: container "${e}" not found`);return t}return e}function og(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var oa=new WeakSet,sa=new WeakMap,la=new WeakMap;function sg(e){let t={},r=c=>e.getAttribute(c),i=r("zoom");if(i!=null){let c=Number(i);isNaN(c)||(t.zoom=c);}let n=r("sidebar");n!=null&&(t.sidebar=n!=="false"&&n!=="0");let a=r("toolbar");a!=null&&(t.toolbar=a!=="false"&&a!=="0");let o=r("dark-mode")||r("darkmode");(o==="auto"||o==="light"||o==="dark")&&(t.darkMode=o);let s=r("page");if(s!=null){let c=Number(s);isNaN(c)||(t.initialPage=Math.max(0,Math.floor(c)-1));}let u=r("width");if(u!=null){let c=Number(u);t.width=isNaN(c)?u:c;}let l=r("height");if(l!=null){let c=Number(l);t.height=isNaN(c)?l:c;}let f=r("fit");return (f==="manual"||f==="fit-width"||f==="fit-page")&&(t.fit=f),t}function ui(e){if(oa.has(e)||e.hasAttribute("manual"))return;let t=e.getAttribute("src");if(!t)return;oa.add(e);let r=e;Jf(r);let i=sg(e);aa(r,t,i).then(n=>{sa.set(e,n),lg(r,n);}).catch(n=>{n?.name!=="AbortError"&&(console.error("[jdf.js] failed to embed",t,n),r.dispatchEvent(new CustomEvent("jdf-error",{detail:n,bubbles:true})));}),fg(r);}function lg(e,t){if(!e.hasAttribute("save-button"))return;let r=e.getAttribute("save-button"),i=r&&r.length>0&&r!=="true"?r:"Save",n=e.getAttribute("save-filename")||void 0,a=window.document.createElement("button");a.type="button",a.className="jdfjs-save-button",a.textContent=i,a.addEventListener("click",()=>t.downloadJdf(n)),getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.appendChild(a);}function fa(e){let t=sa.get(e);if(t){try{t.destroy();}catch{}sa.delete(e);}let r=la.get(e);r&&(r.disconnect(),la.delete(e)),oa.delete(e),ua.delete(e);}function Jf(e){let t=e.getAttribute("width");if(t!=null){let i=Number(t);e.style.width=isNaN(i)?t:`${i}px`;}let r=e.getAttribute("height");if(r!=null){let i=Number(r);e.style.height=isNaN(i)?r:`${i}px`;}}var ua=new WeakSet;function fg(e){if(ua.has(e)||typeof MutationObserver>"u")return;ua.add(e);let t=new MutationObserver(r=>{for(let i of r){if(i.type!=="attributes"||!i.attributeName)continue;let n=i.attributeName;n==="src"?(fa(e),ui(e)):(n==="width"||n==="height")&&Jf(e);}});t.observe(e,{attributes:true,attributeFilter:["src","width","height"]}),la.set(e,t);}function da(e=document){e.querySelectorAll("jdf").forEach(ui);}function Wf(){if(typeof MutationObserver>"u")return;new MutationObserver(t=>{for(let r of t)r.addedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?ui(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(ui));}),r.removedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?fa(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(fa));});}).observe(document.body,{childList:true,subtree:true});}function ug(e=document){da(e);}function dg(){typeof window>"u"||typeof document>"u"||window.JDFjsAutoInit!==false&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{da(),Wf();},{once:true}):(da(),Wf()));}dg();exports.JDFViewer=fi;exports.embed=aa;exports.jdf=ug;exports.render=Hf;//# sourceMappingURL=jdfjs.cjs.map
|
|
12
|
+
`,t.querySelector(".jdfjs-title").textContent=this.doc.meta?.title??"Document",this.updateIndicators(t),t.addEventListener("click",r=>{let i=r.target.closest("[data-act]");if(!i)return;let n=i.getAttribute("data-act");n==="prev"?this.goToPage(this.currentPage-1):n==="next"?this.goToPage(this.currentPage+1):n==="zoom-in"?this.setZoom(this.zoom+.1):n==="zoom-out"&&this.setZoom(this.zoom-.1);}),t}buildSidebar(){let t=document.createElement("div");return t.className="jdfjs-sidebar",this.doc.pages.forEach((r,i)=>{let n=document.createElement("button");n.className="jdfjs-sidebar-thumb",n.setAttribute("data-page",String(i)),n.innerHTML=`<span class="jdfjs-sidebar-num">${i+1}</span>`,n.addEventListener("click",()=>this.goToPage(i)),t.appendChild(n);}),t}updateIndicators(t=this.toolbarEl){if(!t)return;let r=t.querySelector(".jdfjs-page-indicator");r&&(r.textContent=`${this.currentPage+1} / ${this.doc.pages.length}`);let i=t.querySelector(".jdfjs-zoom-indicator");i&&(i.textContent=`${Math.round(this.zoom*100)}%`),this.sidebarEl&&this.sidebarEl.querySelectorAll(".jdfjs-sidebar-thumb").forEach(n=>{let a=Number(n.getAttribute("data-page"));n.classList.toggle("jdfjs-sidebar-thumb-active",a===this.currentPage);});}renderAllPages(){this.pagesEl.innerHTML="";let t=this.doc.styles??{};this.doc.pages.forEach((r,i)=>{let n=this.renderPage(r,i,t);this.pagesEl.appendChild(n);}),this.applyZoom();}renderPage(t,r,i){let n=va(t.pageSize??this.doc.meta?.pageSize??"A4",t.pageOrientation??this.doc.meta?.pageOrientation??"portrait"),a={...ma,...this.doc.meta?.margins||{},...t.margins||{}},o=document.createElement("div");o.className="jdfjs-page-wrapper",o.setAttribute("data-page-index",String(r));let s=document.createElement("div");s.className="jdfjs-page",s.style.width=`${M(n.width)}px`,s.style.minHeight=`${M(n.height)}px`,t.background&&(s.style.backgroundColor=t.background);let u=t.header??this.doc.header,l=t.footer??this.doc.footer,f=u?.height??0,c=l?.height??0;if(u){let h=t.header?["pages",r,"header"]:["header"],p=this.renderHeaderFooter(u,r,this.doc.pages.length,i,h);p.classList.add("jdfjs-header"),p.style.paddingTop=`${M(a.top/2)}px`,p.style.paddingLeft=`${M(a.left)}px`,p.style.paddingRight=`${M(a.right)}px`,s.appendChild(p);}let d=document.createElement("div");if(d.className="jdfjs-page-content",d.style.position="absolute",d.style.top=`${M((a.top||0)+f)}px`,d.style.right=`${M(a.right||0)}px`,d.style.bottom=`${M((a.bottom||0)+c)}px`,d.style.left=`${M(a.left||0)}px`,t.elements.forEach((h,p)=>{let y=mr(h,{styles:i,resources:this.doc.resources,document:this.doc,path:["pages",r,"elements",p],onNavigatePage:_=>this.goToPage(_),onFormChange:(_,g,m)=>this.handleFormChange(_,g,m)});y&&d.appendChild(y);}),s.appendChild(d),l){let h=t.footer?["pages",r,"footer"]:["footer"],p=this.renderHeaderFooter(l,r,this.doc.pages.length,i,h);p.classList.add("jdfjs-footer"),p.style.paddingBottom=`${M(a.bottom/2)}px`,p.style.paddingLeft=`${M(a.left)}px`,p.style.paddingRight=`${M(a.right)}px`,s.appendChild(p);}return o.appendChild(s),o}renderHeaderFooter(t,r,i,n,a){let o=document.createElement("div");if(t.elements?.length)t.elements.forEach((s,u)=>{let l=mr(s,{styles:n,resources:this.doc.resources,document:this.doc,path:[...a,"elements",u],onNavigatePage:f=>this.goToPage(f),onFormChange:(f,c,d)=>this.handleFormChange(f,c,d)});l&&o.appendChild(l);});else if(t.content){let s=ka(t.content,{pageNumber:r+1,totalPages:i,title:this.doc.meta?.title??"",author:this.doc.meta?.author??""}),u=document.createElement("div");u.textContent=s,Object.assign(u.style,$(t.style,n)),o.appendChild(u);}return o}setupScrollObserver(){typeof IntersectionObserver>"u"||(this.observer?.disconnect(),this.observer=new IntersectionObserver(t=>{let r=t.filter(i=>i.isIntersecting).sort((i,n)=>n.intersectionRatio-i.intersectionRatio);if(r[0]){let i=Number(r[0].target.getAttribute("data-page-index"));!isNaN(i)&&i!==this.currentPage&&(this.currentPage=i,this.updateIndicators(),this.options.onPageChange?.(i));}},{root:this.pagesEl,threshold:[.25,.5,.75]}),this.pagesEl.querySelectorAll("[data-page-index]").forEach(t=>this.observer.observe(t)));}scrollToPage(t){let r=this.pagesEl.querySelector(`[data-page-index="${t}"]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"});}applyZoom(){this.pagesEl.style.setProperty("--jdfjs-zoom",String(this.zoom)),this.pagesEl.querySelectorAll(".jdfjs-page").forEach(t=>{t.style.transform=`scale(${this.zoom})`,t.style.transformOrigin="top center";});}setZoom(t){this.zoom=Math.max(.25,Math.min(3,t)),this.applyZoom(),this.updateIndicators();}getZoom(){return this.zoom}goToPage(t){let r=Math.max(0,Math.min(this.doc.pages.length-1,t));this.currentPage=r,this.scrollToPage(r),this.updateIndicators(),this.options.onPageChange?.(r);}getCurrentPage(){return this.currentPage}setDocument(t){if(this.doc=t,this.currentPage=0,this.toolbarEl){let r=this.toolbarEl.querySelector(".jdfjs-title");r&&(r.textContent=t.meta?.title??"Document");}this.sidebarEl&&(this.sidebarEl.innerHTML="",this.buildSidebar().querySelectorAll(".jdfjs-sidebar-thumb").forEach(i=>this.sidebarEl.appendChild(i))),this.renderAllPages(),this.setupScrollObserver(),this.options.onLoad?.(t);}handleFormChange(t,r,i){let n=t.reduce((a,o)=>a==null?a:a[o],this.doc);n!=null&&(n[r]=i,this.options.onFormChange?.(this.doc,{path:t,field:r,value:i}));}*iterFormFields(){let t=new Set,r=function*(i){if(!i||typeof i!="object"||t.has(i))return;if(t.add(i),Array.isArray(i)){for(let a of i)yield*r(a);return}let n=i.type;if((n==="input"||n==="textarea"||n==="checkbox"||n==="select"||n==="signature")&&typeof i.name=="string"&&i.name.length>0&&(yield {name:i.name,field:i}),Array.isArray(i.elements)&&(yield*r(i.elements)),Array.isArray(i.items)&&(yield*r(i.items)),Array.isArray(i.rows))for(let a of i.rows)Array.isArray(a)&&(yield*r(a));};for(let i of this.doc.pages||[])yield*r(i.elements),yield*r(i.header?.elements),yield*r(i.footer?.elements);yield*r(this.doc.header?.elements),yield*r(this.doc.footer?.elements);}toJSON(t={}){return t.pretty===false?JSON.stringify(this.doc):JSON.stringify(this.doc,null,2)}exportJdf(t={}){return new Blob([this.toJSON(t)],{type:"application/jdf+json"})}downloadJdf(t){let r=t||(this.doc.meta?.title?`${this.doc.meta.title.replace(/[^\w\s.-]+/g,"_")}.jdf`:"document.jdf"),i=this.exportJdf(),n=URL.createObjectURL(i),a=window.document.createElement("a");a.href=n,a.download=r,window.document.body.appendChild(a),a.click(),window.document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(n),1e3);}getFormValue(t){for(let r of this.iterFormFields())if(r.name===t)return r.field.type==="checkbox"?r.field.checked===true:r.field.type==="select"&&r.field.multiple?r.field.values||[]:r.field.value??""}getFormValues(){let t={};for(let r of this.iterFormFields())r.field.type==="checkbox"?t[r.name]=r.field.checked===true:r.field.type==="select"&&r.field.multiple?t[r.name]=r.field.values||[]:t[r.name]=r.field.value??"";return t}destroy(){this.observer?.disconnect(),this.resizeObs?.disconnect(),this.darkModeMql&&this.darkModeListener&&(this.darkModeMql.removeEventListener("change",this.darkModeListener),this.darkModeMql=null,this.darkModeListener=null),this.windowResizeListener&&typeof window<"u"&&(window.removeEventListener("resize",this.windowResizeListener),this.windowResizeListener=null);let t=dr.get(this.container);t&&(t.abort(),dr.delete(this.container)),this.container.innerHTML="",this.container.classList.remove("jdfjs","jdfjs-dark","jdfjs-loading","jdfjs-error"),this.container.style.removeProperty("width"),this.container.style.removeProperty("height");}getInstance(){let t=this;return {container:this.container,get document(){return t.doc},setZoom:i=>this.setZoom(i),getZoom:()=>this.getZoom(),goToPage:i=>this.goToPage(i),getCurrentPage:()=>this.getCurrentPage(),setDocument:i=>this.setDocument(i),destroy:()=>this.destroy(),exportJdf:i=>this.exportJdf(i),toJSON:i=>this.toJSON(i),downloadJdf:i=>this.downloadJdf(i),getFormValue:i=>this.getFormValue(i),getFormValues:()=>this.getFormValues()}}};function Zf(e){if(typeof e=="string"){let t=document.querySelector(e);if(!t)throw new Error(`jdfjs: container "${e}" not found`);return t}return e}function fg(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var oa=new WeakSet,sa=new WeakMap,la=new WeakMap;function ug(e){let t={},r=c=>e.getAttribute(c),i=r("zoom");if(i!=null){let c=Number(i);isNaN(c)||(t.zoom=c);}let n=r("sidebar");n!=null&&(t.sidebar=n!=="false"&&n!=="0");let a=r("toolbar");a!=null&&(t.toolbar=a!=="false"&&a!=="0");let o=r("dark-mode")||r("darkmode");(o==="auto"||o==="light"||o==="dark")&&(t.darkMode=o);let s=r("page");if(s!=null){let c=Number(s);isNaN(c)||(t.initialPage=Math.max(0,Math.floor(c)-1));}let u=r("width");if(u!=null){let c=Number(u);t.width=isNaN(c)?u:c;}let l=r("height");if(l!=null){let c=Number(l);t.height=isNaN(c)?l:c;}let f=r("fit");return (f==="manual"||f==="fit-width"||f==="fit-page")&&(t.fit=f),t}function ui(e){if(oa.has(e)||e.hasAttribute("manual"))return;let t=e.getAttribute("src");if(!t)return;oa.add(e);let r=e;Jf(r);let i=ug(e);aa(r,t,i).then(n=>{sa.set(e,n),dg(r,n);}).catch(n=>{n?.name!=="AbortError"&&(console.error("[jdf.js] failed to embed",t,n),r.dispatchEvent(new CustomEvent("jdf-error",{detail:n,bubbles:true})));}),hg(r);}function dg(e,t){if(!e.hasAttribute("save-button"))return;let r=e.getAttribute("save-button"),i=r&&r.length>0&&r!=="true"?r:"Save",n=e.getAttribute("save-filename")||void 0,a=window.document.createElement("button");a.type="button",a.className="jdfjs-save-button",a.textContent=i,a.addEventListener("click",()=>t.downloadJdf(n)),getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.appendChild(a);}function fa(e){let t=sa.get(e);if(t){try{t.destroy();}catch{}sa.delete(e);}let r=la.get(e);r&&(r.disconnect(),la.delete(e)),oa.delete(e),ua.delete(e);}function Jf(e){let t=e.getAttribute("width");if(t!=null){let i=Number(t);e.style.width=isNaN(i)?t:`${i}px`;}let r=e.getAttribute("height");if(r!=null){let i=Number(r);e.style.height=isNaN(i)?r:`${i}px`;}}var ua=new WeakSet;function hg(e){if(ua.has(e)||typeof MutationObserver>"u")return;ua.add(e);let t=new MutationObserver(r=>{for(let i of r){if(i.type!=="attributes"||!i.attributeName)continue;let n=i.attributeName;n==="src"?(fa(e),ui(e)):(n==="width"||n==="height")&&Jf(e);}});t.observe(e,{attributes:true,attributeFilter:["src","width","height"]}),la.set(e,t);}function da(e=document){e.querySelectorAll("jdf").forEach(ui);}function Wf(){if(typeof MutationObserver>"u")return;new MutationObserver(t=>{for(let r of t)r.addedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?ui(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(ui));}),r.removedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?fa(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(fa));});}).observe(document.body,{childList:true,subtree:true});}function cg(e=document){da(e);}function pg(){typeof window>"u"||typeof document>"u"||window.JDFjsAutoInit!==false&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{da(),Wf();},{once:true}):(da(),Wf()));}pg();exports.JDFViewer=fi;exports.embed=aa;exports.jdf=cg;exports.render=Hf;//# sourceMappingURL=jdfjs.cjs.map
|
|
13
13
|
//# sourceMappingURL=jdfjs.cjs.map
|